diff --git a/CONTRIBUTORS.md b/CONTRIBUTORS.md index 306bea98e2..e9d91ae109 100644 --- a/CONTRIBUTORS.md +++ b/CONTRIBUTORS.md @@ -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) diff --git a/angular-formly/angular-formly.d.ts b/angular-formly/angular-formly.d.ts index 9917d217f4..2bf75af7d7 100644 --- a/angular-formly/angular-formly.d.ts +++ b/angular-formly/angular-formly.d.ts @@ -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 }; } -} \ No newline at end of file +} diff --git a/angular-google-analytics/angular-google-analytics-tests.ts b/angular-google-analytics/angular-google-analytics-tests.ts new file mode 100644 index 0000000000..9da39ba3c7 --- /dev/null +++ b/angular-google-analytics/angular-google-analytics-tests.ts @@ -0,0 +1,56 @@ +/// + +function ConfigurationMethodChaining(AnalyticsProvider: angular.google.analytics.AnalyticsProvider) { + AnalyticsProvider + .logAllCalls(true) + .startOffline(true) + .useECommerce(true, true); +} + +function EnableECommerce(AnalyticsProvider: angular.google.analytics.AnalyticsProvider) { + AnalyticsProvider.useECommerce(true, false); + AnalyticsProvider.useECommerce(true, true); + AnalyticsProvider.setCurrency("CDN"); +} + +function SetGoogleAnalyticsAccounts(AnalyticsProvider: angular.google.analytics.AnalyticsProvider) { + AnalyticsProvider.setAccount("UA-XXXXX-xx"); + AnalyticsProvider.setAccount([ + { tracker: "UA-12345-12", name: "tracker1" }, + { tracker: "UA-12345-34", name: "tracker2" } + ]); +} + +function UseClassicAnalytics(AnalyticsProvider: angular.google.analytics.AnalyticsProvider) { + AnalyticsProvider.useAnalytics(false); +} + +function UseDisplayFeatures(AnalyticsProvider: angular.google.analytics.AnalyticsProvider) { + AnalyticsProvider.useDisplayFeatures(true); +} + +function UseEnhancedLinkAttribution(AnalyticsProvider: angular.google.analytics.AnalyticsProvider) { + AnalyticsProvider.useEnhancedLinkAttribution(true); +} + +function UseCrossDomainLinking(AnalyticsProvider: angular.google.analytics.AnalyticsProvider) { + AnalyticsProvider.useCrossDomainLinker(true); + AnalyticsProvider.setCrossLinkDomains(["domain-1.com", "domain-2.com"]); +} + +function SetCookieConfiguration(AnalyticsProvider: angular.google.analytics.AnalyticsProvider) { + AnalyticsProvider.setCookieConfig({ + cookieDomain: "foo.example.com", + cookieName: "myNewName", + cookieExpires: 20000 + }); +} + +function SetRouteTrackingBehaviors(AnalyticsProvider: angular.google.analytics.AnalyticsProvider) { + AnalyticsProvider.trackPages(true); + AnalyticsProvider.trackUrlParams(true); + AnalyticsProvider.ignoreFirstPageLoad(true); + AnalyticsProvider.trackPrefix("my-application"); + AnalyticsProvider.setPageEvent("$stateChangeSuccess"); + AnalyticsProvider.setRemoveRegExp(/\/\d+?$/); +} diff --git a/angular-google-analytics/angular-google-analytics.d.ts b/angular-google-analytics/angular-google-analytics.d.ts new file mode 100644 index 0000000000..e3aa5551eb --- /dev/null +++ b/angular-google-analytics/angular-google-analytics.d.ts @@ -0,0 +1,173 @@ +// Type definitions for angular-google-analytics v1.1.0 +// Project: https://github.com/revolunet/angular-google-analytics +// Definitions by: Cyril Schumacher +// Definitions: https://github.com/borisyankov/DefinitelyTyped + +/// + +declare module angular.google.analytics { + /** + * @summary Interface for {@link AnalysticsProvider}. + * @interface + */ + interface AnalyticsProvider { + /** + * @summary Use Delay Script Tag Insertion. + * @param {boolean} val If true, the delay script tag is inserted. + * @return {angular.google.analytics.IAnalyticsProvider} The object instance. + */ + delayScriptTag(val: boolean): AnalyticsProvider; + + /** + * @summary Activates the test mode. + */ + enterTestMode(): void; + + /** + * @summary Gets the global cookie configuration. + * @return {Object} The global cookie configuration. + */ + getCookieConfig(): Object; + + /** + * @summary Ignore first page view. + * @param {boolean} val If true, the first page view is ignored. + * @return {angular.google.analytics.IAnalyticsProvider} The object instance. + */ + ignoreFirstPageLoad(val: boolean): AnalyticsProvider; + + /** + * @summary Enable Service Logging. + * @param {boolean} val If true, log all outbound calls to an in-memory array accessible. + * @return {angular.google.analytics.IAnalyticsProvider} The object instance. + */ + logAllCalls(val: boolean): AnalyticsProvider; + + /** + * @summary Set Google Analytics Accounts. + * @param {Object} tracker The account identifier(s). + * @return {angular.google.analytics.IAnalyticsProvider} The object instance. + */ + setAccount(tracker: string|Object|Array): AnalyticsProvider; + + /** + * @summary Set Cookie Configuration. + * @param {Object} config The custom cookie parameters. + * @return {angular.google.analytics.IAnalyticsProvider} The object instance. + * @deprecated + */ + setCookieConfig(config: Object): AnalyticsProvider; + + /** + * @summary Set cross-linked domains. + * @param {Array} domains The domains. + * @return {angular.google.analytics.IAnalyticsProvider} The object instance. + */ + setCrossLinkDomains(domains: Array): AnalyticsProvider; + + /** + * @summary Set currency. + * @param {string} currencyCode The currency code. + * @return {angular.google.analytics.IAnalyticsProvider} The object instance. + */ + setCurrency(currencyCode: string): AnalyticsProvider; + + /** + * @summary Set Domain Name. + * @param {string} domain The domain name. + * @return {angular.google.analytics.IAnalyticsProvider} The object instance. + */ + setDomainName(domain: string): AnalyticsProvider; + + /** + * @summary Enable Experiment (universal analytics only). + * @param {string} id The experiment identifier. + * @return {angular.google.analytics.IAnalyticsProvider} The object instance. + */ + setExperimentId(id: string): AnalyticsProvider; + + /** + * @summary Support Hybrid Mobile Applications. + * @param {boolean} val If true, each account object will disable protocol checking and all injected scripts will use the HTTPS protocol. + */ + setHybridMobileSupport(val: boolean): AnalyticsProvider; + + /** + * @summary Set the default page event name. + * @param {string} name The default page event name. + * @return {angular.google.analytics.IAnalyticsProvider} The object instance. + */ + setPageEvent(name: string): AnalyticsProvider; + + /** + * @summary Sets the regex to scrub location before sending to analytics. + * @return {angular.google.analytics.IAnalyticsProvider} The object instance. + * @param {RegExp} regex The regex. + */ + setRemoveRegExp(regex: RegExp): AnalyticsProvider; + + /** + * @summary Starts the offline mode. + * @param {boolean} val If true, the offline mode is started. + * @return {angular.google.analytics.IAnalyticsProvider} The object instance. + */ + startOffline(val: boolean): AnalyticsProvider; + + /** + * @summary Track all routes. + * @param {boolean} val If true, all routes are tracked. + * @return {angular.google.analytics.IAnalyticsProvider} The object instance. + */ + trackPages(doTrack: boolean): AnalyticsProvider; + + /** + * @summary Sets the URL prefix. + * @param {string} prefix The URL prefix. + * @return {angular.google.analytics.IAnalyticsProvider} The object instance. + */ + trackPrefix(prefix: string): AnalyticsProvider; + + /** + * @summary Track all URL query parameters. + * @param {boolean} val If true, all URL query parameters are tracked. + * @return {angular.google.analytics.IAnalyticsProvider} The object instance. + */ + trackUrlParams(val: boolean): AnalyticsProvider; + + /** + * @summary Use Classic Analytics. + * @param {boolean} val If true, use classic analytics. + * @return {angular.google.analytics.IAnalyticsProvider} The object instance. + */ + useAnalytics(val: boolean): AnalyticsProvider; + + /** + * @summary Use Cross Domain Linking. + * @param {boolean} val If true, the cross-linked domains are registered with Google Analytics. + * @return {angular.google.analytics.IAnalyticsProvider} The object instance. + */ + useCrossDomainLinker(val: boolean): AnalyticsProvider; + + /** + * @summary Use Display Features. + * @param {boolean} val If true, the display features module is loaded with Google Analytics. + * @return {angular.google.analytics.IAnalyticsProvider} The object instance. + */ + useDisplayFeatures(val: boolean): AnalyticsProvider; + + /** + * @summary Enable enhanced e-commerce module. + * @param {boolean} val If true, the enhanced e-commerce module is enabled. + * @param {boolean} enhanced If true, the "ec.js" file is used, otherwises, the "ecommerce.js" is used. + * @return {angular.google.analytics.IAnalyticsProvider} The object instance. + */ + useECommerce(val: boolean, enhanced: boolean): AnalyticsProvider; + + /** + * @summary Use Enhanced Link Attribution. + * @param {boolean} val If true, the enhanced link attribution module is loaded with Google Analytics. + * @return {angular.google.analytics.IAnalyticsProvider} The object instance. + */ + useEnhancedLinkAttribution(val: boolean): AnalyticsProvider; + } +} diff --git a/angular-growl-v2/angular-growl-v2-tests.ts b/angular-growl-v2/angular-growl-v2-tests.ts index c9297932e5..fdb661161e 100644 --- a/angular-growl-v2/angular-growl-v2-tests.ts +++ b/angular-growl-v2/angular-growl-v2-tests.ts @@ -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]); }); diff --git a/angular-growl-v2/angular-growl-v2.d.ts b/angular-growl-v2/angular-growl-v2.d.ts index 039490e3d0..a8e2620713 100644 --- a/angular-growl-v2/angular-growl-v2.d.ts +++ b/angular-growl-v2/angular-growl-v2.d.ts @@ -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 // 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; + + } } diff --git a/angular-material/angular-material-tests.ts b/angular-material/angular-material-tests.ts index 238d906db6..a9cd52437a 100644 --- a/angular-material/angular-material-tests.ts +++ b/angular-material/angular-material-tests.ts @@ -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('Alert!')); }; $scope['confirmDialog'] = () => { - $mdDialog.show($mdDialog.confirm().content('Confirm!')); + $mdDialog.show($mdDialog.confirm().textContent('Confirm!')); + }; + $scope['confirmDialog'] = () => { + $mdDialog.show($mdDialog.confirm().htmlContent('Confirm!')); }; $scope['hideDialog'] = $mdDialog.hide.bind($mdDialog, 'hide'); $scope['cancelDialog'] = $mdDialog.cancel.bind($mdDialog, 'cancel'); diff --git a/angular-material/angular-material.d.ts b/angular-material/angular-material.d.ts index 3b9a896c90..54ef2507b3 100644 --- a/angular-material/angular-material.d.ts +++ b/angular-material/angular-material.d.ts @@ -28,7 +28,8 @@ declare module angular.material { interface IPresetDialog { 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; diff --git a/angular-modal/angular-modal-tests.ts b/angular-modal/angular-modal-tests.ts new file mode 100644 index 0000000000..cbb090cee9 --- /dev/null +++ b/angular-modal/angular-modal-tests.ts @@ -0,0 +1,104 @@ +/// +/// +/// + +var btfModal: angularModal.AngularModalFactory; + +// Using template URL +function withTemplateUrl() { + btfModal({ + controller: 'SomeController', + controllerAs: 'vm', + templateUrl: 'some-template.html' + }); +} + +// Using template +function withTemplate() { + btfModal({ + controller: 'SomeController', + controllerAs: 'vm', + template: '
' + }); +} + +// Using controller function +function withControllerAsFunction() { + btfModal({ + controller: function () {}, + template: '
' + }) +} + +// Using constructor function +function withControllerClass() { + class TestController { + constructor(dependency1:any, dependency2:any) {} + } + btfModal({ + controller: TestController, + template: '
' + }); +} + +// With container as selector +function withContainerAsString() { + btfModal({ + template: '
', + container: '.container' + }); +} + +// With container as jQuery element +function withContainerAsJquery() { + var container: JQuery = $('body'); + btfModal({ + template: '
', + container: container + }); +} + +// With container as DOM Element +function withContainerAsDom() { + var container: Element = document.getElementById('container'); + btfModal({ + template: '
', + container: container + }); +} + +// With container as DOM Element Array +function withContainerAsDomArray() { + var container: Element[] = [document.getElementById('container'), document.getElementById('container2')]; + btfModal({ + template: '
', + container: container + }); +} + +// With container as function +function withContainerAsFunction() { + btfModal({ + template: '
', + container: function() {} + }); +} + +// With container as array +function withContainerAsArray() { + btfModal({ + template: '
', + container: ['1', 2] + }); +} + +// Calling return values +function callingValues() { + var modal: angularModal.AngularModal = btfModal({ + template: '
' + }); + modal.activate().then(() => {}, () => {}); + modal.deactivate().then(() => {}, () => {}); + var isActive: boolean = modal.active(); +} + diff --git a/angular-modal/angular-modal.d.ts b/angular-modal/angular-modal.d.ts new file mode 100644 index 0000000000..0effea95cc --- /dev/null +++ b/angular-modal/angular-modal.d.ts @@ -0,0 +1,38 @@ +// Type definitions for angular-modal 0.5.0 +// Project: https://github.com/btford/angular-modal +// Definitions by: Paul Lessing +// Definitions: https://github.com/DefinitelyTyped/DefinitelyTyped + +/// +/// + +declare module angularModal { + + type AngularModalControllerDefinition = (new (...args: any[]) => any) | Function | string; // Possible arguments to IControllerService + + type AngularModalJQuerySelector = string | Element | Element[] | JQuery | Function | any[] | {}; // Possible arguments to IAugmentedJQueryStatic + + interface AngularModalSettings { + controller?: AngularModalControllerDefinition; + controllerAs?: string; + container?: AngularModalJQuerySelector; + } + + export interface AngularModalSettingsWithTemplate extends AngularModalSettings { + template: any; + } + + export interface AngularModalSettingsWithTemplateUrl extends AngularModalSettings { + templateUrl: string; + } + + export interface AngularModal { + activate(): angular.IPromise; + deactivate(): angular.IPromise; + active(): boolean; + } + + export interface AngularModalFactory { + (settings: AngularModalSettingsWithTemplate | AngularModalSettingsWithTemplateUrl): AngularModal; + } +} diff --git a/angularjs/angular.d.ts b/angularjs/angular.d.ts index 040622b51d..1b54bac2a6 100644 --- a/angularjs/angular.d.ts +++ b/angularjs/angular.d.ts @@ -774,7 +774,7 @@ declare module angular { * @param reverse Reverse the order of the array. * @return Reverse the order of the array. */ - (array: T[], expression: string|string[]|((value: T) => any)|((value: T) => any)[], reverse?: boolean): 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; diff --git a/archiver/archiver.d.ts b/archiver/archiver.d.ts index 570e1424a6..e595083d65 100644 --- a/archiver/archiver.d.ts +++ b/archiver/archiver.d.ts @@ -16,12 +16,13 @@ /// 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; -} \ No newline at end of file +} diff --git a/argparse/argparse-tests.ts b/argparse/argparse-tests.ts new file mode 100644 index 0000000000..bf565c5f54 --- /dev/null +++ b/argparse/argparse-tests.ts @@ -0,0 +1,306 @@ +/// +// 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(); diff --git a/argparse/argparse.d.ts b/argparse/argparse.d.ts new file mode 100644 index 0000000000..7585015a23 --- /dev/null +++ b/argparse/argparse.d.ts @@ -0,0 +1,90 @@ +// Type definitions for argparse v1.0.3 +// Project: https://github.com/nodeca/argparse +// Definitions by: Andrew Schurman +// 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; + } +} diff --git a/bignum/bignum-tests.ts b/bignum/bignum-tests.ts new file mode 100644 index 0000000000..363fad886b --- /dev/null +++ b/bignum/bignum-tests.ts @@ -0,0 +1,248 @@ +/// + +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); diff --git a/bignum/bignum.d.ts b/bignum/bignum.d.ts new file mode 100644 index 0000000000..b9e653e189 --- /dev/null +++ b/bignum/bignum.d.ts @@ -0,0 +1,269 @@ +// Type definitions for BigNum +// Project: https://github.com/justmoon/node-BigNum +// Definitions by: Pat Smuk +// Definitions: https://github.com/DefinitelyTyped/DefinitelyTyped + +/// + +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; +} diff --git a/bluebird/bluebird-tests.ts b/bluebird/bluebird-tests.ts index ade4610743..bd4f46fc45 100644 --- a/bluebird/bluebird-tests.ts +++ b/bluebird/bluebird-tests.ts @@ -80,6 +80,7 @@ var voidProm: Promise; var fooProm: Promise; var barProm: Promise; +var fooOrBarProm: Promise; var bazProm: Promise; // - - - - - - - - - - - - - - - - - @@ -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)); // - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - diff --git a/bluebird/bluebird.d.ts b/bluebird/bluebird.d.ts index 878e1051e8..9f36cf5bcf 100644 --- a/bluebird/bluebird.d.ts +++ b/bluebird/bluebird.d.ts @@ -25,19 +25,19 @@ declare class Promise implements Promise.Thenable, Promise.Inspection { /** * 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(onFulfill: (value: R) => U|Promise.Thenable, onReject: (error: any) => Promise.Thenable, onProgress?: (note: any) => any): Promise; - then(onFulfill: (value: R) => U|Promise.Thenable, onReject?: (error: any) => U, onProgress?: (note: any) => any): Promise; - + then(onFulfill: (value: R) => U|Promise.Thenable, onReject?: (error: any) => U|Promise.Thenable, onProgress?: (note: any) => any): Promise; + then(onFulfill: (value: R) => U|Promise.Thenable, onReject?: (error: any) => void|Promise.Thenable, onProgress?: (note: any) => any): Promise; + /** * 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(onReject?: (error: any) => Promise.Thenable): Promise; - caught(onReject?: (error: any) => Promise.Thenable): Promise; + catch(onReject?: (error: any) => R|Promise.Thenable|void|Promise.Thenable): Promise; + caught(onReject?: (error: any) => R|Promise.Thenable|void|Promise.Thenable): Promise; - catch(onReject?: (error: any) => U): Promise; - caught(onReject?: (error: any) => U): Promise; + catch(onReject?: (error: any) => U|Promise.Thenable): Promise; + caught(onReject?: (error: any) => U|Promise.Thenable): Promise; /** * 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 implements Promise.Thenable, Promise.Inspection { * * Alias `.caught();` for compatibility with earlier ECMAScript version. */ - catch(predicate: (error: any) => boolean, onReject: (error: any) => Promise.Thenable): Promise; - caught(predicate: (error: any) => boolean, onReject: (error: any) => Promise.Thenable): Promise; + catch(predicate: (error: any) => boolean, onReject: (error: any) => R|Promise.Thenable|void|Promise.Thenable): Promise; + caught(predicate: (error: any) => boolean, onReject: (error: any) => R|Promise.Thenable|void|Promise.Thenable): Promise; - catch(predicate: (error: any) => boolean, onReject: (error: any) => U): Promise; - caught(predicate: (error: any) => boolean, onReject: (error: any) => U): Promise; + catch(predicate: (error: any) => boolean, onReject: (error: any) => U|Promise.Thenable): Promise; + caught(predicate: (error: any) => boolean, onReject: (error: any) => U|Promise.Thenable): Promise; - catch(ErrorClass: Function, onReject: (error: any) => Promise.Thenable): Promise; - caught(ErrorClass: Function, onReject: (error: any) => Promise.Thenable): Promise; + catch(ErrorClass: Function, onReject: (error: any) => R|Promise.Thenable|void|Promise.Thenable): Promise; + caught(ErrorClass: Function, onReject: (error: any) => R|Promise.Thenable|void|Promise.Thenable): Promise; + + catch(ErrorClass: Function, onReject: (error: any) => U|Promise.Thenable): Promise; + caught(ErrorClass: Function, onReject: (error: any) => U|Promise.Thenable): Promise; - catch(ErrorClass: Function, onReject: (error: any) => U): Promise; - caught(ErrorClass: Function, onReject: (error: any) => U): Promise; /** * 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 implements Promise.Thenable, Promise.Inspection { /** * Returns a promise that is resolved by a node style callback function. */ - static fromNode(resolver: (callback: (err: any, result: any) => void) => void): Promise; + static fromNode(resolver: (callback: (err: any, result?: any) => void) => void): Promise; /** * 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 { - then(onFulfilled: (value: R) => U|Thenable, onRejected: (error: any) => Thenable): Thenable; - then(onFulfilled: (value: R) => U|Thenable, onRejected?: (error: any) => U): Thenable; + then(onFulfilled: (value: R) => U|Thenable, onRejected?: (error: any) => U|Thenable): Thenable; + then(onFulfilled: (value: R) => U|Thenable, onRejected?: (error: any) => void|Thenable): Thenable; } export interface Resolver { diff --git a/bookshelf/bookshelf-tests.ts b/bookshelf/bookshelf-tests.ts new file mode 100644 index 0000000000..67580dae5f --- /dev/null +++ b/bookshelf/bookshelf-tests.ts @@ -0,0 +1,100 @@ +/// +/// + +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 { + get tableName() { return 'users'; } + messages() : Bookshelf.Collection { + return this.hasMany(Posts); + } +} + +class Posts extends bookshelf.Model { + get tableName() { return 'messages'; } + tags() : Bookshelf.Collection { + return this.belongsToMany(Tag); + } +} + +class Tag extends bookshelf.Model { + 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 { + get tableName() { return 'books'; } + summary() { + return this.hasOne(Summary); + } + pages() { + return this.hasMany(Pages); + } + authors() { + return this.belongsToMany(Author); + } +} + +class Summary extends bookshelf.Model { + get tableName() { return 'summaries'; } + book() : Book { + return this.belongsTo(Book); + } +} + +class Pages extends bookshelf.Model { + get tableName() { return 'pages'; } + book() { + return this.belongsTo(Book); + } +} + +class Author extends bookshelf.Model { + get tableName() { return 'author'; } + books() { + return this.belongsToMany(Book); + } +} + +class Site extends bookshelf.Model { + get tableName() { return 'sites'; } + photo() { + return this.morphOne(Photo, 'imageable'); + } +} + +class Post extends bookshelf.Model { + get tableName() { return 'posts'; } + photos() { + return this.morphMany(Photo, 'imageable'); + } +} + +class Photo extends bookshelf.Model { + get tableName() { return 'photos'; } + imageable() { + return this.morphTo('imageable', Site, Post); + } +} + diff --git a/bookshelf/bookshelf-tests.ts.tscparams b/bookshelf/bookshelf-tests.ts.tscparams new file mode 100644 index 0000000000..5f84b97777 --- /dev/null +++ b/bookshelf/bookshelf-tests.ts.tscparams @@ -0,0 +1 @@ +--noImplicitAny --module commonjs --target es5 diff --git a/bookshelf/bookshelf.d.ts b/bookshelf/bookshelf.d.ts new file mode 100644 index 0000000000..0da1ce2d68 --- /dev/null +++ b/bookshelf/bookshelf.d.ts @@ -0,0 +1,313 @@ +// Type definitions for bookshelfjs v0.8.2 +// Project: http://bookshelfjs.org/ +// Definitions by: Andrew Schurman +// Definitions: https://github.com/borisyankov/DefinitelyTyped + +/// +/// +/// + +declare module 'bookshelf' { + import knex = require('knex'); + import Promise = require('bluebird'); + import Lodash = require('lodash'); + + interface Bookshelf extends Bookshelf.Events { + VERSION : string; + knex : knex; + Model : typeof Bookshelf.Model; + Collection : typeof Bookshelf.Collection; + + transaction(callback : (transaction : knex.Transaction) => T) : Promise; + } + + function Bookshelf(knex : knex) : Bookshelf; + + namespace Bookshelf { + abstract class Events { + on(event? : string, callback? : EventFunction, context? : any) : void; + off(event? : string) : void; + trigger(event? : string, ...args : any[]) : void; + triggerThen(name : string, ...args : any[]) : Promise; + once(event : string, callback : EventFunction, 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> extends Events> 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>(relation : string) : R | Collection; + 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; + keys() : string[]; + omit(predicate? : Lodash.ObjectIterator, thisArg? : any) : R; + omit(...attributes : string[]) : R; + pairs() : any[][]; + pick(predicate? : Lodash.ObjectIterator, thisArg? : any) : R; + pick(...attributes : string[]) : R; + values() : any[]; + } + + class Model> extends ModelBase { + static collection>(models? : T[], options? : CollectionOptions) : Collection; + static count(column? : string, options? : SyncOptions) : Promise; + /** @deprecated use Typescript classes */ + static extend>(prototypeProperties? : any, classProperties? : any) : Function; // should return a type + static fetchAll>() : Promise>; + /** @deprecated should use `new` objects instead. */ + static forge(attributes? : any, options? : ModelOptions) : T; + + belongsTo>(target : {new(...args : any[]) : R}, foreignKey? : string) : R; + belongsToMany>(target : {new(...args : any[]) : R}, table? : string, foreignKey? : string, otherKey? : string) : Collection; + count(column? : string, options? : SyncOptions) : Promise; + destroy(options : SyncOptions) : void; + fetch(options? : FetchOptions) : Promise; + fetchAll(options? : FetchAllOptions) : Promise>; + hasMany>(target : {new(...args : any[]) : R}, foreignKey? : string) : Collection; + hasOne>(target : {new(...args : any[]) : R}, foreignKey? : string) : R; + load(relations : string|string[], options? : LoadOptions) : Promise; + morphMany>(target : {new(...args : any[]) : R}, name? : string, columnNames? : string[], morphValue? : string) : Collection; + morphOne>(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; + resetQuery() : T; + save(key? : string, val? : string, options? : SaveOptions) : Promise; + save(attrs? : {[key : string] : any}, options? : SaveOptions) : Promise; + through>(interim : typeof Model, throughForeignKey? : string, otherKey? : string) : R | Collection; + where(properties : {[key : string] : any}) : T; + where(key : string, operatorOrValue : string|number|boolean, valueIfOperator? : string|number|boolean) : T; + } + + abstract class CollectionBase> extends Events { + add(models : T[]|{[key : string] : any}[], options? : CollectionAddOptions) : Collection; + at(index : number) : T; + clone() : Collection; + fetch(options? : CollectionFetchOptions) : Promise>; + findWhere(match : {[key : string] : any}) : T; + get(id : any) : T; + invokeThen(name : string, ...args : any[]) : Promise; + parse(response : any) : any; + pluck(attribute : string) : any[]; + pop() : void; + push(model : any) : Collection; + reduceThen(iterator : (prev : R, cur : T, idx : number, array : T[]) => R, initialValue : R, context : any) : Promise; + 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; + 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; + + // lodash methods + all(predicate? : Lodash.ListIterator|Lodash.DictionaryIterator|string, thisArg? : any) : boolean; + all(predicate? : R) : boolean; + any(predicate? : Lodash.ListIterator|Lodash.DictionaryIterator|string, thisArg? : any) : boolean; + any(predicate? : R) : boolean; + chain() : Lodash.LoDashExplicitObjectWrapper; + collect(predicate? : Lodash.ListIterator|Lodash.DictionaryIterator|string, thisArg? : any) : T[]; + collect(predicate? : R) : T[]; + contains(value : any, fromIndex? : number) : boolean; + countBy(predicate? : Lodash.ListIterator|Lodash.DictionaryIterator|string, thisArg? : any) : Lodash.Dictionary; + countBy(predicate? : R) : Lodash.Dictionary; + detect(predicate? : Lodash.ListIterator|Lodash.DictionaryIterator|string, thisArg? : any) : T; + detect(predicate? : R) : T; + difference(...values : T[]) : T[]; + drop(n? : number) : T[]; + each(callback? : Lodash.ListIterator, thisArg? : any) : Lodash.List; + each(callback? : Lodash.DictionaryIterator, thisArg? : any) : Lodash.Dictionary; + each(callback? : Lodash.ObjectIterator, thisArg? : any) : T; + every(predicate? : Lodash.ListIterator|Lodash.DictionaryIterator|string, thisArg? : any) : boolean; + every(predicate? : R) : boolean; + filter(predicate? : Lodash.ListIterator|Lodash.DictionaryIterator|string, thisArg? : any) : T[]; + filter(predicate? : R) : T[]; + find(predicate? : Lodash.ListIterator|Lodash.DictionaryIterator|string, thisArg? : any) : T; + find(predicate? : R) : T; + first() : T; + foldl(callback? : Lodash.MemoIterator, accumulator? : R, thisArg? : any) : R; + foldr(callback? : Lodash.MemoIterator, accumulator? : R, thisArg? : any) : R; + forEach(callback? : Lodash.ListIterator, thisArg? : any) : Lodash.List; + forEach(callback? : Lodash.DictionaryIterator, thisArg? : any) : Lodash.Dictionary; + forEach(callback? : Lodash.ObjectIterator, thisArg? : any) : T; + groupBy(predicate? : Lodash.ListIterator|Lodash.DictionaryIterator|string, thisArg? : any) : Lodash.Dictionary; + groupBy(predicate? : R) : Lodash.Dictionary; + head() : T; + include(value : any, fromIndex? : number) : boolean; + indexOf(value : any, fromIndex? : number) : number; + initial() : T[]; + inject(callback? : Lodash.MemoIterator, 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|Lodash.DictionaryIterator|string, thisArg? : any) : T[]; + map(predicate? : R) : T[]; + max(predicate? : Lodash.ListIterator|string, thisArg? : any) : T; + max(predicate? : R) : T; + min(predicate? : Lodash.ListIterator|string, thisArg? : any) : T; + min(predicate? : R) : T; + reduce(callback? : Lodash.MemoIterator, accumulator? : R, thisArg? : any) : R; + reduceRight(callback? : Lodash.MemoIterator, accumulator? : R, thisArg? : any) : R; + reject(predicate? : Lodash.ListIterator|Lodash.DictionaryIterator|string, thisArg? : any) : T[]; + reject(predicate? : R) : T[]; + rest() : T[]; + select(predicate? : Lodash.ListIterator|Lodash.DictionaryIterator|string, thisArg? : any) : T[]; + select(predicate? : R) : T[]; + shuffle() : T[]; + size() : number; + some(predicate? : Lodash.ListIterator|Lodash.DictionaryIterator|string, thisArg? : any) : boolean; + some(predicate? : R) : boolean; + sortBy(predicate? : Lodash.ListIterator|Lodash.DictionaryIterator|string, thisArg? : any) : T[]; + sortBy(predicate? : R) : T[]; + tail() : T[]; + take(n? : number) : T[]; + toArray() : T[]; + without(...values : any[]) : T[]; + } + + class Collection> extends CollectionBase { + /** @deprecated use Typescript classes */ + static extend(prototypeProperties? : any, classProperties? : any) : Function; + /** @deprecated should use `new` objects instead. */ + static forge(attributes? : any, options? : ModelOptions) : T; + + attach(ids : any[], options? : SyncOptions) : Promise>; + count(column? : string, options? : SyncOptions) : Promise; + create(model : {[key : string] : any}, options? : CollectionCreateOptions) : Promise; + detach(ids : any[], options? : SyncOptions) : Promise; + fetchOne(options? : CollectionFetchOneOptions) : Promise; + load(relations : string|string[], options? : SyncOptions) : Promise>; + query(...query : string[]) : Collection; + query(query : {[key : string] : any}) : Collection; + query(callback : (qb : knex.QueryBuilder) => void) : Collection; + query() : knex.QueryBuilder; + resetQuery() : Collection; + through>(interim : typeof Model, throughForeignKey? : string, otherKey? : string) : R | Collection; + updatePivot(attributes : any, options? : PivotOptions) : Promise; + withPivot(columns : string[]) : Collection; + } + + 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 { + 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 { + (model: T, attrs: any, options: any) : Promise|void; + } + + interface CollectionCreateOptions extends ModelOptions, SyncOptions, CollectionAddOptions, SaveOptions {} + } + + export = Bookshelf; +} diff --git a/boolify-string/boolify-string-tests.ts b/boolify-string/boolify-string-tests.ts new file mode 100644 index 0000000000..1436a1aeae --- /dev/null +++ b/boolify-string/boolify-string-tests.ts @@ -0,0 +1,61 @@ +/// + +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 diff --git a/boolify-string/boolify-string.d.ts b/boolify-string/boolify-string.d.ts new file mode 100644 index 0000000000..d4ab286a5e --- /dev/null +++ b/boolify-string/boolify-string.d.ts @@ -0,0 +1,8 @@ +// Type definitions for boolify-string +// Project: https://github.com/sanemat/node-boolify-string +// Definitions by: Tobias Henöckl +// Definitions: https://github.com/DefinitelyTyped/DefinitelyTyped +declare module "boolify-string" { + function boolifyString(obj: any): boolean; + export = boolifyString; +} diff --git a/c3/c3.d.ts b/c3/c3.d.ts index 160e0b1696..7ff889073f 100644 --- a/c3/c3.d.ts +++ b/c3/c3.d.ts @@ -1067,3 +1067,7 @@ declare module c3 { export function generate(config: ChartConfiguration): ChartAPI; } + +declare module "c3" { + export = c3; +} diff --git a/change-case/change-case-tests.ts b/change-case/change-case-tests.ts index 24276654c6..2e80c8a0d9 100644 --- a/change-case/change-case-tests.ts +++ b/change-case/change-case-tests.ts @@ -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); diff --git a/change-case/change-case.d.ts b/change-case/change-case.d.ts index e61d70de64..5551b4d3d2 100644 --- a/change-case/change-case.d.ts +++ b/change-case/change-case.d.ts @@ -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; } diff --git a/ckeditor/ckeditor.d.ts b/ckeditor/ckeditor.d.ts index cab51f72c0..0164bb09b9 100644 --- a/ckeditor/ckeditor.d.ts +++ b/ckeditor/ckeditor.d.ts @@ -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; } diff --git a/cordova-plugin-app-version/cordova-plugin-app-version.d.ts b/cordova-plugin-app-version/cordova-plugin-app-version.d.ts index a754368e38..8f4210eb81 100644 --- a/cordova-plugin-app-version/cordova-plugin-app-version.d.ts +++ b/cordova-plugin-app-version/cordova-plugin-app-version.d.ts @@ -3,13 +3,14 @@ // Definitions by: Markus Wagner // Definitions: https://github.com/borisyankov/DefinitelyTyped +/// /// interface Cordova { - getAppVersion: { - getAppName: () => Q.IPromise; - getPackageName: () => Q.IPromise; - getVersionCode: () => Q.IPromise; - getVersionNumber: () => Q.IPromise; + getAppVersion: { + getAppName: () => Q.IPromise | JQueryPromise; + getPackageName: () => Q.IPromise | JQueryPromise; + getVersionCode: () => Q.IPromise | JQueryPromise; + getVersionNumber: () => Q.IPromise | JQueryPromise; }; } \ No newline at end of file diff --git a/core-js/core-js.d.ts b/core-js/core-js.d.ts index 9c492e4338..e976c43612 100644 --- a/core-js/core-js.d.ts +++ b/core-js/core-js.d.ts @@ -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; } diff --git a/css/css-tests.ts b/css/css-tests.ts new file mode 100644 index 0000000000..d223679e26 --- /dev/null +++ b/css/css-tests.ts @@ -0,0 +1,62 @@ +/// + +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); \ No newline at end of file diff --git a/css/css.d.ts b/css/css.d.ts new file mode 100644 index 0000000000..acea1acf0e --- /dev/null +++ b/css/css.d.ts @@ -0,0 +1,258 @@ +// Type definitions for css +// Project: https://github.com/reworkcss/css +// Definitions by: Ilya Verbitskiy +// 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; + /** Array of nodes with the types declaration and comment. */ + declarations?: Array; + } + + 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; + } + + /** + * The @font-face at-rule. + */ + interface FontFace { + /** Array of nodes with the types declaration and comment. */ + declarations?: Array; + } + + /** + * The @host at-rule. + */ + interface Host { + /** Array of nodes with the types rule, comment and any of the at-rule types. */ + rules?: Array; + } + + /** + * 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; + } + + interface KeyFrame { + /** The list of "selectors" of the keyframe rule, split on commas. Each “selector” is trimmed from whitespace. */ + values?: Array; + /** Array of nodes with the types declaration and comment. */ + declarations?: Array; + } + + /** + * 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; + } + + /** + * 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; + /** Array of nodes with the types declaration and comment. */ + declarations?: Array; + } + + /** + * 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; + } + + /** 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; + /** Array of Errors. Errors collected during parsing when option silent is true. */ + parsingErrors?: Array + }; + } + + // --------------------------------------------------------------------------------- + + /** + * 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; + +} \ No newline at end of file diff --git a/d3/d3.d.ts b/d3/d3.d.ts index 87e6ef0e0f..396d0307e6 100644 --- a/d3/d3.d.ts +++ b/d3/d3.d.ts @@ -2697,24 +2697,24 @@ declare module d3 { response(): (request: XMLHttpRequest) => any; response(value: (request: XMLHttpRequest) => any): DsvXhr; - get(callback?: (err: any, data: T) => void): DsvXhr; - post(data?: any, callback?: (err: any, data: T) => void): DsvXhr; - post(callback: (err: any, data: T) => void): DsvXhr; + get(callback?: (err: XMLHttpRequest, data: T[]) => void): DsvXhr; + post(data?: any, callback?: (err: XMLHttpRequest, data: T[]) => void): DsvXhr; + post(callback: (err: XMLHttpRequest, data: T[]) => void): DsvXhr; - send(method: string, data?: any, callback?: (err: any, data: T) => void): DsvXhr; - send(method: string, callback: (err: any, data: T) => void): DsvXhr; + send(method: string, data?: any, callback?: (err: XMLHttpRequest, data: T[]) => void): DsvXhr; + send(method: string, callback: (err: XMLHttpRequest, data: T[]) => void): DsvXhr; abort(): DsvXhr; 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; on(type: "progress", listener: (request: XMLHttpRequest) => void): DsvXhr; - on(type: "load", listener: (response: T) => void): DsvXhr; + on(type: "load", listener: (response: T[]) => void): DsvXhr; on(type: "error", listener: (err: any) => void): DsvXhr; on(type: string, listener: (...args: any[]) => void): DsvXhr; } diff --git a/devextreme/devextreme-15.1.7.d.ts b/devextreme/devextreme-15.1.7.d.ts new file mode 100644 index 0000000000..fc593db200 --- /dev/null +++ b/devextreme/devextreme-15.1.7.d.ts @@ -0,0 +1,6572 @@ +// Type definitions for DevExtreme 15.1.7 +// Project: http://js.devexpress.com/ +// Definitions by: DevExpress Inc. +// Definitions: https://github.com/borisyankov/DefinitelyTyped + +/// + +declare module DevExpress { + /** A mixin that provides a capability to fire and subscribe to events. */ + export interface EventsMixin { + /** Subscribes to a specified event. */ + on(eventName: string, eventHandler: Function): T; + /** Subscribes to the specified events. */ + on(events: { [eventName: string]: Function; }): T; + /** Detaches all event handlers from the specified event. */ + off(eventName: string): Object; + /** Detaches a particular event handler from the specified event. */ + off(eventName: string, eventHandler: Function): T; + } + /** An object that serves as a namespace for the methods required to perform validation. */ + export module validationEngine { + export interface IValidator { + validate(): ValidatorValidationResult; + reset(): void; + } + export interface ValidatorValidationResult { + isValid: boolean; + name?: string; + value: any; + brokenRule: any; + validationRules: any[]; + } + export interface ValidationGroupValidationResult { + isValid: boolean; + brokenRules: any[]; + validators: IValidator[]; + } + export interface GroupConfig extends EventsMixin { + group: any; + validators: IValidator[]; + validate(): ValidationGroupValidationResult; + reset(): void; + } + /** Provides access to the object that represents the specified validation group. */ + export function getGroupConfig(group: any): GroupConfig + /** Provides access to the object that represents the default validation group. */ + export function getGroupConfig(): GroupConfig + /** Validates rules of the validators that belong to the specified validation group. */ + export function validateGroup(group: any): ValidationGroupValidationResult; + /** Validates rules of the validators that belong to the default validation group. */ + export function validateGroup(): ValidationGroupValidationResult; + /** Resets the values and validation result of the editors that belong to the specified validation group. */ + export function resetGroup(group: any): void; + /** Resets the values and validation result of the editors that belong to the default validation group. */ + export function resetGroup(): void; + /** 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 var hardwareBackButton: JQueryCallback; + /** Processes the hardware back button click. */ + export function processHardwareBackButton(): void; + /** Hides the last displayed overlay widget. */ + export function hideTopOverlay(): boolean; + /** Specifies whether or not the entire application/site supports right-to-left representation. */ + export var rtlEnabled: boolean; + /** Registers a new component in the DevExpress.ui namespace as a jQuery plugin, Angular directive and Knockout binding. */ + export function registerComponent(name: string, componentClass: Object): void; + /** Registers a new component in the specified namespace as a jQuery plugin, Angular directive and Knockout binding. */ + export function registerComponent(name: string, namespace: Object, componentClass: Object): void; + /** Requests that the browser call a specified function to update animation before the next repaint. */ + export function requestAnimationFrame(callback: Function): number; + /** Cancels an animation frame request scheduled with the requestAnimationFrame method. */ + export function cancelAnimationFrame(requestID: number): void; + /** Custom Knockout binding that links an HTML element with a specific action. */ + export class Action { } + /** Used to get URLs that vary in a locally running application and the application running on production. */ + export class EndpointSelector { + constructor(options: { + [key: string]: { + local?: string; + production?: string; + } + }); + /** Returns a local or a productional URL depending on how the application is currently running. */ + urlFor(key: string): string; + } + /** An object that serves as a namespace for the methods that are used to animate UI elements. */ + export module fx { + /** Defines animation options. */ + export interface AnimationOptions { + /** A function called after animation is completed. */ + complete?: (element: JQuery, config: AnimationOptions) => void; + /** A number specifying wait time before animation execution. */ + delay?: number; + /** A number specifying the time period to wait before the animation of the next stagger item starts. */ + staggerDelay?: number; + /** A number specifying the time in milliseconds spent on animation. */ + duration?: number; + /** A string specifying the type of an easing function used for animation. */ + easing?: string; + /** Specifies the initial animation state. */ + from?: any; + /** A function called before animation is started. */ + start?: (element: JQuery, config: AnimationOptions) => void; + /** Specifies a final animation state. */ + to?: any; + /** A string value specifying the animation type. */ + type?: string; + /** Specifies the animation direction for the "slideIn" and "slideOut" animation types. */ + direction?: string; + } + /** Animates the specified element. */ + export function animate(element: HTMLElement, config: AnimationOptions): Object; + /** Returns a value indicating whether the specified element is being animated. */ + export function isAnimating(element: HTMLElement): boolean; + /** Stops the animation. */ + export function stop(element: HTMLElement, jumpToEnd: boolean): void; + } + /** The manager that performs several specified animations at a time. */ + export class TransitionExecutor { + /** Deletes all the animations registered in the Transition Executor by using the enter(elements, animation) and leave(elements, animation) methods. */ + reset(): void; + /** Registers a set of elements that should be animated as "entering" using the specified animation configuration. */ + enter(elements: JQuery, animation: any): void; + /** Registers a set of elements that should be animated as "leaving" using the specified animation configuration. */ + leave(elements: JQuery, animation: any): void; + /** Starts all the animations registered using the enter(elements, animation) and leave(elements, animation) methods beforehand. */ + start(config: Object): JQueryPromise; + } + export class AnimationPresetCollection { + /** Resets all the changes made in the animation repository. */ + resetToDefaults(): void; + /** Deletes the specified animation or clears all the animation repository, if an animation name is not passed. */ + clear(name: string): void; + /** Adds the specified animation preset to the animation repository by the specified name. */ + registerPreset(name: string, config: any): void; + /** Applies the changes made in the animation repository. */ + applyChanges(): void; + /** Returns the configuration of the animation found in the animation repository by the specified name for the current device. */ + getPreset(name: string): void; + /** Registers predefined animations in the animation repository. */ + registerDefaultPresets(): void; + } + /** A repository of animations. */ + export var animationPresets: AnimationPresetCollection; + /** The device object defines the device on which the application is running. */ + export interface Device { + /** Indicates whether or not the device platform is Android. */ + android?: boolean; + /** Specifies the type of the device on which the application is running. */ + deviceType?: string; + /** Indicates whether or not the device platform is generic, which means that the application will look and behave according to a generic "light" or "dark" theme. */ + generic?: boolean; + /** Indicates whether or not the device platform is iOS. */ + ios?: boolean; + /** Indicates whether or not the device type is 'phone'. */ + phone?: boolean; + /** Specifies the platform of the device on which the application is running. */ + platform?: string; + /** Indicates whether or not the device type is 'tablet'. */ + tablet?: boolean; + /** Specifies an array with the major and minor versions of the device platform. */ + version?: Array; + /** Indicates whether or not the device platform is Windows8. */ + win8?: boolean; + /** Specifies a performance grade of the current device. */ + grade?: string; + } + export class Devices implements EventsMixin { + constructor(options: { window: Window }); + /** Overrides actual device information to force the application to operate as if it was running on the specified device. */ + current(deviceName: any): void; + /** Returns information about the current device. */ + current(): Device; + orientationChanged: JQueryCallback; + /** Returns the current device orientation. */ + orientation(): string; + /** Returns real information about the current device regardless of the value passed to the devices.current(deviceName) method. */ + real(): Device; + on(eventName: "orientationChanged", eventHandler: (e: { orientation: string }) => void): Devices; + on(eventName: string, eventHandler: Function): Devices; + on(events: { [eventName: string]: Function; }): Devices; + off(eventName: "orientationChanged"): Devices; + off(eventName: string): Devices; + off(eventName: "orientationChanged", eventHandler: (e: { orientation: string }) => void): Devices; + off(eventName: string, eventHandler: Function): Devices; + } + /** An object that serves as a namespace for the methods and events specifying information on the current device. */ + export var devices: Devices; + /** The position object specifies the widget positioning options. */ + export interface PositionOptions { + /** The target element position that the widget is positioned against. */ + at?: string; + /** The element within which the widget is positioned. */ + boundary?: Element; + /** A string value holding horizontal and vertical offset from the window's boundaries. */ + boundaryOffset?: string; + /** Specifies how to move the widget if it overflows the screen. */ + collision?: any; + /** The position of the widget to align against the target element. */ + my?: string; + /** The target element that the widget is positioned against. */ + of?: HTMLElement; + /** A string value holding horizontal and vertical offset in pixels, separated by a space (e.g., "5 -10"). */ + offset?: string; + } + export interface ComponentOptions { + /** A handler for the initialized event. */ + onInitialized?: Function; + /** A handler for the optionChanged event. */ + onOptionChanged?: Function; + /** A handler for the disposing event. */ + onDisposing?: Function; + } + /** A base class for all components and widgets. */ + export class Component { + constructor(options?: ComponentOptions) + /** Prevents the component from refreshing until the endUpdate method is called. */ + beginUpdate(): void; + /** Enables the component to refresh after the beginUpdate method call. */ + 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; + /** 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. */ + option(optionName: string, optionValue: any): void; + } + export interface DOMComponentOptions extends ComponentOptions { + /** Specifies whether or not the current component supports a right-to-left representation. */ + rtlEnabled?: boolean; + /** Specifies the height of the widget. */ + height?: any; + /** Specifies the width of the widget. */ + width?: any; + } + /** A base class for all components. */ + export class DOMComponent extends Component { + constructor(element: JQuery, options?: DOMComponentOptions); + constructor(element: HTMLElement, options?: DOMComponentOptions); + /** Returns the root HTML element of the widget. */ + element(): JQuery; + /** Specifies the device-dependent default configuration options for this component. */ + static defaultOptions(rule: { + device?: any; + options?: any; + }): void; + } + export module data { + export interface ODataError extends Error { + httpStatus?: number; + errorDetails?: any; + } + export interface StoreOptions { + inserted?: (values: Object, key: any) => void; + inserting?: (values: Object) => void; + loaded?: (result: Array) => void; + loading?: (loadOptions: LoadOptions) => void; + modified?: () => void; + modifying?: () => void; + removed?: (key: any) => void; + removing?: (key: any) => void; + updated?: (key: any, values: Object) => void; + updating?: (key: any, values: Object) => void; + /** A handler for the modified event. */ + onModified?: () => void; + /** A handler for the modifying event. */ + onModifying?: () => void; + /** A handler for the removed event. */ + onRemoved?: (key: any) => void; + /** A handler for the removing event. */ + onRemoving?: (key: any) => void; + /** A handler for the updated event. */ + onUpdated?: (key: any, values: Object) => void; + /** A handler for the updating event. */ + onUpdating?: (key: any, values: Object) => void; + /** A handler for the loaded event. */ + onLoaded?: (result: Array) => void; + /** A handler for the loading event. */ + onLoading?: (loadOptions: LoadOptions) => void; + /** A handler for the inserted event. */ + onInserted?: (values: Object, key: any) => void; + /** A handler for the inserting event. */ + onInserting?: (values: Object) => void; + /** Specifies the function called when the Store causes an error. */ + errorHandler?: (e: Error) => void; + /** Specifies the key properties within the data associated with the Store. */ + key?: any; + } + export interface LoadOptions { + filter?: Object; + sort?: Object; + select?: Object; + expand?: Object; + group?: Object; + skip?: number; + take?: number; + userData?: Object; + requireTotalCount?: boolean; + } + /** The base class for all Stores. */ + export class Store implements EventsMixin { + inserted: JQueryCallback; + inserting: JQueryCallback; + loaded: JQueryCallback; + loading: JQueryCallback; + modified: JQueryCallback; + modifying: JQueryCallback; + removed: JQueryCallback; + removing: JQueryCallback; + updated: JQueryCallback; + updating: JQueryCallback; + constructor(options?: StoreOptions); + /** Returns the data item specified by the key. */ + byKey(key: any): JQueryPromise; + /** Adds an item to the data associated with this Store. */ + insert(values: Object): JQueryPromise; + /** Returns the key expression specified via the key configuration option. */ + key(): any; + /** Returns the key of the Store item that matches the specified object. */ + keyOf(obj: Object): any; + /** Starts loading data. */ + load(obj?: LoadOptions): JQueryPromise; + /** Removes the data item specified by the key. */ + remove(key: any): JQueryPromise; + /** Obtains the total count of items that will be returned by the load() function. */ + totalCount(options?: { + filter?: Object; + group?: Object; + }): JQueryPromise; + /** Updates the data item specified by the key. */ + update(key: any, values: Object): JQueryPromise; + on(eventName: "removing", eventHandler: (key: any) => void): Store; + on(eventName: "removed", eventHandler: (key: any) => void): Store; + on(eventName: "updating", eventHandler: (key: any, values: Object) => void): Store; + on(eventName: "updated", eventHandler: (key: any, values: Object) => void): Store; + on(eventName: "inserting", eventHandler: (values: Object) => void): Store; + on(eventName: "inserted", eventHandler: (values: Object, key: any) => void): Store; + on(eventName: "modifying", eventHandler: () => void): Store; + on(eventName: "modified", eventHandler: () => void): Store; + on(eventName: "loading", eventHandler: (loadOptions: LoadOptions) => void): Store; + on(eventName: "loaded", eventHandler: (result: Array) => void): Store; + on(eventName: string, eventHandler: Function): Store; + on(events: { [eventName: string]: Function; }): Store; + off(eventName: "removing"): Store; + off(eventName: "removed"): Store; + off(eventName: "updating"): Store; + off(eventName: "updated"): Store; + off(eventName: "inserting"): Store; + off(eventName: "inserted"): Store; + off(eventName: "modifying"): Store; + off(eventName: "modified"): Store; + off(eventName: "loading"): Store; + off(eventName: "loaded"): Store; + off(eventName: string): Store; + off(eventName: "removing", eventHandler: (key: any) => void): Store; + off(eventName: "removed", eventHandler: (key: any) => void): Store; + off(eventName: "updating", eventHandler: (key: any, values: Object) => void): Store; + off(eventName: "updated", eventHandler: (key: any, values: Object) => void): Store; + off(eventName: "inserting", eventHandler: (values: Object) => void): Store; + off(eventName: "inserted", eventHandler: (values: Object, key: any) => void): Store; + off(eventName: "modifying", eventHandler: () => void): Store; + off(eventName: "modified", eventHandler: () => void): Store; + off(eventName: "loading", eventHandler: (loadOptions: LoadOptions) => void): Store; + off(eventName: "loaded", eventHandler: (result: Array) => void): Store; + off(eventName: string, eventHandler: Function): Store; + } + export interface ArrayStoreOptions extends StoreOptions { + /** Specifies the array associated with this Store. */ + data?: Array; + } + /** A Store accessing an in-memory array. */ + export class ArrayStore extends Store { + constructor(options?: ArrayStoreOptions); + /** Clears all data associated with the current ArrayStore. */ + clear(): void; + /** Creates the Query object for the underlying array. */ + createQuery(): Query; + } + interface Promise { + then(doneFn?: Function, failFn?: Function, progressFn?: Function): Promise; + } + export interface CustomStoreOptions extends StoreOptions { + /** The user implementation of the byKey(key, extraOptions) method. */ + byKey?: (key: any) => Promise; + /** The user implementation of the insert(values) method. */ + insert?: (values: Object) => Promise; + /** The user implementation of the load(options) method. */ + load?: (options?: LoadOptions) => Promise; + /** The user implementation of the remove(key) method. */ + remove?: (key: any) => Promise; + /** The user implementation of the totalCount(options) method. */ + totalCount?: (options?: { + filter?: Object; + group?: Object; + }) => Promise; + /** The user implementation of the update(key, values) method. */ + update?: (key: any, values: Object) => Promise; + } + /** A Store object that enables you to implement your own data access logic. */ + export class CustomStore extends Store { + constructor(options: CustomStoreOptions); + } + export interface DataSourceOptions { + /** Specifies data filtering conditions. */ + filter?: Object; + /** Specifies data grouping conditions. */ + group?: Object; + /** The item mapping function. */ + map?: (record: any) => any; + /** Specifies the maximum number of items the page can contain. */ + pageSize?: number; + /** Specifies whether a DataSource loads data by pages, or all items at once. */ + paginate?: boolean; + /** The data post processing function. */ + postProcess?: (data: any[]) => any[]; + /** Specifies a value by which the required items are searched. */ + searchExpr?: Object; + /** Specifies the comparison operation used to search for the required items. */ + searchOperation?: string; + /** Specifies the value to which the search expression is compared. */ + searchValue?: Object; + /** Specifies the initial select option value. */ + select?: Object; + /** An array of the strings that represent the names of the navigation properties to be loaded simultaneously with the OData store's entity. */ + expand?: Object; + /** Specifies whether or not the DataSource instance requests the total count of items available in the storage. */ + requireTotalCount?: boolean; + /** Specifies the initial sort option value. */ + sort?: Object; + /** Specifies the underlying Store instance used to access data. */ + store?: any; + /** A handler for the changed event. */ + onChanged?: () => void; + /** A handler for the loadingChanged event. */ + onLoadingChanged?: (isLoading: boolean) => void; + /** A handler for the loadError event. */ + onLoadError?: (e?: Error) => void; + } + /** An object that provides access to a data web service or local data storage for collection container widgets. */ + export class DataSource implements EventsMixin { + constructor(options?: DataSourceOptions); + changed: JQueryCallback; + loadError: JQueryCallback; + loadingChanged: JQueryCallback; + /** Disposes all resources associated with this DataSource. */ + dispose(): void; + /** Returns the current filter option value. */ + filter(): Object; + /** Sets the filter option value. */ + filter(filterExpr: Object): void; + /** Returns the current group option value. */ + group(): Object; + /** Sets the group option value. */ + group(groupExpr: Object): void; + /** Indicates whether or not the current page contains fewer items than the number of items specified by the pageSize configuration option. */ + isLastPage(): boolean; + /** Indicates whether or not at least one load() method execution has successfully finished. */ + isLoaded(): boolean; + /** Indicates whether or not the DataSource is currently being loaded. */ + isLoading(): boolean; + /** Returns the array of items currently operated by the DataSource. */ + items(): Array; + /** Returns the key expression. */ + key(): any; + /** Starts loading data. */ + load(): JQueryPromise>; + /** Returns an object that would be passed to the load() method of the underlying Store according to the current data shaping option values of the current DataSource instance. */ + loadOptions(): Object; + /** Returns the current pageSize option value. */ + pageSize(): number; + /** Sets the pageSize option value. */ + pageSize(value: number): void; + /** Specifies the index of the currently loaded page. */ + pageIndex(): number; + /** Specifies the index of the page to be loaded during the next load() method execution. */ + pageIndex(newIndex: number): void; + /** Returns the current paginate option value. */ + paginate(): boolean; + /** Sets the paginate option value. */ + paginate(value: boolean): void; + /** Returns the searchExpr option value. */ + searchExpr(): Object; + /** Sets the searchExpr option value. */ + searchExpr(expr: Object): void; + /** Returns the currently specified search operation. */ + searchOperation(): string; + /** Sets the current search operation. */ + searchOperation(op: string): void; + /** Returns the searchValue option value. */ + searchValue(): Object; + /** Sets the searchValue option value. */ + searchValue(value: Object): void; + /** Returns the current select option value. */ + select(): Object; + /** Sets the select option value. */ + select(expr: Object): void; + /** Returns the current requireTotalCount option value. */ + requireTotalCount(): boolean; + /** Sets the requireTotalCount option value. */ + requireTotalCount(value: boolean): void; + /** Returns the current sort option value. */ + sort(): Object; + /** Sets the sort option value. */ + sort(sortExpr: Object): void; + /** Returns the underlying Store instance. */ + store(): Store; + /** Returns the number of data items available in an underlying Store after the last load() operation without paging. */ + totalCount(): number; + on(eventName: "loadingChanged", eventHandler: (isLoading: boolean) => void): DataSource; + on(eventName: "loadError", eventHandler: (e?: Error) => void): DataSource; + on(eventName: "changed", eventHandler: () => void): DataSource; + on(eventName: string, eventHandler: Function): DataSource; + on(events: { [eventName: string]: Function; }): DataSource; + off(eventName: "loadingChanged"): DataSource; + off(eventName: "loadError"): DataSource; + off(eventName: "changed"): DataSource; + off(eventName: string): DataSource; + off(eventName: "loadingChanged", eventHandler: (isLoading: boolean) => void): DataSource; + off(eventName: "loadError", eventHandler: (e?: Error) => void): DataSource; + off(eventName: "changed", eventHandler: () => void): DataSource; + off(eventName: string, eventHandler: Function): DataSource; + } + /** An object used to work with primitive data types not supported by JavaScript when accessing an OData web service. */ + export class EdmLiteral { + /** Creates an EdmLiteral instance and assigns the specified value to it. */ + constructor(value: string); + /** Returns a string representation of the value associated with this EdmLiteral object. */ + valueOf(): string; + } + /** An object used to generate and hold the GUID. */ + export class Guid { + /** Creates a new Guid instance that holds the specified GUID. */ + constructor(value: string); + /** Creates a new Guid instance holding the generated GUID. */ + constructor(); + /** Returns a string representation of the Guid instance. */ + toString(): string; + /** Returns a string representation of the Guid instance. */ + valueOf(): string; + } + export interface LocalStoreOptions extends ArrayStoreOptions { + /** Specifies the time (in miliseconds) after the change operation, before the data is flushed. */ + flushInterval?: number; + /** Specifies whether the data is flushed immediatelly after each change operation, or after the delay specified via the flushInterval option. */ + immediate?: boolean; + /** The unique identifier used to distinguish the data within the HTML5 Web Storage. */ + name?: string; + } + /** A Store providing access to the HTML5 Web Storage. */ + export class LocalStore extends ArrayStore { + constructor(options?: LocalStoreOptions); + /** Removes all data associated with this Store. */ + clear(): void; + } + export interface ODataContextOptions extends ODataStoreOptions { + /** Specifies the list of entities to be accessed via the ODataContext. */ + entities?: Object; + /** Specifies the function called if the ODataContext causes an error. */ + errorHandler?: (e: Error) => void; + } + /** Provides access to the entire OData service. */ + export class ODataContext { + constructor(options?: ODataContextOptions); + /** Initiates the specified WebGet service operation that returns a value. For the information on service operations, refer to the OData documentation. */ + get(operationName: string, params: Object): JQueryPromise; + /** Initiates the specified WebGet service operation that returns nothing. For the information on service operations, refer to the OData documentation. */ + invoke(operationName: string, params: Object, httpMethod: Object): JQueryPromise; + /** Return a special proxy object to describe the entity link. */ + objectLink(entityAlias: string, key: any): Object; + } + export interface ODataStoreOptions extends StoreOptions { + /** A function used to customize a web request before it is sent. */ + beforeSend?: (request: { + url: string; + method: string; + timeout: number; + params: Object; + payload: Object; + headers: Object; + }) => void; + /** Specifies whether the ODataStore uses the JSONP approach to access non-CORS-compatible remote services. */ + jsonp?: boolean; + /** Specifies the type of the ODataStore key property. The following key types are supported out of the box: String, Int32, Int64, and Guid. */ + keyType?: any; + /** Specifies the URL of the data service being accessed via the current ODataContext. */ + url?: string; + /** Specifies the version of the OData protocol used to interact with the data service. */ + version?: number; + /** Specifies the value of the withCredentials field of the underlying jqXHR object. */ + withCredentials?: boolean; + } + /** A Store providing access to a separate OData web service entity. */ + export class ODataStore extends Store { + constructor(options?: ODataStoreOptions); + /** Creates the Query object for the OData endpoint. */ + createQuery(loadOptions: Object): Object; + /** Returns the data item specified by the key. */ + byKey(key: any, extraOptions?: { expand?: Object }): JQueryPromise; + } + /** An universal chainable data query interface object. */ + export interface Query { + /** Calculates a custom summary for the items in the current Query. */ + aggregate(step: (accumulator: any, value: any) => any): JQueryPromise; + /** Calculates a custom summary for the items in the current Query. */ + aggregate(seed: any, step: (accumulator: any, value: any) => any, finalize: (result: any) => any): JQueryPromise; + /** Calculates the average item value for the current Query. */ + avg(getter: Object): JQueryPromise; + /** Finds the item with the maximum getter value. */ + max(getter: Object): JQueryPromise; + /** Finds the item with the maximum value in the Query. */ + max(): JQueryPromise; + /** Finds the item with the minimum value in the Query. */ + min(): JQueryPromise; + /** Finds the item with the minimum getter value. */ + min(getter: Object): JQueryPromise; + /** Calculates the average item value for the current Query, if each Query item has a numeric type. */ + avg(): JQueryPromise; + /** Returns the total count of items in the current Query. */ + count(): JQueryPromise; + /** Executes the Query. */ + enumerate(): JQueryPromise; + /** Filters the current Query data. */ + filter(criteria: Array): Query; + /** Groups the current Query data. */ + groupBy(getter: Object): Query; + /** Applies the specified transformation to each item. */ + select(getter: Object): Query; + /** Limits the data item count. */ + slice(skip: number, take?: number): Query; + /** Sorts current Query data. */ + sortBy(getter: Object, desc: boolean): Query; + /** Sorts current Query data. */ + sortBy(getter: Object): Query; + /** Calculates the sum of item getter values in the current Query. */ + sum(getter: Object): JQueryPromise; + /** Calculates the sum of item values in the current Query. */ + sum(): JQueryPromise; + /** Adds one more sorting condition to the current Query. */ + thenBy(getter: Object): Query; + /** Adds one more sorting condition to the current Query. */ + thenBy(getter: Object, desc: boolean): Query; + /** Returns the array of current Query items. */ + toArray(): Array; + } + /** The global data layer error handler. */ + export var errorHandler: (e: Error) => void; + /** Encodes the specified string or array of bytes to base64 encoding. */ + export function base64_encode(input: any): string; + /** Creates a Query instance. */ + export function query(array: Array): Query; + /** Creates a Query instance for accessing the remote service specified by a URL. */ + export function query(url: string, queryOptions: Object): Query; + /** This section describes the utility objects provided by the DevExtreme data layer. */ + export var utils: { + /** Compiles a getter function from the getter expression. */ + compileGetter(expr: any): Function; + /** Compiles a setter function from the setter expression. */ + compileSetter(expr: any): Function; + odata: { + /** Holds key value converters for OData. */ + keyConverters: { + String(value: any): string; + Int32(value: any): number; + Int64(value: any): EdmLiteral; + Guid(value: any): Guid; + Boolean(value: any): boolean; + Single(value: any): EdmLiteral; + Decimal(value: any): EdmLiteral; + }; + } + } + } + /** An object that serves as a namespace for DevExtreme UI widgets as well as for methods implementing UI logic in DevExtreme sites/applications. */ + export module ui { + export interface WidgetOptions extends DOMComponentOptions { + /** A Boolean value specifying whether or not the widget changes its state when interacting with a user. */ + activeStateEnabled?: boolean; + /** A Boolean value specifying whether or not the widget can respond to user interaction. */ + disabled?: boolean; + /** A Boolean value specifying whether or not the widget changes its state when being hovered by an end user. */ + hoverStateEnabled?: boolean; + /** Specifies whether or not the widget can be focused. */ + focusStateEnabled?: boolean; + /** Specifies a shortcut key that sets focus on the widget element. */ + accessKey?: string; + /** A Boolean value specifying whether or not the widget is visible. */ + visible?: boolean; + /** Specifies the widget tab index. */ + tabIndex?: number; + /** Specifies the text of the hint displayed for the widget. */ + hint?: string; + } + /** The base class for widgets. */ + export class Widget extends DOMComponent { + constructor(options?: WidgetOptions); + /** Redraws the widget. */ + repaint(): void; + /** Sets focus on the widget. */ + focus(): void; + /** Registers a handler when a specified key is pressed. */ + registerKeyHandler(key: string, handler: Function): void; + } + export interface CollectionWidgetOptions extends WidgetOptions { + /** A data source used to fetch data to be displayed by the widget. */ + dataSource?: any; + itemClickAction?: any; + itemHoldAction?: Function; + /** The time period in milliseconds before the onItemHold event is raised. */ + itemHoldTimeout?: number; + itemRender?: any; + itemRenderedAction?: Function; + /** An array of items displayed by the widget. */ + items?: Array; + /** + * A function performed when a widget item is selected. + * @deprecated onSelectionChanged.md + */ + itemSelectAction?: Function; + /** The template to be used for rendering items. */ + itemTemplate?: any; + loopItemFocus?: boolean; + /** The text or HTML markup displayed by the widget if the item collection is empty. */ + noDataText?: string; + onContentReady?: any; + contentReadyAction?: any; + /** A handler for the itemClick event. */ + onItemClick?: any; + /** A handler for the itemContextMenu event. */ + onItemContextMenu?: Function; + /** A handler for the itemHold event. */ + onItemHold?: Function; + /** A handler for the itemRendered event. */ + onItemRendered?: Function; + /** A handler for the selectionChanged event. */ + onSelectionChanged?: Function; + /** The index of the currently selected widget item. */ + selectedIndex?: number; + /** The selected item object. */ + selectedItem?: Object; + /** An array of currently selected item objects. */ + selectedItems?: Array; + /** A handler for the itemDeleting event. */ + onItemDeleting?: Function; + /** A handler for the itemDeleted event. */ + onItemDeleted?: Function; + /** A handler for the itemReordered event. */ + onItemReordered?: Function; + } + /** The base class for widgets containing an item collection. */ + export class CollectionWidget extends Widget { + constructor(element: JQuery, options?: CollectionWidgetOptions); + constructor(element: HTMLElement, options?: CollectionWidgetOptions); + selectItem(itemElement: any): void; + unselectItem(itemElement: any): void; + deleteItem(itemElement: any): JQueryPromise; + isItemSelected(itemElement: any): boolean; + reorderItem(itemElement: any, toItemElement: any): JQueryPromise; + } + export interface DataExpressionMixinOptions { + /** A data source used to fetch data to be displayed by the widget. */ + dataSource?: any; + /** Specifies the name of the data source item field whose value is displayed by the widget. */ + displayExpr?: any; + /** Specifies the name of a data source item field whose value is held in the value configuration option. */ + valueExpr?: any; + itemRender?: any; + /** An array of items displayed by the widget. */ + items?: Array; + /** The template to be used for rendering items. */ + itemTemplate?: any; + /** The currently selected value in the widget. */ + value?: Object; + } + export interface EditorOptions extends WidgetOptions { + /** The currently specified value. */ + value?: Object; + /** A handler for the valueChanged event. */ + onValueChanged?: Function; + valueChangeAction?: Function; + /** A Boolean value specifying whether or not the widget is read-only. */ + readOnly?: boolean; + /** Holds the object that defines the error that occurred during validation. */ + validationError?: Object; + /** Specifies whether the editor's value is valid. */ + isValid?: boolean; + /** Specifies how the message about the validation rules that are not satisfied by this editor's value is displayed. */ + validationMessageMode?: string; + } + /** A base class for editors. */ + export class Editor extends Widget { + /** Resets the editor's value to undefined. */ + reset(): void; + } + /** An object that serves as a namespace for methods displaying a message in an application/site. */ + export var dialog: { + /** Creates an alert dialog message containing a single "OK" button. */ + alert(message: string, title: string): JQueryPromise; + /** Creates a confirm dialog that contains "Yes" and "No" buttons. */ + confirm(message: string, title: string): JQueryPromise; + /** Creates a custom dialog using the options specified by the passed configuration object. */ + custom(options: { title?: string; message?: string; buttons?: Array; }): { + show(): JQueryPromise; + hide(): void; + hide(value: any): void; + }; + }; + /** Creates a toast message. */ + export function notify(message: any, type: string, displayTime: number): void; + /** Creates a toast message. */ + export function notify(options: Object): void; + /** An object that serves as a namespace for the methods that work with DevExtreme CSS Themes. */ + export var themes: { + /** Returns the name of the currently applied theme. */ + current(): string; + /** Changes the current theme to the specified one. */ + current(themeName: string): void; + }; + /** Sets a specified template engine. */ + export function setTemplateEngine(name: string): void; + /** Sets a custom template engine defined via custom compile and render functions. */ + export function setTemplateEngine(options: Object): void; + } + /** An object that serves as a namespace for utility methods that can be helpful when working with the DevExtreme framework and UI widgets. */ + export var utils: { + /** Sets parameters for the viewport meta tag. */ + initMobileViewport(options: { allowZoom?: boolean; allowPan?: boolean; allowSelection?: boolean }): void; + }; + /** An object that serves as a namespace for DevExtreme Data Visualization Widgets. */ + export module viz { + /** Applies a theme for the entire page with several DevExtreme visualization widgets. */ + export function currentTheme(theme: string): void; + /** Applies a new theme (with the color scheme defined separately) for the entire page with several DevExtreme visualization widgets. */ + export function currentTheme(platform: string, colorScheme: string): void; + /** Registers a new theme based on the existing one. */ + export function registerTheme(customTheme: Object, baseTheme: string): void; + /** Applies a predefined or registered custom palette to all visualization widgets at once. */ + export function currentPalette(paletteName: string): void; + /** Obtains the color sets of a predefined or registered palette. */ + export function getPalette(paletteName: string): Object; + /** Registers a new palette. */ + export function registerPalette(paletteName: string, palette: Object): void; + } +} +declare module DevExpress.ui { + export interface dxValidatorOptions extends DOMComponentOptions { + /** An array of validation rules to be checked for the editor with which the dxValidator object is associated. */ + validationRules?: Array; + /** Specifies the editor name to be used in the validation default messages. */ + name?: string; + /** An object that specifies what and when to validate and how to apply the validation result. */ + adapter?: Object; + /** Specifies the validation group the editor will be related to. */ + validationGroup?: string; + /** A handler for the validated event. */ + onValidated?: (params: validationEngine.ValidatorValidationResult) => void; + } + /** A widget that is used to validate the associated DevExtreme editors against the defined validation rules. */ + export class dxValidator extends DOMComponent implements validationEngine.IValidator { + constructor(element: JQuery, options?: dxValidatorOptions); + constructor(element: Element, options?: dxValidatorOptions); + /** Validates the value of the editor that is controlled by the current dxValidator object against the list of the specified validation rules. */ + validate(): validationEngine.ValidatorValidationResult; + /** Resets the value and validation result of the editor associated with the current dxValidator object. */ + reset(): void; + } + /** The widget that is used in the Knockout and Angular approaches to combine the editors to be validated. */ + export class dxValidationGroup extends DOMComponent { + constructor(element: JQuery); + constructor(element: Element); + /** Validates rules of the validators that belong to the current validation group. */ + validate(): validationEngine.ValidationGroupValidationResult; + /** Resets the value and validation result of the editors that are included to the current validation group. */ + reset(): void; + } + export interface dxValidationSummaryOptions extends CollectionWidgetOptions { + /** Specifies the validation group for which summary should be generated. */ + validationGroup?: string; + } + /** A widget for displaying the result of checking validation rules for editors. */ + export class dxValidationSummary extends CollectionWidget { + constructor(element: JQuery, options?: dxValidationSummaryOptions); + constructor(element: Element, options?: dxValidationSummaryOptions); + } + export interface dxResizableOptions extends DOMComponentOptions { + /** Specifies which borders of the widget element are used as a handle. */ + handles?: string; + /** Specifies the lower width boundary for resizing. */ + minWidth?: number; + /** Specifies the upper width boundary for resizing. */ + maxWidth?: number; + /** Specifies the lower height boundary for resizing. */ + minHeight?: number; + /** Specifies the upper height boundary for resizing. */ + maxHeight?: number; + /** A handler for the resizeStart event. */ + onResizeStart?: Function; + /** A handler for the resize event. */ + onResize?: Function; + /** A handler for the resizeEnd event. */ + onResizeEnd?: Function; + } + /** A widget that displays required content in a resizable element. */ + export class dxResizable extends DOMComponent { + constructor(element: JQuery, options?: dxResizableOptions); + constructor(element: Element, options?: dxResizableOptions); + } + export interface dxTooltipOptions extends dxPopoverOptions { + } + /** A tooltip widget. */ + export class dxTooltip extends dxPopover { + constructor(element: JQuery, options?: dxTooltipOptions); + constructor(element: Element, options?: dxTooltipOptions); + } + export interface dxDropDownListOptions extends dxDropDownEditorOptions, DataExpressionMixinOptions { + /** Returns the value currently displayed by the widget. */ + displayValue?: string; + /** The minimum number of characters that must be entered into the text box to begin a search. */ + minSearchLength?: number; + /** Specifies the name of a data source item field or an expression whose value is compared to the search criterion. */ + searchExpr?: Object; + /** Specifies the binary operation used to filter data. */ + searchMode?: string; + /** Specifies the time delay, in milliseconds, after the last character has been typed in, before a search is executed. */ + searchTimeout?: number; + /** A handler for the valueChanged event. */ + onValueChanged?: Function; + /** Specifies DOM event names that update a widget's value. */ + valueChangeEvent?: string; + /** Specifies whether or not the widget supports searching. */ + searchEnabled?: boolean; + /** + * Specifies whether or not the widget displays items by pages. + * @deprecated dataSource.paginate.md + */ + pagingEnabled?: boolean; + /** The text or HTML markup displayed by the widget if the item collection is empty. */ + noDataText?: string; + /** A handler for the selectionChanged event. */ + onSelectionChanged?: Function; + /** A handler for the itemClick event. */ + onItemClick?: Function; + onContentReady?: Function; + } + /** A base class for drop-down list widgets. */ + export class dxDropDownList extends dxDropDownEditor { + constructor(element: JQuery, options?: dxDropDownListOptions); + constructor(element: Element, options?: dxDropDownListOptions); + } + export interface dxToolbarOptions extends CollectionWidgetOptions { + menuItemRender?: any; + /** The template used to render menu items. */ + menuItemTemplate?: any; + /** Informs the widget about its location in a view HTML markup. */ + renderAs?: string; + } + /** A toolbar widget. */ + export class dxToolbar extends CollectionWidget { + constructor(element: JQuery, options?: dxToolbarOptions); + constructor(element: Element, options?: dxToolbarOptions); + } + export interface dxToastOptions extends dxOverlayOptions { + animation?: fx.AnimationOptions; + /** The time span in milliseconds during which the dxToast widget is visible. */ + displayTime?: number; + height?: any; + /** The dxToast message text. */ + message?: string; + position?: PositionOptions; + shading?: boolean; + /** Specifies the dxToast widget type. */ + type?: string; + width?: any; + closeOnBackButton?: boolean; + } + /** The toast message widget. */ + export class dxToast extends dxOverlay { + constructor(element: JQuery, options?: dxToastOptions); + constructor(element: Element, options?: dxToastOptions); + } + export interface dxTextEditorOptions extends EditorOptions { + /** A handler for the change event. */ + onChange?: Function; + changeAction?: Function; + /** A handler for the copy event. */ + onCopy?: Function; + copyAction?: Function; + /** A handler for the cut event. */ + onCut?: Function; + cutAction?: Function; + /** A handler for the enterKey event. */ + onEnterKey?: Function; + enterKeyAction?: Function; + /** A handler for the focusIn event. */ + onFocusIn?: Function; + focusInAction?: Function; + /** A handler for the focusOut event. */ + onFocusOut?: Function; + focusOutAction?: Function; + /** A handler for the input event. */ + onInput?: Function; + inputAction?: Function; + /** A handler for the keyDown event. */ + onKeyDown?: Function; + keyDownAction?: Function; + /** A handler for the keyPress event. */ + onKeyPress?: Function; + keyPressAction?: Function; + /** A handler for the keyUp event. */ + onKeyUp?: Function; + keyUpAction?: Function; + /** A handler for the paste event. */ + onPaste?: Function; + pasteAction?: Function; + /** The text displayed by the widget when the widget value is empty. */ + placeholder?: string; + /** Specifies whether to display the Clear button in the widget. */ + showClearButton?: boolean; + /** Specifies the current value displayed by the widget. */ + value?: any; + /** Specifies DOM event names that update a widget's value. */ + valueChangeEvent?: string; + /** Specifies whether or not the widget checks the inner text for spelling mistakes. */ + spellcheck?: boolean; + /** Specifies HTML attributes applied to the inner input element of the widget. */ + attr?: Object; + /** The read-only option that holds the text displayed by the widget input element. */ + text?: string; + /** Specifies whether or not the widget supports the focused state and keyboard navigation. */ + focusStateEnabled?: boolean; + /** A Boolean value specifying whether or not the widget changes its state when being hovered by an end user. */ + hoverStateEnabled?: boolean; + /** The editor mask that specifies the format of the entered string. */ + mask?: string; + /** Specifies a mask placeholder character. */ + maskChar?: string; + /** Specifies custom mask rules. */ + maskRules?: Object; + /** A message displayed when the entered text does not match the specified pattern. */ + maskInvalidMessage?: string; + } + /** A base class for text editing widgets. */ + export class dxTextEditor extends Editor { + constructor(element: JQuery, options?: dxTextEditorOptions); + constructor(element: Element, options?: dxTextEditorOptions); + /** Removes focus from the input element. */ + blur(): void; + /** Sets focus to the input element representing the widget. */ + focus(): void; + } + export interface dxTextBoxOptions extends dxTextEditorOptions { + /** Specifies the maximum number of characters you can enter into the textbox. */ + maxLength?: any; + /** The "mode" attribute value of the actual HTML input element representing the text box. */ + mode?: string; + } + /** A single-line text box widget. */ + export class dxTextBox extends dxTextEditor { + constructor(element: JQuery, options?: dxTextBoxOptions); + constructor(element: Element, options?: dxTextBoxOptions); + } + export interface dxTextAreaOptions extends dxTextBoxOptions { + /** Specifies whether or not the widget checks the inner text for spelling mistakes. */ + spellcheck?: boolean; + } + /** A widget used to display and edit multi-line text. */ + export class dxTextArea extends dxTextBox { + constructor(element: JQuery, options?: dxTextAreaOptions); + constructor(element: Element, options?: dxTextAreaOptions); + } + export interface dxTabsOptions extends CollectionWidgetOptions { + /** Specifies whether the widget enables an end-user to select only a single item or multiple items. */ + selectionMode?: string; + /** Specifies whether or not an end-user can scroll tabs by swiping. */ + scrollByContent?: boolean; + /** Specifies whether or not an end-user can scroll tabs. */ + scrollingEnabled?: boolean; + /** A Boolean value that specifies the availability of navigation buttons. */ + showNavButtons?: boolean; + } + /** A tab strip used to switch between pages. */ + export class dxTabs extends CollectionWidget { + constructor(element: JQuery, options?: dxTabsOptions); + constructor(element: Element, options?: dxTabsOptions); + } + export interface dxTabPanelOptions extends dxMultiViewOptions { + /** A handler for the titleClick event. */ + onTitleClick?: any; + /** A handler for the titleHold event. */ + onTitleHold?: Function; + /** A handler for the titleRendered event. */ + onTitleRendered?: Function; + titleTemplate?: any; + /** The template to be used for rendering an item title. */ + itemTitleTemplate?: any; + } + /** A widget used to display a view and to switch between several views by clicking the appropriate tabs. */ + export class dxTabPanel extends dxMultiView { + constructor(element: JQuery, options?: dxTabPanelOptions); + constructor(element: Element, options?: dxTabPanelOptions); + } + export interface dxSelectBoxOptions extends dxDropDownListOptions { + /** The template to be used for rendering the widget text field. */ + fieldTemplate?: any; + /** The text that is provided as a hint in the select box editor. */ + placeholder?: string; + /** Specifies whether or not the widget allows an end-user to enter a custom value. */ + fieldEditEnabled?: boolean; + } + /** A widget that allows you to select an item in a dropdown list. */ + export class dxSelectBox extends dxDropDownList { + constructor(element: JQuery, options?: dxSelectBoxOptions); + constructor(element: Element, options?: dxSelectBoxOptions); + } + export interface dxTagBoxOptions extends dxSelectBoxOptions { + /** Holds the list of selected values. */ + values?: Array; + } + /** A widget that allows you to select multiple items from a dropdown list. */ + export class dxTagBox extends dxSelectBox { + constructor(element: JQuery, options?: dxTagBoxOptions); + constructor(element: Element, options?: dxTagBoxOptions); + } + export interface dxScrollViewOptions extends dxScrollableOptions { + /** A handler for the pullDown event. */ + onPullDown?: Function; + pullDownAction?: Function; + /** Specifies the text shown in the pullDown panel when pulling the content down lowers the refresh threshold. */ + pulledDownText?: string; + /** Specifies the text shown in the pullDown panel while pulling the content down to the refresh threshold. */ + pullingDownText?: string; + /** A handler for the reachBottom event. */ + onReachBottom?: Function; + reachBottomAction?: Function; + /** Specifies the text shown in the pullDown panel displayed when content is scrolled to the bottom. */ + reachBottomText?: string; + /** Specifies the text shown in the pullDown panel displayed when the content is being refreshed. */ + refreshingText?: string; + /** Returns a value indicating if the scrollView content is larger then the widget container. */ + isFull(): boolean; + /** Locks the widget until the release(preventScrollBottom) method is called and executes the function passed to the onPullDown option and the handler assigned to the pullDown event. */ + refresh(): void; + /** Notifies the scroll view that data loading is finished. */ + release(preventScrollBottom: boolean): JQueryPromise; + /** Toggles the loading state of the widget. */ + toggleLoading(showOrHide: boolean): void; + } + /** A widget used to display scrollable content. */ + export class dxScrollView extends dxScrollable { + constructor(element: JQuery, options?: dxScrollViewOptions); + constructor(element: Element, options?: dxScrollViewOptions); + } + export interface dxScrollableLocation { + top?: number; + left?: number; + } + export interface dxScrollableOptions extends DOMComponentOptions { + /** A string value specifying the available scrolling directions. */ + direction?: string; + /** A Boolean value specifying whether or not the widget can respond to user interaction. */ + disabled?: boolean; + /** A handler for the scroll event. */ + onScroll?: Function; + scrollAction?: Function; + /** Specifies when the widget shows the scrollbar. */ + showScrollbar?: string; + /** A handler for the update event. */ + onUpdated?: Function; + updateAction?: Function; + /** Indicates whether to use native or simulated scrolling. */ + useNative?: boolean; + /** A Boolean value specifying whether to enable or disable the bounce-back effect. */ + bounceEnabled?: boolean; + /** A Boolean value specifying whether or not an end-user can scroll the widget content swiping it up or down. */ + scrollByContent?: boolean; + /** A Boolean value specifying whether or not an end-user can scroll the widget content using the scrollbar. */ + scrollByThumb?: boolean; + } + /** A widget used to display scrollable content. */ + export class dxScrollable extends DOMComponent { + constructor(element: JQuery, options?: dxScrollableOptions); + constructor(element: Element, options?: dxScrollableOptions); + /** Returns the height of the scrollable widget in pixels. */ + clientHeight(): number; + /** Returns the width of the scrollable widget in pixels. */ + clientWidth(): number; + /** Returns an HTML element of the widget. */ + content(): JQuery; + /** Scrolls the widget content by the specified number of pixels. */ + scrollBy(distance: number): void; + /** Scrolls widget content by the specified number of pixels in horizontal and vertical directions. */ + scrollBy(distanceObject: dxScrollableLocation): void; + /** Returns the height of the scrollable content in pixels. */ + scrollHeight(): number; + /** Returns the current scroll position against the leftmost position. */ + scrollLeft(): number; + /** Returns how far the scrollable content is scrolled from the top and from the left. */ + scrollOffset(): dxScrollableLocation; + /** Scrolls widget content to the specified position. */ + scrollTo(targetLocation: number): void; + /** Scrolls widget content to a specified position. */ + scrollTo(targetLocation: dxScrollableLocation): void; + /** Scrolls widget content to the specified element. */ + scrollToElement(element: Element): void; + /** Returns the current scroll position against the topmost position. */ + scrollTop(): number; + /** Returns the width of the scrollable content in pixels. */ + scrollWidth(): number; + /** Updates the dimensions of the scrollable contents. */ + update(): void; + } + export interface dxRadioGroupOptions extends CollectionWidgetOptions, DataExpressionMixinOptions { + /** Specifies the radio group layout. */ + layout?: string; + } + /** A widget that enables a user to select one item within a list of items represented by radio buttons. */ + export class dxRadioGroup extends CollectionWidget { + constructor(element: JQuery, options?: dxRadioGroupOptions); + constructor(element: Element, options?: dxRadioGroupOptions); + } + export interface dxPopupOptions extends dxOverlayOptions { + animation?: fx.AnimationOptions; + /** Specifies whether or not to allow a user to drag the popup window. */ + dragEnabled?: boolean; + /** A Boolean value specifying whether or not to display the widget in full-screen mode. */ + fullScreen?: boolean; + position?: PositionOptions; + /** A Boolean value specifying whether or not to display the title in the popup window. */ + showTitle?: boolean; + /** The title in the overlay window. */ + title?: string; + /** A template to be used for rendering the widget title. */ + titleTemplate?: any; + width?: any; + /** Specifies items displayed on the top or bottom toolbar of the popup window. */ + buttons?: Array; + /** Specifies whether or not the widget displays the Close button. */ + showCloseButton?: boolean; + /** A handler for the titleRendered event. */ + onTitleRendered?: Function; + } + /** A widget that displays required content in a popup window. */ + export class dxPopup extends dxOverlay { + constructor(element: JQuery, options?: dxPopupOptions); + constructor(element: Element, options?: dxPopupOptions); + } + export interface dxPopoverOptions extends dxPopupOptions { + /** An object defining animation options of the widget. */ + animation?: fx.AnimationOptions; + /** Specifies the height of the widget. */ + height?: any; + /** An object defining widget positioning options. */ + position?: PositionOptions; + shading?: boolean; + /** A Boolean value specifying whether or not to display the title in the overlay window. */ + showTitle?: boolean; + /** The target element associated with a popover. */ + target?: any; + /** Specifies the width of the widget. */ + width?: any; + } + /** A widget that displays the required content in a popup window. */ + export class dxPopover extends dxPopup { + constructor(element: JQuery, options?: dxPopoverOptions); + constructor(element: Element, options?: dxPopoverOptions); + /** Displays the widget for the specified target element. */ + show(target?: any): JQueryPromise; + } + export interface dxOverlayOptions extends WidgetOptions { + /** An object that defines the animation options of the widget. */ + animation?: fx.AnimationOptions; + /** A Boolean value specifying whether or not the widget is closed if a user presses the Back hardware button. */ + closeOnBackButton?: boolean; + /** A Boolean value specifying whether or not the widget is closed if a user clicks outside of the overlapping window. */ + closeOnOutsideClick?: any; + /** A template to be used for rendering widget content. */ + contentTemplate?: any; + /** Specifies whether widget content is rendered when the widget is shown or when rendering the widget. */ + deferRendering?: boolean; + /** Specifies whether or not an end-user can drag the widget. */ + dragEnabled?: boolean; + /** Specifies whether or not an end user can resize the widget. */ + resizeEnabled?: boolean; + /** The height of the widget in pixels. */ + height?: any; + /** A handler for the hidden event. */ + onHidden?: Function; + hiddenAction?: Function; + /** A handler for the hiding event. */ + onHiding?: Function; + hidingAction?: Function; + /** An object defining widget positioning options. */ + position?: PositionOptions; + /** A Boolean value specifying whether or not the main screen is inactive while the widget is active. */ + shading?: boolean; + /** Specifies the shading color. */ + shadingColor?: string; + /** A handler for the showing event. */ + onShowing?: Function; + showingAction?: Function; + /** A handler for the shown event. */ + onShown?: Function; + shownAction?: Function; + /** A Boolean value specifying whether or not the widget is visible. */ + visible?: boolean; + /** The widget width in pixels. */ + width?: any; + } + /** A widget displaying the required content in an overlay window. */ + export class dxOverlay extends Widget { + constructor(element: JQuery, options?: dxOverlayOptions); + constructor(element: Element, options?: dxOverlayOptions); + /** An HTML element of the widget. */ + content(): JQuery; + /** Hides the widget. */ + hide(): JQueryPromise; + /** Recalculates the overlay's size and position. */ + repaint(): void; + /** Shows the widget. */ + show(): JQueryPromise; + /** Toggles the visibility of the widget. */ + toggle(showing: boolean): JQueryPromise; + /** A static method that specifies the base z-index for all overlay widgets. */ + static baseZIndex(zIndex: number): void; + } + export interface dxNumberBoxOptions extends dxTextEditorOptions { + /** The maximum value accepted by the number box. */ + max?: number; + /** The minimum value accepted by the number box. */ + min?: number; + /** Specifies whether or not to show spin buttons. */ + showSpinButtons?: boolean; + useTouchSpinButtons?: boolean; + /** Specifies by which value the widget value changes when a spin button is clicked. */ + step?: number; + /** The current number box value. */ + value?: number; + } + /** A textbox widget that enables a user to enter numeric values. */ + export class dxNumberBox extends dxTextEditor { + constructor(element: JQuery, options?: dxNumberBoxOptions); + constructor(element: Element, options?: dxNumberBoxOptions); + } + export interface dxNavBarOptions extends dxTabsOptions { + scrollingEnabled?: boolean; + } + /** A widget that contains items used to navigate through application views. */ + export class dxNavBar extends dxTabs { + constructor(element: JQuery, options?: dxNavBarOptions); + constructor(element: Element, options?: dxNavBarOptions); + } + export interface dxMultiViewOptions extends CollectionWidgetOptions { + /** Specifies whether or not to animate the displayed item change. */ + animationEnabled?: boolean; + /** A Boolean value specifying whether or not to scroll back to the first item after the last item is swiped. */ + loop?: boolean; + /** The index of the currently displayed item. */ + selectedIndex?: number; + /** A Boolean value specifying whether or not to allow users to change the selected index by swiping. */ + swipeEnabled?: boolean; + /** Specifies whether widget content is rendered when the widget is shown or when rendering the widget. */ + deferRendering?: boolean; + } + /** A widget used to display a view and to switch between several views. */ + export class dxMultiView extends CollectionWidget { + constructor(element: JQuery, options?: dxMultiViewOptions); + constructor(element: Element, options?: dxMultiViewOptions); + } + export interface dxMapOptions extends WidgetOptions { + /** Specifies whether or not the widget automatically adjusts center and zoom option values when adding a new marker or route. */ + autoAdjust?: boolean; + /** An object, a string, or an array specifying the location displayed at the center of the widget. */ + center?: { + /** The latitude location displayed in the center of the widget. */ + lat?: number; + /** The longitude location displayed in the center of the widget. */ + lng?: number; + }; + /** A handler for the click event. */ + onClick?: any; + clickAction?: any; + /** Specifies whether or not map widget controls are available. */ + controls?: boolean; + /** Specifies the height of the widget. */ + height?: number; + /** 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. */ + bing?: string; + /** A key used to authenticate the application within the "Google" map provider. */ + google?: string; + /** A key used to authenticate the application within the "Google Static" map provider. */ + googleStatic?: string; + } + /** A handler for the markerAdded event. */ + onMarkerAdded?: 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; + /** An array of markers displayed on a map. */ + markers?: Array; + /** The name of the current map data provider. */ + provider?: string; + /** A handler for the ready event. */ + onReady?: Function; + readyAction?: Function; + /** A handler for the routeAdded event. */ + onRouteAdded?: Function; + routeAddedAction?: Function; + /** A handler for the routeRemoved event. */ + onRouteRemoved?: Function; + routeRemovedAction?: Function; + /** An array of routes shown on the map. */ + routes?: Array; + /** The type of a map to display. */ + type?: string; + /** Specifies the width of the widget. */ + width?: number; + /** The zoom level of the map. */ + zoom?: number; + } + /** An interactive map widget. */ + export class dxMap extends Widget { + constructor(element: JQuery, options?: dxMapOptions); + constructor(element: Element, options?: dxMapOptions); + /** Adds a marker to the map. */ + addMarker(markerOptions: Object): JQueryPromise; + /** Adds a route to the map. */ + addRoute(options: Object): JQueryPromise; + /** Removes a marker from the map. */ + removeMarker(marker: Object): JQueryPromise; + /** Removes a route from the map. */ + removeRoute(route: any): JQueryPromise; + } + export interface dxLookupOptions extends dxDropDownListOptions { + /** An object defining widget animation options. */ + animation?: fx.AnimationOptions; + /** The text displayed on the Cancel button. */ + cancelButtonText?: string; + /** The text displayed on the Clear button. */ + clearButtonText?: string; + /** Specifies whether or not the widget cleans the search box when the popup window is displayed. */ + cleanSearchOnOpening?: boolean; + /** A Boolean value specifying whether or not the widget is closed if a user clicks outside of the overlaying window. */ + closeOnOutsideClick?: any; + /** The text displayed on the Apply button. */ + applyButtonText?: string; + /** A Boolean value specifying whether or not to display the lookup in full-screen mode. */ + fullScreen?: boolean; + focusStateEnabled?: boolean; + /** A Boolean value specifying whether or not to group widget items. */ + grouped?: boolean; + groupRender?: any; + /** The name of the template used to display a group header. */ + groupTemplate?: any; + /** The text displayed on the button used to load the next page from the data source. */ + nextButtonText?: string; + /** A handler for the pageLoading event. */ + onPageLoading?: Function; + /** Specifies whether the next page is loaded when a user scrolls the widget to the bottom or when the "next" button is clicked. */ + pageLoadMode?: string; + pageLoadingAction?: Function; + /** Specifies the text shown in the pullDown panel, which is displayed when the widget is scrolled to the bottom. */ + pageLoadingText?: string; + /** The text displayed by the widget when nothing is selected. */ + placeholder?: string; + /** The height of the widget popup element. */ + popupHeight?: any; + /** The width of the widget popup element. */ + popupWidth?: any; + /** An object defining widget positioning options. */ + position?: PositionOptions; + /** Specifies the text displayed in the pullDown panel when the widget is pulled below the refresh threshold. */ + pulledDownText?: string; + /** Specifies the text shown in the pullDown panel while the list is being pulled down to the refresh threshold. */ + pullingDownText?: string; + /** A handler for the pullRefresh event. */ + onPullRefresh?: Function; + pullRefreshAction?: Function; + /** A Boolean value specifying whether or not the widget supports the "pull down to refresh" gesture. */ + pullRefreshEnabled?: boolean; + /** Specifies the text displayed in the pullDown panel while the widget is being refreshed. */ + refreshingText?: string; + /** A handler for the scroll event. */ + onScroll?: Function; + scrollAction?: Function; + /** A Boolean value specifying whether or not the search bar is visible. */ + searchEnabled?: boolean; + /** The text that is provided as a hint in the lookup's search bar. */ + searchPlaceholder?: string; + /** A Boolean value specifying whether or not the main screen is inactive while the lookup is active. */ + shading?: boolean; + /** Specifies whether to display the Cancel button in the lookup window. */ + showCancelButton?: boolean; + /** + * A Boolean value specifying whether the widget loads the next page automatically when you reach the bottom of the list or when a button is clicked. + * @deprecated pageLoadMode.md + */ + showNextButton?: boolean; + /** The title of the lookup window. */ + title?: string; + /** A template to be used for rendering the widget title. */ + titleTemplate?: any; + /** Specifies whether or not the widget uses native scrolling. */ + useNativeScrolling?: boolean; + /** Specifies whether or not to show lookup contents in a dxPopover widget. */ + usePopover?: boolean; + /** A handler for the valueChanged event. */ + onValueChanged?: Function; + contentReadyAction?: Function; + titleRender?: any; + /** A handler for the titleRendered event. */ + onTitleRendered?: Function; + /** A Boolean value specifying whether or not to display the title in the popup window. */ + showPopupTitle?: boolean; + } + /** A widget that allows a user to select predefined values from a lookup window. */ + export class dxLookup extends dxDropDownList { + constructor(element: JQuery, options?: dxLookupOptions); + constructor(element: Element, options?: dxLookupOptions); + /** This section lists the data source fields that are used in a default template for lookup drop-down items. */ + } + export interface dxLoadPanelOptions extends dxOverlayOptions { + /** An object defining the animation options of the widget. */ + animation?: fx.AnimationOptions; + /** The delay in milliseconds after which the load panel is displayed. */ + delay?: number; + /** The height of the widget. */ + height?: number; + /** A URL pointing to an image to be used as a load indicator. */ + indicatorSrc?: string; + /** The text displayed in the load panel. */ + message?: string; + /** A Boolean value specifying whether or not to show a load indicator. */ + showIndicator?: boolean; + /** A Boolean value specifying whether or not to show the pane behind the load indicator. */ + showPane?: boolean; + /** The width of the widget. */ + width?: number; + } + /** A widget used to indicate whether or not an element is loading. */ + export class dxLoadPanel extends dxOverlay { + constructor(element: JQuery, options?: dxLoadPanelOptions); + constructor(element: Element, options?: dxLoadPanelOptions); + } + export interface dxLoadIndicatorOptions extends WidgetOptions { + /** Specifies the path to an image used as the indicator. */ + indicatorSrc?: string; + } + /** The widget used to indicate the loading process. */ + export class dxLoadIndicator extends Widget { + constructor(element: JQuery, options?: dxLoadIndicatorOptions); + constructor(element: Element, options?: dxLoadIndicatorOptions); + } + export interface dxListOptions extends CollectionWidgetOptions { + /** A Boolean value specifying whether or not to display a grouped list. */ + grouped?: boolean; + groupRender?: any; + /** The template to be used for rendering item groups. */ + groupTemplate?: any; + onItemDeleting?: Function; + /** A handler for the itemDeleted event. */ + onItemDeleted?: Function; + /** A handler for the groupRendered event. */ + onGroupRendered?: Function; + itemDeleteAction?: Function; + /** A handler for the itemReordered event. */ + onItemReordered?: Function; + itemReorderAction?: Function; + /** A handler for the itemClick event. */ + onItemClick?: any; + /** A handler for the itemSwipe event. */ + onItemSwipe?: Function; + itemSwipeAction?: Function; + /** The text displayed on the button used to load the next page from the data source. */ + nextButtonText?: string; + /** A handler for the pageLoading event. */ + onPageLoading?: Function; + pageLoadingAction?: Function; + /** Specifies the text shown in the pullDown panel, which is displayed when the list is scrolled to the bottom. */ + pageLoadingText?: string; + /** Specifies the text displayed in the pullDown panel when the list is pulled below the refresh threshold. */ + pulledDownText?: string; + /** Specifies the text shown in the pullDown panel while the list is being pulled down to the refresh threshold. */ + pullingDownText?: string; + /** A handler for the pullRefresh event. */ + onPullRefresh?: Function; + pullRefreshAction?: Function; + /** A Boolean value specifying whether or not the widget supports the "pull down to refresh" gesture. */ + pullRefreshEnabled?: boolean; + /** Specifies the text displayed in the pullDown panel while the list is being refreshed. */ + refreshingText?: string; + /** A handler for the scroll event. */ + onScroll?: Function; + scrollAction?: Function; + /** A Boolean value specifying whether to enable or disable list scrolling. */ + scrollingEnabled?: boolean; + /** Specifies when the widget shows the scrollbar. */ + showScrollbar?: string; + /** Specifies whether or not the widget uses native scrolling. */ + useNativeScrolling?: boolean; + /** A Boolean value specifying whether to enable or disable the bounce-back effect. */ + bounceEnabled?: boolean; + /** A Boolean value specifying if the list is scrolled by content. */ + scrollByContent?: boolean; + /** A Boolean value specifying if the list is scrolled using the scrollbar. */ + scrollByThumb?: boolean; + itemUnselectAction?: Function; + onItemContextMenu?: Function; + onItemHold?: Function; + /** Specifies whether or not an end-user can collapse groups. */ + collapsibleGroups?: boolean; + /** Specifies whether the next page is loaded when a user scrolls the widget to the bottom or when the "next" button is clicked. */ + pageLoadMode?: string; + /** Specifies whether or not to display controls used to select list items. */ + showSelectionControls?: boolean; + /** Specifies item selection mode. */ + selectionMode?: string; + selectAllText?: string; + /** Specifies the array of items for a context menu called for a list item. */ + menuItems?: Array; + /** Specifies whether an item context menu is shown when a user holds or swipes an item. */ + menuMode?: string; + /** Specifies whether or not an end user can delete list items. */ + allowItemDeleting?: boolean; + /** Specifies the way a user can delete items from the list. */ + itemDeleteMode?: string; + /** Specifies whether or not an end user can reorder list items. */ + allowItemReordering?: boolean; + /** Specifies whether or not to show the loading panel when the DataSource bound to the widget is loading data. */ + indicateLoading?: boolean; + activeStateEnabled?: boolean; + } + /** A list widget. */ + export class dxList extends CollectionWidget { + constructor(element: JQuery, options?: dxListOptions); + constructor(element: Element, options?: dxListOptions); + /** Returns the height of the widget in pixels. */ + clientHeight(): number; + /** Removes the specified item from the list. */ + deleteItem(itemIndex: any): JQueryPromise; + /** Removes the specified item from the list. */ + deleteItem(itemElement: Element): JQueryPromise; + /** Returns a Boolean value that indicates whether or not the specified item is selected. */ + isItemSelected(itemIndex: any): boolean; + /** Returns a Boolean value that indicates whether or not the specified item is selected. */ + isItemSelected(itemElement: Element): boolean; + /** Reloads list data. */ + reload(): void; + /** Moves the specified item to the specified position in the list. */ + reorderItem(itemElement: Element, toItemElement: Element): JQueryPromise; + /** Moves the specified item to the specified position in the list. */ + reorderItem(itemIndex: any, toItemIndex: any): JQueryPromise; + /** Scrolls the list content by the specified number of pixels. */ + scrollBy(distance: number): void; + /** Returns the height of the list content in pixels. */ + scrollHeight(): number; + /** Scrolls list content to the specified position. */ + scrollTo(location: number): void; + /** Scrolls the list to the specified item. */ + scrollToItem(itemElement: Element): void; + /** Scrolls the list to the specified item. */ + scrollToItem(itemIndex: any): void; + /** Returns how far the list content is scrolled from the top. */ + scrollTop(): number; + /** Selects the specified item from the list. */ + selectItem(itemElement: Element): void; + /** Selects the specified item from the list. */ + selectItem(itemIndex: any): void; + /** Deselects the specified item from the list. */ + unselectItem(itemElement: Element): void; + /** Unselects the specified item from the list. */ + unselectItem(itemIndex: any): void; + /** Updates the widget scrollbar according to widget content size. */ + updateDimensions(): JQueryPromise; + /** Expands the specified group. */ + expandGroup(groupIndex: number): JQueryPromise; + /** Collapses the specified group. */ + collapseGroup(groupIndex: number): JQueryPromise; + } + export interface dxGalleryOptions extends CollectionWidgetOptions { + /** The time, in milliseconds, spent on slide animation. */ + animationDuration?: number; + /** Specifies whether or not to animate the displayed item change. */ + animationEnabled?: boolean; + /** A Boolean value specifying whether or not to allow users to switch between items by clicking an indicator. */ + indicatorEnabled?: boolean; + /** A Boolean value specifying whether or not to scroll back to the first item after the last item is swiped. */ + loop?: boolean; + /** The index of the currently active gallery item. */ + selectedIndex?: number; + /** A Boolean value specifying whether or not to display an indicator that points to the selected gallery item. */ + showIndicator?: boolean; + /** A Boolean value that specifies the availability of the "Forward" and "Back" navigation buttons. */ + showNavButtons?: boolean; + /** The time interval in milliseconds, after which the gallery switches to the next item. */ + slideshowDelay?: number; + /** A Boolean value specifying whether or not to allow users to switch between items by swiping. */ + swipeEnabled?: boolean; + /** Specifies whether or not to display parts of previous and next images along the sides of the current image. */ + wrapAround?: boolean; + /** Specifies if the widget stretches images to fit the total gallery width. */ + stretchImages?: boolean; + /** Specifies the width of an area used to display a single image. */ + initialItemWidth?: number; + } + /** An image gallery widget. */ + export class dxGallery extends CollectionWidget { + constructor(element: JQuery, options?: dxGalleryOptions); + constructor(element: Element, options?: dxGalleryOptions); + /** Shows the specified gallery item. */ + goToItem(itemIndex: number, animation: boolean): JQueryPromise; + /** Shows the next gallery item. */ + nextItem(animation: boolean): JQueryPromise; + /** Shows the previous gallery item. */ + prevItem(animation: boolean): JQueryPromise; + } + export interface dxDropDownEditorOptions extends dxTextBoxOptions { + /** Specifies the current value displayed by the widget. */ + value?: Object; + /** A handler for the closed event. */ + onClosed?: Function; + /** A handler for the opened event. */ + onOpened?: Function; + /** Specifies whether or not the drop-down editor is displayed. */ + opened?: boolean; + closeAction?: Function; + openAction?: Function; + shownAction?: Function; + hiddenAction?: Function; + /** Specifies whether or not the widget allows an end-user to enter a custom value. */ + fieldEditEnabled?: boolean; + editEnabled?: boolean; + /** Specifies the way an end-user applies the selected value. */ + applyValueMode?: string; + /** Specifies whether widget content is rendered when the widget is shown or when rendering the widget. */ + deferRendering?: boolean; + } + /** A drop-down editor widget. */ + export class dxDropDownEditor extends dxTextBox { + constructor(element: JQuery, options?: dxDropDownEditorOptions); + constructor(element: Element, options?: dxDropDownEditorOptions); + /** Closes the drop-down editor. */ + close(): void; + /** Opens the drop-down editor. */ + open(): void; + /** Resets the widget's value to null. */ + reset(): void; + /** Returns an <input> element of the widget. */ + field(): JQuery; + /** Returns an HTML element of the popup window content. */ + content(): JQuery; + } + export interface dxDateBoxOptions extends dxTextEditorOptions { + /** A format used to display date/time information. */ + format?: string; + /** A Globalize format string specifying the date display format. */ + formatString?: string; + /** The last date that can be selected within the widget. */ + max?: any; + /** The minimum date that can be selected within the widget. */ + min?: any; + /** The text displayed by the widget when the widget value is not yet specified. This text is also used as a title of the date picker. */ + placeholder?: string; + /** + * Specifies whether or not a user can pick out a date using the drop-down calendar. + * @deprecated Use 'pickerType' option instead. + */ + useCalendar?: boolean; + /** An object or a value, specifying the date and time currently selected using the date box. */ + value?: any; + /** + * Specifies whether or not the widget uses the native HTML input element. + * @deprecated Use 'pickerType' option instead. + */ + useNative?: boolean; + /** Specifies the interval between neighboring values in the popup list in minutes. */ + 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. */ + minZoomLevel?: string; + /** Specifies the type of date/time picker. */ + pickerType?: string; + } + /** A date box widget. */ + export class dxDateBox extends dxDropDownEditor { + constructor(element: JQuery, options?: dxDateBoxOptions); + constructor(element: Element, options?: dxDateBoxOptions); + } + export interface dxCheckBoxOptions extends EditorOptions { + /** Specifies the widget state. */ + value?: boolean; + /** Specifies the text displayed by the check box. */ + text?: string; + } + /** A check box widget. */ + export class dxCheckBox extends Editor { + constructor(element: JQuery, options?: dxCheckBoxOptions); + constructor(element: Element, options?: dxCheckBoxOptions); + } + export interface dxCalendarOptions extends EditorOptions { + /** Specifies a date displayed on the current calendar page. */ + currentDate?: Date; + /** Specifies the first day of a week. */ + firstDayOfWeek?: number; + /** The latest date the widget allows to select. */ + max?: Date; + /** The earliest date the widget allows to select. */ + min?: Date; + /** Specifies whether or not the widget displays a button that selects the current date. */ + showTodayButton?: boolean; + /** Specifies the current calendar zoom level. */ + zoomLevel?: string; + /** Specifies the maximum zoom level of the calendar. */ + maxZoomLevel?: string; + /** Specifies the minimum zoom level of the calendar. */ + minZoomLevel?: string; + /** The template to be used for rendering calendar cells. */ + cellTemplate?: any; + } + /** A calendar widget. */ + export class dxCalendar extends Editor { + constructor(element: JQuery, options?: dxCalendarOptions); + constructor(element: Element, options?: dxCalendarOptions); + } + export interface dxButtonOptions extends WidgetOptions { + /** A Boolean value specifying whether or not the widget changes its state when interacting with a user. */ + activeStateEnabled?: boolean; + /** A handler for the click event. */ + onClick?: any; + clickAction?: any; + /** Specifies the icon to be displayed on the button. */ + icon?: string; + iconSrc?: string; + /** A template to be used for rendering the dxButton widget. */ + template?: any; + /** The text displayed on the button. */ + text?: string; + /** Specifies the button type. */ + type?: string; + /** Specifies the name of the validation group to be accessed in the click event handler. */ + validationGroup?: string; + } + /** A button widget. */ + export class dxButton extends Widget { + constructor(element: JQuery, options?: dxButtonOptions); + constructor(element: Element, options?: dxButtonOptions); + } + export interface dxBoxOptions extends CollectionWidget { + /** Specifies how widget items are aligned along the main direction. */ + align?: string; + /** Specifies the direction of item positioning in the widget. */ + direction?: string; + /** Specifies how widget items are aligned cross-wise. */ + crossAlign?: string; + } + /** A container widget used to arrange inner elements. */ + export class dxBox extends CollectionWidget { + constructor(element: JQuery, options?: dxBoxOptions); + constructor(element: Element, options?: dxBoxOptions); + } + export interface dxResponsiveBoxOptions extends CollectionWidgetOptions { + /** Specifies the collection of rows for the grid used to position layout elements. */ + rows?: Array; + /** Specifies the collection of columns for the grid used to position layout elements. */ + cols?: Array; + /** Specifies the function returning the screen factor depending on the screen width. */ + screenByWidth?: (width: number) => string; + /** Specifies the screen factor with which all elements are located in a single column. */ + singleColumnScreen?: string; + } + /** A widget used to build an adaptive markup that is dependent on screen resolution. */ + export class dxResponsiveBox extends CollectionWidget { + constructor(element: JQuery, options?: dxBoxOptions); + constructor(element: Element, options?: dxBoxOptions); + } + export interface dxAutocompleteOptions extends dxDropDownListOptions { + /** Specifies the current value displayed by the widget. */ + value?: string; + /** The minimum number of characters that must be entered into the text box to begin a search. */ + minSearchLength?: number; + /** Specifies the maximum count of items displayed by the widget. */ + maxItemCount?: number; + /** Gets the currently selected item. */ + selectedItem?: Object; + } + /** A textbox widget that supports autocompletion. */ + export class dxAutocomplete extends dxDropDownList { + constructor(element: JQuery, options?: dxAutocompleteOptions); + constructor(element: Element, options?: dxAutocompleteOptions); + /** Opens the drop-down editor. */ + open(): void; + /** Closes the drop-down editor. */ + close(): void; + } + export interface dxAccordionOptions extends CollectionWidgetOptions { + /** A number specifying the time in milliseconds spent on the animation of the expanding or collapsing of a panel. */ + animationDuration?: number; + /** Specifies the height of the widget. */ + height?: any; + /** Specifies whether all items can be collapsed or whether at least one item must always be expanded. */ + collapsible?: boolean; + /** Specifies whether the widget can expand several items or only a single item at once. */ + multiple?: boolean; + /** The template to be used for rendering dxAccordion items. */ + itemTemplate?: any; + /** A handler for the itemTitleClick event. */ + onItemTitleClick?: any; + /** A handler for the itemTitleHold event. */ + onItemTitleHold?: Function; + /** The template to be used for rendering an item title. */ + itemTitleTemplate?: any; + /** The index number of the currently selected item. */ + selectedIndex?: number; + /** Specifies whether widget content is rendered when the widget is shown or when rendering the widget. */ + deferRendering?: boolean; + } + /** A widget that displays data source items on collapsible panels. */ + export class dxAccordion extends CollectionWidget { + constructor(element: JQuery, options?: dxAccordionOptions); + constructor(element: Element, options?: dxAccordionOptions); + /** Collapses the specified item. */ + collapseItem(index: number): JQueryPromise; + /** Expands the specified item. */ + expandItem(index: number): JQueryPromise; + /** Updates the dimensions of the widget contents. */ + updateDimensions(): JQueryPromise; + } + export interface dxFileUploaderOptions extends EditorOptions { + /** A read-only option that holds a File instance representing the selected file. */ + value?: File; + /** Holds the File instances representing files selected in the widget. */ + values?: Array; + buttonText?: string; + /** The text displayed on the button that opens the file browser. */ + selectButtonText?: string; + /** The text displayed on the button that starts uploading. */ + uploadButtonText?: string; + /** Specifies the text displayed on the area to which an end-user can drop a file. */ + labelText?: string; + /** Specifies the value passed to the name attribute of the underlying input element. */ + name?: string; + /** Specifies whether the widget enables an end-user to select a single file or multiple files. */ + multiple?: boolean; + /** Specifies a file type or several types accepted by the widget. */ + accept?: string; + /** Specifies a target Url for the upload request. */ + uploadUrl?: string; + /** Specifies if an end user can remove a file from the selection and interrupt uploading. */ + allowCanceling?: boolean; + /** Specifies whether or not the widget displays the list of selected files. */ + showFileList?: boolean; + /** Gets the current progress in percentages. */ + progress?: number; + /** The message displayed by the widget when it is ready to upload the specified files. */ + readyToUploadMessage?: string; + /** The message displayed by the widget when uploading is finished. */ + uploadedMessage?: string; + /** The message displayed by the widget on uploading failure. */ + uploadFailedMessage?: string; + /** Specifies how the widget uploads files. */ + uploadMode?: string; + /** A handler for the uploaded event. */ + onUploaded?: Function; + /** A handler for the uploaded event. */ + onProgress?: Function; + /** A handler for the uploadError event. */ + onUploadError?: Function; + } + /** A widget used to select and upload a file or multiple files. */ + export class dxFileUploader extends Editor { + constructor(element: JQuery, options?: dxFileUploaderOptions); + constructor(element: Element, options?: dxFileUploaderOptions); + } + export interface dxTrackBarOptions extends EditorOptions { + /** The minimum value the widget can accept. */ + min?: number; + /** The maximum value the widget can accept. */ + max?: number; + /** The current widget value. */ + value?: number; + } + /** A base class for track bar widgets. */ + export class dxTrackBar extends Editor { + constructor(element: JQuery, options?: dxTrackBarOptions); + constructor(element: Element, options?: dxTrackBarOptions); + } + export interface dxProgressBarOptions extends dxTrackBarOptions { + /** Specifies a format for the progress status. */ + statusFormat?: any; + /** Specifies whether or not the widget displays a progress status. */ + showStatus?: boolean; + /** A handler for the complete event. */ + onComplete?: Function; + } + /** A widget used to indicate progress. */ + export class dxProgressBar extends dxTrackBar { + constructor(element: JQuery, options?: dxProgressBarOptions); + constructor(element: Element, options?: dxProgressBarOptions); + } + export interface dxSliderOptions extends dxTrackBarOptions { + /** The slider step size. */ + step?: number; + /** The current slider value. */ + value?: number; + /** Specifies whether or not to highlight a range selected within the widget. */ + showRange?: boolean; + /** Specifies the size of a step by which a slider handle is moved when a user uses the Page up or Page down keyboard shortcuts. */ + keyStep?: number; + /** Specifies options for the slider tooltip. */ + tooltip?: { + /** Specifies whether or not the tooltip is enabled. */ + enabled?: boolean; + /** Specifies format for the tooltip. */ + format?: any; + /** Specifies whether the tooltip is located over or under the slider. */ + position?: string; + /** Specifies whether the widget always shows a tooltip or only when a pointer is over the slider. */ + showMode?: string; + }; + /** Specifies options for labels displayed at the min and max values. */ + label?: { + /** Specifies whether or not slider labels are visible. */ + visible?: boolean; + /** Specifies whether labels are located over or under the scale. */ + position?: string; + /** Specifies a format for labels. */ + format?: any; + }; + } + /** A widget that allows a user to select a numeric value within a given range. */ + export class dxSlider extends dxTrackBar { + constructor(element: JQuery, options?: dxSliderOptions); + constructor(element: Element, options?: dxSliderOptions); + } + export interface dxRangeSliderOptions extends dxSliderOptions { + /** The left edge of the interval currently selected using the range slider. */ + start?: number; + /** The right edge of the interval currently selected using the range slider. */ + end?: number; + } + /** A widget that enables a user to select a range of numeric values. */ + export class dxRangeSlider extends dxSlider { + constructor(element: JQuery, options?: dxRangeSliderOptions); + constructor(element: Element, options?: dxRangeSliderOptions); + } +} +interface JQuery { + dxProgressBar(): JQuery; + dxProgressBar(options: "instance"): DevExpress.ui.dxProgressBar; + dxProgressBar(options: string): any; + dxProgressBar(options: string, ...params: any[]): any; + dxProgressBar(options: DevExpress.ui.dxProgressBarOptions): JQuery; + dxSlider(): JQuery; + dxSlider(options: "instance"): DevExpress.ui.dxSlider; + dxSlider(options: string): any; + dxSlider(options: string, ...params: any[]): any; + dxSlider(options: DevExpress.ui.dxSliderOptions): JQuery; + dxRangeSlider(): JQuery; + dxRangeSlider(options: "instance"): DevExpress.ui.dxRangeSlider; + dxRangeSlider(options: string): any; + dxRangeSlider(options: string, ...params: any[]): any; + dxRangeSlider(options: DevExpress.ui.dxRangeSliderOptions): JQuery; + dxFileUploader(): JQuery; + dxFileUploader(options: "instance"): DevExpress.ui.dxFileUploader; + dxFileUploader(options: string): any; + dxFileUploader(options: string, ...params: any[]): any; + dxFileUploader(options: DevExpress.ui.dxFileUploaderOptions): JQuery; + dxValidator(): JQuery; + dxValidator(options: "instance"): DevExpress.ui.dxValidator; + dxValidator(options: string): any; + dxValidator(options: string, ...params: any[]): any; + dxValidator(options: DevExpress.ui.dxValidatorOptions): JQuery; + dxValidationGroup(): JQuery; + dxValidationGroup(options: "instance"): DevExpress.ui.dxValidationGroup; + dxValidationGroup(options: string): any; + dxValidationGroup(options: string, ...params: any[]): any; + dxValidationSummary(): JQuery; + dxValidationSummary(options: "instance"): DevExpress.ui.dxValidationSummary; + dxValidationSummary(options: string): any; + dxValidationSummary(options: string, ...params: any[]): any; + dxValidationSummary(options: DevExpress.ui.dxValidationSummaryOptions): JQuery; + dxTooltip(): JQuery; + dxTooltip(options: "instance"): DevExpress.ui.dxTooltip; + dxTooltip(options: string): any; + dxTooltip(options: string, ...params: any[]): any; + dxTooltip(options: DevExpress.ui.dxTooltipOptions): JQuery; + dxResizable(): JQuery; + dxResizable(options: "instance"): DevExpress.ui.dxResizable; + dxResizable(options: string): any; + dxResizable(options: string, ...params: any[]): any; + dxResizable(options: DevExpress.ui.dxResizableOptions): JQuery; + dxDropDownList(): JQuery; + dxDropDownList(options: "instance"): DevExpress.ui.dxDropDownList; + dxDropDownList(options: string): any; + dxDropDownList(options: string, ...params: any[]): any; + dxDropDownList(options: DevExpress.ui.dxDropDownListOptions): JQuery; + dxToolbar(): JQuery; + dxToolbar(options: "instance"): DevExpress.ui.dxToolbar; + dxToolbar(options: string): any; + dxToolbar(options: string, ...params: any[]): any; + dxToolbar(options: DevExpress.ui.dxToolbarOptions): JQuery; + dxToast(): JQuery; + dxToast(options: "instance"): DevExpress.ui.dxToast; + dxToast(options: string): any; + dxToast(options: string, ...params: any[]): any; + dxToast(options: DevExpress.ui.dxToastOptions): JQuery; + dxTextEditor(): JQuery; + dxTextEditor(options: "instance"): DevExpress.ui.dxTextEditor; + dxTextEditor(options: string): any; + dxTextEditor(options: string, ...params: any[]): any; + dxTextEditor(options: DevExpress.ui.dxTextEditorOptions): JQuery; + dxTextBox(): JQuery; + dxTextBox(options: "instance"): DevExpress.ui.dxTextBox; + dxTextBox(options: string): any; + dxTextBox(options: string, ...params: any[]): any; + dxTextBox(options: DevExpress.ui.dxTextBoxOptions): JQuery; + dxTextArea(): JQuery; + dxTextArea(options: "instance"): DevExpress.ui.dxTextArea; + dxTextArea(options: string): any; + dxTextArea(options: string, ...params: any[]): any; + dxTextArea(options: DevExpress.ui.dxTextAreaOptions): JQuery; + dxTabs(): JQuery; + dxTabs(options: "instance"): DevExpress.ui.dxTabs; + dxTabs(options: string): any; + dxTabs(options: string, ...params: any[]): any; + dxTabs(options: DevExpress.ui.dxTabsOptions): JQuery; + dxTabPanel(): JQuery; + dxTabPanel(options: "instance"): DevExpress.ui.dxTabPanel; + dxTabPanel(options: string): any; + dxTabPanel(options: string, ...params: any[]): any; + dxTabPanel(options: DevExpress.ui.dxTabPanelOptions): JQuery; + dxSelectBox(): JQuery; + dxSelectBox(options: "instance"): DevExpress.ui.dxSelectBox; + dxSelectBox(options: string): any; + dxSelectBox(options: string, ...params: any[]): any; + dxSelectBox(options: DevExpress.ui.dxSelectBoxOptions): JQuery; + dxScrollView(): JQuery; + dxScrollView(options: "instance"): DevExpress.ui.dxScrollView; + dxScrollView(options: string): any; + dxScrollView(options: string, ...params: any[]): any; + dxScrollView(options: DevExpress.ui.dxScrollViewOptions): JQuery; + dxScrollable(): JQuery; + dxScrollable(options: "instance"): DevExpress.ui.dxScrollable; + dxScrollable(options: string): any; + dxScrollable(options: string, ...params: any[]): any; + dxScrollable(options: DevExpress.ui.dxScrollableOptions): JQuery; + dxRadioGroup(): JQuery; + dxRadioGroup(options: "instance"): DevExpress.ui.dxRadioGroup; + dxRadioGroup(options: string): any; + dxRadioGroup(options: string, ...params: any[]): any; + dxRadioGroup(options: DevExpress.ui.dxRadioGroupOptions): JQuery; + dxPopup(): JQuery; + dxPopup(options: "instance"): DevExpress.ui.dxPopup; + dxPopup(options: string): any; + dxPopup(options: string, ...params: any[]): any; + dxPopup(options: DevExpress.ui.dxPopupOptions): JQuery; + dxPopover(): JQuery; + dxPopover(options: "instance"): DevExpress.ui.dxPopover; + dxPopover(options: string): any; + dxPopover(options: string, ...params: any[]): any; + dxPopover(options: DevExpress.ui.dxPopoverOptions): JQuery; + dxOverlay(): JQuery; + dxOverlay(options: "instance"): DevExpress.ui.dxOverlay; + dxOverlay(options: string): any; + dxOverlay(options: string, ...params: any[]): any; + dxOverlay(options: DevExpress.ui.dxOverlayOptions): JQuery; + dxNumberBox(): JQuery; + dxNumberBox(options: "instance"): DevExpress.ui.dxNumberBox; + dxNumberBox(options: string): any; + dxNumberBox(options: string, ...params: any[]): any; + dxNumberBox(options: DevExpress.ui.dxNumberBoxOptions): JQuery; + dxNavBar(): JQuery; + dxNavBar(options: "instance"): DevExpress.ui.dxNavBar; + dxNavBar(options: string): any; + dxNavBar(options: string, ...params: any[]): any; + dxNavBar(options: DevExpress.ui.dxNavBarOptions): JQuery; + dxMultiView(): JQuery; + dxMultiView(options: "instance"): DevExpress.ui.dxMultiView; + dxMultiView(options: string): any; + dxMultiView(options: string, ...params: any[]): any; + dxMultiView(options: DevExpress.ui.dxMultiViewOptions): JQuery; + dxMap(): JQuery; + dxMap(options: "instance"): DevExpress.ui.dxMap; + dxMap(options: string): any; + dxMap(options: string, ...params: any[]): any; + dxMap(options: DevExpress.ui.dxMapOptions): JQuery; + dxLookup(): JQuery; + dxLookup(options: "instance"): DevExpress.ui.dxLookup; + dxLookup(options: string): any; + dxLookup(options: string, ...params: any[]): any; + dxLookup(options: DevExpress.ui.dxLookupOptions): JQuery; + dxLoadPanel(): JQuery; + dxLoadPanel(options: "instance"): DevExpress.ui.dxLoadPanel; + dxLoadPanel(options: string): any; + dxLoadPanel(options: string, ...params: any[]): any; + dxLoadPanel(options: DevExpress.ui.dxLoadPanelOptions): JQuery; + dxLoadIndicator(): JQuery; + dxLoadIndicator(options: "instance"): DevExpress.ui.dxLoadIndicator; + dxLoadIndicator(options: string): any; + dxLoadIndicator(options: string, ...params: any[]): any; + dxLoadIndicator(options: DevExpress.ui.dxLoadIndicatorOptions): JQuery; + dxList(): JQuery; + dxList(options: "instance"): DevExpress.ui.dxList; + dxList(options: string): any; + dxList(options: string, ...params: any[]): any; + dxList(options: DevExpress.ui.dxListOptions): JQuery; + dxGallery(): JQuery; + dxGallery(options: "instance"): DevExpress.ui.dxGallery; + dxGallery(options: string): any; + dxGallery(options: string, ...params: any[]): any; + dxGallery(options: DevExpress.ui.dxGalleryOptions): JQuery; + dxDropDownEditor(): JQuery; + dxDropDownEditor(options: "instance"): DevExpress.ui.dxDropDownEditor; + dxDropDownEditor(options: string): any; + dxDropDownEditor(options: string, ...params: any[]): any; + dxDropDownEditor(options: DevExpress.ui.dxDropDownEditorOptions): JQuery; + dxDateBox(): JQuery; + dxDateBox(options: "instance"): DevExpress.ui.dxDateBox; + dxDateBox(options: string): any; + dxDateBox(options: string, ...params: any[]): any; + dxDateBox(options: DevExpress.ui.dxDateBoxOptions): JQuery; + dxCheckBox(): JQuery; + dxCheckBox(options: "instance"): DevExpress.ui.dxCheckBox; + dxCheckBox(options: string): any; + dxCheckBox(options: string, ...params: any[]): any; + dxCheckBox(options: DevExpress.ui.dxCheckBoxOptions): JQuery; + dxBox(): JQuery; + dxBox(options: "instance"): DevExpress.ui.dxBox; + dxBox(options: string): any; + dxBox(options: string, ...params: any[]): any; + dxBox(options: DevExpress.ui.dxBoxOptions): JQuery; + dxButton(): JQuery; + dxButton(options: "instance"): DevExpress.ui.dxButton; + dxButton(options: string): any; + dxButton(options: string, ...params: any[]): any; + dxButton(options: DevExpress.ui.dxButtonOptions): JQuery; + dxCalendar(): JQuery; + dxCalendar(options: "instance"): DevExpress.ui.dxCalendar; + dxCalendar(options: string): any; + dxCalendar(options: string, ...params: any[]): any; + dxCalendar(options: DevExpress.ui.dxCalendarOptions): JQuery; + dxAccordion(): JQuery; + dxAccordion(options: "instance"): DevExpress.ui.dxAccordion; + dxAccordion(options: string): any; + dxAccordion(options: string, ...params: any[]): any; + dxAccordion(options: DevExpress.ui.dxAccordionOptions): JQuery; + dxResponsiveBox(): JQuery; + dxResponsiveBox(options: "instance"): DevExpress.ui.dxResponsiveBox; + dxResponsiveBox(options: string): any; + dxResponsiveBox(options: string, ...params: any[]): any; + dxResponsiveBox(options: DevExpress.ui.dxResponsiveBoxOptions): JQuery; + dxAutocomplete(): JQuery; + dxAutocomplete(options: "instance"): DevExpress.ui.dxAutocomplete; + dxAutocomplete(options: string): any; + dxAutocomplete(options: string, ...params: any[]): any; + dxAutocomplete(options: DevExpress.ui.dxAutocompleteOptions): JQuery; +} + +declare module DevExpress.ui { + export interface dxTileViewOptions extends CollectionWidgetOptions { + /** A Boolean value specifying whether or not the widget changes its state when interacting with a user. */ + activeStateEnabled?: boolean; + /** Specifies the height of the base tile view item. */ + baseItemHeight?: number; + /** Specifies the width of the base tile view item. */ + baseItemWidth?: number; + /** Specifies the height of the widget. */ + height?: any; + /** Specifies the distance in pixels between adjacent tiles. */ + itemMargin?: number; + /** A Boolean value specifying whether or not to display a scrollbar. */ + showScrollbar?: boolean; + } + /** A widget displaying several blocks of data as tiles. */ + export class dxTileView extends CollectionWidget { + constructor(element: JQuery, options?: dxTileViewOptions); + constructor(element: Element, options?: dxTileViewOptions); + /** Returns the current scroll position of the widget content. */ + scrollPosition(): number; + } + export interface dxSwitchOptions extends EditorOptions { + /** Text displayed when the widget is in a disabled state. */ + offText?: string; + /** Text displayed when the widget is in an enabled state. */ + onText?: string; + /** A Boolean value specifying whether the current switch state is "On" or "Off". */ + value?: boolean; + } + /** A switch widget. */ + export class dxSwitch extends Editor { + constructor(element: JQuery, options?: dxSwitchOptions); + constructor(element: Element, options?: dxSwitchOptions); + } + export interface dxSlideOutViewOptions extends WidgetOptions { + /** Specifies whether or not the menu panel is visible. */ + menuVisible?: boolean; + /** Specifies whether or not the menu is shown when a user swipes the widget content. */ + swipeEnabled?: boolean; + /** A template to be used for rendering menu panel content. */ + menuTemplate?: any; + /** A template to be used for rendering widget content. */ + contentTemplate?: any; + } + /** The widget that allows you to slide-out the current view to reveal a custom menu. */ + export class dxSlideOutView extends Widget { + constructor(element: JQuery, options?: dxSlideOutViewOptions); + constructor(element: Element, options?: dxSlideOutViewOptions); + /** Returns an HTML element of the widget menu block. */ + menuContent(): JQuery; + /** Returns an HTML element of the widget content block. */ + content(): JQuery; + /** Displays the widget's menu block. */ + showMenu(): JQueryPromise; + /** Hides the widget's menu block. */ + hideMenu(): JQueryPromise; + /** Toggles the visibility of the widget's menu block. */ + toggleMenuVisibility(): JQueryPromise; + } + export interface dxSlideOutOptions extends CollectionWidgetOptions { + /** A Boolean value specifying whether or not the widget changes its state when interacting with a user. */ + activeStateEnabled?: boolean; + /** A Boolean value specifying whether or not to display a grouped menu. */ + menuGrouped?: boolean; + menuGroupRender?: any; + /** The name of the template used to display a group header. */ + menuGroupTemplate?: any; + menuItemRender?: any; + /** The template used to render menu items. */ + menuItemTemplate?: any; + /** A handler for the menuGroupRendered event. */ + onMenuGroupRendered?: Function; + /** A handler for the menuItemRendered event. */ + onMenuItemRendered?: Function; + /** Specifies whether or not the slide-out menu is displayed. */ + menuVisible?: boolean; + /** Indicates whether the menu can be shown/hidden by swiping the widget's main panel. */ + swipeEnabled?: boolean; + /** A template to be used for rendering widget content. */ + contentTemplate?: any; + } + /** The widget that allows you to slide-out the current view to reveal an item list. */ + export class dxSlideOut extends CollectionWidget { + constructor(element: JQuery, options?: dxSlideOutOptions); + constructor(element: Element, options?: dxSlideOutOptions); + /** Hides the widget's slide-out menu. */ + hideMenu(): JQueryPromise; + /** Displays the widget's slide-out menu. */ + showMenu(): JQueryPromise; + /** Toggles the visibility of the widget's slide-out menu. */ + toggleMenuVisibility(showing: boolean): JQueryPromise; + } + export interface dxPivotOptions extends CollectionWidgetOptions { + /** The index of the currently active pivot item. */ + selectedIndex?: number; + /** A Boolean value specifying whether or not to allow users to switch between items by swiping. */ + swipeEnabled?: boolean; + /** A template to be used for rendering widget content. */ + contentTemplate?: any; + /** The template to be used for rendering an item title. */ + itemTitleTemplate?: any; + } + /** A widget that is similar to a traditional tab control, but optimized for the phone with simplified end-user interaction. */ + export class dxPivot extends CollectionWidget { + constructor(element: JQuery, options?: dxPivotOptions); + constructor(element: Element, options?: dxPivotOptions); + } + export interface dxPanoramaOptions extends CollectionWidgetOptions { + /** An object exposing options for setting a background image for the panorama. */ + backgroundImage?: { + /** Specifies the height of the panorama's background image. */ + height?: number; + /** Specifies the URL of the image that is used as the panorama's background image. */ + url?: string; + /** Specifies the width of the panorama's background image. */ + width?: number; + }; + /** The index of the currently active panorama item. */ + selectedIndex?: number; + /** Specifies the widget content title. */ + title?: string; + } + /** A widget displaying the required content in a long horizontal canvas that extends beyond the frames of the screen. */ + export class dxPanorama extends CollectionWidget { + constructor(element: JQuery, options?: dxDropDownEditorOptions); + constructor(element: Element, options?: dxDropDownEditorOptions); + } + export interface dxDropDownMenuOptions extends WidgetOptions { + /** A handler for the buttonClick event. */ + onButtonClick?: any; + buttonClickAction?: any; + /** The name of the icon to be displayed by the DropDownMenu button. */ + buttonIcon?: string; + buttonIconSrc?: string; + /** The text displayed in the DropDownMenu button. */ + buttonText?: string; + /** A data source used to fetch data to be displayed by the widget. */ + dataSource?: any; + /** A handler for the itemClick event. */ + onItemClick?: any; + itemClickAction?: any; + itemRender?: any; + /** An array of items displayed by the widget. */ + items?: Array; + /** The template to be used for rendering items. */ + itemTemplate?: any; + /** Specifies whether or not to show the drop down menu within a dxPopover widget. */ + usePopover?: boolean; + /** The width of the menu popup in pixels. */ + popupWidth?: any; + /** The height of the menu popup in pixels. */ + popupHeight?: any; + /** Specifies whether or not the drop-down menu is displayed. */ + opened?: boolean; + /** A Boolean value specifying whether or not the widget changes its state when being hovered by an end user. */ + hoverStateEnabled?: boolean; + } + /** A drop-down menu widget. */ + export class dxDropDownMenu extends Widget { + constructor(element: JQuery, options?: dxDropDownEditorOptions); + constructor(element: Element, options?: dxDropDownEditorOptions); + /** This section lists the data source fields that are used in a default template for drop-down menu items. */ + /** Opens the drop-down menu. */ + open(): void; + /** Closes the drop-down menu. */ + close(): void; + } + export interface dxActionSheetOptions extends CollectionWidgetOptions { + cancelClickAction?: any; + /** A handler for the cancelClick event. */ + onCancelClick?: any; + /** The text displayed in the button that closes the action sheet. */ + cancelText?: string; + /** Specifies whether or not to display the Cancel button in action sheet. */ + showCancelButton?: boolean; + /** A Boolean value specifying whether or not the title of the action sheet is visible. */ + showTitle?: boolean; + /** Specifies the element the action sheet popover points at. */ + target?: any; + /** The title of the action sheet. */ + title?: string; + /** Specifies whether or not to show the action sheet within a dxPopover widget. */ + usePopover?: boolean; + /** A Boolean value specifying whether or not the dxActionSheet widget is visible. */ + visible?: boolean; + } + /** A widget consisting of a set of choices related to a certain task. */ + export class dxActionSheet extends CollectionWidget { + constructor(element: JQuery, options?: dxActionSheetOptions); + constructor(element: Element, options?: dxActionSheetOptions); + /** Hides the widget. */ + hide(): JQueryPromise; + /** Shows the widget. */ + show(): JQueryPromise; + /** Shows or hides the widget depending on the Boolean value passed as the parameter. */ + toggle(showing: boolean): JQueryPromise; + } +} +interface JQuery { + dxTileView(): JQuery; + dxTileView(options: "instance"): DevExpress.ui.dxTileView; + dxTileView(options: string): any; + dxTileView(options: string, ...params: any[]): any; + dxTileView(options: DevExpress.ui.dxTileViewOptions): JQuery; + dxSwitch(): JQuery; + dxSwitch(options: "instance"): DevExpress.ui.dxSwitch; + dxSwitch(options: string): any; + dxSwitch(options: string, ...params: any[]): any; + dxSwitch(options: DevExpress.ui.dxSwitchOptions): JQuery; + dxSlideOut(): JQuery; + dxSlideOut(options: "instance"): DevExpress.ui.dxSlideOut; + dxSlideOut(options: string): any; + dxSlideOut(options: string, ...params: any[]): any; + dxSlideOut(options: DevExpress.ui.dxSlideOutOptions): JQuery; + dxPivot(): JQuery; + dxPivot(options: "instance"): DevExpress.ui.dxPivot; + dxPivot(options: string): any; + dxPivot(options: string, ...params: any[]): any; + dxPivot(options: DevExpress.ui.dxPivotOptions): JQuery; + dxPanorama(): JQuery; + dxPanorama(options: "instance"): DevExpress.ui.dxPanorama; + dxPanorama(options: string): any; + dxPanorama(options: string, ...params: any[]): any; + dxPanorama(options: DevExpress.ui.dxPanoramaOptions): JQuery; + dxActionSheet(): JQuery; + dxActionSheet(options: "instance"): DevExpress.ui.dxActionSheet; + dxActionSheet(options: string): any; + dxActionSheet(options: string, ...params: any[]): any; + dxActionSheet(options: DevExpress.ui.dxActionSheetOptions): JQuery; + dxDropDownMenu(): JQuery; + dxDropDownMenu(options: "instance"): DevExpress.ui.dxDropDownMenu; + dxDropDownMenu(options: string): any; + dxDropDownMenu(options: string, ...params: any[]): any; + dxDropDownMenu(options: DevExpress.ui.dxDropDownMenuOptions): JQuery; +} +declare module DevExpress.data { + export interface XmlaStoreOptions { + /** The HTTP address to an XMLA OLAP server. */ + url?: string; + /** The name of the database associated with the Store. */ + catalog?: string; + /** The cube name. */ + cube?: string; + beforeSend?: (request: Object) => void; + } + /** A Store that provides access to an OLAP cube using the XMLA standard. */ + export class XmlaStore { + constructor(options: XmlaStoreOptions); + } + export interface PivotGridField { + index?: number; + /** A boolean value specifying whether or not the field is visible in the pivot grid and the Field Chooser. */ + visible?: boolean; + /** Name of the data source field containing data for the pivot grid field. */ + dataField?: string; + /** A caption that will be displayed in the pivot grid's field chooser to identify the field. */ + caption?: string; + /** Specifies a type of field values. */ + dataType?: string; + /** Specifies how the values of the current field are combined into groups. Cannot be used for the XmlaStore store type. */ + groupInterval?: any; + /** Specifies how to aggregate field data. Cannot be used for th XmlaStore store type. */ + summaryType?: string; + /** Allows you to use a custom aggregate function to calculate the summary values. Cannot be used for the XmlaStore store type. */ + calculateCustomSummary?: (options: { + summaryProcess?: string; + value?: any; + totalValue?: any; + }) => void; + /** Specifies the function that determines how to split data from the data source into ranges for header items. Cannot be used for the XmlaStore store type. */ + selector?: (data: Object) => any; + /** Type of the area where the field is located. */ + area?: string; + /** Index among the other fields displayed within the same area. */ + areaIndex?: number; + /** The name of the folder in which the field is located. */ + displayFolder?: string; + /** The name of the group to which the field belongs. */ + groupName?: string; + /** The index of the field within a group. */ + groupIndex?: number; + /** Specifies the initial sort order of field values. */ + sortOrder?: string; + /** Specifies how field data should be sorted. Can be used for the XmlaStore store type only. */ + sortBy?: string; + /** Specifies the data field against which the header items of this field should be sorted. */ + sortBySummaryField?: string; + /** The array of field names that specify a path to column/row whose summary field is used for sorting of this field's header items. */ + sortBySummaryPath?: Array; + /** The filter values for the current field. */ + filterValues?: Array; + /** The filter type for the current field. */ + filterType?: string; + /** Indicates whether all header items of the field's header level are expanded. */ + expanded?: boolean; + /** Specifies whether the field should be treated as a Data Field. */ + isMeasure?: boolean; + /** Specifies a display format for field values. */ + format?: string; + /** Specifies a callback function that returns the text to be displayed in the cells of a field. */ + customizeText?: (cellInfo: { value: any; valueText: string }) => string; + /** Specifies a precision for formatted field values. */ + precision?: number; + /** Specifies how to sort the header items. */ + sortingMethod?: (a: Object, b: Object) => number; + /** Allows an end-user to change sorting options. */ + allowSorting?: boolean; + /** Allows an end-user to sort columns by summary values. */ + allowSortingBySummary?: boolean; + /** Allows an end-user to change filtering options. */ + allowFiltering?: boolean; + /** Allows an end-user to expand/collapse all header items within a header level. */ + allowExpandAll?: boolean; + /** Specifies the absolute width of the field in the pivot grid. */ + width?: number; + } + export interface PivotGridDataSourceOptions { + /** Specifies the underlying Store instance used to access data. */ + store?: any; + /** Indicates whether or not the automatic field generation from data in the Store is enabled. */ + retrieveFields?: boolean; + /** Specifies data filtering conditions. */ + filter?: Object; + /** An array of pivot grid fields. */ + fields?: Array; + /** Indicates whether or not the local sorting of the XMLA data should be performed. */ + localSorting?: boolean; + /** A handler for the changed event. */ + onChanged?: () => void; + /** A handler for the loadingChanged event. */ + onLoadingChanged?: (isLoading: boolean) => void; + /** A handler for the loadError event. */ + onLoadError?: (e?: Object) => void; + /** A handler for the fieldsPrepared event. */ + onFieldsPrepared?: (e?: Array) => void; + } + /** An object that provides access to data for the dxPivotGrid widget. */ + export class PivotGridDataSource implements EventsMixin { + constructor(options?: PivotGridDataSource); + /** Starts loading data. */ + load(): JQueryPromise; + /** Indicates whether or not the PivotGridDataSource is currently being loaded. */ + isLoading(): boolean; + /** Gets data displayed in a PivotGrid. */ + getData(): Object; + /** Gets all fields within a specified area. */ + getAreaFields(area: string, collectGroups: boolean): Array; + /** Gets all fields from the data source. */ + fields(): Array; + /** Sets the fields option. */ + fields(fields: Array): void; + /** Gets current options of a specified field. */ + field(id: any): PivotGridField; + /** Sets one or more options of a specified field. */ + field(id: any, field: PivotGridField): void; + /** Collapses a specified header item. */ + collapseHeaderItem(area: string, path: Array): void; + /** Expands a specified header item. */ + expandHeaderItem(area: string, path: Array): void; + /** Expands all header items of a field. */ + expandAll(id: any): void; + /** Collapses all header items of a field. */ + collapseAll(id: any): void; + /** Disposes of all resources associated with this PivotGridDataSource. */ + dispose(): void; + on(eventName: string, eventHandler: Function): PivotGridDataSource; + on(events: { [eventName: string]: Function; }): PivotGridDataSource; + off(eventName: string): PivotGridDataSource; + off(eventName: string, eventHandler: Function): PivotGridDataSource; + } +} +declare module DevExpress.ui { + export interface dxSchedulerOptions extends WidgetOptions { + /** Specifies a date displayed on the current scheduler view by default. */ + currentDate?: Date; + /** The earliest date the widget allows you to select. */ + min?: Date; + /** The latest date the widget allows you to select. */ + max?: Date; + /** Specifies the view used in the scheduler by default. */ + currentView?: string; + /** A data source used to fetch data to be displayed by the widget. */ + dataSource?: any; + /** Specifies the first day of a week. */ + firstDayOfWeek?: number; + /** The template to be used for rendering appointments. */ + appointmentTemplate?: any; + /** Lists the views to be available within the scheduler's View Selector. */ + views?: Array; + /** Specifies the resource kinds by which the scheduler's appointments are grouped in a timetable. */ + groups?: Array; + /** Specifies a start hour in the scheduler view's time interval. */ + startDayHour?: number; + /** Specifies an end hour in the scheduler view's time interval. */ + endDayHour?: number; + /** Specifies whether the scheduler data can be edited at runtime. */ + editing?: boolean; + /** Specifies an array of resources available in the scheduler. */ + resources?: Array<{ + /** Indicates whether or not several resources of this kind can be assigned to an appointment. */ + allowMultiple?: boolean; + /** Indicates whether or not resources of this kind have priority in the color identification of the appointments that have resources of different kinds assigned. */ + mainColor?: boolean; + /** A data source used to fetch resources to be available in the scheduler. */ + dataSource?: any; + /** Specifies the resource object field whose value is displayed by the Resource editor in the Appointment popup window. */ + displayExpr?: any; + /** Specifies the resource object field that is used as a value of the Resource editor in the Appointment popup window. */ + valueExpr?: any; + /** The name of the appointment object field that specifies a resource of this kind. */ + field?: string; + /** Specifies the label of the Appointment popup window field that allows end users to assign a resource of this kind. */ + label?: string; + }>; + /** A handler for the AppointmentAdding event. */ + onAppointmentAdding?: Function; + /** A handler for the appointmentAdded event. */ + onAppointmentAdded?: Function; + /** A handler for the AppointmentUpdating event. */ + onAppointmentUpdating?: Function; + /** A handler for the appointmentUpdated event. */ + onAppointmentUpdated?: Function; + /** A handler for the AppointmentDeleting event. */ + onAppointmentDeleting?: Function; + /** A handler for the appointmentDeleted event. */ + onAppointmentDeleted?: Function; + /** A handler for the appointmentRendered event. */ + onAppointmentRendered?: Function; + } + /** A widget that displays scheduled data using different views and provides the capability to load, add and edit appointments. */ + export class dxScheduler extends Widget { + constructor(element: JQuery, options?: dxSchedulerOptions); + constructor(element: Element, options?: dxSchedulerOptions); + /** Add the appointment defined by the object passed as a parameter to the data associated with the widget. */ + addAppointment(appointment: Object): void; + /** Updates the appointment specified by the first method parameter by the appointment object specified by the second method parameter in the the data associated with the widget. */ + updateAppointment(target: Object, appointment: Object): void; + /** Deletes the appointment defined by the parameter from the the data associated with the widget. */ + deleteAppointment(appointment: Object): void; + /** Scrolls the scheduler work space to the specified time. */ + scrollToTime(hours: number, minutes: number): void; + } + export interface dxColorBoxOptions extends dxDropDownEditorOptions { + /** Specifies the text displayed on the button that applies changes and closes the drop-down editor. */ + applyButtonText?: string; + applyValueMode?: string; + /** Specifies the text displayed on the button that cancels changes and closes the drop-down editor. */ + cancelButtonText?: string; + /** Specifies whether or not the widget value includes the alpha channel component. */ + editAlphaChannel?: boolean; + /** Specifies the size of a step by which a handle is moved using a keyboard shortcut. */ + keyStep?: number; + } + /** A widget used to specify a color value. */ + export class dxColorBox extends dxDropDownEditor { + constructor(element: JQuery, options?: dxColorBoxOptions); + constructor(element: Element, options?: dxColorBoxOptions); + } + export interface dxColorPickerOptions extends dxColorBoxOptions { } + /** + * A widget used to specify a color value. + * @deprecated Use the dxColorBox widget instead + */ + export class dxColorPicker extends dxColorBox { + constructor(element: JQuery, options?: dxColorPickerOptions); + constructor(element: Element, options?: dxColorPickerOptions); + } + export interface dxTreeViewOptions extends CollectionWidgetOptions { + /** Specifies whether or not to animate item collapsing and expanding. */ + animationEnabled?: boolean; + /** Specifies whether a nested or plain array is used as a data source. */ + dataStructure?: string; + /** Specifies whether or not a user can expand all tree view items by the "*" hot key. */ + expandAllEnabled?: boolean; + /** + * An array of currently expanded item objects. + * @deprecated Use item.expanded field instead + */ + expandedItems?: Array; + /** Specifies whether or not a check box is displayed at each tree view item. */ + showCheckBoxes?: boolean; + /** Specifies whether or not to select nodes recursively. */ + selectNodesRecursive?: boolean; + /** Specifies whether the "Select All" check box is displayed over the tree view. */ + selectAllEnabled?: boolean; + /** Specifies the text displayed at the "Select All" check box. */ + selectAllText?: string; + /** Specifies the name of the data source item field used as a key. */ + keyExpr?: any; + /** Specifies the name of the data source item field whose value is displayed by the widget. */ + displayExpr?: any; + /** Specifies the name of the data source item field whose value defines whether or not the corresponding node is selected. */ + selectedExpr?: any; + /** Specifies the name of the data source item field whose value defines whether or not the corresponding node is expanded. */ + expandedExpr?: any; + /** Specifies the name of the data source item field that contains an array of nested items. */ + itemsExpr?: any; + /** Specifies the name of the data source item field that holds the key of the parent item. */ + parentIdExpr?: any; + /** Specifies the name of the data source item field whose value defines whether or not the corresponding node is disabled. */ + disabledExpr?: any; + /** Specifies the name of the data source item field whose value defines whether or not the corresponding node includes child nodes. */ + hasItemsExpr?: any; + /** Specifies if the virtual mode is enabled. */ + virtualModeEnabled?: boolean; + /** Specifies the parent ID value of the root item. */ + rootValue?: any; + /** A string value specifying available scrolling directions. */ + scrollDirection?: string; + /** A handler for the itemSelected event. */ + onItemSelected?: Function; + /** A handler for the itemExpanded event. */ + onItemExpanded?: Function; + /** A handler for the itemCollapsed event. */ + onItemCollapsed?: Function; + onItemClick?: Function; + onItemContextMenu?: Function; + onItemRendered?: Function; + onItemHold?: Function; + hoverStateEnabled?: boolean; + focusStateEnabled?: boolean; + } + /** A widget displaying specified data items as a tree. */ + export class dxTreeView extends CollectionWidget { + constructor(element: JQuery, options?: dxTreeViewOptions); + constructor(element: Element, options?: dxTreeViewOptions); + /** Updates the tree view scrollbars according to the current size of the widget content. */ + updateDimensions(): JQueryPromise; + /** Selects the specified item. */ + selectItem(itemElement: any): void; + /** Unselects the specified item. */ + unselectItem(itemElement: any): void; + /** Expands the specified item. */ + expandItem(itemElement: any): void; + /** Collapses the specified item. */ + collapseItem(itemElement: any): void; + /** Returns all nodes of the tree view. */ + getNodes(): Array; + /** Selects all widget items. */ + selectAll(): void; + /** Unselects all widget items. */ + unselectAll(): void; + } + export interface dxMenuBaseOptions extends CollectionWidgetOptions { + /** An object that defines the animation options of the widget. */ + animation?: fx.AnimationOptions; + /** A Boolean value specifying whether or not the widget changes its state when interacting with a user. */ + activeStateEnabled?: boolean; + /** Specifies the name of the CSS class associated with the menu. */ + cssClass?: string; + /** Holds an array of menu items. */ + items?: Array; + /** Specifies whether or not an item becomes selected if an end-user clicks it. */ + selectionByClick?: boolean; + /** Specifies the selection mode supported by the menu. */ + selectionMode?: string; + /** Specifies options of submenu showing and hiding. */ + showSubmenuMode?: { + /** Specifies the mode name. */ + name?: string; + /** Specifies the delay of submenu show and hiding. */ + delay?: { + /** The time span after which the submenu is shown. */ + show?: number; + /** The time span after which the submenu is hidden. */ + hide?: number; + }; + }; + /** A Boolean value specifying whether or not the widget changes its state when being hovered by an end user. */ + hoverStateEnabled?: boolean; + } + export class dxMenuBase extends CollectionWidget { + constructor(element: JQuery, options?: dxMenuBaseOptions); + constructor(element: Element, options?: dxMenuBaseOptions); + /** Selects the specified item. */ + selectItem(itemElement: any): void; + /** Unselects the specified item. */ + unselectItem(itemElement: any): void; + } + export interface dxMenuOptions extends dxMenuBaseOptions { + /** Specifies whether or not the submenu is hidden when the mouse pointer leaves it. */ + hideSubmenuOnMouseLeave?: boolean; + /** Specifies whether the menu has horizontal or vertical orientation. */ + orientation?: string; + /** Specifies options for showing and hiding the first level submenu. */ + showFirstSubmenuMode?: { + /** Specifies the mode name. */ + name?: string; + /** Specifies the delay of submenu showing and hiding. */ + delay?: { + /** The time span after which the submenu is shown. */ + show?: number; + /** The time span after which the submenu is hidden. */ + hide?: number; + }; + }; + /** Specifies the direction at which the submenus are displayed. */ + submenuDirection?: string; + /** A handler for the submenuHidden event. */ + onSubmenuHidden?: Function; + submenuHiddenAction?: Function; + /** A handler for the submenuHiding event. */ + onSubmenuHiding?: Function; + submenuHidingAction?: Function; + /** A handler for the submenuShowing event. */ + onSubmenuShowing?: Function; + submenuShowingAction?: Function; + /** A handler for the submenuShown event. */ + onSubmenuShown?: Function; + submenuShownAction?: Function; + } + /** A menu widget. */ + export class dxMenu extends dxMenuBase { + constructor(element: JQuery, options?: dxMenuOptions); + constructor(element: Element, options?: dxMenuOptions); + } + export interface dxContextMenuOptions extends dxMenuBaseOptions { + /** Holds an object that specifies options of alternative menu invocation. */ + alternativeInvocationMode?: { + /** Specifies whether or not the standard context menu invocation (on a right mouse click or on a long tap) is disabled. */ + enabled?: Boolean; + /** Specifies the element used to invoke the context menu. */ + invokingElement?: any; + }; + /** A handler for the hidden event. */ + onHidden?: Function; + /** A handler for the hiding event. */ + onHiding?: Function; + /** A handler for the positioning event. */ + onPositioning?: Function; + /** A handler for the showing event. */ + onShowing?: Function; + /** A handler for the shown event. */ + onShown?: Function; + /** An object defining widget positioning options. */ + position?: PositionOptions; + /** Specifies the direction at which submenus are displayed. */ + submenuDirection?: string; + /** The target element associated with a popover. */ + target?: any; + /** A Boolean value specifying whether or not the widget is visible. */ + visible?: boolean; + } + /** A context menu widget. */ + export class dxContextMenu extends dxMenuBase { + constructor(element: JQuery, options?: dxContextMenuOptions); + constructor(element: Element, options?: dxContextMenuOptions); + /** Toggles the visibility of the widget. */ + toggle(showing: boolean): JQueryPromise; + /** Shows the widget. */ + show(): JQueryPromise; + /** Hides the widget. */ + hide(): JQueryPromise; + } + export interface dxRemoteOperations { + /** Specifies whether or not filtering must be performed on the server side. */ + filtering?: boolean; + /** Specifies whether or not paging must be performed on the server side. */ + paging?: boolean; + /** Specifies whether or not sorting must be performed on the server side. */ + sorting?: boolean; + } + export interface dxDataGridColumn { + /** Specifies the content alignment within column cells. */ + alignment?: string; + /** Specifies whether the values in a column can be edited at runtime. Setting this option makes sense only when editing is enabled for a grid. */ + allowEditing?: boolean; + /** Specifies whether or not a column can be used for filtering grid records. Setting this option makes sense only when the filter row and column header filtering are visible. */ + allowFiltering?: boolean; + /** Specifies whether or not the column can be anchored to a grid edge by end users. Setting this option makes sense only when the columnFixing | enabled option is set to true. */ + allowFixing?: boolean; + /** Specifies if a column can be used for searching grid records. Setting this option makes sense only when the search panel is visible. */ + allowSearch?: boolean; + /** Specifies whether a column can be used for grouping grid records at runtime. Setting this option makes sense only when the group panel is visible. */ + allowGrouping?: boolean; + /** Specifies whether or not a column can be hidden by a user. Setting this option makes sense only when the column chooser is visible. */ + allowHiding?: boolean; + /** Specifies whether or not a particular column can be used in column reordering. Setting this option makes sense only when the allowColumnReordering option is set to true. */ + allowReordering?: boolean; + /** Specifies whether or not a particular column can be resized by a user. Setting this option makes sense only when the allowColumnResizing option is true. */ + allowResizing?: boolean; + /** Specifies whether grid records can be sorted by a specific column at runtime. Setting this option makes sense only when the sorting mode differs from none. */ + allowSorting?: boolean; + /** Specifies whether groups appear expanded or not when records are grouped by a specific column. Setting this option makes sense only when grouping is allowed for this column. */ + autoExpandGroup?: boolean; + /** Specifies a callback function that returns a value to be displayed in a column cell. */ + calculateCellValue?: (rowData: Object) => string; + /** Specifies a callback function that defines filters for customary calculated grid cells. */ + calculateFilterExpression?: (filterValue: any, selectedFilterOperation: string) => Array; + /** Specifies a caption for a column. */ + caption?: string; + /** Specifies a custom template for grid column cells. */ + cellTemplate?: any; + /** Specifies a CSS class to be applied to a column. */ + cssClass?: string; + /** Specifies a field name or a function that returns a field name or a value to be used for grouping column cells. */ + calculateGroupValue?: any; + /** Specifies a field name or a function that returns a field name or a value to be used for sorting column cells. */ + calculateSortValue?: any; + /** Specifies a callback function that returns the text to be displayed in the cells of a column. */ + customizeText?: (cellInfo: { value: any; valueText: string }) => string; + /** Specifies the field of a data source that provides data for a column. */ + dataField?: string; + /** Specifies the required type of column values. */ + dataType?: string; + /** Specifies a custom template for the cell of a grid column when it is in an editing state. */ + editCellTemplate?: any; + /** Specifies whether HTML tags are displayed as plain text or applied to the values of the column. */ + encodeHtml?: boolean; + /** In a boolean column, replaces all false items with a specified text. */ + falseText?: string; + /** Specifies the set of available filter operations. */ + filterOperations?: Array; + /** Specifies a filter value for a column. */ + filterValue?: any; + /** Specifies initial filter values for the column's header filter. */ + filterValues?: Array; + /** Specifies whether to include or exclude the records with the values selected in the column's header filter. */ + filterType?: string; + /** Indicates whether the column takes part in horizontal grid scrolling or is anchored to a grid edge. */ + fixed?: boolean; + /** Specifies the grid edge to which the column is anchored. */ + fixedPosition?: string; + /** Specifies a format for the values displayed in a column. */ + format?: string; + /** Specifies a custom template for the group cell of a grid column. */ + groupCellTemplate?: any; + /** Specifies the index of a column when grid records are grouped by the values of this column. */ + groupIndex?: number; + /** Specifies a custom template for the header of a grid column. */ + headerCellTemplate?: any; + /** Specifies options of a lookup column. */ + lookup?: { + /** Specifies whether or not a user can nullify values of a lookup column. */ + allowClearing?: boolean; + /** Specifies the data source providing data for a lookup column. */ + dataSource?: any; + /** Specifies the expression defining the data source field whose values must be displayed. */ + displayExpr?: any; + /** Specifies the expression defining the data source field whose values must be replaced. */ + valueExpr?: string; + }; + /** Specifies a precision for formatted values displayed in a column. */ + precision?: number; + /** Specifies a filter operation applied to a column. */ + selectedFilterOperation?: string; + /** Specifies whether or not the column displays its values by using editors. */ + showEditorAlways?: boolean; + /** Specifies whether or not to display the column when grid records are grouped by it. */ + showWhenGrouped?: boolean; + /** Specifies the index of a column when grid records are sorted by the values of this column. */ + sortIndex?: number; + /** Specifies the initial sort order of column values. */ + sortOrder?: string; + /** In a boolean column, replaces all true items with a specified text. */ + trueText?: string; + /** Specifies whether a column is visible or not. */ + visible?: boolean; + /** Specifies the sequence number of the column in the grid. */ + visibleIndex?: number; + /** Specifies a column width in pixels or percentages. */ + width?: any; + /** Specifies an array of validation rules to be checked when updating column cell values. */ + validationRules?: Array; + /** Specifies whether or not to display the header of a hidden column in the column chooser. */ + 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. */ + showBorders?: boolean; + /** Indicates whether to show the error row for the grid. */ + errorRowEnabled?: boolean; + /** A handler for the rowValidating event. */ + onRowValidating?: (e: Object) => void; + /** A handler for the contextMenuPreparing event. */ + onContextMenuPreparing?: (e: Object) => void; + initNewRow?: (e: { data: Object }) => void; + /** A handler for the initNewRow event. */ + onInitNewRow?: (e: { data: Object }) => void; + rowInserted?: (e: { data: Object; key: any }) => void; + /** A handler for the rowInserted event. */ + onRowInserted?: (e: { data: Object; key: any }) => void; + rowInserting?: (e: { data: Object; cancel: boolean }) => void; + /** A handler for the rowInserting event. */ + onRowInserting?: (e: { data: Object; cancel: boolean }) => void; + rowRemoved?: (e: { data: Object; key: any }) => void; + /** A handler for the rowRemoved event. */ + onRowRemoved?: (e: { data: Object; key: any }) => void; + rowRemoving?: (e: { data: Object; key: any; cancel: boolean }) => void; + /** A handler for the rowRemoving event. */ + onRowRemoving?: (e: { data: Object; key: any; cancel: boolean }) => void; + rowUpdated?: (e: { data: Object; key: any }) => void; + /** A handler for the rowUpdated event. */ + onRowUpdated?: (e: { data: Object; key: any }) => void; + rowUpdating?: (e: { oldData: Object; newData: Object; key: any; cancel: boolean }) => void; + /** A handler for the rowUpdating event. */ + onRowUpdating?: (e: { oldData: Object; newData: Object; key: any; cancel: boolean }) => void; + /** Enables a hint that appears when a user hovers the mouse pointer over a cell with truncated content. */ + cellHintEnabled?: boolean; + /** Specifies whether or not grid columns can be reordered by a user. */ + allowColumnReordering?: boolean; + /** Specifies whether or not grid columns can be resized by a user. */ + allowColumnResizing?: boolean; + cellClick?: any; + /** A handler for the cellClick event. */ + onCellClick?: any; + cellHoverChanged?: (e: Object) => void; + /** A handler for the cellHoverChanged event. */ + onCellHoverChanged?: (e: Object) => void; + cellPrepared?: (e: Object) => void; + /** A handler for the cellPrepared event. */ + onCellPrepared?: (e: Object) => void; + /** Specifies whether or not the width of grid columns depends on column content. */ + columnAutoWidth?: boolean; + /** Specifies the options of a column chooser. */ + columnChooser?: { + /** Specifies text displayed by the column chooser panel when it does not contain any columns. */ + emptyPanelText?: string; + /** Specifies whether a user can invoke the column chooser or not. */ + enabled?: boolean; + /** Specifies the height of the column chooser panel. */ + height?: number; + /** Specifies text displayed in the title of the column chooser panel. */ + title?: string; + /** Specifies the width of the column chooser panel. */ + width?: number; + }; + /** Specifies options for column fixing. */ + columnFixing?: { + /** Indicates if column fixing is enabled. */ + enabled?: boolean; + /** Contains options that specify texts for column-fixing related commands in the column header's context menu. */ + texts?: { + /** Specifies text for a context menu item that fixes the column for which the context menu is invoked. */ + fix?: string; + /** Specifies text for a context menu item that unfixes the column for which the context menu is invoked. */ + unfix?: string; + /** Specifies text for a context menu subitem that fixes a column, for which the context menu is invoked, to the left grid edge. */ + leftPosition?: string; + /** Specifies text for a context menu subitem that fixes a column, for which the context menu is invoked, to the right grid edge. */ + rightPosition?: string; + }; + }; + /** Specifies options for filtering using a column header filter. */ + headerFilter?: { + /** Indicates whether or not the column header filter button is visible. */ + visible?: boolean; + /** Specifies the height of the dropdown menu invoked when using a column header filter. */ + height?: number; + /** Specifies the width of the dropdown menu invoked when using a column header filter. */ + width?: number; + /** Contains options that specify texts for the dropdown menu invoked when you use a column header filter. */ + texts?: { + /** Specifies text for the item specifying an empty value in the column header filter's dropdown menu. */ + emptyValue?: string; + /** Specifies text for a button that closes the column header filter's dropdown menu and applies specified filtering. */ + ok?: string; + /** Specifies text for a button that closes the column header filter's dropdown menu without applying performed selection. */ + cancel?: string; + } + }; + /** An array of grid columns. */ + columns?: Array; + onContentReady?: Function; + contentReadyAction?: Function; + /** Specifies a function that customizes grid columns after they are created. */ + customizeColumns?: (columns: Array) => void; + dataErrorOccurred?: (errorObject: Error) => void; + /** Specifies a data source for the grid. */ + dataSource?: any; + editingStart?: (e: { + data: Object; + key: any; + cancel: boolean; + column: dxDataGridColumn + }) => void; + /** A handler for the editingStart event. */ + onEditingStart?: (e: { + data: Object; + key: any; + cancel: boolean; + column: dxDataGridColumn + }) => void; + editorPrepared?: (e: Object) => void; + /** A handler for the editorPrepared event. */ + onEditorPrepared?: (e: Object) => void; + editorPreparing?: (e: Object) => void; + /** A handler for the editorPreparing event. */ + onEditorPreparing?: (e: Object) => void; + /** Contains options that specify how grid content can be changed. */ + editing?: { + /** Specifies whether or not grid records can be edited at runtime. */ + editEnabled?: boolean; + /** Specifies how grid values can be edited manually. */ + editMode?: string; + /** Specifies whether or not new records can be inserted into a grid. */ + insertEnabled?: boolean; + /** Specifies whether or not records can be deleted from a grid. */ + removeEnabled?: boolean; + /** Contains options that specify texts for editing-related grid controls. */ + texts?: { + /** Specifies text for a hint that appears when a user hovers the mouse pointer over the "Save" button. Setting this option makes sense only when the editMode option is set to batch. */ + saveAllChanges?: string; + /** Specifies text for a cancel button displayed when a row is in the editing state. Setting this option makes sense only when the editEnabled option is set to true. */ + cancelRowChanges?: string; + /** Specifies text for a hint that appears when a user hovers the mouse pointer over the "Revert" button. Setting this option makes sense only when the editMode option is set to batch. */ + cancelAllChanges?: string; + /** Specifies a message to be displayed by a confirmation window. Setting this option makes sense only when the edit mode is "row". */ + confirmDeleteMessage?: string; + /** Specifies text to be displayed in the title of a confirmation window. Setting this option makes sense only when the edit mode is "row". */ + confirmDeleteTitle?: string; + /** Specifies text for a button that deletes a row from a grid. Setting this option makes sense only when the removeEnabled option is set to true. */ + deleteRow?: string; + /** Specifies text for a hint that appears when a user hovers the mouse pointer over the "Add" button. Setting this option makes sense only when the insertEnabled option is true. */ + addRow?: string; + /** Specifies text for a button that turns a row into the editing state. Setting this option makes sense only when the editEnabled option is set to true. */ + editRow?: string; + /** Specifies text for a save button displayed when a row is in the editing state. Setting this option makes sense only when the editEnabled option is set to true. */ + saveRowChanges?: string; + /** Specifies text for a button that recovers a deleted row. Setting this option makes sense only if the grid uses the batch edit mode and the removeEnabled option is set to true. */ + undeleteRow?: string; + }; + }; + /** Specifies filter row options. */ + filterRow?: { + /** Specifies when to apply a filter. */ + applyFilter?: string; + /** Specifies text for the hint that pops up when a user hovers the mouse pointer over the "Apply Filter" button. */ + applyFilterText?: string; + /** Specifies descriptions for filter operations. */ + operationDescriptions?: { + "=": string; + "<>": string; + "<": string; + "<=": string; + ">": string; + ">=": string; + "startswith": string; + "contains": string; + "notcontains": string; + "endswith": string; + }; + /** Specifies text for the reset operation in a filter list. */ + resetOperationText?: string; + /** Specifies text for the operation of clearing the applied filter when a select box is used. */ + showAllText?: string; + /** Specifies whether or not an icon that allows the user to choose a filter operation is visible. */ + showOperationChooser?: boolean; + /** Specifies whether the filter row is visible or not. */ + visible?: boolean; + }; + /** Specifies the behavior of grouped grid records. */ + grouping?: { + /** Specifies whether the user can collapse grouped records in a grid or not. */ + allowCollapsing?: boolean; + /** Specifies whether groups appear expanded or not. */ + autoExpandAll?: boolean; + /** Specifies the message displayed in a group row when the corresponding group is continued from the previous page. */ + groupContinuedMessage?: string; + /** Specifies the message displayed in a group row when the corresponding group continues on the next page. */ + groupContinuesMessage?: string; + }; + /** Specifies options that configure the group panel. */ + groupPanel?: { + /** Specifies whether columns can be dragged onto or from the group panel. */ + allowColumnDragging?: boolean; + /** Specifies text displayed by the group panel when it does not contain any columns. */ + emptyPanelText?: string; + /** Specifies whether the group panel is visible or not. */ + visible?: boolean; + }; + /** Specifies options configuring the load panel. */ + loadPanel?: { + /** Specifies whether to show the load panel or not. */ + enabled?: boolean; + /** Specifies the height of the load panel in pixels. */ + height?: number; + /** Specifies a URL pointing to an image to be used as a loading indicator. */ + indicatorSrc?: string; + /** Specifies whether or not a loading indicator must be displayed on the load panel. */ + showIndicator?: boolean; + /** Specifies whether or not the pane of the load panel must be displayed. */ + showPane?: boolean; + /** Specifies text displayed by the load panel. */ + text?: string; + /** Specifies the width of the load panel in pixels. */ + width?: number; + }; + /** Specifies text displayed when a grid does not contain any records. */ + noDataText?: string; + /** Specifies the options of a grid pager. */ + pager?: { + /** Specifies the page sizes that can be selected at runtime. */ + allowedPageSizes?: any; + /** Specifies whether to show the page size selector or not. */ + showPageSizeSelector?: boolean; + /** Specifies whether to show the pager or not. */ + visible?: any; + /** Specifies the text accompanying the page navigator. */ + infoText?: string; + /** Specifies whether or not to display the text accompanying the page navigator. This text is specified by the infoText option. */ + showInfo?: boolean; + /** Specifies whether or not to display buttons that switch the grid to the previous or next page. */ + showNavigationButtons?: boolean; + }; + /** Specifies paging options. */ + paging?: { + /** Specifies whether dxDataGrid loads data page by page or all at once. */ + enabled?: boolean; + /** Specifies the grid page that should be displayed by default. */ + pageIndex?: number; + /** Specifies the size of grid pages. */ + pageSize?: number; + }; + /** Specifies whether or not grid rows must be shaded in a different way. */ + rowAlternationEnabled?: boolean; + rowClick?: any; + /** A handler for the rowClick event. */ + onRowClick?: any; + rowPrepared?: (e: Object) => void; + /** A handler for the rowPrepared event. */ + onRowPrepared?: (e: Object) => void; + /** Specifies a custom template for grid rows. */ + rowTemplate?: any; + /** A configuration object specifying scrolling options. */ + scrolling?: { + /** Specifies the scrolling mode. */ + mode?: string; + /** Specifies whether or not a grid must preload pages adjacent to the current page when using virtual scrolling. */ + preloadEnabled?: boolean; + }; + /** Specifies options of the search panel. */ + searchPanel?: { + /** Specifies whether or not search strings in the located grid records should be highlighted. */ + highlightSearchText?: boolean; + /** Specifies text displayed by the search panel when no search string was typed. */ + placeholder?: string; + /** Specifies whether the search panel is visible or not. */ + visible?: boolean; + /** Specifies the width of the search panel in pixels. */ + width?: number; + /** Sets a search string for the search panel. */ + text?: string; + }; + /** Specifies the operations that must be performed on the server side. */ + remoteOperations?: any; + /** Allows you to sort groups according to the values of group summary items. */ + sortByGroupSummaryInfo?: Array<{ + /** Specifies the group summary item whose values must be used to sort groups. */ + summaryItem?: string; + /** Specifies the identifier of the column that must be used in grouping so that sorting by group summary item values be applied. */ + groupColumn?: string; + /** Specifies the sort order of group summary item values. */ + sortOrder?: string; + }>; + /** Allows you to build a master-detail interface in the grid. */ + masterDetail?: { + /** Enables an end-user to expand/collapse detail sections. */ + enabled?: boolean; + /** Specifies whether detail sections appear expanded or collapsed. */ + autoExpandAll?: boolean; + /** Specifies the template for detail sections. */ + template?: any; + }; + /** Specifies options for exporting grid data. */ + export?: { + /** Indicates if the export feature is enabled in the grid. */ + enabled?: boolean; + /** Specifies a default name for the file to which grid data is exported. */ + fileName?: string; + /** Specifies whether to enable Excel filtering for the exported data in the resulting XLSX file. */ + excelFilterEnabled?: boolean; + /** Specifies whether to enable word wrapping for the exported data in the resulting XLSX file. */ + excelWrapTextEnabled?: boolean; + /** Specifies the URL of the server-side proxy that streams the resulting file to the end user to enable export in IE8, IE9 and Safari browsers. */ + proxyUrl?: string; + /** Indicates whether to allow end users to export not only the data displayed in the grid, but the selected rows only. */ + allowExportSelectedData?: boolean; + /** Contains options that specify texts for the export-related commands and hints. */ + texts?: { + /** Specifies text for the Export button when this button invokes a dropdown menu so you can choose the required export format. */ + exportTo?: string; + /** Specifies text for the Export button when this button exports to the XSLX format. */ + exportToExcel?: string; + /** Specifies text for the item in the Export dropdown menu that exports grid data to Excel. */ + excelFormat?: string; + /** Specifies text for the option in the Export dropdown menu that allows you to choose whether to export all the grid data or the selected rows only. */ + selectedRows?: string; + } + }; + /** Specifies the keys of the records that must appear selected initially. */ + selectedRowKeys?: Array; + /** Specifies options of runtime selection. */ + selection?: { + /** Specifies whether the user can select all grid records at once. */ + allowSelectAll?: boolean; + /** Specifies the selection mode. */ + mode?: string; + }; + selectionChanged?: (e: { + currentSelectedRowKeys: Array; + currentDeselectedRowKeys: Array; + selectedRowKeys: Array; + selectedRowsData: Array; + }) => void; + /** A handler for the dataErrorOccured event. */ + onDataErrorOccurred?: (e: { error: Error }) => void; + /** A handler for the selectionChanged event. */ + onSelectionChanged?: (e: { + currentSelectedRowKeys: Array; + currentDeselectedRowKeys: Array; + selectedRowKeys: Array; + selectedRowsData: Array; + }) => void; + /** A handler for the exporting event. */ + onExporting?: (e: { + fileName: string; + format: string; + cancel: boolean; + }) => void; + /** A handler for the exported event. */ + onExported?: (e: Object) => void; + /** A handler for the keyDown event. */ + onKeyDown?: (e: Object) => void; + /** A handler for the rowExpanding event. */ + onRowExpanding?: (e: Object) => void; + /** A handler for the rowExpanded event. */ + onRowExpanded?: (e: Object) => void; + /** A handler for the rowCollapsing event. */ + onRowCollapsing?: (e: Object) => void; + /** A handler for the rowCollapsed event. */ + onRowCollapsed?: (e: Object) => void; + /** Specifies whether column headers are visible or not. */ + showColumnHeaders?: boolean; + /** Specifies whether or not vertical lines separating one grid column from another are visible. */ + showColumnLines?: boolean; + /** Specifies whether or not horizontal lines separating one grid row from another are visible. */ + showRowLines?: boolean; + /** Specifies options of runtime sorting. */ + sorting?: { + /** Specifies text for the context menu item that sets an ascending sort order in a column. */ + ascendingText?: string; + /** Specifies text for the context menu item that resets sorting settings for a column. */ + clearText?: string; + /** Specifies text for the context menu item that sets a descending sort order in a column. */ + descendingText?: string; + /** Specifies the runtime sorting mode. */ + mode?: string; + }; + /** Specifies options of state storing. */ + stateStoring?: { + /** Specifies a callback function that performs specific actions on state loading. */ + customLoad?: () => JQueryPromise; + /** Specifies a callback function that performs specific actions on state saving. */ + customSave?: (gridState: Object) => void; + /** Specifies whether or not a grid saves its state. */ + enabled?: boolean; + /** Specifies the delay between the last change of a grid state and the operation of saving this state in milliseconds. */ + savingTimeout?: number; + /** Specifies a unique key to be used for storing the grid state. */ + storageKey?: string; + /** Specifies the type of storage to be used for state storing. */ + type?: string; + }; + /** Specifies the options of the grid summary. */ + summary?: { + /** Contains options that specify text patterns for summary items. */ + texts?: { + /** Specifies a pattern for the 'sum' summary items when they are displayed in the parent column. */ + sum?: string; + /** Specifies a pattern for the 'sum' summary items displayed in a group row or in any other column rather than the parent one. */ + sumOtherColumn?: string; + /** Specifies a pattern for the 'min' summary items when they are displayed in the parent column. */ + min?: string; + /** Specifies a pattern for the 'min' summary items displayed in a group row or in any other column rather than the parent one. */ + minOtherColumn?: string; + /** Specifies a pattern for the 'max' summary items when they are displayed in the parent column. */ + max?: string; + /** Specifies a pattern for the 'max' summary items displayed in a group row or in any other column rather than the parent one. */ + maxOtherColumn?: string; + /** Specifies a pattern for the 'avg' summary items when they are displayed in the parent column. */ + avg?: string; + /** Specifies a pattern for the 'avg' summary items displayed in a group row or in any other column rather than the parent one. */ + avgOtherColumn?: string; + /** Specifies a pattern for the 'count' summary items. */ + count?: string; + }; + /** Specifies items of the group summary. */ + groupItems?: Array<{ + /** Specifies the identifier of a summary item. */ + name?: string; + /** Specifies the column that provides data for a group summary item. */ + column?: string; + /** Customizes the text to be displayed in the summary item. */ + customizeText?: (itemInfo: { + value: any; + valueText: string; + }) => string; + /** Specifies a pattern for the summary item text. */ + displayFormat?: string; + /** Specifies a precision for the summary item value of a numeric format. */ + precision?: number; + /** Specifies whether or not a summary item must be displayed in the group footer. */ + showInGroupFooter?: boolean; + /** Indicates whether to display group summary items in parentheses after the group row header or to align them by the corresponding columns within the group row. */ + alignByColumn?: boolean; + /** Specifies the column that must hold the summary item when this item is displayed in the group footer or aligned by a column in the group row. */ + showInColumn?: string; + /** Specifies how to aggregate data for a summary item. */ + summaryType?: string; + /** Specifies a format for the summary item value. */ + valueFormat?: string; + }>; + /** Specifies items of the total summary. */ + totalItems?: Array<{ + /** Specifies the identifier of a summary item. */ + name?: string; + /** Specifies the alignment of a summary item. */ + alignment?: string; + /** Specifies the column that provides data for a summary item. */ + column?: string; + /** Specifies a CSS class to be applied to a summary item. */ + cssClass?: string; + /** Customizes the text to be displayed in the summary item. */ + customizeText?: (itemInfo: { + value: any; + valueText: string; + }) => string; + /** Specifies a pattern for the summary item text. */ + displayFormat?: string; + /** Specifies a precision for the summary item value of a numeric format. */ + precision?: number; + /** Specifies the column that must hold the summary item. */ + showInColumn?: string; + /** Specifies how to aggregate data for a summary item. */ + summaryType?: string; + /** Specifies a format for the summary item value. */ + valueFormat?: string; + }>; + /** Allows you to use a custom aggregate function to calculate the value of a summary item. */ + calculateCustomSummary?: (options: { + component: dxDataGrid; + name?: string; + value: any; + totalValue: any; + summaryProcess: string + }) => void; + }; + /** Specifies whether text that does not fit into a column should be wrapped. */ + wordWrapEnabled?: boolean; + } + /** A data grid widget. */ + export class dxDataGrid extends Widget { + constructor(element: JQuery, options?: dxDataGridOptions); + constructor(element: Element, options?: dxDataGridOptions); + /** Ungroups grid records. */ + clearGrouping(): void; + /** Clears sorting settings of all grid columns at once. */ + clearSorting(): void; + /** Allows you to obtain a cell by its row index and the data field of its column. */ + getCellElement(rowIndex: number, dataField: string): any; + /** Allows you to obtain a cell by its row index and the visible index of its column. */ + getCellElement(rowIndex: number, visibleColumnIndex: number): any; + /** Returns the current state of the grid. */ + state(): Object; + /** Sets the grid state. */ + state(state: Object): void; + /** Allows you to obtain the row index by a data key. */ + getRowIndexByKey(key: any): number; + /** Allows you to obtain the data key by a row index. */ + getKeyByRowIndex(rowIndex: number): any; + /** Adds a new column to a grid. */ + addColumn(columnOptions: dxDataGridColumn): void; + /** Displays the load panel. */ + beginCustomLoading(messageText: string): void; + /** Discards changes made in a grid. */ + cancelEditData(): void; + /** Clears all the filters of a specific type applied to grid records. */ + clearFilter(): void; + /** Deselects all grid records. */ + clearSelection(): void; + /** Draws the cell being edited from the editing state. Use this method when the edit mode is batch. */ + closeEditCell(): void; + /** Collapses groups or master rows in a grid. */ + collapseAll(groupIndex?: number): void; + /** Returns the number of data columns in a grid. */ + columnCount(): number; + /** Returns the value of a specific column option. */ + columnOption(id: any, optionName: string): any; + /** Sets an option of a specific column. */ + columnOption(id: any, optionName: string, optionValue: any): void; + /** Returns the options of a column by an identifier. */ + columnOption(id: any): Object; + /** Sets several options of a column at once. */ + columnOption(id: any, options: Object): void; + /** Sets a specific cell into the editing state. */ + editCell(rowIndex: number, columnIndex: number): void; + /** Sets a specific row into the editing state. */ + editRow(rowIndex: number): void; + /** Hides the load panel. */ + endCustomLoading(): void; + /** Expands groups or master rows in a grid. */ + expandAll(groupIndex: number): void; + /** Allows you to find out whether a specific group or master row is expanded or collapsed. */ + isRowExpanded(key: any): boolean; + /** Allows you to expand a specific group or master row by its key. */ + expandRow(key: any): void; + /** Allows you to collapse a specific group or master row by its key. */ + collapseRow(key: any): void; + /** Applies a filter to the grid's data source. */ + filter(filterExpr?: any): void; + /** Returns a filter expression applied to the grid's data source using the filter(filterExpr) method. */ + filter(): any; + /** Returns a filter expression applied to the grid using all possible scenarious. */ + getCombinedFilter(): any; + /** Gets the keys of currently selected grid records. */ + getSelectedRowKeys(): Array; + /** Gets the data objects of currently selected grid records. */ + getSelectedRowsData(): Array; + /** Hides the column chooser panel. */ + hideColumnChooser(): void; + /** Adds a new data row to a grid. */ + insertRow(): void; + /** Returns the key corresponding to the passed data object. */ + keyOf(obj: Object): any; + /** Switches a grid to a specified page. */ + pageIndex(newIndex: number): void; + /** Gets the index of the current page. */ + pageIndex(): number; + /** Sets the page size. */ + pageSize(value: number): void; + /** Gets the current page size. */ + pageSize(): number; + /** Refreshes grid data. */ + refresh(): void; + /** Removes a specific row from a grid. */ + removeRow(rowIndex: number): void; + /** Saves changes made in a grid. */ + saveEditData(): void; + /** Searches grid records by a search string. */ + searchByText(text: string): void; + /** Selects all grid records. */ + selectAll(): void; + /** Deselects the rows that are currently selected within the applied filter. */ + deselectAll(): void; + /** Selects specific grid records. */ + selectRows(keys: Array, preserve: boolean): void; + /** Deselects specific grid records. */ + deselectRows(keys: Array): void; + /** Selects grid rows by indexes. */ + selectRowsByIndexes(indexes: Array): void; + /** Allows you to find out whether a row is selected or not. */ + isRowSelected(key: any): boolean; + /** Invokes the column chooser panel. */ + showColumnChooser(): void; + startSelectionWithCheckboxes(): boolean; + /** Returns the number of records currently held by a grid. */ + totalCount(): number; + /** Recovers a row deleted in the batch edit mode. */ + undeleteRow(rowIndex: number): void; + /** Allows you to obtain a data object by its key. */ + byKey(key: any): JQueryPromise; + /** Gets the value of a total summary item. */ + getTotalSummaryValue(summaryItemName: string): any; + /** Exports grid data to Excel. */ + exportToExcel(selectionOnly: boolean): void; + /** Updates the grid to the size of its content. */ + updateDimensions(): void; + /** Focuses the specified cell element in the grid. */ + focus(element?: JQuery): void; + } + export interface dxPivotGridOptions extends WidgetOptions { + onContentReady?: Function; + /** Specifies a data source for the pivot grid. */ + dataSource?: any; + /** Specifies whether or not the widget uses native scrolling. */ + useNativeScrolling?: any; + /** Allows an end-user to change sorting options. */ + allowSorting?: boolean; + /** Allows an end-user to sort columns by summary values. */ + allowSortingBySummary?: boolean; + /** Allows an end-user to change filtering options. */ + allowFiltering?: boolean; + /** Allows an end-user to expand/collapse all header items within a header level. */ + allowExpandAll?: boolean; + /** Specifies whether to display the Total rows. */ + showRowTotals?: boolean; + /** Specifies whether to display the Grand Total row. */ + showRowGrandTotals?: boolean; + /** Specifies whether to display the Total columns. */ + showColumnTotals?: boolean; + /** Specifies whether to display the Grand Total column. */ + showColumnGrandTotals?: boolean; + /** The Field Chooser configuration options. */ + fieldChooser?: { + /** Enables or disables the field chooser. */ + enabled?: boolean; + /** Specifies the field chooser layout. */ + layout?: number; + /** Specifies the text to display as a title of the field chooser popup window. */ + title?: string; + /** Specifies the field chooser width. */ + width?: number; + /** Specifies the field chooser height. */ + height?: number; + /** Strings that can be changed or localized in the pivot grid's integrated Field Chooser. */ + texts?: { + /** The string to display instead of Row Fields. */ + rowFields?: string; + /** The string to display instead of Column Fields. */ + columnFields?: string; + /** The string to display instead of Data Fields. */ + dataFields?: string; + /** The string to display instead of Filter Fields. */ + filterFields?: string; + /** The string to display instead of All Fields. */ + allFields?: string; + }; + } + /** Strings that can be changed or localized in the dxPivotGrid widget. */ + texts?: { + /** The string to display as a header of the Grand Total row and column. */ + grandTotal?: string; + /** The string to display as a header of the Total row and column. */ + total?: string; + /** Specifies the text displayed when a pivot grid does not contain any fields. */ + noData?: string; + /** The string to display as a Show Field Chooser context menu item. */ + showFieldChooser?: string; + /** The string to display as an Expand All context menu item. */ + expandAll?: string; + /** The string to display as a Collapse All context menu item. */ + collapseAll?: string; + /** The string to display as a Sort Column by Summary Value context menu item. */ + sortColumnBySummary?: string; + /** The string to display as a Sort Row by Summary Value context menu item. */ + sortRowBySummary?: string; + /** The string to display as a Remove All Sorting context menu item. */ + removeAllSorting?: string; + }; + /** The Load panel configuration options. */ + loadPanel?: { + /** Enables or disables the load panel. */ + enabled?: boolean; + /** Specifies the height of the load panel. */ + height?: number; + /** Specifies the URL pointing to an image that will be used as a load indicator. */ + indicatorSrc?: string; + /** Specifies whether or not to show a load indicator. */ + showIndicator?: boolean; + /** Specifies whether or not to show load panel background. */ + showPane?: boolean; + /** Specifies the text to display inside a load panel. */ + text?: string; + /** Specifies the width of the load panel. */ + width?: number; + }; + /** A handler for the cellClick event. */ + onCellClick?: (e: any) => void; + /** A handler for the cellPrepared event. */ + onCellPrepared?: (e: any) => void; + /** A handler for the contextMenuPreparing event. */ + onContextMenuPreparing?: (e: Object) => void; + } + /** A data summarization widget for multi-dimensional data analysis and data mining. */ + export class dxPivotGrid extends Widget { + constructor(element: JQuery, options?: dxPivotGridOptions); + constructor(element: Element, options?: dxPivotGridOptions); + /** Gets the PivotGridDataSource instance. */ + getDataSource(): DevExpress.data.PivotGridDataSource; + /** Updates the widget to the size of its content. */ + updateDimensions(): void; + } + export interface dxPivotGridFieldChooserOptions extends WidgetOptions { + /** Specifies the height of the widget. */ + height?: any; + /** Specifies the field chooser layout. */ + layout?: number; + /** The data source of a dxPivotGrid widget. */ + dataSource?: DevExpress.data.PivotGridDataSource; + onContentReady?: Function; + /** Strings that can be changed or localized in the dxPivotGridFieldChooser widget. */ + texts?: { + /** The string to display instead of Row Fields. */ + rowFields?: string; + /** The string to display instead of Column Fields. */ + columnFields?: string; + /** The string to display instead of Data Fields. */ + dataFields?: string; + /** The string to display instead of Filter Fields. */ + filterFields?: string; + /** The string to display instead of All Fields. */ + allFields?: string; + }; + } + /** A complementary widget for dxPivotGrid that allows you to manage data displayed in the dxPivotGrid. */ + export class dxPivotGridFieldChooser extends Widget { + constructor(element: JQuery, options?: dxPivotGridFieldChooserOptions); + constructor(element: Element, options?: dxPivotGridFieldChooserOptions); + /** Updates the widget to the size of its content. */ + updateDimensions(): void; + } +} +interface JQuery { + dxTreeView(): JQuery; + dxTreeView(options: "instance"): DevExpress.ui.dxTreeView; + dxTreeView(options: string): any; + dxTreeView(options: string, ...params: any[]): any; + dxTreeView(options: DevExpress.ui.dxTreeViewOptions): JQuery; + dxMenuBase(): JQuery; + dxMenuBase(options: "instance"): DevExpress.ui.dxMenuBase; + dxMenuBase(options: string): any; + dxMenuBase(options: string, ...params: any[]): any; + dxMenuBase(options: DevExpress.ui.dxMenuBaseOptions): JQuery; + dxMenu(): JQuery; + dxMenu(options: "instance"): DevExpress.ui.dxMenu; + dxMenu(options: string): any; + dxMenu(options: string, ...params: any[]): any; + dxMenu(options: DevExpress.ui.dxMenuOptions): JQuery; + dxContextMenu(): JQuery; + dxContextMenu(options: "instance"): DevExpress.ui.dxContextMenu; + dxContextMenu(options: string): any; + dxContextMenu(options: string, ...params: any[]): any; + dxContextMenu(options: DevExpress.ui.dxContextMenuOptions): JQuery; + dxColorBox(): JQuery; + dxColorBox(options: "instance"): DevExpress.ui.dxColorBox; + dxColorBox(options: string): any; + dxColorBox(options: string, ...params: any[]): any; + dxColorBox(options: DevExpress.ui.dxColorBoxOptions): JQuery; + dxDataGrid(): JQuery; + dxDataGrid(options: "instance"): DevExpress.ui.dxDataGrid; + dxDataGrid(options: string): any; + dxDataGrid(options: string, ...params: any[]): any; + dxDataGrid(options: DevExpress.ui.dxDataGridOptions): JQuery; + dxPivotGrid(): JQuery; + dxPivotGrid(options: "instance"): DevExpress.ui.dxPivotGrid; + dxPivotGrid(options: string): any; + dxPivotGrid(options: string, ...params: any[]): any; + dxPivotGrid(options: DevExpress.ui.dxPivotGridOptions): JQuery; + dxPivotGridFieldChooser(): JQuery; + dxPivotGridFieldChooser(options: "instance"): DevExpress.ui.dxPivotGridFieldChooser; + dxPivotGridFieldChooser(options: string): any; + dxPivotGridFieldChooser(options: string, ...params: any[]): any; + dxPivotGridFieldChooser(options: DevExpress.ui.dxPivotGridFieldChooserOptions): JQuery; + dxScheduler(): JQuery; + dxScheduler(options: "instance"): DevExpress.ui.dxScheduler; + dxScheduler(options: string): any; + dxScheduler(options: string, ...params: any[]): any; + dxScheduler(options: DevExpress.ui.dxSchedulerOptions): JQuery; +} +declare module DevExpress.framework { + /** An object used to store information on the views displayed in an application. */ + export class ViewCache { + viewRemoved: JQueryCallback; + /** Removes all the viewInfo objects from the cache. */ + clear(): void; + /** Obtains a viewInfo object from the cache by the specified key. */ + getView(key: string): Object; + /** Checks whether or not a viewInfo object is contained in the view cache under the specified key. */ + hasView(key: string): boolean; + /** Removes a viewInfo object from the cache by the specified key. */ + removeView(key: string): Object; + /** Adds the specified viewInfo object to the cache under the specified key. */ + setView(key: string, viewInfo: Object): void; + } + export interface dxCommandOptions extends DOMComponentOptions { + action?: any; + /** Specifies an action performed when the execute() method of the command is called. */ + onExecute?: any; + /** Indicates whether or not the widget that displays this command is disabled. */ + disabled?: boolean; + /** Specifies whether the current command is rendered when a view is being rendered or after a view is shown. */ + renderStage?: string; + /** Specifies the name of the icon shown inside the widget associated with this command. */ + icon?: string; + iconSrc?: string; + /** The identifier of the command. */ + id?: string; + /** Specifies the title of the widget associated with this command. */ + title?: string; + /** Specifies the type of the button, if the command is rendered as a dxButton widget. */ + type?: string; + /** A Boolean value specifying whether or not the widget associated with this command is visible. */ + visible?: boolean; + } + /** A markup component used to define markup options for a command. */ + export class dxCommand extends DOMComponent { + constructor(element: JQuery, options: dxCommandOptions); + constructor(options: dxCommandOptions); + /** Executes the action associated with this command. */ + execute(): void; + } + /** An object responsible for routing. */ + export class Router { + /** Adds a routing rule to the list of registered rules. */ + register(pattern: string, defaults?: Object, constraints?: Object): void; + /** Decodes the specified URI to an object using the registered routing rules. */ + parse(uri: string): Object; + /** Formats an object to a URI. */ + format(obj: Object): string; + } + export interface StateManagerOptions { + /** A storage to which the state manager saves the application state. */ + storage?: Object; + } + /** An object used to store the current application state. */ + export class StateManager { + constructor(options?: StateManagerOptions); + /** Adds an object that implements an interface of a state source to the state manager's collection of state sources. */ + addStateSource(stateSource: Object): void; + /** Removes a specified state source from the state manager's collection of state sources. */ + removeStateSource(stateSource: Object): void; + /** Saves the current application state. */ + saveState(): void; + /** Restores the application state that has been saved by the saveState() method to the state storage. */ + restoreState(): void; + /** Removes the application state that has been saved by the saveState() method to the state storage. */ + clearState(): void; + } + export module html { + export var layoutSets: Array; + export var animationSets: { [animationSetName: string]: AnimationSet }; + export interface AnimationSet { + [animationName: string]: any + } + export interface HtmlApplicationOptions { + /** Specifies where the commands that are defined in the application's views must be displayed. */ + commandMapping?: Object; + /** Specifies whether or not view caching is disabled. */ + disableViewCache?: boolean; + /** An array of layout controllers that should be used to show application views in the current navigation context. */ + layoutSet?: any; + /** Specifies the animation presets that are used to animate different UI elements in the current application. */ + animationSet?: AnimationSet; + /** Specifies whether the current application must behave as a mobile or web application. */ + mode?: string; + /** Specifies the object that represents a root namespace of the application. */ + namespace?: Object; + /** Specifies application behavior when the user navigates to a root view. */ + navigateToRootViewMode?: string; + /** An array of dxCommand configuration objects used to define commands available from the application's global navigation. */ + navigation?: Array; + /** A state manager to be used in the application. */ + stateManager?: StateManager; + /** Specifies the storage to be used by the application's state manager to store the application state. */ + stateStorage?: Object; + /** Indicates whether on not to use the title of the previously displayed view as text on the Back button. */ + useViewTitleAsBackText?: boolean; + /** A custom view cache to be used in the application. */ + viewCache?: Object; + /** Specifies a limit for the views that can be cached. */ + viewCacheSize?: number; + /** Specifies options for the viewport meta tag of a mobile browser. */ + viewPort?: JQuery; + /** A custom router to be used in the application. */ + router?: Router; + } + /** An object used to manage views, as well as control the application life cycle. */ + export class HtmlApplication implements EventsMixin { + constructor(options: HtmlApplicationOptions); + afterViewSetup: JQueryCallback; + beforeViewSetup: JQueryCallback; + initialized: JQueryCallback; + navigating: JQueryCallback; + navigatingBack: JQueryCallback; + resolveLayoutController: JQueryCallback; + viewDisposed: JQueryCallback; + viewDisposing: JQueryCallback; + viewHidden: JQueryCallback; + viewRendered: JQueryCallback; + viewShowing: JQueryCallback; + viewShown: JQueryCallback; + /** Provides access to the ViewCache object. */ + viewCache: ViewCache; + /** An array of dxCommand components that are created based on the application's navigation option value. */ + navigation: Array; + /** Provides access to the StateManager object. */ + stateManager: StateManager; + /** Provides access to the Router object. */ + router: Router; + /** Navigates to the URI preceding the current one in the navigation history. */ + back(): void; + /** Returns a Boolean value indicating whether or not backwards navigation is currently possible. */ + canBack(): boolean; + /** Calls the clearState() method of the application's StateManager object. */ + clearState(): void; + /** Creates global navigation commands. */ + createNavigation(navigationConfig: Array): void; + /** Returns an HTML template of the specified view. */ + getViewTemplate(viewName: string): JQuery; + /** Returns a configuration object used to create a dxView component for a specified view. */ + getViewTemplateInfo(viewName: string): Object; + /** Adds a specified HTML template to a collection of view or layout templates. */ + loadTemplates(source: any): JQueryPromise; + /** Navigates to the specified URI. */ + navigate(uri?: any, options?: Object): void; + /** Renders navigation commands to the navigation command containers that are located in the layouts used in the application. */ + renderNavigation(): void; + /** Calls the restoreState() method of the application's StateManager object. */ + restoreState(): void; + /** Calls the saveState method of the application's StateManager object. */ + saveState(): void; + /** Provides access to the object that defines the current context to be considered when choosing an appropriate template for a view. */ + templateContext(): Object; + on(eventName: "initialized", eventHandler: () => void): HtmlApplication; + on(eventName: "afterViewSetup", eventHandler: (e: { + viewInfo: Object; + }) => void): HtmlApplication; + on(eventName: "beforeViewSetup", eventHandler: (e: { + viewInfo: Object; + }) => void): HtmlApplication; + on(eventName: "navigating", eventHandler: (e: { + currentUri: string; + uri: string; + cancel: boolean; + options: { + root: boolean; + target: string; + direction: string; + rootInDetailPane: boolean; + modal: boolean; + }; + }) => void): HtmlApplication; + on(eventName: "navigatingBack", eventHandler: (e: { + cancel: boolean; + isHardwareButton: boolean; + }) => void): HtmlApplication; + on(eventName: "resolveLayoutController", eventHandler: (e: { + viewInfo: Object; + layoutController: Object; + availableLayoutControllers: Array; + }) => void): HtmlApplication; + on(eventName: "viewDisposed", eventHandler: (e: { + viewInfo: Object; + }) => void): HtmlApplication; + on(eventName: "viewDisposing", eventHandler: (e: { + viewInfo: Object; + }) => void): HtmlApplication; + on(eventName: "viewHidden", eventHandler: (e: { + viewInfo: Object; + }) => void): HtmlApplication; + on(eventName: "viewRendered", eventHandler: (e: { + viewInfo: Object; + }) => void): HtmlApplication; + on(eventName: "viewShowing", eventHandler: (e: { + viewInfo: Object; + direction: string; + }) => void): HtmlApplication; + on(eventName: "viewShown", eventHandler: (e: { + viewInfo: Object; + direction: string; + }) => void): HtmlApplication; + on(eventName: string, eventHandler: Function): HtmlApplication; + on(events: { [eventName: string]: Function; }): HtmlApplication; + off(eventName: "initialized"): HtmlApplication; + off(eventName: "afterViewSetup"): HtmlApplication; + off(eventName: "beforeViewSetup"): HtmlApplication; + off(eventName: "navigating"): HtmlApplication; + off(eventName: "navigatingBack"): HtmlApplication; + off(eventName: "resolveLayoutController"): HtmlApplication; + off(eventName: "viewDisposed"): HtmlApplication; + off(eventName: "viewDisposing"): HtmlApplication; + off(eventName: "viewHidden"): HtmlApplication; + off(eventName: "viewRendered"): HtmlApplication; + off(eventName: "viewShowing"): HtmlApplication; + off(eventName: "viewShown"): HtmlApplication; + off(eventName: string): HtmlApplication; + off(eventName: "initialized", eventHandler: () => void): HtmlApplication; + off(eventName: "afterViewSetup", eventHandler: (e: { + viewInfo: Object; + }) => void): HtmlApplication; + off(eventName: "beforeViewSetup", eventHandler: (e: { + viewInfo: Object; + }) => void): HtmlApplication; + off(eventName: "navigating", eventHandler: (e: { + currentUri: string; + uri: string; + cancel: boolean; + options: { + root: boolean; + target: string; + direction: string; + rootInDetailPane: boolean; + modal: boolean; + }; + }) => void): HtmlApplication; + off(eventName: "navigatingBack", eventHandler: (e: { + cancel: boolean; + isHardwareButton: boolean; + }) => void): HtmlApplication; + off(eventName: "resolveLayoutController", eventHandler: (e: { + viewInfo: Object; + layoutController: Object; + availableLayoutControllers: Array; + }) => void): HtmlApplication; + off(eventName: "viewDisposed", eventHandler: (e: { + viewInfo: Object; + }) => void): HtmlApplication; + off(eventName: "viewDisposing", eventHandler: (e: { + viewInfo: Object; + }) => void): HtmlApplication; + off(eventName: "viewHidden", eventHandler: (e: { + viewInfo: Object; + }) => void): HtmlApplication; + off(eventName: "viewRendered", eventHandler: (e: { + viewInfo: Object; + }) => void): HtmlApplication; + off(eventName: "viewShowing", eventHandler: (e: { + viewInfo: Object; + direction: string; + }) => void): HtmlApplication; + off(eventName: "viewShown", eventHandler: (e: { + viewInfo: Object; + direction: string; + }) => void): HtmlApplication; + off(eventName: string, eventHandler: Function): HtmlApplication; + } + } +} +declare module DevExpress.viz.core { + /** + * Applies a theme for the entire page with several DevExtreme visualization widgets. + * @deprecated Use the DevExpress.viz.currentTheme(theme) method instead. + */ + export function currentTheme(theme: string): void; + /** + * Applies a new theme (with the color scheme defined separately) for the entire page with several DevExtreme visualization widgets. + * @deprecated Use the DevExpress.viz.currentTheme(platform, colorScheme) method instead. + */ + export function currentTheme(platform: string, colorScheme: string): void; + /** + * Registers a new theme based on the existing one. + * @deprecated Use the DevExpress.viz.registerTheme(customTheme, baseTheme) method instead. + */ + export function registerTheme(customTheme: Object, baseTheme: string): void; + /** + * Applies a predefined or registered custom palette to all visualization widgets at once. + * @deprecated Use the DevExpress.viz.currentPalette(paletteName) method instead. + */ + export function currentPalette(paletteName: string): void; + /** + * Obtains the color sets of a predefined or registered palette. + * @deprecated Use the DevExpress.viz.getPalette(paletteName) method instead. + */ + export function getPalette(paletteName: string): Object; + /** + * Registers a new palette. + * @deprecated Use the DevExpress.viz.registerPalette(paletteName, palette) method instead. + */ + export function registerPalette(paletteName: string, palette: Object): void; + export interface Border { + /** Sets a border color for a selected series. */ + color?: string; + /** Sets border visibility for a selected series. */ + visible?: boolean; + /** Sets a border width for a selected series. */ + width?: number; + } + export interface DashedBorder extends Border { + /** Specifies a dash style for the border of a selected series point. */ + dashStyle?: string; + } + export interface DashedBorderWithOpacity extends DashedBorder { + /** Specifies the opacity of the tooltip's border. */ + opacity?: number; + } + export interface Font { + /** Specifies the font color for a strip label. */ + color?: string; + /** Specifies the font family for a strip label. */ + family?: string; + /** Specifies the font opacity for a strip label. */ + opacity?: number; + /** Specifies the font size for a strip label. */ + size?: any; + /** Specifies the font weight for the text displayed in strips. */ + weight?: number; + } + export interface Hatching { + direction?: string; + /** Specifies the opacity of hatching lines. */ + opacity?: number; + /** Specifies the distance between hatching lines in pixels. */ + step?: number; + /** Specifies the width of hatching lines in pixels. */ + width?: number; + } + export interface Margins { + /** Specifies the legend's bottom margin in pixels. */ + bottom?: number; + /** Specifies the legend's left margin in pixels. */ + left?: number; + /** Specifies the legend's right margin in pixels. */ + right?: number; + /** Specifies the legend's bottom margin in pixels. */ + top?: number; + } + export interface Size { + /** Specifies the width of the widget. */ + width?: number; + /** Specifies the height of the widget. */ + height?: number; + } + export interface Tooltip { + /** Specifies the length of the tooltip's arrow in pixels. */ + arrowLength?: number; + /** Specifies the appearance of the tooltip's border. */ + border?: viz.core.DashedBorderWithOpacity; + /** Specifies a color for the tooltip. */ + color?: string; + /** Specifies the z-index for tooltips. */ + zIndex?: number; + container?: any; + /** Specifies text and appearance of a set of tooltips. */ + customizeTooltip?: (arg: Object) => { color?: string; text?: string }; + /** Specifies whether or not the tooltip is enabled. */ + enabled?: boolean; + /** Specifies font options for the text displayed by the tooltip. */ + font?: Font; + /** Specifies a format for the text displayed by the tooltip. */ + format?: string; + /** Specifies the opacity of a tooltip. */ + opacity?: number; + /** Specifies a distance from the tooltip's left/right boundaries to the inner text in pixels. */ + paddingLeftRight?: number; + /** Specifies a distance from the tooltip's top/bottom boundaries to the inner text in pixels. */ + paddingTopBottom?: number; + /** Specifies a precision for formatted values displayed by the tooltip. */ + precision?: number; + /** Specifies options of the tooltip's shadow. */ + shadow?: { + /** Specifies the blur distance of the tooltip's shadow. */ + blur?: number; + /** Specifies the color of the tooltip's shadow. */ + color?: string; + /** Specifies the horizontal offset of the tooltip's shadow relative to the tooltip in pixels. */ + offsetX?: number; + /** Specifies the vertical offset of the tooltip's shadow relative to the tooltip in pixels. */ + offsetY?: number; + /** Specifies the opacity of the tooltip's shadow. */ + opacity?: number; + }; + } + export interface Animation { + /** Determines how long animation runs. */ + duration?: number; + /** Specifies the animation easing mode. */ + easing?: string; + /** Indicates whether or not animation is enabled. */ + enabled?: boolean; + } + export interface LoadingIndicator { + /** Specifies a color for the loading indicator background. */ + backgroundColor?: string; + /** Specifies font options for the loading indicator text. */ + font?: viz.core.Font; + /** Specifies whether to show the loading indicator or not. */ + show?: boolean; + /** Specifies a text to be displayed by the loading indicator. */ + text?: string; + } + export interface LegendBorder extends viz.core.DashedBorderWithOpacity { + /** Specifies a radius for the corners of the legend border. */ + cornerRadius?: number; + } + export interface BaseLegend { + /** Specifies the color of the legend's background. */ + backgroundColor?: string; + /** Specifies legend border settings. */ + border?: viz.core.LegendBorder; + /** Specifies how many columns must be taken to arrange legend items. */ + columnCount?: number; + /** Specifies the spacing between a pair of neighboring legend columns in pixels. */ + columnItemSpacing?: number; + /** Specifies font options for legend items. */ + font?: viz.core.Font; + /** Specifies the legend's position on the map. */ + horizontalAlignment?: string; + /** Specifies the alignment of legend items. */ + itemsAlignment?: string; + /** Specifies the position of text relative to the item marker. */ + itemTextPosition?: string; + /** Specifies the distance between the legend and the container borders in pixels. */ + margin?: viz.core.Margins; + /** Specifies the size of item markers in the legend in pixels. */ + markerSize?: number; + /** Specifies whether to arrange legend items horizontally or vertically. */ + orientation?: string; + /** Specifies the spacing between the legend left/right border and legend items in pixels. */ + paddingLeftRight?: number; + /** Specifies the spacing between the legend top/bottom border and legend items in pixels. */ + paddingTopBottom?: number; + /** Specifies how many rows must be taken to arrange legend items. */ + rowCount?: number; + /** Specifies the spacing between a pair of neighboring legend rows in pixels. */ + rowItemSpacing?: number; + /** Specifies the legend's position on the map. */ + verticalAlignment?: string; + /** Specifies whether or not the legend is visible on the map. */ + visible?: boolean; + } + export interface BaseWidgetOptions { + drawn?: (widget: Object) => void; + /** A handler for the drawn event. */ + onDrawn?: (e: { + component: BaseWidget; + element: Element; + }) => void; + incidentOccured?: (incidentInfo: { + id: string; + type: string; + args: any; + text: string; + widget: string; + version: string; + }) => 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; + } + ) => void; + /** Notifies a widget that it is embedded into an HTML page that uses a path modifier. */ + pathModified?: boolean; + /** Specifies whether or not the widget supports right-to-left representation. */ + rtlEnabled?: boolean; + /** Sets the name of the theme to be used in the widget. */ + theme?: string; + } + /** This section describes options and methods that are common to all widgets. */ + export class BaseWidget extends DOMComponent { + /** Returns the widget's SVG markup. */ + svg(): string; + } +} +declare module DevExpress.viz.charts { + /** This section describes the fields and methods that can be used in code to manipulate the Series object. */ + export interface BaseSeries { + /** Provides information about the state of the series object. */ + fullState: number; + /** Returns the type of the series. */ + type: string; + /** Unselects all the selected points of the series. The points are displayed in an initial style. */ + clearSelection(): void; + /** Gets the color of a particular series. */ + getColor(): string; + /** + * Gets a point from the series point collection based on the specified argument. + * @deprecated getPointsByArg(pointArg).md + */ + getPointByArg(pointArg: any): Object; + /** Gets points from the series point collection based on the specified argument. */ + getPointsByArg(pointArg: any): Array; + /** Gets a point from the series point collection based on the specified point position. */ + getPointByPos(positionIndex: number): Object; + /** Selects the series. The series is displayed in a 'selected' style until another series is selected or the current series is deselected programmatically. */ + select(): void; + /** Selects the specified point. The point is displayed in a 'selected' style. */ + selectPoint(point: BasePoint): void; + /** Deselects the specified point. The point is displayed in an initial style. */ + deselectPoint(point: BasePoint): void; + /** Returns an array of all points in the series. */ + getAllPoints(): Array; + /** Returns visible series points. */ + getVisiblePoints(): Array; + } + /** This section describes the methods that can be used in code to manipulate the Point object. */ + export interface BasePoint { + /** Provides information about the state of the point object. */ + fullState: number; + /** Returns the point's argument value that was set in the data source. */ + originalArgument: any; + /** Returns the point's value that was set in the data source. */ + originalValue: any; + /** Returns the tag of the point. */ + tag: string; + /** Deselects the point. */ + clearSelection(): void; + /** Gets the color of a particular point. */ + getColor(): string; + /** Hides the tooltip of the point. */ + hideTooltip(): void; + /** Provides information about the hover state of a point. */ + isHovered(): any; + /** Provides information about the selection state of a point. */ + isSelected(): any; + /** Selects the point. The point is displayed in a 'selected' style until another point is selected or the current point is deselected programmatically. */ + select(): void; + /** Shows the tooltip of the point. */ + showTooltip(): void; + /** Allows you to obtain the label of a series point. */ + getLabel(): any; + /** Returns the series object to which the point belongs. */ + series: BaseSeries; + } + /** This section describes the fields and methods that can be used in code to manipulate the Series object. */ + export interface ChartSeries extends BaseSeries { + /** Returns the name of the series pane. */ + pane: string; + /** Returns the name of the value axis of the series. */ + axis: string; + /** Returns the name of the series. */ + name: string; + /** Returns the tag of the series. */ + tag: string; + /** Hides a series. */ + hide(): void; + /** Provides information about the hover state of a series. */ + isHovered(): any; + /** Provides information about the selection state of a series. */ + isSelected(): any; + /** Provides information about the visibility state of a series. */ + isVisible(): boolean; + /** Makes a particular series visible. */ + show(): void; + selectPoint(point: ChartPoint): void; + deselectPoint(point: ChartPoint): void; + getAllPoints(): Array; + getVisiblePoints(): Array; + } + /** This section describes the methods that can be used in code to manipulate the Point object. */ + export interface ChartPoint extends BasePoint { + /** Contains the close value of the point. This field is useful for points belonging to a series of the candle stick or stock type only. */ + originalCloseValue: any; + /** Contains the high value of the point. This field is useful for points belonging to a series of the candle stick or stock type only. */ + originalHighValue: any; + /** Contains the low value of the point. This field is useful for points belonging to a series of the candle stick or stock type only. */ + originalLowValue: any; + /** Contains the first value of the point. This field is useful for points belonging to a series of the range area or range bar type only. */ + originalMinValue: any; + /** Contains the open value of the point. This field is useful for points belonging to a series of the candle stick or stock type only. */ + originalOpenValue: any; + /** Contains the size of the bubble as it was set in the data source. This field is useful for points belonging to a series of the bubble type only. */ + size: any; + /** Gets the parameters of the point's minimum bounding rectangle (MBR). */ + getBoundingRect(): { x: number; y: number; width: number; height: number; }; + series: ChartSeries; + } + /** This section describes the methods that can be used in code to manipulate the Label object. */ + export interface Label { + /** Gets the parameters of the label's minimum bounding rectangle (MBR). */ + getBoundingRect(): { x: number; y: number; width: number; height: number; }; + /** Hides the point label. */ + hide(): void; + /** Shows the point label. */ + show(): void; + } + export interface PieSeries extends BaseSeries { + selectPoint(point: PiePoint): void; + deselectPoint(point: PiePoint): void; + getAllPoints(): Array; + getVisiblePoints(): Array; + } + /** This section describes the methods that can be used in code to manipulate the Point object. */ + export interface PiePoint extends BasePoint { + /** Gets the percentage value of the specific point. */ + percent: any; + /** Provides information about the visibility state of a point. */ + isVisible(): boolean; + /** Makes a specific point visible. */ + show(): void; + /** Hides a specific point. */ + hide(): void; + series: PieSeries; + } + /** This section describes the fields and methods that can be used in code to manipulate the Series object. */ + export interface PolarSeries extends BaseSeries { + /** Returns the name of the value axis of the series. */ + axis: string; + /** Returns the name of the series. */ + name: string; + /** Returns the tag of the series. */ + tag: string; + /** Hides a series. */ + hide(): void; + /** Provides information about the hover state of a series. */ + isHovered(): any; + /** Provides information about the selection state of a series. */ + isSelected(): any; + /** Provides information about the visibility state of a series. */ + isVisible(): boolean; + /** Makes a particular series visible. */ + show(): void; + selectPoint(point: PolarPoint): void; + deselectPoint(point: PolarPoint): void; + getAllPoints(): Array; + getVisiblePoints(): Array; + } + /** This section describes the methods that can be used in code to manipulate the Point object. */ + export interface PolarPoint extends BasePoint { + series: PolarSeries; + } + export interface Strip { + /** Specifies a color for a strip. */ + color?: string; + /** An object that defines the label configuration options of a strip. */ + label?: { + /** Specifies the text displayed in a strip. */ + text?: string; + }; + /** Specifies a start value for a strip. */ + startValue?: any; + /** Specifies an end value for a strip. */ + endValue?: any; + } + export interface BaseSeriesConfigLabel { + /** Specifies a format for arguments displayed by point labels. */ + argumentFormat?: string; + /** Specifies a precision for formatted point arguments displayed in point labels. */ + argumentPrecision?: number; + /** Specifies a background color for point labels. */ + backgroundColor?: string; + /** Specifies border options for point labels. */ + border?: viz.core.DashedBorder; + /** Specifies connector options for series point labels. */ + connector?: { + /** Specifies the color of label connectors. */ + color?: string; + /** Indicates whether or not label connectors are visible. */ + visible?: boolean; + /** Specifies the width of label connectors. */ + width?: number; + }; + /** Specifies a callback function that returns the text to be displayed by point labels. */ + customizeText?: (pointInfo: Object) => string; + /** Specifies font options for the text displayed in point labels. */ + font?: viz.core.Font; + /** Specifies a format for the text displayed by point labels. */ + format?: string; + position?: string; + /** Specifies a precision for formatted point values displayed in point labels. */ + precision?: number; + /** Specifies the angle used to rotate point labels from their initial position. */ + rotationAngle?: number; + /** Specifies the visibility of point labels. */ + visible?: boolean; + } + export interface SeriesConfigLabel extends BaseSeriesConfigLabel { + /** Specifies whether or not to show a label when the point has a zero value. */ + showForZeroValues?: boolean; + } + export interface ChartSeriesConfigLabel extends SeriesConfigLabel { + /** Specifies how to align point labels relative to the corresponding data points that they represent. */ + alignment?: string; + /** Specifies how to shift point labels horizontally from their initial positions. */ + horizontalOffset?: number; + /** Specifies how to shift point labels vertically from their initial positions. */ + verticalOffset?: number; + /** Specifies a precision for the percentage values displayed in the labels of a full-stacked-like series. */ + percentPrecision?: number; + } + export interface BaseCommonSeriesConfig { + /** Specifies the data source field that provides arguments for series points. */ + argumentField?: string; + axis?: string; + /** An object defining the label configuration options for a series in the dxChart widget. */ + label?: ChartSeriesConfigLabel; + /** Specifies border options for point labels. */ + border?: viz.core.DashedBorder; + /** Specifies a series color. */ + color?: string; + /** Specifies the dash style of the series' line. */ + dashStyle?: string; + hoverMode?: string; + hoverStyle?: { + /** An object defining the border options for a hovered series. */ + border?: viz.core.DashedBorder; + /**

Sets a color for a series when it is hovered over.

*/ + color?: string; + /** Specifies the dash style for the line in a hovered series. */ + dashStyle?: string; + hatching?: viz.core.Hatching; + /** Specifies the width of a line in a hovered series. */ + width?: number; + }; + /** Specifies whether a chart ignores null data points or not. */ + ignoreEmptyPoints?: boolean; + /** Specifies how many points are acceptable to be in a series to display all labels for these points. Otherwise, the labels will not be displayed. */ + maxLabelCount?: number; + /** Specifies the minimal length of a displayed bar in pixels. */ + minBarSize?: number; + /** Specifies opacity for a series. */ + opacity?: number; + /** Specifies the series elements to highlight when the series is selected. */ + selectionMode?: string; + selectionStyle?: { + /** An object defining the border options for a selected series. */ + border?: viz.core.DashedBorder; + /** Sets a color for a series when it is selected. */ + color?: string; + /** Specifies the dash style for the line in a selected series. */ + dashStyle?: string; + hatching?: viz.core.Hatching; + /** Specifies the width of a line in a selected series. */ + width?: number; + }; + /** Specifies whether or not to show the series in the chart's legend. */ + showInLegend?: boolean; + /** Specifies the name of the stack where the values of the _stackedBar_ series must be located. */ + stack?: string; + /** Specifies the name of the data source field that provides data about a point. */ + tagField?: string; + /** Specifies the data source field that provides values for series points. */ + valueField?: string; + /** Specifies the visibility of a series. */ + visible?: boolean; + /** Specifies a line width. */ + width?: number; + /** Configures error bars. */ + valueErrorBar?: { + /** Specifies whether error bars must be displayed in full or partially. */ + displayMode?: string; + /** Specifies the data field that provides data for low error values. */ + lowValueField?: string; + /** Specifies the data field that provides data for high error values. */ + highValueField?: string; + /** Specifies how error bar values must be calculated. */ + type?: string; + /** Specifies the value to be used for generating error bars. */ + value?: number; + /** Specifies the color of error bars. */ + color?: string; + /** Specifies the opacity of error bars. */ + opacity?: number; + /** Specifies the length of the lines that indicate the error bar edges. */ + edgeLength?: number; + /** Specifies the width of the error bar line. */ + lineWidth?: number; + }; + } + export interface CommonPointOptions { + /** Specifies border options for points in the line and area series. */ + border?: viz.core.Border; + /** Specifies the points color. */ + color?: string; + /** Specifies what series points to highlight when a point is hovered over. */ + hoverMode?: string; + /** An object defining configuration options for a hovered point. */ + hoverStyle?: { + /** An object defining the border options for a hovered point. */ + border?: viz.core.Border; + /** Sets a color for a point when it is hovered over. */ + color?: string; + /** Specifies the diameter of a hovered point in the series that represents data points as symbols (not as bars for instance). */ + size?: number; + }; + /** Specifies what series points to highlight when a point is selected. */ + selectionMode?: string; + /** An object defining configuration options for a selected point. */ + selectionStyle?: { + /** An object defining the border options for a selected point. */ + border?: viz.core.Border; + /**

Sets a color for a point when it is selected.

*/ + color?: string; + /** Specifies the diameter of a selected point in the series that represents data points as symbols (not as bars for instance). */ + size?: number; + }; + /** Specifies the point diameter in pixels for those series that represent data points as symbols (not as bars for instance). */ + size?: number; + /** Specifies a symbol for presenting points of the line and area series. */ + symbol?: string; + visible?: boolean; + } + export interface ChartCommonPointOptions extends CommonPointOptions { + /** An object specifying the parameters of an image that is used as a point marker. */ + image?: { + /** Specifies the height of an image that is used as a point marker. */ + height?: any; + /** Specifies a URL leading to the image to be used as a point marker. */ + url?: any; + /** Specifies the width of an image that is used as a point marker. */ + width?: any; + }; + } + export interface PolarCommonPointOptions extends CommonPointOptions { + /** An object specifying the parameters of an image that is used as a point marker. */ + image?: { + /** Specifies the height of an image that is used as a point marker. */ + height?: number; + /** Specifies a URL leading to the image to be used as a point marker. */ + url?: string; + /** Specifies the width of an image that is used as a point marker. */ + width?: number; + }; + } + /** An object that defines configuration options for chart series. */ + export interface CommonSeriesConfig extends BaseCommonSeriesConfig { + /** Specifies the data source field that provides a 'close' value for a _candleStick_ or _stock_ series. */ + closeValueField?: string; + /** Specifies a radius for bar corners. */ + cornerRadius?: number; + /** Specifies the data source field that provides a 'high' value for a _candleStick_ or _stock_ series. */ + highValueField?: string; + /** Specifies the color for the body (rectangle) of a _candleStick_ series. */ + innerColor?: string; + /** Specifies the data source field that provides a 'low' value for a _candleStick_ or _stock_ series. */ + lowValueField?: string; + /** Specifies the data source field that provides an 'open' value for a _candleStick_ or _stock_ series. */ + openValueField?: string; + /** Specifies the pane that will be used to display a series. */ + pane?: string; + /** An object defining configuration options for points in line-, scatter- and area-like series. */ + point?: ChartCommonPointOptions; + /** Specifies the data source field that provides values for one end of a range series. To set the data source field for the other end of the range series, use the rangeValue2Field property. */ + rangeValue1Field?: string; + /** Specifies the data source field that provides values for the second end of a range series. To set the data source field for the other end of the range series, use the rangeValue1Field property. */ + rangeValue2Field?: string; + /** Specifies reduction options for the stock or candleStick series. */ + reduction?: { + /** Specifies a color for the points whose reduction level price is lower in comparison to the value in the previous point. */ + color?: string; + /** Specifies for which price level (open, high, low or close) to enable reduction options in the series. */ + level?: string; + }; + /** Specifies the data source field that defines the size of bubbles. */ + sizeField?: string; + } + export interface CommonSeriesSettings extends CommonSeriesConfig { + /**

An object that specifies configuration options for all series of the area type in the chart.

*/ + area?: CommonSeriesConfig; + /** An object that specifies configuration options for all series of the _bar_ type in the chart. */ + bar?: CommonSeriesConfig; + /** An object that specifies configuration options for all series of the bubble type in the chart. */ + bubble?: CommonSeriesConfig; + /** An object that specifies configuration options for all series of the _candleStick_ type in the chart. */ + candlestick?: CommonSeriesConfig; + /** An object that specifies configuration options for all series of the _fullStackedArea_ type in the chart. */ + fullstackedarea?: CommonSeriesConfig; + /** An object that specifies configuration options for all series of the Full-Stacked Spline Area type in the chart. */ + fullstackedsplinearea?: CommonSeriesConfig; + /** An object that specifies configuration options for all series of the _fullStackedBar_ type in the chart. */ + fullstackedbar?: CommonSeriesConfig; + /** An object that specifies configuration options for all series of the _fullStackedLine_ type in the chart. */ + fullstackedline?: CommonSeriesConfig; + /** An object that specifies configuration options for all series of the Full-Stacked Spline type in the chart. */ + fullstackedspline?: CommonSeriesConfig; + /** An object that specifies configuration options for all series of the _line_ type in the chart. */ + line?: CommonSeriesConfig; + /** An object that specifies configuration options for all series of the _rangeArea_ type in the chart. */ + rangearea?: CommonSeriesConfig; + /** An object that specifies configuration options for all series of the _rangeBar_ type in the chart. */ + rangebar?: CommonSeriesConfig; + /** An object that specifies configuration options for all series of the _scatter_ type in the chart. */ + scatter?: CommonSeriesConfig; + /** An object that specifies configuration options for all series of the _spline_ type in the chart. */ + spline?: CommonSeriesConfig; + /** An object that specifies configuration options for all series of the _splineArea_ type in the chart. */ + splinearea?: CommonSeriesConfig; + /** An object that specifies configuration options for all series of the _stackedArea_ type in the chart. */ + stackedarea?: CommonSeriesConfig; + /** An object that specifies configuration options for all series of the Stacked Spline Area type in the chart. */ + stackedsplinearea?: CommonSeriesConfig; + /** An object that specifies configuration options for all series of the _stackedBar_ type in the chart. */ + stackedbar?: CommonSeriesConfig; + /** An object that specifies configuration options for all series of the _stackedLine_ type in the chart. */ + stackedline?: CommonSeriesConfig; + /** An object that specifies configuration options for all series of the Stacked Spline type in the chart. */ + stackedspline?: CommonSeriesConfig; + /** An object that specifies configuration options for all series of the _stepArea_ type in the chart. */ + steparea?: CommonSeriesConfig; + /** An object that specifies configuration options for all series of the _stepLine_ type in the chart. */ + stepline?: CommonSeriesConfig; + /** An object that specifies configuration options for all series of the _stock_ type in the chart. */ + stock?: CommonSeriesConfig; + /** Sets a series type. */ + type?: string; + } + export interface SeriesConfig extends CommonSeriesConfig { + /** Specifies the name that identifies the series. */ + name?: string; + /** Specifies data about a series. */ + tag?: any; + /** Sets the series type. */ + type?: string; + } + /** An object that defines configuration options for polar chart series. */ + export interface CommonPolarSeriesConfig extends BaseCommonSeriesConfig { + /** Specifies whether or not to close the chart by joining the end point with the first point. */ + closed?: boolean; + label?: SeriesConfigLabel; + point?: PolarCommonPointOptions; + } + export interface CommonPolarSeriesSettings extends CommonPolarSeriesConfig { + /** An object that specifies configuration options for all series of the area type in the chart. */ + area?: CommonPolarSeriesConfig; + /** An object that specifies configuration options for all series of the _bar_ type in the chart. */ + bar?: CommonPolarSeriesConfig; + /** An object that specifies configuration options for all series of the _line_ type in the chart. */ + line?: CommonPolarSeriesConfig; + /** An object that specifies configuration options for all series of the _scatter_ type in the chart. */ + scatter?: CommonPolarSeriesConfig; + /** An object that specifies configuration options for all series of the _stackedBar_ type in the chart. */ + stackedbar?: CommonPolarSeriesConfig; + /** Sets a series type. */ + type?: string; + } + export interface PolarSeriesConfig extends CommonPolarSeriesConfig { + /** Specifies the name that identifies the series. */ + name?: string; + /** Specifies data about a series. */ + tag?: any; + /** Sets the series type. */ + type?: string; + } + export interface PieSeriesConfigLabel extends BaseSeriesConfigLabel { + /** Specifies how to shift labels from their initial position in a radial direction in pixels. */ + radialOffset?: number; + /** Specifies a precision for the percentage values displayed in labels. */ + percentPrecision?: number; + } + /** An object that defines configuration options for chart series. */ + export interface CommonPieSeriesConfig { + /** Specifies the data source field that provides arguments for series points. */ + argumentField?: string; + /** Specifies the required type for series arguments. */ + argumentType?: string; + /** An object defining the series border configuration options. */ + border?: viz.core.DashedBorder; + /** Specifies a series color. */ + color?: string; + /** Specifies the chart elements to highlight when a series is hovered over. */ + hoverMode?: string; + /** An object defining configuration options for a hovered series. */ + hoverStyle?: { + /** An object defining the border options for a hovered series. */ + border?: viz.core.DashedBorder; + /** Sets a color for the series when it is hovered over. */ + color?: string; + /** Specifies the hatching options to be applied when a point is hovered over. */ + hatching?: viz.core.Hatching; + }; + /** Specifies the fraction of the inner radius relative to the total radius in the series of the 'doughnut' type. */ + innerRadius?: number; + /** An object defining the label configuration options. */ + label?: PieSeriesConfigLabel; + /** Specifies how many points are acceptable to be in a series to display all labels for these points. Otherwise, the labels will not be displayed. */ + maxLabelCount?: number; + /** Specifies a minimal size of a displayed pie segment. */ + minSegmentSize?: number; + /** Specifies the direction in which the dxPieChart's series points are located. */ + segmentsDirection?: string; + /**

Specifies the chart elements to highlight when the series is selected.

*/ + selectionMode?: string; + /** An object defining configuration options for the series when it is selected. */ + selectionStyle?: { + /** An object defining the border options for a selected series. */ + border?: viz.core.DashedBorder; + /** Sets a color for a series when it is selected. */ + color?: string; + /** Specifies the hatching options to be applied when a point is selected. */ + hatching?: viz.core.Hatching; + }; + /** Specifies chart segment grouping options. */ + smallValuesGrouping?: { + /** Specifies the name of the grouped chart segment. This name represents the segment in the chart legend. */ + groupName?: string; + /** Specifies the segment grouping mode. */ + mode?: string; + /** Specifies a threshold for segment values. */ + threshold?: number; + /** Specifies how many segments must not be grouped. */ + topCount?: number; + }; + /** Specifies a start angle for a pie chart in arc degrees. */ + startAngle?: number; + /**

Specifies the name of the data source field that provides data about a point.

*/ + tagField?: string; + /** Specifies the data source field that provides values for series points. */ + valueField?: string; + } + export interface PieSeriesConfig extends CommonPieSeriesConfig { + /** Sets the series type. */ + type?: string; + } + export interface SeriesTemplate { + /** Specifies a callback function that returns a series object with individual series settings. */ + customizeSeries?: (seriesName: string) => SeriesConfig; + /** Specifies a data source field that represents the series name. */ + nameField?: string; + } + export interface PolarSeriesTemplate { + /** Specifies a callback function that returns a series object with individual series settings. */ + customizeSeries?: (seriesName: string) => PolarSeriesConfig; + /** Specifies a data source field that represents the series name. */ + nameField?: string; + } + export interface ChartCommonConstantLineLabel { + /** Specifies font options for a constant line label. */ + font?: viz.core.Font; + /** Specifies the position of the constant line label relative to the chart plot. */ + position?: string; + /** Indicates whether or not to display labels for the axis constant lines. */ + visible?: boolean; + } + export interface PolarCommonConstantLineLabel { + /** Indicates whether or not to display labels for the axis constant lines. */ + visible?: boolean; + /** Specifies font options for a constant line label. */ + font?: viz.core.Font; + } + export interface ConstantLineStyle { + /** Specifies a color for a constant line. */ + color?: string; + /** Specifies a dash style for a constant line. */ + dashStyle?: string; + /** Specifies a constant line width in pixels. */ + width?: number; + } + export interface ChartCommonConstantLineStyle extends ConstantLineStyle { + /** An object defining constant line label options. */ + label?: ChartCommonConstantLineLabel; + /** Specifies the space between the constant line label and the left/right side of the constant line. */ + paddingLeftRight?: number; + /** Specifies the space between the constant line label and the top/bottom side of the constant line. */ + paddingTopBottom?: number; + } + export interface PolarCommonConstantLineStyle extends ConstantLineStyle { + /** An object defining constant line label options. */ + label?: PolarCommonConstantLineLabel; + } + export interface CommonAxisLabel { + /** Specifies font options for axis labels. */ + font?: viz.core.Font; + /** Specifies the spacing between an axis and its labels in pixels. */ + indentFromAxis?: number; + /** Indicates whether or not axis labels are visible. */ + visible?: boolean; + } + export interface ChartCommonAxisLabel extends CommonAxisLabel { + /** Specifies the label's position relative to the tick (grid line). */ + alignment?: string; + /** Specifies the overlap resolving algorithm to be applied to axis labels. */ + overlappingBehavior?: { + /** Specifies how to arrange axis labels. */ + mode?: string; + /** Specifies the angle used to rotate axis labels. */ + rotationAngle?: number; + /** Specifies the spacing that must be set between staggered rows when the 'stagger' algorithm is applied. */ + staggeringSpacing?: number; + }; + } + export interface PolarCommonAxisLabel extends CommonAxisLabel { + /** Specifies the overlap resolving algorithm to be applied to axis labels. */ + overlappingBehavior?: string; + } + export interface CommonAxisTitle { + /** Specifies font options for an axis title. */ + font?: viz.core.Font; + /** Specifies a margin for an axis title in pixels. */ + margin?: number; + } + export interface BaseCommonAxisSettings { + /** Specifies the color of the line that represents an axis. */ + color?: string; + /** Specifies whether ticks/grid lines of a discrete axis are located between labels or cross the labels. */ + discreteAxisDivisionMode?: string; + /** An object defining the configuration options for the grid lines of an axis in the dxPolarChart widget. */ + grid?: { + /** Specifies a color for grid lines. */ + color?: string; + /** Specifies an opacity for grid lines. */ + opacity?: number; + /** Indicates whether or not the grid lines of an axis are visible. */ + visible?: boolean; + /** Specifies the width of grid lines. */ + width?: number; + }; + /** Specifies the options of the minor grid. */ + minorGrid?: { + /** Specifies a color for the lines of the minor grid. */ + color?: string; + /** Specifies an opacity for the lines of the minor grid. */ + opacity?: number; + /** Indicates whether the minor grid is visible or not. */ + visible?: boolean; + /** Specifies a width for the lines of the minor grid. */ + width?: number; + }; + /** Indicates whether or not an axis is inverted. */ + inverted?: boolean; + /** Specifies the opacity of the line that represents an axis. */ + opacity?: number; + /** Indicates whether or not to set ticks/grid lines of a continuous axis of the 'date-time' type at the beginning of each date-time interval. */ + setTicksAtUnitBeginning?: boolean; + /** An object defining the configuration options for axis ticks. */ + tick?: { + /** Specifies ticks color. */ + color?: string; + /** Specifies tick opacity. */ + opacity?: number; + /** Indicates whether or not ticks are visible on an axis. */ + visible?: boolean; + }; + /** Specifies the options of the minor ticks. */ + minorTick?: { + /** Specifies a color for the minor ticks. */ + color?: string; + /** Specifies an opacity for the minor ticks. */ + opacity?: number; + /** Indicates whether or not the minor ticks are displayed on an axis. */ + visible?: boolean; + }; + /** Indicates whether or not the line that represents an axis in a chart is visible. */ + visible?: boolean; + /** Specifies the width of the line that represents an axis in the chart. */ + width?: number; + } + export interface ChartCommonAxisSettings extends BaseCommonAxisSettings { + /** Specifies the appearance of all the widget's constant lines. */ + constantLineStyle?: ChartCommonConstantLineStyle; + /** An object defining the label configuration options that are common for all axes in the dxChart widget. */ + label?: ChartCommonAxisLabel; + /** Specifies a coefficient that determines the spacing between the maximum series point and the axis. */ + maxValueMargin?: number; + /** Specifies a coefficient that determines the spacing between the minimum series point and the axis. */ + minValueMargin?: number; + /** Specifies, in pixels, the space reserved for an axis. */ + placeholderSize?: number; + /** An object defining configuration options for strip style. */ + stripStyle?: { + /** An object defining the configuration options for a strip label style. */ + label?: { + /** Specifies font options for a strip label. */ + font?: viz.core.Font; + /** Specifies the label's position on a strip. */ + horizontalAlignment?: string; + /** Specifies a label's position on a strip. */ + verticalAlignment?: string; + }; + /** Specifies the spacing, in pixels, between the left/right strip border and the strip label. */ + paddingLeftRight?: number; + /** Specifies the spacing, in pixels, between the top/bottom strip borders and the strip label. */ + paddingTopBottom?: number; + }; + /** An object defining the title configuration options that are common for all axes in the dxChart widget. */ + title?: CommonAxisTitle; + /** Indicates whether or not to display series with indents from axis boundaries. */ + valueMarginsEnabled?: boolean; + } + export interface PolarCommonAxisSettings extends BaseCommonAxisSettings { + /** Specifies the appearance of all the widget's constant lines. */ + constantLineStyle?: PolarCommonConstantLineStyle; + /** An object defining the label configuration options that are common for all axes in the dxPolarChart widget. */ + label?: PolarCommonAxisLabel; + /** An object defining configuration options for strip style. */ + stripStyle?: { + /** An object defining the configuration options for a strip label style. */ + label?: { + /** Specifies font options for a strip label. */ + font?: viz.core.Font; + }; + }; + } + export interface ChartConstantLineLabel extends ChartCommonConstantLineLabel { + /** Specifies the horizontal alignment of a constant line label. */ + horizontalAlignment?: string; + /** Specifies the vertical alignment of a constant line label. */ + verticalAlignment?: string; + /** Specifies the text to be displayed in a constant line label. */ + text?: string; + } + export interface PolarConstantLineLabel extends PolarCommonConstantLineLabel { + /** Specifies the text to be displayed in a constant line label. */ + text?: string; + } + export interface AxisLabel { + /** Specifies the text for a hint that appears when a user hovers the mouse pointer over a label on the value axis. */ + customizeHint?: (argument: { value: any; valueText: string }) => string; + /** Specifies a callback function that returns the text to be displayed in value axis labels. */ + customizeText?: (argument: { value: any; valueText: string }) => string; + /** Specifies a format for the text displayed by axis labels. */ + format?: string; + /** Specifies a precision for the formatted value displayed in the axis labels. */ + precision?: number; + } + export interface ChartAxisLabel extends ChartCommonAxisLabel, AxisLabel { } + export interface PolarAxisLabel extends PolarCommonAxisLabel, AxisLabel { } + export interface AxisTitle extends CommonAxisTitle { + /** Specifies the text for the value axis title. */ + text?: string; + } + export interface ChartConstantLineStyle extends ChartCommonConstantLineStyle { + /** An object defining constant line label options. */ + label?: ChartConstantLineLabel; + } + export interface ChartConstantLine extends ChartConstantLineStyle { + /** An object defining constant line label options. */ + label?: ChartConstantLineLabel; + /** Specifies a value to be displayed by a constant line. */ + value?: any; + } + export interface PolarConstantLine extends PolarCommonConstantLineStyle { + /** An object defining constant line label options. */ + label?: PolarConstantLineLabel; + /** Specifies a value to be displayed by a constant line. */ + value?: any; + } + export interface Axis { + /** Specifies a coefficient for dividing the value axis. */ + axisDivisionFactor?: number; + /** Specifies the order in which discrete values are arranged on the value axis. */ + categories?: Array; + /** Specifies the value to be raised to a power when generating ticks for a logarithmic axis. */ + logarithmBase?: number; + /** Specifies an interval between axis ticks/grid lines. */ + tickInterval?: any; + /** Specifies the interval between minor ticks. */ + minorTickInterval?: any; + /** Specifies the number of minor ticks between two neighboring major ticks. */ + minorTickCount?: number; + /** Specifies the required type of the value axis. */ + type?: string; + /** Specifies the pane on which the current value axis will be displayed. */ + pane?: string; + /** Specifies options for value axis strips. */ + strips?: Array; + } + export interface ChartAxis extends ChartCommonAxisSettings, Axis { + /** Defines an array of the value axis constant lines. */ + constantLines?: Array; + /** Specifies the appearance options for the constant lines of the value axis. */ + constantLineStyle?: ChartCommonConstantLineStyle; + /** Specifies options for value axis labels. */ + label?: ChartAxisLabel; + /** Specifies the maximum value on the value axis. */ + max?: any; + /** Specifies the minimum value on the value axis. */ + min?: any; + /** Specifies the position of the value axis on a chart. */ + position?: string; + /** Specifies the title for a value axis. */ + title?: AxisTitle; + } + export interface PolarAxis extends PolarCommonAxisSettings, Axis { + /** Defines an array of the value axis constant lines. */ + constantLines?: Array; + /** Specifies options for value axis labels. */ + label?: PolarAxisLabel; + } + export interface ArgumentAxis { + /** Specifies the desired type of axis values. */ + argumentType?: string; + /** Specifies the elements that will be highlighted when the argument axis is hovered over. */ + hoverMode?: string; + } + export interface ChartArgumentAxis extends ChartAxis, ArgumentAxis { } + export interface PolarArgumentAxis extends PolarAxis, ArgumentAxis { + /** Specifies a start angle for the argument axis in degrees. */ + startAngle?: number; + /** Specifies whether or not to display the first point at the angle specified by the startAngle option. */ + firstPointOnStartAngle?: boolean; + /** Specifies the period of the argument values in the data source. */ + period?: number; + } + export interface ValueAxis { + /** Specifies the name of the value axis. */ + name?: string; + /** Specifies whether or not to indicate a zero value on the value axis. */ + showZero?: boolean; + /** Specifies the desired type of axis values. */ + valueType?: string; + } + export interface ChartValueAxis extends ChartAxis, ValueAxis { + /** Specifies the spacing, in pixels, between multiple value axes in a chart. */ + multipleAxesSpacing?: number; + /** Specifies the value by which the chart's value axes are synchronized. */ + synchronizedValue?: number; + } + export interface PolarValueAxis extends PolarAxis, ValueAxis { + /** Indicates whether to display series with indents from axis boundaries. */ + valueMarginsEnabled?: boolean; + /** Specifies a coefficient that determines the spacing between the maximum series point and the axis. */ + maxValueMargin?: number; + /** Specifies a coefficient that determines the spacing between the minimum series point and the axis. */ + minValueMargin?: number; + tick?: { + visible?: boolean; + } + } + export interface CommonPane { + /** Specifies a background color in a pane. */ + backgroundColor?: string; + /** Specifies the border options of a chart's pane. */ + border?: PaneBorder; + } + export interface Pane extends CommonPane { + /** Specifies the name of a pane. */ + name?: string; + } + export interface PaneBorder extends viz.core.DashedBorderWithOpacity { + /** Specifies the bottom border's visibility state in a pane. */ + bottom?: boolean; + /** Specifies the left border's visibility state in a pane. */ + left?: boolean; + /** Specifies the right border's visibility state in a pane. */ + right?: boolean; + /** Specifies the top border's visibility state in a pane. */ + top?: boolean; + } + export interface ChartAnimation extends viz.core.Animation { + /** Specifies the maximum series point count in the chart that the animation supports. */ + maxPointCountSupported?: number; + } + export interface BaseChartTooltip extends viz.core.Tooltip { + /** Specifies a format for arguments of the chart's series points. */ + argumentFormat?: string; + /** Specifies a precision for formatted arguments displayed in tooltips. */ + argumentPrecision?: number; + /** Specifies a precision for a percent value displayed in tooltips for stacked series and dxPieChart series. */ + percentPrecision?: number; + } + export interface BaseChartOptions 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. */ + width?: number; + /** Specifies the height of the widget container 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; + }; + /** Specifies animation options. */ + animation?: ChartAnimation; + /** Specifies a callback function that returns an object with options for a specific point label. */ + customizeLabel?: (labelInfo: Object) => Object; + /** Specifies a callback function that returns an object with options for a specific point. */ + customizePoint?: (pointInfo: Object) => Object; + /** Specifies a data source for the chart. */ + dataSource?: any; + done?: Function; + /** Specifies the appearance of the loading indicator. */ + loadingIndicator?: viz.core.LoadingIndicator; + /** Specifies options of a dxChart's (dxPieChart's) legend. */ + legend?: core.BaseLegend; + /** Specifies the blank space between the chart's extreme elements and the boundaries of the area provided for the widget (see size) in pixels. */ + margin?: viz.core.Margins; + /** Sets the name of the palette to be used in the chart. Alternatively, an array of colors can be set as a custom palette to be used within this chart. */ + palette?: any; + /** A handler for the done event. */ + onDone?: (e: { + component: BaseChart; + element: Element; + }) => void; + /** A handler for the pointClick event. */ + onPointClick?: any; + pointClick?: any; + /** A handler for the pointHoverChanged event. */ + onPointHoverChanged?: (e: { + component: BaseChart; + element: Element; + target: TPoint; + }) => void; + pointHoverChanged?: (point: TPoint) => void; + /** A handler for the pointSelectionChanged event. */ + onPointSelectionChanged?: (e: { + component: BaseChart; + element: Element; + target: TPoint; + }) => void; + pointSelectionChanged?: (point: TPoint) => void; + /** Specifies whether a single point or multiple points can be selected in the chart. */ + pointSelectionMode?: string; + /** Specifies whether to redraw the widget when the size of the parent browser window changes or a mobile device rotates. */ + redrawOnResize?: boolean; + /** Specifies options for the dxChart and dxPieChart widget series. */ + series?: any; + /** Specifies the size of the widget in pixels. */ + size?: viz.core.Size; + /** Specifies a title for the chart. */ + title?: { + /** Specifies font options for the title. */ + font?: viz.core.Font; + /** Specifies the title's horizontal position in the chart. */ + horizontalAlignment?: string; + /** Specifies a title's position on the chart in the vertical direction. */ + verticalAlignment?: string; + /** Specifies the distance between the title and surrounding chart elements in pixels. */ + margin?: viz.core.Margins; + /** Specifies the height of the space reserved for the title. */ + placeholderSize?: number; + /** Specifies a text for the chart's title. */ + text?: string; + }; + /** Specifies tooltip options. */ + tooltip?: BaseChartTooltip; + /** A handler for the tooltipShown event. */ + onTooltipShown?: (e: { + component: BaseChart; + element: Element; + target: BasePoint; + }) => void; + /** A handler for the tooltipHidden event. */ + onTooltipHidden?: (e: { + component: BaseChart; + element: Element; + target: BasePoint; + }) => void; + tooltipHidden?: (point: TPoint) => void; + tooltipShown?: (point: TPoint) => void; + } + /** A base class for all chart widgets included in the ChartJS library. */ + export class BaseChart extends viz.core.BaseWidget { + /** Deselects the chart's selected series. The series is displayed in an initial style. */ + clearSelection(): void; + /** Gets the current size of the widget. */ + getSize(): { width: number; height: number }; + /** Displays the loading indicator. */ + showLoadingIndicator(): void; + /** Conceals the loading indicator. */ + hideLoadingIndicator(): void; + /** Hides all widget tooltips. */ + hideTooltip(): void; + /** Redraws a widget. */ + render(renderOptions?: { + force?: boolean; + animate?: boolean; + asyncSeriesRendering?: boolean; + }): void; + } + export interface AdvancedLegend extends core.BaseLegend { + /** Specifies the text for a hint that appears when a user hovers the mouse pointer over a legend item. */ + customizeHint?: (seriesInfo: { seriesName: string; seriesIndex: number; seriesColor: string; }) => string; + /**

Specifies a callback function that returns the text to be displayed by legend items.

*/ + customizeText?: (seriesInfo: { seriesName: string; seriesIndex: number; seriesColor: string; }) => string; + /** Specifies what series elements to highlight when a corresponding item in the legend is hovered over. */ + hoverMode?: string; + } + export interface AdvancedOptions extends BaseChartOptions { + /** A handler for the argumentAxisClick event. */ + onArgumentAxisClick?: any; + /** Specifies the color of the parent page element. */ + containerBackgroundColor?: string; + /** An object providing options for managing data from a data source. */ + dataPrepareSettings?: { + /** Specifies whether or not to validate the values from a data source. */ + checkTypeForAllData?: boolean; + /** Specifies whether or not to convert the values from a data source into the data type of an axis. */ + convertToAxisDataType?: boolean; + /** Specifies how to sort the series points. */ + sortingMethod?: any; + }; + /** A handler for the legendClick event. */ + onLegendClick?: any; + /** A handler for the seriesClick event. */ + onSeriesClick?: any; + /** A handler for the seriesHoverChanged event. */ + onSeriesHoverChanged?: (e: { + component: BaseChart; + element: Element; + target: TSeries; + }) => void; + /** A handler for the seriesSelectionChanged event. */ + onSeriesSelectionChanged?: (e: { + component: BaseChart; + element: Element; + target: TSeries; + }) => void; + /** Specifies whether a single series or multiple series can be selected in the chart. */ + seriesSelectionMode?: string; + /** Specifies how the chart must behave when series point labels overlap. */ + resolveLabelOverlapping?: string; + } + export interface Legend extends AdvancedLegend { + /** Specifies whether the legend is located outside or inside the chart's plot. */ + position?: string; + } + export interface ChartTooltip extends BaseChartTooltip { + /** Specifies whether the tooltip must be located in the center of a bar or on its edge. Applies to the Bar and Bubble series. */ + location?: string; + /** Specifies the kind of information to display in a tooltip. */ + shared?: boolean; + } + export interface dxChartOptions extends AdvancedOptions { + /** Specifies a value indicating whether all bars in a series must have the same width, or may have different widths if any points in other series are missing. */ + equalBarWidth?: any; + adaptiveLayout?: { + keepLabels?: boolean; + }; + /** Indicates whether or not to synchronize value axes when they are displayed on a single pane. */ + synchronizeMultiAxes?: boolean; + /** Specifies whether or not to filter the series points depending on their quantity. */ + useAggregation?: boolean; + /** Indicates whether or not to adjust a value axis to the current minimum and maximum values of a zoomed chart. */ + adjustOnZoom?: boolean; + /** Specifies argument axis options for the dxChart widget. */ + argumentAxis?: ChartArgumentAxis; + argumentAxisClick?: any; + /** An object defining the configuration options that are common for all axes of the dxChart widget. */ + commonAxisSettings?: ChartCommonAxisSettings; + /** An object defining the configuration options that are common for all panes in the dxChart widget. */ + commonPaneSettings?: CommonPane; + /** An object defining the configuration options that are common for all series of the dxChart widget. */ + commonSeriesSettings?: CommonSeriesSettings; + /** An object that specifies the appearance options of the chart crosshair. */ + crosshair?: { + /** Specifies a color for the crosshair lines. */ + color?: string; + /** Specifies a dash style for the crosshair lines. */ + dashStyle?: string; + /** Specifies whether to enable the crosshair or not. */ + enabled?: boolean; + /** Specifies the opacity of the crosshair lines. */ + opacity?: number; + /** Specifies the width of the crosshair lines. */ + width?: number; + /** Specifies the appearance of the horizontal crosshair line. */ + horizontalLine?: CrosshaierWithLabel; + /** Specifies the appearance of the vertical crosshair line. */ + verticalLine?: CrosshaierWithLabel; + /** Specifies the options of the crosshair labels. */ + label?: { + /** Specifies a color for the background of the crosshair labels. */ + backgroundColor?: string; + /** Specifies whether the crosshair labels are visible or not. */ + visible?: boolean; + /** Specifies font options for the text of the crosshair labels. */ + font?: viz.core.Font; + } + }; + /** Specifies a default pane for the chart's series. */ + defaultPane?: string; + /** Specifies a coefficient determining the diameter of the largest bubble. */ + maxBubbleSize?: number; + /** Specifies the diameter of the smallest bubble measured in pixels. */ + minBubbleSize?: number; + /** Defines the dxChart widget's pane(s). */ + panes?: Array; + /** Swaps the axes round so that the value axis becomes horizontal and the argument axes becomes vertical. */ + rotated?: boolean; + /** Specifies the options of a chart's legend. */ + legend?: Legend; + /** Specifies options for dxChart widget series. */ + series?: Array; + legendClick?: any; + seriesClick?: any; + seriesHoverChanged?: (series: ChartSeries) => void; + seriesSelectionChanged?: (series: ChartSeries) => void; + /** Defines options for the series template. */ + seriesTemplate?: SeriesTemplate; + /** Specifies tooltip options. */ + tooltip?: ChartTooltip; + /** Specifies value axis options for the dxChart widget. */ + valueAxis?: Array; + /** Enables scrolling in your chart. */ + scrollingMode?: string; + /** Enables zooming in your chart. */ + zoomingMode?: string; + /** Specifies the settings of the scroll bar. */ + scrollBar?: { + /** Specifies whether the scroll bar is visible or not. */ + visible?: boolean; + /** Specifies the spacing between the scroll bar and the chart's plot in pixels. */ + offset?: number; + /** Specifies the color of the scroll bar. */ + color?: string; + /** Specifies the width of the scroll bar in pixels. */ + width?: number; + /** Specifies the opacity of the scroll bar. */ + opacity?: number; + /** Specifies the position of the scroll bar in the chart. */ + position?: string; + }; + } + /** A widget used to embed charts into HTML JS applications. */ + export class dxChart extends BaseChart { + constructor(element: JQuery, options?: dxChartOptions); + constructor(element: Element, options?: dxChartOptions); + /** Returns an array of all series in the chart. */ + getAllSeries(): Array; + /** Gets a series within the chart's series collection by the specified name (see the name option). */ + getSeriesByName(seriesName: string): ChartSeries; + /** Gets a series within the chart's series collection by its position number. */ + getSeriesByPos(seriesIndex: number): ChartSeries; + /** Sets the specified start and end values for the chart's argument axis. */ + zoomArgument(startValue: any, endValue: any): void; + } + interface CrosshaierWithLabel extends viz.core.DashedBorderWithOpacity { + /** Configures the label that belongs to the horizontal crosshair line. */ + label?: { + /** Specifies a color for the background of the label that belongs to the horizontal crosshair line. */ + backgroundColor?: string; + /** Specifies whether the label of the horizontal crosshair line is visible or not. */ + visible?: boolean; + /** Specifies font options for the text of the label that belongs to the horizontal crosshair line. */ + font?: viz.core.Font; + } + } + export interface PolarChartTooltip extends BaseChartTooltip { + /** Specifies the kind of information to display in a tooltip. */ + shared?: boolean; + } + export interface dxPolarChartOptions extends AdvancedOptions { + /** Specifies a value indicating whether all bars in a series must have the same angle, or may have different angles if any points in other series are missing. */ + equalBarWidth?: boolean; + /** Specifies adaptive layout options. */ + adaptiveLayout?: { + width?: number; + height?: number; + /** Specifies whether or not point labels can be hidden when the layout is adapting. */ + keepLabels?: boolean; + }; + /** Indicates whether or not to display a "spider web". */ + useSpiderWeb?: boolean; + /** Specifies argument axis options for the dxPolarChart widget. */ + argumentAxis?: PolarArgumentAxis; + /** An object defining the configuration options that are common for all axes of the dxPolarChart widget. */ + commonAxisSettings?: PolarCommonAxisSettings; + /** An object defining the configuration options that are common for all series of the dxPolarChart widget. */ + commonSeriesSettings?: CommonPolarSeriesSettings; + /** Specifies the options of a chart's legend. */ + legend?: AdvancedLegend; + /** Specifies options for dxPolarChart widget series. */ + series?: Array; + /** Defines options for the series template. */ + seriesTemplate?: PolarSeriesTemplate; + /** Specifies tooltip options. */ + tooltip?: PolarChartTooltip; + /** Specifies value axis options for the dxPolarChart widget. */ + valueAxis?: PolarValueAxis; + } + /** A chart widget displaying data in a polar coordinate system. */ + export class dxPolarChart extends BaseChart { + constructor(element: JQuery, options?: dxPolarChartOptions); + constructor(element: Element, options?: dxPolarChartOptions); + /** Returns an array of all series in the chart. */ + getAllSeries(): Array; + /** Gets a series within the chart's series collection by the specified name (see the name option). */ + getSeriesByName(seriesName: string): PolarSeries; + /** Gets a series within the chart's series collection by its position number. */ + getSeriesByPos(seriesIndex: number): PolarSeries; + } + export interface PieLegend extends core.BaseLegend { + /** Specifies what chart elements to highlight when a corresponding item in the legend is hovered over. */ + hoverMode?: string; + /** Specifies the text for a hint that appears when a user hovers the mouse pointer over a legend item. */ + customizeHint?: (pointInfo: { pointName: string; pointIndex: number; pointColor: string; }) => string; + /** Specifies a callback function that returns the text to be displayed by a legend item. */ + customizeText?: (pointInfo: { pointName: string; pointIndex: number; pointColor: string; }) => string; + } + export interface dxPieChartOptions extends BaseChartOptions { + /** Specifies adaptive layout options. */ + adaptiveLayout?: { + /** Specifies whether or not point labels can be hidden when the layout is adapting. */ + keepLabels?: boolean; + }; + /** Specifies dxPieChart legend options. */ + legend?: PieLegend; + /** Specifies options for the series of the dxPieChart widget. */ + series?: Array; + /** Specifies the diameter of the pie. */ + diameter?: number; + /** A handler for the legendClick event. */ + onLegendClick?: any; + legendClick?: any; + /** Specifies how a chart must behave when series point labels overlap. */ + resolveLabelOverlapping?: string; + } + /** A circular chart widget for HTML JS applications. */ + export class dxPieChart extends BaseChart { + constructor(element: JQuery, options?: dxPieChartOptions); + constructor(element: Element, options?: dxPieChartOptions); + /** Provides access to the dxPieChart series. */ + getSeries(): PieSeries; + } +} +interface JQuery { + dxChart(options?: DevExpress.viz.charts.dxChartOptions): JQuery; + dxChart(methodName: string, ...params: any[]): any; + dxChart(methodName: "instance"): DevExpress.viz.charts.dxChart; + dxPieChart(options?: DevExpress.viz.charts.dxPieChartOptions): JQuery; + dxPieChart(methodName: string, ...params: any[]): any; + dxPieChart(methodName: "instance"): DevExpress.viz.charts.dxPieChart; + dxPolarChart(options?: DevExpress.viz.charts.dxPolarChartOptions): JQuery; + dxPolarChart(methodName: string, ...params: any[]): any; + dxPolarChart(methodName: "instance"): DevExpress.viz.charts.dxPolarChart; +} +declare module DevExpress.viz.gauges { + export interface BaseRangeContainer { + /** Specifies a range container's background color. */ + backgroundColor?: string; + /** Specifies the offset of the range container from an invisible scale line in pixels. */ + offset?: number; + /** Sets the name of the palette or an array of colors to be used for coloring the gauge range container. */ + palette?: any; + /** An array of objects representing ranges contained in the range container. */ + ranges?: Array<{ startValue: number; endValue: number; color: string }>; + /** Specifies a color of a range. */ + color?: string; + /** Specifies an end value of a range. */ + endValue?: number; + /** Specifies a start value of a range. */ + startValue?: number; + } + export interface ScaleTick { + /** Specifies the color of the scale's minor ticks. */ + color?: string; + /** Specifies an array of custom minor ticks. */ + customTickValues?: Array; + /** Specifies the length of the scale's minor ticks. */ + length?: number; + /** Indicates whether automatically calculated minor ticks are visible or not. */ + showCalculatedTicks?: boolean; + /** Specifies an interval between minor ticks. */ + tickInterval?: number; + /** Indicates whether scale minor ticks are visible or not. */ + visible?: boolean; + /** Specifies the width of the scale's minor ticks. */ + width?: number; + } + export interface ScaleMajorTick extends ScaleTick { + /** Specifies whether or not to expand the current major tick interval if labels overlap each other. */ + useTicksAutoArrangement?: boolean; + } + export interface BaseScaleLabel { + /** Specifies whether or not scale labels should be colored similarly to their corresponding ranges in the range container. */ + useRangeColors?: boolean; + /** Specifies a callback function that returns the text to be displayed in scale labels. */ + customizeText?: (scaleValue: { value: number; valueText: string }) => string; + /** Specifies font options for the text displayed in the scale labels of the gauge. */ + font?: viz.core.Font; + /** Specifies a format for the text displayed in scale labels. */ + format?: string; + /** Specifies a precision for the formatted value displayed in the scale labels. */ + precision?: number; + /** Specifies whether or not scale labels are visible on the gauge. */ + visible?: boolean; + } + export interface BaseScale { + /** Specifies the end value for the scale of the gauge. */ + endValue?: number; + /** Specifies whether or not to hide the first scale label. */ + hideFirstLabel?: boolean; + /** Specifies whether or not to hide the first major tick on the scale. */ + hideFirstTick?: boolean; + /** Specifies whether or not to hide the last scale label. */ + hideLastLabel?: boolean; + /** Specifies whether or not to hide the last major tick on the scale. */ + hideLastTick?: boolean; + /** Specifies common options for scale labels. */ + label?: BaseScaleLabel; + /** Specifies options of the gauge's major ticks. */ + majorTick?: ScaleMajorTick; + /** Specifies options of the gauge's minor ticks. */ + minorTick?: ScaleTick; + /** Specifies the start value for the scale of the gauge. */ + startValue?: number; + } + export interface BaseValueIndicator { + /** Specifies the type of subvalue indicators. */ + type?: string; + /** Specifies the background color for the indicator of the rangeBar type. */ + backgroundColor?: string; + /** Specifies the base value for the indicator of the rangeBar type. */ + baseValue?: number; + /** Specifies a color of the indicator. */ + color?: string; + /** Specifies the range bar size for an indicator of the rangeBar type. */ + size?: number; + text?: { + /** Specifies a callback function that returns the text to be displayed in an indicator. */ + customizeText?: (indicatedValue: { value: number; valueText: string }) => string; + font?: viz.core.Font; + /** Specifies a format for the text displayed in an indicator. */ + format?: string; + /** Specifies the range bar's label indent in pixels. */ + indent?: number; + /** Specifies a precision for the formatted value displayed by an indicator. */ + precision?: number; + }; + offset?: number; + length?: number; + width?: number; + /** Specifies the length of an arrow for the indicator of the textCloud type in pixels. */ + arrowLength?: number; + /** Sets the array of colors to be used for coloring subvalue indicators. */ + palette?: Array; + /** Specifies the distance between the needle and the center of a gauge for the indicator of a needle-like type. */ + indentFromCenter?: number; + /** Specifies the second color for the indicator of the twoColorNeedle type. */ + secondColor?: string; + /** Specifies the length of a twoNeedleColor type indicator tip as a percentage. */ + secondFraction?: number; + /** Specifies the spindle's diameter in pixels for the indicator of a needle-like type. */ + spindleSize?: number; + /** Specifies the inner diameter in pixels, so that the spindle has the shape of a ring. */ + spindleGapSize?: number; + /** Specifies the orientation of the rangeBar indicator on a vertically oriented dxLinearGauge widget. */ + horizontalOrientation?: string; + /** Specifies the orientation of the rangeBar indicator on a horizontally oriented dxLinearGauge widget. */ + verticalOrientation?: string; + } + export interface SharedGaugeOptions { + /** Specifies animation options. */ + animation?: viz.core.Animation; + /** Specifies the appearance of the loading indicator. */ + loadingIndicator?: viz.core.LoadingIndicator; + /** Specifies whether to redraw the widget when the size of the parent browser window changes or a mobile device rotates. */ + redrawOnResize?: boolean; + /** Specifies the size of the widget in pixels. */ + size?: viz.core.Size; + /** Specifies a subtitle for a gauge. */ + subtitle?: { + /** Specifies font options for the subtitle. */ + font?: viz.core.Font; + /** Specifies a text for the subtitle. */ + text?: string; + }; + /** Specifies a title for a gauge. */ + title?: { + /** Specifies font options for the title. */ + font?: viz.core.Font; + /** Specifies a title's position on the gauge. */ + position?: string; + /** Specifies a text for the title. */ + text?: string; + }; + /** Specifies options for gauge tooltips. */ + tooltip?: viz.core.Tooltip; + /** A handler for the tooltipShown event. */ + onTooltipShown?: (e: { + component: dxBaseGauge; + element: Element; + target: {}; + }) => void; + /** A handler for the tooltipHidden event. */ + onTooltipHidden?: (e: { + component: dxBaseGauge; + element: Element; + target: {}; + }) => void; + } + export interface BaseGaugeOptions extends viz.core.BaseWidgetOptions, SharedGaugeOptions { + /** Specifies the color of the parent page element. */ + containerBackgroundColor?: string; + /** Specifies the blank space in pixels between the widget's extreme elements and the boundaries of the area provided for the widget (see the size option). */ + margin?: viz.core.Margins; + /** Specifies options of the gauge's range container. */ + rangeContainer?: BaseRangeContainer; + /** Specifies a gauge's scale options. */ + scale?: BaseScale; + /** Specifies the appearance options of subvalue indicators. */ + subvalueIndicator?: BaseValueIndicator; + /** Specifies a set of subvalues to be designated by the subvalue indicators. */ + subvalues?: Array; + /** Specifies the main value on a gauge. */ + value?: number; + /** Specifies the appearance options of the value indicator. */ + valueIndicator?: BaseValueIndicator; + } + /** A gauge widget. */ + export class dxBaseGauge extends viz.core.BaseWidget { + /** Displays the loading indicator. */ + showLoadingIndicator(): void; + /** Conceals the loading indicator. */ + hideLoadingIndicator(): void; + /** Redraws a widget. */ + render(): void; + /** Returns the main gauge value. */ + value(): number; + /** Updates a gauge value. */ + value(value: number): void; + /** Returns an array of gauge subvalues. */ + subvalues(): Array; + /** Updates gauge subvalues. */ + subvalues(subvalues: Array): void; + } + export interface LinearRangeContainer extends BaseRangeContainer { + /** Specifies the orientation of the range container on a vertically oriented dxLinearGauge widget. */ + horizontalOrientation?: string; + /** Specifies the orientation of a range container on a horizontally oriented dxLinearGauge widget. */ + verticalOrientation?: string; + /** Specifies the width of the range container's start and end boundaries in the dxLinearGauge widget. */ + width?: any; + /** Specifies an end width of a range container. */ + end?: number; + /** Specifies a start width of a range container. */ + start?: number; + } + export interface LinearScaleLabel extends BaseScaleLabel { + /** Specifies the spacing between scale labels and ticks. */ + indentFromTick?: number; + } + export interface LinearScale extends BaseScale { + /** Specifies the orientation of scale ticks on a vertically oriented dxLinearGauge widget. */ + horizontalOrientation?: string; + label?: LinearScaleLabel; + /** Specifies the orientation of scale ticks on a horizontally oriented dxLinearGauge widget. */ + verticalOrientation?: string; + } + export interface dxLinearGaugeOptions extends BaseGaugeOptions { + /** Specifies the options required to set the geometry of the dxLinearGauge widget. */ + geometry?: { + /** Indicates whether to display the dxLinearGauge widget vertically or horizontally. */ + orientation?: string; + }; + /** Specifies gauge range container options. */ + rangeContainer?: LinearRangeContainer; + scale?: LinearScale; + } + /** A widget that represents a gauge with a linear scale. */ + export class dxLinearGauge extends dxBaseGauge { + constructor(element: JQuery, options?: dxLinearGaugeOptions); + constructor(element: Element, options?: dxLinearGaugeOptions); + } + export interface CircularRangeContainer extends BaseRangeContainer { + /** Specifies the orientation of the range container in the dxCircularGauge widget. */ + orientation?: string; + /** Specifies the range container's width in pixels. */ + width?: number; + } + export interface CircularScaleLabel extends BaseScaleLabel { + /** Specifies the spacing between scale labels and ticks. */ + indentFromTick?: number; + } + export interface CircularScale extends BaseScale { + label?: CircularScaleLabel; + /** Specifies the orientation of scale ticks. */ + orientation?: string; + } + export interface dxCircularGaugeOptions extends BaseGaugeOptions { + /** Specifies the options required to set the geometry of the dxCircularGauge widget. */ + geometry?: { + /** Specifies the end angle of the circular gauge's arc. */ + endAngle?: number; + /** Specifies the start angle of the circular gauge's arc. */ + startAngle?: number; + }; + /** Specifies gauge range container options. */ + rangeContainer?: CircularRangeContainer; + scale?: CircularScale; + } + /** A widget that represents a gauge with a circular scale. */ + export class dxCircularGauge extends dxBaseGauge { + constructor(element: JQuery, options?: dxCircularGaugeOptions); + constructor(element: Element, options?: dxCircularGaugeOptions); + } + export interface dxBarGaugeOptions extends viz.core.BaseWidgetOptions, SharedGaugeOptions { + /** Specifies a color for the remaining segment of the bar's track. */ + backgroundColor?: string; + /** Specifies a distance between bars in pixels. */ + barSpacing?: number; + /** Specifies a base value for bars. */ + baseValue?: number; + /** Specifies an end value for the gauge's invisible scale. */ + endValue?: number; + /** Defines the shape of the gauge's arc. */ + geometry?: { + /** Specifies the end angle of the bar gauge's arc. */ + endAngle?: number; + /** Specifies the start angle of the bar gauge's arc. */ + startAngle?: number; + }; + /** Specifies the options of the labels that accompany gauge bars. */ + label?: { + /** Specifies a color for the label connector text. */ + connectorColor?: string; + /** Specifies the width of the label connector in pixels. */ + connectorWidth?: number; + /** Specifies a callback function that returns a text for labels. */ + customizeText?: (barValue: { value: number; valueText: string }) => string; + /** Specifies font options for bar labels. */ + font?: viz.core.Font; + /** Specifies a format for bar labels. */ + format?: string; + /** Specifies the distance between the upper bar and bar labels in pixels. */ + indent?: number; + /** Specifies a precision for the formatted value displayed by labels. */ + precision?: number; + /** Specifies whether bar labels appear on a gauge or not. */ + visible?: boolean; + }; + /** Sets the name of the palette or an array of colors to be used for coloring the gauge range container. */ + palette?: string; + /** Defines the radius of the bar that is closest to the center relatively to the radius of the topmost bar. */ + relativeInnerRadius?: number; + /** Specifies a start value for the gauge's invisible scale. */ + startValue?: number; + /** Specifies the array of values to be indicated on a bar gauge. */ + values?: Array; + } + /** A circular bar widget. */ + export class dxBarGauge extends viz.core.BaseWidget { + constructor(element: JQuery, options?: dxBarGaugeOptions); + constructor(element: Element, options?: dxBarGaugeOptions); + /** Displays the loading indicator. */ + showLoadingIndicator(): void; + /** Conceals the loading indicator. */ + hideLoadingIndicator(): void; + /** Redraws the widget. */ + render(): void; + /** Returns an array of gauge values. */ + values(): Array; + /** Updates the values displayed by a gauge. */ + values(values: Array): void; + } +} +interface JQuery { + dxLinearGauge(options?: DevExpress.viz.gauges.dxLinearGaugeOptions): JQuery; + dxLinearGauge(methodName: string, ...params: any[]): any; + dxLinearGauge(methodName: "instance"): DevExpress.viz.gauges.dxLinearGauge; + dxCircularGauge(options?: DevExpress.viz.gauges.dxCircularGaugeOptions): JQuery; + dxCircularGauge(methodName: string, ...params: any[]): any; + dxCircularGauge(methodName: "instance"): DevExpress.viz.gauges.dxCircularGauge; + dxBarGauge(options?: DevExpress.viz.gauges.dxBarGaugeOptions): JQuery; + dxBarGauge(methodName: string, ...params: any[]): any; + dxBarGauge(methodName: "instance"): DevExpress.viz.gauges.dxBarGauge; +} +declare module DevExpress.viz.rangeSelector { + export interface dxRangeSelectorOptions extends viz.core.BaseWidgetOptions { + /** Specifies the options for the range selector's background. */ + background?: { + /** Specifies the background color for the dxRangeSelector. */ + color?: string; + /** Specifies image options. */ + image?: { + /** Specifies a location for the image in the background of a range selector. */ + location?: string; + /** Specifies the image's URL. */ + url?: string; + }; + /** Indicates whether or not the background (background color and/or image) is visible. */ + visible?: boolean; + }; + /** Specifies the dxRangeSelector's behavior options. */ + behavior?: { + /** Indicates whether or not you can swap sliders. */ + allowSlidersSwap?: boolean; + /** Indicates whether or not animation is enabled. */ + animationEnabled?: boolean; + /** Specifies when to call the onSelectedRangeChanged function. */ + callSelectedRangeChanged?: string; + /** Indicates whether or not an end user can specify the range using a mouse, without the use of sliders. */ + manualRangeSelectionEnabled?: boolean; + /** Indicates whether or not an end user can shift the selected range to the required location on a scale by clicking. */ + moveSelectedRangeByClick?: boolean; + /** Indicates whether to snap a slider to ticks. */ + snapToTicks?: boolean; + }; + /** Specifies the options required to display a chart as the range selector's background. */ + chart?: { + /** Specifies a coefficient for determining an indent from the bottom background boundary to the lowest chart point. */ + bottomIndent?: number; + /** An object defining the common configuration options for the chart’s series. */ + commonSeriesSettings?: viz.charts.CommonSeriesSettings; + /** An object providing options for managing data from a data source. */ + dataPrepareSettings?: { + /** Specifies whether or not to validate values from a data source. */ + checkTypeForAllData?: boolean; + /** Specifies whether or not to convert the values from a data source into the data type of an axis. */ + convertToAxisDataType?: boolean; + /** Specifies how to sort series points. */ + sortingMethod?: any; + }; + /** Specifies a value indicating whether all bars in a series must have the same width, or may have different widths if any points in other series are missing. */ + equalBarWidth?: any; + /** Sets the name of the palette to be used in the range selector's chart. Alternatively, an array of colors can be set as a custom palette to be used within this chart. */ + palette?: any; + /** An object defining the chart’s series. */ + series?: Array; + /** Defines options for the series template. */ + seriesTemplate?: viz.charts.SeriesTemplate; + /** Specifies a coefficient for determining an indent from the background's top boundary to the topmost chart point. */ + topIndent?: number; + /** Specifies whether or not to filter the series points depending on their quantity. */ + useAggregation?: boolean; + /** Specifies options for the chart's value axis. */ + valueAxis?: { + /** Indicates whether or not the chart's value axis must be inverted. */ + inverted?: boolean; + /** Specifies the value to be raised to a power when generating ticks for a logarithmic value axis. */ + logarithmBase?: number; + /** Specifies the maximum value of the chart's value axis. */ + max?: number; + /** Specifies the minimum value of the chart's value axis. */ + min?: number; + /** Specifies the type of the value axis. */ + type?: string; + /** Specifies the desired type of axis values. */ + valueType?: string; + }; + }; + /** Specifies the color of the parent page element. */ + containerBackgroundColor?: string; + /** Specifies a data source for the scale values and for the chart at the background. */ + dataSource?: any; + /** Specifies the data source field that provides data for the scale. */ + dataSourceField?: string; + /** Specifies the appearance of the loading indicator. */ + loadingIndicator?: viz.core.LoadingIndicator; + /** Specifies the blank space in pixels between the dxRangeSelector widget's extreme elements and the boundaries of the area provided for the widget (see size). */ + margin?: viz.core.Margins; + /** Specifies whether to redraw the widget when the size of the parent browser window changes or a mobile device rotates. */ + redrawOnResize?: boolean; + /** Specifies options of the range selector's scale. */ + scale?: { + /** Specifies the scale's end value. */ + endValue?: any; + /** Specifies common options for scale labels. */ + label?: { + /** Specifies a callback function that returns the text to be displayed in scale labels. */ + customizeText?: (scaleValue: { value: any; valueText: string; }) => string; + /** Specifies font options for the text displayed in the range selector's scale labels. */ + font?: viz.core.Font; + /** Specifies a format for the text displayed in scale labels. */ + format?: string; + /** Specifies a precision for the formatted value displayed in the scale labels. */ + precision?: number; + /** Specifies a spacing between scale labels and the background bottom edge. */ + topIndent?: number; + /** Specifies whether or not the scale's labels are visible. */ + visible?: boolean; + }; + /** Specifies the value to be raised to a power when generating ticks for a logarithmic scale. */ + logarithmBase?: number; + /** Specifies an interval between major ticks. */ + majorTickInterval?: any; + /** Specifies options for the date-time scale's markers. */ + marker?: { + /** Defines the options that can be set for the text that is displayed by the scale markers. */ + label?: { + /** Specifies a callback function that returns the text to be displayed in scale markers. */ + customizeText?: (markerValue: { value: any; valueText: string }) => string; + /** Specifies a format for the text displayed in scale markers. */ + format?: string; + }; + /** Specifies the height of the marker's separator. */ + separatorHeight?: number; + /** Specifies the space between the marker label and the marker separator. */ + textLeftIndent?: number; + /** Specifies the space between the marker's label and the top edge of the marker's separator. */ + textTopIndent?: number; + /** Specified the indent between the marker and the scale lables. */ + topIndent?: number; + /** Indicates whether scale markers are visible. */ + visible?: boolean; + }; + /** Specifies the maximum range that can be selected. */ + maxRange?: any; + /** Specifies the number of minor ticks between neighboring major ticks. */ + minorTickCount?: number; + /** Specifies an interval between minor ticks. */ + minorTickInterval?: any; + /** Specifies the minimum range that can be selected. */ + minRange?: any; + /** Specifies the height of the space reserved for the scale in pixels. */ + placeholderHeight?: number; + /** Indicates whether or not to set ticks of a date-time scale at the beginning of each date-time interval. */ + setTicksAtUnitBeginning?: boolean; + /** Specifies whether or not to show ticks for the boundary scale values, when neither major ticks nor minor ticks are created for these values. */ + showCustomBoundaryTicks?: boolean; + /** Indicates whether or not to show minor ticks on the scale. */ + showMinorTicks?: boolean; + /** Specifies the scale's start value. */ + startValue?: any; + /** Specifies options defining the appearance of scale ticks. */ + tick?: { + /** Specifies the color of scale ticks (both major and minor ticks). */ + color?: string; + /** Specifies the opacity of scale ticks (both major and minor ticks). */ + opacity?: number; + /** Specifies the width of the scale's ticks (both major and minor ticks). */ + width?: number; + }; + /** Specifies the type of the scale. */ + type?: string; + /** Specifies whether or not to expand the current tick interval if labels overlap each other. */ + useTicksAutoArrangement?: boolean; + /** Specifies the type of values on the scale. */ + valueType?: string; + /** Specifies the order of arguments on a discrete scale. */ + categories?: Array; + }; + /** Specifies the range to be selected when displaying the dxRangeSelector. */ + selectedRange?: { + /** Specifies the start value of the range to be selected when displaying the dxRangeSelector widget on a page. */ + startValue?: any; + /** Specifies the end value of the range to be selected when displaying the dxRangeSelector widget on a page. */ + endValue?: any; + }; + /** Specifies the color of the selected range. */ + selectedRangeColor?: string; + /** Range selector's indent options. */ + indent?: { + /** Specifies range selector's left indent. */ + left?: number; + /** Specifies range selector's right indent. */ + right?: number; + }; + selectedRangeChanged?: (selectedRange: { startValue: any; endValue: any; }) => void; + /** A handler for the selectedRangeChanged event. */ + onSelectedRangeChanged?: (e: { + startValue: any; + endValue: any; + component: dxRangeSelector; + element: Element; + }) => void; + /** Specifies range selector shutter options. */ + shutter?: { + /** Specifies shutter color. */ + color?: string; + /** Specifies the opacity of the color of shutters. */ + opacity?: number; + }; + /** Specifies in pixels the size of the dxRangeSelector widget. */ + size?: viz.core.Size; + /** Specifies the appearance of the range selector's slider handles. */ + sliderHandle?: { + /** Specifies the color of the slider handles. */ + color?: string; + /** Specifies the opacity of the slider handles. */ + opacity?: number; + /** Specifies the width of the slider handles. */ + width?: number; + }; + /** Defines the options of the range selector slider markers. */ + sliderMarker?: { + /** Specifies the color of the slider markers. */ + color?: string; + /** Specifies a callback function that returns the text to be displayed by slider markers. */ + customizeText?: (scaleValue: { value: any; valueText: any; }) => string; + /** Specifies font options for the text displayed by the range selector slider markers. */ + font?: viz.core.Font; + /** Specifies a format for the text displayed in slider markers. */ + format?: string; + /** Specifies the color used for the slider marker text when the currently selected range does not match the minRange and maxRange values. */ + invalidRangeColor?: string; + /** + * Specifies the empty space between the marker's border and the marker’s text. + * @deprecated Use the 'paddingTopBottom' and 'paddingLeftRight' options instead + */ + padding?: number; + /** Specifies the empty space between the marker's top and bottom borders and the marker's text. */ + paddingTopBottom?: number; + /** Specifies the empty space between the marker's left and right borders and the marker's text. */ + paddingLeftRight?: number; + /** Specifies the placeholder height of the slider marker. */ + placeholderHeight?: number; + /** + * Specifies in pixels the height and width of the space reserved for the range selector slider markers. + * @deprecated Use the 'placeholderHeight' and 'indent' options instead + */ + placeholderSize?: { + /** Specifies the height of the placeholder for the left and right slider markers. */ + height?: number; + /** Specifies the width of the placeholder for the left and right slider markers. */ + width?: { + /** Specifies the width of the left slider marker's placeholder. */ + left?: number; + /** Specifies the width of the right slider marker's placeholder. */ + right?: number; + }; + }; + /** Specifies a precision for the formatted value displayed in slider markers. */ + precision?: number; + /** Indicates whether or not the slider markers are visible. */ + visible?: boolean; + }; + } + /** A widget that allows end users to select a range of values on a scale. */ + export class dxRangeSelector extends viz.core.BaseWidget { + constructor(element: JQuery, options?: dxRangeSelectorOptions); + constructor(element: Element, options?: dxRangeSelectorOptions); + /** Displays the loading indicator. */ + showLoadingIndicator(): void; + /** Conceals the loading indicator. */ + hideLoadingIndicator(): void; + /** Redraws a widget. */ + render(skipChartAnimation?: boolean): void; + /** Returns the currently selected range. */ + getSelectedRange(): { startValue: any; endValue: any; }; + /** Sets a specified range. */ + setSelectedRange(selectedRange: { startValue: any; endValue: any; }): void; + } +} +interface JQuery { + dxRangeSelector(options?: DevExpress.viz.rangeSelector.dxRangeSelectorOptions): JQuery; + dxRangeSelector(methodName: string, ...params: any[]): any; + dxRangeSelector(methodName: "instance"): DevExpress.viz.rangeSelector.dxRangeSelector; +} +declare module DevExpress.viz.map { + /** This section describes the fields and methods that can be used in code to manipulate the Area object. */ + export interface Area { + /** Contains the element type. */ + type: string; + /** Return the value of an attribute. */ + attribute(name: string): any; + /** Provides information about the selection state of an area. */ + selected(): boolean; + /** Sets a new selection state for an area. */ + selected(state: boolean): void; + /** Applies the area settings specified as a parameter and updates the area appearance. */ + applySettings(settings: any): void; + } + /** This section describes the fields and methods that can be used in code to manipulate the Markers object. */ + export interface Marker { + /** Contains the descriptive text accompanying the map marker. */ + text: string; + /** Contains the type of the element. */ + type: string; + /** Contains the URL of an image map marker. */ + url: string; + /** Contains the value of a bubble map marker. */ + value: number; + /** Contains the values of a pie map marker. */ + values: Array; + /** Returns the value of an attribute. */ + attribute(name: string): any; + /** Returns the coordinates of a specific marker. */ + coordinates(): Array; + /** Provides information about the selection state of a marker. */ + selected(): boolean; + /** Sets a new selection state for a marker. */ + selected(state: boolean): void; + /** Applies the marker settings specified as a parameter and updates the marker appearance. */ + applySettings(settings: any): void; + } + export interface AreaSettings { + /** Specifies the width of the area border in pixels. */ + borderWidth?: number; + /** Specifies a color for the area border. */ + borderColor?: string; + click?: any; + /** Specifies a color for an area. */ + color?: string; + /** Specifies the function that customizes each area individually. */ + customize?: (areaInfo: Area) => AreaSettings; + /** Specifies a color for the area border when the area is hovered over. */ + hoveredBorderColor?: string; + /** Specifies the pixel-measured width of the area border when the area is hovered over. */ + hoveredBorderWidth?: number; + /** Specifies a color for an area when this area is hovered over. */ + hoveredColor?: string; + /** Specifies whether or not to change the appearance of an area when it is hovered over. */ + hoverEnabled?: boolean; + /** Configures area labels. */ + label?: { + /** Specifies the data field that provides data for area labels. */ + dataField?: string; + /** Enables area labels. */ + enabled?: boolean; + /** Specifies font options for area labels. */ + font?: viz.core.Font; + }; + /** Specifies the name of the palette or a custom range of colors to be used for coloring a map. */ + palette?: any; + /** Specifies the number of colors in a palette. */ + paletteSize?: number; + /** Allows you to paint areas with similar attributes in the same color. */ + colorGroups?: Array; + /** Specifies the field that provides data to be used for coloring areas. */ + colorGroupingField?: string; + /** Specifies a color for the area border when the area is selected. */ + selectedBorderColor?: string; + /** Specifies a color for an area when this area is selected. */ + selectedColor?: string; + /** Specifies the pixel-measured width of the area border when the area is selected. */ + selectedBorderWidth?: number; + selectionChanged?: (area: Area) => void; + /** Specifies whether single or multiple areas can be selected on a vector map. */ + selectionMode?: string; + } + export interface MarkerSettings { + /** Specifies a color for the marker border. */ + borderColor?: string; + /** Specifies the width of the marker border in pixels. */ + borderWidth?: number; + click?: any; + /** Specifies a color for a marker of the dot or bubble type. */ + color?: string; + /** Specifies the function that customizes each marker individually. */ + customize?: (markerInfo: Marker) => MarkerSettings; + font?: Object; + /** Specifies the pixel-measured width of the marker border when the marker is hovered over. */ + hoveredBorderWidth?: number; + /** Specifies a color for the marker border when the marker is hovered over. */ + hoveredBorderColor?: string; + /** Specifies a color for a marker of the dot or bubble type when this marker is hovered over. */ + hoveredColor?: string; + /** Specifies whether or not to change the appearance of a marker when it is hovered over. */ + hoverEnabled?: boolean; + /** Specifies marker label options. */ + label?: { + /** Enables marker labels. */ + enabled?: boolean; + /** Specifies font options for marker labels. */ + font?: viz.core.Font; + }; + /** Specifies the pixel-measured diameter of the marker that represents the biggest value. Setting this option makes sense only if you use markers of the bubble type. */ + maxSize?: number; + /** Specifies the pixel-measured diameter of the marker that represents the smallest value. Setting this option makes sense only if you use markers of the bubble type. */ + minSize?: number; + /** Specifies the opacity of markers. Setting this option makes sense only if you use markers of the bubble type. */ + opacity?: number; + /** Specifies the pixel-measured width of the marker border when the marker is selected. */ + selectedBorderWidth?: number; + /** Specifies a color for the marker border when the marker is selected. */ + selectedBorderColor?: string; + /** Specifies a color for a marker of the dot or bubble type when this marker is selected. */ + selectedColor?: string; + selectionChanged?: (marker: Marker) => void; + /** Specifies whether a single or multiple markers can be selected on a vector map. */ + selectionMode?: string; + /** Specifies the size of markers. Setting this option makes sense for any type of marker except bubble. */ + size?: number; + /** Specifies the type of markers to be used on the map. */ + type?: string; + /** Specifies the name of a palette or a custom set of colors to be used for coloring markers of the pie type. */ + palette?: any; + /** Allows you to paint markers with similar attributes in the same color. */ + colorGroups?: Array; + /** Specifies the field that provides data to be used for coloring markers. */ + colorGroupingField?: string; + /** Allows you to display bubbles with similar attributes in the same size. */ + sizeGroups?: Array; + /** Specifies the field that provides data to be used for sizing bubble markers. */ + sizeGroupingField?: string; + } + export interface dxVectorMapOptions extends viz.core.BaseWidgetOptions { + /** An object specifying options for the map areas. */ + areaSettings?: AreaSettings; + /** Specifies the options for the map background. */ + background?: { + /** Specifies a color for the background border. */ + borderColor?: string; + /** Specifies a color for the background. */ + color?: string; + }; + /** Specifies the positioning of a map in geographical coordinates. */ + bounds?: Array; + /** Specifies the options of the control bar. */ + controlBar?: { + /** Specifies a color for the outline of the control bar elements. */ + borderColor?: string; + /** Specifies a color for the inner area of the control bar elements. */ + color?: string; + /** Specifies whether or not to display the control bar. */ + enabled?: boolean; + /** Specifies the margin of the control bar in pixels. */ + margin?: number; + /** Specifies the position of the control bar. */ + horizontalAlignment?: string; + /** Specifies the position of the control bar. */ + verticalAlignment?: string; + /** Specifies the opacity of the Control_Bar. */ + opacity?: number; + }; + /** Specifies the appearance of the loading indicator. */ + loadingIndicator?: viz.core.LoadingIndicator; + /** Specifies a data source for the map area. */ + mapData?: any; + /** Specifies a data source for the map markers. */ + markers?: any; + /** An object specifying options for the map markers. */ + markerSettings?: MarkerSettings; + /** Specifies the size of the dxVectorMap widget. */ + size?: viz.core.Size; + /** Specifies tooltip options. */ + tooltip?: viz.core.Tooltip; + /** Configures map legends. */ + legends?: Array; + /** Specifies whether or not the map should respond when a user rolls the mouse wheel. */ + wheelEnabled?: boolean; + /** Specifies whether the map should respond to touch gestures. */ + touchEnabled?: boolean; + /** Disables the zooming capability. */ + zoomingEnabled?: boolean; + /** Specifies the geographical coordinates of the center for a map. */ + center?: Array; + centerChanged?: (center: Array) => void; + /** A handler for the centerChanged event. */ + onCenterChanged?: (e: { + center: Array; + component: dxVectorMap; + element: Element; + }) => void; + /** A handler for the tooltipShown event. */ + onTooltipShown?: (e: { + component: dxVectorMap; + element: Element; + target: {}; + }) => void; + /** A handler for the tooltipHidden event. */ + onTooltipHidden?: (e: { + component: dxVectorMap; + element: Element; + target: {}; + }) => void; + /** Specifies a number that is used to zoom a map initially. */ + zoomFactor?: number; + /** Specifies a map's maximum zoom factor. */ + maxZoomFactor?: number; + zoomFactorChanged?: (zoomFactor: number) => void; + /** A handler for the zoomFactorChanged event. */ + onZoomFactorChanged?: (e: { + zoomFactor: number; + component: dxVectorMap; + element: Element; + }) => void; + click?: any; + /** A handler for the click event. */ + onClick?: any; + /** A handler for the areaClick event. */ + onAreaClick?: any; + /** A handler for the areaSelectionChanged event. */ + onAreaSelectionChanged?: (e: { + target: Area; + component: dxVectorMap; + element: Element; + }) => void; + /** A handler for the markerClick event. */ + onMarkerClick?: any; + /** A handler for the markerSelectionChanged event. */ + onMarkerSelectionChanged?: (e: { + target: Marker; + component: dxVectorMap; + element: Element; + }) => void; + /** Disables the panning capability. */ + panningEnabled?: boolean; + } + export interface Legend extends viz.core.BaseLegend { + /** Specifies text for legend items. */ + customizeText?: (itemInfo: { start: number; end: number; index: number; color: string; size: number; }) => string; + /** Specifies text for a hint that appears when a user hovers the mouse pointer over the text of a legend item. */ + customizeHint?: (itemInfo: { start: number; end: number; index: number; color: string; size: number }) => string; + /** Specifies the source of data for the legend. */ + source?: string; + } + /** A vector map widget. */ + export class dxVectorMap extends viz.core.BaseWidget { + constructor(element: JQuery, options?: dxVectorMapOptions); + constructor(element: Element, options?: dxVectorMapOptions); + /** Displays the loading indicator. */ + showLoadingIndicator(): void; + /** Conceals the loading indicator. */ + hideLoadingIndicator(): void; + /** Redraws a widget. */ + render(): void; + /** Gets the current coordinates of the map center. */ + center(): Array; + /** Sets the coordinates of the map center. */ + center(centerCoordinates: Array): void; + /** Deselects all the selected areas on a map. The areas are displayed in their initial style after. */ + clearAreaSelection(): void; + /** Deselects all the selected markers on a map. The markers are displayed in their initial style after. */ + clearMarkerSelection(): void; + /** Deselects all the selected area and markers on a map at once. The areas and markers are displayed in their initial style after. */ + clearSelection(): void; + /** Converts client area coordinates into map coordinates. */ + convertCoordinates(x: number, y: number): Array; + /** Returns an array with all the map areas. */ + getAreas(): Array; + /** Returns an array with all the map markers. */ + getMarkers(): Array; + /** Gets the current coordinates of the map viewport. */ + viewport(): Array; + /** Sets the coordinates of the map viewport. */ + viewport(viewportCoordinates: Array): void; + /** Gets the current value of the map zoom factor. */ + zoomFactor(): number; + /** Sets the value of the map zoom factor. */ + zoomFactor(zoomFactor: number): void; + } +} +interface JQuery { + dxVectorMap(options?: DevExpress.viz.map.dxVectorMapOptions): JQuery; + dxVectorMap(methodName: string, ...params: any[]): any; + dxVectorMap(methodName: "instance"): DevExpress.viz.map.dxVectorMap; +} +declare module DevExpress.viz.sparklines { + export interface SparklineTooltip extends viz.core.Tooltip { + /** + * Specifies how a tooltip is horizontally aligned relative to the graph. + * @deprecated Tooltip alignment is no more available. + */ + horizontalAlignment?: string; + /** + * Specifies how a tooltip is vertically aligned relative to the graph. + * @deprecated Tooltip alignment is no more available. + */ + verticalAlignment?: string; + } + export interface BaseSparklineOptions extends viz.core.BaseWidgetOptions { + /** Specifies the blank space between the widget's extreme elements and the boundaries of the area provided for the widget in pixels. */ + margin?: viz.core.Margins; + /** Specifies the size of the widget. */ + size?: viz.core.Size; + /** Specifies tooltip options. */ + tooltip?: SparklineTooltip; + /** A handler for the tooltipShown event. */ + onTooltipShown?: (e: { + component: BaseSparkline; + element: Element; + }) => void; + /** A handler for the tooltipHidden event. */ + onTooltipHidden?: (e: { + component: BaseSparkline; + element: Element; + }) => void; + } + /** Overridden by descriptions for particular widgets. */ + export class BaseSparkline extends viz.core.BaseWidget { + /** Redraws a widget. */ + render(): void; + } + export interface dxBulletOptions extends BaseSparkline { + /** Specifies a color for the bullet bar. */ + color?: string; + /** Specifies an end value for the invisible scale. */ + endScaleValue?: number; + /** Specifies whether or not to show the target line. */ + showTarget?: boolean; + /** Specifies whether or not to show the line indicating zero on the invisible scale. */ + showZeroLevel?: boolean; + /** Specifies a start value for the invisible scale. */ + startScaleValue?: number; + /** Specifies the value indicated by the target line. */ + target?: number; + /** Specifies a color for both the target and zero level lines. */ + targetColor?: string; + /** Specifies the width of the target line. */ + targetWidth?: number; + /** Specifies the primary value indicated by the bullet bar. */ + value?: number; + } + /** A bullet graph widget. */ + export class dxBullet extends BaseSparkline { + constructor(element: JQuery, options?: dxBulletOptions); + constructor(element: Element, options?: dxBulletOptions); + } + export interface dxSparklineOptions extends BaseSparklineOptions { + /** Specifies the data source field that provides arguments for a sparkline. */ + argumentField?: string; + /** Sets a color for the bars indicating negative values. Available for a sparkline of the bar type only. */ + barNegativeColor?: string; + /** Sets a color for the bars indicating positive values. Available for a sparkline of the bar type only. */ + barPositiveColor?: string; + /** Specifies a data source for the sparkline. */ + dataSource?: Array; + /** Sets a color for the boundary of both the first and last points on a sparkline. */ + firstLastColor?: string; + /** Specifies whether a sparkline ignores null data points or not. */ + ignoreEmptyPoints?: boolean; + /** Sets a color for a line on a sparkline. Available for the sparklines of the line- and area-like types. */ + lineColor?: string; + /** Specifies a width for a line on a sparkline. Available for the sparklines of the line- and area-like types. */ + lineWidth?: number; + /** Sets a color for the bars indicating the values that are less than the winloss threshold. Available for a sparkline of the winloss type only. */ + lossColor?: string; + /** Sets a color for the boundary of the maximum point on a sparkline. */ + maxColor?: string; + /** Sets a color for the boundary of the minimum point on a sparkline. */ + minColor?: string; + /** Sets a color for points on a sparkline. Available for the sparklines of the line- and area-like types. */ + pointColor?: string; + /** Specifies the diameter of sparkline points in pixels. Available for the sparklines of line- and area-like types. */ + pointSize?: number; + /** Specifies a symbol to use as a point marker on a sparkline. Available for the sparklines of the line- and area-like types. */ + pointSymbol?: string; + /** Specifies whether or not to indicate both the first and last values on a sparkline. */ + showFirstLast?: boolean; + /** Specifies whether or not to indicate both the minimum and maximum values on a sparkline. */ + showMinMax?: boolean; + /** Determines the type of a sparkline. */ + type?: string; + /** Specifies the data source field that provides values for a sparkline. */ + valueField?: string; + /** Sets a color for the bars indicating the values greater than a winloss threshold. Available for a sparkline of the winloss type only. */ + winColor?: string; + /** Specifies a value that serves as a threshold for the sparkline of the winloss type. */ + winlossThreshold?: number; + /** Specifies the minimum value of the sparkline value axis. */ + minValue?: number; + /** Specifies the maximum value of the sparkline's value axis. */ + maxValue?: number; + } + /** A sparkline widget. */ + export class dxSparkline extends BaseSparkline { + constructor(element: JQuery, options?: dxSparklineOptions); + constructor(element: Element, options?: dxSparklineOptions); + } +} +interface JQuery { + dxBullet(options?: DevExpress.viz.sparklines.dxBulletOptions): JQuery; + dxBullet(methodName: string, ...params: any[]): any; + dxBullet(methodName: "instance"): DevExpress.viz.sparklines.dxBullet; + dxSparkline(options?: DevExpress.viz.sparklines.dxSparklineOptions): JQuery; + dxSparkline(methodName: string, ...params: any[]): any; + dxSparkline(methodName: "instance"): DevExpress.viz.sparklines.dxSparkline; +} diff --git a/devextreme/devextreme.d.ts b/devextreme/devextreme.d.ts index fc593db200..83e69504be 100644 --- a/devextreme/devextreme.d.ts +++ b/devextreme/devextreme.d.ts @@ -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. // Definitions: https://github.com/borisyankov/DefinitelyTyped @@ -35,7 +35,7 @@ declare module DevExpress { brokenRules: any[]; validators: IValidator[]; } - export interface GroupConfig extends EventsMixin { + export interface GroupConfig extends EventsMixin { 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; /** 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; /** 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; /** Adds a route to the map. */ - addRoute(options: Object): JQueryPromise; + addRoute(routeOptions: Object): JQueryPromise; /** Removes a marker from the map. */ removeMarker(marker: Object): JQueryPromise; /** 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 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; + /** Specifies the order of arguments on a discrete scale. */ + categories?: Array; }; /** Specifies the range to be selected when displaying the dxRangeSelector. */ selectedRange?: { @@ -6351,9 +6359,9 @@ declare module DevExpress.viz.map { centerChanged?: (center: Array) => void; /** A handler for the centerChanged event. */ onCenterChanged?: (e: { - center: Array; - component: dxVectorMap; - element: Element; + center: Array; + 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; -} +} \ No newline at end of file diff --git a/dojo/dijit.d.ts b/dojo/dijit.d.ts index 0bb2ab67d9..94f64d0dbd 100644 --- a/dojo/dijit.d.ts +++ b/dojo/dijit.d.ts @@ -490,7 +490,7 @@ declare module dijit { * @param widget * @param insertIndex Optional */ - addChild(widget: dijit._WidgetBase, insertIndex: number): void; + addChild(widget: dijit._WidgetBase, insertIndex?: number): void; /** * */ @@ -821,7 +821,7 @@ declare module dijit { * @param alwaysUseString Don't cache the DOM tree for this template, even if it doesn't have any variables * @param doc OptionalThe target document. Defaults to document global if unspecified. */ - getCachedTemplate(templateString: String, alwaysUseString: boolean, doc: HTMLDocument): any; + getCachedTemplate(templateString: String, alwaysUseString: boolean, doc?: HTMLDocument): any; } module _TemplatedMixin { /** @@ -1260,21 +1260,21 @@ declare module dijit { * @param widget * @param insertIndex Optional */ - addChild(widget: dijit._WidgetBase, insertIndex: number): void; + addChild(widget: dijit._WidgetBase, insertIndex?: number): void; /** * This method is deprecated, use get() or set() directly. * * @param name The property to get or set. If an object is passed here and nota string, its keys are used as names of attributes to be setand the value of the object as values to set in the widget. * @param value OptionalOptional. If provided, attr() operates as a setter. If omitted,the current value of the named property is returned. */ - attr(name: String, value: Object): any; + attr(name: String, value?: Object): any; /** * This method is deprecated, use get() or set() directly. * * @param name The property to get or set. If an object is passed here and nota string, its keys are used as names of attributes to be setand the value of the object as values to set in the widget. * @param value OptionalOptional. If provided, attr() operates as a setter. If omitted,the current value of the named property is returned. */ - attr(name: Object, value: Object): any; + attr(name: Object, value?: Object): any; /** * Construct the UI for this widget, setting this.domNode. * Most widgets will mixin dijit._TemplatedMixin, which implements this method. @@ -1433,7 +1433,7 @@ declare module dijit { * @param fcn Function reference. * @param delay OptionalDelay, defaults to 0. */ - defer(fcn: Function, delay: number): Object; + defer(fcn: Function, delay?: number): Object; /** * Destroy this widget, but not its descendants. Descendants means widgets inside of * this.containerNode. Will also destroy any resources (including widgets) registered via this.own(). @@ -1491,7 +1491,7 @@ declare module dijit { * @param eventObj Optional * @param callbackArgs Optional */ - emit(type: String, eventObj: Object, callbackArgs: any[]): any; + emit(type: String, eventObj?: Object, callbackArgs?: any[]): any; /** * Default focus() implementation: focus the first child. * @@ -1617,7 +1617,7 @@ declare module dijit { * @param reference Widget, DOMNode, or id of widget or DOMNode * @param position OptionalIf reference is a widget (or id of widget), and that widget has an ".addChild" method,it will be called passing this widget instance into that method, supplying the optionalposition index passed. In this case position (if specified) should be an integer.If reference is a DOMNode (or id matching a DOMNode but not a widget),the position argument can be a numeric index or a string"first", "last", "before", or "after", same as dojo/dom-construct::place(). */ - placeAt(reference: String, position: String): any; + placeAt(reference: String, position?: String): any; /** * Place this widget somewhere in the DOM based * on standard domConstruct.place() conventions. @@ -1628,7 +1628,7 @@ declare module dijit { * @param reference Widget, DOMNode, or id of widget or DOMNode * @param position OptionalIf reference is a widget (or id of widget), and that widget has an ".addChild" method,it will be called passing this widget instance into that method, supplying the optionalposition index passed. In this case position (if specified) should be an integer.If reference is a DOMNode (or id matching a DOMNode but not a widget),the position argument can be a numeric index or a string"first", "last", "before", or "after", same as dojo/dom-construct::place(). */ - placeAt(reference: HTMLElement, position: String): any; + placeAt(reference: HTMLElement, position?: String): any; /** * Place this widget somewhere in the DOM based * on standard domConstruct.place() conventions. @@ -1639,7 +1639,7 @@ declare module dijit { * @param reference Widget, DOMNode, or id of widget or DOMNode * @param position OptionalIf reference is a widget (or id of widget), and that widget has an ".addChild" method,it will be called passing this widget instance into that method, supplying the optionalposition index passed. In this case position (if specified) should be an integer.If reference is a DOMNode (or id matching a DOMNode but not a widget),the position argument can be a numeric index or a string"first", "last", "before", or "after", same as dojo/dom-construct::place(). */ - placeAt(reference: dijit._WidgetBase, position: String): any; + placeAt(reference: dijit._WidgetBase, position?: String): any; /** * Place this widget somewhere in the DOM based * on standard domConstruct.place() conventions. @@ -1650,7 +1650,7 @@ declare module dijit { * @param reference Widget, DOMNode, or id of widget or DOMNode * @param position OptionalIf reference is a widget (or id of widget), and that widget has an ".addChild" method,it will be called passing this widget instance into that method, supplying the optionalposition index passed. In this case position (if specified) should be an integer.If reference is a DOMNode (or id matching a DOMNode but not a widget),the position argument can be a numeric index or a string"first", "last", "before", or "after", same as dojo/dom-construct::place(). */ - placeAt(reference: String, position: number): any; + placeAt(reference: String, position?: number): any; /** * Place this widget somewhere in the DOM based * on standard domConstruct.place() conventions. @@ -1661,7 +1661,7 @@ declare module dijit { * @param reference Widget, DOMNode, or id of widget or DOMNode * @param position OptionalIf reference is a widget (or id of widget), and that widget has an ".addChild" method,it will be called passing this widget instance into that method, supplying the optionalposition index passed. In this case position (if specified) should be an integer.If reference is a DOMNode (or id matching a DOMNode but not a widget),the position argument can be a numeric index or a string"first", "last", "before", or "after", same as dojo/dom-construct::place(). */ - placeAt(reference: HTMLElement, position: number): any; + placeAt(reference: HTMLElement, position?: number): any; /** * Place this widget somewhere in the DOM based * on standard domConstruct.place() conventions. @@ -1672,7 +1672,7 @@ declare module dijit { * @param reference Widget, DOMNode, or id of widget or DOMNode * @param position OptionalIf reference is a widget (or id of widget), and that widget has an ".addChild" method,it will be called passing this widget instance into that method, supplying the optionalposition index passed. In this case position (if specified) should be an integer.If reference is a DOMNode (or id matching a DOMNode but not a widget),the position argument can be a numeric index or a string"first", "last", "before", or "after", same as dojo/dom-construct::place(). */ - placeAt(reference: dijit._WidgetBase, position: number): any; + placeAt(reference: dijit._WidgetBase, position?: number): any; /** * */ @@ -2345,7 +2345,7 @@ declare module dijit { * @param fcn Function reference. * @param delay OptionalDelay, defaults to 0. */ - defer(fcn: Function, delay: number): Object; + defer(fcn: Function, delay?: number): Object; /** * Destroy this widget, but not its descendants. Descendants means widgets inside of * this.containerNode. Will also destroy any resources (including widgets) registered via this.own(). @@ -2490,7 +2490,7 @@ declare module dijit { * @param reference Widget, DOMNode, or id of widget or DOMNode * @param position OptionalIf reference is a widget (or id of widget), and that widget has an ".addChild" method,it will be called passing this widget instance into that method, supplying the optionalposition index passed. In this case position (if specified) should be an integer.If reference is a DOMNode (or id matching a DOMNode but not a widget),the position argument can be a numeric index or a string"first", "last", "before", or "after", same as dojo/dom-construct::place(). */ - placeAt(reference: String, position: String): any; + placeAt(reference: String, position?: String): any; /** * Place this widget somewhere in the DOM based * on standard domConstruct.place() conventions. @@ -2911,14 +2911,14 @@ declare module dijit { * @param name The property to get or set. If an object is passed here and nota string, its keys are used as names of attributes to be setand the value of the object as values to set in the widget. * @param value OptionalOptional. If provided, attr() operates as a setter. If omitted,the current value of the named property is returned. */ - attr(name: String, value: Object): any; + attr(name: String, value?: Object): any; /** * This method is deprecated, use get() or set() directly. * * @param name The property to get or set. If an object is passed here and nota string, its keys are used as names of attributes to be setand the value of the object as values to set in the widget. * @param value OptionalOptional. If provided, attr() operates as a setter. If omitted,the current value of the named property is returned. */ - attr(name: Object, value: Object): any; + attr(name: Object, value?: Object): any; /** * Construct the UI for this widget, setting this.domNode. * Most widgets will mixin dijit._TemplatedMixin, which implements this method. @@ -3061,7 +3061,7 @@ declare module dijit { * @param fcn Function reference. * @param delay OptionalDelay, defaults to 0. */ - defer(fcn: Function, delay: number): Object; + defer(fcn: Function, delay?: number): Object; /** * Destroy this widget, but not its descendants. Descendants means widgets inside of * this.containerNode. Will also destroy any resources (including widgets) registered via this.own(). @@ -3119,7 +3119,7 @@ declare module dijit { * @param eventObj Optional * @param callbackArgs Optional */ - emit(type: String, eventObj: Object, callbackArgs: any[]): any; + emit(type: String, eventObj?: Object, callbackArgs?: any[]): any; /** * Get a property from a widget. * Get a named property from a widget. The property may @@ -3201,7 +3201,7 @@ declare module dijit { * @param reference Widget, DOMNode, or id of widget or DOMNode * @param position OptionalIf reference is a widget (or id of widget), and that widget has an ".addChild" method,it will be called passing this widget instance into that method, supplying the optionalposition index passed. In this case position (if specified) should be an integer.If reference is a DOMNode (or id matching a DOMNode but not a widget),the position argument can be a numeric index or a string"first", "last", "before", or "after", same as dojo/dom-construct::place(). */ - placeAt(reference: String, position: String): any; + placeAt(reference: String, position?: String): any; /** * Place this widget somewhere in the DOM based * on standard domConstruct.place() conventions. @@ -3212,7 +3212,7 @@ declare module dijit { * @param reference Widget, DOMNode, or id of widget or DOMNode * @param position OptionalIf reference is a widget (or id of widget), and that widget has an ".addChild" method,it will be called passing this widget instance into that method, supplying the optionalposition index passed. In this case position (if specified) should be an integer.If reference is a DOMNode (or id matching a DOMNode but not a widget),the position argument can be a numeric index or a string"first", "last", "before", or "after", same as dojo/dom-construct::place(). */ - placeAt(reference: HTMLElement, position: String): any; + placeAt(reference: HTMLElement, position?: String): any; /** * Place this widget somewhere in the DOM based * on standard domConstruct.place() conventions. @@ -3223,7 +3223,7 @@ declare module dijit { * @param reference Widget, DOMNode, or id of widget or DOMNode * @param position OptionalIf reference is a widget (or id of widget), and that widget has an ".addChild" method,it will be called passing this widget instance into that method, supplying the optionalposition index passed. In this case position (if specified) should be an integer.If reference is a DOMNode (or id matching a DOMNode but not a widget),the position argument can be a numeric index or a string"first", "last", "before", or "after", same as dojo/dom-construct::place(). */ - placeAt(reference: dijit._WidgetBase, position: String): any; + placeAt(reference: dijit._WidgetBase, position?: String): any; /** * Place this widget somewhere in the DOM based * on standard domConstruct.place() conventions. @@ -3234,7 +3234,7 @@ declare module dijit { * @param reference Widget, DOMNode, or id of widget or DOMNode * @param position OptionalIf reference is a widget (or id of widget), and that widget has an ".addChild" method,it will be called passing this widget instance into that method, supplying the optionalposition index passed. In this case position (if specified) should be an integer.If reference is a DOMNode (or id matching a DOMNode but not a widget),the position argument can be a numeric index or a string"first", "last", "before", or "after", same as dojo/dom-construct::place(). */ - placeAt(reference: String, position: number): any; + placeAt(reference: String, position?: number): any; /** * Place this widget somewhere in the DOM based * on standard domConstruct.place() conventions. @@ -3245,7 +3245,7 @@ declare module dijit { * @param reference Widget, DOMNode, or id of widget or DOMNode * @param position OptionalIf reference is a widget (or id of widget), and that widget has an ".addChild" method,it will be called passing this widget instance into that method, supplying the optionalposition index passed. In this case position (if specified) should be an integer.If reference is a DOMNode (or id matching a DOMNode but not a widget),the position argument can be a numeric index or a string"first", "last", "before", or "after", same as dojo/dom-construct::place(). */ - placeAt(reference: HTMLElement, position: number): any; + placeAt(reference: HTMLElement, position?: number): any; /** * Place this widget somewhere in the DOM based * on standard domConstruct.place() conventions. @@ -3256,7 +3256,7 @@ declare module dijit { * @param reference Widget, DOMNode, or id of widget or DOMNode * @param position OptionalIf reference is a widget (or id of widget), and that widget has an ".addChild" method,it will be called passing this widget instance into that method, supplying the optionalposition index passed. In this case position (if specified) should be an integer.If reference is a DOMNode (or id matching a DOMNode but not a widget),the position argument can be a numeric index or a string"first", "last", "before", or "after", same as dojo/dom-construct::place(). */ - placeAt(reference: dijit._WidgetBase, position: number): any; + placeAt(reference: dijit._WidgetBase, position?: number): any; /** * */ @@ -3877,7 +3877,7 @@ declare module dijit { * @param fcn Function reference. * @param delay OptionalDelay, defaults to 0. */ - defer(fcn: Function, delay: number): Object; + defer(fcn: Function, delay?: number): Object; /** * Destroy this widget, but not its descendants. Descendants means widgets inside of * this.containerNode. Will also destroy any resources (including widgets) registered via this.own(). @@ -3935,7 +3935,7 @@ declare module dijit { * @param eventObj Optional * @param callbackArgs Optional */ - emit(type: String, eventObj: Object, callbackArgs: any[]): any; + emit(type: String, eventObj?: Object, callbackArgs?: any[]): any; /** * Get a property from a widget. * Get a named property from a widget. The property may @@ -3984,7 +3984,7 @@ declare module dijit { * @param dateObject * @param locale Optional */ - isDisabledDate(dateObject: Date, locale: String): boolean; + isDisabledDate(dateObject: Date, locale?: String): boolean; /** * Return true if this widget can currently be focused * and false if not @@ -4032,7 +4032,7 @@ declare module dijit { * @param reference Widget, DOMNode, or id of widget or DOMNode * @param position OptionalIf reference is a widget (or id of widget), and that widget has an ".addChild" method,it will be called passing this widget instance into that method, supplying the optionalposition index passed. In this case position (if specified) should be an integer.If reference is a DOMNode (or id matching a DOMNode but not a widget),the position argument can be a numeric index or a string"first", "last", "before", or "after", same as dojo/dom-construct::place(). */ - placeAt(reference: String, position: String): any; + placeAt(reference: String, position?: String): any; /** * Place this widget somewhere in the DOM based * on standard domConstruct.place() conventions. @@ -4043,7 +4043,7 @@ declare module dijit { * @param reference Widget, DOMNode, or id of widget or DOMNode * @param position OptionalIf reference is a widget (or id of widget), and that widget has an ".addChild" method,it will be called passing this widget instance into that method, supplying the optionalposition index passed. In this case position (if specified) should be an integer.If reference is a DOMNode (or id matching a DOMNode but not a widget),the position argument can be a numeric index or a string"first", "last", "before", or "after", same as dojo/dom-construct::place(). */ - placeAt(reference: HTMLElement, position: String): any; + placeAt(reference: HTMLElement, position?: String): any; /** * Place this widget somewhere in the DOM based * on standard domConstruct.place() conventions. @@ -4054,7 +4054,7 @@ declare module dijit { * @param reference Widget, DOMNode, or id of widget or DOMNode * @param position OptionalIf reference is a widget (or id of widget), and that widget has an ".addChild" method,it will be called passing this widget instance into that method, supplying the optionalposition index passed. In this case position (if specified) should be an integer.If reference is a DOMNode (or id matching a DOMNode but not a widget),the position argument can be a numeric index or a string"first", "last", "before", or "after", same as dojo/dom-construct::place(). */ - placeAt(reference: dijit._WidgetBase, position: String): any; + placeAt(reference: dijit._WidgetBase, position?: String): any; /** * Place this widget somewhere in the DOM based * on standard domConstruct.place() conventions. @@ -4065,7 +4065,7 @@ declare module dijit { * @param reference Widget, DOMNode, or id of widget or DOMNode * @param position OptionalIf reference is a widget (or id of widget), and that widget has an ".addChild" method,it will be called passing this widget instance into that method, supplying the optionalposition index passed. In this case position (if specified) should be an integer.If reference is a DOMNode (or id matching a DOMNode but not a widget),the position argument can be a numeric index or a string"first", "last", "before", or "after", same as dojo/dom-construct::place(). */ - placeAt(reference: String, position: number): any; + placeAt(reference: String, position?: number): any; /** * Place this widget somewhere in the DOM based * on standard domConstruct.place() conventions. @@ -4076,7 +4076,7 @@ declare module dijit { * @param reference Widget, DOMNode, or id of widget or DOMNode * @param position OptionalIf reference is a widget (or id of widget), and that widget has an ".addChild" method,it will be called passing this widget instance into that method, supplying the optionalposition index passed. In this case position (if specified) should be an integer.If reference is a DOMNode (or id matching a DOMNode but not a widget),the position argument can be a numeric index or a string"first", "last", "before", or "after", same as dojo/dom-construct::place(). */ - placeAt(reference: HTMLElement, position: number): any; + placeAt(reference: HTMLElement, position?: number): any; /** * Place this widget somewhere in the DOM based * on standard domConstruct.place() conventions. @@ -4087,7 +4087,7 @@ declare module dijit { * @param reference Widget, DOMNode, or id of widget or DOMNode * @param position OptionalIf reference is a widget (or id of widget), and that widget has an ".addChild" method,it will be called passing this widget instance into that method, supplying the optionalposition index passed. In this case position (if specified) should be an integer.If reference is a DOMNode (or id matching a DOMNode but not a widget),the position argument can be a numeric index or a string"first", "last", "before", or "after", same as dojo/dom-construct::place(). */ - placeAt(reference: dijit._WidgetBase, position: number): any; + placeAt(reference: dijit._WidgetBase, position?: number): any; /** * Processing after the DOM fragment is created * Called after the DOM fragment has been created, but not necessarily @@ -4132,7 +4132,7 @@ declare module dijit { * @param dateObject A Date object * @param options OptionalAn object with the following properties:selector (String): "date" or "time" for partial formatting of the Date object.Both date and time will be formatted by default.zulu (Boolean): if true, UTC/GMT is used for a timezonemilliseconds (Boolean): if true, output milliseconds */ - serialize(dateObject: Date, options: Object): any; + serialize(dateObject: Date, options?: Object): any; /** * Set a property on a widget * Sets named properties on a widget which may potentially be handled by a @@ -4787,7 +4787,7 @@ declare module dijit { * @param fcn Function reference. * @param delay OptionalDelay, defaults to 0. */ - defer(fcn: Function, delay: number): Object; + defer(fcn: Function, delay?: number): Object; /** * Destroy this widget, but not its descendants. Descendants means widgets inside of * this.containerNode. Will also destroy any resources (including widgets) registered via this.own(). @@ -4845,7 +4845,7 @@ declare module dijit { * @param eventObj Optional * @param callbackArgs Optional */ - emit(type: String, eventObj: Object, callbackArgs: any[]): any; + emit(type: String, eventObj?: Object, callbackArgs?: any[]): any; /** * Focus the calendar by focusing one of the calendar cells * @@ -4888,7 +4888,7 @@ declare module dijit { * @param dateObject * @param locale Optional */ - getClassForDate(dateObject: Date, locale: String): String; + getClassForDate(dateObject: Date, locale?: String): String; /** * Returns the parent widget of this widget. * @@ -4905,7 +4905,7 @@ declare module dijit { * @param dateObject * @param locale Optional */ - isDisabledDate(dateObject: Date, locale: String): boolean; + isDisabledDate(dateObject: Date, locale?: String): boolean; /** * Return true if this widget can currently be focused * and false if not @@ -4953,7 +4953,7 @@ declare module dijit { * @param reference Widget, DOMNode, or id of widget or DOMNode * @param position OptionalIf reference is a widget (or id of widget), and that widget has an ".addChild" method,it will be called passing this widget instance into that method, supplying the optionalposition index passed. In this case position (if specified) should be an integer.If reference is a DOMNode (or id matching a DOMNode but not a widget),the position argument can be a numeric index or a string"first", "last", "before", or "after", same as dojo/dom-construct::place(). */ - placeAt(reference: String, position: String): any; + placeAt(reference: String, position?: String): any; /** * Place this widget somewhere in the DOM based * on standard domConstruct.place() conventions. @@ -4964,7 +4964,7 @@ declare module dijit { * @param reference Widget, DOMNode, or id of widget or DOMNode * @param position OptionalIf reference is a widget (or id of widget), and that widget has an ".addChild" method,it will be called passing this widget instance into that method, supplying the optionalposition index passed. In this case position (if specified) should be an integer.If reference is a DOMNode (or id matching a DOMNode but not a widget),the position argument can be a numeric index or a string"first", "last", "before", or "after", same as dojo/dom-construct::place(). */ - placeAt(reference: HTMLElement, position: String): any; + placeAt(reference: HTMLElement, position?: String): any; /** * Place this widget somewhere in the DOM based * on standard domConstruct.place() conventions. @@ -4975,7 +4975,7 @@ declare module dijit { * @param reference Widget, DOMNode, or id of widget or DOMNode * @param position OptionalIf reference is a widget (or id of widget), and that widget has an ".addChild" method,it will be called passing this widget instance into that method, supplying the optionalposition index passed. In this case position (if specified) should be an integer.If reference is a DOMNode (or id matching a DOMNode but not a widget),the position argument can be a numeric index or a string"first", "last", "before", or "after", same as dojo/dom-construct::place(). */ - placeAt(reference: dijit._WidgetBase, position: String): any; + placeAt(reference: dijit._WidgetBase, position?: String): any; /** * Place this widget somewhere in the DOM based * on standard domConstruct.place() conventions. @@ -4986,7 +4986,7 @@ declare module dijit { * @param reference Widget, DOMNode, or id of widget or DOMNode * @param position OptionalIf reference is a widget (or id of widget), and that widget has an ".addChild" method,it will be called passing this widget instance into that method, supplying the optionalposition index passed. In this case position (if specified) should be an integer.If reference is a DOMNode (or id matching a DOMNode but not a widget),the position argument can be a numeric index or a string"first", "last", "before", or "after", same as dojo/dom-construct::place(). */ - placeAt(reference: String, position: number): any; + placeAt(reference: String, position?: number): any; /** * Place this widget somewhere in the DOM based * on standard domConstruct.place() conventions. @@ -4997,7 +4997,7 @@ declare module dijit { * @param reference Widget, DOMNode, or id of widget or DOMNode * @param position OptionalIf reference is a widget (or id of widget), and that widget has an ".addChild" method,it will be called passing this widget instance into that method, supplying the optionalposition index passed. In this case position (if specified) should be an integer.If reference is a DOMNode (or id matching a DOMNode but not a widget),the position argument can be a numeric index or a string"first", "last", "before", or "after", same as dojo/dom-construct::place(). */ - placeAt(reference: HTMLElement, position: number): any; + placeAt(reference: HTMLElement, position?: number): any; /** * Place this widget somewhere in the DOM based * on standard domConstruct.place() conventions. @@ -5008,7 +5008,7 @@ declare module dijit { * @param reference Widget, DOMNode, or id of widget or DOMNode * @param position OptionalIf reference is a widget (or id of widget), and that widget has an ".addChild" method,it will be called passing this widget instance into that method, supplying the optionalposition index passed. In this case position (if specified) should be an integer.If reference is a DOMNode (or id matching a DOMNode but not a widget),the position argument can be a numeric index or a string"first", "last", "before", or "after", same as dojo/dom-construct::place(). */ - placeAt(reference: dijit._WidgetBase, position: number): any; + placeAt(reference: dijit._WidgetBase, position?: number): any; /** * */ @@ -5453,7 +5453,7 @@ declare module dijit { * @param fcn Function reference. * @param delay OptionalDelay, defaults to 0. */ - defer(fcn: Function, delay: number): Object; + defer(fcn: Function, delay?: number): Object; /** * Destroy this widget, but not its descendants. Descendants means widgets inside of * this.containerNode. Will also destroy any resources (including widgets) registered via this.own(). @@ -5511,7 +5511,7 @@ declare module dijit { * @param eventObj Optional * @param callbackArgs Optional */ - emit(type: String, eventObj: Object, callbackArgs: any[]): any; + emit(type: String, eventObj?: Object, callbackArgs?: any[]): any; /** * Get a property from a widget. * Get a named property from a widget. The property may @@ -5594,7 +5594,7 @@ declare module dijit { * @param reference Widget, DOMNode, or id of widget or DOMNode * @param position OptionalIf reference is a widget (or id of widget), and that widget has an ".addChild" method,it will be called passing this widget instance into that method, supplying the optionalposition index passed. In this case position (if specified) should be an integer.If reference is a DOMNode (or id matching a DOMNode but not a widget),the position argument can be a numeric index or a string"first", "last", "before", or "after", same as dojo/dom-construct::place(). */ - placeAt(reference: String, position: String): any; + placeAt(reference: String, position?: String): any; /** * Place this widget somewhere in the DOM based * on standard domConstruct.place() conventions. @@ -5605,7 +5605,7 @@ declare module dijit { * @param reference Widget, DOMNode, or id of widget or DOMNode * @param position OptionalIf reference is a widget (or id of widget), and that widget has an ".addChild" method,it will be called passing this widget instance into that method, supplying the optionalposition index passed. In this case position (if specified) should be an integer.If reference is a DOMNode (or id matching a DOMNode but not a widget),the position argument can be a numeric index or a string"first", "last", "before", or "after", same as dojo/dom-construct::place(). */ - placeAt(reference: HTMLElement, position: String): any; + placeAt(reference: HTMLElement, position?: String): any; /** * Place this widget somewhere in the DOM based * on standard domConstruct.place() conventions. @@ -5616,7 +5616,7 @@ declare module dijit { * @param reference Widget, DOMNode, or id of widget or DOMNode * @param position OptionalIf reference is a widget (or id of widget), and that widget has an ".addChild" method,it will be called passing this widget instance into that method, supplying the optionalposition index passed. In this case position (if specified) should be an integer.If reference is a DOMNode (or id matching a DOMNode but not a widget),the position argument can be a numeric index or a string"first", "last", "before", or "after", same as dojo/dom-construct::place(). */ - placeAt(reference: dijit._WidgetBase, position: String): any; + placeAt(reference: dijit._WidgetBase, position?: String): any; /** * Place this widget somewhere in the DOM based * on standard domConstruct.place() conventions. @@ -5627,7 +5627,7 @@ declare module dijit { * @param reference Widget, DOMNode, or id of widget or DOMNode * @param position OptionalIf reference is a widget (or id of widget), and that widget has an ".addChild" method,it will be called passing this widget instance into that method, supplying the optionalposition index passed. In this case position (if specified) should be an integer.If reference is a DOMNode (or id matching a DOMNode but not a widget),the position argument can be a numeric index or a string"first", "last", "before", or "after", same as dojo/dom-construct::place(). */ - placeAt(reference: String, position: number): any; + placeAt(reference: String, position?: number): any; /** * Place this widget somewhere in the DOM based * on standard domConstruct.place() conventions. @@ -5638,7 +5638,7 @@ declare module dijit { * @param reference Widget, DOMNode, or id of widget or DOMNode * @param position OptionalIf reference is a widget (or id of widget), and that widget has an ".addChild" method,it will be called passing this widget instance into that method, supplying the optionalposition index passed. In this case position (if specified) should be an integer.If reference is a DOMNode (or id matching a DOMNode but not a widget),the position argument can be a numeric index or a string"first", "last", "before", or "after", same as dojo/dom-construct::place(). */ - placeAt(reference: HTMLElement, position: number): any; + placeAt(reference: HTMLElement, position?: number): any; /** * Place this widget somewhere in the DOM based * on standard domConstruct.place() conventions. @@ -5649,7 +5649,7 @@ declare module dijit { * @param reference Widget, DOMNode, or id of widget or DOMNode * @param position OptionalIf reference is a widget (or id of widget), and that widget has an ".addChild" method,it will be called passing this widget instance into that method, supplying the optionalposition index passed. In this case position (if specified) should be an integer.If reference is a DOMNode (or id matching a DOMNode but not a widget),the position argument can be a numeric index or a string"first", "last", "before", or "after", same as dojo/dom-construct::place(). */ - placeAt(reference: dijit._WidgetBase, position: number): any; + placeAt(reference: dijit._WidgetBase, position?: number): any; /** * Processing after the DOM fragment is created * Called after the DOM fragment has been created, but not necessarily @@ -5978,14 +5978,14 @@ declare module dijit { * @param name The property to get or set. If an object is passed here and nota string, its keys are used as names of attributes to be setand the value of the object as values to set in the widget. * @param value OptionalOptional. If provided, attr() operates as a setter. If omitted,the current value of the named property is returned. */ - attr(name: String, value: Object): any; + attr(name: String, value?: Object): any; /** * This method is deprecated, use get() or set() directly. * * @param name The property to get or set. If an object is passed here and nota string, its keys are used as names of attributes to be setand the value of the object as values to set in the widget. * @param value OptionalOptional. If provided, attr() operates as a setter. If omitted,the current value of the named property is returned. */ - attr(name: Object, value: Object): any; + attr(name: Object, value?: Object): any; /** * */ @@ -6126,7 +6126,7 @@ declare module dijit { * @param fcn Function reference. * @param delay OptionalDelay, defaults to 0. */ - defer(fcn: Function, delay: number): Object; + defer(fcn: Function, delay?: number): Object; /** * Destroy this widget, but not its descendants. Descendants means widgets inside of * this.containerNode. Will also destroy any resources (including widgets) registered via this.own(). @@ -6184,7 +6184,7 @@ declare module dijit { * @param eventObj Optional * @param callbackArgs Optional */ - emit(type: String, eventObj: Object, callbackArgs: any[]): any; + emit(type: String, eventObj?: Object, callbackArgs?: any[]): any; /** * Get a property from a widget. * Get a named property from a widget. The property may @@ -6266,7 +6266,7 @@ declare module dijit { * @param reference Widget, DOMNode, or id of widget or DOMNode * @param position OptionalIf reference is a widget (or id of widget), and that widget has an ".addChild" method,it will be called passing this widget instance into that method, supplying the optionalposition index passed. In this case position (if specified) should be an integer.If reference is a DOMNode (or id matching a DOMNode but not a widget),the position argument can be a numeric index or a string"first", "last", "before", or "after", same as dojo/dom-construct::place(). */ - placeAt(reference: String, position: String): any; + placeAt(reference: String, position?: String): any; /** * Place this widget somewhere in the DOM based * on standard domConstruct.place() conventions. @@ -6277,7 +6277,7 @@ declare module dijit { * @param reference Widget, DOMNode, or id of widget or DOMNode * @param position OptionalIf reference is a widget (or id of widget), and that widget has an ".addChild" method,it will be called passing this widget instance into that method, supplying the optionalposition index passed. In this case position (if specified) should be an integer.If reference is a DOMNode (or id matching a DOMNode but not a widget),the position argument can be a numeric index or a string"first", "last", "before", or "after", same as dojo/dom-construct::place(). */ - placeAt(reference: HTMLElement, position: String): any; + placeAt(reference: HTMLElement, position?: String): any; /** * Place this widget somewhere in the DOM based * on standard domConstruct.place() conventions. @@ -6288,7 +6288,7 @@ declare module dijit { * @param reference Widget, DOMNode, or id of widget or DOMNode * @param position OptionalIf reference is a widget (or id of widget), and that widget has an ".addChild" method,it will be called passing this widget instance into that method, supplying the optionalposition index passed. In this case position (if specified) should be an integer.If reference is a DOMNode (or id matching a DOMNode but not a widget),the position argument can be a numeric index or a string"first", "last", "before", or "after", same as dojo/dom-construct::place(). */ - placeAt(reference: dijit._WidgetBase, position: String): any; + placeAt(reference: dijit._WidgetBase, position?: String): any; /** * Place this widget somewhere in the DOM based * on standard domConstruct.place() conventions. @@ -6299,7 +6299,7 @@ declare module dijit { * @param reference Widget, DOMNode, or id of widget or DOMNode * @param position OptionalIf reference is a widget (or id of widget), and that widget has an ".addChild" method,it will be called passing this widget instance into that method, supplying the optionalposition index passed. In this case position (if specified) should be an integer.If reference is a DOMNode (or id matching a DOMNode but not a widget),the position argument can be a numeric index or a string"first", "last", "before", or "after", same as dojo/dom-construct::place(). */ - placeAt(reference: String, position: number): any; + placeAt(reference: String, position?: number): any; /** * Place this widget somewhere in the DOM based * on standard domConstruct.place() conventions. @@ -6310,7 +6310,7 @@ declare module dijit { * @param reference Widget, DOMNode, or id of widget or DOMNode * @param position OptionalIf reference is a widget (or id of widget), and that widget has an ".addChild" method,it will be called passing this widget instance into that method, supplying the optionalposition index passed. In this case position (if specified) should be an integer.If reference is a DOMNode (or id matching a DOMNode but not a widget),the position argument can be a numeric index or a string"first", "last", "before", or "after", same as dojo/dom-construct::place(). */ - placeAt(reference: HTMLElement, position: number): any; + placeAt(reference: HTMLElement, position?: number): any; /** * Place this widget somewhere in the DOM based * on standard domConstruct.place() conventions. @@ -6321,7 +6321,7 @@ declare module dijit { * @param reference Widget, DOMNode, or id of widget or DOMNode * @param position OptionalIf reference is a widget (or id of widget), and that widget has an ".addChild" method,it will be called passing this widget instance into that method, supplying the optionalposition index passed. In this case position (if specified) should be an integer.If reference is a DOMNode (or id matching a DOMNode but not a widget),the position argument can be a numeric index or a string"first", "last", "before", or "after", same as dojo/dom-construct::place(). */ - placeAt(reference: dijit._WidgetBase, position: number): any; + placeAt(reference: dijit._WidgetBase, position?: number): any; /** * */ @@ -6896,14 +6896,14 @@ declare module dijit { * @param name The property to get or set. If an object is passed here and nota string, its keys are used as names of attributes to be setand the value of the object as values to set in the widget. * @param value OptionalOptional. If provided, attr() operates as a setter. If omitted,the current value of the named property is returned. */ - attr(name: String, value: Object): any; + attr(name: String, value?: Object): any; /** * This method is deprecated, use get() or set() directly. * * @param name The property to get or set. If an object is passed here and nota string, its keys are used as names of attributes to be setand the value of the object as values to set in the widget. * @param value OptionalOptional. If provided, attr() operates as a setter. If omitted,the current value of the named property is returned. */ - attr(name: Object, value: Object): any; + attr(name: Object, value?: Object): any; /** * */ @@ -7044,7 +7044,7 @@ declare module dijit { * @param fcn Function reference. * @param delay OptionalDelay, defaults to 0. */ - defer(fcn: Function, delay: number): Object; + defer(fcn: Function, delay?: number): Object; /** * Destroy this widget, but not its descendants. Descendants means widgets inside of * this.containerNode. Will also destroy any resources (including widgets) registered via this.own(). @@ -7102,7 +7102,7 @@ declare module dijit { * @param eventObj Optional * @param callbackArgs Optional */ - emit(type: String, eventObj: Object, callbackArgs: any[]): any; + emit(type: String, eventObj?: Object, callbackArgs?: any[]): any; /** * Focus the calendar by focusing one of the calendar cells * @@ -7178,7 +7178,7 @@ declare module dijit { * @param dateObject * @param locale Optional */ - isDisabledDate(dateObject: Date, locale: String): boolean; + isDisabledDate(dateObject: Date, locale?: String): boolean; /** * Return true if this widget can currently be focused * and false if not @@ -7226,7 +7226,7 @@ declare module dijit { * @param reference Widget, DOMNode, or id of widget or DOMNode * @param position OptionalIf reference is a widget (or id of widget), and that widget has an ".addChild" method,it will be called passing this widget instance into that method, supplying the optionalposition index passed. In this case position (if specified) should be an integer.If reference is a DOMNode (or id matching a DOMNode but not a widget),the position argument can be a numeric index or a string"first", "last", "before", or "after", same as dojo/dom-construct::place(). */ - placeAt(reference: String, position: String): any; + placeAt(reference: String, position?: String): any; /** * Place this widget somewhere in the DOM based * on standard domConstruct.place() conventions. @@ -7237,7 +7237,7 @@ declare module dijit { * @param reference Widget, DOMNode, or id of widget or DOMNode * @param position OptionalIf reference is a widget (or id of widget), and that widget has an ".addChild" method,it will be called passing this widget instance into that method, supplying the optionalposition index passed. In this case position (if specified) should be an integer.If reference is a DOMNode (or id matching a DOMNode but not a widget),the position argument can be a numeric index or a string"first", "last", "before", or "after", same as dojo/dom-construct::place(). */ - placeAt(reference: HTMLElement, position: String): any; + placeAt(reference: HTMLElement, position?: String): any; /** * Place this widget somewhere in the DOM based * on standard domConstruct.place() conventions. @@ -7248,7 +7248,7 @@ declare module dijit { * @param reference Widget, DOMNode, or id of widget or DOMNode * @param position OptionalIf reference is a widget (or id of widget), and that widget has an ".addChild" method,it will be called passing this widget instance into that method, supplying the optionalposition index passed. In this case position (if specified) should be an integer.If reference is a DOMNode (or id matching a DOMNode but not a widget),the position argument can be a numeric index or a string"first", "last", "before", or "after", same as dojo/dom-construct::place(). */ - placeAt(reference: dijit._WidgetBase, position: String): any; + placeAt(reference: dijit._WidgetBase, position?: String): any; /** * Place this widget somewhere in the DOM based * on standard domConstruct.place() conventions. @@ -7259,7 +7259,7 @@ declare module dijit { * @param reference Widget, DOMNode, or id of widget or DOMNode * @param position OptionalIf reference is a widget (or id of widget), and that widget has an ".addChild" method,it will be called passing this widget instance into that method, supplying the optionalposition index passed. In this case position (if specified) should be an integer.If reference is a DOMNode (or id matching a DOMNode but not a widget),the position argument can be a numeric index or a string"first", "last", "before", or "after", same as dojo/dom-construct::place(). */ - placeAt(reference: String, position: number): any; + placeAt(reference: String, position?: number): any; /** * Place this widget somewhere in the DOM based * on standard domConstruct.place() conventions. @@ -7270,7 +7270,7 @@ declare module dijit { * @param reference Widget, DOMNode, or id of widget or DOMNode * @param position OptionalIf reference is a widget (or id of widget), and that widget has an ".addChild" method,it will be called passing this widget instance into that method, supplying the optionalposition index passed. In this case position (if specified) should be an integer.If reference is a DOMNode (or id matching a DOMNode but not a widget),the position argument can be a numeric index or a string"first", "last", "before", or "after", same as dojo/dom-construct::place(). */ - placeAt(reference: HTMLElement, position: number): any; + placeAt(reference: HTMLElement, position?: number): any; /** * Place this widget somewhere in the DOM based * on standard domConstruct.place() conventions. @@ -7281,7 +7281,7 @@ declare module dijit { * @param reference Widget, DOMNode, or id of widget or DOMNode * @param position OptionalIf reference is a widget (or id of widget), and that widget has an ".addChild" method,it will be called passing this widget instance into that method, supplying the optionalposition index passed. In this case position (if specified) should be an integer.If reference is a DOMNode (or id matching a DOMNode but not a widget),the position argument can be a numeric index or a string"first", "last", "before", or "after", same as dojo/dom-construct::place(). */ - placeAt(reference: dijit._WidgetBase, position: number): any; + placeAt(reference: dijit._WidgetBase, position?: number): any; /** * */ @@ -7767,14 +7767,14 @@ declare module dijit { * @param name The property to get or set. If an object is passed here and nota string, its keys are used as names of attributes to be setand the value of the object as values to set in the widget. * @param value OptionalOptional. If provided, attr() operates as a setter. If omitted,the current value of the named property is returned. */ - attr(name: String, value: Object): any; + attr(name: String, value?: Object): any; /** * This method is deprecated, use get() or set() directly. * * @param name The property to get or set. If an object is passed here and nota string, its keys are used as names of attributes to be setand the value of the object as values to set in the widget. * @param value OptionalOptional. If provided, attr() operates as a setter. If omitted,the current value of the named property is returned. */ - attr(name: Object, value: Object): any; + attr(name: Object, value?: Object): any; /** * Construct the UI for this widget, setting this.domNode. * Most widgets will mixin dijit._TemplatedMixin, which implements this method. @@ -7917,7 +7917,7 @@ declare module dijit { * @param fcn Function reference. * @param delay OptionalDelay, defaults to 0. */ - defer(fcn: Function, delay: number): Object; + defer(fcn: Function, delay?: number): Object; /** * Destroy this widget, but not its descendants. Descendants means widgets inside of * this.containerNode. Will also destroy any resources (including widgets) registered via this.own(). @@ -7975,7 +7975,7 @@ declare module dijit { * @param eventObj Optional * @param callbackArgs Optional */ - emit(type: String, eventObj: Object, callbackArgs: any[]): any; + emit(type: String, eventObj?: Object, callbackArgs?: any[]): any; /** * Get a property from a widget. * Get a named property from a widget. The property may @@ -8057,7 +8057,7 @@ declare module dijit { * @param reference Widget, DOMNode, or id of widget or DOMNode * @param position OptionalIf reference is a widget (or id of widget), and that widget has an ".addChild" method,it will be called passing this widget instance into that method, supplying the optionalposition index passed. In this case position (if specified) should be an integer.If reference is a DOMNode (or id matching a DOMNode but not a widget),the position argument can be a numeric index or a string"first", "last", "before", or "after", same as dojo/dom-construct::place(). */ - placeAt(reference: String, position: String): any; + placeAt(reference: String, position?: String): any; /** * Place this widget somewhere in the DOM based * on standard domConstruct.place() conventions. @@ -8068,7 +8068,7 @@ declare module dijit { * @param reference Widget, DOMNode, or id of widget or DOMNode * @param position OptionalIf reference is a widget (or id of widget), and that widget has an ".addChild" method,it will be called passing this widget instance into that method, supplying the optionalposition index passed. In this case position (if specified) should be an integer.If reference is a DOMNode (or id matching a DOMNode but not a widget),the position argument can be a numeric index or a string"first", "last", "before", or "after", same as dojo/dom-construct::place(). */ - placeAt(reference: HTMLElement, position: String): any; + placeAt(reference: HTMLElement, position?: String): any; /** * Place this widget somewhere in the DOM based * on standard domConstruct.place() conventions. @@ -8079,7 +8079,7 @@ declare module dijit { * @param reference Widget, DOMNode, or id of widget or DOMNode * @param position OptionalIf reference is a widget (or id of widget), and that widget has an ".addChild" method,it will be called passing this widget instance into that method, supplying the optionalposition index passed. In this case position (if specified) should be an integer.If reference is a DOMNode (or id matching a DOMNode but not a widget),the position argument can be a numeric index or a string"first", "last", "before", or "after", same as dojo/dom-construct::place(). */ - placeAt(reference: dijit._WidgetBase, position: String): any; + placeAt(reference: dijit._WidgetBase, position?: String): any; /** * Place this widget somewhere in the DOM based * on standard domConstruct.place() conventions. @@ -8090,7 +8090,7 @@ declare module dijit { * @param reference Widget, DOMNode, or id of widget or DOMNode * @param position OptionalIf reference is a widget (or id of widget), and that widget has an ".addChild" method,it will be called passing this widget instance into that method, supplying the optionalposition index passed. In this case position (if specified) should be an integer.If reference is a DOMNode (or id matching a DOMNode but not a widget),the position argument can be a numeric index or a string"first", "last", "before", or "after", same as dojo/dom-construct::place(). */ - placeAt(reference: String, position: number): any; + placeAt(reference: String, position?: number): any; /** * Place this widget somewhere in the DOM based * on standard domConstruct.place() conventions. @@ -8101,7 +8101,7 @@ declare module dijit { * @param reference Widget, DOMNode, or id of widget or DOMNode * @param position OptionalIf reference is a widget (or id of widget), and that widget has an ".addChild" method,it will be called passing this widget instance into that method, supplying the optionalposition index passed. In this case position (if specified) should be an integer.If reference is a DOMNode (or id matching a DOMNode but not a widget),the position argument can be a numeric index or a string"first", "last", "before", or "after", same as dojo/dom-construct::place(). */ - placeAt(reference: HTMLElement, position: number): any; + placeAt(reference: HTMLElement, position?: number): any; /** * Place this widget somewhere in the DOM based * on standard domConstruct.place() conventions. @@ -8112,7 +8112,7 @@ declare module dijit { * @param reference Widget, DOMNode, or id of widget or DOMNode * @param position OptionalIf reference is a widget (or id of widget), and that widget has an ".addChild" method,it will be called passing this widget instance into that method, supplying the optionalposition index passed. In this case position (if specified) should be an integer.If reference is a DOMNode (or id matching a DOMNode but not a widget),the position argument can be a numeric index or a string"first", "last", "before", or "after", same as dojo/dom-construct::place(). */ - placeAt(reference: dijit._WidgetBase, position: number): any; + placeAt(reference: dijit._WidgetBase, position?: number): any; /** * */ @@ -8770,21 +8770,21 @@ declare module dijit { * @param widget * @param insertIndex Optional */ - addChild(widget: dijit._WidgetBase, insertIndex: number): void; + addChild(widget: dijit._WidgetBase, insertIndex?: number): void; /** * This method is deprecated, use get() or set() directly. * * @param name The property to get or set. If an object is passed here and nota string, its keys are used as names of attributes to be setand the value of the object as values to set in the widget. * @param value OptionalOptional. If provided, attr() operates as a setter. If omitted,the current value of the named property is returned. */ - attr(name: String, value: Object): any; + attr(name: String, value?: Object): any; /** * This method is deprecated, use get() or set() directly. * * @param name The property to get or set. If an object is passed here and nota string, its keys are used as names of attributes to be setand the value of the object as values to set in the widget. * @param value OptionalOptional. If provided, attr() operates as a setter. If omitted,the current value of the named property is returned. */ - attr(name: Object, value: Object): any; + attr(name: Object, value?: Object): any; /** * Construct the UI for this widget, setting this.domNode. * Most widgets will mixin dijit._TemplatedMixin, which implements this method. @@ -8940,7 +8940,7 @@ declare module dijit { * @param fcn Function reference. * @param delay OptionalDelay, defaults to 0. */ - defer(fcn: Function, delay: number): Object; + defer(fcn: Function, delay?: number): Object; /** * Destroy this widget, but not its descendants. Descendants means widgets inside of * this.containerNode. Will also destroy any resources (including widgets) registered via this.own(). @@ -8998,7 +8998,7 @@ declare module dijit { * @param eventObj Optional * @param callbackArgs Optional */ - emit(type: String, eventObj: Object, callbackArgs: any[]): any; + emit(type: String, eventObj?: Object, callbackArgs?: any[]): any; /** * Put focus on this widget * @@ -9122,7 +9122,7 @@ declare module dijit { * @param reference Widget, DOMNode, or id of widget or DOMNode * @param position OptionalIf reference is a widget (or id of widget), and that widget has an ".addChild" method,it will be called passing this widget instance into that method, supplying the optionalposition index passed. In this case position (if specified) should be an integer.If reference is a DOMNode (or id matching a DOMNode but not a widget),the position argument can be a numeric index or a string"first", "last", "before", or "after", same as dojo/dom-construct::place(). */ - placeAt(reference: String, position: String): any; + placeAt(reference: String, position?: String): any; /** * Place this widget somewhere in the DOM based * on standard domConstruct.place() conventions. @@ -9133,7 +9133,7 @@ declare module dijit { * @param reference Widget, DOMNode, or id of widget or DOMNode * @param position OptionalIf reference is a widget (or id of widget), and that widget has an ".addChild" method,it will be called passing this widget instance into that method, supplying the optionalposition index passed. In this case position (if specified) should be an integer.If reference is a DOMNode (or id matching a DOMNode but not a widget),the position argument can be a numeric index or a string"first", "last", "before", or "after", same as dojo/dom-construct::place(). */ - placeAt(reference: HTMLElement, position: String): any; + placeAt(reference: HTMLElement, position?: String): any; /** * Place this widget somewhere in the DOM based * on standard domConstruct.place() conventions. @@ -9144,7 +9144,7 @@ declare module dijit { * @param reference Widget, DOMNode, or id of widget or DOMNode * @param position OptionalIf reference is a widget (or id of widget), and that widget has an ".addChild" method,it will be called passing this widget instance into that method, supplying the optionalposition index passed. In this case position (if specified) should be an integer.If reference is a DOMNode (or id matching a DOMNode but not a widget),the position argument can be a numeric index or a string"first", "last", "before", or "after", same as dojo/dom-construct::place(). */ - placeAt(reference: dijit._WidgetBase, position: String): any; + placeAt(reference: dijit._WidgetBase, position?: String): any; /** * Place this widget somewhere in the DOM based * on standard domConstruct.place() conventions. @@ -9155,7 +9155,7 @@ declare module dijit { * @param reference Widget, DOMNode, or id of widget or DOMNode * @param position OptionalIf reference is a widget (or id of widget), and that widget has an ".addChild" method,it will be called passing this widget instance into that method, supplying the optionalposition index passed. In this case position (if specified) should be an integer.If reference is a DOMNode (or id matching a DOMNode but not a widget),the position argument can be a numeric index or a string"first", "last", "before", or "after", same as dojo/dom-construct::place(). */ - placeAt(reference: String, position: number): any; + placeAt(reference: String, position?: number): any; /** * Place this widget somewhere in the DOM based * on standard domConstruct.place() conventions. @@ -9166,7 +9166,7 @@ declare module dijit { * @param reference Widget, DOMNode, or id of widget or DOMNode * @param position OptionalIf reference is a widget (or id of widget), and that widget has an ".addChild" method,it will be called passing this widget instance into that method, supplying the optionalposition index passed. In this case position (if specified) should be an integer.If reference is a DOMNode (or id matching a DOMNode but not a widget),the position argument can be a numeric index or a string"first", "last", "before", or "after", same as dojo/dom-construct::place(). */ - placeAt(reference: HTMLElement, position: number): any; + placeAt(reference: HTMLElement, position?: number): any; /** * Place this widget somewhere in the DOM based * on standard domConstruct.place() conventions. @@ -9177,7 +9177,7 @@ declare module dijit { * @param reference Widget, DOMNode, or id of widget or DOMNode * @param position OptionalIf reference is a widget (or id of widget), and that widget has an ".addChild" method,it will be called passing this widget instance into that method, supplying the optionalposition index passed. In this case position (if specified) should be an integer.If reference is a DOMNode (or id matching a DOMNode but not a widget),the position argument can be a numeric index or a string"first", "last", "before", or "after", same as dojo/dom-construct::place(). */ - placeAt(reference: dijit._WidgetBase, position: number): any; + placeAt(reference: dijit._WidgetBase, position?: number): any; /** * */ @@ -9779,14 +9779,14 @@ declare module dijit { * @param name The property to get or set. If an object is passed here and nota string, its keys are used as names of attributes to be setand the value of the object as values to set in the widget. * @param value OptionalOptional. If provided, attr() operates as a setter. If omitted,the current value of the named property is returned. */ - attr(name: String, value: Object): any; + attr(name: String, value?: Object): any; /** * This method is deprecated, use get() or set() directly. * * @param name The property to get or set. If an object is passed here and nota string, its keys are used as names of attributes to be setand the value of the object as values to set in the widget. * @param value OptionalOptional. If provided, attr() operates as a setter. If omitted,the current value of the named property is returned. */ - attr(name: Object, value: Object): any; + attr(name: Object, value?: Object): any; /** * */ @@ -9927,7 +9927,7 @@ declare module dijit { * @param fcn Function reference. * @param delay OptionalDelay, defaults to 0. */ - defer(fcn: Function, delay: number): Object; + defer(fcn: Function, delay?: number): Object; /** * Destroy this widget, but not its descendants. Descendants means widgets inside of * this.containerNode. Will also destroy any resources (including widgets) registered via this.own(). @@ -9985,7 +9985,7 @@ declare module dijit { * @param eventObj Optional * @param callbackArgs Optional */ - emit(type: String, eventObj: Object, callbackArgs: any[]): any; + emit(type: String, eventObj?: Object, callbackArgs?: any[]): any; /** * Focus on this MenuItem * @@ -10091,7 +10091,7 @@ declare module dijit { * @param reference Widget, DOMNode, or id of widget or DOMNode * @param position OptionalIf reference is a widget (or id of widget), and that widget has an ".addChild" method,it will be called passing this widget instance into that method, supplying the optionalposition index passed. In this case position (if specified) should be an integer.If reference is a DOMNode (or id matching a DOMNode but not a widget),the position argument can be a numeric index or a string"first", "last", "before", or "after", same as dojo/dom-construct::place(). */ - placeAt(reference: String, position: String): any; + placeAt(reference: String, position?: String): any; /** * Place this widget somewhere in the DOM based * on standard domConstruct.place() conventions. @@ -10102,7 +10102,7 @@ declare module dijit { * @param reference Widget, DOMNode, or id of widget or DOMNode * @param position OptionalIf reference is a widget (or id of widget), and that widget has an ".addChild" method,it will be called passing this widget instance into that method, supplying the optionalposition index passed. In this case position (if specified) should be an integer.If reference is a DOMNode (or id matching a DOMNode but not a widget),the position argument can be a numeric index or a string"first", "last", "before", or "after", same as dojo/dom-construct::place(). */ - placeAt(reference: HTMLElement, position: String): any; + placeAt(reference: HTMLElement, position?: String): any; /** * Place this widget somewhere in the DOM based * on standard domConstruct.place() conventions. @@ -10113,7 +10113,7 @@ declare module dijit { * @param reference Widget, DOMNode, or id of widget or DOMNode * @param position OptionalIf reference is a widget (or id of widget), and that widget has an ".addChild" method,it will be called passing this widget instance into that method, supplying the optionalposition index passed. In this case position (if specified) should be an integer.If reference is a DOMNode (or id matching a DOMNode but not a widget),the position argument can be a numeric index or a string"first", "last", "before", or "after", same as dojo/dom-construct::place(). */ - placeAt(reference: dijit._WidgetBase, position: String): any; + placeAt(reference: dijit._WidgetBase, position?: String): any; /** * Place this widget somewhere in the DOM based * on standard domConstruct.place() conventions. @@ -10124,7 +10124,7 @@ declare module dijit { * @param reference Widget, DOMNode, or id of widget or DOMNode * @param position OptionalIf reference is a widget (or id of widget), and that widget has an ".addChild" method,it will be called passing this widget instance into that method, supplying the optionalposition index passed. In this case position (if specified) should be an integer.If reference is a DOMNode (or id matching a DOMNode but not a widget),the position argument can be a numeric index or a string"first", "last", "before", or "after", same as dojo/dom-construct::place(). */ - placeAt(reference: String, position: number): any; + placeAt(reference: String, position?: number): any; /** * Place this widget somewhere in the DOM based * on standard domConstruct.place() conventions. @@ -10135,7 +10135,7 @@ declare module dijit { * @param reference Widget, DOMNode, or id of widget or DOMNode * @param position OptionalIf reference is a widget (or id of widget), and that widget has an ".addChild" method,it will be called passing this widget instance into that method, supplying the optionalposition index passed. In this case position (if specified) should be an integer.If reference is a DOMNode (or id matching a DOMNode but not a widget),the position argument can be a numeric index or a string"first", "last", "before", or "after", same as dojo/dom-construct::place(). */ - placeAt(reference: HTMLElement, position: number): any; + placeAt(reference: HTMLElement, position?: number): any; /** * Place this widget somewhere in the DOM based * on standard domConstruct.place() conventions. @@ -10146,7 +10146,7 @@ declare module dijit { * @param reference Widget, DOMNode, or id of widget or DOMNode * @param position OptionalIf reference is a widget (or id of widget), and that widget has an ".addChild" method,it will be called passing this widget instance into that method, supplying the optionalposition index passed. In this case position (if specified) should be an integer.If reference is a DOMNode (or id matching a DOMNode but not a widget),the position argument can be a numeric index or a string"first", "last", "before", or "after", same as dojo/dom-construct::place(). */ - placeAt(reference: dijit._WidgetBase, position: number): any; + placeAt(reference: dijit._WidgetBase, position?: number): any; /** * */ @@ -10638,14 +10638,14 @@ declare module dijit { * @param name The property to get or set. If an object is passed here and nota string, its keys are used as names of attributes to be setand the value of the object as values to set in the widget. * @param value OptionalOptional. If provided, attr() operates as a setter. If omitted,the current value of the named property is returned. */ - attr(name: String, value: Object): any; + attr(name: String, value?: Object): any; /** * This method is deprecated, use get() or set() directly. * * @param name The property to get or set. If an object is passed here and nota string, its keys are used as names of attributes to be setand the value of the object as values to set in the widget. * @param value OptionalOptional. If provided, attr() operates as a setter. If omitted,the current value of the named property is returned. */ - attr(name: Object, value: Object): any; + attr(name: Object, value?: Object): any; /** * Construct the UI for this widget, setting this.domNode. * Most widgets will mixin dijit._TemplatedMixin, which implements this method. @@ -10788,7 +10788,7 @@ declare module dijit { * @param fcn Function reference. * @param delay OptionalDelay, defaults to 0. */ - defer(fcn: Function, delay: number): Object; + defer(fcn: Function, delay?: number): Object; /** * */ @@ -10836,7 +10836,7 @@ declare module dijit { * @param eventObj Optional * @param callbackArgs Optional */ - emit(type: String, eventObj: Object, callbackArgs: any[]): any; + emit(type: String, eventObj?: Object, callbackArgs?: any[]): any; /** * Get a property from a widget. * Get a named property from a widget. The property may @@ -10923,7 +10923,7 @@ declare module dijit { * @param reference Widget, DOMNode, or id of widget or DOMNode * @param position OptionalIf reference is a widget (or id of widget), and that widget has an ".addChild" method,it will be called passing this widget instance into that method, supplying the optionalposition index passed. In this case position (if specified) should be an integer.If reference is a DOMNode (or id matching a DOMNode but not a widget),the position argument can be a numeric index or a string"first", "last", "before", or "after", same as dojo/dom-construct::place(). */ - placeAt(reference: String, position: String): any; + placeAt(reference: String, position?: String): any; /** * Place this widget somewhere in the DOM based * on standard domConstruct.place() conventions. @@ -10934,7 +10934,7 @@ declare module dijit { * @param reference Widget, DOMNode, or id of widget or DOMNode * @param position OptionalIf reference is a widget (or id of widget), and that widget has an ".addChild" method,it will be called passing this widget instance into that method, supplying the optionalposition index passed. In this case position (if specified) should be an integer.If reference is a DOMNode (or id matching a DOMNode but not a widget),the position argument can be a numeric index or a string"first", "last", "before", or "after", same as dojo/dom-construct::place(). */ - placeAt(reference: HTMLElement, position: String): any; + placeAt(reference: HTMLElement, position?: String): any; /** * Place this widget somewhere in the DOM based * on standard domConstruct.place() conventions. @@ -10945,7 +10945,7 @@ declare module dijit { * @param reference Widget, DOMNode, or id of widget or DOMNode * @param position OptionalIf reference is a widget (or id of widget), and that widget has an ".addChild" method,it will be called passing this widget instance into that method, supplying the optionalposition index passed. In this case position (if specified) should be an integer.If reference is a DOMNode (or id matching a DOMNode but not a widget),the position argument can be a numeric index or a string"first", "last", "before", or "after", same as dojo/dom-construct::place(). */ - placeAt(reference: dijit._WidgetBase, position: String): any; + placeAt(reference: dijit._WidgetBase, position?: String): any; /** * Place this widget somewhere in the DOM based * on standard domConstruct.place() conventions. @@ -10956,7 +10956,7 @@ declare module dijit { * @param reference Widget, DOMNode, or id of widget or DOMNode * @param position OptionalIf reference is a widget (or id of widget), and that widget has an ".addChild" method,it will be called passing this widget instance into that method, supplying the optionalposition index passed. In this case position (if specified) should be an integer.If reference is a DOMNode (or id matching a DOMNode but not a widget),the position argument can be a numeric index or a string"first", "last", "before", or "after", same as dojo/dom-construct::place(). */ - placeAt(reference: String, position: number): any; + placeAt(reference: String, position?: number): any; /** * Place this widget somewhere in the DOM based * on standard domConstruct.place() conventions. @@ -10967,7 +10967,7 @@ declare module dijit { * @param reference Widget, DOMNode, or id of widget or DOMNode * @param position OptionalIf reference is a widget (or id of widget), and that widget has an ".addChild" method,it will be called passing this widget instance into that method, supplying the optionalposition index passed. In this case position (if specified) should be an integer.If reference is a DOMNode (or id matching a DOMNode but not a widget),the position argument can be a numeric index or a string"first", "last", "before", or "after", same as dojo/dom-construct::place(). */ - placeAt(reference: HTMLElement, position: number): any; + placeAt(reference: HTMLElement, position?: number): any; /** * Place this widget somewhere in the DOM based * on standard domConstruct.place() conventions. @@ -10978,7 +10978,7 @@ declare module dijit { * @param reference Widget, DOMNode, or id of widget or DOMNode * @param position OptionalIf reference is a widget (or id of widget), and that widget has an ".addChild" method,it will be called passing this widget instance into that method, supplying the optionalposition index passed. In this case position (if specified) should be an integer.If reference is a DOMNode (or id matching a DOMNode but not a widget),the position argument can be a numeric index or a string"first", "last", "before", or "after", same as dojo/dom-construct::place(). */ - placeAt(reference: dijit._WidgetBase, position: number): any; + placeAt(reference: dijit._WidgetBase, position?: number): any; /** * */ @@ -11780,21 +11780,21 @@ declare module dijit { * @param widget * @param insertIndex Optional */ - addChild(widget: dijit._WidgetBase, insertIndex: number): void; + addChild(widget: dijit._WidgetBase, insertIndex?: number): void; /** * This method is deprecated, use get() or set() directly. * * @param name The property to get or set. If an object is passed here and nota string, its keys are used as names of attributes to be setand the value of the object as values to set in the widget. * @param value OptionalOptional. If provided, attr() operates as a setter. If omitted,the current value of the named property is returned. */ - attr(name: String, value: Object): any; + attr(name: String, value?: Object): any; /** * This method is deprecated, use get() or set() directly. * * @param name The property to get or set. If an object is passed here and nota string, its keys are used as names of attributes to be setand the value of the object as values to set in the widget. * @param value OptionalOptional. If provided, attr() operates as a setter. If omitted,the current value of the named property is returned. */ - attr(name: Object, value: Object): any; + attr(name: Object, value?: Object): any; /** * */ @@ -11954,7 +11954,7 @@ declare module dijit { * @param fcn Function reference. * @param delay OptionalDelay, defaults to 0. */ - defer(fcn: Function, delay: number): Object; + defer(fcn: Function, delay?: number): Object; /** * */ @@ -11976,7 +11976,7 @@ declare module dijit { * * @param preserveDom OptionalIf true, this method will leave the original DOM structure aloneduring tear-down. Note: this will not work with _Templatedwidgets yet. */ - destroyRendering(preserveDom: boolean): void; + destroyRendering(preserveDom?: boolean): void; /** * Deprecated, will be removed in 2.0, use handle.remove() instead. * @@ -12003,7 +12003,7 @@ declare module dijit { * @param eventObj Optional * @param callbackArgs Optional */ - emit(type: String, eventObj: Object, callbackArgs: any[]): any; + emit(type: String, eventObj?: Object, callbackArgs?: any[]): any; /** * Callback when the user hits the submit button. * Override this method to handle Dialog execution. @@ -12140,7 +12140,7 @@ declare module dijit { * @param reference Widget, DOMNode, DocumentFragment, or id of widget or DOMNode * @param position OptionalIf reference is a widget (or id of widget), and that widget has an ".addChild" method,it will be called passing this widget instance into that method, supplying the optionalposition index passed. In this case position (if specified) should be an integer.If reference is a DOMNode (or id matching a DOMNode but not a widget),the position argument can be a numeric index or a string"first", "last", "before", or "after", same as dojo/dom-construct::place(). */ - placeAt(reference: String, position: String): any; + placeAt(reference: String, position?: String): any; /** * Place this widget somewhere in the DOM based * on standard domConstruct.place() conventions. @@ -12151,7 +12151,7 @@ declare module dijit { * @param reference Widget, DOMNode, DocumentFragment, or id of widget or DOMNode * @param position OptionalIf reference is a widget (or id of widget), and that widget has an ".addChild" method,it will be called passing this widget instance into that method, supplying the optionalposition index passed. In this case position (if specified) should be an integer.If reference is a DOMNode (or id matching a DOMNode but not a widget),the position argument can be a numeric index or a string"first", "last", "before", or "after", same as dojo/dom-construct::place(). */ - placeAt(reference: HTMLElement, position: String): any; + placeAt(reference: HTMLElement, position?: String): any; /** * Place this widget somewhere in the DOM based * on standard domConstruct.place() conventions. @@ -12173,7 +12173,7 @@ declare module dijit { * @param reference Widget, DOMNode, DocumentFragment, or id of widget or DOMNode * @param position OptionalIf reference is a widget (or id of widget), and that widget has an ".addChild" method,it will be called passing this widget instance into that method, supplying the optionalposition index passed. In this case position (if specified) should be an integer.If reference is a DOMNode (or id matching a DOMNode but not a widget),the position argument can be a numeric index or a string"first", "last", "before", or "after", same as dojo/dom-construct::place(). */ - placeAt(reference: String, position: number): any; + placeAt(reference: String, position?: number): any; /** * Place this widget somewhere in the DOM based * on standard domConstruct.place() conventions. @@ -12184,7 +12184,7 @@ declare module dijit { * @param reference Widget, DOMNode, DocumentFragment, or id of widget or DOMNode * @param position OptionalIf reference is a widget (or id of widget), and that widget has an ".addChild" method,it will be called passing this widget instance into that method, supplying the optionalposition index passed. In this case position (if specified) should be an integer.If reference is a DOMNode (or id matching a DOMNode but not a widget),the position argument can be a numeric index or a string"first", "last", "before", or "after", same as dojo/dom-construct::place(). */ - placeAt(reference: HTMLElement, position: number): any; + placeAt(reference: HTMLElement, position?: number): any; /** * Place this widget somewhere in the DOM based * on standard domConstruct.place() conventions. @@ -12195,7 +12195,7 @@ declare module dijit { * @param reference Widget, DOMNode, DocumentFragment, or id of widget or DOMNode * @param position OptionalIf reference is a widget (or id of widget), and that widget has an ".addChild" method,it will be called passing this widget instance into that method, supplying the optionalposition index passed. In this case position (if specified) should be an integer.If reference is a DOMNode (or id matching a DOMNode but not a widget),the position argument can be a numeric index or a string"first", "last", "before", or "after", same as dojo/dom-construct::place(). */ - placeAt(reference: dijit._WidgetBase, position: number): any; + placeAt(reference: dijit._WidgetBase, position?: number): any; /** * */ @@ -13052,21 +13052,21 @@ declare module dijit { * @param widget * @param insertIndex Optional */ - addChild(widget: dijit._WidgetBase, insertIndex: number): void; + addChild(widget: dijit._WidgetBase, insertIndex?: number): void; /** * This method is deprecated, use get() or set() directly. * * @param name The property to get or set. If an object is passed here and nota string, its keys are used as names of attributes to be setand the value of the object as values to set in the widget. * @param value OptionalOptional. If provided, attr() operates as a setter. If omitted,the current value of the named property is returned. */ - attr(name: String, value: Object): any; + attr(name: String, value?: Object): any; /** * This method is deprecated, use get() or set() directly. * * @param name The property to get or set. If an object is passed here and nota string, its keys are used as names of attributes to be setand the value of the object as values to set in the widget. * @param value OptionalOptional. If provided, attr() operates as a setter. If omitted,the current value of the named property is returned. */ - attr(name: Object, value: Object): any; + attr(name: Object, value?: Object): any; /** * */ @@ -13226,7 +13226,7 @@ declare module dijit { * @param fcn Function reference. * @param delay OptionalDelay, defaults to 0. */ - defer(fcn: Function, delay: number): Object; + defer(fcn: Function, delay?: number): Object; /** * */ @@ -13275,7 +13275,7 @@ declare module dijit { * @param eventObj Optional * @param callbackArgs Optional */ - emit(type: String, eventObj: Object, callbackArgs: any[]): any; + emit(type: String, eventObj?: Object, callbackArgs?: any[]): any; /** * Callback when the user hits the submit button. * Override this method to handle Dialog execution. @@ -13412,7 +13412,7 @@ declare module dijit { * @param reference Widget, DOMNode, or id of widget or DOMNode * @param position OptionalIf reference is a widget (or id of widget), and that widget has an ".addChild" method,it will be called passing this widget instance into that method, supplying the optionalposition index passed. In this case position (if specified) should be an integer.If reference is a DOMNode (or id matching a DOMNode but not a widget),the position argument can be a numeric index or a string"first", "last", "before", or "after", same as dojo/dom-construct::place(). */ - placeAt(reference: String, position: String): any; + placeAt(reference: String, position?: String): any; /** * Place this widget somewhere in the DOM based * on standard domConstruct.place() conventions. @@ -13423,7 +13423,7 @@ declare module dijit { * @param reference Widget, DOMNode, or id of widget or DOMNode * @param position OptionalIf reference is a widget (or id of widget), and that widget has an ".addChild" method,it will be called passing this widget instance into that method, supplying the optionalposition index passed. In this case position (if specified) should be an integer.If reference is a DOMNode (or id matching a DOMNode but not a widget),the position argument can be a numeric index or a string"first", "last", "before", or "after", same as dojo/dom-construct::place(). */ - placeAt(reference: HTMLElement, position: String): any; + placeAt(reference: HTMLElement, position?: String): any; /** * Place this widget somewhere in the DOM based * on standard domConstruct.place() conventions. @@ -13434,7 +13434,7 @@ declare module dijit { * @param reference Widget, DOMNode, or id of widget or DOMNode * @param position OptionalIf reference is a widget (or id of widget), and that widget has an ".addChild" method,it will be called passing this widget instance into that method, supplying the optionalposition index passed. In this case position (if specified) should be an integer.If reference is a DOMNode (or id matching a DOMNode but not a widget),the position argument can be a numeric index or a string"first", "last", "before", or "after", same as dojo/dom-construct::place(). */ - placeAt(reference: dijit._WidgetBase, position: String): any; + placeAt(reference: dijit._WidgetBase, position?: String): any; /** * Place this widget somewhere in the DOM based * on standard domConstruct.place() conventions. @@ -13445,7 +13445,7 @@ declare module dijit { * @param reference Widget, DOMNode, or id of widget or DOMNode * @param position OptionalIf reference is a widget (or id of widget), and that widget has an ".addChild" method,it will be called passing this widget instance into that method, supplying the optionalposition index passed. In this case position (if specified) should be an integer.If reference is a DOMNode (or id matching a DOMNode but not a widget),the position argument can be a numeric index or a string"first", "last", "before", or "after", same as dojo/dom-construct::place(). */ - placeAt(reference: String, position: number): any; + placeAt(reference: String, position?: number): any; /** * Place this widget somewhere in the DOM based * on standard domConstruct.place() conventions. @@ -13456,7 +13456,7 @@ declare module dijit { * @param reference Widget, DOMNode, or id of widget or DOMNode * @param position OptionalIf reference is a widget (or id of widget), and that widget has an ".addChild" method,it will be called passing this widget instance into that method, supplying the optionalposition index passed. In this case position (if specified) should be an integer.If reference is a DOMNode (or id matching a DOMNode but not a widget),the position argument can be a numeric index or a string"first", "last", "before", or "after", same as dojo/dom-construct::place(). */ - placeAt(reference: HTMLElement, position: number): any; + placeAt(reference: HTMLElement, position?: number): any; /** * Place this widget somewhere in the DOM based * on standard domConstruct.place() conventions. @@ -13467,7 +13467,7 @@ declare module dijit { * @param reference Widget, DOMNode, or id of widget or DOMNode * @param position OptionalIf reference is a widget (or id of widget), and that widget has an ".addChild" method,it will be called passing this widget instance into that method, supplying the optionalposition index passed. In this case position (if specified) should be an integer.If reference is a DOMNode (or id matching a DOMNode but not a widget),the position argument can be a numeric index or a string"first", "last", "before", or "after", same as dojo/dom-construct::place(). */ - placeAt(reference: dijit._WidgetBase, position: number): any; + placeAt(reference: dijit._WidgetBase, position?: number): any; /** * */ @@ -14447,14 +14447,14 @@ declare module dijit { * @param name The property to get or set. If an object is passed here and nota string, its keys are used as names of attributes to be setand the value of the object as values to set in the widget. * @param value OptionalOptional. If provided, attr() operates as a setter. If omitted,the current value of the named property is returned. */ - attr(name: String, value: Object): any; + attr(name: String, value?: Object): any; /** * This method is deprecated, use get() or set() directly. * * @param name The property to get or set. If an object is passed here and nota string, its keys are used as names of attributes to be setand the value of the object as values to set in the widget. * @param value OptionalOptional. If provided, attr() operates as a setter. If omitted,the current value of the named property is returned. */ - attr(name: Object, value: Object): any; + attr(name: Object, value?: Object): any; /** * */ @@ -14595,7 +14595,7 @@ declare module dijit { * @param fcn Function reference. * @param delay OptionalDelay, defaults to 0. */ - defer(fcn: Function, delay: number): Object; + defer(fcn: Function, delay?: number): Object; /** * Destroy this widget, but not its descendants. Descendants means widgets inside of * this.containerNode. Will also destroy any resources (including widgets) registered via this.own(). @@ -14653,7 +14653,7 @@ declare module dijit { * @param eventObj Optional * @param callbackArgs Optional */ - emit(type: String, eventObj: Object, callbackArgs: any[]): any; + emit(type: String, eventObj?: Object, callbackArgs?: any[]): any; /** * Focus this widget. Puts focus on the most recently focused cell. * @@ -14740,7 +14740,7 @@ declare module dijit { * @param reference Widget, DOMNode, or id of widget or DOMNode * @param position OptionalIf reference is a widget (or id of widget), and that widget has an ".addChild" method,it will be called passing this widget instance into that method, supplying the optionalposition index passed. In this case position (if specified) should be an integer.If reference is a DOMNode (or id matching a DOMNode but not a widget),the position argument can be a numeric index or a string"first", "last", "before", or "after", same as dojo/dom-construct::place(). */ - placeAt(reference: String, position: String): any; + placeAt(reference: String, position?: String): any; /** * Place this widget somewhere in the DOM based * on standard domConstruct.place() conventions. @@ -14751,7 +14751,7 @@ declare module dijit { * @param reference Widget, DOMNode, or id of widget or DOMNode * @param position OptionalIf reference is a widget (or id of widget), and that widget has an ".addChild" method,it will be called passing this widget instance into that method, supplying the optionalposition index passed. In this case position (if specified) should be an integer.If reference is a DOMNode (or id matching a DOMNode but not a widget),the position argument can be a numeric index or a string"first", "last", "before", or "after", same as dojo/dom-construct::place(). */ - placeAt(reference: HTMLElement, position: String): any; + placeAt(reference: HTMLElement, position?: String): any; /** * Place this widget somewhere in the DOM based * on standard domConstruct.place() conventions. @@ -14762,7 +14762,7 @@ declare module dijit { * @param reference Widget, DOMNode, or id of widget or DOMNode * @param position OptionalIf reference is a widget (or id of widget), and that widget has an ".addChild" method,it will be called passing this widget instance into that method, supplying the optionalposition index passed. In this case position (if specified) should be an integer.If reference is a DOMNode (or id matching a DOMNode but not a widget),the position argument can be a numeric index or a string"first", "last", "before", or "after", same as dojo/dom-construct::place(). */ - placeAt(reference: dijit._WidgetBase, position: String): any; + placeAt(reference: dijit._WidgetBase, position?: String): any; /** * Place this widget somewhere in the DOM based * on standard domConstruct.place() conventions. @@ -14773,7 +14773,7 @@ declare module dijit { * @param reference Widget, DOMNode, or id of widget or DOMNode * @param position OptionalIf reference is a widget (or id of widget), and that widget has an ".addChild" method,it will be called passing this widget instance into that method, supplying the optionalposition index passed. In this case position (if specified) should be an integer.If reference is a DOMNode (or id matching a DOMNode but not a widget),the position argument can be a numeric index or a string"first", "last", "before", or "after", same as dojo/dom-construct::place(). */ - placeAt(reference: String, position: number): any; + placeAt(reference: String, position?: number): any; /** * Place this widget somewhere in the DOM based * on standard domConstruct.place() conventions. @@ -14784,7 +14784,7 @@ declare module dijit { * @param reference Widget, DOMNode, or id of widget or DOMNode * @param position OptionalIf reference is a widget (or id of widget), and that widget has an ".addChild" method,it will be called passing this widget instance into that method, supplying the optionalposition index passed. In this case position (if specified) should be an integer.If reference is a DOMNode (or id matching a DOMNode but not a widget),the position argument can be a numeric index or a string"first", "last", "before", or "after", same as dojo/dom-construct::place(). */ - placeAt(reference: HTMLElement, position: number): any; + placeAt(reference: HTMLElement, position?: number): any; /** * Place this widget somewhere in the DOM based * on standard domConstruct.place() conventions. @@ -14795,7 +14795,7 @@ declare module dijit { * @param reference Widget, DOMNode, or id of widget or DOMNode * @param position OptionalIf reference is a widget (or id of widget), and that widget has an ".addChild" method,it will be called passing this widget instance into that method, supplying the optionalposition index passed. In this case position (if specified) should be an integer.If reference is a DOMNode (or id matching a DOMNode but not a widget),the position argument can be a numeric index or a string"first", "last", "before", or "after", same as dojo/dom-construct::place(). */ - placeAt(reference: dijit._WidgetBase, position: number): any; + placeAt(reference: dijit._WidgetBase, position?: number): any; /** * */ @@ -15584,21 +15584,21 @@ declare module dijit { * @param widget * @param insertIndex Optional */ - addChild(widget: dijit._WidgetBase, insertIndex: number): void; + addChild(widget: dijit._WidgetBase, insertIndex?: number): void; /** * This method is deprecated, use get() or set() directly. * * @param name The property to get or set. If an object is passed here and nota string, its keys are used as names of attributes to be setand the value of the object as values to set in the widget. * @param value OptionalOptional. If provided, attr() operates as a setter. If omitted,the current value of the named property is returned. */ - attr(name: String, value: Object): any; + attr(name: String, value?: Object): any; /** * This method is deprecated, use get() or set() directly. * * @param name The property to get or set. If an object is passed here and nota string, its keys are used as names of attributes to be setand the value of the object as values to set in the widget. * @param value OptionalOptional. If provided, attr() operates as a setter. If omitted,the current value of the named property is returned. */ - attr(name: Object, value: Object): any; + attr(name: Object, value?: Object): any; /** * */ @@ -15750,7 +15750,7 @@ declare module dijit { * @param fcn Function reference. * @param delay OptionalDelay, defaults to 0. */ - defer(fcn: Function, delay: number): Object; + defer(fcn: Function, delay?: number): Object; /** * */ @@ -15794,7 +15794,7 @@ declare module dijit { * @param eventObj Optional * @param callbackArgs Optional */ - emit(type: String, eventObj: Object, callbackArgs: any[]): any; + emit(type: String, eventObj?: Object, callbackArgs?: any[]): any; /** * Get a property from a widget. * Get a named property from a widget. The property may @@ -15900,7 +15900,7 @@ declare module dijit { * @param reference Widget, DOMNode, or id of widget or DOMNode * @param position OptionalIf reference is a widget (or id of widget), and that widget has an ".addChild" method,it will be called passing this widget instance into that method, supplying the optionalposition index passed. In this case position (if specified) should be an integer.If reference is a DOMNode (or id matching a DOMNode but not a widget),the position argument can be a numeric index or a string"first", "last", "before", or "after", same as dojo/dom-construct::place(). */ - placeAt(reference: String, position: String): any; + placeAt(reference: String, position?: String): any; /** * Place this widget somewhere in the DOM based * on standard domConstruct.place() conventions. @@ -15911,7 +15911,7 @@ declare module dijit { * @param reference Widget, DOMNode, or id of widget or DOMNode * @param position OptionalIf reference is a widget (or id of widget), and that widget has an ".addChild" method,it will be called passing this widget instance into that method, supplying the optionalposition index passed. In this case position (if specified) should be an integer.If reference is a DOMNode (or id matching a DOMNode but not a widget),the position argument can be a numeric index or a string"first", "last", "before", or "after", same as dojo/dom-construct::place(). */ - placeAt(reference: HTMLElement, position: String): any; + placeAt(reference: HTMLElement, position?: String): any; /** * Place this widget somewhere in the DOM based * on standard domConstruct.place() conventions. @@ -15922,7 +15922,7 @@ declare module dijit { * @param reference Widget, DOMNode, or id of widget or DOMNode * @param position OptionalIf reference is a widget (or id of widget), and that widget has an ".addChild" method,it will be called passing this widget instance into that method, supplying the optionalposition index passed. In this case position (if specified) should be an integer.If reference is a DOMNode (or id matching a DOMNode but not a widget),the position argument can be a numeric index or a string"first", "last", "before", or "after", same as dojo/dom-construct::place(). */ - placeAt(reference: dijit._WidgetBase, position: String): any; + placeAt(reference: dijit._WidgetBase, position?: String): any; /** * Place this widget somewhere in the DOM based * on standard domConstruct.place() conventions. @@ -15933,7 +15933,7 @@ declare module dijit { * @param reference Widget, DOMNode, or id of widget or DOMNode * @param position OptionalIf reference is a widget (or id of widget), and that widget has an ".addChild" method,it will be called passing this widget instance into that method, supplying the optionalposition index passed. In this case position (if specified) should be an integer.If reference is a DOMNode (or id matching a DOMNode but not a widget),the position argument can be a numeric index or a string"first", "last", "before", or "after", same as dojo/dom-construct::place(). */ - placeAt(reference: String, position: number): any; + placeAt(reference: String, position?: number): any; /** * Place this widget somewhere in the DOM based * on standard domConstruct.place() conventions. @@ -15944,7 +15944,7 @@ declare module dijit { * @param reference Widget, DOMNode, or id of widget or DOMNode * @param position OptionalIf reference is a widget (or id of widget), and that widget has an ".addChild" method,it will be called passing this widget instance into that method, supplying the optionalposition index passed. In this case position (if specified) should be an integer.If reference is a DOMNode (or id matching a DOMNode but not a widget),the position argument can be a numeric index or a string"first", "last", "before", or "after", same as dojo/dom-construct::place(). */ - placeAt(reference: HTMLElement, position: number): any; + placeAt(reference: HTMLElement, position?: number): any; /** * Place this widget somewhere in the DOM based * on standard domConstruct.place() conventions. @@ -15955,7 +15955,7 @@ declare module dijit { * @param reference Widget, DOMNode, or id of widget or DOMNode * @param position OptionalIf reference is a widget (or id of widget), and that widget has an ".addChild" method,it will be called passing this widget instance into that method, supplying the optionalposition index passed. In this case position (if specified) should be an integer.If reference is a DOMNode (or id matching a DOMNode but not a widget),the position argument can be a numeric index or a string"first", "last", "before", or "after", same as dojo/dom-construct::place(). */ - placeAt(reference: dijit._WidgetBase, position: number): any; + placeAt(reference: dijit._WidgetBase, position?: number): any; /** * */ @@ -16640,21 +16640,21 @@ declare module dijit { * @param widget * @param insertIndex Optional */ - addChild(widget: dijit._WidgetBase, insertIndex: number): void; + addChild(widget: dijit._WidgetBase, insertIndex?: number): void; /** * This method is deprecated, use get() or set() directly. * * @param name The property to get or set. If an object is passed here and nota string, its keys are used as names of attributes to be setand the value of the object as values to set in the widget. * @param value OptionalOptional. If provided, attr() operates as a setter. If omitted,the current value of the named property is returned. */ - attr(name: String, value: Object): any; + attr(name: String, value?: Object): any; /** * This method is deprecated, use get() or set() directly. * * @param name The property to get or set. If an object is passed here and nota string, its keys are used as names of attributes to be setand the value of the object as values to set in the widget. * @param value OptionalOptional. If provided, attr() operates as a setter. If omitted,the current value of the named property is returned. */ - attr(name: Object, value: Object): any; + attr(name: Object, value?: Object): any; /** * Construct the UI for this widget, setting this.domNode. * Most widgets will mixin dijit._TemplatedMixin, which implements this method. @@ -16813,7 +16813,7 @@ declare module dijit { * @param fcn Function reference. * @param delay OptionalDelay, defaults to 0. */ - defer(fcn: Function, delay: number): Object; + defer(fcn: Function, delay?: number): Object; /** * Destroy this widget, but not its descendants. Descendants means widgets inside of * this.containerNode. Will also destroy any resources (including widgets) registered via this.own(). @@ -16871,7 +16871,7 @@ declare module dijit { * @param eventObj Optional * @param callbackArgs Optional */ - emit(type: String, eventObj: Object, callbackArgs: any[]): any; + emit(type: String, eventObj?: Object, callbackArgs?: any[]): any; /** * Default focus() implementation: focus the first child. * @@ -16997,7 +16997,7 @@ declare module dijit { * @param reference Widget, DOMNode, or id of widget or DOMNode * @param position OptionalIf reference is a widget (or id of widget), and that widget has an ".addChild" method,it will be called passing this widget instance into that method, supplying the optionalposition index passed. In this case position (if specified) should be an integer.If reference is a DOMNode (or id matching a DOMNode but not a widget),the position argument can be a numeric index or a string"first", "last", "before", or "after", same as dojo/dom-construct::place(). */ - placeAt(reference: String, position: String): any; + placeAt(reference: String, position?: String): any; /** * Place this widget somewhere in the DOM based * on standard domConstruct.place() conventions. @@ -17008,7 +17008,7 @@ declare module dijit { * @param reference Widget, DOMNode, or id of widget or DOMNode * @param position OptionalIf reference is a widget (or id of widget), and that widget has an ".addChild" method,it will be called passing this widget instance into that method, supplying the optionalposition index passed. In this case position (if specified) should be an integer.If reference is a DOMNode (or id matching a DOMNode but not a widget),the position argument can be a numeric index or a string"first", "last", "before", or "after", same as dojo/dom-construct::place(). */ - placeAt(reference: HTMLElement, position: String): any; + placeAt(reference: HTMLElement, position?: String): any; /** * Place this widget somewhere in the DOM based * on standard domConstruct.place() conventions. @@ -17019,7 +17019,7 @@ declare module dijit { * @param reference Widget, DOMNode, or id of widget or DOMNode * @param position OptionalIf reference is a widget (or id of widget), and that widget has an ".addChild" method,it will be called passing this widget instance into that method, supplying the optionalposition index passed. In this case position (if specified) should be an integer.If reference is a DOMNode (or id matching a DOMNode but not a widget),the position argument can be a numeric index or a string"first", "last", "before", or "after", same as dojo/dom-construct::place(). */ - placeAt(reference: dijit._WidgetBase, position: String): any; + placeAt(reference: dijit._WidgetBase, position?: String): any; /** * Place this widget somewhere in the DOM based * on standard domConstruct.place() conventions. @@ -17030,7 +17030,7 @@ declare module dijit { * @param reference Widget, DOMNode, or id of widget or DOMNode * @param position OptionalIf reference is a widget (or id of widget), and that widget has an ".addChild" method,it will be called passing this widget instance into that method, supplying the optionalposition index passed. In this case position (if specified) should be an integer.If reference is a DOMNode (or id matching a DOMNode but not a widget),the position argument can be a numeric index or a string"first", "last", "before", or "after", same as dojo/dom-construct::place(). */ - placeAt(reference: String, position: number): any; + placeAt(reference: String, position?: number): any; /** * Place this widget somewhere in the DOM based * on standard domConstruct.place() conventions. @@ -17041,7 +17041,7 @@ declare module dijit { * @param reference Widget, DOMNode, or id of widget or DOMNode * @param position OptionalIf reference is a widget (or id of widget), and that widget has an ".addChild" method,it will be called passing this widget instance into that method, supplying the optionalposition index passed. In this case position (if specified) should be an integer.If reference is a DOMNode (or id matching a DOMNode but not a widget),the position argument can be a numeric index or a string"first", "last", "before", or "after", same as dojo/dom-construct::place(). */ - placeAt(reference: HTMLElement, position: number): any; + placeAt(reference: HTMLElement, position?: number): any; /** * Place this widget somewhere in the DOM based * on standard domConstruct.place() conventions. @@ -17052,7 +17052,7 @@ declare module dijit { * @param reference Widget, DOMNode, or id of widget or DOMNode * @param position OptionalIf reference is a widget (or id of widget), and that widget has an ".addChild" method,it will be called passing this widget instance into that method, supplying the optionalposition index passed. In this case position (if specified) should be an integer.If reference is a DOMNode (or id matching a DOMNode but not a widget),the position argument can be a numeric index or a string"first", "last", "before", or "after", same as dojo/dom-construct::place(). */ - placeAt(reference: dijit._WidgetBase, position: number): any; + placeAt(reference: dijit._WidgetBase, position?: number): any; /** * */ @@ -17756,7 +17756,7 @@ declare module dijit { * @param plugin String, args object, plugin instance, or plugin constructor * @param index OptionalUsed when creating an instance fromsomething already in this.plugins. Ensures that the newinstance is assigned to this.plugins at that index. */ - addPlugin(plugin: String, index: number): void; + addPlugin(plugin: String, index?: number): void; /** * takes a plugin name as a string or a plugin instance and * adds it to the toolbar and associates it with this editor @@ -17768,7 +17768,7 @@ declare module dijit { * @param plugin String, args object, plugin instance, or plugin constructor * @param index OptionalUsed when creating an instance fromsomething already in this.plugins. Ensures that the newinstance is assigned to this.plugins at that index. */ - addPlugin(plugin: Object, index: number): void; + addPlugin(plugin: Object, index?: number): void; /** * takes a plugin name as a string or a plugin instance and * adds it to the toolbar and associates it with this editor @@ -17780,7 +17780,7 @@ declare module dijit { * @param plugin String, args object, plugin instance, or plugin constructor * @param index OptionalUsed when creating an instance fromsomething already in this.plugins. Ensures that the newinstance is assigned to this.plugins at that index. */ - addPlugin(plugin: Function, index: number): void; + addPlugin(plugin: Function, index?: number): void; /** * add an external stylesheet for the editing area * @@ -17793,14 +17793,14 @@ declare module dijit { * @param name The property to get or set. If an object is passed here and nota string, its keys are used as names of attributes to be setand the value of the object as values to set in the widget. * @param value OptionalOptional. If provided, attr() operates as a setter. If omitted,the current value of the named property is returned. */ - attr(name: String, value: Object): any; + attr(name: String, value?: Object): any; /** * This method is deprecated, use get() or set() directly. * * @param name The property to get or set. If an object is passed here and nota string, its keys are used as names of attributes to be setand the value of the object as values to set in the widget. * @param value OptionalOptional. If provided, attr() operates as a setter. If omitted,the current value of the named property is returned. */ - attr(name: Object, value: Object): any; + attr(name: Object, value?: Object): any; /** * Remove focus from this instance. * @@ -17948,7 +17948,7 @@ declare module dijit { * @param fcn Function reference. * @param delay OptionalDelay, defaults to 0. */ - defer(fcn: Function, delay: number): Object; + defer(fcn: Function, delay?: number): Object; /** * */ @@ -17996,7 +17996,7 @@ declare module dijit { * @param eventObj Optional * @param callbackArgs Optional */ - emit(type: String, eventObj: Object, callbackArgs: any[]): any; + emit(type: String, eventObj?: Object, callbackArgs?: any[]): any; /** * Main handler for executing any commands to the editor, like paste, bold, etc. * Called by plugins, but not meant to be called by end users. @@ -18117,7 +18117,7 @@ declare module dijit { * @param reference Widget, DOMNode, or id of widget or DOMNode * @param position OptionalIf reference is a widget (or id of widget), and that widget has an ".addChild" method,it will be called passing this widget instance into that method, supplying the optionalposition index passed. In this case position (if specified) should be an integer.If reference is a DOMNode (or id matching a DOMNode but not a widget),the position argument can be a numeric index or a string"first", "last", "before", or "after", same as dojo/dom-construct::place(). */ - placeAt(reference: String, position: String): any; + placeAt(reference: String, position?: String): any; /** * Place this widget somewhere in the DOM based * on standard domConstruct.place() conventions. @@ -18128,7 +18128,7 @@ declare module dijit { * @param reference Widget, DOMNode, or id of widget or DOMNode * @param position OptionalIf reference is a widget (or id of widget), and that widget has an ".addChild" method,it will be called passing this widget instance into that method, supplying the optionalposition index passed. In this case position (if specified) should be an integer.If reference is a DOMNode (or id matching a DOMNode but not a widget),the position argument can be a numeric index or a string"first", "last", "before", or "after", same as dojo/dom-construct::place(). */ - placeAt(reference: HTMLElement, position: String): any; + placeAt(reference: HTMLElement, position?: String): any; /** * Place this widget somewhere in the DOM based * on standard domConstruct.place() conventions. @@ -18139,7 +18139,7 @@ declare module dijit { * @param reference Widget, DOMNode, or id of widget or DOMNode * @param position OptionalIf reference is a widget (or id of widget), and that widget has an ".addChild" method,it will be called passing this widget instance into that method, supplying the optionalposition index passed. In this case position (if specified) should be an integer.If reference is a DOMNode (or id matching a DOMNode but not a widget),the position argument can be a numeric index or a string"first", "last", "before", or "after", same as dojo/dom-construct::place(). */ - placeAt(reference: dijit._WidgetBase, position: String): any; + placeAt(reference: dijit._WidgetBase, position?: String): any; /** * Place this widget somewhere in the DOM based * on standard domConstruct.place() conventions. @@ -18150,7 +18150,7 @@ declare module dijit { * @param reference Widget, DOMNode, or id of widget or DOMNode * @param position OptionalIf reference is a widget (or id of widget), and that widget has an ".addChild" method,it will be called passing this widget instance into that method, supplying the optionalposition index passed. In this case position (if specified) should be an integer.If reference is a DOMNode (or id matching a DOMNode but not a widget),the position argument can be a numeric index or a string"first", "last", "before", or "after", same as dojo/dom-construct::place(). */ - placeAt(reference: String, position: number): any; + placeAt(reference: String, position?: number): any; /** * Place this widget somewhere in the DOM based * on standard domConstruct.place() conventions. @@ -18161,7 +18161,7 @@ declare module dijit { * @param reference Widget, DOMNode, or id of widget or DOMNode * @param position OptionalIf reference is a widget (or id of widget), and that widget has an ".addChild" method,it will be called passing this widget instance into that method, supplying the optionalposition index passed. In this case position (if specified) should be an integer.If reference is a DOMNode (or id matching a DOMNode but not a widget),the position argument can be a numeric index or a string"first", "last", "before", or "after", same as dojo/dom-construct::place(). */ - placeAt(reference: HTMLElement, position: number): any; + placeAt(reference: HTMLElement, position?: number): any; /** * Place this widget somewhere in the DOM based * on standard domConstruct.place() conventions. @@ -18172,7 +18172,7 @@ declare module dijit { * @param reference Widget, DOMNode, or id of widget or DOMNode * @param position OptionalIf reference is a widget (or id of widget), and that widget has an ".addChild" method,it will be called passing this widget instance into that method, supplying the optionalposition index passed. In this case position (if specified) should be an integer.If reference is a DOMNode (or id matching a DOMNode but not a widget),the position argument can be a numeric index or a string"first", "last", "before", or "after", same as dojo/dom-construct::place(). */ - placeAt(reference: dijit._WidgetBase, position: number): any; + placeAt(reference: dijit._WidgetBase, position?: number): any; /** * */ @@ -18733,14 +18733,14 @@ declare module dijit { * @param name The property to get or set. If an object is passed here and nota string, its keys are used as names of attributes to be setand the value of the object as values to set in the widget. * @param value OptionalOptional. If provided, attr() operates as a setter. If omitted,the current value of the named property is returned. */ - attr(name: String, value: Object): any; + attr(name: String, value?: Object): any; /** * This method is deprecated, use get() or set() directly. * * @param name The property to get or set. If an object is passed here and nota string, its keys are used as names of attributes to be setand the value of the object as values to set in the widget. * @param value OptionalOptional. If provided, attr() operates as a setter. If omitted,the current value of the named property is returned. */ - attr(name: Object, value: Object): any; + attr(name: Object, value?: Object): any; /** * Construct the UI for this widget, setting this.domNode. * Most widgets will mixin dijit._TemplatedMixin, which implements this method. @@ -18883,7 +18883,7 @@ declare module dijit { * @param fcn Function reference. * @param delay OptionalDelay, defaults to 0. */ - defer(fcn: Function, delay: number): Object; + defer(fcn: Function, delay?: number): Object; /** * */ @@ -18942,7 +18942,7 @@ declare module dijit { * @param eventObj Optional * @param callbackArgs Optional */ - emit(type: String, eventObj: Object, callbackArgs: any[]): any; + emit(type: String, eventObj?: Object, callbackArgs?: any[]): any; /** * Get a property from a widget. * Get a named property from a widget. The property may @@ -19029,7 +19029,7 @@ declare module dijit { * @param reference Widget, DOMNode, or id of widget or DOMNode * @param position OptionalIf reference is a widget (or id of widget), and that widget has an ".addChild" method,it will be called passing this widget instance into that method, supplying the optionalposition index passed. In this case position (if specified) should be an integer.If reference is a DOMNode (or id matching a DOMNode but not a widget),the position argument can be a numeric index or a string"first", "last", "before", or "after", same as dojo/dom-construct::place(). */ - placeAt(reference: String, position: String): any; + placeAt(reference: String, position?: String): any; /** * Place this widget somewhere in the DOM based * on standard domConstruct.place() conventions. @@ -19040,7 +19040,7 @@ declare module dijit { * @param reference Widget, DOMNode, or id of widget or DOMNode * @param position OptionalIf reference is a widget (or id of widget), and that widget has an ".addChild" method,it will be called passing this widget instance into that method, supplying the optionalposition index passed. In this case position (if specified) should be an integer.If reference is a DOMNode (or id matching a DOMNode but not a widget),the position argument can be a numeric index or a string"first", "last", "before", or "after", same as dojo/dom-construct::place(). */ - placeAt(reference: HTMLElement, position: String): any; + placeAt(reference: HTMLElement, position?: String): any; /** * Place this widget somewhere in the DOM based * on standard domConstruct.place() conventions. @@ -19051,7 +19051,7 @@ declare module dijit { * @param reference Widget, DOMNode, or id of widget or DOMNode * @param position OptionalIf reference is a widget (or id of widget), and that widget has an ".addChild" method,it will be called passing this widget instance into that method, supplying the optionalposition index passed. In this case position (if specified) should be an integer.If reference is a DOMNode (or id matching a DOMNode but not a widget),the position argument can be a numeric index or a string"first", "last", "before", or "after", same as dojo/dom-construct::place(). */ - placeAt(reference: dijit._WidgetBase, position: String): any; + placeAt(reference: dijit._WidgetBase, position?: String): any; /** * Place this widget somewhere in the DOM based * on standard domConstruct.place() conventions. @@ -19062,7 +19062,7 @@ declare module dijit { * @param reference Widget, DOMNode, or id of widget or DOMNode * @param position OptionalIf reference is a widget (or id of widget), and that widget has an ".addChild" method,it will be called passing this widget instance into that method, supplying the optionalposition index passed. In this case position (if specified) should be an integer.If reference is a DOMNode (or id matching a DOMNode but not a widget),the position argument can be a numeric index or a string"first", "last", "before", or "after", same as dojo/dom-construct::place(). */ - placeAt(reference: String, position: number): any; + placeAt(reference: String, position?: number): any; /** * Place this widget somewhere in the DOM based * on standard domConstruct.place() conventions. @@ -19073,7 +19073,7 @@ declare module dijit { * @param reference Widget, DOMNode, or id of widget or DOMNode * @param position OptionalIf reference is a widget (or id of widget), and that widget has an ".addChild" method,it will be called passing this widget instance into that method, supplying the optionalposition index passed. In this case position (if specified) should be an integer.If reference is a DOMNode (or id matching a DOMNode but not a widget),the position argument can be a numeric index or a string"first", "last", "before", or "after", same as dojo/dom-construct::place(). */ - placeAt(reference: HTMLElement, position: number): any; + placeAt(reference: HTMLElement, position?: number): any; /** * Place this widget somewhere in the DOM based * on standard domConstruct.place() conventions. @@ -19084,7 +19084,7 @@ declare module dijit { * @param reference Widget, DOMNode, or id of widget or DOMNode * @param position OptionalIf reference is a widget (or id of widget), and that widget has an ".addChild" method,it will be called passing this widget instance into that method, supplying the optionalposition index passed. In this case position (if specified) should be an integer.If reference is a DOMNode (or id matching a DOMNode but not a widget),the position argument can be a numeric index or a string"first", "last", "before", or "after", same as dojo/dom-construct::place(). */ - placeAt(reference: dijit._WidgetBase, position: number): any; + placeAt(reference: dijit._WidgetBase, position?: number): any; /** * */ @@ -19577,14 +19577,14 @@ declare module dijit { * @param name The property to get or set. If an object is passed here and nota string, its keys are used as names of attributes to be setand the value of the object as values to set in the widget. * @param value OptionalOptional. If provided, attr() operates as a setter. If omitted,the current value of the named property is returned. */ - attr(name: String, value: Object): any; + attr(name: String, value?: Object): any; /** * This method is deprecated, use get() or set() directly. * * @param name The property to get or set. If an object is passed here and nota string, its keys are used as names of attributes to be setand the value of the object as values to set in the widget. * @param value OptionalOptional. If provided, attr() operates as a setter. If omitted,the current value of the named property is returned. */ - attr(name: Object, value: Object): any; + attr(name: Object, value?: Object): any; /** * */ @@ -19729,7 +19729,7 @@ declare module dijit { * @param fcn Function reference. * @param delay OptionalDelay, defaults to 0. */ - defer(fcn: Function, delay: number): Object; + defer(fcn: Function, delay?: number): Object; /** * */ @@ -19777,7 +19777,7 @@ declare module dijit { * @param eventObj Optional * @param callbackArgs Optional */ - emit(type: String, eventObj: Object, callbackArgs: any[]): any; + emit(type: String, eventObj?: Object, callbackArgs?: any[]): any; /** * User overridable function returning a Boolean to indicate * if the Save button should be enabled or not - usually due to invalid conditions @@ -19875,7 +19875,7 @@ declare module dijit { * @param reference Widget, DOMNode, or id of widget or DOMNode * @param position OptionalIf reference is a widget (or id of widget), and that widget has an ".addChild" method,it will be called passing this widget instance into that method, supplying the optionalposition index passed. In this case position (if specified) should be an integer.If reference is a DOMNode (or id matching a DOMNode but not a widget),the position argument can be a numeric index or a string"first", "last", "before", or "after", same as dojo/dom-construct::place(). */ - placeAt(reference: String, position: String): any; + placeAt(reference: String, position?: String): any; /** * Place this widget somewhere in the DOM based * on standard domConstruct.place() conventions. @@ -19886,7 +19886,7 @@ declare module dijit { * @param reference Widget, DOMNode, or id of widget or DOMNode * @param position OptionalIf reference is a widget (or id of widget), and that widget has an ".addChild" method,it will be called passing this widget instance into that method, supplying the optionalposition index passed. In this case position (if specified) should be an integer.If reference is a DOMNode (or id matching a DOMNode but not a widget),the position argument can be a numeric index or a string"first", "last", "before", or "after", same as dojo/dom-construct::place(). */ - placeAt(reference: HTMLElement, position: String): any; + placeAt(reference: HTMLElement, position?: String): any; /** * Place this widget somewhere in the DOM based * on standard domConstruct.place() conventions. @@ -19897,7 +19897,7 @@ declare module dijit { * @param reference Widget, DOMNode, or id of widget or DOMNode * @param position OptionalIf reference is a widget (or id of widget), and that widget has an ".addChild" method,it will be called passing this widget instance into that method, supplying the optionalposition index passed. In this case position (if specified) should be an integer.If reference is a DOMNode (or id matching a DOMNode but not a widget),the position argument can be a numeric index or a string"first", "last", "before", or "after", same as dojo/dom-construct::place(). */ - placeAt(reference: dijit._WidgetBase, position: String): any; + placeAt(reference: dijit._WidgetBase, position?: String): any; /** * Place this widget somewhere in the DOM based * on standard domConstruct.place() conventions. @@ -19908,7 +19908,7 @@ declare module dijit { * @param reference Widget, DOMNode, or id of widget or DOMNode * @param position OptionalIf reference is a widget (or id of widget), and that widget has an ".addChild" method,it will be called passing this widget instance into that method, supplying the optionalposition index passed. In this case position (if specified) should be an integer.If reference is a DOMNode (or id matching a DOMNode but not a widget),the position argument can be a numeric index or a string"first", "last", "before", or "after", same as dojo/dom-construct::place(). */ - placeAt(reference: String, position: number): any; + placeAt(reference: String, position?: number): any; /** * Place this widget somewhere in the DOM based * on standard domConstruct.place() conventions. @@ -19919,7 +19919,7 @@ declare module dijit { * @param reference Widget, DOMNode, or id of widget or DOMNode * @param position OptionalIf reference is a widget (or id of widget), and that widget has an ".addChild" method,it will be called passing this widget instance into that method, supplying the optionalposition index passed. In this case position (if specified) should be an integer.If reference is a DOMNode (or id matching a DOMNode but not a widget),the position argument can be a numeric index or a string"first", "last", "before", or "after", same as dojo/dom-construct::place(). */ - placeAt(reference: HTMLElement, position: number): any; + placeAt(reference: HTMLElement, position?: number): any; /** * Place this widget somewhere in the DOM based * on standard domConstruct.place() conventions. @@ -19930,7 +19930,7 @@ declare module dijit { * @param reference Widget, DOMNode, or id of widget or DOMNode * @param position OptionalIf reference is a widget (or id of widget), and that widget has an ".addChild" method,it will be called passing this widget instance into that method, supplying the optionalposition index passed. In this case position (if specified) should be an integer.If reference is a DOMNode (or id matching a DOMNode but not a widget),the position argument can be a numeric index or a string"first", "last", "before", or "after", same as dojo/dom-construct::place(). */ - placeAt(reference: dijit._WidgetBase, position: number): any; + placeAt(reference: dijit._WidgetBase, position?: number): any; /** * */ @@ -20511,7 +20511,7 @@ declare module dijit { * @param fcn Function reference. * @param delay OptionalDelay, defaults to 0. */ - defer(fcn: Function, delay: number): Object; + defer(fcn: Function, delay?: number): Object; /** * Destroy this widget, but not its descendants. Descendants means widgets inside of * this.containerNode. Will also destroy any resources (including widgets) registered via this.own(). @@ -20569,7 +20569,7 @@ declare module dijit { * @param eventObj Optional * @param callbackArgs Optional */ - emit(type: String, eventObj: Object, callbackArgs: any[]): any; + emit(type: String, eventObj?: Object, callbackArgs?: any[]): any; /** * Get a property from a widget. * Get a named property from a widget. The property may @@ -20670,7 +20670,7 @@ declare module dijit { * @param reference Widget, DOMNode, or id of widget or DOMNode * @param position OptionalIf reference is a widget (or id of widget), and that widget has an ".addChild" method,it will be called passing this widget instance into that method, supplying the optionalposition index passed. In this case position (if specified) should be an integer.If reference is a DOMNode (or id matching a DOMNode but not a widget),the position argument can be a numeric index or a string"first", "last", "before", or "after", same as dojo/dom-construct::place(). */ - placeAt(reference: String, position: String): any; + placeAt(reference: String, position?: String): any; /** * Place this widget somewhere in the DOM based * on standard domConstruct.place() conventions. @@ -20681,7 +20681,7 @@ declare module dijit { * @param reference Widget, DOMNode, or id of widget or DOMNode * @param position OptionalIf reference is a widget (or id of widget), and that widget has an ".addChild" method,it will be called passing this widget instance into that method, supplying the optionalposition index passed. In this case position (if specified) should be an integer.If reference is a DOMNode (or id matching a DOMNode but not a widget),the position argument can be a numeric index or a string"first", "last", "before", or "after", same as dojo/dom-construct::place(). */ - placeAt(reference: HTMLElement, position: String): any; + placeAt(reference: HTMLElement, position?: String): any; /** * Place this widget somewhere in the DOM based * on standard domConstruct.place() conventions. @@ -20692,7 +20692,7 @@ declare module dijit { * @param reference Widget, DOMNode, or id of widget or DOMNode * @param position OptionalIf reference is a widget (or id of widget), and that widget has an ".addChild" method,it will be called passing this widget instance into that method, supplying the optionalposition index passed. In this case position (if specified) should be an integer.If reference is a DOMNode (or id matching a DOMNode but not a widget),the position argument can be a numeric index or a string"first", "last", "before", or "after", same as dojo/dom-construct::place(). */ - placeAt(reference: dijit._WidgetBase, position: String): any; + placeAt(reference: dijit._WidgetBase, position?: String): any; /** * Place this widget somewhere in the DOM based * on standard domConstruct.place() conventions. @@ -20703,7 +20703,7 @@ declare module dijit { * @param reference Widget, DOMNode, or id of widget or DOMNode * @param position OptionalIf reference is a widget (or id of widget), and that widget has an ".addChild" method,it will be called passing this widget instance into that method, supplying the optionalposition index passed. In this case position (if specified) should be an integer.If reference is a DOMNode (or id matching a DOMNode but not a widget),the position argument can be a numeric index or a string"first", "last", "before", or "after", same as dojo/dom-construct::place(). */ - placeAt(reference: String, position: number): any; + placeAt(reference: String, position?: number): any; /** * Place this widget somewhere in the DOM based * on standard domConstruct.place() conventions. @@ -20714,7 +20714,7 @@ declare module dijit { * @param reference Widget, DOMNode, or id of widget or DOMNode * @param position OptionalIf reference is a widget (or id of widget), and that widget has an ".addChild" method,it will be called passing this widget instance into that method, supplying the optionalposition index passed. In this case position (if specified) should be an integer.If reference is a DOMNode (or id matching a DOMNode but not a widget),the position argument can be a numeric index or a string"first", "last", "before", or "after", same as dojo/dom-construct::place(). */ - placeAt(reference: HTMLElement, position: number): any; + placeAt(reference: HTMLElement, position?: number): any; /** * Place this widget somewhere in the DOM based * on standard domConstruct.place() conventions. @@ -20725,7 +20725,7 @@ declare module dijit { * @param reference Widget, DOMNode, or id of widget or DOMNode * @param position OptionalIf reference is a widget (or id of widget), and that widget has an ".addChild" method,it will be called passing this widget instance into that method, supplying the optionalposition index passed. In this case position (if specified) should be an integer.If reference is a DOMNode (or id matching a DOMNode but not a widget),the position argument can be a numeric index or a string"first", "last", "before", or "after", same as dojo/dom-construct::place(). */ - placeAt(reference: dijit._WidgetBase, position: number): any; + placeAt(reference: dijit._WidgetBase, position?: number): any; /** * Processing after the DOM fragment is created * Called after the DOM fragment has been created, but not necessarily @@ -21199,21 +21199,21 @@ declare module dijit { * @param widget * @param insertIndex Optional */ - addChild(widget: dijit._WidgetBase, insertIndex: number): void; + addChild(widget: dijit._WidgetBase, insertIndex?: number): void; /** * This method is deprecated, use get() or set() directly. * * @param name The property to get or set. If an object is passed here and nota string, its keys are used as names of attributes to be setand the value of the object as values to set in the widget. * @param value OptionalOptional. If provided, attr() operates as a setter. If omitted,the current value of the named property is returned. */ - attr(name: String, value: Object): any; + attr(name: String, value?: Object): any; /** * This method is deprecated, use get() or set() directly. * * @param name The property to get or set. If an object is passed here and nota string, its keys are used as names of attributes to be setand the value of the object as values to set in the widget. * @param value OptionalOptional. If provided, attr() operates as a setter. If omitted,the current value of the named property is returned. */ - attr(name: Object, value: Object): any; + attr(name: Object, value?: Object): any; /** * Construct the UI for this widget, setting this.domNode. * Most widgets will mixin dijit._TemplatedMixin, which implements this method. @@ -21372,7 +21372,7 @@ declare module dijit { * @param fcn Function reference. * @param delay OptionalDelay, defaults to 0. */ - defer(fcn: Function, delay: number): Object; + defer(fcn: Function, delay?: number): Object; /** * Destroy this widget, but not its descendants. Descendants means widgets inside of * this.containerNode. Will also destroy any resources (including widgets) registered via this.own(). @@ -21430,7 +21430,7 @@ declare module dijit { * @param eventObj Optional * @param callbackArgs Optional */ - emit(type: String, eventObj: Object, callbackArgs: any[]): any; + emit(type: String, eventObj?: Object, callbackArgs?: any[]): any; /** * Default focus() implementation: focus the first child. * @@ -21554,7 +21554,7 @@ declare module dijit { * @param reference Widget, DOMNode, or id of widget or DOMNode * @param position OptionalIf reference is a widget (or id of widget), and that widget has an ".addChild" method,it will be called passing this widget instance into that method, supplying the optionalposition index passed. In this case position (if specified) should be an integer.If reference is a DOMNode (or id matching a DOMNode but not a widget),the position argument can be a numeric index or a string"first", "last", "before", or "after", same as dojo/dom-construct::place(). */ - placeAt(reference: String, position: String): any; + placeAt(reference: String, position?: String): any; /** * Place this widget somewhere in the DOM based * on standard domConstruct.place() conventions. @@ -21565,7 +21565,7 @@ declare module dijit { * @param reference Widget, DOMNode, or id of widget or DOMNode * @param position OptionalIf reference is a widget (or id of widget), and that widget has an ".addChild" method,it will be called passing this widget instance into that method, supplying the optionalposition index passed. In this case position (if specified) should be an integer.If reference is a DOMNode (or id matching a DOMNode but not a widget),the position argument can be a numeric index or a string"first", "last", "before", or "after", same as dojo/dom-construct::place(). */ - placeAt(reference: HTMLElement, position: String): any; + placeAt(reference: HTMLElement, position?: String): any; /** * Place this widget somewhere in the DOM based * on standard domConstruct.place() conventions. @@ -21576,7 +21576,7 @@ declare module dijit { * @param reference Widget, DOMNode, or id of widget or DOMNode * @param position OptionalIf reference is a widget (or id of widget), and that widget has an ".addChild" method,it will be called passing this widget instance into that method, supplying the optionalposition index passed. In this case position (if specified) should be an integer.If reference is a DOMNode (or id matching a DOMNode but not a widget),the position argument can be a numeric index or a string"first", "last", "before", or "after", same as dojo/dom-construct::place(). */ - placeAt(reference: dijit._WidgetBase, position: String): any; + placeAt(reference: dijit._WidgetBase, position?: String): any; /** * Place this widget somewhere in the DOM based * on standard domConstruct.place() conventions. @@ -21587,7 +21587,7 @@ declare module dijit { * @param reference Widget, DOMNode, or id of widget or DOMNode * @param position OptionalIf reference is a widget (or id of widget), and that widget has an ".addChild" method,it will be called passing this widget instance into that method, supplying the optionalposition index passed. In this case position (if specified) should be an integer.If reference is a DOMNode (or id matching a DOMNode but not a widget),the position argument can be a numeric index or a string"first", "last", "before", or "after", same as dojo/dom-construct::place(). */ - placeAt(reference: String, position: number): any; + placeAt(reference: String, position?: number): any; /** * Place this widget somewhere in the DOM based * on standard domConstruct.place() conventions. @@ -21598,7 +21598,7 @@ declare module dijit { * @param reference Widget, DOMNode, or id of widget or DOMNode * @param position OptionalIf reference is a widget (or id of widget), and that widget has an ".addChild" method,it will be called passing this widget instance into that method, supplying the optionalposition index passed. In this case position (if specified) should be an integer.If reference is a DOMNode (or id matching a DOMNode but not a widget),the position argument can be a numeric index or a string"first", "last", "before", or "after", same as dojo/dom-construct::place(). */ - placeAt(reference: HTMLElement, position: number): any; + placeAt(reference: HTMLElement, position?: number): any; /** * Place this widget somewhere in the DOM based * on standard domConstruct.place() conventions. @@ -21609,7 +21609,7 @@ declare module dijit { * @param reference Widget, DOMNode, or id of widget or DOMNode * @param position OptionalIf reference is a widget (or id of widget), and that widget has an ".addChild" method,it will be called passing this widget instance into that method, supplying the optionalposition index passed. In this case position (if specified) should be an integer.If reference is a DOMNode (or id matching a DOMNode but not a widget),the position argument can be a numeric index or a string"first", "last", "before", or "after", same as dojo/dom-construct::place(). */ - placeAt(reference: dijit._WidgetBase, position: number): any; + placeAt(reference: dijit._WidgetBase, position?: number): any; /** * */ @@ -22291,21 +22291,21 @@ declare module dijit { * @param widget * @param insertIndex Optional */ - addChild(widget: dijit._WidgetBase, insertIndex: number): void; + addChild(widget: dijit._WidgetBase, insertIndex?: number): void; /** * This method is deprecated, use get() or set() directly. * * @param name The property to get or set. If an object is passed here and nota string, its keys are used as names of attributes to be setand the value of the object as values to set in the widget. * @param value OptionalOptional. If provided, attr() operates as a setter. If omitted,the current value of the named property is returned. */ - attr(name: String, value: Object): any; + attr(name: String, value?: Object): any; /** * This method is deprecated, use get() or set() directly. * * @param name The property to get or set. If an object is passed here and nota string, its keys are used as names of attributes to be setand the value of the object as values to set in the widget. * @param value OptionalOptional. If provided, attr() operates as a setter. If omitted,the current value of the named property is returned. */ - attr(name: Object, value: Object): any; + attr(name: Object, value?: Object): any; /** * Attach menu to given node * @@ -22476,7 +22476,7 @@ declare module dijit { * @param fcn Function reference. * @param delay OptionalDelay, defaults to 0. */ - defer(fcn: Function, delay: number): Object; + defer(fcn: Function, delay?: number): Object; /** * */ @@ -22524,7 +22524,7 @@ declare module dijit { * @param eventObj Optional * @param callbackArgs Optional */ - emit(type: String, eventObj: Object, callbackArgs: any[]): any; + emit(type: String, eventObj?: Object, callbackArgs?: any[]): any; /** * Default focus() implementation: focus the first child. * @@ -22657,7 +22657,7 @@ declare module dijit { * @param reference Widget, DOMNode, or id of widget or DOMNode * @param position OptionalIf reference is a widget (or id of widget), and that widget has an ".addChild" method,it will be called passing this widget instance into that method, supplying the optionalposition index passed. In this case position (if specified) should be an integer.If reference is a DOMNode (or id matching a DOMNode but not a widget),the position argument can be a numeric index or a string"first", "last", "before", or "after", same as dojo/dom-construct::place(). */ - placeAt(reference: String, position: String): any; + placeAt(reference: String, position?: String): any; /** * Place this widget somewhere in the DOM based * on standard domConstruct.place() conventions. @@ -22668,7 +22668,7 @@ declare module dijit { * @param reference Widget, DOMNode, or id of widget or DOMNode * @param position OptionalIf reference is a widget (or id of widget), and that widget has an ".addChild" method,it will be called passing this widget instance into that method, supplying the optionalposition index passed. In this case position (if specified) should be an integer.If reference is a DOMNode (or id matching a DOMNode but not a widget),the position argument can be a numeric index or a string"first", "last", "before", or "after", same as dojo/dom-construct::place(). */ - placeAt(reference: HTMLElement, position: String): any; + placeAt(reference: HTMLElement, position?: String): any; /** * Place this widget somewhere in the DOM based * on standard domConstruct.place() conventions. @@ -22679,7 +22679,7 @@ declare module dijit { * @param reference Widget, DOMNode, or id of widget or DOMNode * @param position OptionalIf reference is a widget (or id of widget), and that widget has an ".addChild" method,it will be called passing this widget instance into that method, supplying the optionalposition index passed. In this case position (if specified) should be an integer.If reference is a DOMNode (or id matching a DOMNode but not a widget),the position argument can be a numeric index or a string"first", "last", "before", or "after", same as dojo/dom-construct::place(). */ - placeAt(reference: dijit._WidgetBase, position: String): any; + placeAt(reference: dijit._WidgetBase, position?: String): any; /** * Place this widget somewhere in the DOM based * on standard domConstruct.place() conventions. @@ -22690,7 +22690,7 @@ declare module dijit { * @param reference Widget, DOMNode, or id of widget or DOMNode * @param position OptionalIf reference is a widget (or id of widget), and that widget has an ".addChild" method,it will be called passing this widget instance into that method, supplying the optionalposition index passed. In this case position (if specified) should be an integer.If reference is a DOMNode (or id matching a DOMNode but not a widget),the position argument can be a numeric index or a string"first", "last", "before", or "after", same as dojo/dom-construct::place(). */ - placeAt(reference: String, position: number): any; + placeAt(reference: String, position?: number): any; /** * Place this widget somewhere in the DOM based * on standard domConstruct.place() conventions. @@ -22701,7 +22701,7 @@ declare module dijit { * @param reference Widget, DOMNode, or id of widget or DOMNode * @param position OptionalIf reference is a widget (or id of widget), and that widget has an ".addChild" method,it will be called passing this widget instance into that method, supplying the optionalposition index passed. In this case position (if specified) should be an integer.If reference is a DOMNode (or id matching a DOMNode but not a widget),the position argument can be a numeric index or a string"first", "last", "before", or "after", same as dojo/dom-construct::place(). */ - placeAt(reference: HTMLElement, position: number): any; + placeAt(reference: HTMLElement, position?: number): any; /** * Place this widget somewhere in the DOM based * on standard domConstruct.place() conventions. @@ -22712,7 +22712,7 @@ declare module dijit { * @param reference Widget, DOMNode, or id of widget or DOMNode * @param position OptionalIf reference is a widget (or id of widget), and that widget has an ".addChild" method,it will be called passing this widget instance into that method, supplying the optionalposition index passed. In this case position (if specified) should be an integer.If reference is a DOMNode (or id matching a DOMNode but not a widget),the position argument can be a numeric index or a string"first", "last", "before", or "after", same as dojo/dom-construct::place(). */ - placeAt(reference: dijit._WidgetBase, position: number): any; + placeAt(reference: dijit._WidgetBase, position?: number): any; /** * */ @@ -23310,14 +23310,14 @@ declare module dijit { * @param name The property to get or set. If an object is passed here and nota string, its keys are used as names of attributes to be setand the value of the object as values to set in the widget. * @param value OptionalOptional. If provided, attr() operates as a setter. If omitted,the current value of the named property is returned. */ - attr(name: String, value: Object): any; + attr(name: String, value?: Object): any; /** * This method is deprecated, use get() or set() directly. * * @param name The property to get or set. If an object is passed here and nota string, its keys are used as names of attributes to be setand the value of the object as values to set in the widget. * @param value OptionalOptional. If provided, attr() operates as a setter. If omitted,the current value of the named property is returned. */ - attr(name: Object, value: Object): any; + attr(name: Object, value?: Object): any; /** * */ @@ -23458,7 +23458,7 @@ declare module dijit { * @param fcn Function reference. * @param delay OptionalDelay, defaults to 0. */ - defer(fcn: Function, delay: number): Object; + defer(fcn: Function, delay?: number): Object; /** * Destroy this widget, but not its descendants. Descendants means widgets inside of * this.containerNode. Will also destroy any resources (including widgets) registered via this.own(). @@ -23516,7 +23516,7 @@ declare module dijit { * @param eventObj Optional * @param callbackArgs Optional */ - emit(type: String, eventObj: Object, callbackArgs: any[]): any; + emit(type: String, eventObj?: Object, callbackArgs?: any[]): any; /** * Focus on this MenuItem * @@ -23622,7 +23622,7 @@ declare module dijit { * @param reference Widget, DOMNode, or id of widget or DOMNode * @param position OptionalIf reference is a widget (or id of widget), and that widget has an ".addChild" method,it will be called passing this widget instance into that method, supplying the optionalposition index passed. In this case position (if specified) should be an integer.If reference is a DOMNode (or id matching a DOMNode but not a widget),the position argument can be a numeric index or a string"first", "last", "before", or "after", same as dojo/dom-construct::place(). */ - placeAt(reference: String, position: String): any; + placeAt(reference: String, position?: String): any; /** * Place this widget somewhere in the DOM based * on standard domConstruct.place() conventions. @@ -23633,7 +23633,7 @@ declare module dijit { * @param reference Widget, DOMNode, or id of widget or DOMNode * @param position OptionalIf reference is a widget (or id of widget), and that widget has an ".addChild" method,it will be called passing this widget instance into that method, supplying the optionalposition index passed. In this case position (if specified) should be an integer.If reference is a DOMNode (or id matching a DOMNode but not a widget),the position argument can be a numeric index or a string"first", "last", "before", or "after", same as dojo/dom-construct::place(). */ - placeAt(reference: HTMLElement, position: String): any; + placeAt(reference: HTMLElement, position?: String): any; /** * Place this widget somewhere in the DOM based * on standard domConstruct.place() conventions. @@ -23644,7 +23644,7 @@ declare module dijit { * @param reference Widget, DOMNode, or id of widget or DOMNode * @param position OptionalIf reference is a widget (or id of widget), and that widget has an ".addChild" method,it will be called passing this widget instance into that method, supplying the optionalposition index passed. In this case position (if specified) should be an integer.If reference is a DOMNode (or id matching a DOMNode but not a widget),the position argument can be a numeric index or a string"first", "last", "before", or "after", same as dojo/dom-construct::place(). */ - placeAt(reference: dijit._WidgetBase, position: String): any; + placeAt(reference: dijit._WidgetBase, position?: String): any; /** * Place this widget somewhere in the DOM based * on standard domConstruct.place() conventions. @@ -23655,7 +23655,7 @@ declare module dijit { * @param reference Widget, DOMNode, or id of widget or DOMNode * @param position OptionalIf reference is a widget (or id of widget), and that widget has an ".addChild" method,it will be called passing this widget instance into that method, supplying the optionalposition index passed. In this case position (if specified) should be an integer.If reference is a DOMNode (or id matching a DOMNode but not a widget),the position argument can be a numeric index or a string"first", "last", "before", or "after", same as dojo/dom-construct::place(). */ - placeAt(reference: String, position: number): any; + placeAt(reference: String, position?: number): any; /** * Place this widget somewhere in the DOM based * on standard domConstruct.place() conventions. @@ -23666,7 +23666,7 @@ declare module dijit { * @param reference Widget, DOMNode, or id of widget or DOMNode * @param position OptionalIf reference is a widget (or id of widget), and that widget has an ".addChild" method,it will be called passing this widget instance into that method, supplying the optionalposition index passed. In this case position (if specified) should be an integer.If reference is a DOMNode (or id matching a DOMNode but not a widget),the position argument can be a numeric index or a string"first", "last", "before", or "after", same as dojo/dom-construct::place(). */ - placeAt(reference: HTMLElement, position: number): any; + placeAt(reference: HTMLElement, position?: number): any; /** * Place this widget somewhere in the DOM based * on standard domConstruct.place() conventions. @@ -23677,7 +23677,7 @@ declare module dijit { * @param reference Widget, DOMNode, or id of widget or DOMNode * @param position OptionalIf reference is a widget (or id of widget), and that widget has an ".addChild" method,it will be called passing this widget instance into that method, supplying the optionalposition index passed. In this case position (if specified) should be an integer.If reference is a DOMNode (or id matching a DOMNode but not a widget),the position argument can be a numeric index or a string"first", "last", "before", or "after", same as dojo/dom-construct::place(). */ - placeAt(reference: dijit._WidgetBase, position: number): any; + placeAt(reference: dijit._WidgetBase, position?: number): any; /** * */ @@ -24227,14 +24227,14 @@ declare module dijit { * @param name The property to get or set. If an object is passed here and nota string, its keys are used as names of attributes to be setand the value of the object as values to set in the widget. * @param value OptionalOptional. If provided, attr() operates as a setter. If omitted,the current value of the named property is returned. */ - attr(name: String, value: Object): any; + attr(name: String, value?: Object): any; /** * This method is deprecated, use get() or set() directly. * * @param name The property to get or set. If an object is passed here and nota string, its keys are used as names of attributes to be setand the value of the object as values to set in the widget. * @param value OptionalOptional. If provided, attr() operates as a setter. If omitted,the current value of the named property is returned. */ - attr(name: Object, value: Object): any; + attr(name: Object, value?: Object): any; /** * */ @@ -24375,7 +24375,7 @@ declare module dijit { * @param fcn Function reference. * @param delay OptionalDelay, defaults to 0. */ - defer(fcn: Function, delay: number): Object; + defer(fcn: Function, delay?: number): Object; /** * Destroy this widget, but not its descendants. Descendants means widgets inside of * this.containerNode. Will also destroy any resources (including widgets) registered via this.own(). @@ -24433,7 +24433,7 @@ declare module dijit { * @param eventObj Optional * @param callbackArgs Optional */ - emit(type: String, eventObj: Object, callbackArgs: any[]): any; + emit(type: String, eventObj?: Object, callbackArgs?: any[]): any; /** * Focus on this MenuItem * @@ -24539,7 +24539,7 @@ declare module dijit { * @param reference Widget, DOMNode, or id of widget or DOMNode * @param position OptionalIf reference is a widget (or id of widget), and that widget has an ".addChild" method,it will be called passing this widget instance into that method, supplying the optionalposition index passed. In this case position (if specified) should be an integer.If reference is a DOMNode (or id matching a DOMNode but not a widget),the position argument can be a numeric index or a string"first", "last", "before", or "after", same as dojo/dom-construct::place(). */ - placeAt(reference: String, position: String): any; + placeAt(reference: String, position?: String): any; /** * Place this widget somewhere in the DOM based * on standard domConstruct.place() conventions. @@ -24550,7 +24550,7 @@ declare module dijit { * @param reference Widget, DOMNode, or id of widget or DOMNode * @param position OptionalIf reference is a widget (or id of widget), and that widget has an ".addChild" method,it will be called passing this widget instance into that method, supplying the optionalposition index passed. In this case position (if specified) should be an integer.If reference is a DOMNode (or id matching a DOMNode but not a widget),the position argument can be a numeric index or a string"first", "last", "before", or "after", same as dojo/dom-construct::place(). */ - placeAt(reference: HTMLElement, position: String): any; + placeAt(reference: HTMLElement, position?: String): any; /** * Place this widget somewhere in the DOM based * on standard domConstruct.place() conventions. @@ -24561,7 +24561,7 @@ declare module dijit { * @param reference Widget, DOMNode, or id of widget or DOMNode * @param position OptionalIf reference is a widget (or id of widget), and that widget has an ".addChild" method,it will be called passing this widget instance into that method, supplying the optionalposition index passed. In this case position (if specified) should be an integer.If reference is a DOMNode (or id matching a DOMNode but not a widget),the position argument can be a numeric index or a string"first", "last", "before", or "after", same as dojo/dom-construct::place(). */ - placeAt(reference: dijit._WidgetBase, position: String): any; + placeAt(reference: dijit._WidgetBase, position?: String): any; /** * Place this widget somewhere in the DOM based * on standard domConstruct.place() conventions. @@ -24572,7 +24572,7 @@ declare module dijit { * @param reference Widget, DOMNode, or id of widget or DOMNode * @param position OptionalIf reference is a widget (or id of widget), and that widget has an ".addChild" method,it will be called passing this widget instance into that method, supplying the optionalposition index passed. In this case position (if specified) should be an integer.If reference is a DOMNode (or id matching a DOMNode but not a widget),the position argument can be a numeric index or a string"first", "last", "before", or "after", same as dojo/dom-construct::place(). */ - placeAt(reference: String, position: number): any; + placeAt(reference: String, position?: number): any; /** * Place this widget somewhere in the DOM based * on standard domConstruct.place() conventions. @@ -24583,7 +24583,7 @@ declare module dijit { * @param reference Widget, DOMNode, or id of widget or DOMNode * @param position OptionalIf reference is a widget (or id of widget), and that widget has an ".addChild" method,it will be called passing this widget instance into that method, supplying the optionalposition index passed. In this case position (if specified) should be an integer.If reference is a DOMNode (or id matching a DOMNode but not a widget),the position argument can be a numeric index or a string"first", "last", "before", or "after", same as dojo/dom-construct::place(). */ - placeAt(reference: HTMLElement, position: number): any; + placeAt(reference: HTMLElement, position?: number): any; /** * Place this widget somewhere in the DOM based * on standard domConstruct.place() conventions. @@ -24594,7 +24594,7 @@ declare module dijit { * @param reference Widget, DOMNode, or id of widget or DOMNode * @param position OptionalIf reference is a widget (or id of widget), and that widget has an ".addChild" method,it will be called passing this widget instance into that method, supplying the optionalposition index passed. In this case position (if specified) should be an integer.If reference is a DOMNode (or id matching a DOMNode but not a widget),the position argument can be a numeric index or a string"first", "last", "before", or "after", same as dojo/dom-construct::place(). */ - placeAt(reference: dijit._WidgetBase, position: number): any; + placeAt(reference: dijit._WidgetBase, position?: number): any; /** * */ @@ -25159,14 +25159,14 @@ declare module dijit { * @param name The property to get or set. If an object is passed here and nota string, its keys are used as names of attributes to be setand the value of the object as values to set in the widget. * @param value OptionalOptional. If provided, attr() operates as a setter. If omitted,the current value of the named property is returned. */ - attr(name: String, value: Object): any; + attr(name: String, value?: Object): any; /** * This method is deprecated, use get() or set() directly. * * @param name The property to get or set. If an object is passed here and nota string, its keys are used as names of attributes to be setand the value of the object as values to set in the widget. * @param value OptionalOptional. If provided, attr() operates as a setter. If omitted,the current value of the named property is returned. */ - attr(name: Object, value: Object): any; + attr(name: Object, value?: Object): any; /** * */ @@ -25307,7 +25307,7 @@ declare module dijit { * @param fcn Function reference. * @param delay OptionalDelay, defaults to 0. */ - defer(fcn: Function, delay: number): Object; + defer(fcn: Function, delay?: number): Object; /** * Destroy this widget, but not its descendants. Descendants means widgets inside of * this.containerNode. Will also destroy any resources (including widgets) registered via this.own(). @@ -25363,7 +25363,7 @@ declare module dijit { * @param eventObj Optional * @param callbackArgs Optional */ - emit(type: String, eventObj: Object, callbackArgs: any[]): any; + emit(type: String, eventObj?: Object, callbackArgs?: any[]): any; /** * Focus on this MenuItem * @@ -25469,7 +25469,7 @@ declare module dijit { * @param reference Widget, DOMNode, or id of widget or DOMNode * @param position OptionalIf reference is a widget (or id of widget), and that widget has an ".addChild" method,it will be called passing this widget instance into that method, supplying the optionalposition index passed. In this case position (if specified) should be an integer.If reference is a DOMNode (or id matching a DOMNode but not a widget),the position argument can be a numeric index or a string"first", "last", "before", or "after", same as dojo/dom-construct::place(). */ - placeAt(reference: String, position: String): any; + placeAt(reference: String, position?: String): any; /** * Place this widget somewhere in the DOM based * on standard domConstruct.place() conventions. @@ -25480,7 +25480,7 @@ declare module dijit { * @param reference Widget, DOMNode, or id of widget or DOMNode * @param position OptionalIf reference is a widget (or id of widget), and that widget has an ".addChild" method,it will be called passing this widget instance into that method, supplying the optionalposition index passed. In this case position (if specified) should be an integer.If reference is a DOMNode (or id matching a DOMNode but not a widget),the position argument can be a numeric index or a string"first", "last", "before", or "after", same as dojo/dom-construct::place(). */ - placeAt(reference: HTMLElement, position: String): any; + placeAt(reference: HTMLElement, position?: String): any; /** * Place this widget somewhere in the DOM based * on standard domConstruct.place() conventions. @@ -25491,7 +25491,7 @@ declare module dijit { * @param reference Widget, DOMNode, or id of widget or DOMNode * @param position OptionalIf reference is a widget (or id of widget), and that widget has an ".addChild" method,it will be called passing this widget instance into that method, supplying the optionalposition index passed. In this case position (if specified) should be an integer.If reference is a DOMNode (or id matching a DOMNode but not a widget),the position argument can be a numeric index or a string"first", "last", "before", or "after", same as dojo/dom-construct::place(). */ - placeAt(reference: dijit._WidgetBase, position: String): any; + placeAt(reference: dijit._WidgetBase, position?: String): any; /** * Place this widget somewhere in the DOM based * on standard domConstruct.place() conventions. @@ -25502,7 +25502,7 @@ declare module dijit { * @param reference Widget, DOMNode, or id of widget or DOMNode * @param position OptionalIf reference is a widget (or id of widget), and that widget has an ".addChild" method,it will be called passing this widget instance into that method, supplying the optionalposition index passed. In this case position (if specified) should be an integer.If reference is a DOMNode (or id matching a DOMNode but not a widget),the position argument can be a numeric index or a string"first", "last", "before", or "after", same as dojo/dom-construct::place(). */ - placeAt(reference: String, position: number): any; + placeAt(reference: String, position?: number): any; /** * Place this widget somewhere in the DOM based * on standard domConstruct.place() conventions. @@ -25513,7 +25513,7 @@ declare module dijit { * @param reference Widget, DOMNode, or id of widget or DOMNode * @param position OptionalIf reference is a widget (or id of widget), and that widget has an ".addChild" method,it will be called passing this widget instance into that method, supplying the optionalposition index passed. In this case position (if specified) should be an integer.If reference is a DOMNode (or id matching a DOMNode but not a widget),the position argument can be a numeric index or a string"first", "last", "before", or "after", same as dojo/dom-construct::place(). */ - placeAt(reference: HTMLElement, position: number): any; + placeAt(reference: HTMLElement, position?: number): any; /** * Place this widget somewhere in the DOM based * on standard domConstruct.place() conventions. @@ -25524,7 +25524,7 @@ declare module dijit { * @param reference Widget, DOMNode, or id of widget or DOMNode * @param position OptionalIf reference is a widget (or id of widget), and that widget has an ".addChild" method,it will be called passing this widget instance into that method, supplying the optionalposition index passed. In this case position (if specified) should be an integer.If reference is a DOMNode (or id matching a DOMNode but not a widget),the position argument can be a numeric index or a string"first", "last", "before", or "after", same as dojo/dom-construct::place(). */ - placeAt(reference: dijit._WidgetBase, position: number): any; + placeAt(reference: dijit._WidgetBase, position?: number): any; /** * */ @@ -26066,14 +26066,14 @@ declare module dijit { * @param name The property to get or set. If an object is passed here and nota string, its keys are used as names of attributes to be setand the value of the object as values to set in the widget. * @param value OptionalOptional. If provided, attr() operates as a setter. If omitted,the current value of the named property is returned. */ - attr(name: String, value: Object): any; + attr(name: String, value?: Object): any; /** * This method is deprecated, use get() or set() directly. * * @param name The property to get or set. If an object is passed here and nota string, its keys are used as names of attributes to be setand the value of the object as values to set in the widget. * @param value OptionalOptional. If provided, attr() operates as a setter. If omitted,the current value of the named property is returned. */ - attr(name: Object, value: Object): any; + attr(name: Object, value?: Object): any; /** * */ @@ -26214,7 +26214,7 @@ declare module dijit { * @param fcn Function reference. * @param delay OptionalDelay, defaults to 0. */ - defer(fcn: Function, delay: number): Object; + defer(fcn: Function, delay?: number): Object; /** * Destroy this widget, but not its descendants. Descendants means widgets inside of * this.containerNode. Will also destroy any resources (including widgets) registered via this.own(). @@ -26270,7 +26270,7 @@ declare module dijit { * @param eventObj Optional * @param callbackArgs Optional */ - emit(type: String, eventObj: Object, callbackArgs: any[]): any; + emit(type: String, eventObj?: Object, callbackArgs?: any[]): any; /** * Focus on this MenuItem * @@ -26376,7 +26376,7 @@ declare module dijit { * @param reference Widget, DOMNode, or id of widget or DOMNode * @param position OptionalIf reference is a widget (or id of widget), and that widget has an ".addChild" method,it will be called passing this widget instance into that method, supplying the optionalposition index passed. In this case position (if specified) should be an integer.If reference is a DOMNode (or id matching a DOMNode but not a widget),the position argument can be a numeric index or a string"first", "last", "before", or "after", same as dojo/dom-construct::place(). */ - placeAt(reference: String, position: String): any; + placeAt(reference: String, position?: String): any; /** * Place this widget somewhere in the DOM based * on standard domConstruct.place() conventions. @@ -26387,7 +26387,7 @@ declare module dijit { * @param reference Widget, DOMNode, or id of widget or DOMNode * @param position OptionalIf reference is a widget (or id of widget), and that widget has an ".addChild" method,it will be called passing this widget instance into that method, supplying the optionalposition index passed. In this case position (if specified) should be an integer.If reference is a DOMNode (or id matching a DOMNode but not a widget),the position argument can be a numeric index or a string"first", "last", "before", or "after", same as dojo/dom-construct::place(). */ - placeAt(reference: HTMLElement, position: String): any; + placeAt(reference: HTMLElement, position?: String): any; /** * Place this widget somewhere in the DOM based * on standard domConstruct.place() conventions. @@ -26398,7 +26398,7 @@ declare module dijit { * @param reference Widget, DOMNode, or id of widget or DOMNode * @param position OptionalIf reference is a widget (or id of widget), and that widget has an ".addChild" method,it will be called passing this widget instance into that method, supplying the optionalposition index passed. In this case position (if specified) should be an integer.If reference is a DOMNode (or id matching a DOMNode but not a widget),the position argument can be a numeric index or a string"first", "last", "before", or "after", same as dojo/dom-construct::place(). */ - placeAt(reference: dijit._WidgetBase, position: String): any; + placeAt(reference: dijit._WidgetBase, position?: String): any; /** * Place this widget somewhere in the DOM based * on standard domConstruct.place() conventions. @@ -26409,7 +26409,7 @@ declare module dijit { * @param reference Widget, DOMNode, or id of widget or DOMNode * @param position OptionalIf reference is a widget (or id of widget), and that widget has an ".addChild" method,it will be called passing this widget instance into that method, supplying the optionalposition index passed. In this case position (if specified) should be an integer.If reference is a DOMNode (or id matching a DOMNode but not a widget),the position argument can be a numeric index or a string"first", "last", "before", or "after", same as dojo/dom-construct::place(). */ - placeAt(reference: String, position: number): any; + placeAt(reference: String, position?: number): any; /** * Place this widget somewhere in the DOM based * on standard domConstruct.place() conventions. @@ -26420,7 +26420,7 @@ declare module dijit { * @param reference Widget, DOMNode, or id of widget or DOMNode * @param position OptionalIf reference is a widget (or id of widget), and that widget has an ".addChild" method,it will be called passing this widget instance into that method, supplying the optionalposition index passed. In this case position (if specified) should be an integer.If reference is a DOMNode (or id matching a DOMNode but not a widget),the position argument can be a numeric index or a string"first", "last", "before", or "after", same as dojo/dom-construct::place(). */ - placeAt(reference: HTMLElement, position: number): any; + placeAt(reference: HTMLElement, position?: number): any; /** * Place this widget somewhere in the DOM based * on standard domConstruct.place() conventions. @@ -26431,7 +26431,7 @@ declare module dijit { * @param reference Widget, DOMNode, or id of widget or DOMNode * @param position OptionalIf reference is a widget (or id of widget), and that widget has an ".addChild" method,it will be called passing this widget instance into that method, supplying the optionalposition index passed. In this case position (if specified) should be an integer.If reference is a DOMNode (or id matching a DOMNode but not a widget),the position argument can be a numeric index or a string"first", "last", "before", or "after", same as dojo/dom-construct::place(). */ - placeAt(reference: dijit._WidgetBase, position: number): any; + placeAt(reference: dijit._WidgetBase, position?: number): any; /** * */ @@ -26956,14 +26956,14 @@ declare module dijit { * @param name The property to get or set. If an object is passed here and nota string, its keys are used as names of attributes to be setand the value of the object as values to set in the widget. * @param value OptionalOptional. If provided, attr() operates as a setter. If omitted,the current value of the named property is returned. */ - attr(name: String, value: Object): any; + attr(name: String, value?: Object): any; /** * This method is deprecated, use get() or set() directly. * * @param name The property to get or set. If an object is passed here and nota string, its keys are used as names of attributes to be setand the value of the object as values to set in the widget. * @param value OptionalOptional. If provided, attr() operates as a setter. If omitted,the current value of the named property is returned. */ - attr(name: Object, value: Object): any; + attr(name: Object, value?: Object): any; /** * */ @@ -27104,7 +27104,7 @@ declare module dijit { * @param fcn Function reference. * @param delay OptionalDelay, defaults to 0. */ - defer(fcn: Function, delay: number): Object; + defer(fcn: Function, delay?: number): Object; /** * Destroy this widget, but not its descendants. Descendants means widgets inside of * this.containerNode. Will also destroy any resources (including widgets) registered via this.own(). @@ -27162,7 +27162,7 @@ declare module dijit { * @param eventObj Optional * @param callbackArgs Optional */ - emit(type: String, eventObj: Object, callbackArgs: any[]): any; + emit(type: String, eventObj?: Object, callbackArgs?: any[]): any; /** * Get a property from a widget. * Get a named property from a widget. The property may @@ -27244,7 +27244,7 @@ declare module dijit { * @param reference Widget, DOMNode, or id of widget or DOMNode * @param position OptionalIf reference is a widget (or id of widget), and that widget has an ".addChild" method,it will be called passing this widget instance into that method, supplying the optionalposition index passed. In this case position (if specified) should be an integer.If reference is a DOMNode (or id matching a DOMNode but not a widget),the position argument can be a numeric index or a string"first", "last", "before", or "after", same as dojo/dom-construct::place(). */ - placeAt(reference: String, position: String): any; + placeAt(reference: String, position?: String): any; /** * Place this widget somewhere in the DOM based * on standard domConstruct.place() conventions. @@ -27255,7 +27255,7 @@ declare module dijit { * @param reference Widget, DOMNode, or id of widget or DOMNode * @param position OptionalIf reference is a widget (or id of widget), and that widget has an ".addChild" method,it will be called passing this widget instance into that method, supplying the optionalposition index passed. In this case position (if specified) should be an integer.If reference is a DOMNode (or id matching a DOMNode but not a widget),the position argument can be a numeric index or a string"first", "last", "before", or "after", same as dojo/dom-construct::place(). */ - placeAt(reference: HTMLElement, position: String): any; + placeAt(reference: HTMLElement, position?: String): any; /** * Place this widget somewhere in the DOM based * on standard domConstruct.place() conventions. @@ -27266,7 +27266,7 @@ declare module dijit { * @param reference Widget, DOMNode, or id of widget or DOMNode * @param position OptionalIf reference is a widget (or id of widget), and that widget has an ".addChild" method,it will be called passing this widget instance into that method, supplying the optionalposition index passed. In this case position (if specified) should be an integer.If reference is a DOMNode (or id matching a DOMNode but not a widget),the position argument can be a numeric index or a string"first", "last", "before", or "after", same as dojo/dom-construct::place(). */ - placeAt(reference: dijit._WidgetBase, position: String): any; + placeAt(reference: dijit._WidgetBase, position?: String): any; /** * Place this widget somewhere in the DOM based * on standard domConstruct.place() conventions. @@ -27277,7 +27277,7 @@ declare module dijit { * @param reference Widget, DOMNode, or id of widget or DOMNode * @param position OptionalIf reference is a widget (or id of widget), and that widget has an ".addChild" method,it will be called passing this widget instance into that method, supplying the optionalposition index passed. In this case position (if specified) should be an integer.If reference is a DOMNode (or id matching a DOMNode but not a widget),the position argument can be a numeric index or a string"first", "last", "before", or "after", same as dojo/dom-construct::place(). */ - placeAt(reference: String, position: number): any; + placeAt(reference: String, position?: number): any; /** * Place this widget somewhere in the DOM based * on standard domConstruct.place() conventions. @@ -27288,7 +27288,7 @@ declare module dijit { * @param reference Widget, DOMNode, or id of widget or DOMNode * @param position OptionalIf reference is a widget (or id of widget), and that widget has an ".addChild" method,it will be called passing this widget instance into that method, supplying the optionalposition index passed. In this case position (if specified) should be an integer.If reference is a DOMNode (or id matching a DOMNode but not a widget),the position argument can be a numeric index or a string"first", "last", "before", or "after", same as dojo/dom-construct::place(). */ - placeAt(reference: HTMLElement, position: number): any; + placeAt(reference: HTMLElement, position?: number): any; /** * Place this widget somewhere in the DOM based * on standard domConstruct.place() conventions. @@ -27299,7 +27299,7 @@ declare module dijit { * @param reference Widget, DOMNode, or id of widget or DOMNode * @param position OptionalIf reference is a widget (or id of widget), and that widget has an ".addChild" method,it will be called passing this widget instance into that method, supplying the optionalposition index passed. In this case position (if specified) should be an integer.If reference is a DOMNode (or id matching a DOMNode but not a widget),the position argument can be a numeric index or a string"first", "last", "before", or "after", same as dojo/dom-construct::place(). */ - placeAt(reference: dijit._WidgetBase, position: number): any; + placeAt(reference: dijit._WidgetBase, position?: number): any; /** * */ @@ -27876,14 +27876,14 @@ declare module dijit { * @param name The property to get or set. If an object is passed here and nota string, its keys are used as names of attributes to be setand the value of the object as values to set in the widget. * @param value OptionalOptional. If provided, attr() operates as a setter. If omitted,the current value of the named property is returned. */ - attr(name: String, value: Object): any; + attr(name: String, value?: Object): any; /** * This method is deprecated, use get() or set() directly. * * @param name The property to get or set. If an object is passed here and nota string, its keys are used as names of attributes to be setand the value of the object as values to set in the widget. * @param value OptionalOptional. If provided, attr() operates as a setter. If omitted,the current value of the named property is returned. */ - attr(name: Object, value: Object): any; + attr(name: Object, value?: Object): any; /** * */ @@ -28024,7 +28024,7 @@ declare module dijit { * @param fcn Function reference. * @param delay OptionalDelay, defaults to 0. */ - defer(fcn: Function, delay: number): Object; + defer(fcn: Function, delay?: number): Object; /** * Destroy this widget, but not its descendants. Descendants means widgets inside of * this.containerNode. Will also destroy any resources (including widgets) registered via this.own(). @@ -28082,7 +28082,7 @@ declare module dijit { * @param eventObj Optional * @param callbackArgs Optional */ - emit(type: String, eventObj: Object, callbackArgs: any[]): any; + emit(type: String, eventObj?: Object, callbackArgs?: any[]): any; /** * Focus on this MenuItem * @@ -28188,7 +28188,7 @@ declare module dijit { * @param reference Widget, DOMNode, or id of widget or DOMNode * @param position OptionalIf reference is a widget (or id of widget), and that widget has an ".addChild" method,it will be called passing this widget instance into that method, supplying the optionalposition index passed. In this case position (if specified) should be an integer.If reference is a DOMNode (or id matching a DOMNode but not a widget),the position argument can be a numeric index or a string"first", "last", "before", or "after", same as dojo/dom-construct::place(). */ - placeAt(reference: String, position: String): any; + placeAt(reference: String, position?: String): any; /** * Place this widget somewhere in the DOM based * on standard domConstruct.place() conventions. @@ -28199,7 +28199,7 @@ declare module dijit { * @param reference Widget, DOMNode, or id of widget or DOMNode * @param position OptionalIf reference is a widget (or id of widget), and that widget has an ".addChild" method,it will be called passing this widget instance into that method, supplying the optionalposition index passed. In this case position (if specified) should be an integer.If reference is a DOMNode (or id matching a DOMNode but not a widget),the position argument can be a numeric index or a string"first", "last", "before", or "after", same as dojo/dom-construct::place(). */ - placeAt(reference: HTMLElement, position: String): any; + placeAt(reference: HTMLElement, position?: String): any; /** * Place this widget somewhere in the DOM based * on standard domConstruct.place() conventions. @@ -28210,7 +28210,7 @@ declare module dijit { * @param reference Widget, DOMNode, or id of widget or DOMNode * @param position OptionalIf reference is a widget (or id of widget), and that widget has an ".addChild" method,it will be called passing this widget instance into that method, supplying the optionalposition index passed. In this case position (if specified) should be an integer.If reference is a DOMNode (or id matching a DOMNode but not a widget),the position argument can be a numeric index or a string"first", "last", "before", or "after", same as dojo/dom-construct::place(). */ - placeAt(reference: dijit._WidgetBase, position: String): any; + placeAt(reference: dijit._WidgetBase, position?: String): any; /** * Place this widget somewhere in the DOM based * on standard domConstruct.place() conventions. @@ -28221,7 +28221,7 @@ declare module dijit { * @param reference Widget, DOMNode, or id of widget or DOMNode * @param position OptionalIf reference is a widget (or id of widget), and that widget has an ".addChild" method,it will be called passing this widget instance into that method, supplying the optionalposition index passed. In this case position (if specified) should be an integer.If reference is a DOMNode (or id matching a DOMNode but not a widget),the position argument can be a numeric index or a string"first", "last", "before", or "after", same as dojo/dom-construct::place(). */ - placeAt(reference: String, position: number): any; + placeAt(reference: String, position?: number): any; /** * Place this widget somewhere in the DOM based * on standard domConstruct.place() conventions. @@ -28232,7 +28232,7 @@ declare module dijit { * @param reference Widget, DOMNode, or id of widget or DOMNode * @param position OptionalIf reference is a widget (or id of widget), and that widget has an ".addChild" method,it will be called passing this widget instance into that method, supplying the optionalposition index passed. In this case position (if specified) should be an integer.If reference is a DOMNode (or id matching a DOMNode but not a widget),the position argument can be a numeric index or a string"first", "last", "before", or "after", same as dojo/dom-construct::place(). */ - placeAt(reference: HTMLElement, position: number): any; + placeAt(reference: HTMLElement, position?: number): any; /** * Place this widget somewhere in the DOM based * on standard domConstruct.place() conventions. @@ -28243,7 +28243,7 @@ declare module dijit { * @param reference Widget, DOMNode, or id of widget or DOMNode * @param position OptionalIf reference is a widget (or id of widget), and that widget has an ".addChild" method,it will be called passing this widget instance into that method, supplying the optionalposition index passed. In this case position (if specified) should be an integer.If reference is a DOMNode (or id matching a DOMNode but not a widget),the position argument can be a numeric index or a string"first", "last", "before", or "after", same as dojo/dom-construct::place(). */ - placeAt(reference: dijit._WidgetBase, position: number): any; + placeAt(reference: dijit._WidgetBase, position?: number): any; /** * */ @@ -28745,21 +28745,21 @@ declare module dijit { * @param widget * @param insertIndex Optional */ - addChild(widget: dijit._WidgetBase, insertIndex: number): void; + addChild(widget: dijit._WidgetBase, insertIndex?: number): void; /** * This method is deprecated, use get() or set() directly. * * @param name The property to get or set. If an object is passed here and nota string, its keys are used as names of attributes to be setand the value of the object as values to set in the widget. * @param value OptionalOptional. If provided, attr() operates as a setter. If omitted,the current value of the named property is returned. */ - attr(name: String, value: Object): any; + attr(name: String, value?: Object): any; /** * This method is deprecated, use get() or set() directly. * * @param name The property to get or set. If an object is passed here and nota string, its keys are used as names of attributes to be setand the value of the object as values to set in the widget. * @param value OptionalOptional. If provided, attr() operates as a setter. If omitted,the current value of the named property is returned. */ - attr(name: Object, value: Object): any; + attr(name: Object, value?: Object): any; /** * Construct the UI for this widget, setting this.domNode. * Most widgets will mixin dijit._TemplatedMixin, which implements this method. @@ -28916,7 +28916,7 @@ declare module dijit { * @param fcn Function reference. * @param delay OptionalDelay, defaults to 0. */ - defer(fcn: Function, delay: number): Object; + defer(fcn: Function, delay?: number): Object; /** * Destroy this widget, but not its descendants. Descendants means widgets inside of * this.containerNode. Will also destroy any resources (including widgets) registered via this.own(). @@ -28974,7 +28974,7 @@ declare module dijit { * @param eventObj Optional * @param callbackArgs Optional */ - emit(type: String, eventObj: Object, callbackArgs: any[]): any; + emit(type: String, eventObj?: Object, callbackArgs?: any[]): any; /** * Default focus() implementation: focus the first child. * @@ -29100,7 +29100,7 @@ declare module dijit { * @param reference Widget, DOMNode, or id of widget or DOMNode * @param position OptionalIf reference is a widget (or id of widget), and that widget has an ".addChild" method,it will be called passing this widget instance into that method, supplying the optionalposition index passed. In this case position (if specified) should be an integer.If reference is a DOMNode (or id matching a DOMNode but not a widget),the position argument can be a numeric index or a string"first", "last", "before", or "after", same as dojo/dom-construct::place(). */ - placeAt(reference: String, position: String): any; + placeAt(reference: String, position?: String): any; /** * Place this widget somewhere in the DOM based * on standard domConstruct.place() conventions. @@ -29111,7 +29111,7 @@ declare module dijit { * @param reference Widget, DOMNode, or id of widget or DOMNode * @param position OptionalIf reference is a widget (or id of widget), and that widget has an ".addChild" method,it will be called passing this widget instance into that method, supplying the optionalposition index passed. In this case position (if specified) should be an integer.If reference is a DOMNode (or id matching a DOMNode but not a widget),the position argument can be a numeric index or a string"first", "last", "before", or "after", same as dojo/dom-construct::place(). */ - placeAt(reference: HTMLElement, position: String): any; + placeAt(reference: HTMLElement, position?: String): any; /** * Place this widget somewhere in the DOM based * on standard domConstruct.place() conventions. @@ -29122,7 +29122,7 @@ declare module dijit { * @param reference Widget, DOMNode, or id of widget or DOMNode * @param position OptionalIf reference is a widget (or id of widget), and that widget has an ".addChild" method,it will be called passing this widget instance into that method, supplying the optionalposition index passed. In this case position (if specified) should be an integer.If reference is a DOMNode (or id matching a DOMNode but not a widget),the position argument can be a numeric index or a string"first", "last", "before", or "after", same as dojo/dom-construct::place(). */ - placeAt(reference: dijit._WidgetBase, position: String): any; + placeAt(reference: dijit._WidgetBase, position?: String): any; /** * Place this widget somewhere in the DOM based * on standard domConstruct.place() conventions. @@ -29133,7 +29133,7 @@ declare module dijit { * @param reference Widget, DOMNode, or id of widget or DOMNode * @param position OptionalIf reference is a widget (or id of widget), and that widget has an ".addChild" method,it will be called passing this widget instance into that method, supplying the optionalposition index passed. In this case position (if specified) should be an integer.If reference is a DOMNode (or id matching a DOMNode but not a widget),the position argument can be a numeric index or a string"first", "last", "before", or "after", same as dojo/dom-construct::place(). */ - placeAt(reference: String, position: number): any; + placeAt(reference: String, position?: number): any; /** * Place this widget somewhere in the DOM based * on standard domConstruct.place() conventions. @@ -29144,7 +29144,7 @@ declare module dijit { * @param reference Widget, DOMNode, or id of widget or DOMNode * @param position OptionalIf reference is a widget (or id of widget), and that widget has an ".addChild" method,it will be called passing this widget instance into that method, supplying the optionalposition index passed. In this case position (if specified) should be an integer.If reference is a DOMNode (or id matching a DOMNode but not a widget),the position argument can be a numeric index or a string"first", "last", "before", or "after", same as dojo/dom-construct::place(). */ - placeAt(reference: HTMLElement, position: number): any; + placeAt(reference: HTMLElement, position?: number): any; /** * Place this widget somewhere in the DOM based * on standard domConstruct.place() conventions. @@ -29155,7 +29155,7 @@ declare module dijit { * @param reference Widget, DOMNode, or id of widget or DOMNode * @param position OptionalIf reference is a widget (or id of widget), and that widget has an ".addChild" method,it will be called passing this widget instance into that method, supplying the optionalposition index passed. In this case position (if specified) should be an integer.If reference is a DOMNode (or id matching a DOMNode but not a widget),the position argument can be a numeric index or a string"first", "last", "before", or "after", same as dojo/dom-construct::place(). */ - placeAt(reference: dijit._WidgetBase, position: number): any; + placeAt(reference: dijit._WidgetBase, position?: number): any; /** * */ @@ -29696,14 +29696,14 @@ declare module dijit { * @param name The property to get or set. If an object is passed here and nota string, its keys are used as names of attributes to be setand the value of the object as values to set in the widget. * @param value OptionalOptional. If provided, attr() operates as a setter. If omitted,the current value of the named property is returned. */ - attr(name: String, value: Object): any; + attr(name: String, value?: Object): any; /** * This method is deprecated, use get() or set() directly. * * @param name The property to get or set. If an object is passed here and nota string, its keys are used as names of attributes to be setand the value of the object as values to set in the widget. * @param value OptionalOptional. If provided, attr() operates as a setter. If omitted,the current value of the named property is returned. */ - attr(name: Object, value: Object): any; + attr(name: Object, value?: Object): any; /** * */ @@ -29844,7 +29844,7 @@ declare module dijit { * @param fcn Function reference. * @param delay OptionalDelay, defaults to 0. */ - defer(fcn: Function, delay: number): Object; + defer(fcn: Function, delay?: number): Object; /** * */ @@ -29892,7 +29892,7 @@ declare module dijit { * @param eventObj Optional * @param callbackArgs Optional */ - emit(type: String, eventObj: Object, callbackArgs: any[]): any; + emit(type: String, eventObj?: Object, callbackArgs?: any[]): any; /** * Get a property from a widget. * Get a named property from a widget. The property may @@ -29986,7 +29986,7 @@ declare module dijit { * @param reference Widget, DOMNode, or id of widget or DOMNode * @param position OptionalIf reference is a widget (or id of widget), and that widget has an ".addChild" method,it will be called passing this widget instance into that method, supplying the optionalposition index passed. In this case position (if specified) should be an integer.If reference is a DOMNode (or id matching a DOMNode but not a widget),the position argument can be a numeric index or a string"first", "last", "before", or "after", same as dojo/dom-construct::place(). */ - placeAt(reference: String, position: String): any; + placeAt(reference: String, position?: String): any; /** * Place this widget somewhere in the DOM based * on standard domConstruct.place() conventions. @@ -29997,7 +29997,7 @@ declare module dijit { * @param reference Widget, DOMNode, or id of widget or DOMNode * @param position OptionalIf reference is a widget (or id of widget), and that widget has an ".addChild" method,it will be called passing this widget instance into that method, supplying the optionalposition index passed. In this case position (if specified) should be an integer.If reference is a DOMNode (or id matching a DOMNode but not a widget),the position argument can be a numeric index or a string"first", "last", "before", or "after", same as dojo/dom-construct::place(). */ - placeAt(reference: HTMLElement, position: String): any; + placeAt(reference: HTMLElement, position?: String): any; /** * Place this widget somewhere in the DOM based * on standard domConstruct.place() conventions. @@ -30008,7 +30008,7 @@ declare module dijit { * @param reference Widget, DOMNode, or id of widget or DOMNode * @param position OptionalIf reference is a widget (or id of widget), and that widget has an ".addChild" method,it will be called passing this widget instance into that method, supplying the optionalposition index passed. In this case position (if specified) should be an integer.If reference is a DOMNode (or id matching a DOMNode but not a widget),the position argument can be a numeric index or a string"first", "last", "before", or "after", same as dojo/dom-construct::place(). */ - placeAt(reference: dijit._WidgetBase, position: String): any; + placeAt(reference: dijit._WidgetBase, position?: String): any; /** * Place this widget somewhere in the DOM based * on standard domConstruct.place() conventions. @@ -30019,7 +30019,7 @@ declare module dijit { * @param reference Widget, DOMNode, or id of widget or DOMNode * @param position OptionalIf reference is a widget (or id of widget), and that widget has an ".addChild" method,it will be called passing this widget instance into that method, supplying the optionalposition index passed. In this case position (if specified) should be an integer.If reference is a DOMNode (or id matching a DOMNode but not a widget),the position argument can be a numeric index or a string"first", "last", "before", or "after", same as dojo/dom-construct::place(). */ - placeAt(reference: String, position: number): any; + placeAt(reference: String, position?: number): any; /** * Place this widget somewhere in the DOM based * on standard domConstruct.place() conventions. @@ -30030,7 +30030,7 @@ declare module dijit { * @param reference Widget, DOMNode, or id of widget or DOMNode * @param position OptionalIf reference is a widget (or id of widget), and that widget has an ".addChild" method,it will be called passing this widget instance into that method, supplying the optionalposition index passed. In this case position (if specified) should be an integer.If reference is a DOMNode (or id matching a DOMNode but not a widget),the position argument can be a numeric index or a string"first", "last", "before", or "after", same as dojo/dom-construct::place(). */ - placeAt(reference: HTMLElement, position: number): any; + placeAt(reference: HTMLElement, position?: number): any; /** * Place this widget somewhere in the DOM based * on standard domConstruct.place() conventions. @@ -30041,7 +30041,7 @@ declare module dijit { * @param reference Widget, DOMNode, or id of widget or DOMNode * @param position OptionalIf reference is a widget (or id of widget), and that widget has an ".addChild" method,it will be called passing this widget instance into that method, supplying the optionalposition index passed. In this case position (if specified) should be an integer.If reference is a DOMNode (or id matching a DOMNode but not a widget),the position argument can be a numeric index or a string"first", "last", "before", or "after", same as dojo/dom-construct::place(). */ - placeAt(reference: dijit._WidgetBase, position: number): any; + placeAt(reference: dijit._WidgetBase, position?: number): any; /** * */ @@ -30515,14 +30515,14 @@ declare module dijit { * @param name The property to get or set. If an object is passed here and nota string, its keys are used as names of attributes to be setand the value of the object as values to set in the widget. * @param value OptionalOptional. If provided, attr() operates as a setter. If omitted,the current value of the named property is returned. */ - attr(name: String, value: Object): any; + attr(name: String, value?: Object): any; /** * This method is deprecated, use get() or set() directly. * * @param name The property to get or set. If an object is passed here and nota string, its keys are used as names of attributes to be setand the value of the object as values to set in the widget. * @param value OptionalOptional. If provided, attr() operates as a setter. If omitted,the current value of the named property is returned. */ - attr(name: Object, value: Object): any; + attr(name: Object, value?: Object): any; /** * Construct the UI for this widget, setting this.domNode. * Most widgets will mixin dijit._TemplatedMixin, which implements this method. @@ -30665,7 +30665,7 @@ declare module dijit { * @param fcn Function reference. * @param delay OptionalDelay, defaults to 0. */ - defer(fcn: Function, delay: number): Object; + defer(fcn: Function, delay?: number): Object; /** * Destroy this widget, but not its descendants. Descendants means widgets inside of * this.containerNode. Will also destroy any resources (including widgets) registered via this.own(). @@ -30723,7 +30723,7 @@ declare module dijit { * @param eventObj Optional * @param callbackArgs Optional */ - emit(type: String, eventObj: Object, callbackArgs: any[]): any; + emit(type: String, eventObj?: Object, callbackArgs?: any[]): any; /** * Get a property from a widget. * Get a named property from a widget. The property may @@ -30823,7 +30823,7 @@ declare module dijit { * @param reference Widget, DOMNode, or id of widget or DOMNode * @param position OptionalIf reference is a widget (or id of widget), and that widget has an ".addChild" method,it will be called passing this widget instance into that method, supplying the optionalposition index passed. In this case position (if specified) should be an integer.If reference is a DOMNode (or id matching a DOMNode but not a widget),the position argument can be a numeric index or a string"first", "last", "before", or "after", same as dojo/dom-construct::place(). */ - placeAt(reference: String, position: String): any; + placeAt(reference: String, position?: String): any; /** * Place this widget somewhere in the DOM based * on standard domConstruct.place() conventions. @@ -30834,7 +30834,7 @@ declare module dijit { * @param reference Widget, DOMNode, or id of widget or DOMNode * @param position OptionalIf reference is a widget (or id of widget), and that widget has an ".addChild" method,it will be called passing this widget instance into that method, supplying the optionalposition index passed. In this case position (if specified) should be an integer.If reference is a DOMNode (or id matching a DOMNode but not a widget),the position argument can be a numeric index or a string"first", "last", "before", or "after", same as dojo/dom-construct::place(). */ - placeAt(reference: HTMLElement, position: String): any; + placeAt(reference: HTMLElement, position?: String): any; /** * Place this widget somewhere in the DOM based * on standard domConstruct.place() conventions. @@ -30845,7 +30845,7 @@ declare module dijit { * @param reference Widget, DOMNode, or id of widget or DOMNode * @param position OptionalIf reference is a widget (or id of widget), and that widget has an ".addChild" method,it will be called passing this widget instance into that method, supplying the optionalposition index passed. In this case position (if specified) should be an integer.If reference is a DOMNode (or id matching a DOMNode but not a widget),the position argument can be a numeric index or a string"first", "last", "before", or "after", same as dojo/dom-construct::place(). */ - placeAt(reference: dijit._WidgetBase, position: String): any; + placeAt(reference: dijit._WidgetBase, position?: String): any; /** * Place this widget somewhere in the DOM based * on standard domConstruct.place() conventions. @@ -30856,7 +30856,7 @@ declare module dijit { * @param reference Widget, DOMNode, or id of widget or DOMNode * @param position OptionalIf reference is a widget (or id of widget), and that widget has an ".addChild" method,it will be called passing this widget instance into that method, supplying the optionalposition index passed. In this case position (if specified) should be an integer.If reference is a DOMNode (or id matching a DOMNode but not a widget),the position argument can be a numeric index or a string"first", "last", "before", or "after", same as dojo/dom-construct::place(). */ - placeAt(reference: String, position: number): any; + placeAt(reference: String, position?: number): any; /** * Place this widget somewhere in the DOM based * on standard domConstruct.place() conventions. @@ -30867,7 +30867,7 @@ declare module dijit { * @param reference Widget, DOMNode, or id of widget or DOMNode * @param position OptionalIf reference is a widget (or id of widget), and that widget has an ".addChild" method,it will be called passing this widget instance into that method, supplying the optionalposition index passed. In this case position (if specified) should be an integer.If reference is a DOMNode (or id matching a DOMNode but not a widget),the position argument can be a numeric index or a string"first", "last", "before", or "after", same as dojo/dom-construct::place(). */ - placeAt(reference: HTMLElement, position: number): any; + placeAt(reference: HTMLElement, position?: number): any; /** * Place this widget somewhere in the DOM based * on standard domConstruct.place() conventions. @@ -30878,7 +30878,7 @@ declare module dijit { * @param reference Widget, DOMNode, or id of widget or DOMNode * @param position OptionalIf reference is a widget (or id of widget), and that widget has an ".addChild" method,it will be called passing this widget instance into that method, supplying the optionalposition index passed. In this case position (if specified) should be an integer.If reference is a DOMNode (or id matching a DOMNode but not a widget),the position argument can be a numeric index or a string"first", "last", "before", or "after", same as dojo/dom-construct::place(). */ - placeAt(reference: dijit._WidgetBase, position: number): any; + placeAt(reference: dijit._WidgetBase, position?: number): any; /** * */ @@ -31359,14 +31359,14 @@ declare module dijit { * @param name The property to get or set. If an object is passed here and nota string, its keys are used as names of attributes to be setand the value of the object as values to set in the widget. * @param value OptionalOptional. If provided, attr() operates as a setter. If omitted,the current value of the named property is returned. */ - attr(name: String, value: Object): any; + attr(name: String, value?: Object): any; /** * This method is deprecated, use get() or set() directly. * * @param name The property to get or set. If an object is passed here and nota string, its keys are used as names of attributes to be setand the value of the object as values to set in the widget. * @param value OptionalOptional. If provided, attr() operates as a setter. If omitted,the current value of the named property is returned. */ - attr(name: Object, value: Object): any; + attr(name: Object, value?: Object): any; /** * */ @@ -31507,7 +31507,7 @@ declare module dijit { * @param fcn Function reference. * @param delay OptionalDelay, defaults to 0. */ - defer(fcn: Function, delay: number): Object; + defer(fcn: Function, delay?: number): Object; /** * Destroy this widget, but not its descendants. Descendants means widgets inside of * this.containerNode. Will also destroy any resources (including widgets) registered via this.own(). @@ -31565,7 +31565,7 @@ declare module dijit { * @param eventObj Optional * @param callbackArgs Optional */ - emit(type: String, eventObj: Object, callbackArgs: any[]): any; + emit(type: String, eventObj?: Object, callbackArgs?: any[]): any; /** * Get a property from a widget. * Get a named property from a widget. The property may @@ -31646,7 +31646,7 @@ declare module dijit { * @param reference Widget, DOMNode, or id of widget or DOMNode * @param position OptionalIf reference is a widget (or id of widget), and that widget has an ".addChild" method,it will be called passing this widget instance into that method, supplying the optionalposition index passed. In this case position (if specified) should be an integer.If reference is a DOMNode (or id matching a DOMNode but not a widget),the position argument can be a numeric index or a string"first", "last", "before", or "after", same as dojo/dom-construct::place(). */ - placeAt(reference: String, position: String): any; + placeAt(reference: String, position?: String): any; /** * Place this widget somewhere in the DOM based * on standard domConstruct.place() conventions. @@ -31657,7 +31657,7 @@ declare module dijit { * @param reference Widget, DOMNode, or id of widget or DOMNode * @param position OptionalIf reference is a widget (or id of widget), and that widget has an ".addChild" method,it will be called passing this widget instance into that method, supplying the optionalposition index passed. In this case position (if specified) should be an integer.If reference is a DOMNode (or id matching a DOMNode but not a widget),the position argument can be a numeric index or a string"first", "last", "before", or "after", same as dojo/dom-construct::place(). */ - placeAt(reference: HTMLElement, position: String): any; + placeAt(reference: HTMLElement, position?: String): any; /** * Place this widget somewhere in the DOM based * on standard domConstruct.place() conventions. @@ -31668,7 +31668,7 @@ declare module dijit { * @param reference Widget, DOMNode, or id of widget or DOMNode * @param position OptionalIf reference is a widget (or id of widget), and that widget has an ".addChild" method,it will be called passing this widget instance into that method, supplying the optionalposition index passed. In this case position (if specified) should be an integer.If reference is a DOMNode (or id matching a DOMNode but not a widget),the position argument can be a numeric index or a string"first", "last", "before", or "after", same as dojo/dom-construct::place(). */ - placeAt(reference: dijit._WidgetBase, position: String): any; + placeAt(reference: dijit._WidgetBase, position?: String): any; /** * Place this widget somewhere in the DOM based * on standard domConstruct.place() conventions. @@ -31679,7 +31679,7 @@ declare module dijit { * @param reference Widget, DOMNode, or id of widget or DOMNode * @param position OptionalIf reference is a widget (or id of widget), and that widget has an ".addChild" method,it will be called passing this widget instance into that method, supplying the optionalposition index passed. In this case position (if specified) should be an integer.If reference is a DOMNode (or id matching a DOMNode but not a widget),the position argument can be a numeric index or a string"first", "last", "before", or "after", same as dojo/dom-construct::place(). */ - placeAt(reference: String, position: number): any; + placeAt(reference: String, position?: number): any; /** * Place this widget somewhere in the DOM based * on standard domConstruct.place() conventions. @@ -31690,7 +31690,7 @@ declare module dijit { * @param reference Widget, DOMNode, or id of widget or DOMNode * @param position OptionalIf reference is a widget (or id of widget), and that widget has an ".addChild" method,it will be called passing this widget instance into that method, supplying the optionalposition index passed. In this case position (if specified) should be an integer.If reference is a DOMNode (or id matching a DOMNode but not a widget),the position argument can be a numeric index or a string"first", "last", "before", or "after", same as dojo/dom-construct::place(). */ - placeAt(reference: HTMLElement, position: number): any; + placeAt(reference: HTMLElement, position?: number): any; /** * Place this widget somewhere in the DOM based * on standard domConstruct.place() conventions. @@ -31701,7 +31701,7 @@ declare module dijit { * @param reference Widget, DOMNode, or id of widget or DOMNode * @param position OptionalIf reference is a widget (or id of widget), and that widget has an ".addChild" method,it will be called passing this widget instance into that method, supplying the optionalposition index passed. In this case position (if specified) should be an integer.If reference is a DOMNode (or id matching a DOMNode but not a widget),the position argument can be a numeric index or a string"first", "last", "before", or "after", same as dojo/dom-construct::place(). */ - placeAt(reference: dijit._WidgetBase, position: number): any; + placeAt(reference: dijit._WidgetBase, position?: number): any; /** * */ @@ -32377,21 +32377,21 @@ declare module dijit { * @param widget * @param insertIndex Optional */ - addChild(widget: dijit._WidgetBase, insertIndex: number): void; + addChild(widget: dijit._WidgetBase, insertIndex?: number): void; /** * This method is deprecated, use get() or set() directly. * * @param name The property to get or set. If an object is passed here and nota string, its keys are used as names of attributes to be setand the value of the object as values to set in the widget. * @param value OptionalOptional. If provided, attr() operates as a setter. If omitted,the current value of the named property is returned. */ - attr(name: String, value: Object): any; + attr(name: String, value?: Object): any; /** * This method is deprecated, use get() or set() directly. * * @param name The property to get or set. If an object is passed here and nota string, its keys are used as names of attributes to be setand the value of the object as values to set in the widget. * @param value OptionalOptional. If provided, attr() operates as a setter. If omitted,the current value of the named property is returned. */ - attr(name: Object, value: Object): any; + attr(name: Object, value?: Object): any; /** * */ @@ -32543,7 +32543,7 @@ declare module dijit { * @param fcn Function reference. * @param delay OptionalDelay, defaults to 0. */ - defer(fcn: Function, delay: number): Object; + defer(fcn: Function, delay?: number): Object; /** * */ @@ -32587,7 +32587,7 @@ declare module dijit { * @param eventObj Optional * @param callbackArgs Optional */ - emit(type: String, eventObj: Object, callbackArgs: any[]): any; + emit(type: String, eventObj?: Object, callbackArgs?: any[]): any; /** * Get a property from a widget. * Get a named property from a widget. The property may @@ -32693,7 +32693,7 @@ declare module dijit { * @param reference Widget, DOMNode, or id of widget or DOMNode * @param position OptionalIf reference is a widget (or id of widget), and that widget has an ".addChild" method,it will be called passing this widget instance into that method, supplying the optionalposition index passed. In this case position (if specified) should be an integer.If reference is a DOMNode (or id matching a DOMNode but not a widget),the position argument can be a numeric index or a string"first", "last", "before", or "after", same as dojo/dom-construct::place(). */ - placeAt(reference: String, position: String): any; + placeAt(reference: String, position?: String): any; /** * Place this widget somewhere in the DOM based * on standard domConstruct.place() conventions. @@ -32704,7 +32704,7 @@ declare module dijit { * @param reference Widget, DOMNode, or id of widget or DOMNode * @param position OptionalIf reference is a widget (or id of widget), and that widget has an ".addChild" method,it will be called passing this widget instance into that method, supplying the optionalposition index passed. In this case position (if specified) should be an integer.If reference is a DOMNode (or id matching a DOMNode but not a widget),the position argument can be a numeric index or a string"first", "last", "before", or "after", same as dojo/dom-construct::place(). */ - placeAt(reference: HTMLElement, position: String): any; + placeAt(reference: HTMLElement, position?: String): any; /** * Place this widget somewhere in the DOM based * on standard domConstruct.place() conventions. @@ -32715,7 +32715,7 @@ declare module dijit { * @param reference Widget, DOMNode, or id of widget or DOMNode * @param position OptionalIf reference is a widget (or id of widget), and that widget has an ".addChild" method,it will be called passing this widget instance into that method, supplying the optionalposition index passed. In this case position (if specified) should be an integer.If reference is a DOMNode (or id matching a DOMNode but not a widget),the position argument can be a numeric index or a string"first", "last", "before", or "after", same as dojo/dom-construct::place(). */ - placeAt(reference: dijit._WidgetBase, position: String): any; + placeAt(reference: dijit._WidgetBase, position?: String): any; /** * Place this widget somewhere in the DOM based * on standard domConstruct.place() conventions. @@ -32726,7 +32726,7 @@ declare module dijit { * @param reference Widget, DOMNode, or id of widget or DOMNode * @param position OptionalIf reference is a widget (or id of widget), and that widget has an ".addChild" method,it will be called passing this widget instance into that method, supplying the optionalposition index passed. In this case position (if specified) should be an integer.If reference is a DOMNode (or id matching a DOMNode but not a widget),the position argument can be a numeric index or a string"first", "last", "before", or "after", same as dojo/dom-construct::place(). */ - placeAt(reference: String, position: number): any; + placeAt(reference: String, position?: number): any; /** * Place this widget somewhere in the DOM based * on standard domConstruct.place() conventions. @@ -32737,7 +32737,7 @@ declare module dijit { * @param reference Widget, DOMNode, or id of widget or DOMNode * @param position OptionalIf reference is a widget (or id of widget), and that widget has an ".addChild" method,it will be called passing this widget instance into that method, supplying the optionalposition index passed. In this case position (if specified) should be an integer.If reference is a DOMNode (or id matching a DOMNode but not a widget),the position argument can be a numeric index or a string"first", "last", "before", or "after", same as dojo/dom-construct::place(). */ - placeAt(reference: HTMLElement, position: number): any; + placeAt(reference: HTMLElement, position?: number): any; /** * Place this widget somewhere in the DOM based * on standard domConstruct.place() conventions. @@ -32748,7 +32748,7 @@ declare module dijit { * @param reference Widget, DOMNode, or id of widget or DOMNode * @param position OptionalIf reference is a widget (or id of widget), and that widget has an ".addChild" method,it will be called passing this widget instance into that method, supplying the optionalposition index passed. In this case position (if specified) should be an integer.If reference is a DOMNode (or id matching a DOMNode but not a widget),the position argument can be a numeric index or a string"first", "last", "before", or "after", same as dojo/dom-construct::place(). */ - placeAt(reference: dijit._WidgetBase, position: number): any; + placeAt(reference: dijit._WidgetBase, position?: number): any; /** * */ @@ -33478,21 +33478,21 @@ declare module dijit { * @param widget * @param insertIndex Optional */ - addChild(widget: dijit._WidgetBase, insertIndex: number): void; + addChild(widget: dijit._WidgetBase, insertIndex?: number): void; /** * This method is deprecated, use get() or set() directly. * * @param name The property to get or set. If an object is passed here and nota string, its keys are used as names of attributes to be setand the value of the object as values to set in the widget. * @param value OptionalOptional. If provided, attr() operates as a setter. If omitted,the current value of the named property is returned. */ - attr(name: String, value: Object): any; + attr(name: String, value?: Object): any; /** * This method is deprecated, use get() or set() directly. * * @param name The property to get or set. If an object is passed here and nota string, its keys are used as names of attributes to be setand the value of the object as values to set in the widget. * @param value OptionalOptional. If provided, attr() operates as a setter. If omitted,the current value of the named property is returned. */ - attr(name: Object, value: Object): any; + attr(name: Object, value?: Object): any; /** * */ @@ -33652,7 +33652,7 @@ declare module dijit { * @param fcn Function reference. * @param delay OptionalDelay, defaults to 0. */ - defer(fcn: Function, delay: number): Object; + defer(fcn: Function, delay?: number): Object; /** * */ @@ -33701,7 +33701,7 @@ declare module dijit { * @param eventObj Optional * @param callbackArgs Optional */ - emit(type: String, eventObj: Object, callbackArgs: any[]): any; + emit(type: String, eventObj?: Object, callbackArgs?: any[]): any; /** * Callback when the user hits the submit button. * Override this method to handle Dialog execution. @@ -33844,7 +33844,7 @@ declare module dijit { * @param reference Widget, DOMNode, or id of widget or DOMNode * @param position OptionalIf reference is a widget (or id of widget), and that widget has an ".addChild" method,it will be called passing this widget instance into that method, supplying the optionalposition index passed. In this case position (if specified) should be an integer.If reference is a DOMNode (or id matching a DOMNode but not a widget),the position argument can be a numeric index or a string"first", "last", "before", or "after", same as dojo/dom-construct::place(). */ - placeAt(reference: String, position: String): any; + placeAt(reference: String, position?: String): any; /** * Place this widget somewhere in the DOM based * on standard domConstruct.place() conventions. @@ -33855,7 +33855,7 @@ declare module dijit { * @param reference Widget, DOMNode, or id of widget or DOMNode * @param position OptionalIf reference is a widget (or id of widget), and that widget has an ".addChild" method,it will be called passing this widget instance into that method, supplying the optionalposition index passed. In this case position (if specified) should be an integer.If reference is a DOMNode (or id matching a DOMNode but not a widget),the position argument can be a numeric index or a string"first", "last", "before", or "after", same as dojo/dom-construct::place(). */ - placeAt(reference: HTMLElement, position: String): any; + placeAt(reference: HTMLElement, position?: String): any; /** * Place this widget somewhere in the DOM based * on standard domConstruct.place() conventions. @@ -33866,7 +33866,7 @@ declare module dijit { * @param reference Widget, DOMNode, or id of widget or DOMNode * @param position OptionalIf reference is a widget (or id of widget), and that widget has an ".addChild" method,it will be called passing this widget instance into that method, supplying the optionalposition index passed. In this case position (if specified) should be an integer.If reference is a DOMNode (or id matching a DOMNode but not a widget),the position argument can be a numeric index or a string"first", "last", "before", or "after", same as dojo/dom-construct::place(). */ - placeAt(reference: dijit._WidgetBase, position: String): any; + placeAt(reference: dijit._WidgetBase, position?: String): any; /** * Place this widget somewhere in the DOM based * on standard domConstruct.place() conventions. @@ -33877,7 +33877,7 @@ declare module dijit { * @param reference Widget, DOMNode, or id of widget or DOMNode * @param position OptionalIf reference is a widget (or id of widget), and that widget has an ".addChild" method,it will be called passing this widget instance into that method, supplying the optionalposition index passed. In this case position (if specified) should be an integer.If reference is a DOMNode (or id matching a DOMNode but not a widget),the position argument can be a numeric index or a string"first", "last", "before", or "after", same as dojo/dom-construct::place(). */ - placeAt(reference: String, position: number): any; + placeAt(reference: String, position?: number): any; /** * Place this widget somewhere in the DOM based * on standard domConstruct.place() conventions. @@ -33888,7 +33888,7 @@ declare module dijit { * @param reference Widget, DOMNode, or id of widget or DOMNode * @param position OptionalIf reference is a widget (or id of widget), and that widget has an ".addChild" method,it will be called passing this widget instance into that method, supplying the optionalposition index passed. In this case position (if specified) should be an integer.If reference is a DOMNode (or id matching a DOMNode but not a widget),the position argument can be a numeric index or a string"first", "last", "before", or "after", same as dojo/dom-construct::place(). */ - placeAt(reference: HTMLElement, position: number): any; + placeAt(reference: HTMLElement, position?: number): any; /** * Place this widget somewhere in the DOM based * on standard domConstruct.place() conventions. @@ -33899,7 +33899,7 @@ declare module dijit { * @param reference Widget, DOMNode, or id of widget or DOMNode * @param position OptionalIf reference is a widget (or id of widget), and that widget has an ".addChild" method,it will be called passing this widget instance into that method, supplying the optionalposition index passed. In this case position (if specified) should be an integer.If reference is a DOMNode (or id matching a DOMNode but not a widget),the position argument can be a numeric index or a string"first", "last", "before", or "after", same as dojo/dom-construct::place(). */ - placeAt(reference: dijit._WidgetBase, position: number): any; + placeAt(reference: dijit._WidgetBase, position?: number): any; /** * */ @@ -34845,14 +34845,14 @@ declare module dijit { * @param name The property to get or set. If an object is passed here and nota string, its keys are used as names of attributes to be setand the value of the object as values to set in the widget. * @param value OptionalOptional. If provided, attr() operates as a setter. If omitted,the current value of the named property is returned. */ - attr(name: String, value: Object): any; + attr(name: String, value?: Object): any; /** * This method is deprecated, use get() or set() directly. * * @param name The property to get or set. If an object is passed here and nota string, its keys are used as names of attributes to be setand the value of the object as values to set in the widget. * @param value OptionalOptional. If provided, attr() operates as a setter. If omitted,the current value of the named property is returned. */ - attr(name: Object, value: Object): any; + attr(name: Object, value?: Object): any; /** * Construct the UI for this widget, setting this.domNode. * Most widgets will mixin dijit._TemplatedMixin, which implements this method. @@ -35000,7 +35000,7 @@ declare module dijit { * @param fcn Function reference. * @param delay OptionalDelay, defaults to 0. */ - defer(fcn: Function, delay: number): Object; + defer(fcn: Function, delay?: number): Object; /** * */ @@ -35050,7 +35050,7 @@ declare module dijit { * @param eventObj Optional * @param callbackArgs Optional */ - emit(type: String, eventObj: Object, callbackArgs: any[]): any; + emit(type: String, eventObj?: Object, callbackArgs?: any[]): any; /** * Expand all nodes in the tree * @@ -35274,7 +35274,7 @@ declare module dijit { * @param reference Widget, DOMNode, or id of widget or DOMNode * @param position OptionalIf reference is a widget (or id of widget), and that widget has an ".addChild" method,it will be called passing this widget instance into that method, supplying the optionalposition index passed. In this case position (if specified) should be an integer.If reference is a DOMNode (or id matching a DOMNode but not a widget),the position argument can be a numeric index or a string"first", "last", "before", or "after", same as dojo/dom-construct::place(). */ - placeAt(reference: String, position: String): any; + placeAt(reference: String, position?: String): any; /** * Place this widget somewhere in the DOM based * on standard domConstruct.place() conventions. @@ -35285,7 +35285,7 @@ declare module dijit { * @param reference Widget, DOMNode, or id of widget or DOMNode * @param position OptionalIf reference is a widget (or id of widget), and that widget has an ".addChild" method,it will be called passing this widget instance into that method, supplying the optionalposition index passed. In this case position (if specified) should be an integer.If reference is a DOMNode (or id matching a DOMNode but not a widget),the position argument can be a numeric index or a string"first", "last", "before", or "after", same as dojo/dom-construct::place(). */ - placeAt(reference: HTMLElement, position: String): any; + placeAt(reference: HTMLElement, position?: String): any; /** * Place this widget somewhere in the DOM based * on standard domConstruct.place() conventions. @@ -35296,7 +35296,7 @@ declare module dijit { * @param reference Widget, DOMNode, or id of widget or DOMNode * @param position OptionalIf reference is a widget (or id of widget), and that widget has an ".addChild" method,it will be called passing this widget instance into that method, supplying the optionalposition index passed. In this case position (if specified) should be an integer.If reference is a DOMNode (or id matching a DOMNode but not a widget),the position argument can be a numeric index or a string"first", "last", "before", or "after", same as dojo/dom-construct::place(). */ - placeAt(reference: dijit._WidgetBase, position: String): any; + placeAt(reference: dijit._WidgetBase, position?: String): any; /** * Place this widget somewhere in the DOM based * on standard domConstruct.place() conventions. @@ -35307,7 +35307,7 @@ declare module dijit { * @param reference Widget, DOMNode, or id of widget or DOMNode * @param position OptionalIf reference is a widget (or id of widget), and that widget has an ".addChild" method,it will be called passing this widget instance into that method, supplying the optionalposition index passed. In this case position (if specified) should be an integer.If reference is a DOMNode (or id matching a DOMNode but not a widget),the position argument can be a numeric index or a string"first", "last", "before", or "after", same as dojo/dom-construct::place(). */ - placeAt(reference: String, position: number): any; + placeAt(reference: String, position?: number): any; /** * Place this widget somewhere in the DOM based * on standard domConstruct.place() conventions. @@ -35318,7 +35318,7 @@ declare module dijit { * @param reference Widget, DOMNode, or id of widget or DOMNode * @param position OptionalIf reference is a widget (or id of widget), and that widget has an ".addChild" method,it will be called passing this widget instance into that method, supplying the optionalposition index passed. In this case position (if specified) should be an integer.If reference is a DOMNode (or id matching a DOMNode but not a widget),the position argument can be a numeric index or a string"first", "last", "before", or "after", same as dojo/dom-construct::place(). */ - placeAt(reference: HTMLElement, position: number): any; + placeAt(reference: HTMLElement, position?: number): any; /** * Place this widget somewhere in the DOM based * on standard domConstruct.place() conventions. @@ -35329,7 +35329,7 @@ declare module dijit { * @param reference Widget, DOMNode, or id of widget or DOMNode * @param position OptionalIf reference is a widget (or id of widget), and that widget has an ".addChild" method,it will be called passing this widget instance into that method, supplying the optionalposition index passed. In this case position (if specified) should be an integer.If reference is a DOMNode (or id matching a DOMNode but not a widget),the position argument can be a numeric index or a string"first", "last", "before", or "after", same as dojo/dom-construct::place(). */ - placeAt(reference: dijit._WidgetBase, position: number): any; + placeAt(reference: dijit._WidgetBase, position?: number): any; /** * */ @@ -35886,21 +35886,21 @@ declare module dijit { * @param widget * @param insertIndex Optional */ - addChild(widget: dijit._WidgetBase, insertIndex: number): void; + addChild(widget: dijit._WidgetBase, insertIndex?: number): void; /** * This method is deprecated, use get() or set() directly. * * @param name The property to get or set. If an object is passed here and nota string, its keys are used as names of attributes to be setand the value of the object as values to set in the widget. * @param value OptionalOptional. If provided, attr() operates as a setter. If omitted,the current value of the named property is returned. */ - attr(name: String, value: Object): any; + attr(name: String, value?: Object): any; /** * This method is deprecated, use get() or set() directly. * * @param name The property to get or set. If an object is passed here and nota string, its keys are used as names of attributes to be setand the value of the object as values to set in the widget. * @param value OptionalOptional. If provided, attr() operates as a setter. If omitted,the current value of the named property is returned. */ - attr(name: Object, value: Object): any; + attr(name: Object, value?: Object): any; /** * */ @@ -36046,7 +36046,7 @@ declare module dijit { * @param fcn Function reference. * @param delay OptionalDelay, defaults to 0. */ - defer(fcn: Function, delay: number): Object; + defer(fcn: Function, delay?: number): Object; /** * Destroy this widget, but not its descendants. Descendants means widgets inside of * this.containerNode. Will also destroy any resources (including widgets) registered via this.own(). @@ -36104,7 +36104,7 @@ declare module dijit { * @param eventObj Optional * @param callbackArgs Optional */ - emit(type: String, eventObj: Object, callbackArgs: any[]): any; + emit(type: String, eventObj?: Object, callbackArgs?: any[]): any; /** * Show my children * @@ -36239,7 +36239,7 @@ declare module dijit { * @param reference Widget, DOMNode, or id of widget or DOMNode * @param position OptionalIf reference is a widget (or id of widget), and that widget has an ".addChild" method,it will be called passing this widget instance into that method, supplying the optionalposition index passed. In this case position (if specified) should be an integer.If reference is a DOMNode (or id matching a DOMNode but not a widget),the position argument can be a numeric index or a string"first", "last", "before", or "after", same as dojo/dom-construct::place(). */ - placeAt(reference: String, position: String): any; + placeAt(reference: String, position?: String): any; /** * Place this widget somewhere in the DOM based * on standard domConstruct.place() conventions. @@ -36250,7 +36250,7 @@ declare module dijit { * @param reference Widget, DOMNode, or id of widget or DOMNode * @param position OptionalIf reference is a widget (or id of widget), and that widget has an ".addChild" method,it will be called passing this widget instance into that method, supplying the optionalposition index passed. In this case position (if specified) should be an integer.If reference is a DOMNode (or id matching a DOMNode but not a widget),the position argument can be a numeric index or a string"first", "last", "before", or "after", same as dojo/dom-construct::place(). */ - placeAt(reference: HTMLElement, position: String): any; + placeAt(reference: HTMLElement, position?: String): any; /** * Place this widget somewhere in the DOM based * on standard domConstruct.place() conventions. @@ -36261,7 +36261,7 @@ declare module dijit { * @param reference Widget, DOMNode, or id of widget or DOMNode * @param position OptionalIf reference is a widget (or id of widget), and that widget has an ".addChild" method,it will be called passing this widget instance into that method, supplying the optionalposition index passed. In this case position (if specified) should be an integer.If reference is a DOMNode (or id matching a DOMNode but not a widget),the position argument can be a numeric index or a string"first", "last", "before", or "after", same as dojo/dom-construct::place(). */ - placeAt(reference: dijit._WidgetBase, position: String): any; + placeAt(reference: dijit._WidgetBase, position?: String): any; /** * Place this widget somewhere in the DOM based * on standard domConstruct.place() conventions. @@ -36272,7 +36272,7 @@ declare module dijit { * @param reference Widget, DOMNode, or id of widget or DOMNode * @param position OptionalIf reference is a widget (or id of widget), and that widget has an ".addChild" method,it will be called passing this widget instance into that method, supplying the optionalposition index passed. In this case position (if specified) should be an integer.If reference is a DOMNode (or id matching a DOMNode but not a widget),the position argument can be a numeric index or a string"first", "last", "before", or "after", same as dojo/dom-construct::place(). */ - placeAt(reference: String, position: number): any; + placeAt(reference: String, position?: number): any; /** * Place this widget somewhere in the DOM based * on standard domConstruct.place() conventions. @@ -36283,7 +36283,7 @@ declare module dijit { * @param reference Widget, DOMNode, or id of widget or DOMNode * @param position OptionalIf reference is a widget (or id of widget), and that widget has an ".addChild" method,it will be called passing this widget instance into that method, supplying the optionalposition index passed. In this case position (if specified) should be an integer.If reference is a DOMNode (or id matching a DOMNode but not a widget),the position argument can be a numeric index or a string"first", "last", "before", or "after", same as dojo/dom-construct::place(). */ - placeAt(reference: HTMLElement, position: number): any; + placeAt(reference: HTMLElement, position?: number): any; /** * Place this widget somewhere in the DOM based * on standard domConstruct.place() conventions. @@ -36294,7 +36294,7 @@ declare module dijit { * @param reference Widget, DOMNode, or id of widget or DOMNode * @param position OptionalIf reference is a widget (or id of widget), and that widget has an ".addChild" method,it will be called passing this widget instance into that method, supplying the optionalposition index passed. In this case position (if specified) should be an integer.If reference is a DOMNode (or id matching a DOMNode but not a widget),the position argument can be a numeric index or a string"first", "last", "before", or "after", same as dojo/dom-construct::place(). */ - placeAt(reference: dijit._WidgetBase, position: number): any; + placeAt(reference: dijit._WidgetBase, position?: number): any; /** * */ @@ -37349,14 +37349,14 @@ declare module dijit { * @param name The property to get or set. If an object is passed here and nota string, its keys are used as names of attributes to be setand the value of the object as values to set in the widget. * @param value OptionalOptional. If provided, attr() operates as a setter. If omitted,the current value of the named property is returned. */ - attr(name: String, value: Object): any; + attr(name: String, value?: Object): any; /** * This method is deprecated, use get() or set() directly. * * @param name The property to get or set. If an object is passed here and nota string, its keys are used as names of attributes to be setand the value of the object as values to set in the widget. * @param value OptionalOptional. If provided, attr() operates as a setter. If omitted,the current value of the named property is returned. */ - attr(name: Object, value: Object): any; + attr(name: Object, value?: Object): any; /** * Remove focus from this instance. * @@ -37504,7 +37504,7 @@ declare module dijit { * @param fcn Function reference. * @param delay OptionalDelay, defaults to 0. */ - defer(fcn: Function, delay: number): Object; + defer(fcn: Function, delay?: number): Object; /** * */ @@ -37552,7 +37552,7 @@ declare module dijit { * @param eventObj Optional * @param callbackArgs Optional */ - emit(type: String, eventObj: Object, callbackArgs: any[]): any; + emit(type: String, eventObj?: Object, callbackArgs?: any[]): any; /** * Executes a command in the Rich Text area * @@ -37668,7 +37668,7 @@ declare module dijit { * @param reference Widget, DOMNode, or id of widget or DOMNode * @param position OptionalIf reference is a widget (or id of widget), and that widget has an ".addChild" method,it will be called passing this widget instance into that method, supplying the optionalposition index passed. In this case position (if specified) should be an integer.If reference is a DOMNode (or id matching a DOMNode but not a widget),the position argument can be a numeric index or a string"first", "last", "before", or "after", same as dojo/dom-construct::place(). */ - placeAt(reference: String, position: String): any; + placeAt(reference: String, position?: String): any; /** * Place this widget somewhere in the DOM based * on standard domConstruct.place() conventions. @@ -37679,7 +37679,7 @@ declare module dijit { * @param reference Widget, DOMNode, or id of widget or DOMNode * @param position OptionalIf reference is a widget (or id of widget), and that widget has an ".addChild" method,it will be called passing this widget instance into that method, supplying the optionalposition index passed. In this case position (if specified) should be an integer.If reference is a DOMNode (or id matching a DOMNode but not a widget),the position argument can be a numeric index or a string"first", "last", "before", or "after", same as dojo/dom-construct::place(). */ - placeAt(reference: HTMLElement, position: String): any; + placeAt(reference: HTMLElement, position?: String): any; /** * Place this widget somewhere in the DOM based * on standard domConstruct.place() conventions. @@ -37690,7 +37690,7 @@ declare module dijit { * @param reference Widget, DOMNode, or id of widget or DOMNode * @param position OptionalIf reference is a widget (or id of widget), and that widget has an ".addChild" method,it will be called passing this widget instance into that method, supplying the optionalposition index passed. In this case position (if specified) should be an integer.If reference is a DOMNode (or id matching a DOMNode but not a widget),the position argument can be a numeric index or a string"first", "last", "before", or "after", same as dojo/dom-construct::place(). */ - placeAt(reference: dijit._WidgetBase, position: String): any; + placeAt(reference: dijit._WidgetBase, position?: String): any; /** * Place this widget somewhere in the DOM based * on standard domConstruct.place() conventions. @@ -37701,7 +37701,7 @@ declare module dijit { * @param reference Widget, DOMNode, or id of widget or DOMNode * @param position OptionalIf reference is a widget (or id of widget), and that widget has an ".addChild" method,it will be called passing this widget instance into that method, supplying the optionalposition index passed. In this case position (if specified) should be an integer.If reference is a DOMNode (or id matching a DOMNode but not a widget),the position argument can be a numeric index or a string"first", "last", "before", or "after", same as dojo/dom-construct::place(). */ - placeAt(reference: String, position: number): any; + placeAt(reference: String, position?: number): any; /** * Place this widget somewhere in the DOM based * on standard domConstruct.place() conventions. @@ -37712,7 +37712,7 @@ declare module dijit { * @param reference Widget, DOMNode, or id of widget or DOMNode * @param position OptionalIf reference is a widget (or id of widget), and that widget has an ".addChild" method,it will be called passing this widget instance into that method, supplying the optionalposition index passed. In this case position (if specified) should be an integer.If reference is a DOMNode (or id matching a DOMNode but not a widget),the position argument can be a numeric index or a string"first", "last", "before", or "after", same as dojo/dom-construct::place(). */ - placeAt(reference: HTMLElement, position: number): any; + placeAt(reference: HTMLElement, position?: number): any; /** * Place this widget somewhere in the DOM based * on standard domConstruct.place() conventions. @@ -37723,7 +37723,7 @@ declare module dijit { * @param reference Widget, DOMNode, or id of widget or DOMNode * @param position OptionalIf reference is a widget (or id of widget), and that widget has an ".addChild" method,it will be called passing this widget instance into that method, supplying the optionalposition index passed. In this case position (if specified) should be an integer.If reference is a DOMNode (or id matching a DOMNode but not a widget),the position argument can be a numeric index or a string"first", "last", "before", or "after", same as dojo/dom-construct::place(). */ - placeAt(reference: dijit._WidgetBase, position: number): any; + placeAt(reference: dijit._WidgetBase, position?: number): any; /** * */ @@ -38578,14 +38578,14 @@ declare module dijit { * @param name The property to get or set. If an object is passed here and nota string, its keys are used as names of attributes to be setand the value of the object as values to set in the widget. * @param value OptionalOptional. If provided, attr() operates as a setter. If omitted,the current value of the named property is returned. */ - attr(name: String, value: Object): any; + attr(name: String, value?: Object): any; /** * This method is deprecated, use get() or set() directly. * * @param name The property to get or set. If an object is passed here and nota string, its keys are used as names of attributes to be setand the value of the object as values to set in the widget. * @param value OptionalOptional. If provided, attr() operates as a setter. If omitted,the current value of the named property is returned. */ - attr(name: Object, value: Object): any; + attr(name: Object, value?: Object): any; /** * Construct the UI for this widget, setting this.domNode. * Most widgets will mixin dijit._TemplatedMixin, which implements this method. @@ -38733,7 +38733,7 @@ declare module dijit { * @param fcn Function reference. * @param delay OptionalDelay, defaults to 0. */ - defer(fcn: Function, delay: number): Object; + defer(fcn: Function, delay?: number): Object; /** * Destroy this widget, but not its descendants. Descendants means widgets inside of * this.containerNode. Will also destroy any resources (including widgets) registered via this.own(). @@ -38791,7 +38791,7 @@ declare module dijit { * @param eventObj Optional * @param callbackArgs Optional */ - emit(type: String, eventObj: Object, callbackArgs: any[]): any; + emit(type: String, eventObj?: Object, callbackArgs?: any[]): any; /** * Over-ride for focus control of this widget. Delegates focus down to the * filtering select. @@ -38879,7 +38879,7 @@ declare module dijit { * @param reference Widget, DOMNode, or id of widget or DOMNode * @param position OptionalIf reference is a widget (or id of widget), and that widget has an ".addChild" method,it will be called passing this widget instance into that method, supplying the optionalposition index passed. In this case position (if specified) should be an integer.If reference is a DOMNode (or id matching a DOMNode but not a widget),the position argument can be a numeric index or a string"first", "last", "before", or "after", same as dojo/dom-construct::place(). */ - placeAt(reference: String, position: String): any; + placeAt(reference: String, position?: String): any; /** * Place this widget somewhere in the DOM based * on standard domConstruct.place() conventions. @@ -38890,7 +38890,7 @@ declare module dijit { * @param reference Widget, DOMNode, or id of widget or DOMNode * @param position OptionalIf reference is a widget (or id of widget), and that widget has an ".addChild" method,it will be called passing this widget instance into that method, supplying the optionalposition index passed. In this case position (if specified) should be an integer.If reference is a DOMNode (or id matching a DOMNode but not a widget),the position argument can be a numeric index or a string"first", "last", "before", or "after", same as dojo/dom-construct::place(). */ - placeAt(reference: HTMLElement, position: String): any; + placeAt(reference: HTMLElement, position?: String): any; /** * Place this widget somewhere in the DOM based * on standard domConstruct.place() conventions. @@ -38901,7 +38901,7 @@ declare module dijit { * @param reference Widget, DOMNode, or id of widget or DOMNode * @param position OptionalIf reference is a widget (or id of widget), and that widget has an ".addChild" method,it will be called passing this widget instance into that method, supplying the optionalposition index passed. In this case position (if specified) should be an integer.If reference is a DOMNode (or id matching a DOMNode but not a widget),the position argument can be a numeric index or a string"first", "last", "before", or "after", same as dojo/dom-construct::place(). */ - placeAt(reference: dijit._WidgetBase, position: String): any; + placeAt(reference: dijit._WidgetBase, position?: String): any; /** * Place this widget somewhere in the DOM based * on standard domConstruct.place() conventions. @@ -38912,7 +38912,7 @@ declare module dijit { * @param reference Widget, DOMNode, or id of widget or DOMNode * @param position OptionalIf reference is a widget (or id of widget), and that widget has an ".addChild" method,it will be called passing this widget instance into that method, supplying the optionalposition index passed. In this case position (if specified) should be an integer.If reference is a DOMNode (or id matching a DOMNode but not a widget),the position argument can be a numeric index or a string"first", "last", "before", or "after", same as dojo/dom-construct::place(). */ - placeAt(reference: String, position: number): any; + placeAt(reference: String, position?: number): any; /** * Place this widget somewhere in the DOM based * on standard domConstruct.place() conventions. @@ -38923,7 +38923,7 @@ declare module dijit { * @param reference Widget, DOMNode, or id of widget or DOMNode * @param position OptionalIf reference is a widget (or id of widget), and that widget has an ".addChild" method,it will be called passing this widget instance into that method, supplying the optionalposition index passed. In this case position (if specified) should be an integer.If reference is a DOMNode (or id matching a DOMNode but not a widget),the position argument can be a numeric index or a string"first", "last", "before", or "after", same as dojo/dom-construct::place(). */ - placeAt(reference: HTMLElement, position: number): any; + placeAt(reference: HTMLElement, position?: number): any; /** * Place this widget somewhere in the DOM based * on standard domConstruct.place() conventions. @@ -38934,7 +38934,7 @@ declare module dijit { * @param reference Widget, DOMNode, or id of widget or DOMNode * @param position OptionalIf reference is a widget (or id of widget), and that widget has an ".addChild" method,it will be called passing this widget instance into that method, supplying the optionalposition index passed. In this case position (if specified) should be an integer.If reference is a DOMNode (or id matching a DOMNode but not a widget),the position argument can be a numeric index or a string"first", "last", "before", or "after", same as dojo/dom-construct::place(). */ - placeAt(reference: dijit._WidgetBase, position: number): any; + placeAt(reference: dijit._WidgetBase, position?: number): any; /** * Over-ride for the default postCreate action * This establishes the filtering selects and the like. @@ -39440,14 +39440,14 @@ declare module dijit { * @param name The property to get or set. If an object is passed here and nota string, its keys are used as names of attributes to be setand the value of the object as values to set in the widget. * @param value OptionalOptional. If provided, attr() operates as a setter. If omitted,the current value of the named property is returned. */ - attr(name: String, value: Object): any; + attr(name: String, value?: Object): any; /** * This method is deprecated, use get() or set() directly. * * @param name The property to get or set. If an object is passed here and nota string, its keys are used as names of attributes to be setand the value of the object as values to set in the widget. * @param value OptionalOptional. If provided, attr() operates as a setter. If omitted,the current value of the named property is returned. */ - attr(name: Object, value: Object): any; + attr(name: Object, value?: Object): any; /** * Construct the UI for this widget, setting this.domNode. * Most widgets will mixin dijit._TemplatedMixin, which implements this method. @@ -39595,7 +39595,7 @@ declare module dijit { * @param fcn Function reference. * @param delay OptionalDelay, defaults to 0. */ - defer(fcn: Function, delay: number): Object; + defer(fcn: Function, delay?: number): Object; /** * Destroy this widget, but not its descendants. Descendants means widgets inside of * this.containerNode. Will also destroy any resources (including widgets) registered via this.own(). @@ -39653,7 +39653,7 @@ declare module dijit { * @param eventObj Optional * @param callbackArgs Optional */ - emit(type: String, eventObj: Object, callbackArgs: any[]): any; + emit(type: String, eventObj?: Object, callbackArgs?: any[]): any; /** * Over-ride for focus control of this widget. Delegates focus down to the * filtering select. @@ -39750,7 +39750,7 @@ declare module dijit { * @param reference Widget, DOMNode, or id of widget or DOMNode * @param position OptionalIf reference is a widget (or id of widget), and that widget has an ".addChild" method,it will be called passing this widget instance into that method, supplying the optionalposition index passed. In this case position (if specified) should be an integer.If reference is a DOMNode (or id matching a DOMNode but not a widget),the position argument can be a numeric index or a string"first", "last", "before", or "after", same as dojo/dom-construct::place(). */ - placeAt(reference: String, position: String): any; + placeAt(reference: String, position?: String): any; /** * Place this widget somewhere in the DOM based * on standard domConstruct.place() conventions. @@ -39761,7 +39761,7 @@ declare module dijit { * @param reference Widget, DOMNode, or id of widget or DOMNode * @param position OptionalIf reference is a widget (or id of widget), and that widget has an ".addChild" method,it will be called passing this widget instance into that method, supplying the optionalposition index passed. In this case position (if specified) should be an integer.If reference is a DOMNode (or id matching a DOMNode but not a widget),the position argument can be a numeric index or a string"first", "last", "before", or "after", same as dojo/dom-construct::place(). */ - placeAt(reference: HTMLElement, position: String): any; + placeAt(reference: HTMLElement, position?: String): any; /** * Place this widget somewhere in the DOM based * on standard domConstruct.place() conventions. @@ -39772,7 +39772,7 @@ declare module dijit { * @param reference Widget, DOMNode, or id of widget or DOMNode * @param position OptionalIf reference is a widget (or id of widget), and that widget has an ".addChild" method,it will be called passing this widget instance into that method, supplying the optionalposition index passed. In this case position (if specified) should be an integer.If reference is a DOMNode (or id matching a DOMNode but not a widget),the position argument can be a numeric index or a string"first", "last", "before", or "after", same as dojo/dom-construct::place(). */ - placeAt(reference: dijit._WidgetBase, position: String): any; + placeAt(reference: dijit._WidgetBase, position?: String): any; /** * Place this widget somewhere in the DOM based * on standard domConstruct.place() conventions. @@ -39783,7 +39783,7 @@ declare module dijit { * @param reference Widget, DOMNode, or id of widget or DOMNode * @param position OptionalIf reference is a widget (or id of widget), and that widget has an ".addChild" method,it will be called passing this widget instance into that method, supplying the optionalposition index passed. In this case position (if specified) should be an integer.If reference is a DOMNode (or id matching a DOMNode but not a widget),the position argument can be a numeric index or a string"first", "last", "before", or "after", same as dojo/dom-construct::place(). */ - placeAt(reference: String, position: number): any; + placeAt(reference: String, position?: number): any; /** * Place this widget somewhere in the DOM based * on standard domConstruct.place() conventions. @@ -39794,7 +39794,7 @@ declare module dijit { * @param reference Widget, DOMNode, or id of widget or DOMNode * @param position OptionalIf reference is a widget (or id of widget), and that widget has an ".addChild" method,it will be called passing this widget instance into that method, supplying the optionalposition index passed. In this case position (if specified) should be an integer.If reference is a DOMNode (or id matching a DOMNode but not a widget),the position argument can be a numeric index or a string"first", "last", "before", or "after", same as dojo/dom-construct::place(). */ - placeAt(reference: HTMLElement, position: number): any; + placeAt(reference: HTMLElement, position?: number): any; /** * Place this widget somewhere in the DOM based * on standard domConstruct.place() conventions. @@ -39805,7 +39805,7 @@ declare module dijit { * @param reference Widget, DOMNode, or id of widget or DOMNode * @param position OptionalIf reference is a widget (or id of widget), and that widget has an ".addChild" method,it will be called passing this widget instance into that method, supplying the optionalposition index passed. In this case position (if specified) should be an integer.If reference is a DOMNode (or id matching a DOMNode but not a widget),the position argument can be a numeric index or a string"first", "last", "before", or "after", same as dojo/dom-construct::place(). */ - placeAt(reference: dijit._WidgetBase, position: number): any; + placeAt(reference: dijit._WidgetBase, position?: number): any; /** * Over-ride for the default postCreate action * This establishes the filtering selects and the like. @@ -40311,14 +40311,14 @@ declare module dijit { * @param name The property to get or set. If an object is passed here and nota string, its keys are used as names of attributes to be setand the value of the object as values to set in the widget. * @param value OptionalOptional. If provided, attr() operates as a setter. If omitted,the current value of the named property is returned. */ - attr(name: String, value: Object): any; + attr(name: String, value?: Object): any; /** * This method is deprecated, use get() or set() directly. * * @param name The property to get or set. If an object is passed here and nota string, its keys are used as names of attributes to be setand the value of the object as values to set in the widget. * @param value OptionalOptional. If provided, attr() operates as a setter. If omitted,the current value of the named property is returned. */ - attr(name: Object, value: Object): any; + attr(name: Object, value?: Object): any; /** * Construct the UI for this widget, setting this.domNode. * Most widgets will mixin dijit._TemplatedMixin, which implements this method. @@ -40466,7 +40466,7 @@ declare module dijit { * @param fcn Function reference. * @param delay OptionalDelay, defaults to 0. */ - defer(fcn: Function, delay: number): Object; + defer(fcn: Function, delay?: number): Object; /** * Destroy this widget, but not its descendants. Descendants means widgets inside of * this.containerNode. Will also destroy any resources (including widgets) registered via this.own(). @@ -40524,7 +40524,7 @@ declare module dijit { * @param eventObj Optional * @param callbackArgs Optional */ - emit(type: String, eventObj: Object, callbackArgs: any[]): any; + emit(type: String, eventObj?: Object, callbackArgs?: any[]): any; /** * Over-ride for focus control of this widget. Delegates focus down to the * filtering select. @@ -40623,7 +40623,7 @@ declare module dijit { * @param reference Widget, DOMNode, or id of widget or DOMNode * @param position OptionalIf reference is a widget (or id of widget), and that widget has an ".addChild" method,it will be called passing this widget instance into that method, supplying the optionalposition index passed. In this case position (if specified) should be an integer.If reference is a DOMNode (or id matching a DOMNode but not a widget),the position argument can be a numeric index or a string"first", "last", "before", or "after", same as dojo/dom-construct::place(). */ - placeAt(reference: String, position: String): any; + placeAt(reference: String, position?: String): any; /** * Place this widget somewhere in the DOM based * on standard domConstruct.place() conventions. @@ -40634,7 +40634,7 @@ declare module dijit { * @param reference Widget, DOMNode, or id of widget or DOMNode * @param position OptionalIf reference is a widget (or id of widget), and that widget has an ".addChild" method,it will be called passing this widget instance into that method, supplying the optionalposition index passed. In this case position (if specified) should be an integer.If reference is a DOMNode (or id matching a DOMNode but not a widget),the position argument can be a numeric index or a string"first", "last", "before", or "after", same as dojo/dom-construct::place(). */ - placeAt(reference: HTMLElement, position: String): any; + placeAt(reference: HTMLElement, position?: String): any; /** * Place this widget somewhere in the DOM based * on standard domConstruct.place() conventions. @@ -40645,7 +40645,7 @@ declare module dijit { * @param reference Widget, DOMNode, or id of widget or DOMNode * @param position OptionalIf reference is a widget (or id of widget), and that widget has an ".addChild" method,it will be called passing this widget instance into that method, supplying the optionalposition index passed. In this case position (if specified) should be an integer.If reference is a DOMNode (or id matching a DOMNode but not a widget),the position argument can be a numeric index or a string"first", "last", "before", or "after", same as dojo/dom-construct::place(). */ - placeAt(reference: dijit._WidgetBase, position: String): any; + placeAt(reference: dijit._WidgetBase, position?: String): any; /** * Place this widget somewhere in the DOM based * on standard domConstruct.place() conventions. @@ -40656,7 +40656,7 @@ declare module dijit { * @param reference Widget, DOMNode, or id of widget or DOMNode * @param position OptionalIf reference is a widget (or id of widget), and that widget has an ".addChild" method,it will be called passing this widget instance into that method, supplying the optionalposition index passed. In this case position (if specified) should be an integer.If reference is a DOMNode (or id matching a DOMNode but not a widget),the position argument can be a numeric index or a string"first", "last", "before", or "after", same as dojo/dom-construct::place(). */ - placeAt(reference: String, position: number): any; + placeAt(reference: String, position?: number): any; /** * Place this widget somewhere in the DOM based * on standard domConstruct.place() conventions. @@ -40667,7 +40667,7 @@ declare module dijit { * @param reference Widget, DOMNode, or id of widget or DOMNode * @param position OptionalIf reference is a widget (or id of widget), and that widget has an ".addChild" method,it will be called passing this widget instance into that method, supplying the optionalposition index passed. In this case position (if specified) should be an integer.If reference is a DOMNode (or id matching a DOMNode but not a widget),the position argument can be a numeric index or a string"first", "last", "before", or "after", same as dojo/dom-construct::place(). */ - placeAt(reference: HTMLElement, position: number): any; + placeAt(reference: HTMLElement, position?: number): any; /** * Place this widget somewhere in the DOM based * on standard domConstruct.place() conventions. @@ -40678,7 +40678,7 @@ declare module dijit { * @param reference Widget, DOMNode, or id of widget or DOMNode * @param position OptionalIf reference is a widget (or id of widget), and that widget has an ".addChild" method,it will be called passing this widget instance into that method, supplying the optionalposition index passed. In this case position (if specified) should be an integer.If reference is a DOMNode (or id matching a DOMNode but not a widget),the position argument can be a numeric index or a string"first", "last", "before", or "after", same as dojo/dom-construct::place(). */ - placeAt(reference: dijit._WidgetBase, position: number): any; + placeAt(reference: dijit._WidgetBase, position?: number): any; /** * Over-ride for the default postCreate action * This establishes the filtering selects and the like. @@ -41184,14 +41184,14 @@ declare module dijit { * @param name The property to get or set. If an object is passed here and nota string, its keys are used as names of attributes to be setand the value of the object as values to set in the widget. * @param value OptionalOptional. If provided, attr() operates as a setter. If omitted,the current value of the named property is returned. */ - attr(name: String, value: Object): any; + attr(name: String, value?: Object): any; /** * This method is deprecated, use get() or set() directly. * * @param name The property to get or set. If an object is passed here and nota string, its keys are used as names of attributes to be setand the value of the object as values to set in the widget. * @param value OptionalOptional. If provided, attr() operates as a setter. If omitted,the current value of the named property is returned. */ - attr(name: Object, value: Object): any; + attr(name: Object, value?: Object): any; /** * Construct the UI for this widget, setting this.domNode. * Most widgets will mixin dijit._TemplatedMixin, which implements this method. @@ -41339,7 +41339,7 @@ declare module dijit { * @param fcn Function reference. * @param delay OptionalDelay, defaults to 0. */ - defer(fcn: Function, delay: number): Object; + defer(fcn: Function, delay?: number): Object; /** * Destroy this widget, but not its descendants. Descendants means widgets inside of * this.containerNode. Will also destroy any resources (including widgets) registered via this.own(). @@ -41397,7 +41397,7 @@ declare module dijit { * @param eventObj Optional * @param callbackArgs Optional */ - emit(type: String, eventObj: Object, callbackArgs: any[]): any; + emit(type: String, eventObj?: Object, callbackArgs?: any[]): any; /** * Over-ride for focus control of this widget. Delegates focus down to the * filtering select. @@ -41494,7 +41494,7 @@ declare module dijit { * @param reference Widget, DOMNode, or id of widget or DOMNode * @param position OptionalIf reference is a widget (or id of widget), and that widget has an ".addChild" method,it will be called passing this widget instance into that method, supplying the optionalposition index passed. In this case position (if specified) should be an integer.If reference is a DOMNode (or id matching a DOMNode but not a widget),the position argument can be a numeric index or a string"first", "last", "before", or "after", same as dojo/dom-construct::place(). */ - placeAt(reference: String, position: String): any; + placeAt(reference: String, position?: String): any; /** * Place this widget somewhere in the DOM based * on standard domConstruct.place() conventions. @@ -41505,7 +41505,7 @@ declare module dijit { * @param reference Widget, DOMNode, or id of widget or DOMNode * @param position OptionalIf reference is a widget (or id of widget), and that widget has an ".addChild" method,it will be called passing this widget instance into that method, supplying the optionalposition index passed. In this case position (if specified) should be an integer.If reference is a DOMNode (or id matching a DOMNode but not a widget),the position argument can be a numeric index or a string"first", "last", "before", or "after", same as dojo/dom-construct::place(). */ - placeAt(reference: HTMLElement, position: String): any; + placeAt(reference: HTMLElement, position?: String): any; /** * Place this widget somewhere in the DOM based * on standard domConstruct.place() conventions. @@ -41516,7 +41516,7 @@ declare module dijit { * @param reference Widget, DOMNode, or id of widget or DOMNode * @param position OptionalIf reference is a widget (or id of widget), and that widget has an ".addChild" method,it will be called passing this widget instance into that method, supplying the optionalposition index passed. In this case position (if specified) should be an integer.If reference is a DOMNode (or id matching a DOMNode but not a widget),the position argument can be a numeric index or a string"first", "last", "before", or "after", same as dojo/dom-construct::place(). */ - placeAt(reference: dijit._WidgetBase, position: String): any; + placeAt(reference: dijit._WidgetBase, position?: String): any; /** * Place this widget somewhere in the DOM based * on standard domConstruct.place() conventions. @@ -41527,7 +41527,7 @@ declare module dijit { * @param reference Widget, DOMNode, or id of widget or DOMNode * @param position OptionalIf reference is a widget (or id of widget), and that widget has an ".addChild" method,it will be called passing this widget instance into that method, supplying the optionalposition index passed. In this case position (if specified) should be an integer.If reference is a DOMNode (or id matching a DOMNode but not a widget),the position argument can be a numeric index or a string"first", "last", "before", or "after", same as dojo/dom-construct::place(). */ - placeAt(reference: String, position: number): any; + placeAt(reference: String, position?: number): any; /** * Place this widget somewhere in the DOM based * on standard domConstruct.place() conventions. @@ -41538,7 +41538,7 @@ declare module dijit { * @param reference Widget, DOMNode, or id of widget or DOMNode * @param position OptionalIf reference is a widget (or id of widget), and that widget has an ".addChild" method,it will be called passing this widget instance into that method, supplying the optionalposition index passed. In this case position (if specified) should be an integer.If reference is a DOMNode (or id matching a DOMNode but not a widget),the position argument can be a numeric index or a string"first", "last", "before", or "after", same as dojo/dom-construct::place(). */ - placeAt(reference: HTMLElement, position: number): any; + placeAt(reference: HTMLElement, position?: number): any; /** * Place this widget somewhere in the DOM based * on standard domConstruct.place() conventions. @@ -41549,7 +41549,7 @@ declare module dijit { * @param reference Widget, DOMNode, or id of widget or DOMNode * @param position OptionalIf reference is a widget (or id of widget), and that widget has an ".addChild" method,it will be called passing this widget instance into that method, supplying the optionalposition index passed. In this case position (if specified) should be an integer.If reference is a DOMNode (or id matching a DOMNode but not a widget),the position argument can be a numeric index or a string"first", "last", "before", or "after", same as dojo/dom-construct::place(). */ - placeAt(reference: dijit._WidgetBase, position: number): any; + placeAt(reference: dijit._WidgetBase, position?: number): any; /** * */ @@ -44620,7 +44620,7 @@ declare module dijit { * @param fcn Function reference. * @param delay OptionalDelay, defaults to 0. */ - defer(fcn: Function, delay: number): Object; + defer(fcn: Function, delay?: number): Object; /** * Destroy this widget, but not its descendants. Descendants means widgets inside of * this.containerNode. Will also destroy any resources (including widgets) registered via this.own(). @@ -44678,7 +44678,7 @@ declare module dijit { * @param eventObj Optional * @param callbackArgs Optional */ - emit(type: String, eventObj: Object, callbackArgs: any[]): any; + emit(type: String, eventObj?: Object, callbackArgs?: any[]): any; /** * Get a property from a widget. * Get a named property from a widget. The property may @@ -44782,7 +44782,7 @@ declare module dijit { * @param reference Widget, DOMNode, or id of widget or DOMNode * @param position OptionalIf reference is a widget (or id of widget), and that widget has an ".addChild" method,it will be called passing this widget instance into that method, supplying the optionalposition index passed. In this case position (if specified) should be an integer.If reference is a DOMNode (or id matching a DOMNode but not a widget),the position argument can be a numeric index or a string"first", "last", "before", or "after", same as dojo/dom-construct::place(). */ - placeAt(reference: String, position: String): any; + placeAt(reference: String, position?: String): any; /** * Place this widget somewhere in the DOM based * on standard domConstruct.place() conventions. @@ -44793,7 +44793,7 @@ declare module dijit { * @param reference Widget, DOMNode, or id of widget or DOMNode * @param position OptionalIf reference is a widget (or id of widget), and that widget has an ".addChild" method,it will be called passing this widget instance into that method, supplying the optionalposition index passed. In this case position (if specified) should be an integer.If reference is a DOMNode (or id matching a DOMNode but not a widget),the position argument can be a numeric index or a string"first", "last", "before", or "after", same as dojo/dom-construct::place(). */ - placeAt(reference: HTMLElement, position: String): any; + placeAt(reference: HTMLElement, position?: String): any; /** * Place this widget somewhere in the DOM based * on standard domConstruct.place() conventions. @@ -44804,7 +44804,7 @@ declare module dijit { * @param reference Widget, DOMNode, or id of widget or DOMNode * @param position OptionalIf reference is a widget (or id of widget), and that widget has an ".addChild" method,it will be called passing this widget instance into that method, supplying the optionalposition index passed. In this case position (if specified) should be an integer.If reference is a DOMNode (or id matching a DOMNode but not a widget),the position argument can be a numeric index or a string"first", "last", "before", or "after", same as dojo/dom-construct::place(). */ - placeAt(reference: dijit._WidgetBase, position: String): any; + placeAt(reference: dijit._WidgetBase, position?: String): any; /** * Place this widget somewhere in the DOM based * on standard domConstruct.place() conventions. @@ -44815,7 +44815,7 @@ declare module dijit { * @param reference Widget, DOMNode, or id of widget or DOMNode * @param position OptionalIf reference is a widget (or id of widget), and that widget has an ".addChild" method,it will be called passing this widget instance into that method, supplying the optionalposition index passed. In this case position (if specified) should be an integer.If reference is a DOMNode (or id matching a DOMNode but not a widget),the position argument can be a numeric index or a string"first", "last", "before", or "after", same as dojo/dom-construct::place(). */ - placeAt(reference: String, position: number): any; + placeAt(reference: String, position?: number): any; /** * Place this widget somewhere in the DOM based * on standard domConstruct.place() conventions. @@ -44826,7 +44826,7 @@ declare module dijit { * @param reference Widget, DOMNode, or id of widget or DOMNode * @param position OptionalIf reference is a widget (or id of widget), and that widget has an ".addChild" method,it will be called passing this widget instance into that method, supplying the optionalposition index passed. In this case position (if specified) should be an integer.If reference is a DOMNode (or id matching a DOMNode but not a widget),the position argument can be a numeric index or a string"first", "last", "before", or "after", same as dojo/dom-construct::place(). */ - placeAt(reference: HTMLElement, position: number): any; + placeAt(reference: HTMLElement, position?: number): any; /** * Place this widget somewhere in the DOM based * on standard domConstruct.place() conventions. @@ -44837,7 +44837,7 @@ declare module dijit { * @param reference Widget, DOMNode, or id of widget or DOMNode * @param position OptionalIf reference is a widget (or id of widget), and that widget has an ".addChild" method,it will be called passing this widget instance into that method, supplying the optionalposition index passed. In this case position (if specified) should be an integer.If reference is a DOMNode (or id matching a DOMNode but not a widget),the position argument can be a numeric index or a string"first", "last", "before", or "after", same as dojo/dom-construct::place(). */ - placeAt(reference: dijit._WidgetBase, position: number): any; + placeAt(reference: dijit._WidgetBase, position?: number): any; /** * */ @@ -45701,14 +45701,14 @@ declare module dijit { * @param name The property to get or set. If an object is passed here and nota string, its keys are used as names of attributes to be setand the value of the object as values to set in the widget. * @param value OptionalOptional. If provided, attr() operates as a setter. If omitted,the current value of the named property is returned. */ - attr(name: String, value: Object): any; + attr(name: String, value?: Object): any; /** * This method is deprecated, use get() or set() directly. * * @param name The property to get or set. If an object is passed here and nota string, its keys are used as names of attributes to be setand the value of the object as values to set in the widget. * @param value OptionalOptional. If provided, attr() operates as a setter. If omitted,the current value of the named property is returned. */ - attr(name: Object, value: Object): any; + attr(name: Object, value?: Object): any; /** * */ @@ -45861,7 +45861,7 @@ declare module dijit { * @param fcn Function reference. * @param delay OptionalDelay, defaults to 0. */ - defer(fcn: Function, delay: number): Object; + defer(fcn: Function, delay?: number): Object; /** * Destroy this widget, but not its descendants. Descendants means widgets inside of * this.containerNode. Will also destroy any resources (including widgets) registered via this.own(). @@ -45926,7 +45926,7 @@ declare module dijit { * @param eventObj Optional * @param callbackArgs Optional */ - emit(type: String, eventObj: Object, callbackArgs: any[]): any; + emit(type: String, eventObj?: Object, callbackArgs?: any[]): any; /** * Auto-corrections (such as trimming) that are applied to textbox * value on blur or form submit. @@ -46110,7 +46110,7 @@ declare module dijit { * @param reference Widget, DOMNode, or id of widget or DOMNode * @param position OptionalIf reference is a widget (or id of widget), and that widget has an ".addChild" method,it will be called passing this widget instance into that method, supplying the optionalposition index passed. In this case position (if specified) should be an integer.If reference is a DOMNode (or id matching a DOMNode but not a widget),the position argument can be a numeric index or a string"first", "last", "before", or "after", same as dojo/dom-construct::place(). */ - placeAt(reference: String, position: String): any; + placeAt(reference: String, position?: String): any; /** * Place this widget somewhere in the DOM based * on standard domConstruct.place() conventions. @@ -46121,7 +46121,7 @@ declare module dijit { * @param reference Widget, DOMNode, or id of widget or DOMNode * @param position OptionalIf reference is a widget (or id of widget), and that widget has an ".addChild" method,it will be called passing this widget instance into that method, supplying the optionalposition index passed. In this case position (if specified) should be an integer.If reference is a DOMNode (or id matching a DOMNode but not a widget),the position argument can be a numeric index or a string"first", "last", "before", or "after", same as dojo/dom-construct::place(). */ - placeAt(reference: HTMLElement, position: String): any; + placeAt(reference: HTMLElement, position?: String): any; /** * Place this widget somewhere in the DOM based * on standard domConstruct.place() conventions. @@ -46132,7 +46132,7 @@ declare module dijit { * @param reference Widget, DOMNode, or id of widget or DOMNode * @param position OptionalIf reference is a widget (or id of widget), and that widget has an ".addChild" method,it will be called passing this widget instance into that method, supplying the optionalposition index passed. In this case position (if specified) should be an integer.If reference is a DOMNode (or id matching a DOMNode but not a widget),the position argument can be a numeric index or a string"first", "last", "before", or "after", same as dojo/dom-construct::place(). */ - placeAt(reference: dijit._WidgetBase, position: String): any; + placeAt(reference: dijit._WidgetBase, position?: String): any; /** * Place this widget somewhere in the DOM based * on standard domConstruct.place() conventions. @@ -46143,7 +46143,7 @@ declare module dijit { * @param reference Widget, DOMNode, or id of widget or DOMNode * @param position OptionalIf reference is a widget (or id of widget), and that widget has an ".addChild" method,it will be called passing this widget instance into that method, supplying the optionalposition index passed. In this case position (if specified) should be an integer.If reference is a DOMNode (or id matching a DOMNode but not a widget),the position argument can be a numeric index or a string"first", "last", "before", or "after", same as dojo/dom-construct::place(). */ - placeAt(reference: String, position: number): any; + placeAt(reference: String, position?: number): any; /** * Place this widget somewhere in the DOM based * on standard domConstruct.place() conventions. @@ -46154,7 +46154,7 @@ declare module dijit { * @param reference Widget, DOMNode, or id of widget or DOMNode * @param position OptionalIf reference is a widget (or id of widget), and that widget has an ".addChild" method,it will be called passing this widget instance into that method, supplying the optionalposition index passed. In this case position (if specified) should be an integer.If reference is a DOMNode (or id matching a DOMNode but not a widget),the position argument can be a numeric index or a string"first", "last", "before", or "after", same as dojo/dom-construct::place(). */ - placeAt(reference: HTMLElement, position: number): any; + placeAt(reference: HTMLElement, position?: number): any; /** * Place this widget somewhere in the DOM based * on standard domConstruct.place() conventions. @@ -46165,7 +46165,7 @@ declare module dijit { * @param reference Widget, DOMNode, or id of widget or DOMNode * @param position OptionalIf reference is a widget (or id of widget), and that widget has an ".addChild" method,it will be called passing this widget instance into that method, supplying the optionalposition index passed. In this case position (if specified) should be an integer.If reference is a DOMNode (or id matching a DOMNode but not a widget),the position argument can be a numeric index or a string"first", "last", "before", or "after", same as dojo/dom-construct::place(). */ - placeAt(reference: dijit._WidgetBase, position: number): any; + placeAt(reference: dijit._WidgetBase, position?: number): any; /** * */ @@ -46985,14 +46985,14 @@ declare module dijit { * @param name The property to get or set. If an object is passed here and nota string, its keys are used as names of attributes to be setand the value of the object as values to set in the widget. * @param value OptionalOptional. If provided, attr() operates as a setter. If omitted,the current value of the named property is returned. */ - attr(name: String, value: Object): any; + attr(name: String, value?: Object): any; /** * This method is deprecated, use get() or set() directly. * * @param name The property to get or set. If an object is passed here and nota string, its keys are used as names of attributes to be setand the value of the object as values to set in the widget. * @param value OptionalOptional. If provided, attr() operates as a setter. If omitted,the current value of the named property is returned. */ - attr(name: Object, value: Object): any; + attr(name: Object, value?: Object): any; /** * */ @@ -47140,7 +47140,7 @@ declare module dijit { * @param fcn Function reference. * @param delay OptionalDelay, defaults to 0. */ - defer(fcn: Function, delay: number): Object; + defer(fcn: Function, delay?: number): Object; /** * Clean up our connections * @@ -47189,7 +47189,7 @@ declare module dijit { * @param eventObj Optional * @param callbackArgs Optional */ - emit(type: String, eventObj: Object, callbackArgs: any[]): any; + emit(type: String, eventObj?: Object, callbackArgs?: any[]): any; /** * Put focus on this widget * @@ -47287,7 +47287,7 @@ declare module dijit { * @param reference Widget, DOMNode, or id of widget or DOMNode * @param position OptionalIf reference is a widget (or id of widget), and that widget has an ".addChild" method,it will be called passing this widget instance into that method, supplying the optionalposition index passed. In this case position (if specified) should be an integer.If reference is a DOMNode (or id matching a DOMNode but not a widget),the position argument can be a numeric index or a string"first", "last", "before", or "after", same as dojo/dom-construct::place(). */ - placeAt(reference: String, position: String): any; + placeAt(reference: String, position?: String): any; /** * Place this widget somewhere in the DOM based * on standard domConstruct.place() conventions. @@ -47298,7 +47298,7 @@ declare module dijit { * @param reference Widget, DOMNode, or id of widget or DOMNode * @param position OptionalIf reference is a widget (or id of widget), and that widget has an ".addChild" method,it will be called passing this widget instance into that method, supplying the optionalposition index passed. In this case position (if specified) should be an integer.If reference is a DOMNode (or id matching a DOMNode but not a widget),the position argument can be a numeric index or a string"first", "last", "before", or "after", same as dojo/dom-construct::place(). */ - placeAt(reference: HTMLElement, position: String): any; + placeAt(reference: HTMLElement, position?: String): any; /** * Place this widget somewhere in the DOM based * on standard domConstruct.place() conventions. @@ -47309,7 +47309,7 @@ declare module dijit { * @param reference Widget, DOMNode, or id of widget or DOMNode * @param position OptionalIf reference is a widget (or id of widget), and that widget has an ".addChild" method,it will be called passing this widget instance into that method, supplying the optionalposition index passed. In this case position (if specified) should be an integer.If reference is a DOMNode (or id matching a DOMNode but not a widget),the position argument can be a numeric index or a string"first", "last", "before", or "after", same as dojo/dom-construct::place(). */ - placeAt(reference: dijit._WidgetBase, position: String): any; + placeAt(reference: dijit._WidgetBase, position?: String): any; /** * Place this widget somewhere in the DOM based * on standard domConstruct.place() conventions. @@ -47320,7 +47320,7 @@ declare module dijit { * @param reference Widget, DOMNode, or id of widget or DOMNode * @param position OptionalIf reference is a widget (or id of widget), and that widget has an ".addChild" method,it will be called passing this widget instance into that method, supplying the optionalposition index passed. In this case position (if specified) should be an integer.If reference is a DOMNode (or id matching a DOMNode but not a widget),the position argument can be a numeric index or a string"first", "last", "before", or "after", same as dojo/dom-construct::place(). */ - placeAt(reference: String, position: number): any; + placeAt(reference: String, position?: number): any; /** * Place this widget somewhere in the DOM based * on standard domConstruct.place() conventions. @@ -47331,7 +47331,7 @@ declare module dijit { * @param reference Widget, DOMNode, or id of widget or DOMNode * @param position OptionalIf reference is a widget (or id of widget), and that widget has an ".addChild" method,it will be called passing this widget instance into that method, supplying the optionalposition index passed. In this case position (if specified) should be an integer.If reference is a DOMNode (or id matching a DOMNode but not a widget),the position argument can be a numeric index or a string"first", "last", "before", or "after", same as dojo/dom-construct::place(). */ - placeAt(reference: HTMLElement, position: number): any; + placeAt(reference: HTMLElement, position?: number): any; /** * Place this widget somewhere in the DOM based * on standard domConstruct.place() conventions. @@ -47342,7 +47342,7 @@ declare module dijit { * @param reference Widget, DOMNode, or id of widget or DOMNode * @param position OptionalIf reference is a widget (or id of widget), and that widget has an ".addChild" method,it will be called passing this widget instance into that method, supplying the optionalposition index passed. In this case position (if specified) should be an integer.If reference is a DOMNode (or id matching a DOMNode but not a widget),the position argument can be a numeric index or a string"first", "last", "before", or "after", same as dojo/dom-construct::place(). */ - placeAt(reference: dijit._WidgetBase, position: number): any; + placeAt(reference: dijit._WidgetBase, position?: number): any; /** * sets up our event handling that we need for functioning * as a select @@ -48057,14 +48057,14 @@ declare module dijit { * @param name The property to get or set. If an object is passed here and nota string, its keys are used as names of attributes to be setand the value of the object as values to set in the widget. * @param value OptionalOptional. If provided, attr() operates as a setter. If omitted,the current value of the named property is returned. */ - attr(name: String, value: Object): any; + attr(name: String, value?: Object): any; /** * This method is deprecated, use get() or set() directly. * * @param name The property to get or set. If an object is passed here and nota string, its keys are used as names of attributes to be setand the value of the object as values to set in the widget. * @param value OptionalOptional. If provided, attr() operates as a setter. If omitted,the current value of the named property is returned. */ - attr(name: Object, value: Object): any; + attr(name: Object, value?: Object): any; /** * Construct the UI for this widget, setting this.domNode. * Most widgets will mixin dijit._TemplatedMixin, which implements this method. @@ -48218,7 +48218,7 @@ declare module dijit { * @param fcn Function reference. * @param delay OptionalDelay, defaults to 0. */ - defer(fcn: Function, delay: number): Object; + defer(fcn: Function, delay?: number): Object; /** * Destroy this widget, but not its descendants. Descendants means widgets inside of * this.containerNode. Will also destroy any resources (including widgets) registered via this.own(). @@ -48276,7 +48276,7 @@ declare module dijit { * @param eventObj Optional * @param callbackArgs Optional */ - emit(type: String, eventObj: Object, callbackArgs: any[]): any; + emit(type: String, eventObj?: Object, callbackArgs?: any[]): any; /** * Put focus on this widget * @@ -48368,7 +48368,7 @@ declare module dijit { * @param reference Widget, DOMNode, or id of widget or DOMNode * @param position OptionalIf reference is a widget (or id of widget), and that widget has an ".addChild" method,it will be called passing this widget instance into that method, supplying the optionalposition index passed. In this case position (if specified) should be an integer.If reference is a DOMNode (or id matching a DOMNode but not a widget),the position argument can be a numeric index or a string"first", "last", "before", or "after", same as dojo/dom-construct::place(). */ - placeAt(reference: String, position: String): any; + placeAt(reference: String, position?: String): any; /** * Place this widget somewhere in the DOM based * on standard domConstruct.place() conventions. @@ -48379,7 +48379,7 @@ declare module dijit { * @param reference Widget, DOMNode, or id of widget or DOMNode * @param position OptionalIf reference is a widget (or id of widget), and that widget has an ".addChild" method,it will be called passing this widget instance into that method, supplying the optionalposition index passed. In this case position (if specified) should be an integer.If reference is a DOMNode (or id matching a DOMNode but not a widget),the position argument can be a numeric index or a string"first", "last", "before", or "after", same as dojo/dom-construct::place(). */ - placeAt(reference: HTMLElement, position: String): any; + placeAt(reference: HTMLElement, position?: String): any; /** * Place this widget somewhere in the DOM based * on standard domConstruct.place() conventions. @@ -48390,7 +48390,7 @@ declare module dijit { * @param reference Widget, DOMNode, or id of widget or DOMNode * @param position OptionalIf reference is a widget (or id of widget), and that widget has an ".addChild" method,it will be called passing this widget instance into that method, supplying the optionalposition index passed. In this case position (if specified) should be an integer.If reference is a DOMNode (or id matching a DOMNode but not a widget),the position argument can be a numeric index or a string"first", "last", "before", or "after", same as dojo/dom-construct::place(). */ - placeAt(reference: dijit._WidgetBase, position: String): any; + placeAt(reference: dijit._WidgetBase, position?: String): any; /** * Place this widget somewhere in the DOM based * on standard domConstruct.place() conventions. @@ -48401,7 +48401,7 @@ declare module dijit { * @param reference Widget, DOMNode, or id of widget or DOMNode * @param position OptionalIf reference is a widget (or id of widget), and that widget has an ".addChild" method,it will be called passing this widget instance into that method, supplying the optionalposition index passed. In this case position (if specified) should be an integer.If reference is a DOMNode (or id matching a DOMNode but not a widget),the position argument can be a numeric index or a string"first", "last", "before", or "after", same as dojo/dom-construct::place(). */ - placeAt(reference: String, position: number): any; + placeAt(reference: String, position?: number): any; /** * Place this widget somewhere in the DOM based * on standard domConstruct.place() conventions. @@ -48412,7 +48412,7 @@ declare module dijit { * @param reference Widget, DOMNode, or id of widget or DOMNode * @param position OptionalIf reference is a widget (or id of widget), and that widget has an ".addChild" method,it will be called passing this widget instance into that method, supplying the optionalposition index passed. In this case position (if specified) should be an integer.If reference is a DOMNode (or id matching a DOMNode but not a widget),the position argument can be a numeric index or a string"first", "last", "before", or "after", same as dojo/dom-construct::place(). */ - placeAt(reference: HTMLElement, position: number): any; + placeAt(reference: HTMLElement, position?: number): any; /** * Place this widget somewhere in the DOM based * on standard domConstruct.place() conventions. @@ -48423,7 +48423,7 @@ declare module dijit { * @param reference Widget, DOMNode, or id of widget or DOMNode * @param position OptionalIf reference is a widget (or id of widget), and that widget has an ".addChild" method,it will be called passing this widget instance into that method, supplying the optionalposition index passed. In this case position (if specified) should be an integer.If reference is a DOMNode (or id matching a DOMNode but not a widget),the position argument can be a numeric index or a string"first", "last", "before", or "after", same as dojo/dom-construct::place(). */ - placeAt(reference: dijit._WidgetBase, position: number): any; + placeAt(reference: dijit._WidgetBase, position?: number): any; /** * */ @@ -49020,14 +49020,14 @@ declare module dijit { * @param name The property to get or set. If an object is passed here and nota string, its keys are used as names of attributes to be setand the value of the object as values to set in the widget. * @param value OptionalOptional. If provided, attr() operates as a setter. If omitted,the current value of the named property is returned. */ - attr(name: String, value: Object): any; + attr(name: String, value?: Object): any; /** * This method is deprecated, use get() or set() directly. * * @param name The property to get or set. If an object is passed here and nota string, its keys are used as names of attributes to be setand the value of the object as values to set in the widget. * @param value OptionalOptional. If provided, attr() operates as a setter. If omitted,the current value of the named property is returned. */ - attr(name: Object, value: Object): any; + attr(name: Object, value?: Object): any; /** * Construct the UI for this widget, setting this.domNode. * Most widgets will mixin dijit._TemplatedMixin, which implements this method. @@ -49181,7 +49181,7 @@ declare module dijit { * @param fcn Function reference. * @param delay OptionalDelay, defaults to 0. */ - defer(fcn: Function, delay: number): Object; + defer(fcn: Function, delay?: number): Object; /** * Destroy this widget, but not its descendants. Descendants means widgets inside of * this.containerNode. Will also destroy any resources (including widgets) registered via this.own(). @@ -49239,7 +49239,7 @@ declare module dijit { * @param eventObj Optional * @param callbackArgs Optional */ - emit(type: String, eventObj: Object, callbackArgs: any[]): any; + emit(type: String, eventObj?: Object, callbackArgs?: any[]): any; /** * Put focus on this widget * @@ -49331,7 +49331,7 @@ declare module dijit { * @param reference Widget, DOMNode, or id of widget or DOMNode * @param position OptionalIf reference is a widget (or id of widget), and that widget has an ".addChild" method,it will be called passing this widget instance into that method, supplying the optionalposition index passed. In this case position (if specified) should be an integer.If reference is a DOMNode (or id matching a DOMNode but not a widget),the position argument can be a numeric index or a string"first", "last", "before", or "after", same as dojo/dom-construct::place(). */ - placeAt(reference: String, position: String): any; + placeAt(reference: String, position?: String): any; /** * Place this widget somewhere in the DOM based * on standard domConstruct.place() conventions. @@ -49342,7 +49342,7 @@ declare module dijit { * @param reference Widget, DOMNode, or id of widget or DOMNode * @param position OptionalIf reference is a widget (or id of widget), and that widget has an ".addChild" method,it will be called passing this widget instance into that method, supplying the optionalposition index passed. In this case position (if specified) should be an integer.If reference is a DOMNode (or id matching a DOMNode but not a widget),the position argument can be a numeric index or a string"first", "last", "before", or "after", same as dojo/dom-construct::place(). */ - placeAt(reference: HTMLElement, position: String): any; + placeAt(reference: HTMLElement, position?: String): any; /** * Place this widget somewhere in the DOM based * on standard domConstruct.place() conventions. @@ -49353,7 +49353,7 @@ declare module dijit { * @param reference Widget, DOMNode, or id of widget or DOMNode * @param position OptionalIf reference is a widget (or id of widget), and that widget has an ".addChild" method,it will be called passing this widget instance into that method, supplying the optionalposition index passed. In this case position (if specified) should be an integer.If reference is a DOMNode (or id matching a DOMNode but not a widget),the position argument can be a numeric index or a string"first", "last", "before", or "after", same as dojo/dom-construct::place(). */ - placeAt(reference: dijit._WidgetBase, position: String): any; + placeAt(reference: dijit._WidgetBase, position?: String): any; /** * Place this widget somewhere in the DOM based * on standard domConstruct.place() conventions. @@ -49364,7 +49364,7 @@ declare module dijit { * @param reference Widget, DOMNode, or id of widget or DOMNode * @param position OptionalIf reference is a widget (or id of widget), and that widget has an ".addChild" method,it will be called passing this widget instance into that method, supplying the optionalposition index passed. In this case position (if specified) should be an integer.If reference is a DOMNode (or id matching a DOMNode but not a widget),the position argument can be a numeric index or a string"first", "last", "before", or "after", same as dojo/dom-construct::place(). */ - placeAt(reference: String, position: number): any; + placeAt(reference: String, position?: number): any; /** * Place this widget somewhere in the DOM based * on standard domConstruct.place() conventions. @@ -49375,7 +49375,7 @@ declare module dijit { * @param reference Widget, DOMNode, or id of widget or DOMNode * @param position OptionalIf reference is a widget (or id of widget), and that widget has an ".addChild" method,it will be called passing this widget instance into that method, supplying the optionalposition index passed. In this case position (if specified) should be an integer.If reference is a DOMNode (or id matching a DOMNode but not a widget),the position argument can be a numeric index or a string"first", "last", "before", or "after", same as dojo/dom-construct::place(). */ - placeAt(reference: HTMLElement, position: number): any; + placeAt(reference: HTMLElement, position?: number): any; /** * Place this widget somewhere in the DOM based * on standard domConstruct.place() conventions. @@ -49386,7 +49386,7 @@ declare module dijit { * @param reference Widget, DOMNode, or id of widget or DOMNode * @param position OptionalIf reference is a widget (or id of widget), and that widget has an ".addChild" method,it will be called passing this widget instance into that method, supplying the optionalposition index passed. In this case position (if specified) should be an integer.If reference is a DOMNode (or id matching a DOMNode but not a widget),the position argument can be a numeric index or a string"first", "last", "before", or "after", same as dojo/dom-construct::place(). */ - placeAt(reference: dijit._WidgetBase, position: number): any; + placeAt(reference: dijit._WidgetBase, position?: number): any; /** * */ @@ -50555,14 +50555,14 @@ declare module dijit { * @param name The property to get or set. If an object is passed here and nota string, its keys are used as names of attributes to be setand the value of the object as values to set in the widget. * @param value OptionalOptional. If provided, attr() operates as a setter. If omitted,the current value of the named property is returned. */ - attr(name: String, value: Object): any; + attr(name: String, value?: Object): any; /** * This method is deprecated, use get() or set() directly. * * @param name The property to get or set. If an object is passed here and nota string, its keys are used as names of attributes to be setand the value of the object as values to set in the widget. * @param value OptionalOptional. If provided, attr() operates as a setter. If omitted,the current value of the named property is returned. */ - attr(name: Object, value: Object): any; + attr(name: Object, value?: Object): any; /** * Construct the UI for this widget, setting this.domNode. * Most widgets will mixin dijit._TemplatedMixin, which implements this method. @@ -50712,7 +50712,7 @@ declare module dijit { * @param fcn Function reference. * @param delay OptionalDelay, defaults to 0. */ - defer(fcn: Function, delay: number): Object; + defer(fcn: Function, delay?: number): Object; /** * Destroy this widget, but not its descendants. Descendants means widgets inside of * this.containerNode. Will also destroy any resources (including widgets) registered via this.own(). @@ -50770,7 +50770,7 @@ declare module dijit { * @param eventObj Optional * @param callbackArgs Optional */ - emit(type: String, eventObj: Object, callbackArgs: any[]): any; + emit(type: String, eventObj?: Object, callbackArgs?: any[]): any; /** * Put focus on this widget * @@ -50862,7 +50862,7 @@ declare module dijit { * @param reference Widget, DOMNode, or id of widget or DOMNode * @param position OptionalIf reference is a widget (or id of widget), and that widget has an ".addChild" method,it will be called passing this widget instance into that method, supplying the optionalposition index passed. In this case position (if specified) should be an integer.If reference is a DOMNode (or id matching a DOMNode but not a widget),the position argument can be a numeric index or a string"first", "last", "before", or "after", same as dojo/dom-construct::place(). */ - placeAt(reference: String, position: String): any; + placeAt(reference: String, position?: String): any; /** * Place this widget somewhere in the DOM based * on standard domConstruct.place() conventions. @@ -50873,7 +50873,7 @@ declare module dijit { * @param reference Widget, DOMNode, or id of widget or DOMNode * @param position OptionalIf reference is a widget (or id of widget), and that widget has an ".addChild" method,it will be called passing this widget instance into that method, supplying the optionalposition index passed. In this case position (if specified) should be an integer.If reference is a DOMNode (or id matching a DOMNode but not a widget),the position argument can be a numeric index or a string"first", "last", "before", or "after", same as dojo/dom-construct::place(). */ - placeAt(reference: HTMLElement, position: String): any; + placeAt(reference: HTMLElement, position?: String): any; /** * Place this widget somewhere in the DOM based * on standard domConstruct.place() conventions. @@ -50884,7 +50884,7 @@ declare module dijit { * @param reference Widget, DOMNode, or id of widget or DOMNode * @param position OptionalIf reference is a widget (or id of widget), and that widget has an ".addChild" method,it will be called passing this widget instance into that method, supplying the optionalposition index passed. In this case position (if specified) should be an integer.If reference is a DOMNode (or id matching a DOMNode but not a widget),the position argument can be a numeric index or a string"first", "last", "before", or "after", same as dojo/dom-construct::place(). */ - placeAt(reference: dijit._WidgetBase, position: String): any; + placeAt(reference: dijit._WidgetBase, position?: String): any; /** * Place this widget somewhere in the DOM based * on standard domConstruct.place() conventions. @@ -50895,7 +50895,7 @@ declare module dijit { * @param reference Widget, DOMNode, or id of widget or DOMNode * @param position OptionalIf reference is a widget (or id of widget), and that widget has an ".addChild" method,it will be called passing this widget instance into that method, supplying the optionalposition index passed. In this case position (if specified) should be an integer.If reference is a DOMNode (or id matching a DOMNode but not a widget),the position argument can be a numeric index or a string"first", "last", "before", or "after", same as dojo/dom-construct::place(). */ - placeAt(reference: String, position: number): any; + placeAt(reference: String, position?: number): any; /** * Place this widget somewhere in the DOM based * on standard domConstruct.place() conventions. @@ -50906,7 +50906,7 @@ declare module dijit { * @param reference Widget, DOMNode, or id of widget or DOMNode * @param position OptionalIf reference is a widget (or id of widget), and that widget has an ".addChild" method,it will be called passing this widget instance into that method, supplying the optionalposition index passed. In this case position (if specified) should be an integer.If reference is a DOMNode (or id matching a DOMNode but not a widget),the position argument can be a numeric index or a string"first", "last", "before", or "after", same as dojo/dom-construct::place(). */ - placeAt(reference: HTMLElement, position: number): any; + placeAt(reference: HTMLElement, position?: number): any; /** * Place this widget somewhere in the DOM based * on standard domConstruct.place() conventions. @@ -50917,7 +50917,7 @@ declare module dijit { * @param reference Widget, DOMNode, or id of widget or DOMNode * @param position OptionalIf reference is a widget (or id of widget), and that widget has an ".addChild" method,it will be called passing this widget instance into that method, supplying the optionalposition index passed. In this case position (if specified) should be an integer.If reference is a DOMNode (or id matching a DOMNode but not a widget),the position argument can be a numeric index or a string"first", "last", "before", or "after", same as dojo/dom-construct::place(). */ - placeAt(reference: dijit._WidgetBase, position: number): any; + placeAt(reference: dijit._WidgetBase, position?: number): any; /** * */ @@ -51840,14 +51840,14 @@ declare module dijit { * @param name The property to get or set. If an object is passed here and nota string, its keys are used as names of attributes to be setand the value of the object as values to set in the widget. * @param value OptionalOptional. If provided, attr() operates as a setter. If omitted,the current value of the named property is returned. */ - attr(name: String, value: Object): any; + attr(name: String, value?: Object): any; /** * This method is deprecated, use get() or set() directly. * * @param name The property to get or set. If an object is passed here and nota string, its keys are used as names of attributes to be setand the value of the object as values to set in the widget. * @param value OptionalOptional. If provided, attr() operates as a setter. If omitted,the current value of the named property is returned. */ - attr(name: Object, value: Object): any; + attr(name: Object, value?: Object): any; /** * */ @@ -51995,7 +51995,7 @@ declare module dijit { * @param fcn Function reference. * @param delay OptionalDelay, defaults to 0. */ - defer(fcn: Function, delay: number): Object; + defer(fcn: Function, delay?: number): Object; /** * Destroy this widget, but not its descendants. Descendants means widgets inside of * this.containerNode. Will also destroy any resources (including widgets) registered via this.own(). @@ -52060,7 +52060,7 @@ declare module dijit { * @param eventObj Optional * @param callbackArgs Optional */ - emit(type: String, eventObj: Object, callbackArgs: any[]): any; + emit(type: String, eventObj?: Object, callbackArgs?: any[]): any; /** * Auto-corrections (such as trimming) that are applied to textbox * value on blur or form submit. @@ -52211,7 +52211,7 @@ declare module dijit { * @param reference Widget, DOMNode, or id of widget or DOMNode * @param position OptionalIf reference is a widget (or id of widget), and that widget has an ".addChild" method,it will be called passing this widget instance into that method, supplying the optionalposition index passed. In this case position (if specified) should be an integer.If reference is a DOMNode (or id matching a DOMNode but not a widget),the position argument can be a numeric index or a string"first", "last", "before", or "after", same as dojo/dom-construct::place(). */ - placeAt(reference: String, position: String): any; + placeAt(reference: String, position?: String): any; /** * Place this widget somewhere in the DOM based * on standard domConstruct.place() conventions. @@ -52222,7 +52222,7 @@ declare module dijit { * @param reference Widget, DOMNode, or id of widget or DOMNode * @param position OptionalIf reference is a widget (or id of widget), and that widget has an ".addChild" method,it will be called passing this widget instance into that method, supplying the optionalposition index passed. In this case position (if specified) should be an integer.If reference is a DOMNode (or id matching a DOMNode but not a widget),the position argument can be a numeric index or a string"first", "last", "before", or "after", same as dojo/dom-construct::place(). */ - placeAt(reference: HTMLElement, position: String): any; + placeAt(reference: HTMLElement, position?: String): any; /** * Place this widget somewhere in the DOM based * on standard domConstruct.place() conventions. @@ -52233,7 +52233,7 @@ declare module dijit { * @param reference Widget, DOMNode, or id of widget or DOMNode * @param position OptionalIf reference is a widget (or id of widget), and that widget has an ".addChild" method,it will be called passing this widget instance into that method, supplying the optionalposition index passed. In this case position (if specified) should be an integer.If reference is a DOMNode (or id matching a DOMNode but not a widget),the position argument can be a numeric index or a string"first", "last", "before", or "after", same as dojo/dom-construct::place(). */ - placeAt(reference: dijit._WidgetBase, position: String): any; + placeAt(reference: dijit._WidgetBase, position?: String): any; /** * Place this widget somewhere in the DOM based * on standard domConstruct.place() conventions. @@ -52244,7 +52244,7 @@ declare module dijit { * @param reference Widget, DOMNode, or id of widget or DOMNode * @param position OptionalIf reference is a widget (or id of widget), and that widget has an ".addChild" method,it will be called passing this widget instance into that method, supplying the optionalposition index passed. In this case position (if specified) should be an integer.If reference is a DOMNode (or id matching a DOMNode but not a widget),the position argument can be a numeric index or a string"first", "last", "before", or "after", same as dojo/dom-construct::place(). */ - placeAt(reference: String, position: number): any; + placeAt(reference: String, position?: number): any; /** * Place this widget somewhere in the DOM based * on standard domConstruct.place() conventions. @@ -52255,7 +52255,7 @@ declare module dijit { * @param reference Widget, DOMNode, or id of widget or DOMNode * @param position OptionalIf reference is a widget (or id of widget), and that widget has an ".addChild" method,it will be called passing this widget instance into that method, supplying the optionalposition index passed. In this case position (if specified) should be an integer.If reference is a DOMNode (or id matching a DOMNode but not a widget),the position argument can be a numeric index or a string"first", "last", "before", or "after", same as dojo/dom-construct::place(). */ - placeAt(reference: HTMLElement, position: number): any; + placeAt(reference: HTMLElement, position?: number): any; /** * Place this widget somewhere in the DOM based * on standard domConstruct.place() conventions. @@ -52266,7 +52266,7 @@ declare module dijit { * @param reference Widget, DOMNode, or id of widget or DOMNode * @param position OptionalIf reference is a widget (or id of widget), and that widget has an ".addChild" method,it will be called passing this widget instance into that method, supplying the optionalposition index passed. In this case position (if specified) should be an integer.If reference is a DOMNode (or id matching a DOMNode but not a widget),the position argument can be a numeric index or a string"first", "last", "before", or "after", same as dojo/dom-construct::place(). */ - placeAt(reference: dijit._WidgetBase, position: number): any; + placeAt(reference: dijit._WidgetBase, position?: number): any; /** * */ @@ -52950,14 +52950,14 @@ declare module dijit { * @param name The property to get or set. If an object is passed here and nota string, its keys are used as names of attributes to be setand the value of the object as values to set in the widget. * @param value OptionalOptional. If provided, attr() operates as a setter. If omitted,the current value of the named property is returned. */ - attr(name: String, value: Object): any; + attr(name: String, value?: Object): any; /** * This method is deprecated, use get() or set() directly. * * @param name The property to get or set. If an object is passed here and nota string, its keys are used as names of attributes to be setand the value of the object as values to set in the widget. * @param value OptionalOptional. If provided, attr() operates as a setter. If omitted,the current value of the named property is returned. */ - attr(name: Object, value: Object): any; + attr(name: Object, value?: Object): any; /** * Construct the UI for this widget, setting this.domNode. * Most widgets will mixin dijit._TemplatedMixin, which implements this method. @@ -53107,7 +53107,7 @@ declare module dijit { * @param fcn Function reference. * @param delay OptionalDelay, defaults to 0. */ - defer(fcn: Function, delay: number): Object; + defer(fcn: Function, delay?: number): Object; /** * Destroy this widget, but not its descendants. Descendants means widgets inside of * this.containerNode. Will also destroy any resources (including widgets) registered via this.own(). @@ -53165,7 +53165,7 @@ declare module dijit { * @param eventObj Optional * @param callbackArgs Optional */ - emit(type: String, eventObj: Object, callbackArgs: any[]): any; + emit(type: String, eventObj?: Object, callbackArgs?: any[]): any; /** * Put focus on this widget * @@ -53257,7 +53257,7 @@ declare module dijit { * @param reference Widget, DOMNode, or id of widget or DOMNode * @param position OptionalIf reference is a widget (or id of widget), and that widget has an ".addChild" method,it will be called passing this widget instance into that method, supplying the optionalposition index passed. In this case position (if specified) should be an integer.If reference is a DOMNode (or id matching a DOMNode but not a widget),the position argument can be a numeric index or a string"first", "last", "before", or "after", same as dojo/dom-construct::place(). */ - placeAt(reference: String, position: String): any; + placeAt(reference: String, position?: String): any; /** * Place this widget somewhere in the DOM based * on standard domConstruct.place() conventions. @@ -53268,7 +53268,7 @@ declare module dijit { * @param reference Widget, DOMNode, or id of widget or DOMNode * @param position OptionalIf reference is a widget (or id of widget), and that widget has an ".addChild" method,it will be called passing this widget instance into that method, supplying the optionalposition index passed. In this case position (if specified) should be an integer.If reference is a DOMNode (or id matching a DOMNode but not a widget),the position argument can be a numeric index or a string"first", "last", "before", or "after", same as dojo/dom-construct::place(). */ - placeAt(reference: HTMLElement, position: String): any; + placeAt(reference: HTMLElement, position?: String): any; /** * Place this widget somewhere in the DOM based * on standard domConstruct.place() conventions. @@ -53279,7 +53279,7 @@ declare module dijit { * @param reference Widget, DOMNode, or id of widget or DOMNode * @param position OptionalIf reference is a widget (or id of widget), and that widget has an ".addChild" method,it will be called passing this widget instance into that method, supplying the optionalposition index passed. In this case position (if specified) should be an integer.If reference is a DOMNode (or id matching a DOMNode but not a widget),the position argument can be a numeric index or a string"first", "last", "before", or "after", same as dojo/dom-construct::place(). */ - placeAt(reference: dijit._WidgetBase, position: String): any; + placeAt(reference: dijit._WidgetBase, position?: String): any; /** * Place this widget somewhere in the DOM based * on standard domConstruct.place() conventions. @@ -53290,7 +53290,7 @@ declare module dijit { * @param reference Widget, DOMNode, or id of widget or DOMNode * @param position OptionalIf reference is a widget (or id of widget), and that widget has an ".addChild" method,it will be called passing this widget instance into that method, supplying the optionalposition index passed. In this case position (if specified) should be an integer.If reference is a DOMNode (or id matching a DOMNode but not a widget),the position argument can be a numeric index or a string"first", "last", "before", or "after", same as dojo/dom-construct::place(). */ - placeAt(reference: String, position: number): any; + placeAt(reference: String, position?: number): any; /** * Place this widget somewhere in the DOM based * on standard domConstruct.place() conventions. @@ -53301,7 +53301,7 @@ declare module dijit { * @param reference Widget, DOMNode, or id of widget or DOMNode * @param position OptionalIf reference is a widget (or id of widget), and that widget has an ".addChild" method,it will be called passing this widget instance into that method, supplying the optionalposition index passed. In this case position (if specified) should be an integer.If reference is a DOMNode (or id matching a DOMNode but not a widget),the position argument can be a numeric index or a string"first", "last", "before", or "after", same as dojo/dom-construct::place(). */ - placeAt(reference: HTMLElement, position: number): any; + placeAt(reference: HTMLElement, position?: number): any; /** * Place this widget somewhere in the DOM based * on standard domConstruct.place() conventions. @@ -53312,7 +53312,7 @@ declare module dijit { * @param reference Widget, DOMNode, or id of widget or DOMNode * @param position OptionalIf reference is a widget (or id of widget), and that widget has an ".addChild" method,it will be called passing this widget instance into that method, supplying the optionalposition index passed. In this case position (if specified) should be an integer.If reference is a DOMNode (or id matching a DOMNode but not a widget),the position argument can be a numeric index or a string"first", "last", "before", or "after", same as dojo/dom-construct::place(). */ - placeAt(reference: dijit._WidgetBase, position: number): any; + placeAt(reference: dijit._WidgetBase, position?: number): any; /** * */ @@ -53991,21 +53991,21 @@ declare module dijit { * @param widget * @param insertIndex Optional */ - addChild(widget: dijit._WidgetBase, insertIndex: number): void; + addChild(widget: dijit._WidgetBase, insertIndex?: number): void; /** * This method is deprecated, use get() or set() directly. * * @param name The property to get or set. If an object is passed here and nota string, its keys are used as names of attributes to be setand the value of the object as values to set in the widget. * @param value OptionalOptional. If provided, attr() operates as a setter. If omitted,the current value of the named property is returned. */ - attr(name: String, value: Object): any; + attr(name: String, value?: Object): any; /** * This method is deprecated, use get() or set() directly. * * @param name The property to get or set. If an object is passed here and nota string, its keys are used as names of attributes to be setand the value of the object as values to set in the widget. * @param value OptionalOptional. If provided, attr() operates as a setter. If omitted,the current value of the named property is returned. */ - attr(name: Object, value: Object): any; + attr(name: Object, value?: Object): any; /** * Construct the UI for this widget, setting this.domNode. * Most widgets will mixin dijit._TemplatedMixin, which implements this method. @@ -54161,7 +54161,7 @@ declare module dijit { * @param fcn Function reference. * @param delay OptionalDelay, defaults to 0. */ - defer(fcn: Function, delay: number): Object; + defer(fcn: Function, delay?: number): Object; /** * Destroy this widget, but not its descendants. Descendants means widgets inside of * this.containerNode. Will also destroy any resources (including widgets) registered via this.own(). @@ -54219,7 +54219,7 @@ declare module dijit { * @param eventObj Optional * @param callbackArgs Optional */ - emit(type: String, eventObj: Object, callbackArgs: any[]): any; + emit(type: String, eventObj?: Object, callbackArgs?: any[]): any; /** * Focuses this widget to according to position, if specified, * otherwise on arrow node @@ -54345,7 +54345,7 @@ declare module dijit { * @param reference Widget, DOMNode, or id of widget or DOMNode * @param position OptionalIf reference is a widget (or id of widget), and that widget has an ".addChild" method,it will be called passing this widget instance into that method, supplying the optionalposition index passed. In this case position (if specified) should be an integer.If reference is a DOMNode (or id matching a DOMNode but not a widget),the position argument can be a numeric index or a string"first", "last", "before", or "after", same as dojo/dom-construct::place(). */ - placeAt(reference: String, position: String): any; + placeAt(reference: String, position?: String): any; /** * Place this widget somewhere in the DOM based * on standard domConstruct.place() conventions. @@ -54356,7 +54356,7 @@ declare module dijit { * @param reference Widget, DOMNode, or id of widget or DOMNode * @param position OptionalIf reference is a widget (or id of widget), and that widget has an ".addChild" method,it will be called passing this widget instance into that method, supplying the optionalposition index passed. In this case position (if specified) should be an integer.If reference is a DOMNode (or id matching a DOMNode but not a widget),the position argument can be a numeric index or a string"first", "last", "before", or "after", same as dojo/dom-construct::place(). */ - placeAt(reference: HTMLElement, position: String): any; + placeAt(reference: HTMLElement, position?: String): any; /** * Place this widget somewhere in the DOM based * on standard domConstruct.place() conventions. @@ -54367,7 +54367,7 @@ declare module dijit { * @param reference Widget, DOMNode, or id of widget or DOMNode * @param position OptionalIf reference is a widget (or id of widget), and that widget has an ".addChild" method,it will be called passing this widget instance into that method, supplying the optionalposition index passed. In this case position (if specified) should be an integer.If reference is a DOMNode (or id matching a DOMNode but not a widget),the position argument can be a numeric index or a string"first", "last", "before", or "after", same as dojo/dom-construct::place(). */ - placeAt(reference: dijit._WidgetBase, position: String): any; + placeAt(reference: dijit._WidgetBase, position?: String): any; /** * Place this widget somewhere in the DOM based * on standard domConstruct.place() conventions. @@ -54378,7 +54378,7 @@ declare module dijit { * @param reference Widget, DOMNode, or id of widget or DOMNode * @param position OptionalIf reference is a widget (or id of widget), and that widget has an ".addChild" method,it will be called passing this widget instance into that method, supplying the optionalposition index passed. In this case position (if specified) should be an integer.If reference is a DOMNode (or id matching a DOMNode but not a widget),the position argument can be a numeric index or a string"first", "last", "before", or "after", same as dojo/dom-construct::place(). */ - placeAt(reference: String, position: number): any; + placeAt(reference: String, position?: number): any; /** * Place this widget somewhere in the DOM based * on standard domConstruct.place() conventions. @@ -54389,7 +54389,7 @@ declare module dijit { * @param reference Widget, DOMNode, or id of widget or DOMNode * @param position OptionalIf reference is a widget (or id of widget), and that widget has an ".addChild" method,it will be called passing this widget instance into that method, supplying the optionalposition index passed. In this case position (if specified) should be an integer.If reference is a DOMNode (or id matching a DOMNode but not a widget),the position argument can be a numeric index or a string"first", "last", "before", or "after", same as dojo/dom-construct::place(). */ - placeAt(reference: HTMLElement, position: number): any; + placeAt(reference: HTMLElement, position?: number): any; /** * Place this widget somewhere in the DOM based * on standard domConstruct.place() conventions. @@ -54400,7 +54400,7 @@ declare module dijit { * @param reference Widget, DOMNode, or id of widget or DOMNode * @param position OptionalIf reference is a widget (or id of widget), and that widget has an ".addChild" method,it will be called passing this widget instance into that method, supplying the optionalposition index passed. In this case position (if specified) should be an integer.If reference is a DOMNode (or id matching a DOMNode but not a widget),the position argument can be a numeric index or a string"first", "last", "before", or "after", same as dojo/dom-construct::place(). */ - placeAt(reference: dijit._WidgetBase, position: number): any; + placeAt(reference: dijit._WidgetBase, position?: number): any; /** * */ @@ -55388,14 +55388,14 @@ declare module dijit { * @param name The property to get or set. If an object is passed here and nota string, its keys are used as names of attributes to be setand the value of the object as values to set in the widget. * @param value OptionalOptional. If provided, attr() operates as a setter. If omitted,the current value of the named property is returned. */ - attr(name: String, value: Object): any; + attr(name: String, value?: Object): any; /** * This method is deprecated, use get() or set() directly. * * @param name The property to get or set. If an object is passed here and nota string, its keys are used as names of attributes to be setand the value of the object as values to set in the widget. * @param value OptionalOptional. If provided, attr() operates as a setter. If omitted,the current value of the named property is returned. */ - attr(name: Object, value: Object): any; + attr(name: Object, value?: Object): any; /** * Construct the UI for this widget, setting this.domNode. * Most widgets will mixin dijit._TemplatedMixin, which implements this method. @@ -55551,7 +55551,7 @@ declare module dijit { * @param fcn Function reference. * @param delay OptionalDelay, defaults to 0. */ - defer(fcn: Function, delay: number): Object; + defer(fcn: Function, delay?: number): Object; /** * Destroy this widget, but not its descendants. Descendants means widgets inside of * this.containerNode. Will also destroy any resources (including widgets) registered via this.own(). @@ -55631,7 +55631,7 @@ declare module dijit { * @param eventObj Optional * @param callbackArgs Optional */ - emit(type: String, eventObj: Object, callbackArgs: any[]): any; + emit(type: String, eventObj?: Object, callbackArgs?: any[]): any; /** * Auto-corrections (such as trimming) that are applied to textbox * value on blur or form submit. @@ -55807,7 +55807,7 @@ declare module dijit { * @param reference Widget, DOMNode, or id of widget or DOMNode * @param position OptionalIf reference is a widget (or id of widget), and that widget has an ".addChild" method,it will be called passing this widget instance into that method, supplying the optionalposition index passed. In this case position (if specified) should be an integer.If reference is a DOMNode (or id matching a DOMNode but not a widget),the position argument can be a numeric index or a string"first", "last", "before", or "after", same as dojo/dom-construct::place(). */ - placeAt(reference: String, position: String): any; + placeAt(reference: String, position?: String): any; /** * Place this widget somewhere in the DOM based * on standard domConstruct.place() conventions. @@ -55818,7 +55818,7 @@ declare module dijit { * @param reference Widget, DOMNode, or id of widget or DOMNode * @param position OptionalIf reference is a widget (or id of widget), and that widget has an ".addChild" method,it will be called passing this widget instance into that method, supplying the optionalposition index passed. In this case position (if specified) should be an integer.If reference is a DOMNode (or id matching a DOMNode but not a widget),the position argument can be a numeric index or a string"first", "last", "before", or "after", same as dojo/dom-construct::place(). */ - placeAt(reference: HTMLElement, position: String): any; + placeAt(reference: HTMLElement, position?: String): any; /** * Place this widget somewhere in the DOM based * on standard domConstruct.place() conventions. @@ -55829,7 +55829,7 @@ declare module dijit { * @param reference Widget, DOMNode, or id of widget or DOMNode * @param position OptionalIf reference is a widget (or id of widget), and that widget has an ".addChild" method,it will be called passing this widget instance into that method, supplying the optionalposition index passed. In this case position (if specified) should be an integer.If reference is a DOMNode (or id matching a DOMNode but not a widget),the position argument can be a numeric index or a string"first", "last", "before", or "after", same as dojo/dom-construct::place(). */ - placeAt(reference: dijit._WidgetBase, position: String): any; + placeAt(reference: dijit._WidgetBase, position?: String): any; /** * Place this widget somewhere in the DOM based * on standard domConstruct.place() conventions. @@ -55840,7 +55840,7 @@ declare module dijit { * @param reference Widget, DOMNode, or id of widget or DOMNode * @param position OptionalIf reference is a widget (or id of widget), and that widget has an ".addChild" method,it will be called passing this widget instance into that method, supplying the optionalposition index passed. In this case position (if specified) should be an integer.If reference is a DOMNode (or id matching a DOMNode but not a widget),the position argument can be a numeric index or a string"first", "last", "before", or "after", same as dojo/dom-construct::place(). */ - placeAt(reference: String, position: number): any; + placeAt(reference: String, position?: number): any; /** * Place this widget somewhere in the DOM based * on standard domConstruct.place() conventions. @@ -55851,7 +55851,7 @@ declare module dijit { * @param reference Widget, DOMNode, or id of widget or DOMNode * @param position OptionalIf reference is a widget (or id of widget), and that widget has an ".addChild" method,it will be called passing this widget instance into that method, supplying the optionalposition index passed. In this case position (if specified) should be an integer.If reference is a DOMNode (or id matching a DOMNode but not a widget),the position argument can be a numeric index or a string"first", "last", "before", or "after", same as dojo/dom-construct::place(). */ - placeAt(reference: HTMLElement, position: number): any; + placeAt(reference: HTMLElement, position?: number): any; /** * Place this widget somewhere in the DOM based * on standard domConstruct.place() conventions. @@ -55862,7 +55862,7 @@ declare module dijit { * @param reference Widget, DOMNode, or id of widget or DOMNode * @param position OptionalIf reference is a widget (or id of widget), and that widget has an ".addChild" method,it will be called passing this widget instance into that method, supplying the optionalposition index passed. In this case position (if specified) should be an integer.If reference is a DOMNode (or id matching a DOMNode but not a widget),the position argument can be a numeric index or a string"first", "last", "before", or "after", same as dojo/dom-construct::place(). */ - placeAt(reference: dijit._WidgetBase, position: number): any; + placeAt(reference: dijit._WidgetBase, position?: number): any; /** * */ @@ -56701,14 +56701,14 @@ declare module dijit { * @param name The property to get or set. If an object is passed here and nota string, its keys are used as names of attributes to be setand the value of the object as values to set in the widget. * @param value OptionalOptional. If provided, attr() operates as a setter. If omitted,the current value of the named property is returned. */ - attr(name: String, value: Object): any; + attr(name: String, value?: Object): any; /** * This method is deprecated, use get() or set() directly. * * @param name The property to get or set. If an object is passed here and nota string, its keys are used as names of attributes to be setand the value of the object as values to set in the widget. * @param value OptionalOptional. If provided, attr() operates as a setter. If omitted,the current value of the named property is returned. */ - attr(name: Object, value: Object): any; + attr(name: Object, value?: Object): any; /** * */ @@ -56856,7 +56856,7 @@ declare module dijit { * @param fcn Function reference. * @param delay OptionalDelay, defaults to 0. */ - defer(fcn: Function, delay: number): Object; + defer(fcn: Function, delay?: number): Object; /** * Destroy this widget, but not its descendants. Descendants means widgets inside of * this.containerNode. Will also destroy any resources (including widgets) registered via this.own(). @@ -56921,7 +56921,7 @@ declare module dijit { * @param eventObj Optional * @param callbackArgs Optional */ - emit(type: String, eventObj: Object, callbackArgs: any[]): any; + emit(type: String, eventObj?: Object, callbackArgs?: any[]): any; /** * Auto-corrections (such as trimming) that are applied to textbox * value on blur or form submit. @@ -57072,7 +57072,7 @@ declare module dijit { * @param reference Widget, DOMNode, or id of widget or DOMNode * @param position OptionalIf reference is a widget (or id of widget), and that widget has an ".addChild" method,it will be called passing this widget instance into that method, supplying the optionalposition index passed. In this case position (if specified) should be an integer.If reference is a DOMNode (or id matching a DOMNode but not a widget),the position argument can be a numeric index or a string"first", "last", "before", or "after", same as dojo/dom-construct::place(). */ - placeAt(reference: String, position: String): any; + placeAt(reference: String, position?: String): any; /** * Place this widget somewhere in the DOM based * on standard domConstruct.place() conventions. @@ -57083,7 +57083,7 @@ declare module dijit { * @param reference Widget, DOMNode, or id of widget or DOMNode * @param position OptionalIf reference is a widget (or id of widget), and that widget has an ".addChild" method,it will be called passing this widget instance into that method, supplying the optionalposition index passed. In this case position (if specified) should be an integer.If reference is a DOMNode (or id matching a DOMNode but not a widget),the position argument can be a numeric index or a string"first", "last", "before", or "after", same as dojo/dom-construct::place(). */ - placeAt(reference: HTMLElement, position: String): any; + placeAt(reference: HTMLElement, position?: String): any; /** * Place this widget somewhere in the DOM based * on standard domConstruct.place() conventions. @@ -57094,7 +57094,7 @@ declare module dijit { * @param reference Widget, DOMNode, or id of widget or DOMNode * @param position OptionalIf reference is a widget (or id of widget), and that widget has an ".addChild" method,it will be called passing this widget instance into that method, supplying the optionalposition index passed. In this case position (if specified) should be an integer.If reference is a DOMNode (or id matching a DOMNode but not a widget),the position argument can be a numeric index or a string"first", "last", "before", or "after", same as dojo/dom-construct::place(). */ - placeAt(reference: dijit._WidgetBase, position: String): any; + placeAt(reference: dijit._WidgetBase, position?: String): any; /** * Place this widget somewhere in the DOM based * on standard domConstruct.place() conventions. @@ -57105,7 +57105,7 @@ declare module dijit { * @param reference Widget, DOMNode, or id of widget or DOMNode * @param position OptionalIf reference is a widget (or id of widget), and that widget has an ".addChild" method,it will be called passing this widget instance into that method, supplying the optionalposition index passed. In this case position (if specified) should be an integer.If reference is a DOMNode (or id matching a DOMNode but not a widget),the position argument can be a numeric index or a string"first", "last", "before", or "after", same as dojo/dom-construct::place(). */ - placeAt(reference: String, position: number): any; + placeAt(reference: String, position?: number): any; /** * Place this widget somewhere in the DOM based * on standard domConstruct.place() conventions. @@ -57116,7 +57116,7 @@ declare module dijit { * @param reference Widget, DOMNode, or id of widget or DOMNode * @param position OptionalIf reference is a widget (or id of widget), and that widget has an ".addChild" method,it will be called passing this widget instance into that method, supplying the optionalposition index passed. In this case position (if specified) should be an integer.If reference is a DOMNode (or id matching a DOMNode but not a widget),the position argument can be a numeric index or a string"first", "last", "before", or "after", same as dojo/dom-construct::place(). */ - placeAt(reference: HTMLElement, position: number): any; + placeAt(reference: HTMLElement, position?: number): any; /** * Place this widget somewhere in the DOM based * on standard domConstruct.place() conventions. @@ -57127,7 +57127,7 @@ declare module dijit { * @param reference Widget, DOMNode, or id of widget or DOMNode * @param position OptionalIf reference is a widget (or id of widget), and that widget has an ".addChild" method,it will be called passing this widget instance into that method, supplying the optionalposition index passed. In this case position (if specified) should be an integer.If reference is a DOMNode (or id matching a DOMNode but not a widget),the position argument can be a numeric index or a string"first", "last", "before", or "after", same as dojo/dom-construct::place(). */ - placeAt(reference: dijit._WidgetBase, position: number): any; + placeAt(reference: dijit._WidgetBase, position?: number): any; /** * */ @@ -57726,14 +57726,14 @@ declare module dijit { * @param name The property to get or set. If an object is passed here and nota string, its keys are used as names of attributes to be setand the value of the object as values to set in the widget. * @param value OptionalOptional. If provided, attr() operates as a setter. If omitted,the current value of the named property is returned. */ - attr(name: String, value: Object): any; + attr(name: String, value?: Object): any; /** * This method is deprecated, use get() or set() directly. * * @param name The property to get or set. If an object is passed here and nota string, its keys are used as names of attributes to be setand the value of the object as values to set in the widget. * @param value OptionalOptional. If provided, attr() operates as a setter. If omitted,the current value of the named property is returned. */ - attr(name: Object, value: Object): any; + attr(name: Object, value?: Object): any; /** * Construct the UI for this widget, setting this.domNode. * Most widgets will mixin dijit._TemplatedMixin, which implements this method. @@ -57884,7 +57884,7 @@ declare module dijit { * @param fcn Function reference. * @param delay OptionalDelay, defaults to 0. */ - defer(fcn: Function, delay: number): Object; + defer(fcn: Function, delay?: number): Object; /** * Destroy this widget, but not its descendants. Descendants means widgets inside of * this.containerNode. Will also destroy any resources (including widgets) registered via this.own(). @@ -57947,7 +57947,7 @@ declare module dijit { * @param eventObj Optional * @param callbackArgs Optional */ - emit(type: String, eventObj: Object, callbackArgs: any[]): any; + emit(type: String, eventObj?: Object, callbackArgs?: any[]): any; /** * Deprecated: use submit() * @@ -58045,7 +58045,7 @@ declare module dijit { * @param reference Widget, DOMNode, or id of widget or DOMNode * @param position OptionalIf reference is a widget (or id of widget), and that widget has an ".addChild" method,it will be called passing this widget instance into that method, supplying the optionalposition index passed. In this case position (if specified) should be an integer.If reference is a DOMNode (or id matching a DOMNode but not a widget),the position argument can be a numeric index or a string"first", "last", "before", or "after", same as dojo/dom-construct::place(). */ - placeAt(reference: String, position: String): any; + placeAt(reference: String, position?: String): any; /** * Place this widget somewhere in the DOM based * on standard domConstruct.place() conventions. @@ -58056,7 +58056,7 @@ declare module dijit { * @param reference Widget, DOMNode, or id of widget or DOMNode * @param position OptionalIf reference is a widget (or id of widget), and that widget has an ".addChild" method,it will be called passing this widget instance into that method, supplying the optionalposition index passed. In this case position (if specified) should be an integer.If reference is a DOMNode (or id matching a DOMNode but not a widget),the position argument can be a numeric index or a string"first", "last", "before", or "after", same as dojo/dom-construct::place(). */ - placeAt(reference: HTMLElement, position: String): any; + placeAt(reference: HTMLElement, position?: String): any; /** * Place this widget somewhere in the DOM based * on standard domConstruct.place() conventions. @@ -58067,7 +58067,7 @@ declare module dijit { * @param reference Widget, DOMNode, or id of widget or DOMNode * @param position OptionalIf reference is a widget (or id of widget), and that widget has an ".addChild" method,it will be called passing this widget instance into that method, supplying the optionalposition index passed. In this case position (if specified) should be an integer.If reference is a DOMNode (or id matching a DOMNode but not a widget),the position argument can be a numeric index or a string"first", "last", "before", or "after", same as dojo/dom-construct::place(). */ - placeAt(reference: dijit._WidgetBase, position: String): any; + placeAt(reference: dijit._WidgetBase, position?: String): any; /** * Place this widget somewhere in the DOM based * on standard domConstruct.place() conventions. @@ -58078,7 +58078,7 @@ declare module dijit { * @param reference Widget, DOMNode, or id of widget or DOMNode * @param position OptionalIf reference is a widget (or id of widget), and that widget has an ".addChild" method,it will be called passing this widget instance into that method, supplying the optionalposition index passed. In this case position (if specified) should be an integer.If reference is a DOMNode (or id matching a DOMNode but not a widget),the position argument can be a numeric index or a string"first", "last", "before", or "after", same as dojo/dom-construct::place(). */ - placeAt(reference: String, position: number): any; + placeAt(reference: String, position?: number): any; /** * Place this widget somewhere in the DOM based * on standard domConstruct.place() conventions. @@ -58089,7 +58089,7 @@ declare module dijit { * @param reference Widget, DOMNode, or id of widget or DOMNode * @param position OptionalIf reference is a widget (or id of widget), and that widget has an ".addChild" method,it will be called passing this widget instance into that method, supplying the optionalposition index passed. In this case position (if specified) should be an integer.If reference is a DOMNode (or id matching a DOMNode but not a widget),the position argument can be a numeric index or a string"first", "last", "before", or "after", same as dojo/dom-construct::place(). */ - placeAt(reference: HTMLElement, position: number): any; + placeAt(reference: HTMLElement, position?: number): any; /** * Place this widget somewhere in the DOM based * on standard domConstruct.place() conventions. @@ -58100,7 +58100,7 @@ declare module dijit { * @param reference Widget, DOMNode, or id of widget or DOMNode * @param position OptionalIf reference is a widget (or id of widget), and that widget has an ".addChild" method,it will be called passing this widget instance into that method, supplying the optionalposition index passed. In this case position (if specified) should be an integer.If reference is a DOMNode (or id matching a DOMNode but not a widget),the position argument can be a numeric index or a string"first", "last", "before", or "after", same as dojo/dom-construct::place(). */ - placeAt(reference: dijit._WidgetBase, position: number): any; + placeAt(reference: dijit._WidgetBase, position?: number): any; /** * */ @@ -58817,21 +58817,21 @@ declare module dijit { * @param widget * @param insertIndex Optional */ - addChild(widget: dijit._WidgetBase, insertIndex: number): void; + addChild(widget: dijit._WidgetBase, insertIndex?: number): void; /** * This method is deprecated, use get() or set() directly. * * @param name The property to get or set. If an object is passed here and nota string, its keys are used as names of attributes to be setand the value of the object as values to set in the widget. * @param value OptionalOptional. If provided, attr() operates as a setter. If omitted,the current value of the named property is returned. */ - attr(name: String, value: Object): any; + attr(name: String, value?: Object): any; /** * This method is deprecated, use get() or set() directly. * * @param name The property to get or set. If an object is passed here and nota string, its keys are used as names of attributes to be setand the value of the object as values to set in the widget. * @param value OptionalOptional. If provided, attr() operates as a setter. If omitted,the current value of the named property is returned. */ - attr(name: Object, value: Object): any; + attr(name: Object, value?: Object): any; /** * Construct the UI for this widget, setting this.domNode. * Most widgets will mixin dijit._TemplatedMixin, which implements this method. @@ -58987,7 +58987,7 @@ declare module dijit { * @param fcn Function reference. * @param delay OptionalDelay, defaults to 0. */ - defer(fcn: Function, delay: number): Object; + defer(fcn: Function, delay?: number): Object; /** * Destroy this widget, but not its descendants. Descendants means widgets inside of * this.containerNode. Will also destroy any resources (including widgets) registered via this.own(). @@ -59045,7 +59045,7 @@ declare module dijit { * @param eventObj Optional * @param callbackArgs Optional */ - emit(type: String, eventObj: Object, callbackArgs: any[]): any; + emit(type: String, eventObj?: Object, callbackArgs?: any[]): any; /** * Put focus on this widget * @@ -59169,7 +59169,7 @@ declare module dijit { * @param reference Widget, DOMNode, or id of widget or DOMNode * @param position OptionalIf reference is a widget (or id of widget), and that widget has an ".addChild" method,it will be called passing this widget instance into that method, supplying the optionalposition index passed. In this case position (if specified) should be an integer.If reference is a DOMNode (or id matching a DOMNode but not a widget),the position argument can be a numeric index or a string"first", "last", "before", or "after", same as dojo/dom-construct::place(). */ - placeAt(reference: String, position: String): any; + placeAt(reference: String, position?: String): any; /** * Place this widget somewhere in the DOM based * on standard domConstruct.place() conventions. @@ -59180,7 +59180,7 @@ declare module dijit { * @param reference Widget, DOMNode, or id of widget or DOMNode * @param position OptionalIf reference is a widget (or id of widget), and that widget has an ".addChild" method,it will be called passing this widget instance into that method, supplying the optionalposition index passed. In this case position (if specified) should be an integer.If reference is a DOMNode (or id matching a DOMNode but not a widget),the position argument can be a numeric index or a string"first", "last", "before", or "after", same as dojo/dom-construct::place(). */ - placeAt(reference: HTMLElement, position: String): any; + placeAt(reference: HTMLElement, position?: String): any; /** * Place this widget somewhere in the DOM based * on standard domConstruct.place() conventions. @@ -59191,7 +59191,7 @@ declare module dijit { * @param reference Widget, DOMNode, or id of widget or DOMNode * @param position OptionalIf reference is a widget (or id of widget), and that widget has an ".addChild" method,it will be called passing this widget instance into that method, supplying the optionalposition index passed. In this case position (if specified) should be an integer.If reference is a DOMNode (or id matching a DOMNode but not a widget),the position argument can be a numeric index or a string"first", "last", "before", or "after", same as dojo/dom-construct::place(). */ - placeAt(reference: dijit._WidgetBase, position: String): any; + placeAt(reference: dijit._WidgetBase, position?: String): any; /** * Place this widget somewhere in the DOM based * on standard domConstruct.place() conventions. @@ -59202,7 +59202,7 @@ declare module dijit { * @param reference Widget, DOMNode, or id of widget or DOMNode * @param position OptionalIf reference is a widget (or id of widget), and that widget has an ".addChild" method,it will be called passing this widget instance into that method, supplying the optionalposition index passed. In this case position (if specified) should be an integer.If reference is a DOMNode (or id matching a DOMNode but not a widget),the position argument can be a numeric index or a string"first", "last", "before", or "after", same as dojo/dom-construct::place(). */ - placeAt(reference: String, position: number): any; + placeAt(reference: String, position?: number): any; /** * Place this widget somewhere in the DOM based * on standard domConstruct.place() conventions. @@ -59213,7 +59213,7 @@ declare module dijit { * @param reference Widget, DOMNode, or id of widget or DOMNode * @param position OptionalIf reference is a widget (or id of widget), and that widget has an ".addChild" method,it will be called passing this widget instance into that method, supplying the optionalposition index passed. In this case position (if specified) should be an integer.If reference is a DOMNode (or id matching a DOMNode but not a widget),the position argument can be a numeric index or a string"first", "last", "before", or "after", same as dojo/dom-construct::place(). */ - placeAt(reference: HTMLElement, position: number): any; + placeAt(reference: HTMLElement, position?: number): any; /** * Place this widget somewhere in the DOM based * on standard domConstruct.place() conventions. @@ -59224,7 +59224,7 @@ declare module dijit { * @param reference Widget, DOMNode, or id of widget or DOMNode * @param position OptionalIf reference is a widget (or id of widget), and that widget has an ".addChild" method,it will be called passing this widget instance into that method, supplying the optionalposition index passed. In this case position (if specified) should be an integer.If reference is a DOMNode (or id matching a DOMNode but not a widget),the position argument can be a numeric index or a string"first", "last", "before", or "after", same as dojo/dom-construct::place(). */ - placeAt(reference: dijit._WidgetBase, position: number): any; + placeAt(reference: dijit._WidgetBase, position?: number): any; /** * */ @@ -60064,14 +60064,14 @@ declare module dijit { * @param name The property to get or set. If an object is passed here and nota string, its keys are used as names of attributes to be setand the value of the object as values to set in the widget. * @param value OptionalOptional. If provided, attr() operates as a setter. If omitted,the current value of the named property is returned. */ - attr(name: String, value: Object): any; + attr(name: String, value?: Object): any; /** * This method is deprecated, use get() or set() directly. * * @param name The property to get or set. If an object is passed here and nota string, its keys are used as names of attributes to be setand the value of the object as values to set in the widget. * @param value OptionalOptional. If provided, attr() operates as a setter. If omitted,the current value of the named property is returned. */ - attr(name: Object, value: Object): any; + attr(name: Object, value?: Object): any; /** * */ @@ -60224,7 +60224,7 @@ declare module dijit { * @param fcn Function reference. * @param delay OptionalDelay, defaults to 0. */ - defer(fcn: Function, delay: number): Object; + defer(fcn: Function, delay?: number): Object; /** * Destroy this widget, but not its descendants. Descendants means widgets inside of * this.containerNode. Will also destroy any resources (including widgets) registered via this.own(). @@ -60289,7 +60289,7 @@ declare module dijit { * @param eventObj Optional * @param callbackArgs Optional */ - emit(type: String, eventObj: Object, callbackArgs: any[]): any; + emit(type: String, eventObj?: Object, callbackArgs?: any[]): any; /** * Auto-corrections (such as trimming) that are applied to textbox * value on blur or form submit. @@ -60473,7 +60473,7 @@ declare module dijit { * @param reference Widget, DOMNode, or id of widget or DOMNode * @param position OptionalIf reference is a widget (or id of widget), and that widget has an ".addChild" method,it will be called passing this widget instance into that method, supplying the optionalposition index passed. In this case position (if specified) should be an integer.If reference is a DOMNode (or id matching a DOMNode but not a widget),the position argument can be a numeric index or a string"first", "last", "before", or "after", same as dojo/dom-construct::place(). */ - placeAt(reference: String, position: String): any; + placeAt(reference: String, position?: String): any; /** * Place this widget somewhere in the DOM based * on standard domConstruct.place() conventions. @@ -60484,7 +60484,7 @@ declare module dijit { * @param reference Widget, DOMNode, or id of widget or DOMNode * @param position OptionalIf reference is a widget (or id of widget), and that widget has an ".addChild" method,it will be called passing this widget instance into that method, supplying the optionalposition index passed. In this case position (if specified) should be an integer.If reference is a DOMNode (or id matching a DOMNode but not a widget),the position argument can be a numeric index or a string"first", "last", "before", or "after", same as dojo/dom-construct::place(). */ - placeAt(reference: HTMLElement, position: String): any; + placeAt(reference: HTMLElement, position?: String): any; /** * Place this widget somewhere in the DOM based * on standard domConstruct.place() conventions. @@ -60495,7 +60495,7 @@ declare module dijit { * @param reference Widget, DOMNode, or id of widget or DOMNode * @param position OptionalIf reference is a widget (or id of widget), and that widget has an ".addChild" method,it will be called passing this widget instance into that method, supplying the optionalposition index passed. In this case position (if specified) should be an integer.If reference is a DOMNode (or id matching a DOMNode but not a widget),the position argument can be a numeric index or a string"first", "last", "before", or "after", same as dojo/dom-construct::place(). */ - placeAt(reference: dijit._WidgetBase, position: String): any; + placeAt(reference: dijit._WidgetBase, position?: String): any; /** * Place this widget somewhere in the DOM based * on standard domConstruct.place() conventions. @@ -60506,7 +60506,7 @@ declare module dijit { * @param reference Widget, DOMNode, or id of widget or DOMNode * @param position OptionalIf reference is a widget (or id of widget), and that widget has an ".addChild" method,it will be called passing this widget instance into that method, supplying the optionalposition index passed. In this case position (if specified) should be an integer.If reference is a DOMNode (or id matching a DOMNode but not a widget),the position argument can be a numeric index or a string"first", "last", "before", or "after", same as dojo/dom-construct::place(). */ - placeAt(reference: String, position: number): any; + placeAt(reference: String, position?: number): any; /** * Place this widget somewhere in the DOM based * on standard domConstruct.place() conventions. @@ -60517,7 +60517,7 @@ declare module dijit { * @param reference Widget, DOMNode, or id of widget or DOMNode * @param position OptionalIf reference is a widget (or id of widget), and that widget has an ".addChild" method,it will be called passing this widget instance into that method, supplying the optionalposition index passed. In this case position (if specified) should be an integer.If reference is a DOMNode (or id matching a DOMNode but not a widget),the position argument can be a numeric index or a string"first", "last", "before", or "after", same as dojo/dom-construct::place(). */ - placeAt(reference: HTMLElement, position: number): any; + placeAt(reference: HTMLElement, position?: number): any; /** * Place this widget somewhere in the DOM based * on standard domConstruct.place() conventions. @@ -60528,7 +60528,7 @@ declare module dijit { * @param reference Widget, DOMNode, or id of widget or DOMNode * @param position OptionalIf reference is a widget (or id of widget), and that widget has an ".addChild" method,it will be called passing this widget instance into that method, supplying the optionalposition index passed. In this case position (if specified) should be an integer.If reference is a DOMNode (or id matching a DOMNode but not a widget),the position argument can be a numeric index or a string"first", "last", "before", or "after", same as dojo/dom-construct::place(). */ - placeAt(reference: dijit._WidgetBase, position: number): any; + placeAt(reference: dijit._WidgetBase, position?: number): any; /** * @@ -61073,14 +61073,14 @@ declare module dijit { * @param name The property to get or set. If an object is passed here and nota string, its keys are used as names of attributes to be setand the value of the object as values to set in the widget. * @param value OptionalOptional. If provided, attr() operates as a setter. If omitted,the current value of the named property is returned. */ - attr(name: String, value: Object): any; + attr(name: String, value?: Object): any; /** * This method is deprecated, use get() or set() directly. * * @param name The property to get or set. If an object is passed here and nota string, its keys are used as names of attributes to be setand the value of the object as values to set in the widget. * @param value OptionalOptional. If provided, attr() operates as a setter. If omitted,the current value of the named property is returned. */ - attr(name: Object, value: Object): any; + attr(name: Object, value?: Object): any; /** * */ @@ -61221,7 +61221,7 @@ declare module dijit { * @param fcn Function reference. * @param delay OptionalDelay, defaults to 0. */ - defer(fcn: Function, delay: number): Object; + defer(fcn: Function, delay?: number): Object; /** * Destroy this widget, but not its descendants. Descendants means widgets inside of * this.containerNode. Will also destroy any resources (including widgets) registered via this.own(). @@ -61279,7 +61279,7 @@ declare module dijit { * @param eventObj Optional * @param callbackArgs Optional */ - emit(type: String, eventObj: Object, callbackArgs: any[]): any; + emit(type: String, eventObj?: Object, callbackArgs?: any[]): any; /** * Get a property from a widget. * Get a named property from a widget. The property may @@ -61361,7 +61361,7 @@ declare module dijit { * @param reference Widget, DOMNode, or id of widget or DOMNode * @param position OptionalIf reference is a widget (or id of widget), and that widget has an ".addChild" method,it will be called passing this widget instance into that method, supplying the optionalposition index passed. In this case position (if specified) should be an integer.If reference is a DOMNode (or id matching a DOMNode but not a widget),the position argument can be a numeric index or a string"first", "last", "before", or "after", same as dojo/dom-construct::place(). */ - placeAt(reference: String, position: String): any; + placeAt(reference: String, position?: String): any; /** * Place this widget somewhere in the DOM based * on standard domConstruct.place() conventions. @@ -61372,7 +61372,7 @@ declare module dijit { * @param reference Widget, DOMNode, or id of widget or DOMNode * @param position OptionalIf reference is a widget (or id of widget), and that widget has an ".addChild" method,it will be called passing this widget instance into that method, supplying the optionalposition index passed. In this case position (if specified) should be an integer.If reference is a DOMNode (or id matching a DOMNode but not a widget),the position argument can be a numeric index or a string"first", "last", "before", or "after", same as dojo/dom-construct::place(). */ - placeAt(reference: HTMLElement, position: String): any; + placeAt(reference: HTMLElement, position?: String): any; /** * Place this widget somewhere in the DOM based * on standard domConstruct.place() conventions. @@ -61383,7 +61383,7 @@ declare module dijit { * @param reference Widget, DOMNode, or id of widget or DOMNode * @param position OptionalIf reference is a widget (or id of widget), and that widget has an ".addChild" method,it will be called passing this widget instance into that method, supplying the optionalposition index passed. In this case position (if specified) should be an integer.If reference is a DOMNode (or id matching a DOMNode but not a widget),the position argument can be a numeric index or a string"first", "last", "before", or "after", same as dojo/dom-construct::place(). */ - placeAt(reference: dijit._WidgetBase, position: String): any; + placeAt(reference: dijit._WidgetBase, position?: String): any; /** * Place this widget somewhere in the DOM based * on standard domConstruct.place() conventions. @@ -61394,7 +61394,7 @@ declare module dijit { * @param reference Widget, DOMNode, or id of widget or DOMNode * @param position OptionalIf reference is a widget (or id of widget), and that widget has an ".addChild" method,it will be called passing this widget instance into that method, supplying the optionalposition index passed. In this case position (if specified) should be an integer.If reference is a DOMNode (or id matching a DOMNode but not a widget),the position argument can be a numeric index or a string"first", "last", "before", or "after", same as dojo/dom-construct::place(). */ - placeAt(reference: String, position: number): any; + placeAt(reference: String, position?: number): any; /** * Place this widget somewhere in the DOM based * on standard domConstruct.place() conventions. @@ -61405,7 +61405,7 @@ declare module dijit { * @param reference Widget, DOMNode, or id of widget or DOMNode * @param position OptionalIf reference is a widget (or id of widget), and that widget has an ".addChild" method,it will be called passing this widget instance into that method, supplying the optionalposition index passed. In this case position (if specified) should be an integer.If reference is a DOMNode (or id matching a DOMNode but not a widget),the position argument can be a numeric index or a string"first", "last", "before", or "after", same as dojo/dom-construct::place(). */ - placeAt(reference: HTMLElement, position: number): any; + placeAt(reference: HTMLElement, position?: number): any; /** * Place this widget somewhere in the DOM based * on standard domConstruct.place() conventions. @@ -61416,7 +61416,7 @@ declare module dijit { * @param reference Widget, DOMNode, or id of widget or DOMNode * @param position OptionalIf reference is a widget (or id of widget), and that widget has an ".addChild" method,it will be called passing this widget instance into that method, supplying the optionalposition index passed. In this case position (if specified) should be an integer.If reference is a DOMNode (or id matching a DOMNode but not a widget),the position argument can be a numeric index or a string"first", "last", "before", or "after", same as dojo/dom-construct::place(). */ - placeAt(reference: dijit._WidgetBase, position: number): any; + placeAt(reference: dijit._WidgetBase, position?: number): any; /** * */ @@ -62380,14 +62380,14 @@ declare module dijit { * @param name The property to get or set. If an object is passed here and nota string, its keys are used as names of attributes to be setand the value of the object as values to set in the widget. * @param value OptionalOptional. If provided, attr() operates as a setter. If omitted,the current value of the named property is returned. */ - attr(name: String, value: Object): any; + attr(name: String, value?: Object): any; /** * This method is deprecated, use get() or set() directly. * * @param name The property to get or set. If an object is passed here and nota string, its keys are used as names of attributes to be setand the value of the object as values to set in the widget. * @param value OptionalOptional. If provided, attr() operates as a setter. If omitted,the current value of the named property is returned. */ - attr(name: Object, value: Object): any; + attr(name: Object, value?: Object): any; /** * */ @@ -62541,7 +62541,7 @@ declare module dijit { * @param fcn Function reference. * @param delay OptionalDelay, defaults to 0. */ - defer(fcn: Function, delay: number): Object; + defer(fcn: Function, delay?: number): Object; /** * Destroy this widget, but not its descendants. Descendants means widgets inside of * this.containerNode. Will also destroy any resources (including widgets) registered via this.own(). @@ -62621,7 +62621,7 @@ declare module dijit { * @param eventObj Optional * @param callbackArgs Optional */ - emit(type: String, eventObj: Object, callbackArgs: any[]): any; + emit(type: String, eventObj?: Object, callbackArgs?: any[]): any; /** * Auto-corrections (such as trimming) that are applied to textbox * value on blur or form submit. @@ -62794,7 +62794,7 @@ declare module dijit { * @param reference Widget, DOMNode, or id of widget or DOMNode * @param position OptionalIf reference is a widget (or id of widget), and that widget has an ".addChild" method,it will be called passing this widget instance into that method, supplying the optionalposition index passed. In this case position (if specified) should be an integer.If reference is a DOMNode (or id matching a DOMNode but not a widget),the position argument can be a numeric index or a string"first", "last", "before", or "after", same as dojo/dom-construct::place(). */ - placeAt(reference: String, position: String): any; + placeAt(reference: String, position?: String): any; /** * Place this widget somewhere in the DOM based * on standard domConstruct.place() conventions. @@ -62805,7 +62805,7 @@ declare module dijit { * @param reference Widget, DOMNode, or id of widget or DOMNode * @param position OptionalIf reference is a widget (or id of widget), and that widget has an ".addChild" method,it will be called passing this widget instance into that method, supplying the optionalposition index passed. In this case position (if specified) should be an integer.If reference is a DOMNode (or id matching a DOMNode but not a widget),the position argument can be a numeric index or a string"first", "last", "before", or "after", same as dojo/dom-construct::place(). */ - placeAt(reference: HTMLElement, position: String): any; + placeAt(reference: HTMLElement, position?: String): any; /** * Place this widget somewhere in the DOM based * on standard domConstruct.place() conventions. @@ -62816,7 +62816,7 @@ declare module dijit { * @param reference Widget, DOMNode, or id of widget or DOMNode * @param position OptionalIf reference is a widget (or id of widget), and that widget has an ".addChild" method,it will be called passing this widget instance into that method, supplying the optionalposition index passed. In this case position (if specified) should be an integer.If reference is a DOMNode (or id matching a DOMNode but not a widget),the position argument can be a numeric index or a string"first", "last", "before", or "after", same as dojo/dom-construct::place(). */ - placeAt(reference: dijit._WidgetBase, position: String): any; + placeAt(reference: dijit._WidgetBase, position?: String): any; /** * Place this widget somewhere in the DOM based * on standard domConstruct.place() conventions. @@ -62827,7 +62827,7 @@ declare module dijit { * @param reference Widget, DOMNode, or id of widget or DOMNode * @param position OptionalIf reference is a widget (or id of widget), and that widget has an ".addChild" method,it will be called passing this widget instance into that method, supplying the optionalposition index passed. In this case position (if specified) should be an integer.If reference is a DOMNode (or id matching a DOMNode but not a widget),the position argument can be a numeric index or a string"first", "last", "before", or "after", same as dojo/dom-construct::place(). */ - placeAt(reference: String, position: number): any; + placeAt(reference: String, position?: number): any; /** * Place this widget somewhere in the DOM based * on standard domConstruct.place() conventions. @@ -62838,7 +62838,7 @@ declare module dijit { * @param reference Widget, DOMNode, or id of widget or DOMNode * @param position OptionalIf reference is a widget (or id of widget), and that widget has an ".addChild" method,it will be called passing this widget instance into that method, supplying the optionalposition index passed. In this case position (if specified) should be an integer.If reference is a DOMNode (or id matching a DOMNode but not a widget),the position argument can be a numeric index or a string"first", "last", "before", or "after", same as dojo/dom-construct::place(). */ - placeAt(reference: HTMLElement, position: number): any; + placeAt(reference: HTMLElement, position?: number): any; /** * Place this widget somewhere in the DOM based * on standard domConstruct.place() conventions. @@ -62849,7 +62849,7 @@ declare module dijit { * @param reference Widget, DOMNode, or id of widget or DOMNode * @param position OptionalIf reference is a widget (or id of widget), and that widget has an ".addChild" method,it will be called passing this widget instance into that method, supplying the optionalposition index passed. In this case position (if specified) should be an integer.If reference is a DOMNode (or id matching a DOMNode but not a widget),the position argument can be a numeric index or a string"first", "last", "before", or "after", same as dojo/dom-construct::place(). */ - placeAt(reference: dijit._WidgetBase, position: number): any; + placeAt(reference: dijit._WidgetBase, position?: number): any; /** * */ @@ -63443,14 +63443,14 @@ declare module dijit { * @param name The property to get or set. If an object is passed here and nota string, its keys are used as names of attributes to be setand the value of the object as values to set in the widget. * @param value OptionalOptional. If provided, attr() operates as a setter. If omitted,the current value of the named property is returned. */ - attr(name: String, value: Object): any; + attr(name: String, value?: Object): any; /** * This method is deprecated, use get() or set() directly. * * @param name The property to get or set. If an object is passed here and nota string, its keys are used as names of attributes to be setand the value of the object as values to set in the widget. * @param value OptionalOptional. If provided, attr() operates as a setter. If omitted,the current value of the named property is returned. */ - attr(name: Object, value: Object): any; + attr(name: Object, value?: Object): any; /** * */ @@ -63591,7 +63591,7 @@ declare module dijit { * @param fcn Function reference. * @param delay OptionalDelay, defaults to 0. */ - defer(fcn: Function, delay: number): Object; + defer(fcn: Function, delay?: number): Object; /** * Destroy this widget, but not its descendants. Descendants means widgets inside of * this.containerNode. Will also destroy any resources (including widgets) registered via this.own(). @@ -63649,7 +63649,7 @@ declare module dijit { * @param eventObj Optional * @param callbackArgs Optional */ - emit(type: String, eventObj: Object, callbackArgs: any[]): any; + emit(type: String, eventObj?: Object, callbackArgs?: any[]): any; /** * Get a property from a widget. * Get a named property from a widget. The property may @@ -63737,7 +63737,7 @@ declare module dijit { * @param reference Widget, DOMNode, or id of widget or DOMNode * @param position OptionalIf reference is a widget (or id of widget), and that widget has an ".addChild" method,it will be called passing this widget instance into that method, supplying the optionalposition index passed. In this case position (if specified) should be an integer.If reference is a DOMNode (or id matching a DOMNode but not a widget),the position argument can be a numeric index or a string"first", "last", "before", or "after", same as dojo/dom-construct::place(). */ - placeAt(reference: String, position: String): any; + placeAt(reference: String, position?: String): any; /** * Place this widget somewhere in the DOM based * on standard domConstruct.place() conventions. @@ -63748,7 +63748,7 @@ declare module dijit { * @param reference Widget, DOMNode, or id of widget or DOMNode * @param position OptionalIf reference is a widget (or id of widget), and that widget has an ".addChild" method,it will be called passing this widget instance into that method, supplying the optionalposition index passed. In this case position (if specified) should be an integer.If reference is a DOMNode (or id matching a DOMNode but not a widget),the position argument can be a numeric index or a string"first", "last", "before", or "after", same as dojo/dom-construct::place(). */ - placeAt(reference: HTMLElement, position: String): any; + placeAt(reference: HTMLElement, position?: String): any; /** * Place this widget somewhere in the DOM based * on standard domConstruct.place() conventions. @@ -63759,7 +63759,7 @@ declare module dijit { * @param reference Widget, DOMNode, or id of widget or DOMNode * @param position OptionalIf reference is a widget (or id of widget), and that widget has an ".addChild" method,it will be called passing this widget instance into that method, supplying the optionalposition index passed. In this case position (if specified) should be an integer.If reference is a DOMNode (or id matching a DOMNode but not a widget),the position argument can be a numeric index or a string"first", "last", "before", or "after", same as dojo/dom-construct::place(). */ - placeAt(reference: dijit._WidgetBase, position: String): any; + placeAt(reference: dijit._WidgetBase, position?: String): any; /** * Place this widget somewhere in the DOM based * on standard domConstruct.place() conventions. @@ -63770,7 +63770,7 @@ declare module dijit { * @param reference Widget, DOMNode, or id of widget or DOMNode * @param position OptionalIf reference is a widget (or id of widget), and that widget has an ".addChild" method,it will be called passing this widget instance into that method, supplying the optionalposition index passed. In this case position (if specified) should be an integer.If reference is a DOMNode (or id matching a DOMNode but not a widget),the position argument can be a numeric index or a string"first", "last", "before", or "after", same as dojo/dom-construct::place(). */ - placeAt(reference: String, position: number): any; + placeAt(reference: String, position?: number): any; /** * Place this widget somewhere in the DOM based * on standard domConstruct.place() conventions. @@ -63781,7 +63781,7 @@ declare module dijit { * @param reference Widget, DOMNode, or id of widget or DOMNode * @param position OptionalIf reference is a widget (or id of widget), and that widget has an ".addChild" method,it will be called passing this widget instance into that method, supplying the optionalposition index passed. In this case position (if specified) should be an integer.If reference is a DOMNode (or id matching a DOMNode but not a widget),the position argument can be a numeric index or a string"first", "last", "before", or "after", same as dojo/dom-construct::place(). */ - placeAt(reference: HTMLElement, position: number): any; + placeAt(reference: HTMLElement, position?: number): any; /** * Place this widget somewhere in the DOM based * on standard domConstruct.place() conventions. @@ -63792,7 +63792,7 @@ declare module dijit { * @param reference Widget, DOMNode, or id of widget or DOMNode * @param position OptionalIf reference is a widget (or id of widget), and that widget has an ".addChild" method,it will be called passing this widget instance into that method, supplying the optionalposition index passed. In this case position (if specified) should be an integer.If reference is a DOMNode (or id matching a DOMNode but not a widget),the position argument can be a numeric index or a string"first", "last", "before", or "after", same as dojo/dom-construct::place(). */ - placeAt(reference: dijit._WidgetBase, position: number): any; + placeAt(reference: dijit._WidgetBase, position?: number): any; /** * */ @@ -64536,14 +64536,14 @@ declare module dijit { * @param name The property to get or set. If an object is passed here and nota string, its keys are used as names of attributes to be setand the value of the object as values to set in the widget. * @param value OptionalOptional. If provided, attr() operates as a setter. If omitted,the current value of the named property is returned. */ - attr(name: String, value: Object): any; + attr(name: String, value?: Object): any; /** * This method is deprecated, use get() or set() directly. * * @param name The property to get or set. If an object is passed here and nota string, its keys are used as names of attributes to be setand the value of the object as values to set in the widget. * @param value OptionalOptional. If provided, attr() operates as a setter. If omitted,the current value of the named property is returned. */ - attr(name: Object, value: Object): any; + attr(name: Object, value?: Object): any; /** * */ @@ -64691,7 +64691,7 @@ declare module dijit { * @param fcn Function reference. * @param delay OptionalDelay, defaults to 0. */ - defer(fcn: Function, delay: number): Object; + defer(fcn: Function, delay?: number): Object; /** * Destroy this widget, but not its descendants. Descendants means widgets inside of * this.containerNode. Will also destroy any resources (including widgets) registered via this.own(). @@ -64756,7 +64756,7 @@ declare module dijit { * @param eventObj Optional * @param callbackArgs Optional */ - emit(type: String, eventObj: Object, callbackArgs: any[]): any; + emit(type: String, eventObj?: Object, callbackArgs?: any[]): any; /** * Auto-corrections (such as trimming) that are applied to textbox * value on blur or form submit. @@ -64904,7 +64904,7 @@ declare module dijit { * @param reference Widget, DOMNode, or id of widget or DOMNode * @param position OptionalIf reference is a widget (or id of widget), and that widget has an ".addChild" method,it will be called passing this widget instance into that method, supplying the optionalposition index passed. In this case position (if specified) should be an integer.If reference is a DOMNode (or id matching a DOMNode but not a widget),the position argument can be a numeric index or a string"first", "last", "before", or "after", same as dojo/dom-construct::place(). */ - placeAt(reference: String, position: String): any; + placeAt(reference: String, position?: String): any; /** * Place this widget somewhere in the DOM based * on standard domConstruct.place() conventions. @@ -64915,7 +64915,7 @@ declare module dijit { * @param reference Widget, DOMNode, or id of widget or DOMNode * @param position OptionalIf reference is a widget (or id of widget), and that widget has an ".addChild" method,it will be called passing this widget instance into that method, supplying the optionalposition index passed. In this case position (if specified) should be an integer.If reference is a DOMNode (or id matching a DOMNode but not a widget),the position argument can be a numeric index or a string"first", "last", "before", or "after", same as dojo/dom-construct::place(). */ - placeAt(reference: HTMLElement, position: String): any; + placeAt(reference: HTMLElement, position?: String): any; /** * Place this widget somewhere in the DOM based * on standard domConstruct.place() conventions. @@ -64926,7 +64926,7 @@ declare module dijit { * @param reference Widget, DOMNode, or id of widget or DOMNode * @param position OptionalIf reference is a widget (or id of widget), and that widget has an ".addChild" method,it will be called passing this widget instance into that method, supplying the optionalposition index passed. In this case position (if specified) should be an integer.If reference is a DOMNode (or id matching a DOMNode but not a widget),the position argument can be a numeric index or a string"first", "last", "before", or "after", same as dojo/dom-construct::place(). */ - placeAt(reference: dijit._WidgetBase, position: String): any; + placeAt(reference: dijit._WidgetBase, position?: String): any; /** * Place this widget somewhere in the DOM based * on standard domConstruct.place() conventions. @@ -64937,7 +64937,7 @@ declare module dijit { * @param reference Widget, DOMNode, or id of widget or DOMNode * @param position OptionalIf reference is a widget (or id of widget), and that widget has an ".addChild" method,it will be called passing this widget instance into that method, supplying the optionalposition index passed. In this case position (if specified) should be an integer.If reference is a DOMNode (or id matching a DOMNode but not a widget),the position argument can be a numeric index or a string"first", "last", "before", or "after", same as dojo/dom-construct::place(). */ - placeAt(reference: String, position: number): any; + placeAt(reference: String, position?: number): any; /** * Place this widget somewhere in the DOM based * on standard domConstruct.place() conventions. @@ -64948,7 +64948,7 @@ declare module dijit { * @param reference Widget, DOMNode, or id of widget or DOMNode * @param position OptionalIf reference is a widget (or id of widget), and that widget has an ".addChild" method,it will be called passing this widget instance into that method, supplying the optionalposition index passed. In this case position (if specified) should be an integer.If reference is a DOMNode (or id matching a DOMNode but not a widget),the position argument can be a numeric index or a string"first", "last", "before", or "after", same as dojo/dom-construct::place(). */ - placeAt(reference: HTMLElement, position: number): any; + placeAt(reference: HTMLElement, position?: number): any; /** * Place this widget somewhere in the DOM based * on standard domConstruct.place() conventions. @@ -64959,7 +64959,7 @@ declare module dijit { * @param reference Widget, DOMNode, or id of widget or DOMNode * @param position OptionalIf reference is a widget (or id of widget), and that widget has an ".addChild" method,it will be called passing this widget instance into that method, supplying the optionalposition index passed. In this case position (if specified) should be an integer.If reference is a DOMNode (or id matching a DOMNode but not a widget),the position argument can be a numeric index or a string"first", "last", "before", or "after", same as dojo/dom-construct::place(). */ - placeAt(reference: dijit._WidgetBase, position: number): any; + placeAt(reference: dijit._WidgetBase, position?: number): any; /** * */ @@ -65604,14 +65604,14 @@ declare module dijit { * @param name The property to get or set. If an object is passed here and nota string, its keys are used as names of attributes to be setand the value of the object as values to set in the widget. * @param value OptionalOptional. If provided, attr() operates as a setter. If omitted,the current value of the named property is returned. */ - attr(name: String, value: Object): any; + attr(name: String, value?: Object): any; /** * This method is deprecated, use get() or set() directly. * * @param name The property to get or set. If an object is passed here and nota string, its keys are used as names of attributes to be setand the value of the object as values to set in the widget. * @param value OptionalOptional. If provided, attr() operates as a setter. If omitted,the current value of the named property is returned. */ - attr(name: Object, value: Object): any; + attr(name: Object, value?: Object): any; /** * Construct the UI for this widget, setting this.domNode. * Most widgets will mixin dijit._TemplatedMixin, which implements this method. @@ -65761,7 +65761,7 @@ declare module dijit { * @param fcn Function reference. * @param delay OptionalDelay, defaults to 0. */ - defer(fcn: Function, delay: number): Object; + defer(fcn: Function, delay?: number): Object; /** * Destroy this widget, but not its descendants. Descendants means widgets inside of * this.containerNode. Will also destroy any resources (including widgets) registered via this.own(). @@ -65819,7 +65819,7 @@ declare module dijit { * @param eventObj Optional * @param callbackArgs Optional */ - emit(type: String, eventObj: Object, callbackArgs: any[]): any; + emit(type: String, eventObj?: Object, callbackArgs?: any[]): any; /** * Put focus on this widget * @@ -65922,7 +65922,7 @@ declare module dijit { * @param reference Widget, DOMNode, or id of widget or DOMNode * @param position OptionalIf reference is a widget (or id of widget), and that widget has an ".addChild" method,it will be called passing this widget instance into that method, supplying the optionalposition index passed. In this case position (if specified) should be an integer.If reference is a DOMNode (or id matching a DOMNode but not a widget),the position argument can be a numeric index or a string"first", "last", "before", or "after", same as dojo/dom-construct::place(). */ - placeAt(reference: String, position: String): any; + placeAt(reference: String, position?: String): any; /** * Place this widget somewhere in the DOM based * on standard domConstruct.place() conventions. @@ -65933,7 +65933,7 @@ declare module dijit { * @param reference Widget, DOMNode, or id of widget or DOMNode * @param position OptionalIf reference is a widget (or id of widget), and that widget has an ".addChild" method,it will be called passing this widget instance into that method, supplying the optionalposition index passed. In this case position (if specified) should be an integer.If reference is a DOMNode (or id matching a DOMNode but not a widget),the position argument can be a numeric index or a string"first", "last", "before", or "after", same as dojo/dom-construct::place(). */ - placeAt(reference: HTMLElement, position: String): any; + placeAt(reference: HTMLElement, position?: String): any; /** * Place this widget somewhere in the DOM based * on standard domConstruct.place() conventions. @@ -65944,7 +65944,7 @@ declare module dijit { * @param reference Widget, DOMNode, or id of widget or DOMNode * @param position OptionalIf reference is a widget (or id of widget), and that widget has an ".addChild" method,it will be called passing this widget instance into that method, supplying the optionalposition index passed. In this case position (if specified) should be an integer.If reference is a DOMNode (or id matching a DOMNode but not a widget),the position argument can be a numeric index or a string"first", "last", "before", or "after", same as dojo/dom-construct::place(). */ - placeAt(reference: dijit._WidgetBase, position: String): any; + placeAt(reference: dijit._WidgetBase, position?: String): any; /** * Place this widget somewhere in the DOM based * on standard domConstruct.place() conventions. @@ -65955,7 +65955,7 @@ declare module dijit { * @param reference Widget, DOMNode, or id of widget or DOMNode * @param position OptionalIf reference is a widget (or id of widget), and that widget has an ".addChild" method,it will be called passing this widget instance into that method, supplying the optionalposition index passed. In this case position (if specified) should be an integer.If reference is a DOMNode (or id matching a DOMNode but not a widget),the position argument can be a numeric index or a string"first", "last", "before", or "after", same as dojo/dom-construct::place(). */ - placeAt(reference: String, position: number): any; + placeAt(reference: String, position?: number): any; /** * Place this widget somewhere in the DOM based * on standard domConstruct.place() conventions. @@ -65966,7 +65966,7 @@ declare module dijit { * @param reference Widget, DOMNode, or id of widget or DOMNode * @param position OptionalIf reference is a widget (or id of widget), and that widget has an ".addChild" method,it will be called passing this widget instance into that method, supplying the optionalposition index passed. In this case position (if specified) should be an integer.If reference is a DOMNode (or id matching a DOMNode but not a widget),the position argument can be a numeric index or a string"first", "last", "before", or "after", same as dojo/dom-construct::place(). */ - placeAt(reference: HTMLElement, position: number): any; + placeAt(reference: HTMLElement, position?: number): any; /** * Place this widget somewhere in the DOM based * on standard domConstruct.place() conventions. @@ -65977,7 +65977,7 @@ declare module dijit { * @param reference Widget, DOMNode, or id of widget or DOMNode * @param position OptionalIf reference is a widget (or id of widget), and that widget has an ".addChild" method,it will be called passing this widget instance into that method, supplying the optionalposition index passed. In this case position (if specified) should be an integer.If reference is a DOMNode (or id matching a DOMNode but not a widget),the position argument can be a numeric index or a string"first", "last", "before", or "after", same as dojo/dom-construct::place(). */ - placeAt(reference: dijit._WidgetBase, position: number): any; + placeAt(reference: dijit._WidgetBase, position?: number): any; /** * */ @@ -66636,21 +66636,21 @@ declare module dijit { * @param widget * @param insertIndex Optional */ - addChild(widget: dijit._WidgetBase, insertIndex: number): void; + addChild(widget: dijit._WidgetBase, insertIndex?: number): void; /** * This method is deprecated, use get() or set() directly. * * @param name The property to get or set. If an object is passed here and nota string, its keys are used as names of attributes to be setand the value of the object as values to set in the widget. * @param value OptionalOptional. If provided, attr() operates as a setter. If omitted,the current value of the named property is returned. */ - attr(name: String, value: Object): any; + attr(name: String, value?: Object): any; /** * This method is deprecated, use get() or set() directly. * * @param name The property to get or set. If an object is passed here and nota string, its keys are used as names of attributes to be setand the value of the object as values to set in the widget. * @param value OptionalOptional. If provided, attr() operates as a setter. If omitted,the current value of the named property is returned. */ - attr(name: Object, value: Object): any; + attr(name: Object, value?: Object): any; /** * */ @@ -66798,7 +66798,7 @@ declare module dijit { * @param fcn Function reference. * @param delay OptionalDelay, defaults to 0. */ - defer(fcn: Function, delay: number): Object; + defer(fcn: Function, delay?: number): Object; /** * */ @@ -66846,7 +66846,7 @@ declare module dijit { * @param eventObj Optional * @param callbackArgs Optional */ - emit(type: String, eventObj: Object, callbackArgs: any[]): any; + emit(type: String, eventObj?: Object, callbackArgs?: any[]): any; /** * Put focus on this widget * @@ -66949,7 +66949,7 @@ declare module dijit { * @param reference Widget, DOMNode, or id of widget or DOMNode * @param position OptionalIf reference is a widget (or id of widget), and that widget has an ".addChild" method,it will be called passing this widget instance into that method, supplying the optionalposition index passed. In this case position (if specified) should be an integer.If reference is a DOMNode (or id matching a DOMNode but not a widget),the position argument can be a numeric index or a string"first", "last", "before", or "after", same as dojo/dom-construct::place(). */ - placeAt(reference: String, position: String): any; + placeAt(reference: String, position?: String): any; /** * Place this widget somewhere in the DOM based * on standard domConstruct.place() conventions. @@ -66960,7 +66960,7 @@ declare module dijit { * @param reference Widget, DOMNode, or id of widget or DOMNode * @param position OptionalIf reference is a widget (or id of widget), and that widget has an ".addChild" method,it will be called passing this widget instance into that method, supplying the optionalposition index passed. In this case position (if specified) should be an integer.If reference is a DOMNode (or id matching a DOMNode but not a widget),the position argument can be a numeric index or a string"first", "last", "before", or "after", same as dojo/dom-construct::place(). */ - placeAt(reference: HTMLElement, position: String): any; + placeAt(reference: HTMLElement, position?: String): any; /** * Place this widget somewhere in the DOM based * on standard domConstruct.place() conventions. @@ -66971,7 +66971,7 @@ declare module dijit { * @param reference Widget, DOMNode, or id of widget or DOMNode * @param position OptionalIf reference is a widget (or id of widget), and that widget has an ".addChild" method,it will be called passing this widget instance into that method, supplying the optionalposition index passed. In this case position (if specified) should be an integer.If reference is a DOMNode (or id matching a DOMNode but not a widget),the position argument can be a numeric index or a string"first", "last", "before", or "after", same as dojo/dom-construct::place(). */ - placeAt(reference: dijit._WidgetBase, position: String): any; + placeAt(reference: dijit._WidgetBase, position?: String): any; /** * Place this widget somewhere in the DOM based * on standard domConstruct.place() conventions. @@ -66982,7 +66982,7 @@ declare module dijit { * @param reference Widget, DOMNode, or id of widget or DOMNode * @param position OptionalIf reference is a widget (or id of widget), and that widget has an ".addChild" method,it will be called passing this widget instance into that method, supplying the optionalposition index passed. In this case position (if specified) should be an integer.If reference is a DOMNode (or id matching a DOMNode but not a widget),the position argument can be a numeric index or a string"first", "last", "before", or "after", same as dojo/dom-construct::place(). */ - placeAt(reference: String, position: number): any; + placeAt(reference: String, position?: number): any; /** * Place this widget somewhere in the DOM based * on standard domConstruct.place() conventions. @@ -66993,7 +66993,7 @@ declare module dijit { * @param reference Widget, DOMNode, or id of widget or DOMNode * @param position OptionalIf reference is a widget (or id of widget), and that widget has an ".addChild" method,it will be called passing this widget instance into that method, supplying the optionalposition index passed. In this case position (if specified) should be an integer.If reference is a DOMNode (or id matching a DOMNode but not a widget),the position argument can be a numeric index or a string"first", "last", "before", or "after", same as dojo/dom-construct::place(). */ - placeAt(reference: HTMLElement, position: number): any; + placeAt(reference: HTMLElement, position?: number): any; /** * Place this widget somewhere in the DOM based * on standard domConstruct.place() conventions. @@ -67004,7 +67004,7 @@ declare module dijit { * @param reference Widget, DOMNode, or id of widget or DOMNode * @param position OptionalIf reference is a widget (or id of widget), and that widget has an ".addChild" method,it will be called passing this widget instance into that method, supplying the optionalposition index passed. In this case position (if specified) should be an integer.If reference is a DOMNode (or id matching a DOMNode but not a widget),the position argument can be a numeric index or a string"first", "last", "before", or "after", same as dojo/dom-construct::place(). */ - placeAt(reference: dijit._WidgetBase, position: number): any; + placeAt(reference: dijit._WidgetBase, position?: number): any; /** * */ @@ -67861,14 +67861,14 @@ declare module dijit { * @param name The property to get or set. If an object is passed here and nota string, its keys are used as names of attributes to be setand the value of the object as values to set in the widget. * @param value OptionalOptional. If provided, attr() operates as a setter. If omitted,the current value of the named property is returned. */ - attr(name: String, value: Object): any; + attr(name: String, value?: Object): any; /** * This method is deprecated, use get() or set() directly. * * @param name The property to get or set. If an object is passed here and nota string, its keys are used as names of attributes to be setand the value of the object as values to set in the widget. * @param value OptionalOptional. If provided, attr() operates as a setter. If omitted,the current value of the named property is returned. */ - attr(name: Object, value: Object): any; + attr(name: Object, value?: Object): any; /** * */ @@ -68016,7 +68016,7 @@ declare module dijit { * @param fcn Function reference. * @param delay OptionalDelay, defaults to 0. */ - defer(fcn: Function, delay: number): Object; + defer(fcn: Function, delay?: number): Object; /** * Destroy this widget, but not its descendants. Descendants means widgets inside of * this.containerNode. Will also destroy any resources (including widgets) registered via this.own(). @@ -68081,7 +68081,7 @@ declare module dijit { * @param eventObj Optional * @param callbackArgs Optional */ - emit(type: String, eventObj: Object, callbackArgs: any[]): any; + emit(type: String, eventObj?: Object, callbackArgs?: any[]): any; /** * Auto-corrections (such as trimming) that are applied to textbox * value on blur or form submit. @@ -68231,7 +68231,7 @@ declare module dijit { * @param reference Widget, DOMNode, or id of widget or DOMNode * @param position OptionalIf reference is a widget (or id of widget), and that widget has an ".addChild" method,it will be called passing this widget instance into that method, supplying the optionalposition index passed. In this case position (if specified) should be an integer.If reference is a DOMNode (or id matching a DOMNode but not a widget),the position argument can be a numeric index or a string"first", "last", "before", or "after", same as dojo/dom-construct::place(). */ - placeAt(reference: String, position: String): any; + placeAt(reference: String, position?: String): any; /** * Place this widget somewhere in the DOM based * on standard domConstruct.place() conventions. @@ -68242,7 +68242,7 @@ declare module dijit { * @param reference Widget, DOMNode, or id of widget or DOMNode * @param position OptionalIf reference is a widget (or id of widget), and that widget has an ".addChild" method,it will be called passing this widget instance into that method, supplying the optionalposition index passed. In this case position (if specified) should be an integer.If reference is a DOMNode (or id matching a DOMNode but not a widget),the position argument can be a numeric index or a string"first", "last", "before", or "after", same as dojo/dom-construct::place(). */ - placeAt(reference: HTMLElement, position: String): any; + placeAt(reference: HTMLElement, position?: String): any; /** * Place this widget somewhere in the DOM based * on standard domConstruct.place() conventions. @@ -68253,7 +68253,7 @@ declare module dijit { * @param reference Widget, DOMNode, or id of widget or DOMNode * @param position OptionalIf reference is a widget (or id of widget), and that widget has an ".addChild" method,it will be called passing this widget instance into that method, supplying the optionalposition index passed. In this case position (if specified) should be an integer.If reference is a DOMNode (or id matching a DOMNode but not a widget),the position argument can be a numeric index or a string"first", "last", "before", or "after", same as dojo/dom-construct::place(). */ - placeAt(reference: dijit._WidgetBase, position: String): any; + placeAt(reference: dijit._WidgetBase, position?: String): any; /** * Place this widget somewhere in the DOM based * on standard domConstruct.place() conventions. @@ -68264,7 +68264,7 @@ declare module dijit { * @param reference Widget, DOMNode, or id of widget or DOMNode * @param position OptionalIf reference is a widget (or id of widget), and that widget has an ".addChild" method,it will be called passing this widget instance into that method, supplying the optionalposition index passed. In this case position (if specified) should be an integer.If reference is a DOMNode (or id matching a DOMNode but not a widget),the position argument can be a numeric index or a string"first", "last", "before", or "after", same as dojo/dom-construct::place(). */ - placeAt(reference: String, position: number): any; + placeAt(reference: String, position?: number): any; /** * Place this widget somewhere in the DOM based * on standard domConstruct.place() conventions. @@ -68275,7 +68275,7 @@ declare module dijit { * @param reference Widget, DOMNode, or id of widget or DOMNode * @param position OptionalIf reference is a widget (or id of widget), and that widget has an ".addChild" method,it will be called passing this widget instance into that method, supplying the optionalposition index passed. In this case position (if specified) should be an integer.If reference is a DOMNode (or id matching a DOMNode but not a widget),the position argument can be a numeric index or a string"first", "last", "before", or "after", same as dojo/dom-construct::place(). */ - placeAt(reference: HTMLElement, position: number): any; + placeAt(reference: HTMLElement, position?: number): any; /** * Place this widget somewhere in the DOM based * on standard domConstruct.place() conventions. @@ -68286,7 +68286,7 @@ declare module dijit { * @param reference Widget, DOMNode, or id of widget or DOMNode * @param position OptionalIf reference is a widget (or id of widget), and that widget has an ".addChild" method,it will be called passing this widget instance into that method, supplying the optionalposition index passed. In this case position (if specified) should be an integer.If reference is a DOMNode (or id matching a DOMNode but not a widget),the position argument can be a numeric index or a string"first", "last", "before", or "after", same as dojo/dom-construct::place(). */ - placeAt(reference: dijit._WidgetBase, position: number): any; + placeAt(reference: dijit._WidgetBase, position?: number): any; /** * */ @@ -69287,14 +69287,14 @@ declare module dijit { * @param name The property to get or set. If an object is passed here and nota string, its keys are used as names of attributes to be setand the value of the object as values to set in the widget. * @param value OptionalOptional. If provided, attr() operates as a setter. If omitted,the current value of the named property is returned. */ - attr(name: String, value: Object): any; + attr(name: String, value?: Object): any; /** * This method is deprecated, use get() or set() directly. * * @param name The property to get or set. If an object is passed here and nota string, its keys are used as names of attributes to be setand the value of the object as values to set in the widget. * @param value OptionalOptional. If provided, attr() operates as a setter. If omitted,the current value of the named property is returned. */ - attr(name: Object, value: Object): any; + attr(name: Object, value?: Object): any; /** * */ @@ -69442,7 +69442,7 @@ declare module dijit { * @param fcn Function reference. * @param delay OptionalDelay, defaults to 0. */ - defer(fcn: Function, delay: number): Object; + defer(fcn: Function, delay?: number): Object; /** * Destroy this widget, but not its descendants. Descendants means widgets inside of * this.containerNode. Will also destroy any resources (including widgets) registered via this.own(). @@ -69507,7 +69507,7 @@ declare module dijit { * @param eventObj Optional * @param callbackArgs Optional */ - emit(type: String, eventObj: Object, callbackArgs: any[]): any; + emit(type: String, eventObj?: Object, callbackArgs?: any[]): any; /** * Auto-corrections (such as trimming) that are applied to textbox * value on blur or form submit. @@ -69658,7 +69658,7 @@ declare module dijit { * @param reference Widget, DOMNode, or id of widget or DOMNode * @param position OptionalIf reference is a widget (or id of widget), and that widget has an ".addChild" method,it will be called passing this widget instance into that method, supplying the optionalposition index passed. In this case position (if specified) should be an integer.If reference is a DOMNode (or id matching a DOMNode but not a widget),the position argument can be a numeric index or a string"first", "last", "before", or "after", same as dojo/dom-construct::place(). */ - placeAt(reference: String, position: String): any; + placeAt(reference: String, position?: String): any; /** * Place this widget somewhere in the DOM based * on standard domConstruct.place() conventions. @@ -69669,7 +69669,7 @@ declare module dijit { * @param reference Widget, DOMNode, or id of widget or DOMNode * @param position OptionalIf reference is a widget (or id of widget), and that widget has an ".addChild" method,it will be called passing this widget instance into that method, supplying the optionalposition index passed. In this case position (if specified) should be an integer.If reference is a DOMNode (or id matching a DOMNode but not a widget),the position argument can be a numeric index or a string"first", "last", "before", or "after", same as dojo/dom-construct::place(). */ - placeAt(reference: HTMLElement, position: String): any; + placeAt(reference: HTMLElement, position?: String): any; /** * Place this widget somewhere in the DOM based * on standard domConstruct.place() conventions. @@ -69680,7 +69680,7 @@ declare module dijit { * @param reference Widget, DOMNode, or id of widget or DOMNode * @param position OptionalIf reference is a widget (or id of widget), and that widget has an ".addChild" method,it will be called passing this widget instance into that method, supplying the optionalposition index passed. In this case position (if specified) should be an integer.If reference is a DOMNode (or id matching a DOMNode but not a widget),the position argument can be a numeric index or a string"first", "last", "before", or "after", same as dojo/dom-construct::place(). */ - placeAt(reference: dijit._WidgetBase, position: String): any; + placeAt(reference: dijit._WidgetBase, position?: String): any; /** * Place this widget somewhere in the DOM based * on standard domConstruct.place() conventions. @@ -69691,7 +69691,7 @@ declare module dijit { * @param reference Widget, DOMNode, or id of widget or DOMNode * @param position OptionalIf reference is a widget (or id of widget), and that widget has an ".addChild" method,it will be called passing this widget instance into that method, supplying the optionalposition index passed. In this case position (if specified) should be an integer.If reference is a DOMNode (or id matching a DOMNode but not a widget),the position argument can be a numeric index or a string"first", "last", "before", or "after", same as dojo/dom-construct::place(). */ - placeAt(reference: String, position: number): any; + placeAt(reference: String, position?: number): any; /** * Place this widget somewhere in the DOM based * on standard domConstruct.place() conventions. @@ -69702,7 +69702,7 @@ declare module dijit { * @param reference Widget, DOMNode, or id of widget or DOMNode * @param position OptionalIf reference is a widget (or id of widget), and that widget has an ".addChild" method,it will be called passing this widget instance into that method, supplying the optionalposition index passed. In this case position (if specified) should be an integer.If reference is a DOMNode (or id matching a DOMNode but not a widget),the position argument can be a numeric index or a string"first", "last", "before", or "after", same as dojo/dom-construct::place(). */ - placeAt(reference: HTMLElement, position: number): any; + placeAt(reference: HTMLElement, position?: number): any; /** * Place this widget somewhere in the DOM based * on standard domConstruct.place() conventions. @@ -69713,7 +69713,7 @@ declare module dijit { * @param reference Widget, DOMNode, or id of widget or DOMNode * @param position OptionalIf reference is a widget (or id of widget), and that widget has an ".addChild" method,it will be called passing this widget instance into that method, supplying the optionalposition index passed. In this case position (if specified) should be an integer.If reference is a DOMNode (or id matching a DOMNode but not a widget),the position argument can be a numeric index or a string"first", "last", "before", or "after", same as dojo/dom-construct::place(). */ - placeAt(reference: dijit._WidgetBase, position: number): any; + placeAt(reference: dijit._WidgetBase, position?: number): any; /** * */ @@ -70385,14 +70385,14 @@ declare module dijit { * @param name The property to get or set. If an object is passed here and nota string, its keys are used as names of attributes to be setand the value of the object as values to set in the widget. * @param value OptionalOptional. If provided, attr() operates as a setter. If omitted,the current value of the named property is returned. */ - attr(name: String, value: Object): any; + attr(name: String, value?: Object): any; /** * This method is deprecated, use get() or set() directly. * * @param name The property to get or set. If an object is passed here and nota string, its keys are used as names of attributes to be setand the value of the object as values to set in the widget. * @param value OptionalOptional. If provided, attr() operates as a setter. If omitted,the current value of the named property is returned. */ - attr(name: Object, value: Object): any; + attr(name: Object, value?: Object): any; /** * Construct the UI for this widget, setting this.domNode. * Most widgets will mixin dijit._TemplatedMixin, which implements this method. @@ -70542,7 +70542,7 @@ declare module dijit { * @param fcn Function reference. * @param delay OptionalDelay, defaults to 0. */ - defer(fcn: Function, delay: number): Object; + defer(fcn: Function, delay?: number): Object; /** * Destroy this widget, but not its descendants. Descendants means widgets inside of * this.containerNode. Will also destroy any resources (including widgets) registered via this.own(). @@ -70600,7 +70600,7 @@ declare module dijit { * @param eventObj Optional * @param callbackArgs Optional */ - emit(type: String, eventObj: Object, callbackArgs: any[]): any; + emit(type: String, eventObj?: Object, callbackArgs?: any[]): any; /** * Put focus on this widget * @@ -70692,7 +70692,7 @@ declare module dijit { * @param reference Widget, DOMNode, or id of widget or DOMNode * @param position OptionalIf reference is a widget (or id of widget), and that widget has an ".addChild" method,it will be called passing this widget instance into that method, supplying the optionalposition index passed. In this case position (if specified) should be an integer.If reference is a DOMNode (or id matching a DOMNode but not a widget),the position argument can be a numeric index or a string"first", "last", "before", or "after", same as dojo/dom-construct::place(). */ - placeAt(reference: String, position: String): any; + placeAt(reference: String, position?: String): any; /** * Place this widget somewhere in the DOM based * on standard domConstruct.place() conventions. @@ -70703,7 +70703,7 @@ declare module dijit { * @param reference Widget, DOMNode, or id of widget or DOMNode * @param position OptionalIf reference is a widget (or id of widget), and that widget has an ".addChild" method,it will be called passing this widget instance into that method, supplying the optionalposition index passed. In this case position (if specified) should be an integer.If reference is a DOMNode (or id matching a DOMNode but not a widget),the position argument can be a numeric index or a string"first", "last", "before", or "after", same as dojo/dom-construct::place(). */ - placeAt(reference: HTMLElement, position: String): any; + placeAt(reference: HTMLElement, position?: String): any; /** * Place this widget somewhere in the DOM based * on standard domConstruct.place() conventions. @@ -70714,7 +70714,7 @@ declare module dijit { * @param reference Widget, DOMNode, or id of widget or DOMNode * @param position OptionalIf reference is a widget (or id of widget), and that widget has an ".addChild" method,it will be called passing this widget instance into that method, supplying the optionalposition index passed. In this case position (if specified) should be an integer.If reference is a DOMNode (or id matching a DOMNode but not a widget),the position argument can be a numeric index or a string"first", "last", "before", or "after", same as dojo/dom-construct::place(). */ - placeAt(reference: dijit._WidgetBase, position: String): any; + placeAt(reference: dijit._WidgetBase, position?: String): any; /** * Place this widget somewhere in the DOM based * on standard domConstruct.place() conventions. @@ -70725,7 +70725,7 @@ declare module dijit { * @param reference Widget, DOMNode, or id of widget or DOMNode * @param position OptionalIf reference is a widget (or id of widget), and that widget has an ".addChild" method,it will be called passing this widget instance into that method, supplying the optionalposition index passed. In this case position (if specified) should be an integer.If reference is a DOMNode (or id matching a DOMNode but not a widget),the position argument can be a numeric index or a string"first", "last", "before", or "after", same as dojo/dom-construct::place(). */ - placeAt(reference: String, position: number): any; + placeAt(reference: String, position?: number): any; /** * Place this widget somewhere in the DOM based * on standard domConstruct.place() conventions. @@ -70736,7 +70736,7 @@ declare module dijit { * @param reference Widget, DOMNode, or id of widget or DOMNode * @param position OptionalIf reference is a widget (or id of widget), and that widget has an ".addChild" method,it will be called passing this widget instance into that method, supplying the optionalposition index passed. In this case position (if specified) should be an integer.If reference is a DOMNode (or id matching a DOMNode but not a widget),the position argument can be a numeric index or a string"first", "last", "before", or "after", same as dojo/dom-construct::place(). */ - placeAt(reference: HTMLElement, position: number): any; + placeAt(reference: HTMLElement, position?: number): any; /** * Place this widget somewhere in the DOM based * on standard domConstruct.place() conventions. @@ -70747,7 +70747,7 @@ declare module dijit { * @param reference Widget, DOMNode, or id of widget or DOMNode * @param position OptionalIf reference is a widget (or id of widget), and that widget has an ".addChild" method,it will be called passing this widget instance into that method, supplying the optionalposition index passed. In this case position (if specified) should be an integer.If reference is a DOMNode (or id matching a DOMNode but not a widget),the position argument can be a numeric index or a string"first", "last", "before", or "after", same as dojo/dom-construct::place(). */ - placeAt(reference: dijit._WidgetBase, position: number): any; + placeAt(reference: dijit._WidgetBase, position?: number): any; /** * */ @@ -71443,14 +71443,14 @@ declare module dijit { * @param name The property to get or set. If an object is passed here and nota string, its keys are used as names of attributes to be setand the value of the object as values to set in the widget. * @param value OptionalOptional. If provided, attr() operates as a setter. If omitted,the current value of the named property is returned. */ - attr(name: String, value: Object): any; + attr(name: String, value?: Object): any; /** * This method is deprecated, use get() or set() directly. * * @param name The property to get or set. If an object is passed here and nota string, its keys are used as names of attributes to be setand the value of the object as values to set in the widget. * @param value OptionalOptional. If provided, attr() operates as a setter. If omitted,the current value of the named property is returned. */ - attr(name: Object, value: Object): any; + attr(name: Object, value?: Object): any; /** * */ @@ -71598,7 +71598,7 @@ declare module dijit { * @param fcn Function reference. * @param delay OptionalDelay, defaults to 0. */ - defer(fcn: Function, delay: number): Object; + defer(fcn: Function, delay?: number): Object; /** * Destroy this widget, but not its descendants. Descendants means widgets inside of * this.containerNode. Will also destroy any resources (including widgets) registered via this.own(). @@ -71656,7 +71656,7 @@ declare module dijit { * @param eventObj Optional * @param callbackArgs Optional */ - emit(type: String, eventObj: Object, callbackArgs: any[]): any; + emit(type: String, eventObj?: Object, callbackArgs?: any[]): any; /** * * @param value @@ -71772,7 +71772,7 @@ declare module dijit { * @param reference Widget, DOMNode, or id of widget or DOMNode * @param position OptionalIf reference is a widget (or id of widget), and that widget has an ".addChild" method,it will be called passing this widget instance into that method, supplying the optionalposition index passed. In this case position (if specified) should be an integer.If reference is a DOMNode (or id matching a DOMNode but not a widget),the position argument can be a numeric index or a string"first", "last", "before", or "after", same as dojo/dom-construct::place(). */ - placeAt(reference: String, position: String): any; + placeAt(reference: String, position?: String): any; /** * Place this widget somewhere in the DOM based * on standard domConstruct.place() conventions. @@ -71783,7 +71783,7 @@ declare module dijit { * @param reference Widget, DOMNode, or id of widget or DOMNode * @param position OptionalIf reference is a widget (or id of widget), and that widget has an ".addChild" method,it will be called passing this widget instance into that method, supplying the optionalposition index passed. In this case position (if specified) should be an integer.If reference is a DOMNode (or id matching a DOMNode but not a widget),the position argument can be a numeric index or a string"first", "last", "before", or "after", same as dojo/dom-construct::place(). */ - placeAt(reference: HTMLElement, position: String): any; + placeAt(reference: HTMLElement, position?: String): any; /** * Place this widget somewhere in the DOM based * on standard domConstruct.place() conventions. @@ -71794,7 +71794,7 @@ declare module dijit { * @param reference Widget, DOMNode, or id of widget or DOMNode * @param position OptionalIf reference is a widget (or id of widget), and that widget has an ".addChild" method,it will be called passing this widget instance into that method, supplying the optionalposition index passed. In this case position (if specified) should be an integer.If reference is a DOMNode (or id matching a DOMNode but not a widget),the position argument can be a numeric index or a string"first", "last", "before", or "after", same as dojo/dom-construct::place(). */ - placeAt(reference: dijit._WidgetBase, position: String): any; + placeAt(reference: dijit._WidgetBase, position?: String): any; /** * Place this widget somewhere in the DOM based * on standard domConstruct.place() conventions. @@ -71805,7 +71805,7 @@ declare module dijit { * @param reference Widget, DOMNode, or id of widget or DOMNode * @param position OptionalIf reference is a widget (or id of widget), and that widget has an ".addChild" method,it will be called passing this widget instance into that method, supplying the optionalposition index passed. In this case position (if specified) should be an integer.If reference is a DOMNode (or id matching a DOMNode but not a widget),the position argument can be a numeric index or a string"first", "last", "before", or "after", same as dojo/dom-construct::place(). */ - placeAt(reference: String, position: number): any; + placeAt(reference: String, position?: number): any; /** * Place this widget somewhere in the DOM based * on standard domConstruct.place() conventions. @@ -71816,7 +71816,7 @@ declare module dijit { * @param reference Widget, DOMNode, or id of widget or DOMNode * @param position OptionalIf reference is a widget (or id of widget), and that widget has an ".addChild" method,it will be called passing this widget instance into that method, supplying the optionalposition index passed. In this case position (if specified) should be an integer.If reference is a DOMNode (or id matching a DOMNode but not a widget),the position argument can be a numeric index or a string"first", "last", "before", or "after", same as dojo/dom-construct::place(). */ - placeAt(reference: HTMLElement, position: number): any; + placeAt(reference: HTMLElement, position?: number): any; /** * Place this widget somewhere in the DOM based * on standard domConstruct.place() conventions. @@ -71827,7 +71827,7 @@ declare module dijit { * @param reference Widget, DOMNode, or id of widget or DOMNode * @param position OptionalIf reference is a widget (or id of widget), and that widget has an ".addChild" method,it will be called passing this widget instance into that method, supplying the optionalposition index passed. In this case position (if specified) should be an integer.If reference is a DOMNode (or id matching a DOMNode but not a widget),the position argument can be a numeric index or a string"first", "last", "before", or "after", same as dojo/dom-construct::place(). */ - placeAt(reference: dijit._WidgetBase, position: number): any; + placeAt(reference: dijit._WidgetBase, position?: number): any; /** * */ @@ -72612,14 +72612,14 @@ declare module dijit { * @param name The property to get or set. If an object is passed here and nota string, its keys are used as names of attributes to be setand the value of the object as values to set in the widget. * @param value OptionalOptional. If provided, attr() operates as a setter. If omitted,the current value of the named property is returned. */ - attr(name: String, value: Object): any; + attr(name: String, value?: Object): any; /** * This method is deprecated, use get() or set() directly. * * @param name The property to get or set. If an object is passed here and nota string, its keys are used as names of attributes to be setand the value of the object as values to set in the widget. * @param value OptionalOptional. If provided, attr() operates as a setter. If omitted,the current value of the named property is returned. */ - attr(name: Object, value: Object): any; + attr(name: Object, value?: Object): any; /** * */ @@ -72767,7 +72767,7 @@ declare module dijit { * @param fcn Function reference. * @param delay OptionalDelay, defaults to 0. */ - defer(fcn: Function, delay: number): Object; + defer(fcn: Function, delay?: number): Object; /** * Destroy this widget, but not its descendants. Descendants means widgets inside of * this.containerNode. Will also destroy any resources (including widgets) registered via this.own(). @@ -72832,7 +72832,7 @@ declare module dijit { * @param eventObj Optional * @param callbackArgs Optional */ - emit(type: String, eventObj: Object, callbackArgs: any[]): any; + emit(type: String, eventObj?: Object, callbackArgs?: any[]): any; /** * Auto-corrections (such as trimming) that are applied to textbox * value on blur or form submit. @@ -72983,7 +72983,7 @@ declare module dijit { * @param reference Widget, DOMNode, or id of widget or DOMNode * @param position OptionalIf reference is a widget (or id of widget), and that widget has an ".addChild" method,it will be called passing this widget instance into that method, supplying the optionalposition index passed. In this case position (if specified) should be an integer.If reference is a DOMNode (or id matching a DOMNode but not a widget),the position argument can be a numeric index or a string"first", "last", "before", or "after", same as dojo/dom-construct::place(). */ - placeAt(reference: String, position: String): any; + placeAt(reference: String, position?: String): any; /** * Place this widget somewhere in the DOM based * on standard domConstruct.place() conventions. @@ -72994,7 +72994,7 @@ declare module dijit { * @param reference Widget, DOMNode, or id of widget or DOMNode * @param position OptionalIf reference is a widget (or id of widget), and that widget has an ".addChild" method,it will be called passing this widget instance into that method, supplying the optionalposition index passed. In this case position (if specified) should be an integer.If reference is a DOMNode (or id matching a DOMNode but not a widget),the position argument can be a numeric index or a string"first", "last", "before", or "after", same as dojo/dom-construct::place(). */ - placeAt(reference: HTMLElement, position: String): any; + placeAt(reference: HTMLElement, position?: String): any; /** * Place this widget somewhere in the DOM based * on standard domConstruct.place() conventions. @@ -73005,7 +73005,7 @@ declare module dijit { * @param reference Widget, DOMNode, or id of widget or DOMNode * @param position OptionalIf reference is a widget (or id of widget), and that widget has an ".addChild" method,it will be called passing this widget instance into that method, supplying the optionalposition index passed. In this case position (if specified) should be an integer.If reference is a DOMNode (or id matching a DOMNode but not a widget),the position argument can be a numeric index or a string"first", "last", "before", or "after", same as dojo/dom-construct::place(). */ - placeAt(reference: dijit._WidgetBase, position: String): any; + placeAt(reference: dijit._WidgetBase, position?: String): any; /** * Place this widget somewhere in the DOM based * on standard domConstruct.place() conventions. @@ -73016,7 +73016,7 @@ declare module dijit { * @param reference Widget, DOMNode, or id of widget or DOMNode * @param position OptionalIf reference is a widget (or id of widget), and that widget has an ".addChild" method,it will be called passing this widget instance into that method, supplying the optionalposition index passed. In this case position (if specified) should be an integer.If reference is a DOMNode (or id matching a DOMNode but not a widget),the position argument can be a numeric index or a string"first", "last", "before", or "after", same as dojo/dom-construct::place(). */ - placeAt(reference: String, position: number): any; + placeAt(reference: String, position?: number): any; /** * Place this widget somewhere in the DOM based * on standard domConstruct.place() conventions. @@ -73027,7 +73027,7 @@ declare module dijit { * @param reference Widget, DOMNode, or id of widget or DOMNode * @param position OptionalIf reference is a widget (or id of widget), and that widget has an ".addChild" method,it will be called passing this widget instance into that method, supplying the optionalposition index passed. In this case position (if specified) should be an integer.If reference is a DOMNode (or id matching a DOMNode but not a widget),the position argument can be a numeric index or a string"first", "last", "before", or "after", same as dojo/dom-construct::place(). */ - placeAt(reference: HTMLElement, position: number): any; + placeAt(reference: HTMLElement, position?: number): any; /** * Place this widget somewhere in the DOM based * on standard domConstruct.place() conventions. @@ -73038,7 +73038,7 @@ declare module dijit { * @param reference Widget, DOMNode, or id of widget or DOMNode * @param position OptionalIf reference is a widget (or id of widget), and that widget has an ".addChild" method,it will be called passing this widget instance into that method, supplying the optionalposition index passed. In this case position (if specified) should be an integer.If reference is a DOMNode (or id matching a DOMNode but not a widget),the position argument can be a numeric index or a string"first", "last", "before", or "after", same as dojo/dom-construct::place(). */ - placeAt(reference: dijit._WidgetBase, position: number): any; + placeAt(reference: dijit._WidgetBase, position?: number): any; /** * */ @@ -73785,14 +73785,14 @@ declare module dijit { * @param name The property to get or set. If an object is passed here and nota string, its keys are used as names of attributes to be setand the value of the object as values to set in the widget. * @param value OptionalOptional. If provided, attr() operates as a setter. If omitted,the current value of the named property is returned. */ - attr(name: String, value: Object): any; + attr(name: String, value?: Object): any; /** * This method is deprecated, use get() or set() directly. * * @param name The property to get or set. If an object is passed here and nota string, its keys are used as names of attributes to be setand the value of the object as values to set in the widget. * @param value OptionalOptional. If provided, attr() operates as a setter. If omitted,the current value of the named property is returned. */ - attr(name: Object, value: Object): any; + attr(name: Object, value?: Object): any; /** * */ @@ -73940,7 +73940,7 @@ declare module dijit { * @param fcn Function reference. * @param delay OptionalDelay, defaults to 0. */ - defer(fcn: Function, delay: number): Object; + defer(fcn: Function, delay?: number): Object; /** * Destroy this widget, but not its descendants. Descendants means widgets inside of * this.containerNode. Will also destroy any resources (including widgets) registered via this.own(). @@ -73998,7 +73998,7 @@ declare module dijit { * @param eventObj Optional * @param callbackArgs Optional */ - emit(type: String, eventObj: Object, callbackArgs: any[]): any; + emit(type: String, eventObj?: Object, callbackArgs?: any[]): any; /** * * @param value @@ -74114,7 +74114,7 @@ declare module dijit { * @param reference Widget, DOMNode, or id of widget or DOMNode * @param position OptionalIf reference is a widget (or id of widget), and that widget has an ".addChild" method,it will be called passing this widget instance into that method, supplying the optionalposition index passed. In this case position (if specified) should be an integer.If reference is a DOMNode (or id matching a DOMNode but not a widget),the position argument can be a numeric index or a string"first", "last", "before", or "after", same as dojo/dom-construct::place(). */ - placeAt(reference: String, position: String): any; + placeAt(reference: String, position?: String): any; /** * Place this widget somewhere in the DOM based * on standard domConstruct.place() conventions. @@ -74125,7 +74125,7 @@ declare module dijit { * @param reference Widget, DOMNode, or id of widget or DOMNode * @param position OptionalIf reference is a widget (or id of widget), and that widget has an ".addChild" method,it will be called passing this widget instance into that method, supplying the optionalposition index passed. In this case position (if specified) should be an integer.If reference is a DOMNode (or id matching a DOMNode but not a widget),the position argument can be a numeric index or a string"first", "last", "before", or "after", same as dojo/dom-construct::place(). */ - placeAt(reference: HTMLElement, position: String): any; + placeAt(reference: HTMLElement, position?: String): any; /** * Place this widget somewhere in the DOM based * on standard domConstruct.place() conventions. @@ -74136,7 +74136,7 @@ declare module dijit { * @param reference Widget, DOMNode, or id of widget or DOMNode * @param position OptionalIf reference is a widget (or id of widget), and that widget has an ".addChild" method,it will be called passing this widget instance into that method, supplying the optionalposition index passed. In this case position (if specified) should be an integer.If reference is a DOMNode (or id matching a DOMNode but not a widget),the position argument can be a numeric index or a string"first", "last", "before", or "after", same as dojo/dom-construct::place(). */ - placeAt(reference: dijit._WidgetBase, position: String): any; + placeAt(reference: dijit._WidgetBase, position?: String): any; /** * Place this widget somewhere in the DOM based * on standard domConstruct.place() conventions. @@ -74147,7 +74147,7 @@ declare module dijit { * @param reference Widget, DOMNode, or id of widget or DOMNode * @param position OptionalIf reference is a widget (or id of widget), and that widget has an ".addChild" method,it will be called passing this widget instance into that method, supplying the optionalposition index passed. In this case position (if specified) should be an integer.If reference is a DOMNode (or id matching a DOMNode but not a widget),the position argument can be a numeric index or a string"first", "last", "before", or "after", same as dojo/dom-construct::place(). */ - placeAt(reference: String, position: number): any; + placeAt(reference: String, position?: number): any; /** * Place this widget somewhere in the DOM based * on standard domConstruct.place() conventions. @@ -74158,7 +74158,7 @@ declare module dijit { * @param reference Widget, DOMNode, or id of widget or DOMNode * @param position OptionalIf reference is a widget (or id of widget), and that widget has an ".addChild" method,it will be called passing this widget instance into that method, supplying the optionalposition index passed. In this case position (if specified) should be an integer.If reference is a DOMNode (or id matching a DOMNode but not a widget),the position argument can be a numeric index or a string"first", "last", "before", or "after", same as dojo/dom-construct::place(). */ - placeAt(reference: HTMLElement, position: number): any; + placeAt(reference: HTMLElement, position?: number): any; /** * Place this widget somewhere in the DOM based * on standard domConstruct.place() conventions. @@ -74169,7 +74169,7 @@ declare module dijit { * @param reference Widget, DOMNode, or id of widget or DOMNode * @param position OptionalIf reference is a widget (or id of widget), and that widget has an ".addChild" method,it will be called passing this widget instance into that method, supplying the optionalposition index passed. In this case position (if specified) should be an integer.If reference is a DOMNode (or id matching a DOMNode but not a widget),the position argument can be a numeric index or a string"first", "last", "before", or "after", same as dojo/dom-construct::place(). */ - placeAt(reference: dijit._WidgetBase, position: number): any; + placeAt(reference: dijit._WidgetBase, position?: number): any; /** * */ @@ -75010,14 +75010,14 @@ declare module dijit { * @param name The property to get or set. If an object is passed here and nota string, its keys are used as names of attributes to be setand the value of the object as values to set in the widget. * @param value OptionalOptional. If provided, attr() operates as a setter. If omitted,the current value of the named property is returned. */ - attr(name: String, value: Object): any; + attr(name: String, value?: Object): any; /** * This method is deprecated, use get() or set() directly. * * @param name The property to get or set. If an object is passed here and nota string, its keys are used as names of attributes to be setand the value of the object as values to set in the widget. * @param value OptionalOptional. If provided, attr() operates as a setter. If omitted,the current value of the named property is returned. */ - attr(name: Object, value: Object): any; + attr(name: Object, value?: Object): any; /** * */ @@ -75176,7 +75176,7 @@ declare module dijit { * @param fcn Function reference. * @param delay OptionalDelay, defaults to 0. */ - defer(fcn: Function, delay: number): Object; + defer(fcn: Function, delay?: number): Object; /** * * @param preserveDom @@ -75225,7 +75225,7 @@ declare module dijit { * @param eventObj Optional * @param callbackArgs Optional */ - emit(type: String, eventObj: Object, callbackArgs: any[]): any; + emit(type: String, eventObj?: Object, callbackArgs?: any[]): any; /** * */ @@ -75369,7 +75369,7 @@ declare module dijit { * @param reference Widget, DOMNode, or id of widget or DOMNode * @param position OptionalIf reference is a widget (or id of widget), and that widget has an ".addChild" method,it will be called passing this widget instance into that method, supplying the optionalposition index passed. In this case position (if specified) should be an integer.If reference is a DOMNode (or id matching a DOMNode but not a widget),the position argument can be a numeric index or a string"first", "last", "before", or "after", same as dojo/dom-construct::place(). */ - placeAt(reference: String, position: String): any; + placeAt(reference: String, position?: String): any; /** * Place this widget somewhere in the DOM based * on standard domConstruct.place() conventions. @@ -75380,7 +75380,7 @@ declare module dijit { * @param reference Widget, DOMNode, or id of widget or DOMNode * @param position OptionalIf reference is a widget (or id of widget), and that widget has an ".addChild" method,it will be called passing this widget instance into that method, supplying the optionalposition index passed. In this case position (if specified) should be an integer.If reference is a DOMNode (or id matching a DOMNode but not a widget),the position argument can be a numeric index or a string"first", "last", "before", or "after", same as dojo/dom-construct::place(). */ - placeAt(reference: HTMLElement, position: String): any; + placeAt(reference: HTMLElement, position?: String): any; /** * Place this widget somewhere in the DOM based * on standard domConstruct.place() conventions. @@ -75391,7 +75391,7 @@ declare module dijit { * @param reference Widget, DOMNode, or id of widget or DOMNode * @param position OptionalIf reference is a widget (or id of widget), and that widget has an ".addChild" method,it will be called passing this widget instance into that method, supplying the optionalposition index passed. In this case position (if specified) should be an integer.If reference is a DOMNode (or id matching a DOMNode but not a widget),the position argument can be a numeric index or a string"first", "last", "before", or "after", same as dojo/dom-construct::place(). */ - placeAt(reference: dijit._WidgetBase, position: String): any; + placeAt(reference: dijit._WidgetBase, position?: String): any; /** * Place this widget somewhere in the DOM based * on standard domConstruct.place() conventions. @@ -75402,7 +75402,7 @@ declare module dijit { * @param reference Widget, DOMNode, or id of widget or DOMNode * @param position OptionalIf reference is a widget (or id of widget), and that widget has an ".addChild" method,it will be called passing this widget instance into that method, supplying the optionalposition index passed. In this case position (if specified) should be an integer.If reference is a DOMNode (or id matching a DOMNode but not a widget),the position argument can be a numeric index or a string"first", "last", "before", or "after", same as dojo/dom-construct::place(). */ - placeAt(reference: String, position: number): any; + placeAt(reference: String, position?: number): any; /** * Place this widget somewhere in the DOM based * on standard domConstruct.place() conventions. @@ -75413,7 +75413,7 @@ declare module dijit { * @param reference Widget, DOMNode, or id of widget or DOMNode * @param position OptionalIf reference is a widget (or id of widget), and that widget has an ".addChild" method,it will be called passing this widget instance into that method, supplying the optionalposition index passed. In this case position (if specified) should be an integer.If reference is a DOMNode (or id matching a DOMNode but not a widget),the position argument can be a numeric index or a string"first", "last", "before", or "after", same as dojo/dom-construct::place(). */ - placeAt(reference: HTMLElement, position: number): any; + placeAt(reference: HTMLElement, position?: number): any; /** * Place this widget somewhere in the DOM based * on standard domConstruct.place() conventions. @@ -75424,7 +75424,7 @@ declare module dijit { * @param reference Widget, DOMNode, or id of widget or DOMNode * @param position OptionalIf reference is a widget (or id of widget), and that widget has an ".addChild" method,it will be called passing this widget instance into that method, supplying the optionalposition index passed. In this case position (if specified) should be an integer.If reference is a DOMNode (or id matching a DOMNode but not a widget),the position argument can be a numeric index or a string"first", "last", "before", or "after", same as dojo/dom-construct::place(). */ - placeAt(reference: dijit._WidgetBase, position: number): any; + placeAt(reference: dijit._WidgetBase, position?: number): any; /** * stop mousemove from selecting text on IE to be consistent with other browsers * @@ -76130,21 +76130,21 @@ declare module dijit { * @param widget * @param insertIndex Optional */ - addChild(widget: dijit._WidgetBase, insertIndex: number): void; + addChild(widget: dijit._WidgetBase, insertIndex?: number): void; /** * This method is deprecated, use get() or set() directly. * * @param name The property to get or set. If an object is passed here and nota string, its keys are used as names of attributes to be setand the value of the object as values to set in the widget. * @param value OptionalOptional. If provided, attr() operates as a setter. If omitted,the current value of the named property is returned. */ - attr(name: String, value: Object): any; + attr(name: String, value?: Object): any; /** * This method is deprecated, use get() or set() directly. * * @param name The property to get or set. If an object is passed here and nota string, its keys are used as names of attributes to be setand the value of the object as values to set in the widget. * @param value OptionalOptional. If provided, attr() operates as a setter. If omitted,the current value of the named property is returned. */ - attr(name: Object, value: Object): any; + attr(name: Object, value?: Object): any; /** * */ @@ -76301,7 +76301,7 @@ declare module dijit { * @param fcn Function reference. * @param delay OptionalDelay, defaults to 0. */ - defer(fcn: Function, delay: number): Object; + defer(fcn: Function, delay?: number): Object; /** * Destroy this widget, but not its descendants. Descendants means widgets inside of * this.containerNode. Will also destroy any resources (including widgets) registered via this.own(). @@ -76359,7 +76359,7 @@ declare module dijit { * @param eventObj Optional * @param callbackArgs Optional */ - emit(type: String, eventObj: Object, callbackArgs: any[]): any; + emit(type: String, eventObj?: Object, callbackArgs?: any[]): any; /** * Overridden so that the previously selected value will be focused instead of only the first item * @@ -76485,7 +76485,7 @@ declare module dijit { * @param reference Widget, DOMNode, or id of widget or DOMNode * @param position OptionalIf reference is a widget (or id of widget), and that widget has an ".addChild" method,it will be called passing this widget instance into that method, supplying the optionalposition index passed. In this case position (if specified) should be an integer.If reference is a DOMNode (or id matching a DOMNode but not a widget),the position argument can be a numeric index or a string"first", "last", "before", or "after", same as dojo/dom-construct::place(). */ - placeAt(reference: String, position: String): any; + placeAt(reference: String, position?: String): any; /** * Place this widget somewhere in the DOM based * on standard domConstruct.place() conventions. @@ -76496,7 +76496,7 @@ declare module dijit { * @param reference Widget, DOMNode, or id of widget or DOMNode * @param position OptionalIf reference is a widget (or id of widget), and that widget has an ".addChild" method,it will be called passing this widget instance into that method, supplying the optionalposition index passed. In this case position (if specified) should be an integer.If reference is a DOMNode (or id matching a DOMNode but not a widget),the position argument can be a numeric index or a string"first", "last", "before", or "after", same as dojo/dom-construct::place(). */ - placeAt(reference: HTMLElement, position: String): any; + placeAt(reference: HTMLElement, position?: String): any; /** * Place this widget somewhere in the DOM based * on standard domConstruct.place() conventions. @@ -76507,7 +76507,7 @@ declare module dijit { * @param reference Widget, DOMNode, or id of widget or DOMNode * @param position OptionalIf reference is a widget (or id of widget), and that widget has an ".addChild" method,it will be called passing this widget instance into that method, supplying the optionalposition index passed. In this case position (if specified) should be an integer.If reference is a DOMNode (or id matching a DOMNode but not a widget),the position argument can be a numeric index or a string"first", "last", "before", or "after", same as dojo/dom-construct::place(). */ - placeAt(reference: dijit._WidgetBase, position: String): any; + placeAt(reference: dijit._WidgetBase, position?: String): any; /** * Place this widget somewhere in the DOM based * on standard domConstruct.place() conventions. @@ -76518,7 +76518,7 @@ declare module dijit { * @param reference Widget, DOMNode, or id of widget or DOMNode * @param position OptionalIf reference is a widget (or id of widget), and that widget has an ".addChild" method,it will be called passing this widget instance into that method, supplying the optionalposition index passed. In this case position (if specified) should be an integer.If reference is a DOMNode (or id matching a DOMNode but not a widget),the position argument can be a numeric index or a string"first", "last", "before", or "after", same as dojo/dom-construct::place(). */ - placeAt(reference: String, position: number): any; + placeAt(reference: String, position?: number): any; /** * Place this widget somewhere in the DOM based * on standard domConstruct.place() conventions. @@ -76529,7 +76529,7 @@ declare module dijit { * @param reference Widget, DOMNode, or id of widget or DOMNode * @param position OptionalIf reference is a widget (or id of widget), and that widget has an ".addChild" method,it will be called passing this widget instance into that method, supplying the optionalposition index passed. In this case position (if specified) should be an integer.If reference is a DOMNode (or id matching a DOMNode but not a widget),the position argument can be a numeric index or a string"first", "last", "before", or "after", same as dojo/dom-construct::place(). */ - placeAt(reference: HTMLElement, position: number): any; + placeAt(reference: HTMLElement, position?: number): any; /** * Place this widget somewhere in the DOM based * on standard domConstruct.place() conventions. @@ -76540,7 +76540,7 @@ declare module dijit { * @param reference Widget, DOMNode, or id of widget or DOMNode * @param position OptionalIf reference is a widget (or id of widget), and that widget has an ".addChild" method,it will be called passing this widget instance into that method, supplying the optionalposition index passed. In this case position (if specified) should be an integer.If reference is a DOMNode (or id matching a DOMNode but not a widget),the position argument can be a numeric index or a string"first", "last", "before", or "after", same as dojo/dom-construct::place(). */ - placeAt(reference: dijit._WidgetBase, position: number): any; + placeAt(reference: dijit._WidgetBase, position?: number): any; /** * stop mousemove from selecting text on IE to be consistent with other browsers * @@ -77238,14 +77238,14 @@ declare module dijit { * @param name The property to get or set. If an object is passed here and nota string, its keys are used as names of attributes to be setand the value of the object as values to set in the widget. * @param value OptionalOptional. If provided, attr() operates as a setter. If omitted,the current value of the named property is returned. */ - attr(name: String, value: Object): any; + attr(name: String, value?: Object): any; /** * This method is deprecated, use get() or set() directly. * * @param name The property to get or set. If an object is passed here and nota string, its keys are used as names of attributes to be setand the value of the object as values to set in the widget. * @param value OptionalOptional. If provided, attr() operates as a setter. If omitted,the current value of the named property is returned. */ - attr(name: Object, value: Object): any; + attr(name: Object, value?: Object): any; /** * Construct the UI for this widget, setting this.domNode. * Most widgets will mixin dijit._TemplatedMixin, which implements this method. @@ -77395,7 +77395,7 @@ declare module dijit { * @param fcn Function reference. * @param delay OptionalDelay, defaults to 0. */ - defer(fcn: Function, delay: number): Object; + defer(fcn: Function, delay?: number): Object; /** * Destroy this widget, but not its descendants. Descendants means widgets inside of * this.containerNode. Will also destroy any resources (including widgets) registered via this.own(). @@ -77453,7 +77453,7 @@ declare module dijit { * @param eventObj Optional * @param callbackArgs Optional */ - emit(type: String, eventObj: Object, callbackArgs: any[]): any; + emit(type: String, eventObj?: Object, callbackArgs?: any[]): any; /** * Auto-corrections (such as trimming) that are applied to textbox * value on blur or form submit. @@ -77582,7 +77582,7 @@ declare module dijit { * @param reference Widget, DOMNode, or id of widget or DOMNode * @param position OptionalIf reference is a widget (or id of widget), and that widget has an ".addChild" method,it will be called passing this widget instance into that method, supplying the optionalposition index passed. In this case position (if specified) should be an integer.If reference is a DOMNode (or id matching a DOMNode but not a widget),the position argument can be a numeric index or a string"first", "last", "before", or "after", same as dojo/dom-construct::place(). */ - placeAt(reference: String, position: String): any; + placeAt(reference: String, position?: String): any; /** * Place this widget somewhere in the DOM based * on standard domConstruct.place() conventions. @@ -77593,7 +77593,7 @@ declare module dijit { * @param reference Widget, DOMNode, or id of widget or DOMNode * @param position OptionalIf reference is a widget (or id of widget), and that widget has an ".addChild" method,it will be called passing this widget instance into that method, supplying the optionalposition index passed. In this case position (if specified) should be an integer.If reference is a DOMNode (or id matching a DOMNode but not a widget),the position argument can be a numeric index or a string"first", "last", "before", or "after", same as dojo/dom-construct::place(). */ - placeAt(reference: HTMLElement, position: String): any; + placeAt(reference: HTMLElement, position?: String): any; /** * Place this widget somewhere in the DOM based * on standard domConstruct.place() conventions. @@ -77604,7 +77604,7 @@ declare module dijit { * @param reference Widget, DOMNode, or id of widget or DOMNode * @param position OptionalIf reference is a widget (or id of widget), and that widget has an ".addChild" method,it will be called passing this widget instance into that method, supplying the optionalposition index passed. In this case position (if specified) should be an integer.If reference is a DOMNode (or id matching a DOMNode but not a widget),the position argument can be a numeric index or a string"first", "last", "before", or "after", same as dojo/dom-construct::place(). */ - placeAt(reference: dijit._WidgetBase, position: String): any; + placeAt(reference: dijit._WidgetBase, position?: String): any; /** * Place this widget somewhere in the DOM based * on standard domConstruct.place() conventions. @@ -77615,7 +77615,7 @@ declare module dijit { * @param reference Widget, DOMNode, or id of widget or DOMNode * @param position OptionalIf reference is a widget (or id of widget), and that widget has an ".addChild" method,it will be called passing this widget instance into that method, supplying the optionalposition index passed. In this case position (if specified) should be an integer.If reference is a DOMNode (or id matching a DOMNode but not a widget),the position argument can be a numeric index or a string"first", "last", "before", or "after", same as dojo/dom-construct::place(). */ - placeAt(reference: String, position: number): any; + placeAt(reference: String, position?: number): any; /** * Place this widget somewhere in the DOM based * on standard domConstruct.place() conventions. @@ -77626,7 +77626,7 @@ declare module dijit { * @param reference Widget, DOMNode, or id of widget or DOMNode * @param position OptionalIf reference is a widget (or id of widget), and that widget has an ".addChild" method,it will be called passing this widget instance into that method, supplying the optionalposition index passed. In this case position (if specified) should be an integer.If reference is a DOMNode (or id matching a DOMNode but not a widget),the position argument can be a numeric index or a string"first", "last", "before", or "after", same as dojo/dom-construct::place(). */ - placeAt(reference: HTMLElement, position: number): any; + placeAt(reference: HTMLElement, position?: number): any; /** * Place this widget somewhere in the DOM based * on standard domConstruct.place() conventions. @@ -77637,7 +77637,7 @@ declare module dijit { * @param reference Widget, DOMNode, or id of widget or DOMNode * @param position OptionalIf reference is a widget (or id of widget), and that widget has an ".addChild" method,it will be called passing this widget instance into that method, supplying the optionalposition index passed. In this case position (if specified) should be an integer.If reference is a DOMNode (or id matching a DOMNode but not a widget),the position argument can be a numeric index or a string"first", "last", "before", or "after", same as dojo/dom-construct::place(). */ - placeAt(reference: dijit._WidgetBase, position: number): any; + placeAt(reference: dijit._WidgetBase, position?: number): any; /** * */ @@ -78491,14 +78491,14 @@ declare module dijit { * @param name The property to get or set. If an object is passed here and nota string, its keys are used as names of attributes to be setand the value of the object as values to set in the widget. * @param value OptionalOptional. If provided, attr() operates as a setter. If omitted,the current value of the named property is returned. */ - attr(name: String, value: Object): any; + attr(name: String, value?: Object): any; /** * This method is deprecated, use get() or set() directly. * * @param name The property to get or set. If an object is passed here and nota string, its keys are used as names of attributes to be setand the value of the object as values to set in the widget. * @param value OptionalOptional. If provided, attr() operates as a setter. If omitted,the current value of the named property is returned. */ - attr(name: Object, value: Object): any; + attr(name: Object, value?: Object): any; /** * */ @@ -78651,7 +78651,7 @@ declare module dijit { * @param fcn Function reference. * @param delay OptionalDelay, defaults to 0. */ - defer(fcn: Function, delay: number): Object; + defer(fcn: Function, delay?: number): Object; /** * Destroy this widget, but not its descendants. Descendants means widgets inside of * this.containerNode. Will also destroy any resources (including widgets) registered via this.own(). @@ -78716,7 +78716,7 @@ declare module dijit { * @param eventObj Optional * @param callbackArgs Optional */ - emit(type: String, eventObj: Object, callbackArgs: any[]): any; + emit(type: String, eventObj?: Object, callbackArgs?: any[]): any; /** * Auto-corrections (such as trimming) that are applied to textbox * value on blur or form submit. @@ -78900,7 +78900,7 @@ declare module dijit { * @param reference Widget, DOMNode, or id of widget or DOMNode * @param position OptionalIf reference is a widget (or id of widget), and that widget has an ".addChild" method,it will be called passing this widget instance into that method, supplying the optionalposition index passed. In this case position (if specified) should be an integer.If reference is a DOMNode (or id matching a DOMNode but not a widget),the position argument can be a numeric index or a string"first", "last", "before", or "after", same as dojo/dom-construct::place(). */ - placeAt(reference: String, position: String): any; + placeAt(reference: String, position?: String): any; /** * Place this widget somewhere in the DOM based * on standard domConstruct.place() conventions. @@ -78911,7 +78911,7 @@ declare module dijit { * @param reference Widget, DOMNode, or id of widget or DOMNode * @param position OptionalIf reference is a widget (or id of widget), and that widget has an ".addChild" method,it will be called passing this widget instance into that method, supplying the optionalposition index passed. In this case position (if specified) should be an integer.If reference is a DOMNode (or id matching a DOMNode but not a widget),the position argument can be a numeric index or a string"first", "last", "before", or "after", same as dojo/dom-construct::place(). */ - placeAt(reference: HTMLElement, position: String): any; + placeAt(reference: HTMLElement, position?: String): any; /** * Place this widget somewhere in the DOM based * on standard domConstruct.place() conventions. @@ -78922,7 +78922,7 @@ declare module dijit { * @param reference Widget, DOMNode, or id of widget or DOMNode * @param position OptionalIf reference is a widget (or id of widget), and that widget has an ".addChild" method,it will be called passing this widget instance into that method, supplying the optionalposition index passed. In this case position (if specified) should be an integer.If reference is a DOMNode (or id matching a DOMNode but not a widget),the position argument can be a numeric index or a string"first", "last", "before", or "after", same as dojo/dom-construct::place(). */ - placeAt(reference: dijit._WidgetBase, position: String): any; + placeAt(reference: dijit._WidgetBase, position?: String): any; /** * Place this widget somewhere in the DOM based * on standard domConstruct.place() conventions. @@ -78933,7 +78933,7 @@ declare module dijit { * @param reference Widget, DOMNode, or id of widget or DOMNode * @param position OptionalIf reference is a widget (or id of widget), and that widget has an ".addChild" method,it will be called passing this widget instance into that method, supplying the optionalposition index passed. In this case position (if specified) should be an integer.If reference is a DOMNode (or id matching a DOMNode but not a widget),the position argument can be a numeric index or a string"first", "last", "before", or "after", same as dojo/dom-construct::place(). */ - placeAt(reference: String, position: number): any; + placeAt(reference: String, position?: number): any; /** * Place this widget somewhere in the DOM based * on standard domConstruct.place() conventions. @@ -78944,7 +78944,7 @@ declare module dijit { * @param reference Widget, DOMNode, or id of widget or DOMNode * @param position OptionalIf reference is a widget (or id of widget), and that widget has an ".addChild" method,it will be called passing this widget instance into that method, supplying the optionalposition index passed. In this case position (if specified) should be an integer.If reference is a DOMNode (or id matching a DOMNode but not a widget),the position argument can be a numeric index or a string"first", "last", "before", or "after", same as dojo/dom-construct::place(). */ - placeAt(reference: HTMLElement, position: number): any; + placeAt(reference: HTMLElement, position?: number): any; /** * Place this widget somewhere in the DOM based * on standard domConstruct.place() conventions. @@ -78955,7 +78955,7 @@ declare module dijit { * @param reference Widget, DOMNode, or id of widget or DOMNode * @param position OptionalIf reference is a widget (or id of widget), and that widget has an ".addChild" method,it will be called passing this widget instance into that method, supplying the optionalposition index passed. In this case position (if specified) should be an integer.If reference is a DOMNode (or id matching a DOMNode but not a widget),the position argument can be a numeric index or a string"first", "last", "before", or "after", same as dojo/dom-construct::place(). */ - placeAt(reference: dijit._WidgetBase, position: number): any; + placeAt(reference: dijit._WidgetBase, position?: number): any; /** * */ @@ -79626,14 +79626,14 @@ declare module dijit { * @param name The property to get or set. If an object is passed here and nota string, its keys are used as names of attributes to be setand the value of the object as values to set in the widget. * @param value OptionalOptional. If provided, attr() operates as a setter. If omitted,the current value of the named property is returned. */ - attr(name: String, value: Object): any; + attr(name: String, value?: Object): any; /** * This method is deprecated, use get() or set() directly. * * @param name The property to get or set. If an object is passed here and nota string, its keys are used as names of attributes to be setand the value of the object as values to set in the widget. * @param value OptionalOptional. If provided, attr() operates as a setter. If omitted,the current value of the named property is returned. */ - attr(name: Object, value: Object): any; + attr(name: Object, value?: Object): any; /** * Construct the UI for this widget, setting this.domNode. * Most widgets will mixin dijit._TemplatedMixin, which implements this method. @@ -79783,7 +79783,7 @@ declare module dijit { * @param fcn Function reference. * @param delay OptionalDelay, defaults to 0. */ - defer(fcn: Function, delay: number): Object; + defer(fcn: Function, delay?: number): Object; /** * Destroy this widget, but not its descendants. Descendants means widgets inside of * this.containerNode. Will also destroy any resources (including widgets) registered via this.own(). @@ -79841,7 +79841,7 @@ declare module dijit { * @param eventObj Optional * @param callbackArgs Optional */ - emit(type: String, eventObj: Object, callbackArgs: any[]): any; + emit(type: String, eventObj?: Object, callbackArgs?: any[]): any; /** * Put focus on this widget * @@ -79933,7 +79933,7 @@ declare module dijit { * @param reference Widget, DOMNode, or id of widget or DOMNode * @param position OptionalIf reference is a widget (or id of widget), and that widget has an ".addChild" method,it will be called passing this widget instance into that method, supplying the optionalposition index passed. In this case position (if specified) should be an integer.If reference is a DOMNode (or id matching a DOMNode but not a widget),the position argument can be a numeric index or a string"first", "last", "before", or "after", same as dojo/dom-construct::place(). */ - placeAt(reference: String, position: String): any; + placeAt(reference: String, position?: String): any; /** * Place this widget somewhere in the DOM based * on standard domConstruct.place() conventions. @@ -79944,7 +79944,7 @@ declare module dijit { * @param reference Widget, DOMNode, or id of widget or DOMNode * @param position OptionalIf reference is a widget (or id of widget), and that widget has an ".addChild" method,it will be called passing this widget instance into that method, supplying the optionalposition index passed. In this case position (if specified) should be an integer.If reference is a DOMNode (or id matching a DOMNode but not a widget),the position argument can be a numeric index or a string"first", "last", "before", or "after", same as dojo/dom-construct::place(). */ - placeAt(reference: HTMLElement, position: String): any; + placeAt(reference: HTMLElement, position?: String): any; /** * Place this widget somewhere in the DOM based * on standard domConstruct.place() conventions. @@ -79955,7 +79955,7 @@ declare module dijit { * @param reference Widget, DOMNode, or id of widget or DOMNode * @param position OptionalIf reference is a widget (or id of widget), and that widget has an ".addChild" method,it will be called passing this widget instance into that method, supplying the optionalposition index passed. In this case position (if specified) should be an integer.If reference is a DOMNode (or id matching a DOMNode but not a widget),the position argument can be a numeric index or a string"first", "last", "before", or "after", same as dojo/dom-construct::place(). */ - placeAt(reference: dijit._WidgetBase, position: String): any; + placeAt(reference: dijit._WidgetBase, position?: String): any; /** * Place this widget somewhere in the DOM based * on standard domConstruct.place() conventions. @@ -79966,7 +79966,7 @@ declare module dijit { * @param reference Widget, DOMNode, or id of widget or DOMNode * @param position OptionalIf reference is a widget (or id of widget), and that widget has an ".addChild" method,it will be called passing this widget instance into that method, supplying the optionalposition index passed. In this case position (if specified) should be an integer.If reference is a DOMNode (or id matching a DOMNode but not a widget),the position argument can be a numeric index or a string"first", "last", "before", or "after", same as dojo/dom-construct::place(). */ - placeAt(reference: String, position: number): any; + placeAt(reference: String, position?: number): any; /** * Place this widget somewhere in the DOM based * on standard domConstruct.place() conventions. @@ -79977,7 +79977,7 @@ declare module dijit { * @param reference Widget, DOMNode, or id of widget or DOMNode * @param position OptionalIf reference is a widget (or id of widget), and that widget has an ".addChild" method,it will be called passing this widget instance into that method, supplying the optionalposition index passed. In this case position (if specified) should be an integer.If reference is a DOMNode (or id matching a DOMNode but not a widget),the position argument can be a numeric index or a string"first", "last", "before", or "after", same as dojo/dom-construct::place(). */ - placeAt(reference: HTMLElement, position: number): any; + placeAt(reference: HTMLElement, position?: number): any; /** * Place this widget somewhere in the DOM based * on standard domConstruct.place() conventions. @@ -79988,7 +79988,7 @@ declare module dijit { * @param reference Widget, DOMNode, or id of widget or DOMNode * @param position OptionalIf reference is a widget (or id of widget), and that widget has an ".addChild" method,it will be called passing this widget instance into that method, supplying the optionalposition index passed. In this case position (if specified) should be an integer.If reference is a DOMNode (or id matching a DOMNode but not a widget),the position argument can be a numeric index or a string"first", "last", "before", or "after", same as dojo/dom-construct::place(). */ - placeAt(reference: dijit._WidgetBase, position: number): any; + placeAt(reference: dijit._WidgetBase, position?: number): any; /** * */ @@ -80502,14 +80502,14 @@ declare module dijit { * @param name The property to get or set. If an object is passed here and nota string, its keys are used as names of attributes to be setand the value of the object as values to set in the widget. * @param value OptionalOptional. If provided, attr() operates as a setter. If omitted,the current value of the named property is returned. */ - attr(name: String, value: Object): any; + attr(name: String, value?: Object): any; /** * This method is deprecated, use get() or set() directly. * * @param name The property to get or set. If an object is passed here and nota string, its keys are used as names of attributes to be setand the value of the object as values to set in the widget. * @param value OptionalOptional. If provided, attr() operates as a setter. If omitted,the current value of the named property is returned. */ - attr(name: Object, value: Object): any; + attr(name: Object, value?: Object): any; /** * */ @@ -80650,7 +80650,7 @@ declare module dijit { * @param fcn Function reference. * @param delay OptionalDelay, defaults to 0. */ - defer(fcn: Function, delay: number): Object; + defer(fcn: Function, delay?: number): Object; /** * Destroy this widget, but not its descendants. Descendants means widgets inside of * this.containerNode. Will also destroy any resources (including widgets) registered via this.own(). @@ -80708,7 +80708,7 @@ declare module dijit { * @param eventObj Optional * @param callbackArgs Optional */ - emit(type: String, eventObj: Object, callbackArgs: any[]): any; + emit(type: String, eventObj?: Object, callbackArgs?: any[]): any; /** * Get a property from a widget. * Get a named property from a widget. The property may @@ -80790,7 +80790,7 @@ declare module dijit { * @param reference Widget, DOMNode, or id of widget or DOMNode * @param position OptionalIf reference is a widget (or id of widget), and that widget has an ".addChild" method,it will be called passing this widget instance into that method, supplying the optionalposition index passed. In this case position (if specified) should be an integer.If reference is a DOMNode (or id matching a DOMNode but not a widget),the position argument can be a numeric index or a string"first", "last", "before", or "after", same as dojo/dom-construct::place(). */ - placeAt(reference: String, position: String): any; + placeAt(reference: String, position?: String): any; /** * Place this widget somewhere in the DOM based * on standard domConstruct.place() conventions. @@ -80801,7 +80801,7 @@ declare module dijit { * @param reference Widget, DOMNode, or id of widget or DOMNode * @param position OptionalIf reference is a widget (or id of widget), and that widget has an ".addChild" method,it will be called passing this widget instance into that method, supplying the optionalposition index passed. In this case position (if specified) should be an integer.If reference is a DOMNode (or id matching a DOMNode but not a widget),the position argument can be a numeric index or a string"first", "last", "before", or "after", same as dojo/dom-construct::place(). */ - placeAt(reference: HTMLElement, position: String): any; + placeAt(reference: HTMLElement, position?: String): any; /** * Place this widget somewhere in the DOM based * on standard domConstruct.place() conventions. @@ -80812,7 +80812,7 @@ declare module dijit { * @param reference Widget, DOMNode, or id of widget or DOMNode * @param position OptionalIf reference is a widget (or id of widget), and that widget has an ".addChild" method,it will be called passing this widget instance into that method, supplying the optionalposition index passed. In this case position (if specified) should be an integer.If reference is a DOMNode (or id matching a DOMNode but not a widget),the position argument can be a numeric index or a string"first", "last", "before", or "after", same as dojo/dom-construct::place(). */ - placeAt(reference: dijit._WidgetBase, position: String): any; + placeAt(reference: dijit._WidgetBase, position?: String): any; /** * Place this widget somewhere in the DOM based * on standard domConstruct.place() conventions. @@ -80823,7 +80823,7 @@ declare module dijit { * @param reference Widget, DOMNode, or id of widget or DOMNode * @param position OptionalIf reference is a widget (or id of widget), and that widget has an ".addChild" method,it will be called passing this widget instance into that method, supplying the optionalposition index passed. In this case position (if specified) should be an integer.If reference is a DOMNode (or id matching a DOMNode but not a widget),the position argument can be a numeric index or a string"first", "last", "before", or "after", same as dojo/dom-construct::place(). */ - placeAt(reference: String, position: number): any; + placeAt(reference: String, position?: number): any; /** * Place this widget somewhere in the DOM based * on standard domConstruct.place() conventions. @@ -80834,7 +80834,7 @@ declare module dijit { * @param reference Widget, DOMNode, or id of widget or DOMNode * @param position OptionalIf reference is a widget (or id of widget), and that widget has an ".addChild" method,it will be called passing this widget instance into that method, supplying the optionalposition index passed. In this case position (if specified) should be an integer.If reference is a DOMNode (or id matching a DOMNode but not a widget),the position argument can be a numeric index or a string"first", "last", "before", or "after", same as dojo/dom-construct::place(). */ - placeAt(reference: HTMLElement, position: number): any; + placeAt(reference: HTMLElement, position?: number): any; /** * Place this widget somewhere in the DOM based * on standard domConstruct.place() conventions. @@ -80845,7 +80845,7 @@ declare module dijit { * @param reference Widget, DOMNode, or id of widget or DOMNode * @param position OptionalIf reference is a widget (or id of widget), and that widget has an ".addChild" method,it will be called passing this widget instance into that method, supplying the optionalposition index passed. In this case position (if specified) should be an integer.If reference is a DOMNode (or id matching a DOMNode but not a widget),the position argument can be a numeric index or a string"first", "last", "before", or "after", same as dojo/dom-construct::place(). */ - placeAt(reference: dijit._WidgetBase, position: number): any; + placeAt(reference: dijit._WidgetBase, position?: number): any; /** * */ @@ -81374,14 +81374,14 @@ declare module dijit { * @param name The property to get or set. If an object is passed here and nota string, its keys are used as names of attributes to be setand the value of the object as values to set in the widget. * @param value OptionalOptional. If provided, attr() operates as a setter. If omitted,the current value of the named property is returned. */ - attr(name: String, value: Object): any; + attr(name: String, value?: Object): any; /** * This method is deprecated, use get() or set() directly. * * @param name The property to get or set. If an object is passed here and nota string, its keys are used as names of attributes to be setand the value of the object as values to set in the widget. * @param value OptionalOptional. If provided, attr() operates as a setter. If omitted,the current value of the named property is returned. */ - attr(name: Object, value: Object): any; + attr(name: Object, value?: Object): any; /** * */ @@ -81522,7 +81522,7 @@ declare module dijit { * @param fcn Function reference. * @param delay OptionalDelay, defaults to 0. */ - defer(fcn: Function, delay: number): Object; + defer(fcn: Function, delay?: number): Object; /** * Destroy this widget, but not its descendants. Descendants means widgets inside of * this.containerNode. Will also destroy any resources (including widgets) registered via this.own(). @@ -81580,7 +81580,7 @@ declare module dijit { * @param eventObj Optional * @param callbackArgs Optional */ - emit(type: String, eventObj: Object, callbackArgs: any[]): any; + emit(type: String, eventObj?: Object, callbackArgs?: any[]): any; /** * Get a property from a widget. * Get a named property from a widget. The property may @@ -81668,7 +81668,7 @@ declare module dijit { * @param reference Widget, DOMNode, or id of widget or DOMNode * @param position OptionalIf reference is a widget (or id of widget), and that widget has an ".addChild" method,it will be called passing this widget instance into that method, supplying the optionalposition index passed. In this case position (if specified) should be an integer.If reference is a DOMNode (or id matching a DOMNode but not a widget),the position argument can be a numeric index or a string"first", "last", "before", or "after", same as dojo/dom-construct::place(). */ - placeAt(reference: String, position: String): any; + placeAt(reference: String, position?: String): any; /** * Place this widget somewhere in the DOM based * on standard domConstruct.place() conventions. @@ -81679,7 +81679,7 @@ declare module dijit { * @param reference Widget, DOMNode, or id of widget or DOMNode * @param position OptionalIf reference is a widget (or id of widget), and that widget has an ".addChild" method,it will be called passing this widget instance into that method, supplying the optionalposition index passed. In this case position (if specified) should be an integer.If reference is a DOMNode (or id matching a DOMNode but not a widget),the position argument can be a numeric index or a string"first", "last", "before", or "after", same as dojo/dom-construct::place(). */ - placeAt(reference: HTMLElement, position: String): any; + placeAt(reference: HTMLElement, position?: String): any; /** * Place this widget somewhere in the DOM based * on standard domConstruct.place() conventions. @@ -81690,7 +81690,7 @@ declare module dijit { * @param reference Widget, DOMNode, or id of widget or DOMNode * @param position OptionalIf reference is a widget (or id of widget), and that widget has an ".addChild" method,it will be called passing this widget instance into that method, supplying the optionalposition index passed. In this case position (if specified) should be an integer.If reference is a DOMNode (or id matching a DOMNode but not a widget),the position argument can be a numeric index or a string"first", "last", "before", or "after", same as dojo/dom-construct::place(). */ - placeAt(reference: dijit._WidgetBase, position: String): any; + placeAt(reference: dijit._WidgetBase, position?: String): any; /** * Place this widget somewhere in the DOM based * on standard domConstruct.place() conventions. @@ -81701,7 +81701,7 @@ declare module dijit { * @param reference Widget, DOMNode, or id of widget or DOMNode * @param position OptionalIf reference is a widget (or id of widget), and that widget has an ".addChild" method,it will be called passing this widget instance into that method, supplying the optionalposition index passed. In this case position (if specified) should be an integer.If reference is a DOMNode (or id matching a DOMNode but not a widget),the position argument can be a numeric index or a string"first", "last", "before", or "after", same as dojo/dom-construct::place(). */ - placeAt(reference: String, position: number): any; + placeAt(reference: String, position?: number): any; /** * Place this widget somewhere in the DOM based * on standard domConstruct.place() conventions. @@ -81712,7 +81712,7 @@ declare module dijit { * @param reference Widget, DOMNode, or id of widget or DOMNode * @param position OptionalIf reference is a widget (or id of widget), and that widget has an ".addChild" method,it will be called passing this widget instance into that method, supplying the optionalposition index passed. In this case position (if specified) should be an integer.If reference is a DOMNode (or id matching a DOMNode but not a widget),the position argument can be a numeric index or a string"first", "last", "before", or "after", same as dojo/dom-construct::place(). */ - placeAt(reference: HTMLElement, position: number): any; + placeAt(reference: HTMLElement, position?: number): any; /** * Place this widget somewhere in the DOM based * on standard domConstruct.place() conventions. @@ -81723,7 +81723,7 @@ declare module dijit { * @param reference Widget, DOMNode, or id of widget or DOMNode * @param position OptionalIf reference is a widget (or id of widget), and that widget has an ".addChild" method,it will be called passing this widget instance into that method, supplying the optionalposition index passed. In this case position (if specified) should be an integer.If reference is a DOMNode (or id matching a DOMNode but not a widget),the position argument can be a numeric index or a string"first", "last", "before", or "after", same as dojo/dom-construct::place(). */ - placeAt(reference: dijit._WidgetBase, position: number): any; + placeAt(reference: dijit._WidgetBase, position?: number): any; /** * */ @@ -82467,14 +82467,14 @@ declare module dijit { * @param name The property to get or set. If an object is passed here and nota string, its keys are used as names of attributes to be setand the value of the object as values to set in the widget. * @param value OptionalOptional. If provided, attr() operates as a setter. If omitted,the current value of the named property is returned. */ - attr(name: String, value: Object): any; + attr(name: String, value?: Object): any; /** * This method is deprecated, use get() or set() directly. * * @param name The property to get or set. If an object is passed here and nota string, its keys are used as names of attributes to be setand the value of the object as values to set in the widget. * @param value OptionalOptional. If provided, attr() operates as a setter. If omitted,the current value of the named property is returned. */ - attr(name: Object, value: Object): any; + attr(name: Object, value?: Object): any; /** * Construct the UI for this widget, setting this.domNode. * Most widgets will mixin dijit._TemplatedMixin, which implements this method. @@ -82624,7 +82624,7 @@ declare module dijit { * @param fcn Function reference. * @param delay OptionalDelay, defaults to 0. */ - defer(fcn: Function, delay: number): Object; + defer(fcn: Function, delay?: number): Object; /** * Destroy this widget, but not its descendants. Descendants means widgets inside of * this.containerNode. Will also destroy any resources (including widgets) registered via this.own(). @@ -82689,7 +82689,7 @@ declare module dijit { * @param eventObj Optional * @param callbackArgs Optional */ - emit(type: String, eventObj: Object, callbackArgs: any[]): any; + emit(type: String, eventObj?: Object, callbackArgs?: any[]): any; /** * Auto-corrections (such as trimming) that are applied to textbox * value on blur or form submit. @@ -82830,7 +82830,7 @@ declare module dijit { * @param reference Widget, DOMNode, or id of widget or DOMNode * @param position OptionalIf reference is a widget (or id of widget), and that widget has an ".addChild" method,it will be called passing this widget instance into that method, supplying the optionalposition index passed. In this case position (if specified) should be an integer.If reference is a DOMNode (or id matching a DOMNode but not a widget),the position argument can be a numeric index or a string"first", "last", "before", or "after", same as dojo/dom-construct::place(). */ - placeAt(reference: String, position: String): any; + placeAt(reference: String, position?: String): any; /** * Place this widget somewhere in the DOM based * on standard domConstruct.place() conventions. @@ -82841,7 +82841,7 @@ declare module dijit { * @param reference Widget, DOMNode, or id of widget or DOMNode * @param position OptionalIf reference is a widget (or id of widget), and that widget has an ".addChild" method,it will be called passing this widget instance into that method, supplying the optionalposition index passed. In this case position (if specified) should be an integer.If reference is a DOMNode (or id matching a DOMNode but not a widget),the position argument can be a numeric index or a string"first", "last", "before", or "after", same as dojo/dom-construct::place(). */ - placeAt(reference: HTMLElement, position: String): any; + placeAt(reference: HTMLElement, position?: String): any; /** * Place this widget somewhere in the DOM based * on standard domConstruct.place() conventions. @@ -82852,7 +82852,7 @@ declare module dijit { * @param reference Widget, DOMNode, or id of widget or DOMNode * @param position OptionalIf reference is a widget (or id of widget), and that widget has an ".addChild" method,it will be called passing this widget instance into that method, supplying the optionalposition index passed. In this case position (if specified) should be an integer.If reference is a DOMNode (or id matching a DOMNode but not a widget),the position argument can be a numeric index or a string"first", "last", "before", or "after", same as dojo/dom-construct::place(). */ - placeAt(reference: dijit._WidgetBase, position: String): any; + placeAt(reference: dijit._WidgetBase, position?: String): any; /** * Place this widget somewhere in the DOM based * on standard domConstruct.place() conventions. @@ -82863,7 +82863,7 @@ declare module dijit { * @param reference Widget, DOMNode, or id of widget or DOMNode * @param position OptionalIf reference is a widget (or id of widget), and that widget has an ".addChild" method,it will be called passing this widget instance into that method, supplying the optionalposition index passed. In this case position (if specified) should be an integer.If reference is a DOMNode (or id matching a DOMNode but not a widget),the position argument can be a numeric index or a string"first", "last", "before", or "after", same as dojo/dom-construct::place(). */ - placeAt(reference: String, position: number): any; + placeAt(reference: String, position?: number): any; /** * Place this widget somewhere in the DOM based * on standard domConstruct.place() conventions. @@ -82874,7 +82874,7 @@ declare module dijit { * @param reference Widget, DOMNode, or id of widget or DOMNode * @param position OptionalIf reference is a widget (or id of widget), and that widget has an ".addChild" method,it will be called passing this widget instance into that method, supplying the optionalposition index passed. In this case position (if specified) should be an integer.If reference is a DOMNode (or id matching a DOMNode but not a widget),the position argument can be a numeric index or a string"first", "last", "before", or "after", same as dojo/dom-construct::place(). */ - placeAt(reference: HTMLElement, position: number): any; + placeAt(reference: HTMLElement, position?: number): any; /** * Place this widget somewhere in the DOM based * on standard domConstruct.place() conventions. @@ -82885,7 +82885,7 @@ declare module dijit { * @param reference Widget, DOMNode, or id of widget or DOMNode * @param position OptionalIf reference is a widget (or id of widget), and that widget has an ".addChild" method,it will be called passing this widget instance into that method, supplying the optionalposition index passed. In this case position (if specified) should be an integer.If reference is a DOMNode (or id matching a DOMNode but not a widget),the position argument can be a numeric index or a string"first", "last", "before", or "after", same as dojo/dom-construct::place(). */ - placeAt(reference: dijit._WidgetBase, position: number): any; + placeAt(reference: dijit._WidgetBase, position?: number): any; /** * */ @@ -83563,21 +83563,21 @@ declare module dijit { * @param widget * @param insertIndex Optional */ - addChild(widget: dijit._WidgetBase, insertIndex: number): void; + addChild(widget: dijit._WidgetBase, insertIndex?: number): void; /** * This method is deprecated, use get() or set() directly. * * @param name The property to get or set. If an object is passed here and nota string, its keys are used as names of attributes to be setand the value of the object as values to set in the widget. * @param value OptionalOptional. If provided, attr() operates as a setter. If omitted,the current value of the named property is returned. */ - attr(name: String, value: Object): any; + attr(name: String, value?: Object): any; /** * This method is deprecated, use get() or set() directly. * * @param name The property to get or set. If an object is passed here and nota string, its keys are used as names of attributes to be setand the value of the object as values to set in the widget. * @param value OptionalOptional. If provided, attr() operates as a setter. If omitted,the current value of the named property is returned. */ - attr(name: Object, value: Object): any; + attr(name: Object, value?: Object): any; /** * */ @@ -83725,7 +83725,7 @@ declare module dijit { * @param fcn Function reference. * @param delay OptionalDelay, defaults to 0. */ - defer(fcn: Function, delay: number): Object; + defer(fcn: Function, delay?: number): Object; /** * */ @@ -83773,7 +83773,7 @@ declare module dijit { * @param eventObj Optional * @param callbackArgs Optional */ - emit(type: String, eventObj: Object, callbackArgs: any[]): any; + emit(type: String, eventObj?: Object, callbackArgs?: any[]): any; /** * Put focus on this widget * @@ -83876,7 +83876,7 @@ declare module dijit { * @param reference Widget, DOMNode, or id of widget or DOMNode * @param position OptionalIf reference is a widget (or id of widget), and that widget has an ".addChild" method,it will be called passing this widget instance into that method, supplying the optionalposition index passed. In this case position (if specified) should be an integer.If reference is a DOMNode (or id matching a DOMNode but not a widget),the position argument can be a numeric index or a string"first", "last", "before", or "after", same as dojo/dom-construct::place(). */ - placeAt(reference: String, position: String): any; + placeAt(reference: String, position?: String): any; /** * Place this widget somewhere in the DOM based * on standard domConstruct.place() conventions. @@ -83887,7 +83887,7 @@ declare module dijit { * @param reference Widget, DOMNode, or id of widget or DOMNode * @param position OptionalIf reference is a widget (or id of widget), and that widget has an ".addChild" method,it will be called passing this widget instance into that method, supplying the optionalposition index passed. In this case position (if specified) should be an integer.If reference is a DOMNode (or id matching a DOMNode but not a widget),the position argument can be a numeric index or a string"first", "last", "before", or "after", same as dojo/dom-construct::place(). */ - placeAt(reference: HTMLElement, position: String): any; + placeAt(reference: HTMLElement, position?: String): any; /** * Place this widget somewhere in the DOM based * on standard domConstruct.place() conventions. @@ -83898,7 +83898,7 @@ declare module dijit { * @param reference Widget, DOMNode, or id of widget or DOMNode * @param position OptionalIf reference is a widget (or id of widget), and that widget has an ".addChild" method,it will be called passing this widget instance into that method, supplying the optionalposition index passed. In this case position (if specified) should be an integer.If reference is a DOMNode (or id matching a DOMNode but not a widget),the position argument can be a numeric index or a string"first", "last", "before", or "after", same as dojo/dom-construct::place(). */ - placeAt(reference: dijit._WidgetBase, position: String): any; + placeAt(reference: dijit._WidgetBase, position?: String): any; /** * Place this widget somewhere in the DOM based * on standard domConstruct.place() conventions. @@ -83909,7 +83909,7 @@ declare module dijit { * @param reference Widget, DOMNode, or id of widget or DOMNode * @param position OptionalIf reference is a widget (or id of widget), and that widget has an ".addChild" method,it will be called passing this widget instance into that method, supplying the optionalposition index passed. In this case position (if specified) should be an integer.If reference is a DOMNode (or id matching a DOMNode but not a widget),the position argument can be a numeric index or a string"first", "last", "before", or "after", same as dojo/dom-construct::place(). */ - placeAt(reference: String, position: number): any; + placeAt(reference: String, position?: number): any; /** * Place this widget somewhere in the DOM based * on standard domConstruct.place() conventions. @@ -83920,7 +83920,7 @@ declare module dijit { * @param reference Widget, DOMNode, or id of widget or DOMNode * @param position OptionalIf reference is a widget (or id of widget), and that widget has an ".addChild" method,it will be called passing this widget instance into that method, supplying the optionalposition index passed. In this case position (if specified) should be an integer.If reference is a DOMNode (or id matching a DOMNode but not a widget),the position argument can be a numeric index or a string"first", "last", "before", or "after", same as dojo/dom-construct::place(). */ - placeAt(reference: HTMLElement, position: number): any; + placeAt(reference: HTMLElement, position?: number): any; /** * Place this widget somewhere in the DOM based * on standard domConstruct.place() conventions. @@ -83931,7 +83931,7 @@ declare module dijit { * @param reference Widget, DOMNode, or id of widget or DOMNode * @param position OptionalIf reference is a widget (or id of widget), and that widget has an ".addChild" method,it will be called passing this widget instance into that method, supplying the optionalposition index passed. In this case position (if specified) should be an integer.If reference is a DOMNode (or id matching a DOMNode but not a widget),the position argument can be a numeric index or a string"first", "last", "before", or "after", same as dojo/dom-construct::place(). */ - placeAt(reference: dijit._WidgetBase, position: number): any; + placeAt(reference: dijit._WidgetBase, position?: number): any; /** * */ @@ -84460,14 +84460,14 @@ declare module dijit { * @param name The property to get or set. If an object is passed here and nota string, its keys are used as names of attributes to be setand the value of the object as values to set in the widget. * @param value OptionalOptional. If provided, attr() operates as a setter. If omitted,the current value of the named property is returned. */ - attr(name: String, value: Object): any; + attr(name: String, value?: Object): any; /** * This method is deprecated, use get() or set() directly. * * @param name The property to get or set. If an object is passed here and nota string, its keys are used as names of attributes to be setand the value of the object as values to set in the widget. * @param value OptionalOptional. If provided, attr() operates as a setter. If omitted,the current value of the named property is returned. */ - attr(name: Object, value: Object): any; + attr(name: Object, value?: Object): any; /** * */ @@ -84608,7 +84608,7 @@ declare module dijit { * @param fcn Function reference. * @param delay OptionalDelay, defaults to 0. */ - defer(fcn: Function, delay: number): Object; + defer(fcn: Function, delay?: number): Object; /** * Destroy this widget, but not its descendants. Descendants means widgets inside of * this.containerNode. Will also destroy any resources (including widgets) registered via this.own(). @@ -84666,7 +84666,7 @@ declare module dijit { * @param eventObj Optional * @param callbackArgs Optional */ - emit(type: String, eventObj: Object, callbackArgs: any[]): any; + emit(type: String, eventObj?: Object, callbackArgs?: any[]): any; /** * Get a property from a widget. * Get a named property from a widget. The property may @@ -84787,7 +84787,7 @@ declare module dijit { * @param reference Widget, DOMNode, or id of widget or DOMNode * @param position OptionalIf reference is a widget (or id of widget), and that widget has an ".addChild" method,it will be called passing this widget instance into that method, supplying the optionalposition index passed. In this case position (if specified) should be an integer.If reference is a DOMNode (or id matching a DOMNode but not a widget),the position argument can be a numeric index or a string"first", "last", "before", or "after", same as dojo/dom-construct::place(). */ - placeAt(reference: String, position: String): any; + placeAt(reference: String, position?: String): any; /** * Place this widget somewhere in the DOM based * on standard domConstruct.place() conventions. @@ -84798,7 +84798,7 @@ declare module dijit { * @param reference Widget, DOMNode, or id of widget or DOMNode * @param position OptionalIf reference is a widget (or id of widget), and that widget has an ".addChild" method,it will be called passing this widget instance into that method, supplying the optionalposition index passed. In this case position (if specified) should be an integer.If reference is a DOMNode (or id matching a DOMNode but not a widget),the position argument can be a numeric index or a string"first", "last", "before", or "after", same as dojo/dom-construct::place(). */ - placeAt(reference: HTMLElement, position: String): any; + placeAt(reference: HTMLElement, position?: String): any; /** * Place this widget somewhere in the DOM based * on standard domConstruct.place() conventions. @@ -84809,7 +84809,7 @@ declare module dijit { * @param reference Widget, DOMNode, or id of widget or DOMNode * @param position OptionalIf reference is a widget (or id of widget), and that widget has an ".addChild" method,it will be called passing this widget instance into that method, supplying the optionalposition index passed. In this case position (if specified) should be an integer.If reference is a DOMNode (or id matching a DOMNode but not a widget),the position argument can be a numeric index or a string"first", "last", "before", or "after", same as dojo/dom-construct::place(). */ - placeAt(reference: dijit._WidgetBase, position: String): any; + placeAt(reference: dijit._WidgetBase, position?: String): any; /** * Place this widget somewhere in the DOM based * on standard domConstruct.place() conventions. @@ -84820,7 +84820,7 @@ declare module dijit { * @param reference Widget, DOMNode, or id of widget or DOMNode * @param position OptionalIf reference is a widget (or id of widget), and that widget has an ".addChild" method,it will be called passing this widget instance into that method, supplying the optionalposition index passed. In this case position (if specified) should be an integer.If reference is a DOMNode (or id matching a DOMNode but not a widget),the position argument can be a numeric index or a string"first", "last", "before", or "after", same as dojo/dom-construct::place(). */ - placeAt(reference: String, position: number): any; + placeAt(reference: String, position?: number): any; /** * Place this widget somewhere in the DOM based * on standard domConstruct.place() conventions. @@ -84831,7 +84831,7 @@ declare module dijit { * @param reference Widget, DOMNode, or id of widget or DOMNode * @param position OptionalIf reference is a widget (or id of widget), and that widget has an ".addChild" method,it will be called passing this widget instance into that method, supplying the optionalposition index passed. In this case position (if specified) should be an integer.If reference is a DOMNode (or id matching a DOMNode but not a widget),the position argument can be a numeric index or a string"first", "last", "before", or "after", same as dojo/dom-construct::place(). */ - placeAt(reference: HTMLElement, position: number): any; + placeAt(reference: HTMLElement, position?: number): any; /** * Place this widget somewhere in the DOM based * on standard domConstruct.place() conventions. @@ -84842,7 +84842,7 @@ declare module dijit { * @param reference Widget, DOMNode, or id of widget or DOMNode * @param position OptionalIf reference is a widget (or id of widget), and that widget has an ".addChild" method,it will be called passing this widget instance into that method, supplying the optionalposition index passed. In this case position (if specified) should be an integer.If reference is a DOMNode (or id matching a DOMNode but not a widget),the position argument can be a numeric index or a string"first", "last", "before", or "after", same as dojo/dom-construct::place(). */ - placeAt(reference: dijit._WidgetBase, position: number): any; + placeAt(reference: dijit._WidgetBase, position?: number): any; /** * */ @@ -85354,14 +85354,14 @@ declare module dijit { * @param name The property to get or set. If an object is passed here and nota string, its keys are used as names of attributes to be setand the value of the object as values to set in the widget. * @param value OptionalOptional. If provided, attr() operates as a setter. If omitted,the current value of the named property is returned. */ - attr(name: String, value: Object): any; + attr(name: String, value?: Object): any; /** * This method is deprecated, use get() or set() directly. * * @param name The property to get or set. If an object is passed here and nota string, its keys are used as names of attributes to be setand the value of the object as values to set in the widget. * @param value OptionalOptional. If provided, attr() operates as a setter. If omitted,the current value of the named property is returned. */ - attr(name: Object, value: Object): any; + attr(name: Object, value?: Object): any; /** * Go back to previous page. * @@ -85512,7 +85512,7 @@ declare module dijit { * @param fcn Function reference. * @param delay OptionalDelay, defaults to 0. */ - defer(fcn: Function, delay: number): Object; + defer(fcn: Function, delay?: number): Object; /** * */ @@ -85558,7 +85558,7 @@ declare module dijit { * @param eventObj Optional * @param callbackArgs Optional */ - emit(type: String, eventObj: Object, callbackArgs: any[]): any; + emit(type: String, eventObj?: Object, callbackArgs?: any[]): any; /** * Advance to next page. * @@ -85669,7 +85669,7 @@ declare module dijit { * @param reference Widget, DOMNode, or id of widget or DOMNode * @param position OptionalIf reference is a widget (or id of widget), and that widget has an ".addChild" method,it will be called passing this widget instance into that method, supplying the optionalposition index passed. In this case position (if specified) should be an integer.If reference is a DOMNode (or id matching a DOMNode but not a widget),the position argument can be a numeric index or a string"first", "last", "before", or "after", same as dojo/dom-construct::place(). */ - placeAt(reference: String, position: String): any; + placeAt(reference: String, position?: String): any; /** * Place this widget somewhere in the DOM based * on standard domConstruct.place() conventions. @@ -85680,7 +85680,7 @@ declare module dijit { * @param reference Widget, DOMNode, or id of widget or DOMNode * @param position OptionalIf reference is a widget (or id of widget), and that widget has an ".addChild" method,it will be called passing this widget instance into that method, supplying the optionalposition index passed. In this case position (if specified) should be an integer.If reference is a DOMNode (or id matching a DOMNode but not a widget),the position argument can be a numeric index or a string"first", "last", "before", or "after", same as dojo/dom-construct::place(). */ - placeAt(reference: HTMLElement, position: String): any; + placeAt(reference: HTMLElement, position?: String): any; /** * Place this widget somewhere in the DOM based * on standard domConstruct.place() conventions. @@ -85691,7 +85691,7 @@ declare module dijit { * @param reference Widget, DOMNode, or id of widget or DOMNode * @param position OptionalIf reference is a widget (or id of widget), and that widget has an ".addChild" method,it will be called passing this widget instance into that method, supplying the optionalposition index passed. In this case position (if specified) should be an integer.If reference is a DOMNode (or id matching a DOMNode but not a widget),the position argument can be a numeric index or a string"first", "last", "before", or "after", same as dojo/dom-construct::place(). */ - placeAt(reference: dijit._WidgetBase, position: String): any; + placeAt(reference: dijit._WidgetBase, position?: String): any; /** * Place this widget somewhere in the DOM based * on standard domConstruct.place() conventions. @@ -85702,7 +85702,7 @@ declare module dijit { * @param reference Widget, DOMNode, or id of widget or DOMNode * @param position OptionalIf reference is a widget (or id of widget), and that widget has an ".addChild" method,it will be called passing this widget instance into that method, supplying the optionalposition index passed. In this case position (if specified) should be an integer.If reference is a DOMNode (or id matching a DOMNode but not a widget),the position argument can be a numeric index or a string"first", "last", "before", or "after", same as dojo/dom-construct::place(). */ - placeAt(reference: String, position: number): any; + placeAt(reference: String, position?: number): any; /** * Place this widget somewhere in the DOM based * on standard domConstruct.place() conventions. @@ -85713,7 +85713,7 @@ declare module dijit { * @param reference Widget, DOMNode, or id of widget or DOMNode * @param position OptionalIf reference is a widget (or id of widget), and that widget has an ".addChild" method,it will be called passing this widget instance into that method, supplying the optionalposition index passed. In this case position (if specified) should be an integer.If reference is a DOMNode (or id matching a DOMNode but not a widget),the position argument can be a numeric index or a string"first", "last", "before", or "after", same as dojo/dom-construct::place(). */ - placeAt(reference: HTMLElement, position: number): any; + placeAt(reference: HTMLElement, position?: number): any; /** * Place this widget somewhere in the DOM based * on standard domConstruct.place() conventions. @@ -85724,7 +85724,7 @@ declare module dijit { * @param reference Widget, DOMNode, or id of widget or DOMNode * @param position OptionalIf reference is a widget (or id of widget), and that widget has an ".addChild" method,it will be called passing this widget instance into that method, supplying the optionalposition index passed. In this case position (if specified) should be an integer.If reference is a DOMNode (or id matching a DOMNode but not a widget),the position argument can be a numeric index or a string"first", "last", "before", or "after", same as dojo/dom-construct::place(). */ - placeAt(reference: dijit._WidgetBase, position: number): any; + placeAt(reference: dijit._WidgetBase, position?: number): any; /** * */ @@ -86218,14 +86218,14 @@ declare module dijit { * @param name The property to get or set. If an object is passed here and nota string, its keys are used as names of attributes to be setand the value of the object as values to set in the widget. * @param value OptionalOptional. If provided, attr() operates as a setter. If omitted,the current value of the named property is returned. */ - attr(name: String, value: Object): any; + attr(name: String, value?: Object): any; /** * This method is deprecated, use get() or set() directly. * * @param name The property to get or set. If an object is passed here and nota string, its keys are used as names of attributes to be setand the value of the object as values to set in the widget. * @param value OptionalOptional. If provided, attr() operates as a setter. If omitted,the current value of the named property is returned. */ - attr(name: Object, value: Object): any; + attr(name: Object, value?: Object): any; /** * */ @@ -86366,7 +86366,7 @@ declare module dijit { * @param fcn Function reference. * @param delay OptionalDelay, defaults to 0. */ - defer(fcn: Function, delay: number): Object; + defer(fcn: Function, delay?: number): Object; /** * */ @@ -86412,7 +86412,7 @@ declare module dijit { * @param eventObj Optional * @param callbackArgs Optional */ - emit(type: String, eventObj: Object, callbackArgs: any[]): any; + emit(type: String, eventObj?: Object, callbackArgs?: any[]): any; /** * Get a property from a widget. * Get a named property from a widget. The property may @@ -86494,7 +86494,7 @@ declare module dijit { * @param reference Widget, DOMNode, or id of widget or DOMNode * @param position OptionalIf reference is a widget (or id of widget), and that widget has an ".addChild" method,it will be called passing this widget instance into that method, supplying the optionalposition index passed. In this case position (if specified) should be an integer.If reference is a DOMNode (or id matching a DOMNode but not a widget),the position argument can be a numeric index or a string"first", "last", "before", or "after", same as dojo/dom-construct::place(). */ - placeAt(reference: String, position: String): any; + placeAt(reference: String, position?: String): any; /** * Place this widget somewhere in the DOM based * on standard domConstruct.place() conventions. @@ -86505,7 +86505,7 @@ declare module dijit { * @param reference Widget, DOMNode, or id of widget or DOMNode * @param position OptionalIf reference is a widget (or id of widget), and that widget has an ".addChild" method,it will be called passing this widget instance into that method, supplying the optionalposition index passed. In this case position (if specified) should be an integer.If reference is a DOMNode (or id matching a DOMNode but not a widget),the position argument can be a numeric index or a string"first", "last", "before", or "after", same as dojo/dom-construct::place(). */ - placeAt(reference: HTMLElement, position: String): any; + placeAt(reference: HTMLElement, position?: String): any; /** * Place this widget somewhere in the DOM based * on standard domConstruct.place() conventions. @@ -86516,7 +86516,7 @@ declare module dijit { * @param reference Widget, DOMNode, or id of widget or DOMNode * @param position OptionalIf reference is a widget (or id of widget), and that widget has an ".addChild" method,it will be called passing this widget instance into that method, supplying the optionalposition index passed. In this case position (if specified) should be an integer.If reference is a DOMNode (or id matching a DOMNode but not a widget),the position argument can be a numeric index or a string"first", "last", "before", or "after", same as dojo/dom-construct::place(). */ - placeAt(reference: dijit._WidgetBase, position: String): any; + placeAt(reference: dijit._WidgetBase, position?: String): any; /** * Place this widget somewhere in the DOM based * on standard domConstruct.place() conventions. @@ -86527,7 +86527,7 @@ declare module dijit { * @param reference Widget, DOMNode, or id of widget or DOMNode * @param position OptionalIf reference is a widget (or id of widget), and that widget has an ".addChild" method,it will be called passing this widget instance into that method, supplying the optionalposition index passed. In this case position (if specified) should be an integer.If reference is a DOMNode (or id matching a DOMNode but not a widget),the position argument can be a numeric index or a string"first", "last", "before", or "after", same as dojo/dom-construct::place(). */ - placeAt(reference: String, position: number): any; + placeAt(reference: String, position?: number): any; /** * Place this widget somewhere in the DOM based * on standard domConstruct.place() conventions. @@ -86538,7 +86538,7 @@ declare module dijit { * @param reference Widget, DOMNode, or id of widget or DOMNode * @param position OptionalIf reference is a widget (or id of widget), and that widget has an ".addChild" method,it will be called passing this widget instance into that method, supplying the optionalposition index passed. In this case position (if specified) should be an integer.If reference is a DOMNode (or id matching a DOMNode but not a widget),the position argument can be a numeric index or a string"first", "last", "before", or "after", same as dojo/dom-construct::place(). */ - placeAt(reference: HTMLElement, position: number): any; + placeAt(reference: HTMLElement, position?: number): any; /** * Place this widget somewhere in the DOM based * on standard domConstruct.place() conventions. @@ -86549,7 +86549,7 @@ declare module dijit { * @param reference Widget, DOMNode, or id of widget or DOMNode * @param position OptionalIf reference is a widget (or id of widget), and that widget has an ".addChild" method,it will be called passing this widget instance into that method, supplying the optionalposition index passed. In this case position (if specified) should be an integer.If reference is a DOMNode (or id matching a DOMNode but not a widget),the position argument can be a numeric index or a string"first", "last", "before", or "after", same as dojo/dom-construct::place(). */ - placeAt(reference: dijit._WidgetBase, position: number): any; + placeAt(reference: dijit._WidgetBase, position?: number): any; /** * */ @@ -87037,14 +87037,14 @@ declare module dijit { * @param name The property to get or set. If an object is passed here and nota string, its keys are used as names of attributes to be setand the value of the object as values to set in the widget. * @param value OptionalOptional. If provided, attr() operates as a setter. If omitted,the current value of the named property is returned. */ - attr(name: String, value: Object): any; + attr(name: String, value?: Object): any; /** * This method is deprecated, use get() or set() directly. * * @param name The property to get or set. If an object is passed here and nota string, its keys are used as names of attributes to be setand the value of the object as values to set in the widget. * @param value OptionalOptional. If provided, attr() operates as a setter. If omitted,the current value of the named property is returned. */ - attr(name: Object, value: Object): any; + attr(name: Object, value?: Object): any; /** * */ @@ -87185,7 +87185,7 @@ declare module dijit { * @param fcn Function reference. * @param delay OptionalDelay, defaults to 0. */ - defer(fcn: Function, delay: number): Object; + defer(fcn: Function, delay?: number): Object; /** * Destroy this widget, but not its descendants. Descendants means widgets inside of * this.containerNode. Will also destroy any resources (including widgets) registered via this.own(). @@ -87243,7 +87243,7 @@ declare module dijit { * @param eventObj Optional * @param callbackArgs Optional */ - emit(type: String, eventObj: Object, callbackArgs: any[]): any; + emit(type: String, eventObj?: Object, callbackArgs?: any[]): any; /** * Get a property from a widget. * Get a named property from a widget. The property may @@ -87325,7 +87325,7 @@ declare module dijit { * @param reference Widget, DOMNode, or id of widget or DOMNode * @param position OptionalIf reference is a widget (or id of widget), and that widget has an ".addChild" method,it will be called passing this widget instance into that method, supplying the optionalposition index passed. In this case position (if specified) should be an integer.If reference is a DOMNode (or id matching a DOMNode but not a widget),the position argument can be a numeric index or a string"first", "last", "before", or "after", same as dojo/dom-construct::place(). */ - placeAt(reference: String, position: String): any; + placeAt(reference: String, position?: String): any; /** * Place this widget somewhere in the DOM based * on standard domConstruct.place() conventions. @@ -87336,7 +87336,7 @@ declare module dijit { * @param reference Widget, DOMNode, or id of widget or DOMNode * @param position OptionalIf reference is a widget (or id of widget), and that widget has an ".addChild" method,it will be called passing this widget instance into that method, supplying the optionalposition index passed. In this case position (if specified) should be an integer.If reference is a DOMNode (or id matching a DOMNode but not a widget),the position argument can be a numeric index or a string"first", "last", "before", or "after", same as dojo/dom-construct::place(). */ - placeAt(reference: HTMLElement, position: String): any; + placeAt(reference: HTMLElement, position?: String): any; /** * Place this widget somewhere in the DOM based * on standard domConstruct.place() conventions. @@ -87347,7 +87347,7 @@ declare module dijit { * @param reference Widget, DOMNode, or id of widget or DOMNode * @param position OptionalIf reference is a widget (or id of widget), and that widget has an ".addChild" method,it will be called passing this widget instance into that method, supplying the optionalposition index passed. In this case position (if specified) should be an integer.If reference is a DOMNode (or id matching a DOMNode but not a widget),the position argument can be a numeric index or a string"first", "last", "before", or "after", same as dojo/dom-construct::place(). */ - placeAt(reference: dijit._WidgetBase, position: String): any; + placeAt(reference: dijit._WidgetBase, position?: String): any; /** * Place this widget somewhere in the DOM based * on standard domConstruct.place() conventions. @@ -87358,7 +87358,7 @@ declare module dijit { * @param reference Widget, DOMNode, or id of widget or DOMNode * @param position OptionalIf reference is a widget (or id of widget), and that widget has an ".addChild" method,it will be called passing this widget instance into that method, supplying the optionalposition index passed. In this case position (if specified) should be an integer.If reference is a DOMNode (or id matching a DOMNode but not a widget),the position argument can be a numeric index or a string"first", "last", "before", or "after", same as dojo/dom-construct::place(). */ - placeAt(reference: String, position: number): any; + placeAt(reference: String, position?: number): any; /** * Place this widget somewhere in the DOM based * on standard domConstruct.place() conventions. @@ -87369,7 +87369,7 @@ declare module dijit { * @param reference Widget, DOMNode, or id of widget or DOMNode * @param position OptionalIf reference is a widget (or id of widget), and that widget has an ".addChild" method,it will be called passing this widget instance into that method, supplying the optionalposition index passed. In this case position (if specified) should be an integer.If reference is a DOMNode (or id matching a DOMNode but not a widget),the position argument can be a numeric index or a string"first", "last", "before", or "after", same as dojo/dom-construct::place(). */ - placeAt(reference: HTMLElement, position: number): any; + placeAt(reference: HTMLElement, position?: number): any; /** * Place this widget somewhere in the DOM based * on standard domConstruct.place() conventions. @@ -87380,7 +87380,7 @@ declare module dijit { * @param reference Widget, DOMNode, or id of widget or DOMNode * @param position OptionalIf reference is a widget (or id of widget), and that widget has an ".addChild" method,it will be called passing this widget instance into that method, supplying the optionalposition index passed. In this case position (if specified) should be an integer.If reference is a DOMNode (or id matching a DOMNode but not a widget),the position argument can be a numeric index or a string"first", "last", "before", or "after", same as dojo/dom-construct::place(). */ - placeAt(reference: dijit._WidgetBase, position: number): any; + placeAt(reference: dijit._WidgetBase, position?: number): any; /** * */ @@ -87909,14 +87909,14 @@ declare module dijit { * @param name The property to get or set. If an object is passed here and nota string, its keys are used as names of attributes to be setand the value of the object as values to set in the widget. * @param value OptionalOptional. If provided, attr() operates as a setter. If omitted,the current value of the named property is returned. */ - attr(name: String, value: Object): any; + attr(name: String, value?: Object): any; /** * This method is deprecated, use get() or set() directly. * * @param name The property to get or set. If an object is passed here and nota string, its keys are used as names of attributes to be setand the value of the object as values to set in the widget. * @param value OptionalOptional. If provided, attr() operates as a setter. If omitted,the current value of the named property is returned. */ - attr(name: Object, value: Object): any; + attr(name: Object, value?: Object): any; /** * Go back to previous page. * @@ -88062,7 +88062,7 @@ declare module dijit { * @param fcn Function reference. * @param delay OptionalDelay, defaults to 0. */ - defer(fcn: Function, delay: number): Object; + defer(fcn: Function, delay?: number): Object; /** * * @param preserveDom @@ -88109,7 +88109,7 @@ declare module dijit { * @param eventObj Optional * @param callbackArgs Optional */ - emit(type: String, eventObj: Object, callbackArgs: any[]): any; + emit(type: String, eventObj?: Object, callbackArgs?: any[]): any; /** * Advance to next page. * @@ -88230,7 +88230,7 @@ declare module dijit { * @param reference Widget, DOMNode, or id of widget or DOMNode * @param position OptionalIf reference is a widget (or id of widget), and that widget has an ".addChild" method,it will be called passing this widget instance into that method, supplying the optionalposition index passed. In this case position (if specified) should be an integer.If reference is a DOMNode (or id matching a DOMNode but not a widget),the position argument can be a numeric index or a string"first", "last", "before", or "after", same as dojo/dom-construct::place(). */ - placeAt(reference: String, position: String): any; + placeAt(reference: String, position?: String): any; /** * Place this widget somewhere in the DOM based * on standard domConstruct.place() conventions. @@ -88241,7 +88241,7 @@ declare module dijit { * @param reference Widget, DOMNode, or id of widget or DOMNode * @param position OptionalIf reference is a widget (or id of widget), and that widget has an ".addChild" method,it will be called passing this widget instance into that method, supplying the optionalposition index passed. In this case position (if specified) should be an integer.If reference is a DOMNode (or id matching a DOMNode but not a widget),the position argument can be a numeric index or a string"first", "last", "before", or "after", same as dojo/dom-construct::place(). */ - placeAt(reference: HTMLElement, position: String): any; + placeAt(reference: HTMLElement, position?: String): any; /** * Place this widget somewhere in the DOM based * on standard domConstruct.place() conventions. @@ -88252,7 +88252,7 @@ declare module dijit { * @param reference Widget, DOMNode, or id of widget or DOMNode * @param position OptionalIf reference is a widget (or id of widget), and that widget has an ".addChild" method,it will be called passing this widget instance into that method, supplying the optionalposition index passed. In this case position (if specified) should be an integer.If reference is a DOMNode (or id matching a DOMNode but not a widget),the position argument can be a numeric index or a string"first", "last", "before", or "after", same as dojo/dom-construct::place(). */ - placeAt(reference: dijit._WidgetBase, position: String): any; + placeAt(reference: dijit._WidgetBase, position?: String): any; /** * Place this widget somewhere in the DOM based * on standard domConstruct.place() conventions. @@ -88263,7 +88263,7 @@ declare module dijit { * @param reference Widget, DOMNode, or id of widget or DOMNode * @param position OptionalIf reference is a widget (or id of widget), and that widget has an ".addChild" method,it will be called passing this widget instance into that method, supplying the optionalposition index passed. In this case position (if specified) should be an integer.If reference is a DOMNode (or id matching a DOMNode but not a widget),the position argument can be a numeric index or a string"first", "last", "before", or "after", same as dojo/dom-construct::place(). */ - placeAt(reference: String, position: number): any; + placeAt(reference: String, position?: number): any; /** * Place this widget somewhere in the DOM based * on standard domConstruct.place() conventions. @@ -88274,7 +88274,7 @@ declare module dijit { * @param reference Widget, DOMNode, or id of widget or DOMNode * @param position OptionalIf reference is a widget (or id of widget), and that widget has an ".addChild" method,it will be called passing this widget instance into that method, supplying the optionalposition index passed. In this case position (if specified) should be an integer.If reference is a DOMNode (or id matching a DOMNode but not a widget),the position argument can be a numeric index or a string"first", "last", "before", or "after", same as dojo/dom-construct::place(). */ - placeAt(reference: HTMLElement, position: number): any; + placeAt(reference: HTMLElement, position?: number): any; /** * Place this widget somewhere in the DOM based * on standard domConstruct.place() conventions. @@ -88285,7 +88285,7 @@ declare module dijit { * @param reference Widget, DOMNode, or id of widget or DOMNode * @param position OptionalIf reference is a widget (or id of widget), and that widget has an ".addChild" method,it will be called passing this widget instance into that method, supplying the optionalposition index passed. In this case position (if specified) should be an integer.If reference is a DOMNode (or id matching a DOMNode but not a widget),the position argument can be a numeric index or a string"first", "last", "before", or "after", same as dojo/dom-construct::place(). */ - placeAt(reference: dijit._WidgetBase, position: number): any; + placeAt(reference: dijit._WidgetBase, position?: number): any; /** * */ @@ -88799,14 +88799,14 @@ declare module dijit { * @param name The property to get or set. If an object is passed here and nota string, its keys are used as names of attributes to be setand the value of the object as values to set in the widget. * @param value OptionalOptional. If provided, attr() operates as a setter. If omitted,the current value of the named property is returned. */ - attr(name: String, value: Object): any; + attr(name: String, value?: Object): any; /** * This method is deprecated, use get() or set() directly. * * @param name The property to get or set. If an object is passed here and nota string, its keys are used as names of attributes to be setand the value of the object as values to set in the widget. * @param value OptionalOptional. If provided, attr() operates as a setter. If omitted,the current value of the named property is returned. */ - attr(name: Object, value: Object): any; + attr(name: Object, value?: Object): any; /** * */ @@ -88947,7 +88947,7 @@ declare module dijit { * @param fcn Function reference. * @param delay OptionalDelay, defaults to 0. */ - defer(fcn: Function, delay: number): Object; + defer(fcn: Function, delay?: number): Object; /** * Destroy this widget, but not its descendants. Descendants means widgets inside of * this.containerNode. Will also destroy any resources (including widgets) registered via this.own(). @@ -89000,7 +89000,7 @@ declare module dijit { * @param eventObj Optional * @param callbackArgs Optional */ - emit(type: String, eventObj: Object, callbackArgs: any[]): any; + emit(type: String, eventObj?: Object, callbackArgs?: any[]): any; /** * Get a property from a widget. * Get a named property from a widget. The property may @@ -89112,7 +89112,7 @@ declare module dijit { * @param reference Widget, DOMNode, or id of widget or DOMNode * @param position OptionalIf reference is a widget (or id of widget), and that widget has an ".addChild" method,it will be called passing this widget instance into that method, supplying the optionalposition index passed. In this case position (if specified) should be an integer.If reference is a DOMNode (or id matching a DOMNode but not a widget),the position argument can be a numeric index or a string"first", "last", "before", or "after", same as dojo/dom-construct::place(). */ - placeAt(reference: String, position: String): any; + placeAt(reference: String, position?: String): any; /** * Place this widget somewhere in the DOM based * on standard domConstruct.place() conventions. @@ -89123,7 +89123,7 @@ declare module dijit { * @param reference Widget, DOMNode, or id of widget or DOMNode * @param position OptionalIf reference is a widget (or id of widget), and that widget has an ".addChild" method,it will be called passing this widget instance into that method, supplying the optionalposition index passed. In this case position (if specified) should be an integer.If reference is a DOMNode (or id matching a DOMNode but not a widget),the position argument can be a numeric index or a string"first", "last", "before", or "after", same as dojo/dom-construct::place(). */ - placeAt(reference: HTMLElement, position: String): any; + placeAt(reference: HTMLElement, position?: String): any; /** * Place this widget somewhere in the DOM based * on standard domConstruct.place() conventions. @@ -89134,7 +89134,7 @@ declare module dijit { * @param reference Widget, DOMNode, or id of widget or DOMNode * @param position OptionalIf reference is a widget (or id of widget), and that widget has an ".addChild" method,it will be called passing this widget instance into that method, supplying the optionalposition index passed. In this case position (if specified) should be an integer.If reference is a DOMNode (or id matching a DOMNode but not a widget),the position argument can be a numeric index or a string"first", "last", "before", or "after", same as dojo/dom-construct::place(). */ - placeAt(reference: dijit._WidgetBase, position: String): any; + placeAt(reference: dijit._WidgetBase, position?: String): any; /** * Place this widget somewhere in the DOM based * on standard domConstruct.place() conventions. @@ -89145,7 +89145,7 @@ declare module dijit { * @param reference Widget, DOMNode, or id of widget or DOMNode * @param position OptionalIf reference is a widget (or id of widget), and that widget has an ".addChild" method,it will be called passing this widget instance into that method, supplying the optionalposition index passed. In this case position (if specified) should be an integer.If reference is a DOMNode (or id matching a DOMNode but not a widget),the position argument can be a numeric index or a string"first", "last", "before", or "after", same as dojo/dom-construct::place(). */ - placeAt(reference: String, position: number): any; + placeAt(reference: String, position?: number): any; /** * Place this widget somewhere in the DOM based * on standard domConstruct.place() conventions. @@ -89156,7 +89156,7 @@ declare module dijit { * @param reference Widget, DOMNode, or id of widget or DOMNode * @param position OptionalIf reference is a widget (or id of widget), and that widget has an ".addChild" method,it will be called passing this widget instance into that method, supplying the optionalposition index passed. In this case position (if specified) should be an integer.If reference is a DOMNode (or id matching a DOMNode but not a widget),the position argument can be a numeric index or a string"first", "last", "before", or "after", same as dojo/dom-construct::place(). */ - placeAt(reference: HTMLElement, position: number): any; + placeAt(reference: HTMLElement, position?: number): any; /** * Place this widget somewhere in the DOM based * on standard domConstruct.place() conventions. @@ -89167,7 +89167,7 @@ declare module dijit { * @param reference Widget, DOMNode, or id of widget or DOMNode * @param position OptionalIf reference is a widget (or id of widget), and that widget has an ".addChild" method,it will be called passing this widget instance into that method, supplying the optionalposition index passed. In this case position (if specified) should be an integer.If reference is a DOMNode (or id matching a DOMNode but not a widget),the position argument can be a numeric index or a string"first", "last", "before", or "after", same as dojo/dom-construct::place(). */ - placeAt(reference: dijit._WidgetBase, position: number): any; + placeAt(reference: dijit._WidgetBase, position?: number): any; /** * */ @@ -89633,14 +89633,14 @@ declare module dijit { * @param name The property to get or set. If an object is passed here and nota string, its keys are used as names of attributes to be setand the value of the object as values to set in the widget. * @param value OptionalOptional. If provided, attr() operates as a setter. If omitted,the current value of the named property is returned. */ - attr(name: String, value: Object): any; + attr(name: String, value?: Object): any; /** * This method is deprecated, use get() or set() directly. * * @param name The property to get or set. If an object is passed here and nota string, its keys are used as names of attributes to be setand the value of the object as values to set in the widget. * @param value OptionalOptional. If provided, attr() operates as a setter. If omitted,the current value of the named property is returned. */ - attr(name: Object, value: Object): any; + attr(name: Object, value?: Object): any; /** * */ @@ -89781,7 +89781,7 @@ declare module dijit { * @param fcn Function reference. * @param delay OptionalDelay, defaults to 0. */ - defer(fcn: Function, delay: number): Object; + defer(fcn: Function, delay?: number): Object; /** * Destroy this widget, but not its descendants. Descendants means widgets inside of * this.containerNode. Will also destroy any resources (including widgets) registered via this.own(). @@ -89839,7 +89839,7 @@ declare module dijit { * @param eventObj Optional * @param callbackArgs Optional */ - emit(type: String, eventObj: Object, callbackArgs: any[]): any; + emit(type: String, eventObj?: Object, callbackArgs?: any[]): any; /** * Get a property from a widget. * Get a named property from a widget. The property may @@ -89921,7 +89921,7 @@ declare module dijit { * @param reference Widget, DOMNode, or id of widget or DOMNode * @param position OptionalIf reference is a widget (or id of widget), and that widget has an ".addChild" method,it will be called passing this widget instance into that method, supplying the optionalposition index passed. In this case position (if specified) should be an integer.If reference is a DOMNode (or id matching a DOMNode but not a widget),the position argument can be a numeric index or a string"first", "last", "before", or "after", same as dojo/dom-construct::place(). */ - placeAt(reference: String, position: String): any; + placeAt(reference: String, position?: String): any; /** * Place this widget somewhere in the DOM based * on standard domConstruct.place() conventions. @@ -89932,7 +89932,7 @@ declare module dijit { * @param reference Widget, DOMNode, or id of widget or DOMNode * @param position OptionalIf reference is a widget (or id of widget), and that widget has an ".addChild" method,it will be called passing this widget instance into that method, supplying the optionalposition index passed. In this case position (if specified) should be an integer.If reference is a DOMNode (or id matching a DOMNode but not a widget),the position argument can be a numeric index or a string"first", "last", "before", or "after", same as dojo/dom-construct::place(). */ - placeAt(reference: HTMLElement, position: String): any; + placeAt(reference: HTMLElement, position?: String): any; /** * Place this widget somewhere in the DOM based * on standard domConstruct.place() conventions. @@ -89943,7 +89943,7 @@ declare module dijit { * @param reference Widget, DOMNode, or id of widget or DOMNode * @param position OptionalIf reference is a widget (or id of widget), and that widget has an ".addChild" method,it will be called passing this widget instance into that method, supplying the optionalposition index passed. In this case position (if specified) should be an integer.If reference is a DOMNode (or id matching a DOMNode but not a widget),the position argument can be a numeric index or a string"first", "last", "before", or "after", same as dojo/dom-construct::place(). */ - placeAt(reference: dijit._WidgetBase, position: String): any; + placeAt(reference: dijit._WidgetBase, position?: String): any; /** * Place this widget somewhere in the DOM based * on standard domConstruct.place() conventions. @@ -89954,7 +89954,7 @@ declare module dijit { * @param reference Widget, DOMNode, or id of widget or DOMNode * @param position OptionalIf reference is a widget (or id of widget), and that widget has an ".addChild" method,it will be called passing this widget instance into that method, supplying the optionalposition index passed. In this case position (if specified) should be an integer.If reference is a DOMNode (or id matching a DOMNode but not a widget),the position argument can be a numeric index or a string"first", "last", "before", or "after", same as dojo/dom-construct::place(). */ - placeAt(reference: String, position: number): any; + placeAt(reference: String, position?: number): any; /** * Place this widget somewhere in the DOM based * on standard domConstruct.place() conventions. @@ -89965,7 +89965,7 @@ declare module dijit { * @param reference Widget, DOMNode, or id of widget or DOMNode * @param position OptionalIf reference is a widget (or id of widget), and that widget has an ".addChild" method,it will be called passing this widget instance into that method, supplying the optionalposition index passed. In this case position (if specified) should be an integer.If reference is a DOMNode (or id matching a DOMNode but not a widget),the position argument can be a numeric index or a string"first", "last", "before", or "after", same as dojo/dom-construct::place(). */ - placeAt(reference: HTMLElement, position: number): any; + placeAt(reference: HTMLElement, position?: number): any; /** * Place this widget somewhere in the DOM based * on standard domConstruct.place() conventions. @@ -89976,7 +89976,7 @@ declare module dijit { * @param reference Widget, DOMNode, or id of widget or DOMNode * @param position OptionalIf reference is a widget (or id of widget), and that widget has an ".addChild" method,it will be called passing this widget instance into that method, supplying the optionalposition index passed. In this case position (if specified) should be an integer.If reference is a DOMNode (or id matching a DOMNode but not a widget),the position argument can be a numeric index or a string"first", "last", "before", or "after", same as dojo/dom-construct::place(). */ - placeAt(reference: dijit._WidgetBase, position: number): any; + placeAt(reference: dijit._WidgetBase, position?: number): any; /** * */ @@ -90463,14 +90463,14 @@ declare module dijit { * @param name The property to get or set. If an object is passed here and nota string, its keys are used as names of attributes to be setand the value of the object as values to set in the widget. * @param value OptionalOptional. If provided, attr() operates as a setter. If omitted,the current value of the named property is returned. */ - attr(name: String, value: Object): any; + attr(name: String, value?: Object): any; /** * This method is deprecated, use get() or set() directly. * * @param name The property to get or set. If an object is passed here and nota string, its keys are used as names of attributes to be setand the value of the object as values to set in the widget. * @param value OptionalOptional. If provided, attr() operates as a setter. If omitted,the current value of the named property is returned. */ - attr(name: Object, value: Object): any; + attr(name: Object, value?: Object): any; /** * */ @@ -90611,7 +90611,7 @@ declare module dijit { * @param fcn Function reference. * @param delay OptionalDelay, defaults to 0. */ - defer(fcn: Function, delay: number): Object; + defer(fcn: Function, delay?: number): Object; /** * */ @@ -90659,7 +90659,7 @@ declare module dijit { * @param eventObj Optional * @param callbackArgs Optional */ - emit(type: String, eventObj: Object, callbackArgs: any[]): any; + emit(type: String, eventObj?: Object, callbackArgs?: any[]): any; /** * Get a property from a widget. * Get a named property from a widget. The property may @@ -90741,7 +90741,7 @@ declare module dijit { * @param reference Widget, DOMNode, or id of widget or DOMNode * @param position OptionalIf reference is a widget (or id of widget), and that widget has an ".addChild" method,it will be called passing this widget instance into that method, supplying the optionalposition index passed. In this case position (if specified) should be an integer.If reference is a DOMNode (or id matching a DOMNode but not a widget),the position argument can be a numeric index or a string"first", "last", "before", or "after", same as dojo/dom-construct::place(). */ - placeAt(reference: String, position: String): any; + placeAt(reference: String, position?: String): any; /** * Place this widget somewhere in the DOM based * on standard domConstruct.place() conventions. @@ -90752,7 +90752,7 @@ declare module dijit { * @param reference Widget, DOMNode, or id of widget or DOMNode * @param position OptionalIf reference is a widget (or id of widget), and that widget has an ".addChild" method,it will be called passing this widget instance into that method, supplying the optionalposition index passed. In this case position (if specified) should be an integer.If reference is a DOMNode (or id matching a DOMNode but not a widget),the position argument can be a numeric index or a string"first", "last", "before", or "after", same as dojo/dom-construct::place(). */ - placeAt(reference: HTMLElement, position: String): any; + placeAt(reference: HTMLElement, position?: String): any; /** * Place this widget somewhere in the DOM based * on standard domConstruct.place() conventions. @@ -90763,7 +90763,7 @@ declare module dijit { * @param reference Widget, DOMNode, or id of widget or DOMNode * @param position OptionalIf reference is a widget (or id of widget), and that widget has an ".addChild" method,it will be called passing this widget instance into that method, supplying the optionalposition index passed. In this case position (if specified) should be an integer.If reference is a DOMNode (or id matching a DOMNode but not a widget),the position argument can be a numeric index or a string"first", "last", "before", or "after", same as dojo/dom-construct::place(). */ - placeAt(reference: dijit._WidgetBase, position: String): any; + placeAt(reference: dijit._WidgetBase, position?: String): any; /** * Place this widget somewhere in the DOM based * on standard domConstruct.place() conventions. @@ -90774,7 +90774,7 @@ declare module dijit { * @param reference Widget, DOMNode, or id of widget or DOMNode * @param position OptionalIf reference is a widget (or id of widget), and that widget has an ".addChild" method,it will be called passing this widget instance into that method, supplying the optionalposition index passed. In this case position (if specified) should be an integer.If reference is a DOMNode (or id matching a DOMNode but not a widget),the position argument can be a numeric index or a string"first", "last", "before", or "after", same as dojo/dom-construct::place(). */ - placeAt(reference: String, position: number): any; + placeAt(reference: String, position?: number): any; /** * Place this widget somewhere in the DOM based * on standard domConstruct.place() conventions. @@ -90785,7 +90785,7 @@ declare module dijit { * @param reference Widget, DOMNode, or id of widget or DOMNode * @param position OptionalIf reference is a widget (or id of widget), and that widget has an ".addChild" method,it will be called passing this widget instance into that method, supplying the optionalposition index passed. In this case position (if specified) should be an integer.If reference is a DOMNode (or id matching a DOMNode but not a widget),the position argument can be a numeric index or a string"first", "last", "before", or "after", same as dojo/dom-construct::place(). */ - placeAt(reference: HTMLElement, position: number): any; + placeAt(reference: HTMLElement, position?: number): any; /** * Place this widget somewhere in the DOM based * on standard domConstruct.place() conventions. @@ -90796,7 +90796,7 @@ declare module dijit { * @param reference Widget, DOMNode, or id of widget or DOMNode * @param position OptionalIf reference is a widget (or id of widget), and that widget has an ".addChild" method,it will be called passing this widget instance into that method, supplying the optionalposition index passed. In this case position (if specified) should be an integer.If reference is a DOMNode (or id matching a DOMNode but not a widget),the position argument can be a numeric index or a string"first", "last", "before", or "after", same as dojo/dom-construct::place(). */ - placeAt(reference: dijit._WidgetBase, position: number): any; + placeAt(reference: dijit._WidgetBase, position?: number): any; /** * */ @@ -91411,21 +91411,21 @@ declare module dijit { * @param widget * @param insertIndex Optional */ - addChild(widget: dijit._WidgetBase, insertIndex: number): void; + addChild(widget: dijit._WidgetBase, insertIndex?: number): void; /** * This method is deprecated, use get() or set() directly. * * @param name The property to get or set. If an object is passed here and nota string, its keys are used as names of attributes to be setand the value of the object as values to set in the widget. * @param value OptionalOptional. If provided, attr() operates as a setter. If omitted,the current value of the named property is returned. */ - attr(name: String, value: Object): any; + attr(name: String, value?: Object): any; /** * This method is deprecated, use get() or set() directly. * * @param name The property to get or set. If an object is passed here and nota string, its keys are used as names of attributes to be setand the value of the object as values to set in the widget. * @param value OptionalOptional. If provided, attr() operates as a setter. If omitted,the current value of the named property is returned. */ - attr(name: Object, value: Object): any; + attr(name: Object, value?: Object): any; /** * */ @@ -91577,7 +91577,7 @@ declare module dijit { * @param fcn Function reference. * @param delay OptionalDelay, defaults to 0. */ - defer(fcn: Function, delay: number): Object; + defer(fcn: Function, delay?: number): Object; /** * */ @@ -91621,7 +91621,7 @@ declare module dijit { * @param eventObj Optional * @param callbackArgs Optional */ - emit(type: String, eventObj: Object, callbackArgs: any[]): any; + emit(type: String, eventObj?: Object, callbackArgs?: any[]): any; /** * Get a property from a widget. * Get a named property from a widget. The property may @@ -91727,7 +91727,7 @@ declare module dijit { * @param reference Widget, DOMNode, or id of widget or DOMNode * @param position OptionalIf reference is a widget (or id of widget), and that widget has an ".addChild" method,it will be called passing this widget instance into that method, supplying the optionalposition index passed. In this case position (if specified) should be an integer.If reference is a DOMNode (or id matching a DOMNode but not a widget),the position argument can be a numeric index or a string"first", "last", "before", or "after", same as dojo/dom-construct::place(). */ - placeAt(reference: String, position: String): any; + placeAt(reference: String, position?: String): any; /** * Place this widget somewhere in the DOM based * on standard domConstruct.place() conventions. @@ -91738,7 +91738,7 @@ declare module dijit { * @param reference Widget, DOMNode, or id of widget or DOMNode * @param position OptionalIf reference is a widget (or id of widget), and that widget has an ".addChild" method,it will be called passing this widget instance into that method, supplying the optionalposition index passed. In this case position (if specified) should be an integer.If reference is a DOMNode (or id matching a DOMNode but not a widget),the position argument can be a numeric index or a string"first", "last", "before", or "after", same as dojo/dom-construct::place(). */ - placeAt(reference: HTMLElement, position: String): any; + placeAt(reference: HTMLElement, position?: String): any; /** * Place this widget somewhere in the DOM based * on standard domConstruct.place() conventions. @@ -91749,7 +91749,7 @@ declare module dijit { * @param reference Widget, DOMNode, or id of widget or DOMNode * @param position OptionalIf reference is a widget (or id of widget), and that widget has an ".addChild" method,it will be called passing this widget instance into that method, supplying the optionalposition index passed. In this case position (if specified) should be an integer.If reference is a DOMNode (or id matching a DOMNode but not a widget),the position argument can be a numeric index or a string"first", "last", "before", or "after", same as dojo/dom-construct::place(). */ - placeAt(reference: dijit._WidgetBase, position: String): any; + placeAt(reference: dijit._WidgetBase, position?: String): any; /** * Place this widget somewhere in the DOM based * on standard domConstruct.place() conventions. @@ -91760,7 +91760,7 @@ declare module dijit { * @param reference Widget, DOMNode, or id of widget or DOMNode * @param position OptionalIf reference is a widget (or id of widget), and that widget has an ".addChild" method,it will be called passing this widget instance into that method, supplying the optionalposition index passed. In this case position (if specified) should be an integer.If reference is a DOMNode (or id matching a DOMNode but not a widget),the position argument can be a numeric index or a string"first", "last", "before", or "after", same as dojo/dom-construct::place(). */ - placeAt(reference: String, position: number): any; + placeAt(reference: String, position?: number): any; /** * Place this widget somewhere in the DOM based * on standard domConstruct.place() conventions. @@ -91771,7 +91771,7 @@ declare module dijit { * @param reference Widget, DOMNode, or id of widget or DOMNode * @param position OptionalIf reference is a widget (or id of widget), and that widget has an ".addChild" method,it will be called passing this widget instance into that method, supplying the optionalposition index passed. In this case position (if specified) should be an integer.If reference is a DOMNode (or id matching a DOMNode but not a widget),the position argument can be a numeric index or a string"first", "last", "before", or "after", same as dojo/dom-construct::place(). */ - placeAt(reference: HTMLElement, position: number): any; + placeAt(reference: HTMLElement, position?: number): any; /** * Place this widget somewhere in the DOM based * on standard domConstruct.place() conventions. @@ -91782,7 +91782,7 @@ declare module dijit { * @param reference Widget, DOMNode, or id of widget or DOMNode * @param position OptionalIf reference is a widget (or id of widget), and that widget has an ".addChild" method,it will be called passing this widget instance into that method, supplying the optionalposition index passed. In this case position (if specified) should be an integer.If reference is a DOMNode (or id matching a DOMNode but not a widget),the position argument can be a numeric index or a string"first", "last", "before", or "after", same as dojo/dom-construct::place(). */ - placeAt(reference: dijit._WidgetBase, position: number): any; + placeAt(reference: dijit._WidgetBase, position?: number): any; /** * */ @@ -92360,14 +92360,14 @@ declare module dijit { * @param name The property to get or set. If an object is passed here and nota string, its keys are used as names of attributes to be setand the value of the object as values to set in the widget. * @param value OptionalOptional. If provided, attr() operates as a setter. If omitted,the current value of the named property is returned. */ - attr(name: String, value: Object): any; + attr(name: String, value?: Object): any; /** * This method is deprecated, use get() or set() directly. * * @param name The property to get or set. If an object is passed here and nota string, its keys are used as names of attributes to be setand the value of the object as values to set in the widget. * @param value OptionalOptional. If provided, attr() operates as a setter. If omitted,the current value of the named property is returned. */ - attr(name: Object, value: Object): any; + attr(name: Object, value?: Object): any; /** * */ @@ -92508,7 +92508,7 @@ declare module dijit { * @param fcn Function reference. * @param delay OptionalDelay, defaults to 0. */ - defer(fcn: Function, delay: number): Object; + defer(fcn: Function, delay?: number): Object; /** * Destroy this widget, but not its descendants. Descendants means widgets inside of * this.containerNode. Will also destroy any resources (including widgets) registered via this.own(). @@ -92566,7 +92566,7 @@ declare module dijit { * @param eventObj Optional * @param callbackArgs Optional */ - emit(type: String, eventObj: Object, callbackArgs: any[]): any; + emit(type: String, eventObj?: Object, callbackArgs?: any[]): any; /** * Get a property from a widget. * Get a named property from a widget. The property may @@ -92682,7 +92682,7 @@ declare module dijit { * @param reference Widget, DOMNode, or id of widget or DOMNode * @param position OptionalIf reference is a widget (or id of widget), and that widget has an ".addChild" method,it will be called passing this widget instance into that method, supplying the optionalposition index passed. In this case position (if specified) should be an integer.If reference is a DOMNode (or id matching a DOMNode but not a widget),the position argument can be a numeric index or a string"first", "last", "before", or "after", same as dojo/dom-construct::place(). */ - placeAt(reference: String, position: String): any; + placeAt(reference: String, position?: String): any; /** * Place this widget somewhere in the DOM based * on standard domConstruct.place() conventions. @@ -92693,7 +92693,7 @@ declare module dijit { * @param reference Widget, DOMNode, or id of widget or DOMNode * @param position OptionalIf reference is a widget (or id of widget), and that widget has an ".addChild" method,it will be called passing this widget instance into that method, supplying the optionalposition index passed. In this case position (if specified) should be an integer.If reference is a DOMNode (or id matching a DOMNode but not a widget),the position argument can be a numeric index or a string"first", "last", "before", or "after", same as dojo/dom-construct::place(). */ - placeAt(reference: HTMLElement, position: String): any; + placeAt(reference: HTMLElement, position?: String): any; /** * Place this widget somewhere in the DOM based * on standard domConstruct.place() conventions. @@ -92704,7 +92704,7 @@ declare module dijit { * @param reference Widget, DOMNode, or id of widget or DOMNode * @param position OptionalIf reference is a widget (or id of widget), and that widget has an ".addChild" method,it will be called passing this widget instance into that method, supplying the optionalposition index passed. In this case position (if specified) should be an integer.If reference is a DOMNode (or id matching a DOMNode but not a widget),the position argument can be a numeric index or a string"first", "last", "before", or "after", same as dojo/dom-construct::place(). */ - placeAt(reference: dijit._WidgetBase, position: String): any; + placeAt(reference: dijit._WidgetBase, position?: String): any; /** * Place this widget somewhere in the DOM based * on standard domConstruct.place() conventions. @@ -92715,7 +92715,7 @@ declare module dijit { * @param reference Widget, DOMNode, or id of widget or DOMNode * @param position OptionalIf reference is a widget (or id of widget), and that widget has an ".addChild" method,it will be called passing this widget instance into that method, supplying the optionalposition index passed. In this case position (if specified) should be an integer.If reference is a DOMNode (or id matching a DOMNode but not a widget),the position argument can be a numeric index or a string"first", "last", "before", or "after", same as dojo/dom-construct::place(). */ - placeAt(reference: String, position: number): any; + placeAt(reference: String, position?: number): any; /** * Place this widget somewhere in the DOM based * on standard domConstruct.place() conventions. @@ -92726,7 +92726,7 @@ declare module dijit { * @param reference Widget, DOMNode, or id of widget or DOMNode * @param position OptionalIf reference is a widget (or id of widget), and that widget has an ".addChild" method,it will be called passing this widget instance into that method, supplying the optionalposition index passed. In this case position (if specified) should be an integer.If reference is a DOMNode (or id matching a DOMNode but not a widget),the position argument can be a numeric index or a string"first", "last", "before", or "after", same as dojo/dom-construct::place(). */ - placeAt(reference: HTMLElement, position: number): any; + placeAt(reference: HTMLElement, position?: number): any; /** * Place this widget somewhere in the DOM based * on standard domConstruct.place() conventions. @@ -92737,7 +92737,7 @@ declare module dijit { * @param reference Widget, DOMNode, or id of widget or DOMNode * @param position OptionalIf reference is a widget (or id of widget), and that widget has an ".addChild" method,it will be called passing this widget instance into that method, supplying the optionalposition index passed. In this case position (if specified) should be an integer.If reference is a DOMNode (or id matching a DOMNode but not a widget),the position argument can be a numeric index or a string"first", "last", "before", or "after", same as dojo/dom-construct::place(). */ - placeAt(reference: dijit._WidgetBase, position: number): any; + placeAt(reference: dijit._WidgetBase, position?: number): any; /** * */ @@ -93387,21 +93387,21 @@ declare module dijit { * @param widget * @param insertIndex Optional */ - addChild(widget: dijit._WidgetBase, insertIndex: number): void; + addChild(widget: dijit._WidgetBase, insertIndex?: number): void; /** * This method is deprecated, use get() or set() directly. * * @param name The property to get or set. If an object is passed here and nota string, its keys are used as names of attributes to be setand the value of the object as values to set in the widget. * @param value OptionalOptional. If provided, attr() operates as a setter. If omitted,the current value of the named property is returned. */ - attr(name: String, value: Object): any; + attr(name: String, value?: Object): any; /** * This method is deprecated, use get() or set() directly. * * @param name The property to get or set. If an object is passed here and nota string, its keys are used as names of attributes to be setand the value of the object as values to set in the widget. * @param value OptionalOptional. If provided, attr() operates as a setter. If omitted,the current value of the named property is returned. */ - attr(name: Object, value: Object): any; + attr(name: Object, value?: Object): any; /** * */ @@ -93553,7 +93553,7 @@ declare module dijit { * @param fcn Function reference. * @param delay OptionalDelay, defaults to 0. */ - defer(fcn: Function, delay: number): Object; + defer(fcn: Function, delay?: number): Object; /** * */ @@ -93597,7 +93597,7 @@ declare module dijit { * @param eventObj Optional * @param callbackArgs Optional */ - emit(type: String, eventObj: Object, callbackArgs: any[]): any; + emit(type: String, eventObj?: Object, callbackArgs?: any[]): any; /** * Get a property from a widget. * Get a named property from a widget. The property may @@ -93703,7 +93703,7 @@ declare module dijit { * @param reference Widget, DOMNode, or id of widget or DOMNode * @param position OptionalIf reference is a widget (or id of widget), and that widget has an ".addChild" method,it will be called passing this widget instance into that method, supplying the optionalposition index passed. In this case position (if specified) should be an integer.If reference is a DOMNode (or id matching a DOMNode but not a widget),the position argument can be a numeric index or a string"first", "last", "before", or "after", same as dojo/dom-construct::place(). */ - placeAt(reference: String, position: String): any; + placeAt(reference: String, position?: String): any; /** * Place this widget somewhere in the DOM based * on standard domConstruct.place() conventions. @@ -93714,7 +93714,7 @@ declare module dijit { * @param reference Widget, DOMNode, or id of widget or DOMNode * @param position OptionalIf reference is a widget (or id of widget), and that widget has an ".addChild" method,it will be called passing this widget instance into that method, supplying the optionalposition index passed. In this case position (if specified) should be an integer.If reference is a DOMNode (or id matching a DOMNode but not a widget),the position argument can be a numeric index or a string"first", "last", "before", or "after", same as dojo/dom-construct::place(). */ - placeAt(reference: HTMLElement, position: String): any; + placeAt(reference: HTMLElement, position?: String): any; /** * Place this widget somewhere in the DOM based * on standard domConstruct.place() conventions. @@ -93725,7 +93725,7 @@ declare module dijit { * @param reference Widget, DOMNode, or id of widget or DOMNode * @param position OptionalIf reference is a widget (or id of widget), and that widget has an ".addChild" method,it will be called passing this widget instance into that method, supplying the optionalposition index passed. In this case position (if specified) should be an integer.If reference is a DOMNode (or id matching a DOMNode but not a widget),the position argument can be a numeric index or a string"first", "last", "before", or "after", same as dojo/dom-construct::place(). */ - placeAt(reference: dijit._WidgetBase, position: String): any; + placeAt(reference: dijit._WidgetBase, position?: String): any; /** * Place this widget somewhere in the DOM based * on standard domConstruct.place() conventions. @@ -93736,7 +93736,7 @@ declare module dijit { * @param reference Widget, DOMNode, or id of widget or DOMNode * @param position OptionalIf reference is a widget (or id of widget), and that widget has an ".addChild" method,it will be called passing this widget instance into that method, supplying the optionalposition index passed. In this case position (if specified) should be an integer.If reference is a DOMNode (or id matching a DOMNode but not a widget),the position argument can be a numeric index or a string"first", "last", "before", or "after", same as dojo/dom-construct::place(). */ - placeAt(reference: String, position: number): any; + placeAt(reference: String, position?: number): any; /** * Place this widget somewhere in the DOM based * on standard domConstruct.place() conventions. @@ -93747,7 +93747,7 @@ declare module dijit { * @param reference Widget, DOMNode, or id of widget or DOMNode * @param position OptionalIf reference is a widget (or id of widget), and that widget has an ".addChild" method,it will be called passing this widget instance into that method, supplying the optionalposition index passed. In this case position (if specified) should be an integer.If reference is a DOMNode (or id matching a DOMNode but not a widget),the position argument can be a numeric index or a string"first", "last", "before", or "after", same as dojo/dom-construct::place(). */ - placeAt(reference: HTMLElement, position: number): any; + placeAt(reference: HTMLElement, position?: number): any; /** * Place this widget somewhere in the DOM based * on standard domConstruct.place() conventions. @@ -93758,7 +93758,7 @@ declare module dijit { * @param reference Widget, DOMNode, or id of widget or DOMNode * @param position OptionalIf reference is a widget (or id of widget), and that widget has an ".addChild" method,it will be called passing this widget instance into that method, supplying the optionalposition index passed. In this case position (if specified) should be an integer.If reference is a DOMNode (or id matching a DOMNode but not a widget),the position argument can be a numeric index or a string"first", "last", "before", or "after", same as dojo/dom-construct::place(). */ - placeAt(reference: dijit._WidgetBase, position: number): any; + placeAt(reference: dijit._WidgetBase, position?: number): any; /** * */ @@ -94466,21 +94466,21 @@ declare module dijit { * @param widget * @param insertIndex Optional */ - addChild(widget: dijit._WidgetBase, insertIndex: number): void; + addChild(widget: dijit._WidgetBase, insertIndex?: number): void; /** * This method is deprecated, use get() or set() directly. * * @param name The property to get or set. If an object is passed here and nota string, its keys are used as names of attributes to be setand the value of the object as values to set in the widget. * @param value OptionalOptional. If provided, attr() operates as a setter. If omitted,the current value of the named property is returned. */ - attr(name: String, value: Object): any; + attr(name: String, value?: Object): any; /** * This method is deprecated, use get() or set() directly. * * @param name The property to get or set. If an object is passed here and nota string, its keys are used as names of attributes to be setand the value of the object as values to set in the widget. * @param value OptionalOptional. If provided, attr() operates as a setter. If omitted,the current value of the named property is returned. */ - attr(name: Object, value: Object): any; + attr(name: Object, value?: Object): any; /** * */ @@ -94632,7 +94632,7 @@ declare module dijit { * @param fcn Function reference. * @param delay OptionalDelay, defaults to 0. */ - defer(fcn: Function, delay: number): Object; + defer(fcn: Function, delay?: number): Object; /** * */ @@ -94676,7 +94676,7 @@ declare module dijit { * @param eventObj Optional * @param callbackArgs Optional */ - emit(type: String, eventObj: Object, callbackArgs: any[]): any; + emit(type: String, eventObj?: Object, callbackArgs?: any[]): any; /** * Get a property from a widget. * Get a named property from a widget. The property may @@ -94782,7 +94782,7 @@ declare module dijit { * @param reference Widget, DOMNode, or id of widget or DOMNode * @param position OptionalIf reference is a widget (or id of widget), and that widget has an ".addChild" method,it will be called passing this widget instance into that method, supplying the optionalposition index passed. In this case position (if specified) should be an integer.If reference is a DOMNode (or id matching a DOMNode but not a widget),the position argument can be a numeric index or a string"first", "last", "before", or "after", same as dojo/dom-construct::place(). */ - placeAt(reference: String, position: String): any; + placeAt(reference: String, position?: String): any; /** * Place this widget somewhere in the DOM based * on standard domConstruct.place() conventions. @@ -94793,7 +94793,7 @@ declare module dijit { * @param reference Widget, DOMNode, or id of widget or DOMNode * @param position OptionalIf reference is a widget (or id of widget), and that widget has an ".addChild" method,it will be called passing this widget instance into that method, supplying the optionalposition index passed. In this case position (if specified) should be an integer.If reference is a DOMNode (or id matching a DOMNode but not a widget),the position argument can be a numeric index or a string"first", "last", "before", or "after", same as dojo/dom-construct::place(). */ - placeAt(reference: HTMLElement, position: String): any; + placeAt(reference: HTMLElement, position?: String): any; /** * Place this widget somewhere in the DOM based * on standard domConstruct.place() conventions. @@ -94804,7 +94804,7 @@ declare module dijit { * @param reference Widget, DOMNode, or id of widget or DOMNode * @param position OptionalIf reference is a widget (or id of widget), and that widget has an ".addChild" method,it will be called passing this widget instance into that method, supplying the optionalposition index passed. In this case position (if specified) should be an integer.If reference is a DOMNode (or id matching a DOMNode but not a widget),the position argument can be a numeric index or a string"first", "last", "before", or "after", same as dojo/dom-construct::place(). */ - placeAt(reference: dijit._WidgetBase, position: String): any; + placeAt(reference: dijit._WidgetBase, position?: String): any; /** * Place this widget somewhere in the DOM based * on standard domConstruct.place() conventions. @@ -94815,7 +94815,7 @@ declare module dijit { * @param reference Widget, DOMNode, or id of widget or DOMNode * @param position OptionalIf reference is a widget (or id of widget), and that widget has an ".addChild" method,it will be called passing this widget instance into that method, supplying the optionalposition index passed. In this case position (if specified) should be an integer.If reference is a DOMNode (or id matching a DOMNode but not a widget),the position argument can be a numeric index or a string"first", "last", "before", or "after", same as dojo/dom-construct::place(). */ - placeAt(reference: String, position: number): any; + placeAt(reference: String, position?: number): any; /** * Place this widget somewhere in the DOM based * on standard domConstruct.place() conventions. @@ -94826,7 +94826,7 @@ declare module dijit { * @param reference Widget, DOMNode, or id of widget or DOMNode * @param position OptionalIf reference is a widget (or id of widget), and that widget has an ".addChild" method,it will be called passing this widget instance into that method, supplying the optionalposition index passed. In this case position (if specified) should be an integer.If reference is a DOMNode (or id matching a DOMNode but not a widget),the position argument can be a numeric index or a string"first", "last", "before", or "after", same as dojo/dom-construct::place(). */ - placeAt(reference: HTMLElement, position: number): any; + placeAt(reference: HTMLElement, position?: number): any; /** * Place this widget somewhere in the DOM based * on standard domConstruct.place() conventions. @@ -94837,7 +94837,7 @@ declare module dijit { * @param reference Widget, DOMNode, or id of widget or DOMNode * @param position OptionalIf reference is a widget (or id of widget), and that widget has an ".addChild" method,it will be called passing this widget instance into that method, supplying the optionalposition index passed. In this case position (if specified) should be an integer.If reference is a DOMNode (or id matching a DOMNode but not a widget),the position argument can be a numeric index or a string"first", "last", "before", or "after", same as dojo/dom-construct::place(). */ - placeAt(reference: dijit._WidgetBase, position: number): any; + placeAt(reference: dijit._WidgetBase, position?: number): any; /** * */ @@ -95466,21 +95466,21 @@ declare module dijit { * @param widget * @param insertIndex Optional */ - addChild(widget: dijit._WidgetBase, insertIndex: number): void; + addChild(widget: dijit._WidgetBase, insertIndex?: number): void; /** * This method is deprecated, use get() or set() directly. * * @param name The property to get or set. If an object is passed here and nota string, its keys are used as names of attributes to be setand the value of the object as values to set in the widget. * @param value OptionalOptional. If provided, attr() operates as a setter. If omitted,the current value of the named property is returned. */ - attr(name: String, value: Object): any; + attr(name: String, value?: Object): any; /** * This method is deprecated, use get() or set() directly. * * @param name The property to get or set. If an object is passed here and nota string, its keys are used as names of attributes to be setand the value of the object as values to set in the widget. * @param value OptionalOptional. If provided, attr() operates as a setter. If omitted,the current value of the named property is returned. */ - attr(name: Object, value: Object): any; + attr(name: Object, value?: Object): any; /** * */ @@ -95636,7 +95636,7 @@ declare module dijit { * @param fcn Function reference. * @param delay OptionalDelay, defaults to 0. */ - defer(fcn: Function, delay: number): Object; + defer(fcn: Function, delay?: number): Object; /** * * @param preserveDom @@ -95704,7 +95704,7 @@ declare module dijit { * @param eventObj Optional * @param callbackArgs Optional */ - emit(type: String, eventObj: Object, callbackArgs: any[]): any; + emit(type: String, eventObj?: Object, callbackArgs?: any[]): any; /** * Get a property from a widget. * Get a named property from a widget. The property may @@ -95803,7 +95803,7 @@ declare module dijit { * @param reference Widget, DOMNode, or id of widget or DOMNode * @param position OptionalIf reference is a widget (or id of widget), and that widget has an ".addChild" method,it will be called passing this widget instance into that method, supplying the optionalposition index passed. In this case position (if specified) should be an integer.If reference is a DOMNode (or id matching a DOMNode but not a widget),the position argument can be a numeric index or a string"first", "last", "before", or "after", same as dojo/dom-construct::place(). */ - placeAt(reference: String, position: String): any; + placeAt(reference: String, position?: String): any; /** * Place this widget somewhere in the DOM based * on standard domConstruct.place() conventions. @@ -95814,7 +95814,7 @@ declare module dijit { * @param reference Widget, DOMNode, or id of widget or DOMNode * @param position OptionalIf reference is a widget (or id of widget), and that widget has an ".addChild" method,it will be called passing this widget instance into that method, supplying the optionalposition index passed. In this case position (if specified) should be an integer.If reference is a DOMNode (or id matching a DOMNode but not a widget),the position argument can be a numeric index or a string"first", "last", "before", or "after", same as dojo/dom-construct::place(). */ - placeAt(reference: HTMLElement, position: String): any; + placeAt(reference: HTMLElement, position?: String): any; /** * Place this widget somewhere in the DOM based * on standard domConstruct.place() conventions. @@ -95825,7 +95825,7 @@ declare module dijit { * @param reference Widget, DOMNode, or id of widget or DOMNode * @param position OptionalIf reference is a widget (or id of widget), and that widget has an ".addChild" method,it will be called passing this widget instance into that method, supplying the optionalposition index passed. In this case position (if specified) should be an integer.If reference is a DOMNode (or id matching a DOMNode but not a widget),the position argument can be a numeric index or a string"first", "last", "before", or "after", same as dojo/dom-construct::place(). */ - placeAt(reference: dijit._WidgetBase, position: String): any; + placeAt(reference: dijit._WidgetBase, position?: String): any; /** * Place this widget somewhere in the DOM based * on standard domConstruct.place() conventions. @@ -95836,7 +95836,7 @@ declare module dijit { * @param reference Widget, DOMNode, or id of widget or DOMNode * @param position OptionalIf reference is a widget (or id of widget), and that widget has an ".addChild" method,it will be called passing this widget instance into that method, supplying the optionalposition index passed. In this case position (if specified) should be an integer.If reference is a DOMNode (or id matching a DOMNode but not a widget),the position argument can be a numeric index or a string"first", "last", "before", or "after", same as dojo/dom-construct::place(). */ - placeAt(reference: String, position: number): any; + placeAt(reference: String, position?: number): any; /** * Place this widget somewhere in the DOM based * on standard domConstruct.place() conventions. @@ -95847,7 +95847,7 @@ declare module dijit { * @param reference Widget, DOMNode, or id of widget or DOMNode * @param position OptionalIf reference is a widget (or id of widget), and that widget has an ".addChild" method,it will be called passing this widget instance into that method, supplying the optionalposition index passed. In this case position (if specified) should be an integer.If reference is a DOMNode (or id matching a DOMNode but not a widget),the position argument can be a numeric index or a string"first", "last", "before", or "after", same as dojo/dom-construct::place(). */ - placeAt(reference: HTMLElement, position: number): any; + placeAt(reference: HTMLElement, position?: number): any; /** * Place this widget somewhere in the DOM based * on standard domConstruct.place() conventions. @@ -95858,7 +95858,7 @@ declare module dijit { * @param reference Widget, DOMNode, or id of widget or DOMNode * @param position OptionalIf reference is a widget (or id of widget), and that widget has an ".addChild" method,it will be called passing this widget instance into that method, supplying the optionalposition index passed. In this case position (if specified) should be an integer.If reference is a DOMNode (or id matching a DOMNode but not a widget),the position argument can be a numeric index or a string"first", "last", "before", or "after", same as dojo/dom-construct::place(). */ - placeAt(reference: dijit._WidgetBase, position: number): any; + placeAt(reference: dijit._WidgetBase, position?: number): any; /** * */ @@ -96391,14 +96391,14 @@ declare module dijit { * @param name The property to get or set. If an object is passed here and nota string, its keys are used as names of attributes to be setand the value of the object as values to set in the widget. * @param value OptionalOptional. If provided, attr() operates as a setter. If omitted,the current value of the named property is returned. */ - attr(name: String, value: Object): any; + attr(name: String, value?: Object): any; /** * This method is deprecated, use get() or set() directly. * * @param name The property to get or set. If an object is passed here and nota string, its keys are used as names of attributes to be setand the value of the object as values to set in the widget. * @param value OptionalOptional. If provided, attr() operates as a setter. If omitted,the current value of the named property is returned. */ - attr(name: Object, value: Object): any; + attr(name: Object, value?: Object): any; /** * Begin dragging the splitter between child[i] and child[i+1] * @@ -96552,7 +96552,7 @@ declare module dijit { * @param fcn Function reference. * @param delay OptionalDelay, defaults to 0. */ - defer(fcn: Function, delay: number): Object; + defer(fcn: Function, delay?: number): Object; /** * */ @@ -96600,7 +96600,7 @@ declare module dijit { * @param eventObj Optional * @param callbackArgs Optional */ - emit(type: String, eventObj: Object, callbackArgs: any[]): any; + emit(type: String, eventObj?: Object, callbackArgs?: any[]): any; /** * */ @@ -96721,7 +96721,7 @@ declare module dijit { * @param reference Widget, DOMNode, or id of widget or DOMNode * @param position OptionalIf reference is a widget (or id of widget), and that widget has an ".addChild" method,it will be called passing this widget instance into that method, supplying the optionalposition index passed. In this case position (if specified) should be an integer.If reference is a DOMNode (or id matching a DOMNode but not a widget),the position argument can be a numeric index or a string"first", "last", "before", or "after", same as dojo/dom-construct::place(). */ - placeAt(reference: String, position: String): any; + placeAt(reference: String, position?: String): any; /** * Place this widget somewhere in the DOM based * on standard domConstruct.place() conventions. @@ -96732,7 +96732,7 @@ declare module dijit { * @param reference Widget, DOMNode, or id of widget or DOMNode * @param position OptionalIf reference is a widget (or id of widget), and that widget has an ".addChild" method,it will be called passing this widget instance into that method, supplying the optionalposition index passed. In this case position (if specified) should be an integer.If reference is a DOMNode (or id matching a DOMNode but not a widget),the position argument can be a numeric index or a string"first", "last", "before", or "after", same as dojo/dom-construct::place(). */ - placeAt(reference: HTMLElement, position: String): any; + placeAt(reference: HTMLElement, position?: String): any; /** * Place this widget somewhere in the DOM based * on standard domConstruct.place() conventions. @@ -96743,7 +96743,7 @@ declare module dijit { * @param reference Widget, DOMNode, or id of widget or DOMNode * @param position OptionalIf reference is a widget (or id of widget), and that widget has an ".addChild" method,it will be called passing this widget instance into that method, supplying the optionalposition index passed. In this case position (if specified) should be an integer.If reference is a DOMNode (or id matching a DOMNode but not a widget),the position argument can be a numeric index or a string"first", "last", "before", or "after", same as dojo/dom-construct::place(). */ - placeAt(reference: dijit._WidgetBase, position: String): any; + placeAt(reference: dijit._WidgetBase, position?: String): any; /** * Place this widget somewhere in the DOM based * on standard domConstruct.place() conventions. @@ -96754,7 +96754,7 @@ declare module dijit { * @param reference Widget, DOMNode, or id of widget or DOMNode * @param position OptionalIf reference is a widget (or id of widget), and that widget has an ".addChild" method,it will be called passing this widget instance into that method, supplying the optionalposition index passed. In this case position (if specified) should be an integer.If reference is a DOMNode (or id matching a DOMNode but not a widget),the position argument can be a numeric index or a string"first", "last", "before", or "after", same as dojo/dom-construct::place(). */ - placeAt(reference: String, position: number): any; + placeAt(reference: String, position?: number): any; /** * Place this widget somewhere in the DOM based * on standard domConstruct.place() conventions. @@ -96765,7 +96765,7 @@ declare module dijit { * @param reference Widget, DOMNode, or id of widget or DOMNode * @param position OptionalIf reference is a widget (or id of widget), and that widget has an ".addChild" method,it will be called passing this widget instance into that method, supplying the optionalposition index passed. In this case position (if specified) should be an integer.If reference is a DOMNode (or id matching a DOMNode but not a widget),the position argument can be a numeric index or a string"first", "last", "before", or "after", same as dojo/dom-construct::place(). */ - placeAt(reference: HTMLElement, position: number): any; + placeAt(reference: HTMLElement, position?: number): any; /** * Place this widget somewhere in the DOM based * on standard domConstruct.place() conventions. @@ -96776,7 +96776,7 @@ declare module dijit { * @param reference Widget, DOMNode, or id of widget or DOMNode * @param position OptionalIf reference is a widget (or id of widget), and that widget has an ".addChild" method,it will be called passing this widget instance into that method, supplying the optionalposition index passed. In this case position (if specified) should be an integer.If reference is a DOMNode (or id matching a DOMNode but not a widget),the position argument can be a numeric index or a string"first", "last", "before", or "after", same as dojo/dom-construct::place(). */ - placeAt(reference: dijit._WidgetBase, position: number): any; + placeAt(reference: dijit._WidgetBase, position?: number): any; /** * */ @@ -97300,14 +97300,14 @@ declare module dijit { * @param name The property to get or set. If an object is passed here and nota string, its keys are used as names of attributes to be setand the value of the object as values to set in the widget. * @param value OptionalOptional. If provided, attr() operates as a setter. If omitted,the current value of the named property is returned. */ - attr(name: String, value: Object): any; + attr(name: String, value?: Object): any; /** * This method is deprecated, use get() or set() directly. * * @param name The property to get or set. If an object is passed here and nota string, its keys are used as names of attributes to be setand the value of the object as values to set in the widget. * @param value OptionalOptional. If provided, attr() operates as a setter. If omitted,the current value of the named property is returned. */ - attr(name: Object, value: Object): any; + attr(name: Object, value?: Object): any; /** * Go back to previous page. * @@ -97453,7 +97453,7 @@ declare module dijit { * @param fcn Function reference. * @param delay OptionalDelay, defaults to 0. */ - defer(fcn: Function, delay: number): Object; + defer(fcn: Function, delay?: number): Object; /** * Destroy this widget, but not its descendants. Descendants means widgets inside of * this.containerNode. Will also destroy any resources (including widgets) registered via this.own(). @@ -97509,7 +97509,7 @@ declare module dijit { * @param eventObj Optional * @param callbackArgs Optional */ - emit(type: String, eventObj: Object, callbackArgs: any[]): any; + emit(type: String, eventObj?: Object, callbackArgs?: any[]): any; /** * Advance to next page. * @@ -97630,7 +97630,7 @@ declare module dijit { * @param reference Widget, DOMNode, or id of widget or DOMNode * @param position OptionalIf reference is a widget (or id of widget), and that widget has an ".addChild" method,it will be called passing this widget instance into that method, supplying the optionalposition index passed. In this case position (if specified) should be an integer.If reference is a DOMNode (or id matching a DOMNode but not a widget),the position argument can be a numeric index or a string"first", "last", "before", or "after", same as dojo/dom-construct::place(). */ - placeAt(reference: String, position: String): any; + placeAt(reference: String, position?: String): any; /** * Place this widget somewhere in the DOM based * on standard domConstruct.place() conventions. @@ -97641,7 +97641,7 @@ declare module dijit { * @param reference Widget, DOMNode, or id of widget or DOMNode * @param position OptionalIf reference is a widget (or id of widget), and that widget has an ".addChild" method,it will be called passing this widget instance into that method, supplying the optionalposition index passed. In this case position (if specified) should be an integer.If reference is a DOMNode (or id matching a DOMNode but not a widget),the position argument can be a numeric index or a string"first", "last", "before", or "after", same as dojo/dom-construct::place(). */ - placeAt(reference: HTMLElement, position: String): any; + placeAt(reference: HTMLElement, position?: String): any; /** * Place this widget somewhere in the DOM based * on standard domConstruct.place() conventions. @@ -97652,7 +97652,7 @@ declare module dijit { * @param reference Widget, DOMNode, or id of widget or DOMNode * @param position OptionalIf reference is a widget (or id of widget), and that widget has an ".addChild" method,it will be called passing this widget instance into that method, supplying the optionalposition index passed. In this case position (if specified) should be an integer.If reference is a DOMNode (or id matching a DOMNode but not a widget),the position argument can be a numeric index or a string"first", "last", "before", or "after", same as dojo/dom-construct::place(). */ - placeAt(reference: dijit._WidgetBase, position: String): any; + placeAt(reference: dijit._WidgetBase, position?: String): any; /** * Place this widget somewhere in the DOM based * on standard domConstruct.place() conventions. @@ -97663,7 +97663,7 @@ declare module dijit { * @param reference Widget, DOMNode, or id of widget or DOMNode * @param position OptionalIf reference is a widget (or id of widget), and that widget has an ".addChild" method,it will be called passing this widget instance into that method, supplying the optionalposition index passed. In this case position (if specified) should be an integer.If reference is a DOMNode (or id matching a DOMNode but not a widget),the position argument can be a numeric index or a string"first", "last", "before", or "after", same as dojo/dom-construct::place(). */ - placeAt(reference: String, position: number): any; + placeAt(reference: String, position?: number): any; /** * Place this widget somewhere in the DOM based * on standard domConstruct.place() conventions. @@ -97674,7 +97674,7 @@ declare module dijit { * @param reference Widget, DOMNode, or id of widget or DOMNode * @param position OptionalIf reference is a widget (or id of widget), and that widget has an ".addChild" method,it will be called passing this widget instance into that method, supplying the optionalposition index passed. In this case position (if specified) should be an integer.If reference is a DOMNode (or id matching a DOMNode but not a widget),the position argument can be a numeric index or a string"first", "last", "before", or "after", same as dojo/dom-construct::place(). */ - placeAt(reference: HTMLElement, position: number): any; + placeAt(reference: HTMLElement, position?: number): any; /** * Place this widget somewhere in the DOM based * on standard domConstruct.place() conventions. @@ -97685,7 +97685,7 @@ declare module dijit { * @param reference Widget, DOMNode, or id of widget or DOMNode * @param position OptionalIf reference is a widget (or id of widget), and that widget has an ".addChild" method,it will be called passing this widget instance into that method, supplying the optionalposition index passed. In this case position (if specified) should be an integer.If reference is a DOMNode (or id matching a DOMNode but not a widget),the position argument can be a numeric index or a string"first", "last", "before", or "after", same as dojo/dom-construct::place(). */ - placeAt(reference: dijit._WidgetBase, position: number): any; + placeAt(reference: dijit._WidgetBase, position?: number): any; /** * */ @@ -98220,21 +98220,21 @@ declare module dijit { * @param widget * @param insertIndex Optional */ - addChild(widget: dijit._WidgetBase, insertIndex: number): void; + addChild(widget: dijit._WidgetBase, insertIndex?: number): void; /** * This method is deprecated, use get() or set() directly. * * @param name The property to get or set. If an object is passed here and nota string, its keys are used as names of attributes to be setand the value of the object as values to set in the widget. * @param value OptionalOptional. If provided, attr() operates as a setter. If omitted,the current value of the named property is returned. */ - attr(name: String, value: Object): any; + attr(name: String, value?: Object): any; /** * This method is deprecated, use get() or set() directly. * * @param name The property to get or set. If an object is passed here and nota string, its keys are used as names of attributes to be setand the value of the object as values to set in the widget. * @param value OptionalOptional. If provided, attr() operates as a setter. If omitted,the current value of the named property is returned. */ - attr(name: Object, value: Object): any; + attr(name: Object, value?: Object): any; /** * Construct the UI for this widget, setting this.domNode. * Most widgets will mixin dijit._TemplatedMixin, which implements this method. @@ -98382,7 +98382,7 @@ declare module dijit { * @param fcn Function reference. * @param delay OptionalDelay, defaults to 0. */ - defer(fcn: Function, delay: number): Object; + defer(fcn: Function, delay?: number): Object; /** * * @param preserveDom @@ -98431,7 +98431,7 @@ declare module dijit { * @param eventObj Optional * @param callbackArgs Optional */ - emit(type: String, eventObj: Object, callbackArgs: any[]): any; + emit(type: String, eventObj?: Object, callbackArgs?: any[]): any; /** * Get a property from a widget. * Get a named property from a widget. The property may @@ -98530,7 +98530,7 @@ declare module dijit { * @param reference Widget, DOMNode, or id of widget or DOMNode * @param position OptionalIf reference is a widget (or id of widget), and that widget has an ".addChild" method,it will be called passing this widget instance into that method, supplying the optionalposition index passed. In this case position (if specified) should be an integer.If reference is a DOMNode (or id matching a DOMNode but not a widget),the position argument can be a numeric index or a string"first", "last", "before", or "after", same as dojo/dom-construct::place(). */ - placeAt(reference: String, position: String): any; + placeAt(reference: String, position?: String): any; /** * Place this widget somewhere in the DOM based * on standard domConstruct.place() conventions. @@ -98541,7 +98541,7 @@ declare module dijit { * @param reference Widget, DOMNode, or id of widget or DOMNode * @param position OptionalIf reference is a widget (or id of widget), and that widget has an ".addChild" method,it will be called passing this widget instance into that method, supplying the optionalposition index passed. In this case position (if specified) should be an integer.If reference is a DOMNode (or id matching a DOMNode but not a widget),the position argument can be a numeric index or a string"first", "last", "before", or "after", same as dojo/dom-construct::place(). */ - placeAt(reference: HTMLElement, position: String): any; + placeAt(reference: HTMLElement, position?: String): any; /** * Place this widget somewhere in the DOM based * on standard domConstruct.place() conventions. @@ -98552,7 +98552,7 @@ declare module dijit { * @param reference Widget, DOMNode, or id of widget or DOMNode * @param position OptionalIf reference is a widget (or id of widget), and that widget has an ".addChild" method,it will be called passing this widget instance into that method, supplying the optionalposition index passed. In this case position (if specified) should be an integer.If reference is a DOMNode (or id matching a DOMNode but not a widget),the position argument can be a numeric index or a string"first", "last", "before", or "after", same as dojo/dom-construct::place(). */ - placeAt(reference: dijit._WidgetBase, position: String): any; + placeAt(reference: dijit._WidgetBase, position?: String): any; /** * Place this widget somewhere in the DOM based * on standard domConstruct.place() conventions. @@ -98563,7 +98563,7 @@ declare module dijit { * @param reference Widget, DOMNode, or id of widget or DOMNode * @param position OptionalIf reference is a widget (or id of widget), and that widget has an ".addChild" method,it will be called passing this widget instance into that method, supplying the optionalposition index passed. In this case position (if specified) should be an integer.If reference is a DOMNode (or id matching a DOMNode but not a widget),the position argument can be a numeric index or a string"first", "last", "before", or "after", same as dojo/dom-construct::place(). */ - placeAt(reference: String, position: number): any; + placeAt(reference: String, position?: number): any; /** * Place this widget somewhere in the DOM based * on standard domConstruct.place() conventions. @@ -98574,7 +98574,7 @@ declare module dijit { * @param reference Widget, DOMNode, or id of widget or DOMNode * @param position OptionalIf reference is a widget (or id of widget), and that widget has an ".addChild" method,it will be called passing this widget instance into that method, supplying the optionalposition index passed. In this case position (if specified) should be an integer.If reference is a DOMNode (or id matching a DOMNode but not a widget),the position argument can be a numeric index or a string"first", "last", "before", or "after", same as dojo/dom-construct::place(). */ - placeAt(reference: HTMLElement, position: number): any; + placeAt(reference: HTMLElement, position?: number): any; /** * Place this widget somewhere in the DOM based * on standard domConstruct.place() conventions. @@ -98585,7 +98585,7 @@ declare module dijit { * @param reference Widget, DOMNode, or id of widget or DOMNode * @param position OptionalIf reference is a widget (or id of widget), and that widget has an ".addChild" method,it will be called passing this widget instance into that method, supplying the optionalposition index passed. In this case position (if specified) should be an integer.If reference is a DOMNode (or id matching a DOMNode but not a widget),the position argument can be a numeric index or a string"first", "last", "before", or "after", same as dojo/dom-construct::place(). */ - placeAt(reference: dijit._WidgetBase, position: number): any; + placeAt(reference: dijit._WidgetBase, position?: number): any; /** * */ @@ -99218,14 +99218,14 @@ declare module dijit { * @param name The property to get or set. If an object is passed here and nota string, its keys are used as names of attributes to be setand the value of the object as values to set in the widget. * @param value OptionalOptional. If provided, attr() operates as a setter. If omitted,the current value of the named property is returned. */ - attr(name: String, value: Object): any; + attr(name: String, value?: Object): any; /** * This method is deprecated, use get() or set() directly. * * @param name The property to get or set. If an object is passed here and nota string, its keys are used as names of attributes to be setand the value of the object as values to set in the widget. * @param value OptionalOptional. If provided, attr() operates as a setter. If omitted,the current value of the named property is returned. */ - attr(name: Object, value: Object): any; + attr(name: Object, value?: Object): any; /** * * @param evt @@ -99374,7 +99374,7 @@ declare module dijit { * @param fcn Function reference. * @param delay OptionalDelay, defaults to 0. */ - defer(fcn: Function, delay: number): Object; + defer(fcn: Function, delay?: number): Object; /** * Destroy this widget, but not its descendants. Descendants means widgets inside of * this.containerNode. Will also destroy any resources (including widgets) registered via this.own(). @@ -99432,7 +99432,7 @@ declare module dijit { * @param eventObj Optional * @param callbackArgs Optional */ - emit(type: String, eventObj: Object, callbackArgs: any[]): any; + emit(type: String, eventObj?: Object, callbackArgs?: any[]): any; /** * Put focus on this widget * @@ -99524,7 +99524,7 @@ declare module dijit { * @param reference Widget, DOMNode, or id of widget or DOMNode * @param position OptionalIf reference is a widget (or id of widget), and that widget has an ".addChild" method,it will be called passing this widget instance into that method, supplying the optionalposition index passed. In this case position (if specified) should be an integer.If reference is a DOMNode (or id matching a DOMNode but not a widget),the position argument can be a numeric index or a string"first", "last", "before", or "after", same as dojo/dom-construct::place(). */ - placeAt(reference: String, position: String): any; + placeAt(reference: String, position?: String): any; /** * Place this widget somewhere in the DOM based * on standard domConstruct.place() conventions. @@ -99535,7 +99535,7 @@ declare module dijit { * @param reference Widget, DOMNode, or id of widget or DOMNode * @param position OptionalIf reference is a widget (or id of widget), and that widget has an ".addChild" method,it will be called passing this widget instance into that method, supplying the optionalposition index passed. In this case position (if specified) should be an integer.If reference is a DOMNode (or id matching a DOMNode but not a widget),the position argument can be a numeric index or a string"first", "last", "before", or "after", same as dojo/dom-construct::place(). */ - placeAt(reference: HTMLElement, position: String): any; + placeAt(reference: HTMLElement, position?: String): any; /** * Place this widget somewhere in the DOM based * on standard domConstruct.place() conventions. @@ -99546,7 +99546,7 @@ declare module dijit { * @param reference Widget, DOMNode, or id of widget or DOMNode * @param position OptionalIf reference is a widget (or id of widget), and that widget has an ".addChild" method,it will be called passing this widget instance into that method, supplying the optionalposition index passed. In this case position (if specified) should be an integer.If reference is a DOMNode (or id matching a DOMNode but not a widget),the position argument can be a numeric index or a string"first", "last", "before", or "after", same as dojo/dom-construct::place(). */ - placeAt(reference: dijit._WidgetBase, position: String): any; + placeAt(reference: dijit._WidgetBase, position?: String): any; /** * Place this widget somewhere in the DOM based * on standard domConstruct.place() conventions. @@ -99557,7 +99557,7 @@ declare module dijit { * @param reference Widget, DOMNode, or id of widget or DOMNode * @param position OptionalIf reference is a widget (or id of widget), and that widget has an ".addChild" method,it will be called passing this widget instance into that method, supplying the optionalposition index passed. In this case position (if specified) should be an integer.If reference is a DOMNode (or id matching a DOMNode but not a widget),the position argument can be a numeric index or a string"first", "last", "before", or "after", same as dojo/dom-construct::place(). */ - placeAt(reference: String, position: number): any; + placeAt(reference: String, position?: number): any; /** * Place this widget somewhere in the DOM based * on standard domConstruct.place() conventions. @@ -99568,7 +99568,7 @@ declare module dijit { * @param reference Widget, DOMNode, or id of widget or DOMNode * @param position OptionalIf reference is a widget (or id of widget), and that widget has an ".addChild" method,it will be called passing this widget instance into that method, supplying the optionalposition index passed. In this case position (if specified) should be an integer.If reference is a DOMNode (or id matching a DOMNode but not a widget),the position argument can be a numeric index or a string"first", "last", "before", or "after", same as dojo/dom-construct::place(). */ - placeAt(reference: HTMLElement, position: number): any; + placeAt(reference: HTMLElement, position?: number): any; /** * Place this widget somewhere in the DOM based * on standard domConstruct.place() conventions. @@ -99579,7 +99579,7 @@ declare module dijit { * @param reference Widget, DOMNode, or id of widget or DOMNode * @param position OptionalIf reference is a widget (or id of widget), and that widget has an ".addChild" method,it will be called passing this widget instance into that method, supplying the optionalposition index passed. In this case position (if specified) should be an integer.If reference is a DOMNode (or id matching a DOMNode but not a widget),the position argument can be a numeric index or a string"first", "last", "before", or "after", same as dojo/dom-construct::place(). */ - placeAt(reference: dijit._WidgetBase, position: number): any; + placeAt(reference: dijit._WidgetBase, position?: number): any; /** * */ @@ -100167,14 +100167,14 @@ declare module dijit { * @param name The property to get or set. If an object is passed here and nota string, its keys are used as names of attributes to be setand the value of the object as values to set in the widget. * @param value OptionalOptional. If provided, attr() operates as a setter. If omitted,the current value of the named property is returned. */ - attr(name: String, value: Object): any; + attr(name: String, value?: Object): any; /** * This method is deprecated, use get() or set() directly. * * @param name The property to get or set. If an object is passed here and nota string, its keys are used as names of attributes to be setand the value of the object as values to set in the widget. * @param value OptionalOptional. If provided, attr() operates as a setter. If omitted,the current value of the named property is returned. */ - attr(name: Object, value: Object): any; + attr(name: Object, value?: Object): any; /** * Go back to previous page. * @@ -100320,7 +100320,7 @@ declare module dijit { * @param fcn Function reference. * @param delay OptionalDelay, defaults to 0. */ - defer(fcn: Function, delay: number): Object; + defer(fcn: Function, delay?: number): Object; /** * * @param preserveDom @@ -100367,7 +100367,7 @@ declare module dijit { * @param eventObj Optional * @param callbackArgs Optional */ - emit(type: String, eventObj: Object, callbackArgs: any[]): any; + emit(type: String, eventObj?: Object, callbackArgs?: any[]): any; /** * Advance to next page. * @@ -100488,7 +100488,7 @@ declare module dijit { * @param reference Widget, DOMNode, or id of widget or DOMNode * @param position OptionalIf reference is a widget (or id of widget), and that widget has an ".addChild" method,it will be called passing this widget instance into that method, supplying the optionalposition index passed. In this case position (if specified) should be an integer.If reference is a DOMNode (or id matching a DOMNode but not a widget),the position argument can be a numeric index or a string"first", "last", "before", or "after", same as dojo/dom-construct::place(). */ - placeAt(reference: String, position: String): any; + placeAt(reference: String, position?: String): any; /** * Place this widget somewhere in the DOM based * on standard domConstruct.place() conventions. @@ -100499,7 +100499,7 @@ declare module dijit { * @param reference Widget, DOMNode, or id of widget or DOMNode * @param position OptionalIf reference is a widget (or id of widget), and that widget has an ".addChild" method,it will be called passing this widget instance into that method, supplying the optionalposition index passed. In this case position (if specified) should be an integer.If reference is a DOMNode (or id matching a DOMNode but not a widget),the position argument can be a numeric index or a string"first", "last", "before", or "after", same as dojo/dom-construct::place(). */ - placeAt(reference: HTMLElement, position: String): any; + placeAt(reference: HTMLElement, position?: String): any; /** * Place this widget somewhere in the DOM based * on standard domConstruct.place() conventions. @@ -100510,7 +100510,7 @@ declare module dijit { * @param reference Widget, DOMNode, or id of widget or DOMNode * @param position OptionalIf reference is a widget (or id of widget), and that widget has an ".addChild" method,it will be called passing this widget instance into that method, supplying the optionalposition index passed. In this case position (if specified) should be an integer.If reference is a DOMNode (or id matching a DOMNode but not a widget),the position argument can be a numeric index or a string"first", "last", "before", or "after", same as dojo/dom-construct::place(). */ - placeAt(reference: dijit._WidgetBase, position: String): any; + placeAt(reference: dijit._WidgetBase, position?: String): any; /** * Place this widget somewhere in the DOM based * on standard domConstruct.place() conventions. @@ -100521,7 +100521,7 @@ declare module dijit { * @param reference Widget, DOMNode, or id of widget or DOMNode * @param position OptionalIf reference is a widget (or id of widget), and that widget has an ".addChild" method,it will be called passing this widget instance into that method, supplying the optionalposition index passed. In this case position (if specified) should be an integer.If reference is a DOMNode (or id matching a DOMNode but not a widget),the position argument can be a numeric index or a string"first", "last", "before", or "after", same as dojo/dom-construct::place(). */ - placeAt(reference: String, position: number): any; + placeAt(reference: String, position?: number): any; /** * Place this widget somewhere in the DOM based * on standard domConstruct.place() conventions. @@ -100532,7 +100532,7 @@ declare module dijit { * @param reference Widget, DOMNode, or id of widget or DOMNode * @param position OptionalIf reference is a widget (or id of widget), and that widget has an ".addChild" method,it will be called passing this widget instance into that method, supplying the optionalposition index passed. In this case position (if specified) should be an integer.If reference is a DOMNode (or id matching a DOMNode but not a widget),the position argument can be a numeric index or a string"first", "last", "before", or "after", same as dojo/dom-construct::place(). */ - placeAt(reference: HTMLElement, position: number): any; + placeAt(reference: HTMLElement, position?: number): any; /** * Place this widget somewhere in the DOM based * on standard domConstruct.place() conventions. @@ -100543,7 +100543,7 @@ declare module dijit { * @param reference Widget, DOMNode, or id of widget or DOMNode * @param position OptionalIf reference is a widget (or id of widget), and that widget has an ".addChild" method,it will be called passing this widget instance into that method, supplying the optionalposition index passed. In this case position (if specified) should be an integer.If reference is a DOMNode (or id matching a DOMNode but not a widget),the position argument can be a numeric index or a string"first", "last", "before", or "after", same as dojo/dom-construct::place(). */ - placeAt(reference: dijit._WidgetBase, position: number): any; + placeAt(reference: dijit._WidgetBase, position?: number): any; /** * */ @@ -101051,21 +101051,21 @@ declare module dijit { * @param widget * @param insertIndex Optional */ - addChild(widget: dijit._WidgetBase, insertIndex: number): void; + addChild(widget: dijit._WidgetBase, insertIndex?: number): void; /** * This method is deprecated, use get() or set() directly. * * @param name The property to get or set. If an object is passed here and nota string, its keys are used as names of attributes to be setand the value of the object as values to set in the widget. * @param value OptionalOptional. If provided, attr() operates as a setter. If omitted,the current value of the named property is returned. */ - attr(name: String, value: Object): any; + attr(name: String, value?: Object): any; /** * This method is deprecated, use get() or set() directly. * * @param name The property to get or set. If an object is passed here and nota string, its keys are used as names of attributes to be setand the value of the object as values to set in the widget. * @param value OptionalOptional. If provided, attr() operates as a setter. If omitted,the current value of the named property is returned. */ - attr(name: Object, value: Object): any; + attr(name: Object, value?: Object): any; /** * Construct the UI for this widget, setting this.domNode. * Most widgets will mixin dijit._TemplatedMixin, which implements this method. @@ -101213,7 +101213,7 @@ declare module dijit { * @param fcn Function reference. * @param delay OptionalDelay, defaults to 0. */ - defer(fcn: Function, delay: number): Object; + defer(fcn: Function, delay?: number): Object; /** * * @param preserveDom @@ -101262,7 +101262,7 @@ declare module dijit { * @param eventObj Optional * @param callbackArgs Optional */ - emit(type: String, eventObj: Object, callbackArgs: any[]): any; + emit(type: String, eventObj?: Object, callbackArgs?: any[]): any; /** * Get a property from a widget. * Get a named property from a widget. The property may @@ -101361,7 +101361,7 @@ declare module dijit { * @param reference Widget, DOMNode, or id of widget or DOMNode * @param position OptionalIf reference is a widget (or id of widget), and that widget has an ".addChild" method,it will be called passing this widget instance into that method, supplying the optionalposition index passed. In this case position (if specified) should be an integer.If reference is a DOMNode (or id matching a DOMNode but not a widget),the position argument can be a numeric index or a string"first", "last", "before", or "after", same as dojo/dom-construct::place(). */ - placeAt(reference: String, position: String): any; + placeAt(reference: String, position?: String): any; /** * Place this widget somewhere in the DOM based * on standard domConstruct.place() conventions. @@ -101372,7 +101372,7 @@ declare module dijit { * @param reference Widget, DOMNode, or id of widget or DOMNode * @param position OptionalIf reference is a widget (or id of widget), and that widget has an ".addChild" method,it will be called passing this widget instance into that method, supplying the optionalposition index passed. In this case position (if specified) should be an integer.If reference is a DOMNode (or id matching a DOMNode but not a widget),the position argument can be a numeric index or a string"first", "last", "before", or "after", same as dojo/dom-construct::place(). */ - placeAt(reference: HTMLElement, position: String): any; + placeAt(reference: HTMLElement, position?: String): any; /** * Place this widget somewhere in the DOM based * on standard domConstruct.place() conventions. @@ -101383,7 +101383,7 @@ declare module dijit { * @param reference Widget, DOMNode, or id of widget or DOMNode * @param position OptionalIf reference is a widget (or id of widget), and that widget has an ".addChild" method,it will be called passing this widget instance into that method, supplying the optionalposition index passed. In this case position (if specified) should be an integer.If reference is a DOMNode (or id matching a DOMNode but not a widget),the position argument can be a numeric index or a string"first", "last", "before", or "after", same as dojo/dom-construct::place(). */ - placeAt(reference: dijit._WidgetBase, position: String): any; + placeAt(reference: dijit._WidgetBase, position?: String): any; /** * Place this widget somewhere in the DOM based * on standard domConstruct.place() conventions. @@ -101394,7 +101394,7 @@ declare module dijit { * @param reference Widget, DOMNode, or id of widget or DOMNode * @param position OptionalIf reference is a widget (or id of widget), and that widget has an ".addChild" method,it will be called passing this widget instance into that method, supplying the optionalposition index passed. In this case position (if specified) should be an integer.If reference is a DOMNode (or id matching a DOMNode but not a widget),the position argument can be a numeric index or a string"first", "last", "before", or "after", same as dojo/dom-construct::place(). */ - placeAt(reference: String, position: number): any; + placeAt(reference: String, position?: number): any; /** * Place this widget somewhere in the DOM based * on standard domConstruct.place() conventions. @@ -101405,7 +101405,7 @@ declare module dijit { * @param reference Widget, DOMNode, or id of widget or DOMNode * @param position OptionalIf reference is a widget (or id of widget), and that widget has an ".addChild" method,it will be called passing this widget instance into that method, supplying the optionalposition index passed. In this case position (if specified) should be an integer.If reference is a DOMNode (or id matching a DOMNode but not a widget),the position argument can be a numeric index or a string"first", "last", "before", or "after", same as dojo/dom-construct::place(). */ - placeAt(reference: HTMLElement, position: number): any; + placeAt(reference: HTMLElement, position?: number): any; /** * Place this widget somewhere in the DOM based * on standard domConstruct.place() conventions. @@ -101416,7 +101416,7 @@ declare module dijit { * @param reference Widget, DOMNode, or id of widget or DOMNode * @param position OptionalIf reference is a widget (or id of widget), and that widget has an ".addChild" method,it will be called passing this widget instance into that method, supplying the optionalposition index passed. In this case position (if specified) should be an integer.If reference is a DOMNode (or id matching a DOMNode but not a widget),the position argument can be a numeric index or a string"first", "last", "before", or "after", same as dojo/dom-construct::place(). */ - placeAt(reference: dijit._WidgetBase, position: number): any; + placeAt(reference: dijit._WidgetBase, position?: number): any; /** * */ @@ -102034,14 +102034,14 @@ declare module dijit { * @param name The property to get or set. If an object is passed here and nota string, its keys are used as names of attributes to be setand the value of the object as values to set in the widget. * @param value OptionalOptional. If provided, attr() operates as a setter. If omitted,the current value of the named property is returned. */ - attr(name: String, value: Object): any; + attr(name: String, value?: Object): any; /** * This method is deprecated, use get() or set() directly. * * @param name The property to get or set. If an object is passed here and nota string, its keys are used as names of attributes to be setand the value of the object as values to set in the widget. * @param value OptionalOptional. If provided, attr() operates as a setter. If omitted,the current value of the named property is returned. */ - attr(name: Object, value: Object): any; + attr(name: Object, value?: Object): any; /** * */ @@ -102189,7 +102189,7 @@ declare module dijit { * @param fcn Function reference. * @param delay OptionalDelay, defaults to 0. */ - defer(fcn: Function, delay: number): Object; + defer(fcn: Function, delay?: number): Object; /** * Destroy this widget, but not its descendants. Descendants means widgets inside of * this.containerNode. Will also destroy any resources (including widgets) registered via this.own(). @@ -102247,7 +102247,7 @@ declare module dijit { * @param eventObj Optional * @param callbackArgs Optional */ - emit(type: String, eventObj: Object, callbackArgs: any[]): any; + emit(type: String, eventObj?: Object, callbackArgs?: any[]): any; /** * Put focus on this widget * @@ -102339,7 +102339,7 @@ declare module dijit { * @param reference Widget, DOMNode, or id of widget or DOMNode * @param position OptionalIf reference is a widget (or id of widget), and that widget has an ".addChild" method,it will be called passing this widget instance into that method, supplying the optionalposition index passed. In this case position (if specified) should be an integer.If reference is a DOMNode (or id matching a DOMNode but not a widget),the position argument can be a numeric index or a string"first", "last", "before", or "after", same as dojo/dom-construct::place(). */ - placeAt(reference: String, position: String): any; + placeAt(reference: String, position?: String): any; /** * Place this widget somewhere in the DOM based * on standard domConstruct.place() conventions. @@ -102350,7 +102350,7 @@ declare module dijit { * @param reference Widget, DOMNode, or id of widget or DOMNode * @param position OptionalIf reference is a widget (or id of widget), and that widget has an ".addChild" method,it will be called passing this widget instance into that method, supplying the optionalposition index passed. In this case position (if specified) should be an integer.If reference is a DOMNode (or id matching a DOMNode but not a widget),the position argument can be a numeric index or a string"first", "last", "before", or "after", same as dojo/dom-construct::place(). */ - placeAt(reference: HTMLElement, position: String): any; + placeAt(reference: HTMLElement, position?: String): any; /** * Place this widget somewhere in the DOM based * on standard domConstruct.place() conventions. @@ -102361,7 +102361,7 @@ declare module dijit { * @param reference Widget, DOMNode, or id of widget or DOMNode * @param position OptionalIf reference is a widget (or id of widget), and that widget has an ".addChild" method,it will be called passing this widget instance into that method, supplying the optionalposition index passed. In this case position (if specified) should be an integer.If reference is a DOMNode (or id matching a DOMNode but not a widget),the position argument can be a numeric index or a string"first", "last", "before", or "after", same as dojo/dom-construct::place(). */ - placeAt(reference: dijit._WidgetBase, position: String): any; + placeAt(reference: dijit._WidgetBase, position?: String): any; /** * Place this widget somewhere in the DOM based * on standard domConstruct.place() conventions. @@ -102372,7 +102372,7 @@ declare module dijit { * @param reference Widget, DOMNode, or id of widget or DOMNode * @param position OptionalIf reference is a widget (or id of widget), and that widget has an ".addChild" method,it will be called passing this widget instance into that method, supplying the optionalposition index passed. In this case position (if specified) should be an integer.If reference is a DOMNode (or id matching a DOMNode but not a widget),the position argument can be a numeric index or a string"first", "last", "before", or "after", same as dojo/dom-construct::place(). */ - placeAt(reference: String, position: number): any; + placeAt(reference: String, position?: number): any; /** * Place this widget somewhere in the DOM based * on standard domConstruct.place() conventions. @@ -102383,7 +102383,7 @@ declare module dijit { * @param reference Widget, DOMNode, or id of widget or DOMNode * @param position OptionalIf reference is a widget (or id of widget), and that widget has an ".addChild" method,it will be called passing this widget instance into that method, supplying the optionalposition index passed. In this case position (if specified) should be an integer.If reference is a DOMNode (or id matching a DOMNode but not a widget),the position argument can be a numeric index or a string"first", "last", "before", or "after", same as dojo/dom-construct::place(). */ - placeAt(reference: HTMLElement, position: number): any; + placeAt(reference: HTMLElement, position?: number): any; /** * Place this widget somewhere in the DOM based * on standard domConstruct.place() conventions. @@ -102394,7 +102394,7 @@ declare module dijit { * @param reference Widget, DOMNode, or id of widget or DOMNode * @param position OptionalIf reference is a widget (or id of widget), and that widget has an ".addChild" method,it will be called passing this widget instance into that method, supplying the optionalposition index passed. In this case position (if specified) should be an integer.If reference is a DOMNode (or id matching a DOMNode but not a widget),the position argument can be a numeric index or a string"first", "last", "before", or "after", same as dojo/dom-construct::place(). */ - placeAt(reference: dijit._WidgetBase, position: number): any; + placeAt(reference: dijit._WidgetBase, position?: number): any; /** * */ @@ -105018,14 +105018,14 @@ declare module dijit { * @param name The property to get or set. If an object is passed here and nota string, its keys are used as names of attributes to be setand the value of the object as values to set in the widget. * @param value OptionalOptional. If provided, attr() operates as a setter. If omitted,the current value of the named property is returned. */ - attr(name: String, value: Object): any; + attr(name: String, value?: Object): any; /** * This method is deprecated, use get() or set() directly. * * @param name The property to get or set. If an object is passed here and nota string, its keys are used as names of attributes to be setand the value of the object as values to set in the widget. * @param value OptionalOptional. If provided, attr() operates as a setter. If omitted,the current value of the named property is returned. */ - attr(name: Object, value: Object): any; + attr(name: Object, value?: Object): any; /** * */ @@ -105166,7 +105166,7 @@ declare module dijit { * @param fcn Function reference. * @param delay OptionalDelay, defaults to 0. */ - defer(fcn: Function, delay: number): Object; + defer(fcn: Function, delay?: number): Object; /** * Destroy this widget, but not its descendants. Descendants means widgets inside of * this.containerNode. Will also destroy any resources (including widgets) registered via this.own(). @@ -105224,7 +105224,7 @@ declare module dijit { * @param eventObj Optional * @param callbackArgs Optional */ - emit(type: String, eventObj: Object, callbackArgs: any[]): any; + emit(type: String, eventObj?: Object, callbackArgs?: any[]): any; /** * Focus the calendar by focusing one of the calendar cells * @@ -105348,7 +105348,7 @@ declare module dijit { * @param reference Widget, DOMNode, or id of widget or DOMNode * @param position OptionalIf reference is a widget (or id of widget), and that widget has an ".addChild" method,it will be called passing this widget instance into that method, supplying the optionalposition index passed. In this case position (if specified) should be an integer.If reference is a DOMNode (or id matching a DOMNode but not a widget),the position argument can be a numeric index or a string"first", "last", "before", or "after", same as dojo/dom-construct::place(). */ - placeAt(reference: String, position: String): any; + placeAt(reference: String, position?: String): any; /** * Place this widget somewhere in the DOM based * on standard domConstruct.place() conventions. @@ -105359,7 +105359,7 @@ declare module dijit { * @param reference Widget, DOMNode, or id of widget or DOMNode * @param position OptionalIf reference is a widget (or id of widget), and that widget has an ".addChild" method,it will be called passing this widget instance into that method, supplying the optionalposition index passed. In this case position (if specified) should be an integer.If reference is a DOMNode (or id matching a DOMNode but not a widget),the position argument can be a numeric index or a string"first", "last", "before", or "after", same as dojo/dom-construct::place(). */ - placeAt(reference: HTMLElement, position: String): any; + placeAt(reference: HTMLElement, position?: String): any; /** * Place this widget somewhere in the DOM based * on standard domConstruct.place() conventions. @@ -105370,7 +105370,7 @@ declare module dijit { * @param reference Widget, DOMNode, or id of widget or DOMNode * @param position OptionalIf reference is a widget (or id of widget), and that widget has an ".addChild" method,it will be called passing this widget instance into that method, supplying the optionalposition index passed. In this case position (if specified) should be an integer.If reference is a DOMNode (or id matching a DOMNode but not a widget),the position argument can be a numeric index or a string"first", "last", "before", or "after", same as dojo/dom-construct::place(). */ - placeAt(reference: dijit._WidgetBase, position: String): any; + placeAt(reference: dijit._WidgetBase, position?: String): any; /** * Place this widget somewhere in the DOM based * on standard domConstruct.place() conventions. @@ -105381,7 +105381,7 @@ declare module dijit { * @param reference Widget, DOMNode, or id of widget or DOMNode * @param position OptionalIf reference is a widget (or id of widget), and that widget has an ".addChild" method,it will be called passing this widget instance into that method, supplying the optionalposition index passed. In this case position (if specified) should be an integer.If reference is a DOMNode (or id matching a DOMNode but not a widget),the position argument can be a numeric index or a string"first", "last", "before", or "after", same as dojo/dom-construct::place(). */ - placeAt(reference: String, position: number): any; + placeAt(reference: String, position?: number): any; /** * Place this widget somewhere in the DOM based * on standard domConstruct.place() conventions. @@ -105392,7 +105392,7 @@ declare module dijit { * @param reference Widget, DOMNode, or id of widget or DOMNode * @param position OptionalIf reference is a widget (or id of widget), and that widget has an ".addChild" method,it will be called passing this widget instance into that method, supplying the optionalposition index passed. In this case position (if specified) should be an integer.If reference is a DOMNode (or id matching a DOMNode but not a widget),the position argument can be a numeric index or a string"first", "last", "before", or "after", same as dojo/dom-construct::place(). */ - placeAt(reference: HTMLElement, position: number): any; + placeAt(reference: HTMLElement, position?: number): any; /** * Place this widget somewhere in the DOM based * on standard domConstruct.place() conventions. @@ -105403,7 +105403,7 @@ declare module dijit { * @param reference Widget, DOMNode, or id of widget or DOMNode * @param position OptionalIf reference is a widget (or id of widget), and that widget has an ".addChild" method,it will be called passing this widget instance into that method, supplying the optionalposition index passed. In this case position (if specified) should be an integer.If reference is a DOMNode (or id matching a DOMNode but not a widget),the position argument can be a numeric index or a string"first", "last", "before", or "after", same as dojo/dom-construct::place(). */ - placeAt(reference: dijit._WidgetBase, position: number): any; + placeAt(reference: dijit._WidgetBase, position?: number): any; /** * */ diff --git a/dojo/dojo.d.ts b/dojo/dojo.d.ts index a2c653de29..ccdeda71e6 100644 --- a/dojo/dojo.d.ts +++ b/dojo/dojo.d.ts @@ -100,14 +100,14 @@ declare module dojo { * @param url URL to request * @param options OptionalOptions for the request. */ - get(url: String, options: dojo.request.iframe.__BaseOptions): dojo.request.__Promise; + get(url: String, options?: dojo.request.iframe.__BaseOptions): dojo.request.__Promise; /** * Send an HTTP POST request using an iframe element with the given URL and options. * * @param url URL to request * @param options OptionalOptions for the request. */ - post(url: String, options: dojo.request.iframe.__BaseOptions): dojo.request.__Promise; + post(url: String, options?: dojo.request.iframe.__BaseOptions): dojo.request.__Promise; /** * * @param _iframe @@ -295,28 +295,28 @@ declare module dojo { * @param url URL to request * @param options OptionalOptions for the request. */ - del(url: String, options: dojo.request.node.__BaseOptions): dojo.request.__Promise; + del(url: String, options?: dojo.request.node.__BaseOptions): dojo.request.__Promise; /** * Send an HTTP GET request using XMLHttpRequest with the given URL and options. * * @param url URL to request * @param options OptionalOptions for the request. */ - get(url: String, options: dojo.request.node.__BaseOptions): dojo.request.__Promise; + get(url: String, options?: dojo.request.node.__BaseOptions): dojo.request.__Promise; /** * Send an HTTP POST request using XMLHttpRequest with the given URL and options. * * @param url URL to request * @param options OptionalOptions for the request. */ - post(url: String, options: dojo.request.node.__BaseOptions): dojo.request.__Promise; + post(url: String, options?: dojo.request.node.__BaseOptions): dojo.request.__Promise; /** * Send an HTTP PUT request using XMLHttpRequest with the given URL and options. * * @param url URL to request * @param options OptionalOptions for the request. */ - put(url: String, options: dojo.request.node.__BaseOptions): dojo.request.__Promise; + put(url: String, options?: dojo.request.node.__BaseOptions): dojo.request.__Promise; } module node { @@ -497,7 +497,7 @@ declare module dojo { * @param url URL to request * @param options OptionalOptions for the request. */ - get(url: String, options: dojo.request.script.__BaseOptions): dojo.request.__Promise; + get(url: String, options?: dojo.request.script.__BaseOptions): dojo.request.__Promise; } module script { @@ -657,28 +657,28 @@ declare module dojo { * @param url URL to request * @param options OptionalOptions for the request. */ - del(url: String, options: dojo.request.xhr.__BaseOptions): dojo.request.__Promise; + del(url: String, options?: dojo.request.xhr.__BaseOptions): dojo.request.__Promise; /** * Send an HTTP GET request using XMLHttpRequest with the given URL and options. * * @param url URL to request * @param options OptionalOptions for the request. */ - get(url: String, options: dojo.request.xhr.__BaseOptions): dojo.request.__Promise; + get(url: String, options?: dojo.request.xhr.__BaseOptions): dojo.request.__Promise; /** * Send an HTTP POST request using XMLHttpRequest with the given URL and options. * * @param url URL to request * @param options OptionalOptions for the request. */ - post(url: String, options: dojo.request.xhr.__BaseOptions): dojo.request.__Promise; + post(url: String, options?: dojo.request.xhr.__BaseOptions): dojo.request.__Promise; /** * Send an HTTP PUT request using XMLHttpRequest with the given URL and options. * * @param url URL to request * @param options OptionalOptions for the request. */ - put(url: String, options: dojo.request.xhr.__BaseOptions): dojo.request.__Promise; + put(url: String, options?: dojo.request.xhr.__BaseOptions): dojo.request.__Promise; } module xhr { @@ -952,7 +952,7 @@ declare module dojo { * @param reason A message that may be sent to the deferred's canceler,explaining why it's being canceled. * @param strict OptionalIf strict, will throw an error if the deferred has alreadybeen fulfilled and consequently cannot be canceled. */ - cancel(reason: any, strict: boolean): any; + cancel(reason: any, strict?: boolean): any; /** * Checks whether the promise has been canceled. * @@ -1067,7 +1067,7 @@ declare module dojo { * @param type OptionalThe event to listen for. Events emitted: "start", "send","load", "error", "done", "stop". * @param listener OptionalA callback to be run when an event happens. */ - notify(type: String, listener: Function): any; + notify(type?: String, listener?: Function): any; /** * * @param url @@ -1117,7 +1117,7 @@ declare module dojo { * @param directReturn OptionalIf directReturn is true, the value passed in for wrap will bereturned instead of being called. Alternately, theAdapterRegistry can be set globally to "return not call" usingthe returnWrappers property. Either way, this behavior allowsthe registry to act as a "search" function instead of afunction interception library. * @param override OptionalIf override is given and true, the check function will be givenhighest priority. Otherwise, it will be the lowest priorityadapter. */ - register(name: String, check: Function, wrap: Function, directReturn: boolean, override: boolean): void; + register(name: String, check: Function, wrap: Function, directReturn?: boolean, override?: boolean): void; /** * Remove a named adapter from the registry * @@ -1310,7 +1310,7 @@ declare module dojo { * @param now OptionalOptional. Omit if test is not a function. Provides a way to immediatelyrun the test and cache the result. * @param force OptionalOptional. If the test already exists and force is truthy, then the existingtest will be replaced; otherwise, add does not replace an existing test (thatis, by default, the first test advice wins). */ - add(name: String, test: Function, now: boolean, force: boolean): any; + add(name: String, test: Function, now?: boolean, force?: boolean): any; /** * Register a new feature test for some named feature. * @@ -1319,7 +1319,7 @@ declare module dojo { * @param now OptionalOptional. Omit if test is not a function. Provides a way to immediatelyrun the test and cache the result. * @param force OptionalOptional. If the test already exists and force is truthy, then the existingtest will be replaced; otherwise, add does not replace an existing test (thatis, by default, the first test advice wins). */ - add(name: number, test: Function, now: boolean, force: boolean): any; + add(name: number, test: Function, now?: boolean, force?: boolean): any; /** * Deletes the contents of the element passed to test functions. * @@ -1833,7 +1833,7 @@ declare module dojo { * @param reason A message that may be sent to the deferred's canceler,explaining why it's being canceled. * @param strict OptionalIf strict, will throw an error if the deferred has alreadybeen fulfilled and consequently cannot be canceled. */ - cancel(reason: any, strict: boolean): any; + cancel(reason: any, strict?: boolean): any; /** * Checks whether the deferred has been canceled. * @@ -1863,7 +1863,7 @@ declare module dojo { * @param update The progress update. Passed to progbacks. * @param strict OptionalIf strict, will throw an error if the deferred has alreadybeen fulfilled and consequently no progress can be emitted. */ - progress(update: any, strict: boolean): dojo.promise.Promise; + progress(update: any, strict?: boolean): dojo.promise.Promise; /** * Reject the deferred. * Reject the deferred, putting it in an error state. @@ -1871,7 +1871,7 @@ declare module dojo { * @param error The error result of the deferred. Passed to errbacks. * @param strict OptionalIf strict, will throw an error if the deferred has alreadybeen fulfilled and consequently cannot be rejected. */ - reject(error: any, strict: boolean): any; + reject(error: any, strict?: boolean): any; /** * Resolve the deferred. * Resolve the deferred, putting it in a success state. @@ -1889,7 +1889,7 @@ declare module dojo { * @param errback OptionalCallback to be invoked when the promise is rejected.Receives the rejection error. * @param progback OptionalCallback to be invoked when the promise emits a progressupdate. Receives the progress update. */ - then(callback: Function, errback: Function, progback: Function): dojo.promise.Promise; + then(callback?: Function, errback?: Function, progback?: Function): dojo.promise.Promise; /** * */ @@ -1971,7 +1971,7 @@ declare module dojo { * @param content the content to be set on the parent element.This can be an html string, a node reference or a NodeList, dojo/NodeList, Array or other enumerable list of nodes * @param position Optionalcan be one of:"last"||"end" (default)"first||"start""before""after""replace" (replaces nodes in this NodeList with new content)"only" (removes other children of the nodes so new content is the only child)or an offset in the childNodes property */ - addContent(content: String, position: String): Function; + addContent(content: String, position?: String): Function; /** * add a node, NodeList or some HTML as a string to every item in the * list. Returns the original list. @@ -1983,7 +1983,7 @@ declare module dojo { * @param content the content to be set on the parent element.This can be an html string, a node reference or a NodeList, dojo/NodeList, Array or other enumerable list of nodes * @param position Optionalcan be one of:"last"||"end" (default)"first||"start""before""after""replace" (replaces nodes in this NodeList with new content)"only" (removes other children of the nodes so new content is the only child)or an offset in the childNodes property */ - addContent(content: HTMLElement, position: String): Function; + addContent(content: HTMLElement, position?: String): Function; /** * add a node, NodeList or some HTML as a string to every item in the * list. Returns the original list. @@ -1995,7 +1995,7 @@ declare module dojo { * @param content the content to be set on the parent element.This can be an html string, a node reference or a NodeList, dojo/NodeList, Array or other enumerable list of nodes * @param position Optionalcan be one of:"last"||"end" (default)"first||"start""before""after""replace" (replaces nodes in this NodeList with new content)"only" (removes other children of the nodes so new content is the only child)or an offset in the childNodes property */ - addContent(content: Object, position: String): Function; + addContent(content: Object, position?: String): Function; /** * add a node, NodeList or some HTML as a string to every item in the * list. Returns the original list. @@ -2007,7 +2007,7 @@ declare module dojo { * @param content the content to be set on the parent element.This can be an html string, a node reference or a NodeList, dojo/NodeList, Array or other enumerable list of nodes * @param position Optionalcan be one of:"last"||"end" (default)"first||"start""before""after""replace" (replaces nodes in this NodeList with new content)"only" (removes other children of the nodes so new content is the only child)or an offset in the childNodes property */ - addContent(content: dojo.NodeList, position: String): Function; + addContent(content: dojo.NodeList, position?: String): Function; /** * add a node, NodeList or some HTML as a string to every item in the * list. Returns the original list. @@ -2019,7 +2019,7 @@ declare module dojo { * @param content the content to be set on the parent element.This can be an html string, a node reference or a NodeList, dojo/NodeList, Array or other enumerable list of nodes * @param position Optionalcan be one of:"last"||"end" (default)"first||"start""before""after""replace" (replaces nodes in this NodeList with new content)"only" (removes other children of the nodes so new content is the only child)or an offset in the childNodes property */ - addContent(content: String, position: number): Function; + addContent(content: String, position?: number): Function; /** * add a node, NodeList or some HTML as a string to every item in the * list. Returns the original list. @@ -2031,7 +2031,7 @@ declare module dojo { * @param content the content to be set on the parent element.This can be an html string, a node reference or a NodeList, dojo/NodeList, Array or other enumerable list of nodes * @param position Optionalcan be one of:"last"||"end" (default)"first||"start""before""after""replace" (replaces nodes in this NodeList with new content)"only" (removes other children of the nodes so new content is the only child)or an offset in the childNodes property */ - addContent(content: HTMLElement, position: number): Function; + addContent(content: HTMLElement, position?: number): Function; /** * add a node, NodeList or some HTML as a string to every item in the * list. Returns the original list. @@ -2043,7 +2043,7 @@ declare module dojo { * @param content the content to be set on the parent element.This can be an html string, a node reference or a NodeList, dojo/NodeList, Array or other enumerable list of nodes * @param position Optionalcan be one of:"last"||"end" (default)"first||"start""before""after""replace" (replaces nodes in this NodeList with new content)"only" (removes other children of the nodes so new content is the only child)or an offset in the childNodes property */ - addContent(content: Object, position: number): Function; + addContent(content: Object, position?: number): Function; /** * add a node, NodeList or some HTML as a string to every item in the * list. Returns the original list. @@ -2055,7 +2055,7 @@ declare module dojo { * @param content the content to be set on the parent element.This can be an html string, a node reference or a NodeList, dojo/NodeList, Array or other enumerable list of nodes * @param position Optionalcan be one of:"last"||"end" (default)"first||"start""before""after""replace" (replaces nodes in this NodeList with new content)"only" (removes other children of the nodes so new content is the only child)or an offset in the childNodes property */ - addContent(content: dojo.NodeList, position: number): Function; + addContent(content: dojo.NodeList, position?: number): Function; /** * places any/all elements in queryOrListOrNode at a * position relative to the first element in this list. @@ -2064,7 +2064,7 @@ declare module dojo { * @param queryOrListOrNode a DOM node or a query string or a query result.Represents the nodes to be adopted relative to thefirst element of this NodeList. * @param position Optionalcan be one of:"last" (default)"first""before""after""only""replace"or an offset in the childNodes property */ - adopt(queryOrListOrNode: String, position: String): any; + adopt(queryOrListOrNode: String, position?: String): any; /** * places any/all elements in queryOrListOrNode at a * position relative to the first element in this list. @@ -2073,7 +2073,7 @@ declare module dojo { * @param queryOrListOrNode a DOM node or a query string or a query result.Represents the nodes to be adopted relative to thefirst element of this NodeList. * @param position Optionalcan be one of:"last" (default)"first""before""after""only""replace"or an offset in the childNodes property */ - adopt(queryOrListOrNode: any[], position: String): any; + adopt(queryOrListOrNode: any[], position?: String): any; /** * places any/all elements in queryOrListOrNode at a * position relative to the first element in this list. @@ -2082,7 +2082,7 @@ declare module dojo { * @param queryOrListOrNode a DOM node or a query string or a query result.Represents the nodes to be adopted relative to thefirst element of this NodeList. * @param position Optionalcan be one of:"last" (default)"first""before""after""only""replace"or an offset in the childNodes property */ - adopt(queryOrListOrNode: HTMLElement, position: String): any; + adopt(queryOrListOrNode: HTMLElement, position?: String): any; /** * Places the content after every node in the NodeList. * The content will be cloned if the length of NodeList @@ -2128,14 +2128,14 @@ declare module dojo { * @param onEnd OptionalA function to be called when the animation ends * @param delay Optionalhow long to delay playing the returned animation */ - anim(properties: Object, duration: number, easing: Function, onEnd: Function, delay: number): any; + anim(properties: Object, duration?: number, easing?: Function, onEnd?: Function, delay?: number): any; /** * Animate all elements of this NodeList across the properties specified. * syntax identical to dojo.animateProperty * * @param args OptionalAdditional dojo/_base/fx.Animation arguments to mix into this set with the addition ofan auto parameter. */ - animateProperty(args: Object): any; + animateProperty(args?: Object): any; /** * appends the content to every node in the NodeList. * The content will be cloned if the length of NodeList @@ -2187,7 +2187,7 @@ declare module dojo { * @param property the attribute to get/set * @param value Optionaloptional. The value to set the property to */ - attr(property: String, value: String): any; + attr(property: String, value?: String): any; /** * Places the content before every node in the NodeList. * The content will be cloned if the length of NodeList @@ -2223,7 +2223,7 @@ declare module dojo { * * @param query Optionala CSS selector. */ - children(query: String): any; + children(query?: String): any; /** * Clones all the nodes in this NodeList and returns them as a new NodeList. * Only the DOM nodes are cloned, not any attached event handlers. @@ -2239,7 +2239,7 @@ declare module dojo { * @param query a CSS selector. * @param root OptionalIf specified, query is relative to "root" rather than document body. */ - closest(query: String, root: String): any; + closest(query: String, root?: String): any; /** * Returns closest parent that matches query, including current node in this * dojo/NodeList if it matches the query. @@ -2249,7 +2249,7 @@ declare module dojo { * @param query a CSS selector. * @param root OptionalIf specified, query is relative to "root" rather than document body. */ - closest(query: String, root: HTMLElement): any; + closest(query: String, root?: HTMLElement): any; /** * Returns a new NodeList comprised of items in this NodeList * as well as items passed in as parameters @@ -2271,7 +2271,7 @@ declare module dojo { * @param objOrFunc if 2 arguments are passed (methodName, objOrFunc), objOrFunc shouldreference a function or be the name of the function in the globalnamespace to attach. If 3 arguments are provided(methodName, objOrFunc, funcName), objOrFunc must be the scope tolocate the bound function in * @param funcName Optionaloptional. A string naming the function in objOrFunc to bind to theevent. May also be a function reference. */ - connect(methodName: String, objOrFunc: Object, funcName: String): void; + connect(methodName: String, objOrFunc: Object, funcName?: String): void; /** * Attach event handlers to every item of the NodeList. Uses dojo.connect() * so event properties are normalized. @@ -2282,7 +2282,7 @@ declare module dojo { * @param objOrFunc if 2 arguments are passed (methodName, objOrFunc), objOrFunc shouldreference a function or be the name of the function in the globalnamespace to attach. If 3 arguments are provided(methodName, objOrFunc, funcName), objOrFunc must be the scope tolocate the bound function in * @param funcName Optionaloptional. A string naming the function in objOrFunc to bind to theevent. May also be a function reference. */ - connect(methodName: String, objOrFunc: Function, funcName: String): void; + connect(methodName: String, objOrFunc: Function, funcName?: String): void; /** * Attach event handlers to every item of the NodeList. Uses dojo.connect() * so event properties are normalized. @@ -2293,7 +2293,7 @@ declare module dojo { * @param objOrFunc if 2 arguments are passed (methodName, objOrFunc), objOrFunc shouldreference a function or be the name of the function in the globalnamespace to attach. If 3 arguments are provided(methodName, objOrFunc, funcName), objOrFunc must be the scope tolocate the bound function in * @param funcName Optionaloptional. A string naming the function in objOrFunc to bind to theevent. May also be a function reference. */ - connect(methodName: String, objOrFunc: String, funcName: String): void; + connect(methodName: String, objOrFunc: String, funcName?: String): void; /** * Deprecated: Use position() for border-box x/y/w/h * or marginBox() for margin-box w/h/l/t. @@ -2317,7 +2317,7 @@ declare module dojo { * @param key OptionalIf an object, act as a setter and iterate over said object setting data items as defined.If a string, and value present, set the data for defined key to valueIf a string, and value absent, act as a getter, returning the data associated with said key * @param value OptionalThe value to set for said key, provided key is a string (and not an object) */ - data(key: Object, value: any): any; + data(key?: Object, value?: any): any; /** * stash or get some arbitrary data on/from these nodes. * Stash or get some arbitrary data on/from these nodes. This private _data function is @@ -2332,7 +2332,7 @@ declare module dojo { * @param key OptionalIf an object, act as a setter and iterate over said object setting data items as defined.If a string, and value present, set the data for defined key to valueIf a string, and value absent, act as a getter, returning the data associated with said key * @param value OptionalThe value to set for said key, provided key is a string (and not an object) */ - data(key: String, value: any): any; + data(key?: String, value?: any): any; /** * Monitor nodes in this NodeList for [bubbled] events on nodes that match selector. * Calls fn(evt) for those events, where (inside of fn()), this == the node @@ -2413,19 +2413,19 @@ declare module dojo { * @param callback the callback * @param thisObject Optionalthe context */ - every(callback: Function, thisObject: Object): any; + every(callback: Function, thisObject?: Object): any; /** * fade in all elements of this NodeList via dojo.fadeIn * * @param args OptionalAdditional dojo/_base/fx.Animation arguments to mix into this set with the addition ofan auto parameter. */ - fadeIn(args: Object): any; + fadeIn(args?: Object): any; /** * fade out all elements of this NodeList via dojo.fadeOut * * @param args OptionalAdditional dojo/_base/fx.Animation arguments to mix into this set with the addition ofan auto parameter. */ - fadeOut(args: Object): any; + fadeOut(args?: Object): any; /** * "masks" the built-in javascript filter() method (supported * in Dojo via dojo.filter) to support passing a simple @@ -2477,7 +2477,7 @@ declare module dojo { * * @param value Optional */ - html(value: String): any; + html(value?: String): any; /** * allows setting the innerHTML of each node in the NodeList, * if there is a value passed in, otherwise, reads the innerHTML value of the first node. @@ -2495,7 +2495,7 @@ declare module dojo { * * @param value Optional */ - html(value: HTMLElement): any; + html(value?: HTMLElement): any; /** * allows setting the innerHTML of each node in the NodeList, * if there is a value passed in, otherwise, reads the innerHTML value of the first node. @@ -2513,7 +2513,7 @@ declare module dojo { * * @param value Optional */ - html(value: NodeList): any; + html(value?: NodeList): any; /** * see dojo/_base/array.indexOf(). The primary difference is that the acted-on * array is implicitly this NodeList @@ -2542,7 +2542,7 @@ declare module dojo { * * @param value Optional */ - innerHTML(value: String): any; + innerHTML(value?: String): any; /** * allows setting the innerHTML of each node in the NodeList, * if there is a value passed in, otherwise, reads the innerHTML value of the first node. @@ -2560,7 +2560,7 @@ declare module dojo { * * @param value Optional */ - innerHTML(value: HTMLElement): any; + innerHTML(value?: HTMLElement): any; /** * allows setting the innerHTML of each node in the NodeList, * if there is a value passed in, otherwise, reads the innerHTML value of the first node. @@ -2578,7 +2578,7 @@ declare module dojo { * * @param value Optional */ - innerHTML(value: NodeList): any; + innerHTML(value?: NodeList): any; /** * The nodes in this NodeList will be placed after the nodes * matched by the query passed to insertAfter. @@ -2607,7 +2607,7 @@ declare module dojo { * @param declaredClass * @param properties Optional */ - instantiate(declaredClass: String, properties: Object): any; + instantiate(declaredClass: String, properties?: Object): any; /** * Create a new instance of a specified class, using the * specified properties and each node in the NodeList as a @@ -2616,7 +2616,7 @@ declare module dojo { * @param declaredClass * @param properties Optional */ - instantiate(declaredClass: Object, properties: Object): any; + instantiate(declaredClass: Object, properties?: Object): any; /** * Returns the last node in this dojo/NodeList as a dojo/NodeList. * .end() can be used on the returned dojo/NodeList to get back to the @@ -2634,7 +2634,7 @@ declare module dojo { * @param value The value to search for. * @param fromIndex OptionalThe location to start searching from. Optional. Defaults to 0. */ - lastIndexOf(value: Object, fromIndex: number): any; + lastIndexOf(value: Object, fromIndex?: number): any; /** * see dojo/_base/array.map(). The primary difference is that the acted-on * array is implicitly this NodeList and the return is a @@ -2643,7 +2643,7 @@ declare module dojo { * @param func * @param obj Optional */ - map(func: Function, obj: Function): any; + map(func: Function, obj?: Function): any; /** * Returns margin-box size of nodes * @@ -2657,7 +2657,7 @@ declare module dojo { * * @param query Optionala CSS selector. */ - next(query: String): any; + next(query?: String): any; /** * Returns all sibling elements that come after the nodes in this dojo/NodeList. * Optionally takes a query to filter the sibling elements. @@ -2666,7 +2666,7 @@ declare module dojo { * * @param query Optionala CSS selector. */ - nextAll(query: String): any; + nextAll(query?: String): any; /** * Returns the odd nodes in this dojo/NodeList as a dojo/NodeList. * .end() can be used on the returned dojo/NodeList to get back to the @@ -2687,7 +2687,7 @@ declare module dojo { * * @param filter OptionalCSS selector like ".foo" or "div > span" */ - orphan(filter: String): any; + orphan(filter?: String): any; /** * Returns immediate parent elements for nodes in this dojo/NodeList. * Optionally takes a query to filter the parent elements. @@ -2696,7 +2696,7 @@ declare module dojo { * * @param query Optionala CSS selector. */ - parent(query: String): any; + parent(query?: String): any; /** * Returns all parent elements for nodes in this dojo/NodeList. * Optionally takes a query to filter the child elements. @@ -2705,7 +2705,7 @@ declare module dojo { * * @param query Optionala CSS selector. */ - parents(query: String): any; + parents(query?: String): any; /** * places elements of this node list relative to the first element matched * by queryOrNode. Returns the original NodeList. See: dojo/dom-construct.place @@ -2774,7 +2774,7 @@ declare module dojo { * * @param query Optionala CSS selector. */ - prev(query: String): any; + prev(query?: String): any; /** * Returns all sibling elements that come before the nodes in this dojo/NodeList. * Optionally takes a query to filter the sibling elements. @@ -2785,7 +2785,7 @@ declare module dojo { * * @param query Optionala CSS selector. */ - prevAll(query: String): any; + prevAll(query?: String): any; /** * Returns a new list whose members match the passed query, * assuming elements of the current NodeList as the root for @@ -2800,7 +2800,7 @@ declare module dojo { * * @param filter OptionalCSS selector like ".foo" or "div > span" */ - remove(filter: String): any; + remove(filter?: String): any; /** * Removes an attribute from each node in the list. * @@ -2812,7 +2812,7 @@ declare module dojo { * * @param className OptionalAn optional String class name to remove, or several space-separatedclass names, or an array of class names. If omitted, all class nameswill be deleted. */ - removeClass(className: String): any; + removeClass(className?: String): any; /** * removes the specified class from every node in the list * @@ -2832,7 +2832,7 @@ declare module dojo { * * @param key OptionalIf omitted, clean all data for this node.If passed, remove the data item found at key */ - removeData(key: String): void; + removeData(key?: String): void; /** * replaces nodes matched by the query passed to replaceAll with the nodes * in this NodeList. @@ -2850,7 +2850,7 @@ declare module dojo { * @param addClassStr A String class name to add, or several space-separated class names,or an array of class names. * @param removeClassStr OptionalA String class name to remove, or several space-separated class names,or an array of class names. */ - replaceClass(addClassStr: String, removeClassStr: String): void; + replaceClass(addClassStr: String, removeClassStr?: String): void; /** * Replaces one or more classes on a node if not present. * Operates more quickly than calling removeClass() and addClass() @@ -2858,7 +2858,7 @@ declare module dojo { * @param addClassStr A String class name to add, or several space-separated class names,or an array of class names. * @param removeClassStr OptionalA String class name to remove, or several space-separated class names,or an array of class names. */ - replaceClass(addClassStr: any[], removeClassStr: String): void; + replaceClass(addClassStr: any[], removeClassStr?: String): void; /** * Replaces one or more classes on a node if not present. * Operates more quickly than calling removeClass() and addClass() @@ -2866,7 +2866,7 @@ declare module dojo { * @param addClassStr A String class name to add, or several space-separated class names,or an array of class names. * @param removeClassStr OptionalA String class name to remove, or several space-separated class names,or an array of class names. */ - replaceClass(addClassStr: String, removeClassStr: any[]): void; + replaceClass(addClassStr: String, removeClassStr?: any[]): void; /** * Replaces one or more classes on a node if not present. * Operates more quickly than calling removeClass() and addClass() @@ -2874,7 +2874,7 @@ declare module dojo { * @param addClassStr A String class name to add, or several space-separated class names,or an array of class names. * @param removeClassStr OptionalA String class name to remove, or several space-separated class names,or an array of class names. */ - replaceClass(addClassStr: any[], removeClassStr: any[]): void; + replaceClass(addClassStr: any[], removeClassStr?: any[]): void; /** * Replaces each node in ths NodeList with the content passed to replaceWith. * The content will be cloned if the length of NodeList @@ -2910,7 +2910,7 @@ declare module dojo { * * @param query Optionala CSS selector. */ - siblings(query: String): any; + siblings(query?: String): any; /** * Returns a new NodeList, maintaining this one in place * This method behaves exactly like the Array.slice method @@ -2921,13 +2921,13 @@ declare module dojo { * @param begin Can be a positive or negative integer, with positiveintegers noting the offset to begin at, and negativeintegers denoting an offset from the end (i.e., to the leftof the end) * @param end OptionalOptional parameter to describe what position relative tothe NodeList's zero index to end the slice at. Like begin,can be positive or negative. */ - slice(begin: number, end: number): any; + slice(begin: number, end?: number): any; /** * slide all elements of the node list to the specified place via dojo/fx.slideTo() * * @param args OptionalAdditional dojo/_base/fx.Animation arguments to mix into this set with the addition ofan auto parameter. */ - slideTo(args: Object): any; + slideTo(args?: Object): any; /** * Takes the same structure of arguments and returns as * dojo/_base/array.some() with the caveat that the passed array is @@ -2938,7 +2938,7 @@ declare module dojo { * @param callback the callback * @param thisObject Optionalthe context */ - some(callback: Function, thisObject: Object): any; + some(callback: Function, thisObject?: Object): any; /** * Returns a new NodeList, manipulating this NodeList based on * the arguments passed, potentially splicing in new elements @@ -2954,14 +2954,14 @@ declare module dojo { * @param howmany OptionalOptional parameter to describe what position relative tothe NodeList's zero index to end the slice at. Like begin,can be positive or negative. * @param item OptionalAny number of optional parameters may be passed in to bespliced into the NodeList */ - splice(index: number, howmany: number, item: Object[]): any; + splice(index: number, howmany?: number, item?: Object[]): any; /** * gets or sets the CSS property for every element in the NodeList * * @param property the CSS property to get/set, in JavaScript notation("lineHieght" instead of "line-height") * @param value Optionaloptional. The value to set the property to */ - style(property: String, value: String): any; + style(property: String, value?: String): any; /** * allows setting the text value of each node in the NodeList, * if there is a value passed in, otherwise, returns the text value for all the @@ -2977,7 +2977,7 @@ declare module dojo { * @param className the CSS class to add * @param condition OptionalIf passed, true means to add the class, false means to remove. */ - toggleClass(className: String, condition: boolean): void; + toggleClass(className: String, condition?: boolean): void; /** * Animate the effect of adding or removing a class to all nodes in this list. * see dojox.fx.toggleClass @@ -3014,13 +3014,13 @@ declare module dojo { * * @param args OptionalAdditional dojo/_base/fx.Animation arguments to mix into this set with the addition ofan auto parameter. */ - wipeIn(args: Object): any; + wipeIn(args?: Object): any; /** * wipe out all elements of this NodeList via dojo/fx.wipeOut() * * @param args OptionalAdditional dojo/_base/fx.Animation arguments to mix into this set with the addition ofan auto parameter. */ - wipeOut(args: Object): any; + wipeOut(args?: Object): any; /** * Wrap each node in the NodeList with html passed to wrap. * html will be cloned if the NodeList has more than one @@ -3112,7 +3112,7 @@ declare module dojo { * * @param params Optional */ - postscript(params: Object): void; + postscript(params?: Object): void; /** * Set a property on a Stateful instance * Sets named properties on a stateful object and notifies any watchers of @@ -3325,7 +3325,7 @@ declare module dojo { * @param mixins Specifies a list of bases (the left-most one is the most deepestbase). * @param props OptionalAn optional object whose properties are copied to the created prototype. */ - createSubclass(mixins: Function[], props: Object): dojo._base.declare.__DeclareCreatedObject; + createSubclass(mixins: Function[], props?: Object): dojo._base.declare.__DeclareCreatedObject; /** * Adds all properties and methods of source to constructor's * prototype, making them available to all instances created with @@ -3351,7 +3351,7 @@ declare module dojo { * @param name OptionalThe optional method name. Should be the same as the caller'sname. Usually "name" is specified in complex dynamic cases, whenthe calling method was dynamically added, undecorated bydeclare(), and it cannot be determined. * @param args The caller supply this argument, which should be the original"arguments". */ - getInherited(name: String, args: Object): any; + getInherited(name?: String, args?: Object): any; /** * Calls a super method. * This method is used inside method of classes produced with @@ -3382,7 +3382,7 @@ declare module dojo { * @param args The caller supply this argument, which should be the original"arguments". * @param newArgs OptionalIf "true", the found function will be returned withoutexecuting it.If Array, it will be used to call a super method. Otherwise"args" will be used. */ - inherited(name: String, args: Object, newArgs: Object): any; + inherited(name?: String, args?: Object, newArgs?: Object): any; /** * Checks the inheritance chain to see if it is inherited from this * class. @@ -3476,7 +3476,7 @@ declare module dojo { * @param callback OptionalThe callback attached to this deferred object. * @param errback OptionalThe error callback attached to this deferred object. */ - addCallbacks(callback: Function, errback: Function): any; + addCallbacks(callback?: Function, errback?: Function): any; /** * Adds error callback for this deferred instance. * @@ -3557,7 +3557,7 @@ declare module dojo { * @param errorCallback Optional * @param progressCallback Optional */ - then(resolvedCallback: Function, errorCallback: Function, progressCallback: Function): any; + then(resolvedCallback?: Function, errorCallback?: Function, progressCallback?: Function): any; /** * Transparently applies callbacks to values and/or promises. * Accepts promises but also transparently handles non-promises. If no @@ -3574,7 +3574,7 @@ declare module dojo { * @param errback OptionalCallback to be invoked when the promise is rejected. * @param progback OptionalCallback to be invoked when the promise emits a progress update. */ - when(valueOrPromise: any, callback: Function, errback: Function, progback: Function): any; + when(valueOrPromise?: any, callback?: Function, errback?: Function, progback?: Function): any; } module Deferred { @@ -3739,7 +3739,7 @@ declare module dojo { * @param formNode * @param prettyPrint Optional */ - formToJson(formNode: HTMLElement, prettyPrint: boolean): any; + formToJson(formNode: HTMLElement, prettyPrint?: boolean): any; /** * Create a serialized JSON string from a form node or string * ID identifying the form to serialize @@ -3747,7 +3747,7 @@ declare module dojo { * @param formNode * @param prettyPrint Optional */ - formToJson(formNode: String, prettyPrint: boolean): any; + formToJson(formNode: String, prettyPrint?: boolean): any; /** * Serialize a form node to a JavaScript object. * Returns the values encoded in an HTML form as @@ -4115,7 +4115,7 @@ declare module dojo { * @param weight * @param obj Optional */ - blendColors(start: dojo._base.Color, end: dojo._base.Color, weight: number, obj: dojo._base.Color): any; + blendColors(start: dojo._base.Color, end: dojo._base.Color, weight: number, obj?: dojo._base.Color): any; /** * Builds a Color from a 3 or 4 element array, mapping each * element in sequence to the rgb(a) values of the color. @@ -4123,7 +4123,7 @@ declare module dojo { * @param a * @param obj Optional */ - fromArray(a: any[], obj: dojo._base.Color): any; + fromArray(a: any[], obj?: dojo._base.Color): any; /** * Converts a hex string with a '#' prefix to a color object. * Supports 12-bit #rgb shorthand. Optionally accepts a @@ -4132,7 +4132,7 @@ declare module dojo { * @param color * @param obj Optional */ - fromHex(color: String, obj: dojo._base.Color): any; + fromHex(color: String, obj?: dojo._base.Color): any; /** * get rgb(a) array from css-style color declarations * this function can handle all 4 CSS3 Color Module formats: rgb, @@ -4141,7 +4141,7 @@ declare module dojo { * @param color * @param obj Optional */ - fromRgb(color: String, obj: dojo._base.Color): any; + fromRgb(color: String, obj?: dojo._base.Color): any; /** * Parses str for a color value. Accepts hex, rgb, and rgba * style color values. @@ -4153,14 +4153,14 @@ declare module dojo { * @param str * @param obj Optional */ - fromString(str: String, obj: dojo._base.Color): any; + fromString(str: String, obj?: dojo._base.Color): any; /** * creates a greyscale color with an optional alpha * * @param g * @param a Optional */ - makeGrey(g: number, a: number): void; + makeGrey(g: number, a?: number): void; /** * makes sure that the object has correct attributes * @@ -4205,7 +4205,7 @@ declare module dojo { * * @param includeAlpha Optional */ - toCss(includeAlpha: boolean): String; + toCss(includeAlpha?: boolean): String; /** * Returns a CSS color string in hexadecimal representation * @@ -5051,7 +5051,7 @@ declare module dojo { * @param thisObject Optionalmay be used to scope the call to callback * @param Ctr */ - map(arr: any[], callback: Function, thisObject: Object, Ctr: any): any[]; + map(arr: any[], callback: Function, thisObject?: Object, Ctr?: any): any[]; /** * applies callback to each element of arr and returns * an Array with the results @@ -5066,7 +5066,7 @@ declare module dojo { * @param thisObject Optionalmay be used to scope the call to callback * @param Ctr */ - map(arr: String, callback: Function, thisObject: Object, Ctr: any): any[]; + map(arr: String, callback: Function, thisObject?: Object, Ctr?: any): any[]; /** * applies callback to each element of arr and returns * an Array with the results @@ -5081,7 +5081,7 @@ declare module dojo { * @param thisObject Optionalmay be used to scope the call to callback * @param Ctr */ - map(arr: any[], callback: String, thisObject: Object, Ctr: any): any[]; + map(arr: any[], callback: String, thisObject?: Object, Ctr?: any): any[]; /** * applies callback to each element of arr and returns * an Array with the results @@ -5096,7 +5096,7 @@ declare module dojo { * @param thisObject Optionalmay be used to scope the call to callback * @param Ctr */ - map(arr: String, callback: String, thisObject: Object, Ctr: any): any[]; + map(arr: String, callback: String, thisObject?: Object, Ctr?: any): any[]; /** * Determines whether or not any item in arr satisfies the * condition implemented by callback. @@ -5206,7 +5206,7 @@ declare module dojo { * @param method A function reference, or name of a function in context.The function identified by method fires after event does.method receives the same arguments as the event.See context argument comments for information on method's scope. * @param dontFix OptionalIf obj is a DOM node, set dontFix to true to prevent delegationof this connection to the DOM event manager. */ - connect(obj: Object, event: String, context: Object, method: String, dontFix: boolean): any; + connect(obj: Object, event: String, context: Object, method: String, dontFix?: boolean): any; /** * dojo.connect is a deprecated event handling and delegation method in * Dojo. It allows one function to "listen in" on the execution of @@ -5246,7 +5246,7 @@ declare module dojo { * @param method A function reference, or name of a function in context.The function identified by method fires after event does.method receives the same arguments as the event.See context argument comments for information on method's scope. * @param dontFix OptionalIf obj is a DOM node, set dontFix to true to prevent delegationof this connection to the DOM event manager. */ - connect(obj: Object, event: String, context: any, method: String, dontFix: boolean): any; + connect(obj: Object, event: String, context: any, method: String, dontFix?: boolean): any; /** * dojo.connect is a deprecated event handling and delegation method in * Dojo. It allows one function to "listen in" on the execution of @@ -5286,7 +5286,7 @@ declare module dojo { * @param method A function reference, or name of a function in context.The function identified by method fires after event does.method receives the same arguments as the event.See context argument comments for information on method's scope. * @param dontFix OptionalIf obj is a DOM node, set dontFix to true to prevent delegationof this connection to the DOM event manager. */ - connect(obj: Object, event: String, context: Object, method: Function, dontFix: boolean): any; + connect(obj: Object, event: String, context: Object, method: Function, dontFix?: boolean): any; /** * dojo.connect is a deprecated event handling and delegation method in * Dojo. It allows one function to "listen in" on the execution of @@ -5326,7 +5326,7 @@ declare module dojo { * @param method A function reference, or name of a function in context.The function identified by method fires after event does.method receives the same arguments as the event.See context argument comments for information on method's scope. * @param dontFix OptionalIf obj is a DOM node, set dontFix to true to prevent delegationof this connection to the DOM event manager. */ - connect(obj: Object, event: String, context: any, method: Function, dontFix: boolean): any; + connect(obj: Object, event: String, context: any, method: Function, dontFix?: boolean): any; /** * Ensure that every time obj.event() is called, a message is published * on the topic. Returns a handle which can be passed to @@ -5357,7 +5357,7 @@ declare module dojo { * @param topic The name of the topic to publish. * @param args OptionalAn array of arguments. The arguments will be appliedto each topic subscriber (as first class parameters, via apply). */ - publish(topic: String, args: any[]): any; + publish(topic: String, args?: any[]): any; /** * Attach a listener to a named topic. The listener function is invoked whenever the * named topic is published (see: dojo.publish). @@ -5367,7 +5367,7 @@ declare module dojo { * @param context OptionalScope in which method will be invoked, or null for default scope. * @param method The name of a function in context, or a function reference. This is the function thatis invoked when topic is published. */ - subscribe(topic: String, context: Object, method: String): any; + subscribe(topic: String, context?: Object, method?: String): any; /** * Attach a listener to a named topic. The listener function is invoked whenever the * named topic is published (see: dojo.publish). @@ -5377,7 +5377,7 @@ declare module dojo { * @param context OptionalScope in which method will be invoked, or null for default scope. * @param method The name of a function in context, or a function reference. This is the function thatis invoked when topic is published. */ - subscribe(topic: String, context: Object, method: Function): any; + subscribe(topic: String, context?: Object, method?: Function): any; /** * Remove a topic listener. * @@ -5469,7 +5469,7 @@ declare module dojo { * @param onEnd OptionalA function to be called when the animation finishesrunning. * @param delay OptionalThe number of milliseconds to delay beginning theanimation by. The default is 0. */ - anim (node: HTMLElement, properties: Object, duration: number, easing: Function, onEnd: Function, delay: number): any ; + anim (node: HTMLElement, properties: Object, duration?: number, easing?: Function, onEnd?: Function, delay?: number): any ; /** * A simpler interface to animateProperty(), also returns * an instance of Animation but begins the animation @@ -5490,7 +5490,7 @@ declare module dojo { * @param onEnd OptionalA function to be called when the animation finishesrunning. * @param delay OptionalThe number of milliseconds to delay beginning theanimation by. The default is 0. */ - anim (node: String, properties: Object, duration: number, easing: Function, onEnd: Function, delay: number): any ; + anim (node: String, properties: Object, duration?: number, easing?: Function, onEnd?: Function, delay?: number): any ; /** * Returns an animation that will transition the properties of * node defined in args depending how they are defined in @@ -5502,7 +5502,7 @@ declare module dojo { * * @param args An object with the following properties:properties (Object, optional): A hash map of style properties to Objects describing the transition,such as the properties of _Line with an additional 'units' propertynode (DOMNode|String): The node referenced in the animationduration (Integer, optional): Duration of the animation in milliseconds.easing (Function, optional): An easing function. */ - animateProperty (args: Object): any ; + animateProperty (args?: Object): any ; /** * Returns an animation that will fade node defined in 'args' from @@ -5584,7 +5584,7 @@ declare module dojo { * @param name Path to an object, in the form "A.B.C". * @param obj OptionalObject to use as root of path. Defaults to'dojo.global'. Null may be passed. */ - exists(name: String, obj: Object): boolean; + exists(name: String, obj?: Object): boolean; /** * Adds all properties and methods of props to constructor's * prototype, making them available to all instances created with @@ -5603,7 +5603,7 @@ declare module dojo { * @param create OptionalOptional. Defaults to false. If true, Objects will becreated at any point along the 'path' that is undefined. * @param context OptionalOptional. Object to use as root of path. Defaults to'dojo.global'. Null may be passed. */ - getObject(name: String, create: boolean, context: Object): any; + getObject(name: String, create?: boolean, context?: Object): any; /** * Returns a function that will only ever execute in the a given scope. * This allows for easy use of object member functions @@ -5715,7 +5715,7 @@ declare module dojo { * @param map If an object, it is used as a dictionary to look up substitutions.If a function, it is called for every substitution with following parameters:a whole match, a name, an offset, and the whole templatestring (see https://developer.mozilla.org/en/Core_JavaScript_1.5_Reference/Global_Objects/String/replacefor more details). * @param pattern OptionalOptional regular expression objects that overrides the default pattern.Must be global and match one item. The default is: /{([^}]+)}/g,which matches patterns like that: "{xxx}", where "xxx" is any sequenceof characters, which doesn't include "}". */ - replace(tmpl: String, map: Object, pattern: RegExp): String; + replace(tmpl: String, map: Object, pattern?: RegExp): String; /** * Performs parameterized substitutions on a string. Throws an * exception if any parameter is unmatched. @@ -5724,7 +5724,7 @@ declare module dojo { * @param map If an object, it is used as a dictionary to look up substitutions.If a function, it is called for every substitution with following parameters:a whole match, a name, an offset, and the whole templatestring (see https://developer.mozilla.org/en/Core_JavaScript_1.5_Reference/Global_Objects/String/replacefor more details). * @param pattern OptionalOptional regular expression objects that overrides the default pattern.Must be global and match one item. The default is: /{([^}]+)}/g,which matches patterns like that: "{xxx}", where "xxx" is any sequenceof characters, which doesn't include "}". */ - replace(tmpl: String, map: Function, pattern: RegExp): String; + replace(tmpl: String, map: Function, pattern?: RegExp): String; /** * Set a property from a dot-separated string, such as "A.B.C" * Useful for longer api chains where you have to test each object in @@ -5736,7 +5736,7 @@ declare module dojo { * @param value value or object to place at location given by name * @param context OptionalOptional. Object to use as root of path. Defaults todojo.global. */ - setObject(name: String, value: any, context: Object): any; + setObject(name: String, value: any, context?: Object): any; /** * Trims whitespace from both sides of the string * This version of trim() was selected for inclusion into the base due @@ -5779,7 +5779,7 @@ declare module dojo { * @param obj Optional * @param functionName Optional */ - addOnUnload(obj: Object, functionName: String): void; + addOnUnload(obj?: Object, functionName?: String): void; /** * registers a function to be triggered when the page unloads. * The first time that addOnUnload is called Dojo will @@ -5802,7 +5802,7 @@ declare module dojo { * @param obj Optional * @param functionName Optional */ - addOnUnload(obj: Function, functionName: String): void; + addOnUnload(obj?: Function, functionName?: String): void; /** * registers a function to be triggered when the page unloads. * The first time that addOnUnload is called Dojo will @@ -5825,7 +5825,7 @@ declare module dojo { * @param obj Optional * @param functionName Optional */ - addOnUnload(obj: Object, functionName: Function): void; + addOnUnload(obj?: Object, functionName?: Function): void; /** * registers a function to be triggered when the page unloads. * The first time that addOnUnload is called Dojo will @@ -5848,7 +5848,7 @@ declare module dojo { * @param obj Optional * @param functionName Optional */ - addOnUnload(obj: Function, functionName: Function): void; + addOnUnload(obj?: Function, functionName?: Function): void; /** * registers a function to be triggered when window.onunload * fires. @@ -5866,7 +5866,7 @@ declare module dojo { * @param obj Optional * @param functionName Optional */ - addOnWindowUnload(obj: Object, functionName: String): void; + addOnWindowUnload(obj?: Object, functionName?: String): void; /** * registers a function to be triggered when window.onunload * fires. @@ -5884,7 +5884,7 @@ declare module dojo { * @param obj Optional * @param functionName Optional */ - addOnWindowUnload(obj: Function, functionName: String): void; + addOnWindowUnload(obj?: Function, functionName?: String): void; /** * registers a function to be triggered when window.onunload * fires. @@ -5902,7 +5902,7 @@ declare module dojo { * @param obj Optional * @param functionName Optional */ - addOnWindowUnload(obj: Object, functionName: Function): void; + addOnWindowUnload(obj?: Object, functionName?: Function): void; /** * registers a function to be triggered when window.onunload * fires. @@ -5920,7 +5920,7 @@ declare module dojo { * @param obj Optional * @param functionName Optional */ - addOnWindowUnload(obj: Function, functionName: Function): void; + addOnWindowUnload(obj?: Function, functionName?: Function): void; } /** * Permalink: http://dojotoolkit.org/api/1.9/dojo/_base/window.html @@ -5946,7 +5946,7 @@ declare module dojo { * * @param doc Optional */ - body(doc: HTMLDocument): any; + body(doc?: HTMLDocument): any; /** * changes the behavior of many core Dojo functions that deal with * namespace and DOM lookup, changing them to work in a new global @@ -5970,7 +5970,7 @@ declare module dojo { * @param thisObject Optional * @param cbArguments Optional */ - withDoc(documentObject: HTMLDocument, callback: Function, thisObject: Object, cbArguments: any[]): any; + withDoc(documentObject: HTMLDocument, callback: Function, thisObject?: Object, cbArguments?: any[]): any; /** * Invoke callback with globalObject as dojo.global and * globalObject.document as dojo.doc. @@ -5985,7 +5985,7 @@ declare module dojo { * @param thisObject Optional * @param cbArguments Optional */ - withGlobal(globalObject: Object, callback: Function, thisObject: Object, cbArguments: any[]): any; + withGlobal(globalObject: Object, callback: Function, thisObject?: Object, cbArguments?: any[]): any; } module window { /** @@ -6335,7 +6335,7 @@ declare module dojo { * * @param returnWrappers Optional */ - AdapterRegistry(returnWrappers: boolean): void; + AdapterRegistry(returnWrappers?: boolean): void; /** * Adds the specified classes to the end of the class list on the * passed node. Will not re-apply duplicate classes. @@ -6379,7 +6379,7 @@ declare module dojo { * @param context The context in which to run execute callback, or a callback if not using context * @param callback OptionalThe function to execute. */ - addOnLoad(priority: number, context: any, callback: Function): void; + addOnLoad(priority: number, context: any, callback?: Function): void; /** * registers a function to be triggered when the page unloads. * The first time that addOnUnload is called Dojo will @@ -6402,7 +6402,7 @@ declare module dojo { * @param obj Optional * @param functionName Optional */ - addOnUnload(obj: Object, functionName: String): void; + addOnUnload(obj?: Object, functionName?: String): void; /** * registers a function to be triggered when the page unloads. * The first time that addOnUnload is called Dojo will @@ -6425,7 +6425,7 @@ declare module dojo { * @param obj Optional * @param functionName Optional */ - addOnUnload(obj: Function, functionName: String): void; + addOnUnload(obj?: Function, functionName?: String): void; /** * registers a function to be triggered when the page unloads. * The first time that addOnUnload is called Dojo will @@ -6448,7 +6448,7 @@ declare module dojo { * @param obj Optional * @param functionName Optional */ - addOnUnload(obj: Object, functionName: Function): void; + addOnUnload(obj?: Object, functionName?: Function): void; /** * registers a function to be triggered when the page unloads. * The first time that addOnUnload is called Dojo will @@ -6471,7 +6471,7 @@ declare module dojo { * @param obj Optional * @param functionName Optional */ - addOnUnload(obj: Function, functionName: Function): void; + addOnUnload(obj?: Function, functionName?: Function): void; /** * registers a function to be triggered when window.onunload fires. * Be careful trying to modify the DOM or access JavaScript properties @@ -6482,7 +6482,7 @@ declare module dojo { * @param obj Optional * @param functionName Optional */ - addOnWindowUnload(obj: Object, functionName: String): void; + addOnWindowUnload(obj?: Object, functionName?: String): void; /** * registers a function to be triggered when window.onunload fires. * Be careful trying to modify the DOM or access JavaScript properties @@ -6514,7 +6514,7 @@ declare module dojo { * @param onEnd OptionalA function to be called when the animation finishesrunning. * @param delay OptionalThe number of milliseconds to delay beginning theanimation by. The default is 0. */ - anim(node: HTMLElement, properties: Object, duration: number, easing: Function, onEnd: Function, delay: number): any; + anim(node: HTMLElement, properties: Object, duration?: number, easing?: Function, onEnd?: Function, delay?: number): any; /** * A simpler interface to animateProperty(), also returns * an instance of Animation but begins the animation @@ -6535,7 +6535,7 @@ declare module dojo { * @param onEnd OptionalA function to be called when the animation finishesrunning. * @param delay OptionalThe number of milliseconds to delay beginning theanimation by. The default is 0. */ - anim(node: String, properties: Object, duration: number, easing: Function, onEnd: Function, delay: number): any; + anim(node: String, properties: Object, duration?: number, easing?: Function, onEnd?: Function, delay?: number): any; /** * Returns an animation that will transition the properties of * node defined in args depending how they are defined in @@ -6584,7 +6584,7 @@ declare module dojo { * @param name the name of the attribute to get or set. * @param value OptionalThe value to set for the attribute */ - attr(node: HTMLElement, name: String, value: String): any; + attr(node: HTMLElement, name: String, value?: String): any; /** * Gets or sets an attribute on an HTML element. * Handles normalized getting and setting of attributes on DOM @@ -6608,7 +6608,7 @@ declare module dojo { * @param name the name of the attribute to get or set. * @param value OptionalThe value to set for the attribute */ - attr(node: String, name: String, value: String): any; + attr(node: String, name: String, value?: String): any; /** * Gets or sets an attribute on an HTML element. * Handles normalized getting and setting of attributes on DOM @@ -6632,7 +6632,7 @@ declare module dojo { * @param name the name of the attribute to get or set. * @param value OptionalThe value to set for the attribute */ - attr(node: HTMLElement, name: Object, value: String): any; + attr(node: HTMLElement, name: Object, value?: String): any; /** * Gets or sets an attribute on an HTML element. * Handles normalized getting and setting of attributes on DOM @@ -6656,7 +6656,7 @@ declare module dojo { * @param name the name of the attribute to get or set. * @param value OptionalThe value to set for the attribute */ - attr(node: String, name: Object, value: String): any; + attr(node: String, name: Object, value?: String): any; /** * Blend colors end and start with weight from 0 to 1, 0.5 being a 50/50 blend, * can reuse a previously allocated Color object for the result @@ -6666,13 +6666,13 @@ declare module dojo { * @param weight * @param obj Optional */ - blendColors(start: dojo._base.Color, end: dojo._base.Color, weight: number, obj: dojo._base.Color): any; + blendColors(start: dojo._base.Color, end: dojo._base.Color, weight: number, obj?: dojo._base.Color): any; /** * Return the body element of the specified document or of dojo/_base/window::doc. * * @param doc Optional */ - body(doc: HTMLDocument): any; + body(doc?: HTMLDocument): any; /** * Returns DOM node with matching id attribute or falsy value (ex: null or undefined) * if not found. If id is a DomNode, this function is a no-op. @@ -6680,7 +6680,7 @@ declare module dojo { * @param id A string to match an HTML id attribute or a reference to a DOM Node * @param doc OptionalDocument to work in. Defaults to the current value ofdojo/_base/window.doc. Can be used to retrievenode references from other documents. */ - byId(id: String, doc: HTMLDocument): any; + byId(id: String, doc?: HTMLDocument): any; /** * Returns DOM node with matching id attribute or falsy value (ex: null or undefined) * if not found. If id is a DomNode, this function is a no-op. @@ -6688,7 +6688,7 @@ declare module dojo { * @param id A string to match an HTML id attribute or a reference to a DOM Node * @param doc OptionalDocument to work in. Defaults to the current value ofdojo/_base/window.doc. Can be used to retrievenode references from other documents. */ - byId(id: HTMLElement, doc: HTMLDocument): any; + byId(id: HTMLElement, doc?: HTMLDocument): any; /** * A getter and setter for storing the string content associated with the * module and url arguments. @@ -6708,7 +6708,7 @@ declare module dojo { * @param url The rest of the path to append to the path derived from the module argument. Ifmodule is an object, then this second argument should be the "value" argument instead. * @param value OptionalIf a String, the value to use in the cache for the module/url combination.If an Object, it can have two properties: value and sanitize. The value propertyshould be the value to use in the cache, and sanitize can be set to true or false,to indicate if XML declarations should be removed from the value and if the HTMLinside a body tag in the value should be extracted as the real value. The value argumentor the value property on the value argument are usually only used by the build systemas it inlines cache content. */ - cache(module: String, url: String, value: String): any; + cache(module: String, url: String, value?: String): any; /** * A getter and setter for storing the string content associated with the * module and url arguments. @@ -6728,7 +6728,7 @@ declare module dojo { * @param url The rest of the path to append to the path derived from the module argument. Ifmodule is an object, then this second argument should be the "value" argument instead. * @param value OptionalIf a String, the value to use in the cache for the module/url combination.If an Object, it can have two properties: value and sanitize. The value propertyshould be the value to use in the cache, and sanitize can be set to true or false,to indicate if XML declarations should be removed from the value and if the HTMLinside a body tag in the value should be extracted as the real value. The value argumentor the value property on the value argument are usually only used by the build systemas it inlines cache content. */ - cache(module: Object, url: String, value: String): any; + cache(module: Object, url: String, value?: String): any; /** * A getter and setter for storing the string content associated with the * module and url arguments. @@ -6748,7 +6748,7 @@ declare module dojo { * @param url The rest of the path to append to the path derived from the module argument. Ifmodule is an object, then this second argument should be the "value" argument instead. * @param value OptionalIf a String, the value to use in the cache for the module/url combination.If an Object, it can have two properties: value and sanitize. The value propertyshould be the value to use in the cache, and sanitize can be set to true or false,to indicate if XML declarations should be removed from the value and if the HTMLinside a body tag in the value should be extracted as the real value. The value argumentor the value property on the value argument are usually only used by the build systemas it inlines cache content. */ - cache(module: String, url: String, value: Object): any; + cache(module: String, url: String, value?: Object): any; /** * A getter and setter for storing the string content associated with the * module and url arguments. @@ -6768,7 +6768,7 @@ declare module dojo { * @param url The rest of the path to append to the path derived from the module argument. Ifmodule is an object, then this second argument should be the "value" argument instead. * @param value OptionalIf a String, the value to use in the cache for the module/url combination.If an Object, it can have two properties: value and sanitize. The value propertyshould be the value to use in the cache, and sanitize can be set to true or false,to indicate if XML declarations should be removed from the value and if the HTMLinside a body tag in the value should be extracted as the real value. The value argumentor the value property on the value argument are usually only used by the build systemas it inlines cache content. */ - cache(module: Object, url: String, value: Object): any; + cache(module: Object, url: String, value?: Object): any; /** * */ @@ -6804,7 +6804,7 @@ declare module dojo { * @param a * @param obj Optional */ - colorFromArray(a: any[], obj: dojo._base.Color): any; + colorFromArray(a: any[], obj?: dojo._base.Color): any; /** * Converts a hex string with a '#' prefix to a color object. * Supports 12-bit #rgb shorthand. Optionally accepts a @@ -6813,7 +6813,7 @@ declare module dojo { * @param color * @param obj Optional */ - colorFromHex(color: String, obj: dojo._base.Color): any; + colorFromHex(color: String, obj?: dojo._base.Color): any; /** * get rgb(a) array from css-style color declarations * this function can handle all 4 CSS3 Color Module formats: rgb, @@ -6822,7 +6822,7 @@ declare module dojo { * @param color * @param obj Optional */ - colorFromRgb(color: String, obj: dojo._base.Color): any; + colorFromRgb(color: String, obj?: dojo._base.Color): any; /** * Parses str for a color value. Accepts hex, rgb, and rgba * style color values. @@ -6834,7 +6834,7 @@ declare module dojo { * @param str * @param obj Optional */ - colorFromString(str: String, obj: dojo._base.Color): any; + colorFromString(str: String, obj?: dojo._base.Color): any; /** * dojo.connect is a deprecated event handling and delegation method in * Dojo. It allows one function to "listen in" on the execution of @@ -6874,7 +6874,7 @@ declare module dojo { * @param method A function reference, or name of a function in context.The function identified by method fires after event does.method receives the same arguments as the event.See context argument comments for information on method's scope. * @param dontFix OptionalIf obj is a DOM node, set dontFix to true to prevent delegationof this connection to the DOM event manager. */ - connect(obj: Object, event: String, context: Object, method: String, dontFix: boolean): any; + connect(obj: Object, event: String, context: Object, method: String, dontFix?: boolean): any; /** * dojo.connect is a deprecated event handling and delegation method in * Dojo. It allows one function to "listen in" on the execution of @@ -6914,7 +6914,7 @@ declare module dojo { * @param method A function reference, or name of a function in context.The function identified by method fires after event does.method receives the same arguments as the event.See context argument comments for information on method's scope. * @param dontFix OptionalIf obj is a DOM node, set dontFix to true to prevent delegationof this connection to the DOM event manager. */ - connect(obj: Object, event: String, context: any, method: String, dontFix: boolean): any; + connect(obj: Object, event: String, context: any, method: String, dontFix?: boolean): any; /** * dojo.connect is a deprecated event handling and delegation method in * Dojo. It allows one function to "listen in" on the execution of @@ -6954,7 +6954,7 @@ declare module dojo { * @param method A function reference, or name of a function in context.The function identified by method fires after event does.method receives the same arguments as the event.See context argument comments for information on method's scope. * @param dontFix OptionalIf obj is a DOM node, set dontFix to true to prevent delegationof this connection to the DOM event manager. */ - connect(obj: Object, event: String, context: Object, method: Function, dontFix: boolean): any; + connect(obj: Object, event: String, context: Object, method: Function, dontFix?: boolean): any; /** * dojo.connect is a deprecated event handling and delegation method in * Dojo. It allows one function to "listen in" on the execution of @@ -6994,7 +6994,7 @@ declare module dojo { * @param method A function reference, or name of a function in context.The function identified by method fires after event does.method receives the same arguments as the event.See context argument comments for information on method's scope. * @param dontFix OptionalIf obj is a DOM node, set dontFix to true to prevent delegationof this connection to the DOM event manager. */ - connect(obj: Object, event: String, context: any, method: Function, dontFix: boolean): any; + connect(obj: Object, event: String, context: any, method: Function, dontFix?: boolean): any; /** * Getter/setter for the content-box of node. * Returns an object in the expected format of box (regardless if box is passed). @@ -7011,7 +7011,7 @@ declare module dojo { * @param node id or reference to DOM Node to get/set box for * @param box OptionalIf passed, denotes that dojo.contentBox() shouldupdate/set the content box for node. Box is an object in theabove format, but only w (width) and h (height) are supported.All properties are optional if passed. */ - contentBox(node: HTMLElement, box: Object): any; + contentBox(node: HTMLElement, box?: Object): any; /** * Getter/setter for the content-box of node. * Returns an object in the expected format of box (regardless if box is passed). @@ -7028,7 +7028,7 @@ declare module dojo { * @param node id or reference to DOM Node to get/set box for * @param box OptionalIf passed, denotes that dojo.contentBox() shouldupdate/set the content box for node. Box is an object in theabove format, but only w (width) and h (height) are supported.All properties are optional if passed. */ - contentBox(node: String, box: Object): any; + contentBox(node: String, box?: Object): any; /** * Get or set a cookie. * If one argument is passed, returns the value of the cookie @@ -7038,7 +7038,7 @@ declare module dojo { * @param value OptionalValue for the cookie * @param props OptionalProperties for the cookie */ - cookie(name: String, value: String, props: Object): any; + cookie(name: String, value?: String, props?: Object): any; /** * Deprecated: Use position() for border-box x/y/w/h * or marginBox() for margin-box w/h/l/t. @@ -7057,7 +7057,7 @@ declare module dojo { * @param node * @param includeScroll Optional */ - coords(node: HTMLElement, includeScroll: boolean): any; + coords(node: HTMLElement, includeScroll?: boolean): any; /** * Deprecated: Use position() for border-box x/y/w/h * or marginBox() for margin-box w/h/l/t. @@ -7076,7 +7076,7 @@ declare module dojo { * @param node * @param includeScroll Optional */ - coords(node: String, includeScroll: boolean): any; + coords(node: String, includeScroll?: boolean): any; /** * Create an element, allowing for optional attribute decoration * and placement. @@ -7095,7 +7095,7 @@ declare module dojo { * @param refNode OptionalOptional reference node. Used by dojo.place to place the newly creatednode somewhere in the dom relative to refNode. Can be a DomNode referenceor String ID of a node. * @param pos OptionalOptional positional reference. Defaults to "last" by way of dojo.place,though can be set to "first","after","before","last", "replace" or "only"to further control the placement of the new node relative to the refNode.'refNode' is required if a 'pos' is specified. */ - create(tag: HTMLElement, attrs: Object, refNode: HTMLElement, pos: String): any; + create(tag: HTMLElement, attrs: Object, refNode?: HTMLElement, pos?: String): any; /** * Create an element, allowing for optional attribute decoration * and placement. @@ -7114,7 +7114,7 @@ declare module dojo { * @param refNode OptionalOptional reference node. Used by dojo.place to place the newly creatednode somewhere in the dom relative to refNode. Can be a DomNode referenceor String ID of a node. * @param pos OptionalOptional positional reference. Defaults to "last" by way of dojo.place,though can be set to "first","after","before","last", "replace" or "only"to further control the placement of the new node relative to the refNode.'refNode' is required if a 'pos' is specified. */ - create(tag: String, attrs: Object, refNode: HTMLElement, pos: String): any; + create(tag: String, attrs: Object, refNode?: HTMLElement, pos?: String): any; /** * Create an element, allowing for optional attribute decoration * and placement. @@ -7133,7 +7133,7 @@ declare module dojo { * @param refNode OptionalOptional reference node. Used by dojo.place to place the newly creatednode somewhere in the dom relative to refNode. Can be a DomNode referenceor String ID of a node. * @param pos OptionalOptional positional reference. Defaults to "last" by way of dojo.place,though can be set to "first","after","before","last", "replace" or "only"to further control the placement of the new node relative to the refNode.'refNode' is required if a 'pos' is specified. */ - create(tag: HTMLElement, attrs: Object, refNode: String, pos: String): any; + create(tag: HTMLElement, attrs: Object, refNode?: String, pos?: String): any; /** * Create an element, allowing for optional attribute decoration * and placement. @@ -7152,7 +7152,7 @@ declare module dojo { * @param refNode OptionalOptional reference node. Used by dojo.place to place the newly creatednode somewhere in the dom relative to refNode. Can be a DomNode referenceor String ID of a node. * @param pos OptionalOptional positional reference. Defaults to "last" by way of dojo.place,though can be set to "first","after","before","last", "replace" or "only"to further control the placement of the new node relative to the refNode.'refNode' is required if a 'pos' is specified. */ - create(tag: String, attrs: Object, refNode: String, pos: String): any; + create(tag: String, attrs: Object, refNode?: String, pos?: String): any; /** * Create a feature-rich constructor from compact notation. * Create a constructor using a compact notation for inheritance and @@ -7364,7 +7364,7 @@ declare module dojo { * @param consumeErrors Optional * @param canceller OptionalA deferred canceller function, see dojo.Deferred */ - DeferredList(list: any[], fireOnOneCallback: boolean, fireOnOneErrback: boolean, consumeErrors: boolean, canceller: Function): void; + DeferredList(list: any[], fireOnOneCallback?: boolean, fireOnOneErrback?: boolean, consumeErrors?: boolean, canceller?: Function): void; /** * Log a debug message to indicate that a behavior has been * deprecated. @@ -7373,7 +7373,7 @@ declare module dojo { * @param extra OptionalText to append to the message. Often provides advice on anew function or facility to achieve the same goal duringthe deprecation period. * @param removal OptionalText to indicate when in the future the behavior will beremoved. Usually a version number. */ - deprecated(behaviour: String, extra: String, removal: String): void; + deprecated(behaviour: String, extra?: String, removal?: String): void; /** * * @param node @@ -7391,7 +7391,7 @@ declare module dojo { * * @param doc OptionalOptional document to query. If unspecified, use win.doc. */ - docScroll(doc: HTMLDocument): Object; + docScroll(doc?: HTMLDocument): Object; /** * * @param node @@ -7431,7 +7431,7 @@ declare module dojo { * @param callback a function is invoked with three arguments: item, index,and array and returns true if the condition is met. * @param thisObject Optionalmay be used to scope the call to callback */ - every(arr: any[], callback: Function, thisObject: Object): boolean; + every(arr: any[], callback: Function, thisObject?: Object): boolean; /** * Determines whether or not every item in arr satisfies the * condition implemented by callback. @@ -7445,7 +7445,7 @@ declare module dojo { * @param callback a function is invoked with three arguments: item, index,and array and returns true if the condition is met. * @param thisObject Optionalmay be used to scope the call to callback */ - every(arr: String, callback: Function, thisObject: Object): boolean; + every(arr: String, callback: Function, thisObject?: Object): boolean; /** * Determines whether or not every item in arr satisfies the * condition implemented by callback. @@ -7459,7 +7459,7 @@ declare module dojo { * @param callback a function is invoked with three arguments: item, index,and array and returns true if the condition is met. * @param thisObject Optionalmay be used to scope the call to callback */ - every(arr: any[], callback: String, thisObject: Object): boolean; + every(arr: any[], callback: String, thisObject?: Object): boolean; /** * Determines whether or not every item in arr satisfies the * condition implemented by callback. @@ -7473,7 +7473,7 @@ declare module dojo { * @param callback a function is invoked with three arguments: item, index,and array and returns true if the condition is met. * @param thisObject Optionalmay be used to scope the call to callback */ - every(arr: String, callback: String, thisObject: Object): boolean; + every(arr: String, callback: String, thisObject?: Object): boolean; /** * * @param exitcode @@ -7490,7 +7490,7 @@ declare module dojo { * @param moduleName The name of a module, or the name of a module file or a specificfunction * @param extra Optionalsome additional message for the user */ - experimental(moduleName: String, extra: String): void; + experimental(moduleName: String, extra?: String): void; /** * Returns an animation that will fade node defined in 'args' from * its current opacity to fully opaque. @@ -7538,7 +7538,7 @@ declare module dojo { * @param callback a function that is invoked with three arguments (item,index, array). The return of this function is expected tobe a boolean which determines whether the passed-in itemwill be included in the returned array. * @param thisObject Optionalmay be used to scope the call to callback */ - filter(arr: any[], callback: Function, thisObject: Object): any[]; + filter(arr: any[], callback: Function, thisObject?: Object): any[]; /** * Returns a new Array with those items from arr that match the * condition implemented by callback. @@ -7552,7 +7552,7 @@ declare module dojo { * @param callback a function that is invoked with three arguments (item,index, array). The return of this function is expected tobe a boolean which determines whether the passed-in itemwill be included in the returned array. * @param thisObject Optionalmay be used to scope the call to callback */ - filter(arr: any[], callback: String, thisObject: Object): any[]; + filter(arr: any[], callback: String, thisObject?: Object): any[]; /** * normalizes properties on the event object including event * bubbling methods, keystroke normalization, and x/y positions @@ -7570,7 +7570,7 @@ declare module dojo { * @param scrollLeft * @param doc OptionalOptional document to query. If unspecified, use win.doc. */ - fixIeBiDiScrollLeft(scrollLeft: number, doc: HTMLDocument): number; + fixIeBiDiScrollLeft(scrollLeft: number, doc?: HTMLDocument): number; /** * for every item in arr, callback is invoked. Return values are ignored. * If you want to break out of the loop, consider using array.every() or array.some(). @@ -7585,7 +7585,7 @@ declare module dojo { * @param callback * @param thisObject Optional */ - forEach(arr: any[], callback: Function, thisObject: Object): void; + forEach(arr: any[], callback: Function, thisObject?: Object): void; /** * for every item in arr, callback is invoked. Return values are ignored. * If you want to break out of the loop, consider using array.every() or array.some(). @@ -7600,7 +7600,7 @@ declare module dojo { * @param callback * @param thisObject Optional */ - forEach(arr: String, callback: Function, thisObject: Object): void; + forEach(arr: String, callback: Function, thisObject?: Object): void; /** * for every item in arr, callback is invoked. Return values are ignored. * If you want to break out of the loop, consider using array.every() or array.some(). @@ -7615,7 +7615,7 @@ declare module dojo { * @param callback * @param thisObject Optional */ - forEach(arr: any[], callback: String, thisObject: Object): void; + forEach(arr: any[], callback: String, thisObject?: Object): void; /** * for every item in arr, callback is invoked. Return values are ignored. * If you want to break out of the loop, consider using array.every() or array.some(). @@ -7630,7 +7630,7 @@ declare module dojo { * @param callback * @param thisObject Optional */ - forEach(arr: String, callback: String, thisObject: Object): void; + forEach(arr: String, callback: String, thisObject?: Object): void; /** * Create a serialized JSON string from a form node or string * ID identifying the form to serialize @@ -7638,7 +7638,7 @@ declare module dojo { * @param formNode * @param prettyPrint Optional */ - formToJson(formNode: HTMLElement, prettyPrint: boolean): String; + formToJson(formNode: HTMLElement, prettyPrint?: boolean): String; /** * Create a serialized JSON string from a form node or string * ID identifying the form to serialize @@ -7646,7 +7646,7 @@ declare module dojo { * @param formNode * @param prettyPrint Optional */ - formToJson(formNode: String, prettyPrint: boolean): String; + formToJson(formNode: String, prettyPrint?: boolean): String; /** * Serialize a form node to a JavaScript object. * Returns the values encoded in an HTML form as @@ -7721,7 +7721,7 @@ declare module dojo { * @param node * @param computedStyle OptionalThis parameter accepts computed styles object.If this parameter is omitted, the functions will calldojo/dom-style.getComputedStyle to get one. It is a better way, callingdojo/dom-style.getComputedStyle once, and then pass the reference to thiscomputedStyle parameter. Wherever possible, reuse the returnedobject of dojo/dom-style.getComputedStyle(). */ - getBorderExtents(node: HTMLElement, computedStyle: Object): Object; + getBorderExtents(node: HTMLElement, computedStyle?: Object): Object; /** * Returns a "computed style" object. * Gets a "computed style" object which can be used to gather @@ -7748,7 +7748,7 @@ declare module dojo { * @param node * @param computedStyle OptionalThis parameter accepts computed styles object.If this parameter is omitted, the functions will calldojo/dom-style.getComputedStyle to get one. It is a better way, callingdojo/dom-style.getComputedStyle once, and then pass the reference to thiscomputedStyle parameter. Wherever possible, reuse the returnedobject of dojo/dom-style.getComputedStyle(). */ - getContentBox(node: HTMLElement, computedStyle: Object): Object; + getContentBox(node: HTMLElement, computedStyle?: Object): Object; /** * returns the offset in x and y from the document body to the * visual edge of the page for IE @@ -7768,7 +7768,7 @@ declare module dojo { * * @param doc OptionalOptional document to query. If unspecified, use win.doc. */ - getIeDocumentElementOffset(doc: HTMLDocument): Object; + getIeDocumentElementOffset(doc?: HTMLDocument): Object; /** * * @param moduleName @@ -7783,7 +7783,7 @@ declare module dojo { * @param node * @param computedStyle OptionalThis parameter accepts computed styles object.If this parameter is omitted, the functions will calldojo/dom-style.getComputedStyle to get one. It is a better way, callingdojo/dom-style.getComputedStyle once, and then pass the reference to thiscomputedStyle parameter. Wherever possible, reuse the returnedobject of dojo/dom-style.getComputedStyle(). */ - getMarginBox(node: HTMLElement, computedStyle: Object): Object; + getMarginBox(node: HTMLElement, computedStyle?: Object): Object; /** * returns object with properties useful for box fitting with * regards to box margins (i.e., the outer-box). @@ -7798,7 +7798,7 @@ declare module dojo { * @param node * @param computedStyle OptionalThis parameter accepts computed styles object.If this parameter is omitted, the functions will calldojo/dom-style.getComputedStyle to get one. It is a better way, callingdojo/dom-style.getComputedStyle once, and then pass the reference to thiscomputedStyle parameter. Wherever possible, reuse the returnedobject of dojo/dom-style.getComputedStyle(). */ - getMarginExtents(node: HTMLElement, computedStyle: Object): Object; + getMarginExtents(node: HTMLElement, computedStyle?: Object): Object; /** * returns an object that encodes the width and height of * the node's margin box @@ -7806,7 +7806,7 @@ declare module dojo { * @param node * @param computedStyle OptionalThis parameter accepts computed styles object.If this parameter is omitted, the functions will calldojo/dom-style.getComputedStyle to get one. It is a better way, callingdojo/dom-style.getComputedStyle once, and then pass the reference to thiscomputedStyle parameter. Wherever possible, reuse the returnedobject of dojo/dom-style.getComputedStyle(). */ - getMarginSize(node: HTMLElement, computedStyle: Object): Object; + getMarginSize(node: HTMLElement, computedStyle?: Object): Object; /** * returns an object that encodes the width and height of * the node's margin box @@ -7814,7 +7814,7 @@ declare module dojo { * @param node * @param computedStyle OptionalThis parameter accepts computed styles object.If this parameter is omitted, the functions will calldojo/dom-style.getComputedStyle to get one. It is a better way, callingdojo/dom-style.getComputedStyle once, and then pass the reference to thiscomputedStyle parameter. Wherever possible, reuse the returnedobject of dojo/dom-style.getComputedStyle(). */ - getMarginSize(node: String, computedStyle: Object): Object; + getMarginSize(node: String, computedStyle?: Object): Object; /** * Returns an effective value of a property or an attribute. * @@ -7842,7 +7842,7 @@ declare module dojo { * @param node * @param computedStyle OptionalThis parameter accepts computed styles object.If this parameter is omitted, the functions will calldojo/dom-style.getComputedStyle to get one. It is a better way, callingdojo/dom-style.getComputedStyle once, and then pass the reference to thiscomputedStyle parameter. Wherever possible, reuse the returnedobject of dojo/dom-style.getComputedStyle(). */ - getPadBorderExtents(node: HTMLElement, computedStyle: Object): Object; + getPadBorderExtents(node: HTMLElement, computedStyle?: Object): Object; /** * Returns object with special values specifically useful for node * fitting. @@ -7860,7 +7860,7 @@ declare module dojo { * @param node * @param computedStyle OptionalThis parameter accepts computed styles object.If this parameter is omitted, the functions will calldojo/dom-style.getComputedStyle to get one. It is a better way, callingdojo/dom-style.getComputedStyle once, and then pass the reference to thiscomputedStyle parameter. Wherever possible, reuse the returnedobject of dojo/dom-style.getComputedStyle(). */ - getPadExtents(node: HTMLElement, computedStyle: Object): Object; + getPadExtents(node: HTMLElement, computedStyle?: Object): Object; /** * Gets a property on an HTML element. * Handles normalized getting of properties on DOM nodes. @@ -7890,7 +7890,7 @@ declare module dojo { * @param node id or reference to node to get style for * @param name Optionalthe style property to get */ - getStyle(node: HTMLElement, name: String): any; + getStyle(node: HTMLElement, name?: String): any; /** * Accesses styles on a node. * Getting the style value uses the computed style for the node, so the value @@ -7904,7 +7904,7 @@ declare module dojo { * @param node id or reference to node to get style for * @param name Optionalthe style property to get */ - getStyle(node: String, name: String): any; + getStyle(node: String, name?: String): any; /** * Returns true if the requested attribute is specified on the * given element, and false otherwise. @@ -7947,7 +7947,7 @@ declare module dojo { * @param hash Optionalthe hash is set - #string. * @param replace OptionalIf true, updates the hash value in the current historystate instead of creating a new history state. */ - hash(hash: String, replace: boolean): any; + hash(hash?: String, replace?: boolean): any; /** * locates the first index of the provided value in the * passed array. If the value is not found, -1 is returned. @@ -7964,13 +7964,13 @@ declare module dojo { * @param fromIndex Optional * @param findLast OptionalMakes indexOf() work like lastIndexOf(). Used internally; not meant for external usage. */ - indexOf(arr: any[], value: Object, fromIndex: number, findLast: boolean): number; + indexOf(arr: any[], value: Object, fromIndex?: number, findLast?: boolean): number; /** * Returns true if the current language is left-to-right, and false otherwise. * * @param doc OptionalOptional document to query. If unspecified, use win.doc. */ - isBodyLtr(doc: HTMLDocument): boolean; + isBodyLtr(doc?: HTMLDocument): boolean; /** * Returns true if node is a descendant of ancestor * @@ -8014,7 +8014,7 @@ declare module dojo { * @param value * @param fromIndex Optional */ - lastIndexOf(arr: any, value: any, fromIndex: number): number; + lastIndexOf(arr: any, value: any, fromIndex?: number): number; /** * * @param f @@ -8093,7 +8093,7 @@ declare module dojo { * @param node id or reference to DOM Node to get/set box for * @param box OptionalIf passed, denotes that dojo.marginBox() shouldupdate/set the margin box for node. Box is an object in theabove format. All properties are optional if passed. */ - marginBox(node: HTMLElement, box: Object): any; + marginBox(node: HTMLElement, box?: Object): any; /** * Getter/setter for the margin-box of node. * Getter/setter for the margin-box of node. @@ -8107,14 +8107,14 @@ declare module dojo { * @param node id or reference to DOM Node to get/set box for * @param box OptionalIf passed, denotes that dojo.marginBox() shouldupdate/set the margin box for node. Box is an object in theabove format. All properties are optional if passed. */ - marginBox(node: String, box: Object): any; + marginBox(node: String, box?: Object): any; /** * Returns a URL relative to a module. * * @param module dojo/dom-class * @param url Optional */ - moduleUrl(module: String, url: String): String; + moduleUrl(module: String, url?: String): String; /** * Array-like object which adds syntactic * sugar for chaining, common iteration operations, animation, and @@ -8145,7 +8145,7 @@ declare module dojo { * @param refNode id or node reference to use as basis for placement * @param position Optionalstring noting the position of node relative to refNode or anumber indicating the location in the childNodes collection of refNode.Accepted string values are:beforeafterreplaceonlyfirstlast"first" and "last" indicate positions as children of refNode, "replace" replaces refNode,"only" replaces all children. position defaults to "last" if not specified */ - place(node: HTMLElement, refNode: HTMLElement, position: String): HTMLElement; + place(node: HTMLElement, refNode: HTMLElement, position?: String): HTMLElement; /** * Attempt to insert node into the DOM, choosing from various positioning options. * Returns the first argument resolved to a DOM node. @@ -8154,7 +8154,7 @@ declare module dojo { * @param refNode id or node reference to use as basis for placement * @param position Optionalstring noting the position of node relative to refNode or anumber indicating the location in the childNodes collection of refNode.Accepted string values are:beforeafterreplaceonlyfirstlast"first" and "last" indicate positions as children of refNode, "replace" replaces refNode,"only" replaces all children. position defaults to "last" if not specified */ - place(node: String, refNode: HTMLElement, position: String): HTMLElement; + place(node: String, refNode: HTMLElement, position?: String): HTMLElement; /** * Attempt to insert node into the DOM, choosing from various positioning options. * Returns the first argument resolved to a DOM node. @@ -8163,7 +8163,7 @@ declare module dojo { * @param refNode id or node reference to use as basis for placement * @param position Optionalstring noting the position of node relative to refNode or anumber indicating the location in the childNodes collection of refNode.Accepted string values are:beforeafterreplaceonlyfirstlast"first" and "last" indicate positions as children of refNode, "replace" replaces refNode,"only" replaces all children. position defaults to "last" if not specified */ - place(node: HTMLElement, refNode: String, position: String): HTMLElement; + place(node: HTMLElement, refNode: String, position?: String): HTMLElement; /** * Attempt to insert node into the DOM, choosing from various positioning options. * Returns the first argument resolved to a DOM node. @@ -8172,7 +8172,7 @@ declare module dojo { * @param refNode id or node reference to use as basis for placement * @param position Optionalstring noting the position of node relative to refNode or anumber indicating the location in the childNodes collection of refNode.Accepted string values are:beforeafterreplaceonlyfirstlast"first" and "last" indicate positions as children of refNode, "replace" replaces refNode,"only" replaces all children. position defaults to "last" if not specified */ - place(node: String, refNode: String, position: String): HTMLElement; + place(node: String, refNode: String, position?: String): HTMLElement; /** * Attempt to insert node into the DOM, choosing from various positioning options. * Returns the first argument resolved to a DOM node. @@ -8181,7 +8181,7 @@ declare module dojo { * @param refNode id or node reference to use as basis for placement * @param position Optionalstring noting the position of node relative to refNode or anumber indicating the location in the childNodes collection of refNode.Accepted string values are:beforeafterreplaceonlyfirstlast"first" and "last" indicate positions as children of refNode, "replace" replaces refNode,"only" replaces all children. position defaults to "last" if not specified */ - place(node: HTMLElement, refNode: HTMLElement, position: number): HTMLElement; + place(node: HTMLElement, refNode: HTMLElement, position?: number): HTMLElement; /** * Attempt to insert node into the DOM, choosing from various positioning options. * Returns the first argument resolved to a DOM node. @@ -8190,7 +8190,7 @@ declare module dojo { * @param refNode id or node reference to use as basis for placement * @param position Optionalstring noting the position of node relative to refNode or anumber indicating the location in the childNodes collection of refNode.Accepted string values are:beforeafterreplaceonlyfirstlast"first" and "last" indicate positions as children of refNode, "replace" replaces refNode,"only" replaces all children. position defaults to "last" if not specified */ - place(node: String, refNode: HTMLElement, position: number): HTMLElement; + place(node: String, refNode: HTMLElement, position?: number): HTMLElement; /** * Attempt to insert node into the DOM, choosing from various positioning options. * Returns the first argument resolved to a DOM node. @@ -8199,7 +8199,7 @@ declare module dojo { * @param refNode id or node reference to use as basis for placement * @param position Optionalstring noting the position of node relative to refNode or anumber indicating the location in the childNodes collection of refNode.Accepted string values are:beforeafterreplaceonlyfirstlast"first" and "last" indicate positions as children of refNode, "replace" replaces refNode,"only" replaces all children. position defaults to "last" if not specified */ - place(node: HTMLElement, refNode: String, position: number): HTMLElement; + place(node: HTMLElement, refNode: String, position?: number): HTMLElement; /** * Attempt to insert node into the DOM, choosing from various positioning options. * Returns the first argument resolved to a DOM node. @@ -8208,7 +8208,7 @@ declare module dojo { * @param refNode id or node reference to use as basis for placement * @param position Optionalstring noting the position of node relative to refNode or anumber indicating the location in the childNodes collection of refNode.Accepted string values are:beforeafterreplaceonlyfirstlast"first" and "last" indicate positions as children of refNode, "replace" replaces refNode,"only" replaces all children. position defaults to "last" if not specified */ - place(node: String, refNode: String, position: number): HTMLElement; + place(node: String, refNode: String, position?: number): HTMLElement; /** * require one or more modules based on which host environment * Dojo is currently operating in @@ -8247,7 +8247,7 @@ declare module dojo { * @param node * @param includeScroll Optional */ - position(node: HTMLElement, includeScroll: boolean): Object; + position(node: HTMLElement, includeScroll?: boolean): Object; /** * Gets the position and size of the passed element relative to * the viewport (if includeScroll==false), or relative to the @@ -8263,7 +8263,7 @@ declare module dojo { * @param node * @param includeScroll Optional */ - position(node: String, includeScroll: boolean): Object; + position(node: String, includeScroll?: boolean): Object; /** * Gets or sets a property on an HTML element. * Handles normalized getting and setting of properties on DOM @@ -8287,7 +8287,7 @@ declare module dojo { * @param name the name of the property to get or set. * @param value OptionalThe value to set for the property */ - prop(node: HTMLElement, name: String, value: String): any; + prop(node: HTMLElement, name: String, value?: String): any; /** * Gets or sets a property on an HTML element. * Handles normalized getting and setting of properties on DOM @@ -8311,7 +8311,7 @@ declare module dojo { * @param name the name of the property to get or set. * @param value OptionalThe value to set for the property */ - prop(node: String, name: String, value: String): any; + prop(node: String, name: String, value?: String): any; /** * Gets or sets a property on an HTML element. * Handles normalized getting and setting of properties on DOM @@ -8335,7 +8335,7 @@ declare module dojo { * @param name the name of the property to get or set. * @param value OptionalThe value to set for the property */ - prop(node: HTMLElement, name: Object, value: String): any; + prop(node: HTMLElement, name: Object, value?: String): any; /** * Gets or sets a property on an HTML element. * Handles normalized getting and setting of properties on DOM @@ -8359,7 +8359,7 @@ declare module dojo { * @param name the name of the property to get or set. * @param value OptionalThe value to set for the property */ - prop(node: String, name: Object, value: String): any; + prop(node: String, name: Object, value?: String): any; /** * * @param mid @@ -8389,7 +8389,7 @@ declare module dojo { * @param g OptionalThe global context. If a string, the id of the frame tosearch for a context and document. * @param d OptionalThe document element to execute subsequent code with. */ - pushContext(g: Object, d: HTMLDocument): void; + pushContext(g?: Object, d?: HTMLDocument): void; /** * causes subsequent calls to Dojo methods to assume the * passed object and, optionally, document as the default @@ -8414,7 +8414,7 @@ declare module dojo { * @param g OptionalThe global context. If a string, the id of the frame tosearch for a context and document. * @param d OptionalThe document element to execute subsequent code with. */ - pushContext(g: String, d: HTMLDocument): void; + pushContext(g?: String, d?: HTMLDocument): void; /** * Create an object representing a de-serialized query section of a * URL. Query keys with multiple values are returned in an array. @@ -8447,7 +8447,7 @@ declare module dojo { * @param context The context in which to run execute callback, or a callback if not using context * @param callback OptionalThe function to execute. */ - ready(priority: number, context: any, callback: Function): void; + ready(priority: number, context: any, callback?: Function): void; /** * Maps a module name to a path * An unregistered module is given the default path of ../[module], @@ -8480,7 +8480,7 @@ declare module dojo { * @param node String ID or DomNode reference to remove the class from. * @param classStr OptionalAn optional String class name to remove, or several space-separatedclass names, or an array of class names. If omitted, all class nameswill be deleted. */ - removeClass(node: String, classStr: String): void; + removeClass(node: String, classStr?: String): void; /** * Removes the specified classes from node. No contains() * check is required. @@ -8488,7 +8488,7 @@ declare module dojo { * @param node String ID or DomNode reference to remove the class from. * @param classStr OptionalAn optional String class name to remove, or several space-separatedclass names, or an array of class names. If omitted, all class nameswill be deleted. */ - removeClass(node: HTMLElement, classStr: String): void; + removeClass(node: HTMLElement, classStr?: String): void; /** * Removes the specified classes from node. No contains() * check is required. @@ -8496,7 +8496,7 @@ declare module dojo { * @param node String ID or DomNode reference to remove the class from. * @param classStr OptionalAn optional String class name to remove, or several space-separatedclass names, or an array of class names. If omitted, all class nameswill be deleted. */ - removeClass(node: String, classStr: any[]): void; + removeClass(node: String, classStr?: any[]): void; /** * Removes the specified classes from node. No contains() * check is required. @@ -8504,7 +8504,7 @@ declare module dojo { * @param node String ID or DomNode reference to remove the class from. * @param classStr OptionalAn optional String class name to remove, or several space-separatedclass names, or an array of class names. If omitted, all class nameswill be deleted. */ - removeClass(node: HTMLElement, classStr: any[]): void; + removeClass(node: HTMLElement, classStr?: any[]): void; /** * Replaces one or more classes on a node if not present. * Operates more quickly than calling dojo.removeClass and dojo.addClass @@ -8513,7 +8513,7 @@ declare module dojo { * @param addClassStr A String class name to add, or several space-separated class names,or an array of class names. * @param removeClassStr OptionalA String class name to remove, or several space-separated class names,or an array of class names. */ - replaceClass(node: String, addClassStr: String, removeClassStr: String): void; + replaceClass(node: String, addClassStr: String, removeClassStr?: String): void; /** * Replaces one or more classes on a node if not present. * Operates more quickly than calling dojo.removeClass and dojo.addClass @@ -8522,7 +8522,7 @@ declare module dojo { * @param addClassStr A String class name to add, or several space-separated class names,or an array of class names. * @param removeClassStr OptionalA String class name to remove, or several space-separated class names,or an array of class names. */ - replaceClass(node: HTMLElement, addClassStr: String, removeClassStr: String): void; + replaceClass(node: HTMLElement, addClassStr: String, removeClassStr?: String): void; /** * Replaces one or more classes on a node if not present. * Operates more quickly than calling dojo.removeClass and dojo.addClass @@ -8531,7 +8531,7 @@ declare module dojo { * @param addClassStr A String class name to add, or several space-separated class names,or an array of class names. * @param removeClassStr OptionalA String class name to remove, or several space-separated class names,or an array of class names. */ - replaceClass(node: String, addClassStr: any[], removeClassStr: String): void; + replaceClass(node: String, addClassStr: any[], removeClassStr?: String): void; /** * Replaces one or more classes on a node if not present. * Operates more quickly than calling dojo.removeClass and dojo.addClass @@ -8540,7 +8540,7 @@ declare module dojo { * @param addClassStr A String class name to add, or several space-separated class names,or an array of class names. * @param removeClassStr OptionalA String class name to remove, or several space-separated class names,or an array of class names. */ - replaceClass(node: HTMLElement, addClassStr: any[], removeClassStr: String): void; + replaceClass(node: HTMLElement, addClassStr: any[], removeClassStr?: String): void; /** * Replaces one or more classes on a node if not present. * Operates more quickly than calling dojo.removeClass and dojo.addClass @@ -8549,7 +8549,7 @@ declare module dojo { * @param addClassStr A String class name to add, or several space-separated class names,or an array of class names. * @param removeClassStr OptionalA String class name to remove, or several space-separated class names,or an array of class names. */ - replaceClass(node: String, addClassStr: String, removeClassStr: any[]): void; + replaceClass(node: String, addClassStr: String, removeClassStr?: any[]): void; /** * Replaces one or more classes on a node if not present. * Operates more quickly than calling dojo.removeClass and dojo.addClass @@ -8558,7 +8558,7 @@ declare module dojo { * @param addClassStr A String class name to add, or several space-separated class names,or an array of class names. * @param removeClassStr OptionalA String class name to remove, or several space-separated class names,or an array of class names. */ - replaceClass(node: HTMLElement, addClassStr: String, removeClassStr: any[]): void; + replaceClass(node: HTMLElement, addClassStr: String, removeClassStr?: any[]): void; /** * Replaces one or more classes on a node if not present. * Operates more quickly than calling dojo.removeClass and dojo.addClass @@ -8567,7 +8567,7 @@ declare module dojo { * @param addClassStr A String class name to add, or several space-separated class names,or an array of class names. * @param removeClassStr OptionalA String class name to remove, or several space-separated class names,or an array of class names. */ - replaceClass(node: String, addClassStr: any[], removeClassStr: any[]): void; + replaceClass(node: String, addClassStr: any[], removeClassStr?: any[]): void; /** * Replaces one or more classes on a node if not present. * Operates more quickly than calling dojo.removeClass and dojo.addClass @@ -8576,7 +8576,7 @@ declare module dojo { * @param addClassStr A String class name to add, or several space-separated class names,or an array of class names. * @param removeClassStr OptionalA String class name to remove, or several space-separated class names,or an array of class names. */ - replaceClass(node: HTMLElement, addClassStr: any[], removeClassStr: any[]): void; + replaceClass(node: HTMLElement, addClassStr: any[], removeClassStr?: any[]): void; /** * loads a Javascript module from the appropriate URI * Modules are loaded via dojo.require by using one of two loaders: the normal loader @@ -8640,7 +8640,7 @@ declare module dojo { * @param moduleName * @param omitModuleCheck Optional */ - requireAfterIf(condition: boolean, moduleName: String, omitModuleCheck: boolean): void; + requireAfterIf(condition: boolean, moduleName: String, omitModuleCheck?: boolean): void; /** * If the condition is true then call dojo.require() for the specified * resource @@ -8649,14 +8649,14 @@ declare module dojo { * @param moduleName * @param omitModuleCheck Optional */ - requireIf(condition: boolean, moduleName: String, omitModuleCheck: boolean): void; + requireIf(condition: boolean, moduleName: String, omitModuleCheck?: boolean): void; /** * * @param moduleName * @param bundleName * @param locale Optional */ - requireLocalization(moduleName: String, bundleName: String, locale: String): void; + requireLocalization(moduleName: String, bundleName: String, locale?: String): void; /** * Mix in properties skipping a constructor and decorating functions * like it is done by declare(). @@ -8693,7 +8693,7 @@ declare module dojo { * @param name the name of the attribute to set, or a hash of key-value pairs to set. * @param value Optionalthe value to set for the attribute, if the name is a string. */ - setAttr(node: HTMLElement, name: String, value: String): any; + setAttr(node: HTMLElement, name: String, value?: String): any; /** * Sets an attribute on an HTML element. * Handles normalized setting of attributes on DOM Nodes. @@ -8712,7 +8712,7 @@ declare module dojo { * @param name the name of the attribute to set, or a hash of key-value pairs to set. * @param value Optionalthe value to set for the attribute, if the name is a string. */ - setAttr(node: String, name: String, value: String): any; + setAttr(node: String, name: String, value?: String): any; /** * Sets an attribute on an HTML element. * Handles normalized setting of attributes on DOM Nodes. @@ -8731,7 +8731,7 @@ declare module dojo { * @param name the name of the attribute to set, or a hash of key-value pairs to set. * @param value Optionalthe value to set for the attribute, if the name is a string. */ - setAttr(node: HTMLElement, name: Object, value: String): any; + setAttr(node: HTMLElement, name: Object, value?: String): any; /** * Sets an attribute on an HTML element. * Handles normalized setting of attributes on DOM Nodes. @@ -8750,7 +8750,7 @@ declare module dojo { * @param name the name of the attribute to set, or a hash of key-value pairs to set. * @param value Optionalthe value to set for the attribute, if the name is a string. */ - setAttr(node: String, name: Object, value: String): any; + setAttr(node: String, name: Object, value?: String): any; /** * Sets the size of the node's contents, irrespective of margins, * padding, or borders. @@ -8759,7 +8759,7 @@ declare module dojo { * @param box hash with optional "w", and "h" properties for "width", and "height"respectively. All specified properties should have numeric values in whole pixels. * @param computedStyle OptionalThis parameter accepts computed styles object.If this parameter is omitted, the functions will calldojo/dom-style.getComputedStyle to get one. It is a better way, callingdojo/dom-style.getComputedStyle once, and then pass the reference to thiscomputedStyle parameter. Wherever possible, reuse the returnedobject of dojo/dom-style.getComputedStyle(). */ - setContentSize(node: HTMLElement, box: Object, computedStyle: Object): void; + setContentSize(node: HTMLElement, box: Object, computedStyle?: Object): void; /** * changes the behavior of many core Dojo functions that deal with * namespace and DOM lookup, changing them to work in a new global @@ -8781,7 +8781,7 @@ declare module dojo { * @param box hash with optional "l", "t", "w", and "h" properties for "left", "right", "width", and "height"respectively. All specified properties should have numeric values in whole pixels. * @param computedStyle OptionalThis parameter accepts computed styles object.If this parameter is omitted, the functions will calldojo/dom-style.getComputedStyle to get one. It is a better way, callingdojo/dom-style.getComputedStyle once, and then pass the reference to thiscomputedStyle parameter. Wherever possible, reuse the returnedobject of dojo/dom-style.getComputedStyle(). */ - setMarginBox(node: HTMLElement, box: Object, computedStyle: Object): void; + setMarginBox(node: HTMLElement, box: Object, computedStyle?: Object): void; /** * Sets a property on an HTML element. * Handles normalized setting of properties on DOM nodes. @@ -8800,7 +8800,7 @@ declare module dojo { * @param name the name of the property to set, or a hash object to setmultiple properties at once. * @param value OptionalThe value to set for the property */ - setProp(node: HTMLElement, name: String, value: String): any; + setProp(node: HTMLElement, name: String, value?: String): any; /** * Sets a property on an HTML element. * Handles normalized setting of properties on DOM nodes. @@ -8819,7 +8819,7 @@ declare module dojo { * @param name the name of the property to set, or a hash object to setmultiple properties at once. * @param value OptionalThe value to set for the property */ - setProp(node: String, name: String, value: String): any; + setProp(node: String, name: String, value?: String): any; /** * Sets a property on an HTML element. * Handles normalized setting of properties on DOM nodes. @@ -8838,7 +8838,7 @@ declare module dojo { * @param name the name of the property to set, or a hash object to setmultiple properties at once. * @param value OptionalThe value to set for the property */ - setProp(node: HTMLElement, name: Object, value: String): any; + setProp(node: HTMLElement, name: Object, value?: String): any; /** * Sets a property on an HTML element. * Handles normalized setting of properties on DOM nodes. @@ -8857,7 +8857,7 @@ declare module dojo { * @param name the name of the property to set, or a hash object to setmultiple properties at once. * @param value OptionalThe value to set for the property */ - setProp(node: String, name: Object, value: String): any; + setProp(node: String, name: Object, value?: String): any; /** * * @param node @@ -8871,7 +8871,7 @@ declare module dojo { * @param name the style property to set in DOM-accessor format("borderWidth", not "border-width") or an object with key/valuepairs suitable for setting each property. * @param value OptionalIf passed, sets value on the node for style, handlingcross-browser concerns. When setting a pixel value,be sure to include "px" in the value. For instance, top: "200px".Otherwise, in some cases, some browsers will not apply the style. */ - setStyle(node: HTMLElement, name: String, value: String): String; + setStyle(node: HTMLElement, name: String, value?: String): String; /** * Sets styles on a node. * @@ -8879,7 +8879,7 @@ declare module dojo { * @param name the style property to set in DOM-accessor format("borderWidth", not "border-width") or an object with key/valuepairs suitable for setting each property. * @param value OptionalIf passed, sets value on the node for style, handlingcross-browser concerns. When setting a pixel value,be sure to include "px" in the value. For instance, top: "200px".Otherwise, in some cases, some browsers will not apply the style. */ - setStyle(node: String, name: String, value: String): String; + setStyle(node: String, name: String, value?: String): String; /** * Sets styles on a node. * @@ -8887,7 +8887,7 @@ declare module dojo { * @param name the style property to set in DOM-accessor format("borderWidth", not "border-width") or an object with key/valuepairs suitable for setting each property. * @param value OptionalIf passed, sets value on the node for style, handlingcross-browser concerns. When setting a pixel value,be sure to include "px" in the value. For instance, top: "200px".Otherwise, in some cases, some browsers will not apply the style. */ - setStyle(node: HTMLElement, name: Object, value: String): String; + setStyle(node: HTMLElement, name: Object, value?: String): String; /** * Sets styles on a node. * @@ -8895,7 +8895,7 @@ declare module dojo { * @param name the style property to set in DOM-accessor format("borderWidth", not "border-width") or an object with key/valuepairs suitable for setting each property. * @param value OptionalIf passed, sets value on the node for style, handlingcross-browser concerns. When setting a pixel value,be sure to include "px" in the value. For instance, top: "200px".Otherwise, in some cases, some browsers will not apply the style. */ - setStyle(node: String, name: Object, value: String): String; + setStyle(node: String, name: Object, value?: String): String; /** * Determines whether or not any item in arr satisfies the * condition implemented by callback. @@ -8909,7 +8909,7 @@ declare module dojo { * @param callback a function is invoked with three arguments: item, index,and array and returns true if the condition is met. * @param thisObject Optionalmay be used to scope the call to callback */ - some(arr: any[], callback: Function, thisObject: Object): boolean; + some(arr: any[], callback: Function, thisObject?: Object): boolean; /** * Determines whether or not any item in arr satisfies the * condition implemented by callback. @@ -8923,7 +8923,7 @@ declare module dojo { * @param callback a function is invoked with three arguments: item, index,and array and returns true if the condition is met. * @param thisObject Optionalmay be used to scope the call to callback */ - some(arr: String, callback: Function, thisObject: Object): boolean; + some(arr: String, callback: Function, thisObject?: Object): boolean; /** * Determines whether or not any item in arr satisfies the * condition implemented by callback. @@ -8937,7 +8937,7 @@ declare module dojo { * @param callback a function is invoked with three arguments: item, index,and array and returns true if the condition is met. * @param thisObject Optionalmay be used to scope the call to callback */ - some(arr: any[], callback: String, thisObject: Object): boolean; + some(arr: any[], callback: String, thisObject?: Object): boolean; /** * Determines whether or not any item in arr satisfies the * condition implemented by callback. @@ -8951,7 +8951,7 @@ declare module dojo { * @param callback a function is invoked with three arguments: item, index,and array and returns true if the condition is met. * @param thisObject Optionalmay be used to scope the call to callback */ - some(arr: String, callback: String, thisObject: Object): boolean; + some(arr: String, callback: String, thisObject?: Object): boolean; /** * */ @@ -8979,7 +8979,7 @@ declare module dojo { * @param name Optionalthe style property to set in DOM-accessor format("borderWidth", not "border-width") or an object with key/valuepairs suitable for setting each property. * @param value OptionalIf passed, sets value on the node for style, handlingcross-browser concerns. When setting a pixel value,be sure to include "px" in the value. For instance, top: "200px".Otherwise, in some cases, some browsers will not apply the style. */ - style(node: HTMLElement, name: String, value: String): any; + style(node: HTMLElement, name?: String, value?: String): any; /** * Accesses styles on a node. If 2 arguments are * passed, acts as a getter. If 3 arguments are passed, acts @@ -8996,7 +8996,7 @@ declare module dojo { * @param name Optionalthe style property to set in DOM-accessor format("borderWidth", not "border-width") or an object with key/valuepairs suitable for setting each property. * @param value OptionalIf passed, sets value on the node for style, handlingcross-browser concerns. When setting a pixel value,be sure to include "px" in the value. For instance, top: "200px".Otherwise, in some cases, some browsers will not apply the style. */ - style(node: String, name: String, value: String): any; + style(node: String, name?: String, value?: String): any; /** * Accesses styles on a node. If 2 arguments are * passed, acts as a getter. If 3 arguments are passed, acts @@ -9013,7 +9013,7 @@ declare module dojo { * @param name Optionalthe style property to set in DOM-accessor format("borderWidth", not "border-width") or an object with key/valuepairs suitable for setting each property. * @param value OptionalIf passed, sets value on the node for style, handlingcross-browser concerns. When setting a pixel value,be sure to include "px" in the value. For instance, top: "200px".Otherwise, in some cases, some browsers will not apply the style. */ - style(node: HTMLElement, name: Object, value: String): any; + style(node: HTMLElement, name?: Object, value?: String): any; /** * Accesses styles on a node. If 2 arguments are * passed, acts as a getter. If 3 arguments are passed, acts @@ -9030,14 +9030,14 @@ declare module dojo { * @param name Optionalthe style property to set in DOM-accessor format("borderWidth", not "border-width") or an object with key/valuepairs suitable for setting each property. * @param value OptionalIf passed, sets value on the node for style, handlingcross-browser concerns. When setting a pixel value,be sure to include "px" in the value. For instance, top: "200px".Otherwise, in some cases, some browsers will not apply the style. */ - style(node: String, name: Object, value: String): any; + style(node: String, name?: Object, value?: String): any; /** * instantiates an HTML fragment returning the corresponding DOM. * * @param frag the HTML fragment * @param doc Optionaloptional document to use when creating DOM nodes, defaults todojo/_base/window.doc if not specified. */ - toDom(frag: String, doc: HTMLDocument): any; + toDom(frag: String, doc?: HTMLDocument): any; /** * Adds a class to node if not present, or removes if present. * Pass a boolean condition if you want to explicitly add or remove. @@ -9089,7 +9089,7 @@ declare module dojo { * @param it an object to be serialized. Objects may define their ownserialization via a special "json" or "json" functionproperty. If a specialized serializer has been defined, it willbe used as a fallback.Note that in 1.6, toJson would serialize undefined, but this no longer supportedsince it is not supported by native JSON serializer. * @param prettyPrint Optionalif true, we indent objects and arrays to make the output prettier.The variable dojo.toJsonIndentStr is used as the indent string --to use something other than the default (tab), change that variablebefore calling dojo.toJson().Note that if native JSON support is available, it will be used for serialization,and native implementations vary on the exact spacing used in pretty printing. */ - toJson(it: Object, prettyPrint: boolean): any; + toJson(it: Object, prettyPrint?: boolean): any; /** * converts style value to pixels on IE or return a numeric value. * @@ -9119,7 +9119,7 @@ declare module dojo { * @param errback OptionalCallback to be invoked when the promise is rejected. * @param progback OptionalCallback to be invoked when the promise emits a progress update. */ - when(valueOrPromise: any, callback: Function, errback: Function, progback: Function): dojo.promise.Promise; + when(valueOrPromise: any, callback?: Function, errback?: Function, progback?: Function): dojo.promise.Promise; /** * signal fired by impending window destruction. You may use * dojo.addOnWIndowUnload() or dojo.connect() to this method to perform @@ -9139,7 +9139,7 @@ declare module dojo { * @param thisObject Optional * @param cbArguments Optional */ - withDoc(documentObject: HTMLDocument, callback: Function, thisObject: Object, cbArguments: any[]): any; + withDoc(documentObject: HTMLDocument, callback: Function, thisObject?: Object, cbArguments?: any[]): any; /** * Invoke callback with globalObject as dojo.global and * globalObject.document as dojo.doc. @@ -9154,7 +9154,7 @@ declare module dojo { * @param thisObject Optional * @param cbArguments Optional */ - withGlobal(globalObject: Object, callback: Function, thisObject: Object, cbArguments: any[]): any; + withGlobal(globalObject: Object, callback: Function, thisObject?: Object, cbArguments?: any[]): any; /** * * @param method @@ -9545,7 +9545,7 @@ declare module dojo { * * @param params Optional */ - postscript(params: Object): void; + postscript(params?: Object): void; /** * Set a property on a Stateful instance * Sets named properties on a stateful object and notifies any watchers of @@ -9787,7 +9787,7 @@ declare module dojo { * @param g * @param a Optional */ - makeGrey(g: number, a: number): void; + makeGrey(g: number, a?: number): void; } /** * Permalink: http://dojotoolkit.org/api/1.9/dojo/_base/kernel.config.html @@ -10109,7 +10109,7 @@ declare module dojo { * @param date2 OptionalDate object. If not specified, the current Date is used. * @param portion OptionalA string indicating the "date" or "time" portion of a Date object.Compares both "date" and "time" by default. One of the following:"date", "time", "datetime" */ - compare(date1: Date, date2: Date, portion: String): number; + compare(date1: Date, date2?: Date, portion?: String): number; /** * Get the difference in a specific unit of time (e.g., number of * months, weeks, days, etc.) between two dates, rounded to the @@ -10119,7 +10119,7 @@ declare module dojo { * @param date2 OptionalDate object. If not specified, the current Date is used. * @param interval OptionalA string representing the interval. One of the following:"year", "month", "day", "hour", "minute", "second","millisecond", "quarter", "week", "weekday"Defaults to "day". */ - difference(date1: Date, date2: Date, interval: String): any; + difference(date1: Date, date2?: Date, interval?: String): any; /** * Returns the number of days in the month used by dateObject * @@ -10224,7 +10224,7 @@ declare module dojo { * @param expression * @param options OptionalAn object with the following properties:type (String, optional): Should not be set. Value is assumed to be currency.currency (String, optional): an ISO4217 currency code, a three letter sequence like "USD".For use with dojo.currency only.symbol (String, optional): localized currency symbol. The default will be looked up in table of supported currencies in dojo.cldrA ISO4217 currency code will be used if not found.places (Number, optional): fixed number of decimal places to accept. The default is determined based on which currency is used.fractional (Boolean|Array, optional): Whether to include the fractional portion, where the number of decimal places are implied by the currencyor explicit 'places' parameter. The value [true,false] makes the fractional portion optional.By default for currencies, it the fractional portion is optional.pattern (String, optional): override formatting patternwith this string. Default value is based on locale. Overriding this property will defeatlocalization. Literal characters in patterns are not supported.locale (String, optional): override the locale used to determine formatting rulesstrict (Boolean, optional): strict parsing, false by default. Strict parsing requires input as produced by the format() method.Non-strict is more permissive, e.g. flexible on white space, omitting thousands separators */ - parse(expression: String, options: Object): any; + parse(expression: String, options?: Object): any; /** * * @param options OptionalAn object with the following properties:pattern (String, optional): override formatting patternwith this string. Default value is based on locale. Overriding this property will defeatlocalization.type (String, optional): choose a format type based on the locale from the following:decimal, scientific (not yet supported), percent, currency. decimal by default.locale (String, optional): override the locale used to determine formatting rulesstrict (Boolean, optional): strict parsing, false by default. Strict parsing requires input as produced by the format() method.Non-strict is more permissive, e.g. flexible on white space, omitting thousands separatorsplaces (Number|String, optional): number of decimal places to accept: Infinity, a positive number, ora range "n,m". Defined by pattern or Infinity if pattern not provided. @@ -10516,7 +10516,7 @@ declare module dojo { * @param cont the content to be set on the parent element.This can be an html string, a node reference or a NodeList, dojo/NodeList, Array or other enumerable list of nodes * @param params OptionalOptional flags/properties to configure the content-setting. See dojo/html/_ContentSetter */ - set(node: HTMLElement, cont: String, params: Object): any; + set(node: HTMLElement, cont: String, params?: Object): any; /** * inserts (replaces) the given content into the given node. dojo/dom-construct.place(cont, node, "only") * may be a better choice for simple HTML insertion. @@ -10533,7 +10533,7 @@ declare module dojo { * @param cont the content to be set on the parent element.This can be an html string, a node reference or a NodeList, dojo/NodeList, Array or other enumerable list of nodes * @param params OptionalOptional flags/properties to configure the content-setting. See dojo/html/_ContentSetter */ - set(node: HTMLElement, cont: HTMLElement, params: Object): any; + set(node: HTMLElement, cont: HTMLElement, params?: Object): any; /** * inserts (replaces) the given content into the given node. dojo/dom-construct.place(cont, node, "only") * may be a better choice for simple HTML insertion. @@ -10550,7 +10550,7 @@ declare module dojo { * @param cont the content to be set on the parent element.This can be an html string, a node reference or a NodeList, dojo/NodeList, Array or other enumerable list of nodes * @param params OptionalOptional flags/properties to configure the content-setting. See dojo/html/_ContentSetter */ - set(node: HTMLElement, cont: NodeList, params: Object): any; + set(node: HTMLElement, cont: NodeList, params?: Object): any; } /** * Permalink: http://dojotoolkit.org/api/1.9/dojo/_base/kernel.io.html @@ -11081,7 +11081,7 @@ declare module dojo { * @param re A function. Takes one parameter and converts it to a regularexpression. * @param nonCapture OptionalIf true, uses non-capturing match, otherwise matches are retainedby regular expression. Defaults to false */ - buildGroupRE(arr: Object, re: Function, nonCapture: boolean): any; + buildGroupRE(arr: Object, re: Function, nonCapture?: boolean): any; /** * Builds a regular expression that groups subexpressions * A utility function used by some of the RE generators. The @@ -11094,21 +11094,21 @@ declare module dojo { * @param re A function. Takes one parameter and converts it to a regularexpression. * @param nonCapture OptionalIf true, uses non-capturing match, otherwise matches are retainedby regular expression. Defaults to false */ - buildGroupRE(arr: any[], re: Function, nonCapture: boolean): any; + buildGroupRE(arr: any[], re: Function, nonCapture?: boolean): any; /** * Adds escape sequences for special characters in regular expressions * * @param str * @param except Optionala String with special characters to be left unescaped */ - escapeString(str: String, except: String): any; + escapeString(str: String, except?: String): any; /** * adds group match to expression * * @param expression * @param nonCapture OptionalIf true, uses non-capturing match, otherwise matches are retainedby regular expression. */ - group(expression: String, nonCapture: boolean): String; + group(expression: String, nonCapture?: boolean): String; } /** * Permalink: http://dojotoolkit.org/api/1.9/dojo/_base/kernel.number.html @@ -11128,7 +11128,7 @@ declare module dojo { * @param value the number to be formatted * @param options OptionalAn object with the following properties:pattern (String, optional): override formatting patternwith this string. Default value is based on locale. Overriding this property will defeatlocalization. Literal characters in patterns are not supported.type (String, optional): choose a format type based on the locale from the following:decimal, scientific (not yet supported), percent, currency. decimal by default.places (Number, optional): fixed number of decimal places to show. This overrides anyinformation in the provided pattern.round (Number, optional): 5 rounds to nearest .5; 0 rounds to nearest whole (default). -1means do not round.locale (String, optional): override the locale used to determine formatting rulesfractional (Boolean, optional): If false, show no decimal places, overriding places and pattern settings. */ - format(value: number, options: Object): any; + format(value: number, options?: Object): any; /** * Convert a properly formatted string to a primitive Number, using * locale-specific settings. @@ -11141,7 +11141,7 @@ declare module dojo { * @param expression A string representation of a Number * @param options OptionalAn object with the following properties:pattern (String, optional): override formatting patternwith this string. Default value is based on locale. Overriding this property will defeatlocalization. Literal characters in patterns are not supported.type (String, optional): choose a format type based on the locale from the following:decimal, scientific (not yet supported), percent, currency. decimal by default.locale (String, optional): override the locale used to determine formatting rulesstrict (Boolean, optional): strict parsing, false by default. Strict parsing requires input as produced by the format() method.Non-strict is more permissive, e.g. flexible on white space, omitting thousands separatorsfractional (Boolean|Array, optional): Whether to include the fractional portion, where the number of decimal places are implied by patternor explicit 'places' parameter. The value [true,false] makes the fractional portion optional. */ - parse(expression: String, options: Object): number; + parse(expression: String, options?: Object): number; /** * Builds the regular needed to parse a number * Returns regular expression with positive and negative match, group @@ -11161,7 +11161,7 @@ declare module dojo { * @param places OptionalThe number of decimal places where rounding takes place. Defaults to 0 for whole rounding.Must be non-negative. * @param increment OptionalRounds next place to nearest value of increment/10. 10 by default. */ - round(value: number, places: number, increment: number): number; + round(value: number, places?: number, increment?: number): number; } /** * Permalink: http://dojotoolkit.org/api/1.9/dojo/_base/kernel.scopeMap.html @@ -11511,7 +11511,7 @@ declare module dojo { * @param ch Optionalcharacter to pad, defaults to '0' * @param end Optionaladds padding at the end if true, otherwise pads at start */ - pad(text: String, size: number, ch: String, end: boolean): number; + pad(text: String, size: number, ch?: String, end?: boolean): number; /** * Efficiently replicate a string n times. * @@ -11528,7 +11528,7 @@ declare module dojo { * @param transform Optionala function to process all parameters before substitution takesplace, e.g. mylib.encodeXML * @param thisObject Optionalwhere to look for optional format function; default to the globalnamespace */ - substitute(template: String, map: Object, transform: Function, thisObject: Object): any; + substitute(template: String, map: Object, transform?: Function, thisObject?: Object): any; /** * Performs parameterized substitutions on a string. Throws an * exception if any parameter is unmatched. @@ -11538,7 +11538,7 @@ declare module dojo { * @param transform Optionala function to process all parameters before substitution takesplace, e.g. mylib.encodeXML * @param thisObject Optionalwhere to look for optional format function; default to the globalnamespace */ - substitute(template: String, map: any[], transform: Function, thisObject: Object): any; + substitute(template: String, map: any[], transform?: Function, thisObject?: Object): any; /** * Trims whitespace from both sides of the string * This version of trim() was taken from Steven Levithan's blog. @@ -11677,14 +11677,14 @@ declare module dojo { * * @param doc Optional */ - getBox(doc: HTMLDocument): Object; + getBox(doc?: HTMLDocument): Object; /** * Scroll the passed node into view using minimal movement, if it is not already. * * @param node * @param pos Optional */ - scrollIntoView(node: HTMLElement, pos: Object): void; + scrollIntoView(node: HTMLElement, pos?: Object): void; } } @@ -11725,7 +11725,7 @@ declare module dojo { * * @param locale Optional */ - getFirstDayOfWeek(locale: String): number; + getFirstDayOfWeek(locale?: String): number; /** * Returns a hash containing the start and end days of the weekend * Returns a hash containing the start and end days of the weekend according to local custom using locale, @@ -11734,7 +11734,7 @@ declare module dojo { * * @param locale Optional */ - getWeekend(locale: String): Object; + getWeekend(locale?: String): Object; } } @@ -11804,13 +11804,13 @@ declare module dojo { * * @param request Optional */ - close(request: dojo.data.api.Request ): void; + close(request?: dojo.data.api.Request ): void; /** * See dojo/data/api/Read.close() * * @param request Optional */ - close(request: Object): void; + close(request?: Object): void; /** * See dojo/data/api/Read.containsValue() * @@ -11927,7 +11927,7 @@ declare module dojo { * @param attribute * @param defaultValue Optional */ - getValue(item: dojo.data.api.Item, attribute: String, defaultValue: any): any; + getValue(item: dojo.data.api.Item, attribute: String, defaultValue?: any): any; /** * See dojo/data/api/Read.getValues() * @@ -12079,7 +12079,7 @@ declare module dojo { * @param property property to look up value for * @param defaultValue Optionalthe default value */ - getValue(item: Object, property: String, defaultValue: any): any; + getValue(item: Object, property: String, defaultValue?: any): any; /** * Gets the value of an item's 'property' and returns * it. If this value is an array it is just returned, @@ -12260,7 +12260,7 @@ declare module dojo { * * @param request Optional */ - close(request: Object): void; + close(request?: Object): void; /** * See dojo/data/api/Read.containsValue() * @@ -12383,7 +12383,7 @@ declare module dojo { * @param attribute * @param defaultValue Optional */ - getValue(item: dojo.data.api.Item, attribute: String, defaultValue: any): any; + getValue(item: dojo.data.api.Item, attribute: String, defaultValue?: any): any; /** * See dojo/data/api/Read.getValues() * @@ -12403,7 +12403,7 @@ declare module dojo { * * @param item Optional */ - isDirty(item: any): any; + isDirty(item?: any): any; /** * See dojo/data/api/Read.isItem() * @@ -12428,7 +12428,7 @@ declare module dojo { * @param keywordArgs Optional * @param parentInfo Optional */ - newItem(keywordArgs: Object, parentInfo: Object): Object; + newItem(keywordArgs?: Object, parentInfo?: Object): Object; /** * * @param type @@ -12481,7 +12481,7 @@ declare module dojo { * @param newItem * @param parentInfo Optional */ - onNew(newItem: dojo.data.api.Item, parentInfo: Object): void; + onNew(newItem: dojo.data.api.Item, parentInfo?: Object): void; /** * See dojo/data/api/Notification.onSet() * @@ -12553,7 +12553,7 @@ declare module dojo { * * @param request OptionalAn instance of a request for the store to use to identify what to close out.If no request is passed, then the store should clear all internal caches (if any)and close out all 'open' connections. It does not render the store unusable fromthere on, it merely cleans out any current data and resets the store to initialstate. */ - close(request: dojo.data.api.Request ): void; + close(request?: dojo.data.api.Request ): void; /** * The close() method is intended for instructing the store to 'close' out * any information associated with a particular request. @@ -12566,7 +12566,7 @@ declare module dojo { * * @param request OptionalAn instance of a request for the store to use to identify what to close out.If no request is passed, then the store should clear all internal caches (if any)and close out all 'open' connections. It does not render the store unusable fromthere on, it merely cleans out any current data and resets the store to initialstate. */ - close(request: Object): void; + close(request?: Object): void; /** * Returns true if the given value is one of the values that getValues() * would return. @@ -12684,7 +12684,7 @@ declare module dojo { * @param attribute The attribute to access represented as a string. * @param defaultValue OptionalOptional. A default value to use for the getValue return in the attribute does not exist or has no value. */ - getValue(item: dojo.data.api.Item, attribute: String, defaultValue: any): any; + getValue(item: dojo.data.api.Item, attribute: String, defaultValue?: any): any; /** * This getValues() method works just like the getValue() method, but getValues() * always returns an array rather than a single attribute value. The array @@ -12794,7 +12794,7 @@ declare module dojo { * * @param request OptionalAn instance of a request for the store to use to identify what to close out.If no request is passed, then the store should clear all internal caches (if any)and close out all 'open' connections. It does not render the store unusable fromthere on, it merely cleans out any current data and resets the store to initialstate. */ - close(request: dojo.data.api.Request ): void; + close(request?: dojo.data.api.Request ): void; /** * The close() method is intended for instructing the store to 'close' out * any information associated with a particular request. @@ -12807,7 +12807,7 @@ declare module dojo { * * @param request OptionalAn instance of a request for the store to use to identify what to close out.If no request is passed, then the store should clear all internal caches (if any)and close out all 'open' connections. It does not render the store unusable fromthere on, it merely cleans out any current data and resets the store to initialstate. */ - close(request: Object): void; + close(request?: Object): void; /** * Returns true if the given value is one of the values that getValues() * would return. @@ -12894,7 +12894,7 @@ declare module dojo { * @param attribute The attribute to access represented as a string. * @param defaultValue OptionalOptional. A default value to use for the getValue return in the attribute does not exist or has no value. */ - getValue(item: dojo.data.api.Item, attribute: String, defaultValue: any): any; + getValue(item: dojo.data.api.Item, attribute: String, defaultValue?: any): any; /** * This getValues() method works just like the getValue() method, but getValues() * always returns an array rather than a single attribute value. The array @@ -12961,7 +12961,7 @@ declare module dojo { * @param newItem The item created. * @param parentInfo OptionalAn optional javascript object that is passed when the item created was placed in the storehierarchy as a value f another item's attribute, instead of a root level item. Note that if thisfunction is invoked with a value for parentInfo, then onSet is not invoked stating the attribute ofthe parent item was modified. This is to avoid getting two notification events occurring when a new itemwith a parent is created. The structure passed in is as follows:{ item: someItem, //The parent item attribute: "attribute-name-string", //The attribute the new item was assigned to. oldValue: something //Whatever was the previous value for the attribute. //If it is a single-value attribute only, then this value will be a single value. //If it was a multi-valued attribute, then this will be an array of all the values minus the new one. newValue: something //The new value of the attribute. In the case of single value calls, such as setValue, this value will be //generally be an atomic value of some sort (string, int, etc, object). In the case of multi-valued attributes, //it will be an array.} */ - onNew(newItem: dojo.data.api.Item, parentInfo: Object): any; + onNew(newItem: dojo.data.api.Item, parentInfo?: Object): any; /** * This function is called any time an item is modified via setValue, setValues, unsetAttribute, etc. * This function is called any time an item is modified via setValue, setValues, unsetAttribute, etc. @@ -13038,7 +13038,7 @@ declare module dojo { * * @param request OptionalAn instance of a request for the store to use to identify what to close out.If no request is passed, then the store should clear all internal caches (if any)and close out all 'open' connections. It does not render the store unusable fromthere on, it merely cleans out any current data and resets the store to initialstate. */ - close(request: dojo.data.api.Request ): void; + close(request?: dojo.data.api.Request ): void; /** * The close() method is intended for instructing the store to 'close' out * any information associated with a particular request. @@ -13051,7 +13051,7 @@ declare module dojo { * * @param request OptionalAn instance of a request for the store to use to identify what to close out.If no request is passed, then the store should clear all internal caches (if any)and close out all 'open' connections. It does not render the store unusable fromthere on, it merely cleans out any current data and resets the store to initialstate. */ - close(request: Object): void; + close(request?: Object): void; /** * Returns true if the given value is one of the values that getValues() * would return. @@ -13146,7 +13146,7 @@ declare module dojo { * @param attribute The attribute to access represented as a string. * @param defaultValue OptionalOptional. A default value to use for the getValue return in the attribute does not exist or has no value. */ - getValue(item: dojo.data.api.Item, attribute: String, defaultValue: any): any; + getValue(item: dojo.data.api.Item, attribute: String, defaultValue?: any): any; /** * This getValues() method works just like the getValue() method, but getValues() * always returns an array rather than a single attribute value. The array @@ -13218,7 +13218,7 @@ declare module dojo { * * @param request OptionalAn instance of a request for the store to use to identify what to close out.If no request is passed, then the store should clear all internal caches (if any)and close out all 'open' connections. It does not render the store unusable fromthere on, it merely cleans out any current data and resets the store to initialstate. */ - close(request: dojo.data.api.Request ): void; + close(request?: dojo.data.api.Request ): void; /** * The close() method is intended for instructing the store to 'close' out * any information associated with a particular request. @@ -13231,7 +13231,7 @@ declare module dojo { * * @param request OptionalAn instance of a request for the store to use to identify what to close out.If no request is passed, then the store should clear all internal caches (if any)and close out all 'open' connections. It does not render the store unusable fromthere on, it merely cleans out any current data and resets the store to initialstate. */ - close(request: Object): void; + close(request?: Object): void; /** * Returns true if the given value is one of the values that getValues() * would return. @@ -13324,7 +13324,7 @@ declare module dojo { * @param attribute The attribute to access represented as a string. * @param defaultValue OptionalOptional. A default value to use for the getValue return in the attribute does not exist or has no value. */ - getValue(item: dojo.data.api.Item, attribute: String, defaultValue: any): any; + getValue(item: dojo.data.api.Item, attribute: String, defaultValue?: any): any; /** * This getValues() method works just like the getValue() method, but getValues() * always returns an array rather than a single attribute value. The array @@ -13353,7 +13353,7 @@ declare module dojo { * * @param item OptionalThe item to check. */ - isDirty(item: any): void; + isDirty(item?: any): void; /** * Returns true if something is an item and came from the store instance. * Returns false if something is a literal, an item from another store instance, @@ -13396,7 +13396,7 @@ declare module dojo { * @param keywordArgs OptionalA javascript object defining the initial content of the item as a set of JavaScript 'property name: value' pairs. * @param parentInfo OptionalAn optional javascript object defining what item is the parent of this item (in a hierarchical store. Not all stores do hierarchical items),and what attribute of that parent to assign the new item to. If this is present, and the attribute specifiedis a multi-valued attribute, it will append this item into the array of values for that attribute. The structureof the object is as follows:{ parent: someItem, attribute: "attribute-name-string"} */ - newItem(keywordArgs: Object, parentInfo: Object): void; + newItem(keywordArgs?: Object, parentInfo?: Object): void; /** * Discards any unsaved changes. * Discards any unsaved changes. @@ -13464,7 +13464,7 @@ declare module dojo { * @param pattern A simple matching pattern to convert that follows basic rules:Means match anything, so ca* means match anything starting with ca? Means match single character. So, b?b will match to bob and bab, and so on.\ is an escape character. So for example, * means do not treat as a match, but literal character .To use a \ as a character in the string, it must be escaped. So in the pattern it should berepresented by \ to be treated as an ordinary \ character instead of an escape. * @param ignoreCase OptionalAn optional flag to indicate if the pattern matching should be treated as case-sensitive or not when comparingBy default, it is assumed case sensitive. */ - patternToRegExp(pattern: String, ignoreCase: boolean): any; + patternToRegExp(pattern: String, ignoreCase?: boolean): any; } /** * Permalink: http://dojotoolkit.org/api/1.9/dojo/data/util/simpleFetch.html @@ -13970,7 +13970,7 @@ declare module dojo { * @param keyPressed the "copy" key was pressed * @param self Optionaloptional flag that means that we are about to drop on itself */ - copyState(keyPressed: boolean, self: boolean): any; + copyState(keyPressed: boolean, self?: boolean): any; /** * creator function, dummy at the moment * @@ -14005,7 +14005,7 @@ declare module dojo { * @param f * @param o Optional */ - forInItems(f: Function, o: Object): String; + forInItems(f: Function, o?: Object): String; /** * iterates over selected items; * see dojo/dnd/Container.forInItems() for details @@ -14013,7 +14013,7 @@ declare module dojo { * @param f * @param o Optional */ - forInSelectedItems(f: Function, o: Object): void; + forInSelectedItems(f: Function, o?: Object): void; /** * returns a list (an array) of all valid child nodes * @@ -14475,7 +14475,7 @@ declare module dojo { * @param f * @param o Optional */ - forInItems(f: Function, o: Object): String; + forInItems(f: Function, o?: Object): String; /** * iterates over selected items; * see dojo/dnd/Container.forInItems() for details @@ -14483,7 +14483,7 @@ declare module dojo { * @param f * @param o Optional */ - forInSelectedItems(f: Function, o: Object): void; + forInSelectedItems(f: Function, o?: Object): void; /** * returns a list (an array) of all valid child nodes * @@ -14823,7 +14823,7 @@ declare module dojo { * @param keyPressed the "copy" key was pressed * @param self Optionaloptional flag that means that we are about to drop on itself */ - copyState(keyPressed: boolean, self: boolean): any; + copyState(keyPressed: boolean, self?: boolean): any; /** * creator function, dummy at the moment * @@ -14858,7 +14858,7 @@ declare module dojo { * @param f * @param o Optional */ - forInItems(f: Function, o: Object): String; + forInItems(f: Function, o?: Object): String; /** * iterates over selected items; * see dojo/dnd/Container.forInItems() for details @@ -14866,7 +14866,7 @@ declare module dojo { * @param f * @param o Optional */ - forInSelectedItems(f: Function, o: Object): void; + forInSelectedItems(f: Function, o?: Object): void; /** * returns a list (an array) of all valid child nodes * @@ -15147,7 +15147,7 @@ declare module dojo { * @param keyPressed the "copy" key was pressed * @param self Optionaloptional flag that means that we are about to drop on itself */ - copyState(keyPressed: boolean, self: boolean): any; + copyState(keyPressed: boolean, self?: boolean): any; /** * creator function, dummy at the moment * @@ -15182,7 +15182,7 @@ declare module dojo { * @param f * @param o Optional */ - forInItems(f: Function, o: Object): String; + forInItems(f: Function, o?: Object): String; /** * iterates over selected items; * see dojo/dnd/Container.forInItems() for details @@ -15190,7 +15190,7 @@ declare module dojo { * @param f * @param o Optional */ - forInSelectedItems(f: Function, o: Object): void; + forInSelectedItems(f: Function, o?: Object): void; /** * returns a list (an array) of all valid child nodes * @@ -15417,7 +15417,7 @@ declare module dojo { * * @param doc Optional */ - getViewport(doc: HTMLDocument): Object; + getViewport(doc?: HTMLDocument): Object; } module autoscroll { /** @@ -16138,7 +16138,7 @@ declare module dojo { * @param reason A message that may be sent to the deferred's canceler,explaining why it's being canceled. * @param strict OptionalIf strict, will throw an error if the deferred has alreadybeen fulfilled and consequently cannot be canceled. */ - cancel(reason: any, strict: boolean): any; + cancel(reason: any, strict?: boolean): any; /** * Checks whether the promise has been canceled. * @@ -16164,7 +16164,7 @@ declare module dojo { * * @param errback OptionalCallback to be invoked when the promise is rejected. */ - otherwise(errback: Callback): Promise; + otherwise(errback?: Callback): Promise; /** * Add new callbacks to the promise. * Add new callbacks to the deferred. Callbacks can be added @@ -16174,7 +16174,7 @@ declare module dojo { * @param errback OptionalCallback to be invoked when the promise is rejected.Receives the rejection error. * @param progback OptionalCallback to be invoked when the promise emits a progressupdate. Receives the progress update. */ - then(callback: Callback, errback?: Callback, progback?: Callback): Promise; + then(callback?: Callback, errback?: Callback, progback?: Callback): Promise; /** * */ @@ -16633,7 +16633,7 @@ declare module dojo { * @param filter * @param root Optional */ - filter(nodeList: HTMLElement[], filter: String, root: String): void; + filter(nodeList: HTMLElement[], filter: String, root?: String): void; /** * function for filtering a NodeList based on a selector, optimized for simple selectors * @@ -16641,7 +16641,7 @@ declare module dojo { * @param filter * @param root Optional */ - filter(nodeList: HTMLElement[], filter: String, root: HTMLElement): void; + filter(nodeList: HTMLElement[], filter: String, root?: HTMLElement): void; } module acme { @@ -16721,7 +16721,7 @@ declare module dojo { * @param object The object to add to the store. * @param directives OptionalAny additional parameters needed to describe how the add should be performed. */ - add(object: Object, directives: any): number; + add(object: Object, directives?: any): number; /** * Remove the object with the given id from the underlying caching store. * @@ -16741,7 +16741,7 @@ declare module dojo { * @param parent The object to find the children of. * @param options OptionalAdditional options to apply to the retrieval of the children. */ - getChildren(parent: Object, options: dojo.store.api.Store.QueryOptions): dojo.store.api.Store.QueryResults; + getChildren(parent: Object, options?: dojo.store.api.Store.QueryOptions): dojo.store.api.Store.QueryResults; /** * Returns an object's identity * @@ -16761,21 +16761,21 @@ declare module dojo { * @param object The object to put to the store. * @param directives OptionalAny additional parameters needed to describe how the put should be performed. */ - put(object: Object, directives: dojo.store.api.Store.PutDirectives): number; + put(object: Object, directives?: dojo.store.api.Store.PutDirectives): number; /** * Query the underlying master store and cache any results. * * @param query The object or string containing query information. Dependent on the query engine used. * @param directives OptionalAn optional keyword arguments object with additional parameters describing the query. */ - query(query: Object, directives: dojo.store.api.Store.QueryOptions): dojo.store.api.Store.QueryResults; + query(query: Object, directives?: dojo.store.api.Store.QueryOptions): dojo.store.api.Store.QueryResults; /** * Query the underlying master store and cache any results. * * @param query The object or string containing query information. Dependent on the query engine used. * @param directives OptionalAn optional keyword arguments object with additional parameters describing the query. */ - query(query: String, directives: dojo.store.api.Store.QueryOptions): dojo.store.api.Store.QueryResults; + query(query: String, directives?: dojo.store.api.Store.QueryOptions): dojo.store.api.Store.QueryResults; /** * Remove the object with the specific id. * @@ -16836,7 +16836,7 @@ declare module dojo { * @param parent The object to find the children of. * @param options OptionalAdditional options to apply to the retrieval of the children. */ - getChildren(parent: Object, options: dojo.store.api.Store.QueryOptions): dojo.store.api.Store.QueryResults; + getChildren(parent: Object, options?: dojo.store.api.Store.QueryOptions): dojo.store.api.Store.QueryResults; /** * Fetch the identity for the given object. * @@ -16856,21 +16856,21 @@ declare module dojo { * @param object The object to store. * @param options OptionalAdditional metadata for storing the data. Includes a reference to an idthat the object may be stored with (i.e. { id: "foo" }). */ - put(object: Object, options: Object): void; + put(object: Object, options?: Object): void; /** * Queries the store for objects. * * @param query The query to use for retrieving objects from the store * @param options OptionalOptional options object as used by the underlying dojo.data Store. */ - query(query: Object, options: Object): any; + query(query: Object, options?: Object): any; /** * Defines the query engine to use for querying the data store * * @param query An object hash with fields that may match fields of items in the store.Values in the hash will be compared by normal == operator, but regular expressionsor any object that provides a test() method are also supported and can beused to match strings by more complex expressions(and then the regex's or object's test() method will be used to match values). * @param options OptionalAn object that contains optional information such as sort, start, and count. */ - queryEngine(query: Object, options: dojo.store.api.Store.QueryOptions): any; + queryEngine(query: Object, options?: dojo.store.api.Store.QueryOptions): any; /** * Deletes an object by its identity. * @@ -16917,7 +16917,7 @@ declare module dojo { * @param object The object to store. * @param options OptionalAdditional metadata for storing the data. Includes an "id"property if a specific id is to be used. */ - add(object: Object, options: dojo.store.api.Store.PutDirectives): any; + add(object: Object, options?: dojo.store.api.Store.PutDirectives): any; /** * Retrieves an object by its identity * @@ -16930,7 +16930,7 @@ declare module dojo { * @param parent The object to find the children of. * @param options OptionalAdditional options to apply to the retrieval of the children. */ - getChildren(parent: Object, options: dojo.store.api.Store.QueryOptions): dojo.store.api.Store.QueryResults; + getChildren(parent: Object, options?: dojo.store.api.Store.QueryOptions): dojo.store.api.Store.QueryResults; /** * Returns an object's identity * @@ -16950,21 +16950,21 @@ declare module dojo { * @param object The object to store. * @param options OptionalAdditional metadata for storing the data. Includes an "id"property if a specific id is to be used. */ - put(object: Object, options: dojo.store.api.Store.PutDirectives): any; + put(object: Object, options?: dojo.store.api.Store.PutDirectives): any; /** * Queries the store for objects. * * @param query The query to use for retrieving objects from the store. * @param options OptionalThe optional arguments to apply to the resultset. */ - query(query: Object, options: dojo.store.api.Store.QueryOptions): any; + query(query: Object, options?: dojo.store.api.Store.QueryOptions): any; /** * Defines the query engine to use for querying the data store * * @param query An object hash with fields that may match fields of items in the store.Values in the hash will be compared by normal == operator, but regular expressionsor any object that provides a test() method are also supported and can beused to match strings by more complex expressions(and then the regex's or object's test() method will be used to match values). * @param options OptionalAn object that contains optional information such as sort, start, and count. */ - queryEngine(query: Object, options: dojo.store.api.Store.QueryOptions): any; + queryEngine(query: Object, options?: dojo.store.api.Store.QueryOptions): any; /** * Deletes an object by its identity * @@ -17055,7 +17055,7 @@ declare module dojo { * @param object The object to store. * @param options OptionalAdditional metadata for storing the data. Includes an "id"property if a specific id is to be used. */ - add(object: Object, options: Object): any; + add(object: Object, options?: Object): any; /** * Retrieves an object by its identity. This will trigger a GET request to the server using * the url this.target + id. @@ -17070,7 +17070,7 @@ declare module dojo { * @param parent The object to find the children of. * @param options OptionalAdditional options to apply to the retrieval of the children. */ - getChildren(parent: Object, options: dojo.store.api.Store.QueryOptions): dojo.store.api.Store.QueryResults; + getChildren(parent: Object, options?: dojo.store.api.Store.QueryOptions): dojo.store.api.Store.QueryResults; /** * Returns an object's identity * @@ -17091,7 +17091,7 @@ declare module dojo { * @param object The object to store. * @param options OptionalAdditional metadata for storing the data. Includes an "id"property if a specific id is to be used. */ - put(object: Object, options: Object): any; + put(object: Object, options?: Object): any; /** * Queries the store for objects. This will trigger a GET request to the server, with the * query added as a query string. @@ -17099,7 +17099,7 @@ declare module dojo { * @param query The query to use for retrieving objects from the store. * @param options OptionalThe optional arguments to apply to the resultset. */ - query(query: Object, options: Object): any; + query(query: Object, options?: Object): any; /** * Deletes an object by its identity. This will trigger a DELETE request to the server. * @@ -17163,7 +17163,7 @@ declare module dojo { * @param object The object to store. * @param directives OptionalAdditional directives for creating objects. */ - add(object: Object, directives: dojo.store.api.Store.PutDirectives): any; + add(object: Object, directives?: dojo.store.api.Store.PutDirectives): any; /** * Retrieves an object by its identity * @@ -17176,7 +17176,7 @@ declare module dojo { * @param parent The object to find the children of. * @param options OptionalAdditional options to apply to the retrieval of the children. */ - getChildren(parent: Object, options: dojo.store.api.Store.QueryOptions): dojo.store.api.Store.QueryResults; + getChildren(parent: Object, options?: dojo.store.api.Store.QueryOptions): dojo.store.api.Store.QueryResults; /** * Returns an object's identity * @@ -17196,7 +17196,7 @@ declare module dojo { * @param object The object to store. * @param directives OptionalAdditional directives for storing objects. */ - put(object: Object, directives: dojo.store.api.Store.PutDirectives): any; + put(object: Object, directives?: dojo.store.api.Store.PutDirectives): any; /** * */ @@ -17208,7 +17208,7 @@ declare module dojo { * @param query The query to use for retrieving objects from the store. * @param options The optional arguments to apply to the resultset. */ - query(query: String, options: dojo.store.api.Store.QueryOptions): dojo.store.api.Store.QueryResults; + query(query: String, options?: dojo.store.api.Store.QueryOptions): dojo.store.api.Store.QueryResults; /** * Queries the store for objects. This does not alter the store, but returns a * set of data from the store. @@ -17216,7 +17216,7 @@ declare module dojo { * @param query The query to use for retrieving objects from the store. * @param options The optional arguments to apply to the resultset. */ - query(query: Object, options: dojo.store.api.Store.QueryOptions): dojo.store.api.Store.QueryResults; + query(query: Object, options?: dojo.store.api.Store.QueryOptions): dojo.store.api.Store.QueryResults; /** * Queries the store for objects. This does not alter the store, but returns a * set of data from the store. @@ -17224,7 +17224,7 @@ declare module dojo { * @param query The query to use for retrieving objects from the store. * @param options The optional arguments to apply to the resultset. */ - query(query: Function, options: dojo.store.api.Store.QueryOptions): dojo.store.api.Store.QueryResults; + query(query: Function, options?: dojo.store.api.Store.QueryOptions): dojo.store.api.Store.QueryResults; /** * */ @@ -17520,7 +17520,7 @@ declare module dojo { * @param date2 OptionalDate object. If not specified, the current Date is used. * @param portion OptionalA string indicating the "date" or "time" portion of a Date object.Compares both "date" and "time" by default. One of the following:"date", "time", "datetime" */ - compare(date1: Date, date2: Date, portion: String): number; + compare(date1: Date, date2?: Date, portion?: String): number; /** * Get the difference in a specific unit of time (e.g., number of * months, weeks, days, etc.) between two dates, rounded to the @@ -17530,7 +17530,7 @@ declare module dojo { * @param date2 OptionalDate object. If not specified, the current Date is used. * @param interval OptionalA string representing the interval. One of the following:"year", "month", "day", "hour", "minute", "second","millisecond", "quarter", "week", "weekday"Defaults to "day". */ - difference(date1: Date, date2: Date, interval: String): any; + difference(date1: Date, date2?: Date, interval?: String): any; /** * Returns the number of days in the month used by dateObject * @@ -17594,7 +17594,7 @@ declare module dojo { * @param formattedString A string such as 2005-06-30T08:05:00-07:00 or 2005-06-30 or T08:05:00 * @param defaultTime OptionalUsed for defaults for fields omitted in the formattedString.Uses 1970-01-01T00:00:00.0Z by default. */ - fromISOString(formattedString: String, defaultTime: number): any; + fromISOString(formattedString: String, defaultTime?: number): any; /** * Format a Date object as a string according a subset of the ISO-8601 standard * When options.selector is omitted, output follows RFC3339 @@ -17604,7 +17604,7 @@ declare module dojo { * @param dateObject A Date object * @param options OptionalAn object with the following properties:selector (String): "date" or "time" for partial formatting of the Date object.Both date and time will be formatted by default.zulu (Boolean): if true, UTC/GMT is used for a timezonemilliseconds (Boolean): if true, output milliseconds */ - toISOString(dateObject: Date, options: Object): any; + toISOString(dateObject: Date, options?: Object): any; } /** * Permalink: http://dojotoolkit.org/api/1.9/dojo/date/locale.html @@ -17640,7 +17640,7 @@ declare module dojo { * @param dateObject the date and/or time to be formatted. If a time only is formatted,the values in the year, month, and day fields are irrelevant. Theopposite is true when formatting only dates. * @param options OptionalAn object with the following properties:selector (String): choice of 'time','date' (default: date and time)formatLength (String): choice of long, short, medium or full (plus any custom additions). Defaults to 'short'datePattern (String): override pattern with this stringtimePattern (String): override pattern with this stringam (String): override strings for am in timespm (String): override strings for pm in timeslocale (String): override the locale used to determine formatting rulesfullYear (Boolean): (format only) use 4 digit years whenever 2 digit years are called forstrict (Boolean): (parse only) strict parsing, off by default */ - format(dateObject: Date, options: Object): any; + format(dateObject: Date, options?: Object): any; /** * Used to get localized strings from dojo.cldr for day or month names. * @@ -17649,14 +17649,14 @@ declare module dojo { * @param context Optional'standAlone' || 'format' (default) * @param locale Optionaloverride locale used to find the names */ - getNames(item: String, type: String, context: String, locale: String): any; + getNames(item: String, type: String, context?: String, locale?: String): any; /** * Determines if the date falls on a weekend, according to local custom. * * @param dateObject Optional * @param locale Optional */ - isWeekend(dateObject: Date, locale: String): boolean; + isWeekend(dateObject?: Date, locale?: String): boolean; /** * Convert a properly formatted string to a primitive Date object, * using locale-specific settings. @@ -17676,13 +17676,13 @@ declare module dojo { * @param value A string representation of a date * @param options OptionalAn object with the following properties:selector (String): choice of 'time','date' (default: date and time)formatLength (String): choice of long, short, medium or full (plus any custom additions). Defaults to 'short'datePattern (String): override pattern with this stringtimePattern (String): override pattern with this stringam (String): override strings for am in timespm (String): override strings for pm in timeslocale (String): override the locale used to determine formatting rulesfullYear (Boolean): (format only) use 4 digit years whenever 2 digit years are called forstrict (Boolean): (parse only) strict parsing, off by default */ - parse(value: String, options: Object): any; + parse(value: String, options?: Object): any; /** * Builds the regular needed to parse a localized date * * @param options OptionalAn object with the following properties:selector (String): choice of 'time','date' (default: date and time)formatLength (String): choice of long, short, medium or full (plus any custom additions). Defaults to 'short'datePattern (String): override pattern with this stringtimePattern (String): override pattern with this stringam (String): override strings for am in timespm (String): override strings for pm in timeslocale (String): override the locale used to determine formatting rulesfullYear (Boolean): (format only) use 4 digit years whenever 2 digit years are called forstrict (Boolean): (parse only) strict parsing, off by default */ - regexp(options: Object): any; + regexp(options?: Object): any; } module locale { /** @@ -17842,7 +17842,7 @@ declare module dojo { * * @param delay OptionalAmount of time to stall playing the hide animation */ - hide(delay: number): any; + hide(delay?: number): any; /** * The function that returns the dojo.Animation to hide the node * @@ -17854,7 +17854,7 @@ declare module dojo { * * @param delay OptionalAmount of time to stall playing the show animation */ - show(delay: number): any; + show(delay?: number): any; /** * The function that returns the dojo.Animation to show the node * @@ -17893,7 +17893,7 @@ declare module dojo { * * @param n Optional */ - backIn(n: number): number; + backIn(n?: number): number; /** * An easing function combining the effects of backIn and backOut * An easing function combining the effects of backIn and backOut. @@ -17902,7 +17902,7 @@ declare module dojo { * * @param n Optional */ - backInOut(n: number): number; + backInOut(n?: number): number; /** * An easing function that pops past the range briefly, and slowly comes back. * An easing function that pops past the range briefly, and slowly comes back. @@ -17912,55 +17912,55 @@ declare module dojo { * * @param n Optional */ - backOut(n: number): number; + backOut(n?: number): number; /** * An easing function that 'bounces' near the beginning of an Animation * * @param n Optional */ - bounceIn(n: number): number; + bounceIn(n?: number): number; /** * An easing function that 'bounces' at the beginning and end of the Animation * * @param n Optional */ - bounceInOut(n: number): number; + bounceInOut(n?: number): number; /** * An easing function that 'bounces' near the end of an Animation * * @param n Optional */ - bounceOut(n: number): number; + bounceOut(n?: number): number; /** * * @param n Optional */ - circIn(n: number): number; + circIn(n?: number): number; /** * * @param n Optional */ - circInOut(n: number): number; + circInOut(n?: number): number; /** * * @param n Optional */ - circOut(n: number): any; + circOut(n?: number): any; /** * * @param n Optional */ - cubicIn(n: number): any; + cubicIn(n?: number): any; /** * * @param n Optional */ - cubicInOut(n: number): number; + cubicInOut(n?: number): number; /** * * @param n Optional */ - cubicOut(n: number): number; + cubicOut(n?: number): number; /** * An easing function the elastically snaps from the start value * An easing function the elastically snaps from the start value @@ -17970,7 +17970,7 @@ declare module dojo { * * @param n Optional */ - elasticIn(n: number): number; + elasticIn(n?: number): number; /** * An easing function that elasticly snaps around the value, near * the beginning and end of the Animation. @@ -17982,7 +17982,7 @@ declare module dojo { * * @param n Optional */ - elasticInOut(n: number): number; + elasticInOut(n?: number): number; /** * An easing function that elasticly snaps around the target value, * near the end of the Animation @@ -17994,88 +17994,88 @@ declare module dojo { * * @param n Optional */ - elasticOut(n: number): number; + elasticOut(n?: number): number; /** * * @param n Optional */ - expoIn(n: number): any; + expoIn(n?: number): any; /** * * @param n Optional */ - expoInOut(n: number): number; + expoInOut(n?: number): number; /** * * @param n Optional */ - expoOut(n: number): number; + expoOut(n?: number): number; /** * A linear easing function * * @param n Optional */ - linear(n: number): number; + linear(n?: number): number; /** * * @param n Optional */ - quadIn(n: number): any; + quadIn(n?: number): any; /** * * @param n Optional */ - quadInOut(n: number): number; + quadInOut(n?: number): number; /** * * @param n Optional */ - quadOut(n: number): number; + quadOut(n?: number): number; /** * * @param n Optional */ - quartIn(n: number): any; + quartIn(n?: number): any; /** * * @param n Optional */ - quartInOut(n: number): number; + quartInOut(n?: number): number; /** * * @param n Optional */ - quartOut(n: number): number; + quartOut(n?: number): number; /** * * @param n Optional */ - quintIn(n: number): any; + quintIn(n?: number): any; /** * * @param n Optional */ - quintInOut(n: number): number; + quintInOut(n?: number): number; /** * * @param n Optional */ - quintOut(n: number): number; + quintOut(n?: number): number; /** * * @param n Optional */ - sineIn(n: number): number; + sineIn(n?: number): number; /** * * @param n Optional */ - sineInOut(n: number): number; + sineInOut(n?: number): number; /** * * @param n Optional */ - sineOut(n: number): any; + sineOut(n?: number): any; } } @@ -18242,7 +18242,7 @@ declare module dojo { * @param advice This is function to be called after the original method * @param receiveArguments OptionalIf this is set to true, the advice function receives the original arguments (from when the original mehtodwas called) rather than the return value of the original/previous method. */ - after(target: Object, methodName: String, advice: Function, receiveArguments: boolean): any; + after(target: Object, methodName: String, advice: Function, receiveArguments?: boolean): any; /** * The "around" export of the aspect module is a function that can be used to attach * "around" advice to a method. The advisor function is immediately executed when @@ -18419,18 +18419,18 @@ declare module dojo { * @param value the number to be formatted. * @param options Optional */ - format(value: number, options: dojo.currency.__FormatOptions): any; + format(value: number, options?: dojo.currency.__FormatOptions): any; /** * * @param expression * @param options OptionalAn object with the following properties:type (String, optional): Should not be set. Value is assumed to be currency.currency (String, optional): an ISO4217 currency code, a three letter sequence like "USD".For use with dojo.currency only.symbol (String, optional): localized currency symbol. The default will be looked up in table of supported currencies in dojo.cldrA ISO4217 currency code will be used if not found.places (Number, optional): fixed number of decimal places to accept. The default is determined based on which currency is used.fractional (Boolean|Array, optional): Whether to include the fractional portion, where the number of decimal places are implied by the currencyor explicit 'places' parameter. The value [true,false] makes the fractional portion optional.By default for currencies, it the fractional portion is optional.pattern (String, optional): override formatting patternwith this string. Default value is based on locale. Overriding this property will defeatlocalization. Literal characters in patterns are not supported.locale (String, optional): override the locale used to determine formatting rulesstrict (Boolean, optional): strict parsing, false by default. Strict parsing requires input as produced by the format() method.Non-strict is more permissive, e.g. flexible on white space, omitting thousands separators */ - parse(expression: String, options: Object): any; + parse(expression: String, options?: Object): any; /** * * @param options OptionalAn object with the following properties:pattern (String, optional): override formatting patternwith this string. Default value is based on locale. Overriding this property will defeatlocalization.type (String, optional): choose a format type based on the locale from the following:decimal, scientific (not yet supported), percent, currency. decimal by default.locale (String, optional): override the locale used to determine formatting rulesstrict (Boolean, optional): strict parsing, false by default. Strict parsing requires input as produced by the format() method.Non-strict is more permissive, e.g. flexible on white space, omitting thousands separatorsplaces (Number|String, optional): number of decimal places to accept: Infinity, a positive number, ora range "n,m". Defined by pattern or Infinity if pattern not provided. */ - regexp(options: Object): any; + regexp(options?: Object): any; } module currency { /** @@ -18685,7 +18685,7 @@ declare module dojo { * @param name the name of the attribute to set, or a hash of key-value pairs to set. * @param value Optionalthe value to set for the attribute, if the name is a string. */ - set(node: HTMLElement, name: String, value: String): any; + set(node: HTMLElement, name: String, value?: String): any; /** * Sets an attribute on an HTML element. * Handles normalized setting of attributes on DOM Nodes. @@ -18704,7 +18704,7 @@ declare module dojo { * @param name the name of the attribute to set, or a hash of key-value pairs to set. * @param value Optionalthe value to set for the attribute, if the name is a string. */ - set(node: String, name: String, value: String): any; + set(node: String, name: String, value?: String): any; /** * Sets an attribute on an HTML element. * Handles normalized setting of attributes on DOM Nodes. @@ -18723,7 +18723,7 @@ declare module dojo { * @param name the name of the attribute to set, or a hash of key-value pairs to set. * @param value Optionalthe value to set for the attribute, if the name is a string. */ - set(node: HTMLElement, name: Object, value: String): any; + set(node: HTMLElement, name: Object, value?: String): any; /** * Sets an attribute on an HTML element. * Handles normalized setting of attributes on DOM Nodes. @@ -18742,7 +18742,7 @@ declare module dojo { * @param name the name of the attribute to set, or a hash of key-value pairs to set. * @param value Optionalthe value to set for the attribute, if the name is a string. */ - set(node: String, name: Object, value: String): any; + set(node: String, name: Object, value?: String): any; } /** * Permalink: http://dojotoolkit.org/api/1.9/dojo/dom-class.html @@ -18806,7 +18806,7 @@ declare module dojo { * @param node String ID or DomNode reference to remove the class from. * @param classStr OptionalAn optional String class name to remove, or several space-separatedclass names, or an array of class names. If omitted, all class nameswill be deleted. */ - remove(node: String, classStr: String): void; + remove(node: String, classStr?: String): void; /** * Removes the specified classes from node. No contains() * check is required. @@ -18814,7 +18814,7 @@ declare module dojo { * @param node String ID or DomNode reference to remove the class from. * @param classStr OptionalAn optional String class name to remove, or several space-separatedclass names, or an array of class names. If omitted, all class nameswill be deleted. */ - remove(node: HTMLElement, classStr: String): void; + remove(node: HTMLElement, classStr?: String): void; /** * Removes the specified classes from node. No contains() * check is required. @@ -18822,7 +18822,7 @@ declare module dojo { * @param node String ID or DomNode reference to remove the class from. * @param classStr OptionalAn optional String class name to remove, or several space-separatedclass names, or an array of class names. If omitted, all class nameswill be deleted. */ - remove(node: String, classStr: any[]): void; + remove(node: String, classStr?: any[]): void; /** * Removes the specified classes from node. No contains() * check is required. @@ -18830,7 +18830,7 @@ declare module dojo { * @param node String ID or DomNode reference to remove the class from. * @param classStr OptionalAn optional String class name to remove, or several space-separatedclass names, or an array of class names. If omitted, all class nameswill be deleted. */ - remove(node: HTMLElement, classStr: any[]): void; + remove(node: HTMLElement, classStr?: any[]): void; /** * Replaces one or more classes on a node if not present. * Operates more quickly than calling dojo.removeClass and dojo.addClass @@ -18839,7 +18839,7 @@ declare module dojo { * @param addClassStr A String class name to add, or several space-separated class names,or an array of class names. * @param removeClassStr OptionalA String class name to remove, or several space-separated class names,or an array of class names. */ - replace(node: String, addClassStr: String, removeClassStr: String): void; + replace(node: String, addClassStr: String, removeClassStr?: String): void; /** * Replaces one or more classes on a node if not present. * Operates more quickly than calling dojo.removeClass and dojo.addClass @@ -18848,7 +18848,7 @@ declare module dojo { * @param addClassStr A String class name to add, or several space-separated class names,or an array of class names. * @param removeClassStr OptionalA String class name to remove, or several space-separated class names,or an array of class names. */ - replace(node: HTMLElement, addClassStr: String, removeClassStr: String): void; + replace(node: HTMLElement, addClassStr: String, removeClassStr?: String): void; /** * Replaces one or more classes on a node if not present. * Operates more quickly than calling dojo.removeClass and dojo.addClass @@ -18857,7 +18857,7 @@ declare module dojo { * @param addClassStr A String class name to add, or several space-separated class names,or an array of class names. * @param removeClassStr OptionalA String class name to remove, or several space-separated class names,or an array of class names. */ - replace(node: String, addClassStr: any[], removeClassStr: String): void; + replace(node: String, addClassStr: any[], removeClassStr?: String): void; /** * Replaces one or more classes on a node if not present. * Operates more quickly than calling dojo.removeClass and dojo.addClass @@ -18866,7 +18866,7 @@ declare module dojo { * @param addClassStr A String class name to add, or several space-separated class names,or an array of class names. * @param removeClassStr OptionalA String class name to remove, or several space-separated class names,or an array of class names. */ - replace(node: HTMLElement, addClassStr: any[], removeClassStr: String): void; + replace(node: HTMLElement, addClassStr: any[], removeClassStr?: String): void; /** * Replaces one or more classes on a node if not present. * Operates more quickly than calling dojo.removeClass and dojo.addClass @@ -18875,7 +18875,7 @@ declare module dojo { * @param addClassStr A String class name to add, or several space-separated class names,or an array of class names. * @param removeClassStr OptionalA String class name to remove, or several space-separated class names,or an array of class names. */ - replace(node: String, addClassStr: String, removeClassStr: any[]): void; + replace(node: String, addClassStr: String, removeClassStr?: any[]): void; /** * Replaces one or more classes on a node if not present. * Operates more quickly than calling dojo.removeClass and dojo.addClass @@ -18884,7 +18884,7 @@ declare module dojo { * @param addClassStr A String class name to add, or several space-separated class names,or an array of class names. * @param removeClassStr OptionalA String class name to remove, or several space-separated class names,or an array of class names. */ - replace(node: HTMLElement, addClassStr: String, removeClassStr: any[]): void; + replace(node: HTMLElement, addClassStr: String, removeClassStr?: any[]): void; /** * Replaces one or more classes on a node if not present. * Operates more quickly than calling dojo.removeClass and dojo.addClass @@ -18893,7 +18893,7 @@ declare module dojo { * @param addClassStr A String class name to add, or several space-separated class names,or an array of class names. * @param removeClassStr OptionalA String class name to remove, or several space-separated class names,or an array of class names. */ - replace(node: String, addClassStr: any[], removeClassStr: any[]): void; + replace(node: String, addClassStr: any[], removeClassStr?: any[]): void; /** * Replaces one or more classes on a node if not present. * Operates more quickly than calling dojo.removeClass and dojo.addClass @@ -18902,7 +18902,7 @@ declare module dojo { * @param addClassStr A String class name to add, or several space-separated class names,or an array of class names. * @param removeClassStr OptionalA String class name to remove, or several space-separated class names,or an array of class names. */ - replace(node: HTMLElement, addClassStr: any[], removeClassStr: any[]): void; + replace(node: HTMLElement, addClassStr: any[], removeClassStr?: any[]): void; /** * Adds a class to node if not present, or removes if present. * Pass a boolean condition if you want to explicitly add or remove. @@ -18912,7 +18912,7 @@ declare module dojo { * @param classStr A String class name to toggle, or several space-separated class names,or an array of class names. * @param condition OptionalIf passed, true means to add the class, false means to remove.Otherwise dojo.hasClass(node, classStr) is used to detect the class presence. */ - toggle(node: String, classStr: String, condition: boolean): boolean; + toggle(node: String, classStr: String, condition?: boolean): boolean; /** * Adds a class to node if not present, or removes if present. * Pass a boolean condition if you want to explicitly add or remove. @@ -18922,7 +18922,7 @@ declare module dojo { * @param classStr A String class name to toggle, or several space-separated class names,or an array of class names. * @param condition OptionalIf passed, true means to add the class, false means to remove.Otherwise dojo.hasClass(node, classStr) is used to detect the class presence. */ - toggle(node: HTMLElement, classStr: String, condition: boolean): boolean; + toggle(node: HTMLElement, classStr: String, condition?: boolean): boolean; /** * Adds a class to node if not present, or removes if present. * Pass a boolean condition if you want to explicitly add or remove. @@ -18932,7 +18932,7 @@ declare module dojo { * @param classStr A String class name to toggle, or several space-separated class names,or an array of class names. * @param condition OptionalIf passed, true means to add the class, false means to remove.Otherwise dojo.hasClass(node, classStr) is used to detect the class presence. */ - toggle(node: String, classStr: any[], condition: boolean): boolean; + toggle(node: String, classStr: any[], condition?: boolean): boolean; /** * Adds a class to node if not present, or removes if present. * Pass a boolean condition if you want to explicitly add or remove. @@ -18942,7 +18942,7 @@ declare module dojo { * @param classStr A String class name to toggle, or several space-separated class names,or an array of class names. * @param condition OptionalIf passed, true means to add the class, false means to remove.Otherwise dojo.hasClass(node, classStr) is used to detect the class presence. */ - toggle(node: HTMLElement, classStr: any[], condition: boolean): boolean; + toggle(node: HTMLElement, classStr: any[], condition?: boolean): boolean; } /** * Permalink: http://dojotoolkit.org/api/1.9/dojo/dom-form.html @@ -18978,7 +18978,7 @@ declare module dojo { * @param formNode * @param prettyPrint Optional */ - toJson(formNode: HTMLElement, prettyPrint: boolean): String; + toJson(formNode: HTMLElement, prettyPrint?: boolean): String; /** * Create a serialized JSON string from a form node or string * ID identifying the form to serialize @@ -18986,7 +18986,7 @@ declare module dojo { * @param formNode * @param prettyPrint Optional */ - toJson(formNode: String, prettyPrint: boolean): String; + toJson(formNode: String, prettyPrint?: boolean): String; /** * Serialize a form node to a JavaScript object. * Returns the values encoded in an HTML form as @@ -19046,7 +19046,7 @@ declare module dojo { * @param refNode OptionalOptional reference node. Used by dojo.place to place the newly creatednode somewhere in the dom relative to refNode. Can be a DomNode referenceor String ID of a node. * @param pos OptionalOptional positional reference. Defaults to "last" by way of dojo.place,though can be set to "first","after","before","last", "replace" or "only"to further control the placement of the new node relative to the refNode.'refNode' is required if a 'pos' is specified. */ - create(tag: HTMLElement, attrs: Object, refNode: HTMLElement, pos: String): any; + create(tag: HTMLElement, attrs: Object, refNode?: HTMLElement, pos?: String): any; /** * Create an element, allowing for optional attribute decoration * and placement. @@ -19065,7 +19065,7 @@ declare module dojo { * @param refNode OptionalOptional reference node. Used by dojo.place to place the newly creatednode somewhere in the dom relative to refNode. Can be a DomNode referenceor String ID of a node. * @param pos OptionalOptional positional reference. Defaults to "last" by way of dojo.place,though can be set to "first","after","before","last", "replace" or "only"to further control the placement of the new node relative to the refNode.'refNode' is required if a 'pos' is specified. */ - create(tag: String, attrs: Object, refNode: HTMLElement, pos: String): any; + create(tag: String, attrs: Object, refNode?: HTMLElement, pos?: String): any; /** * Create an element, allowing for optional attribute decoration * and placement. @@ -19084,7 +19084,7 @@ declare module dojo { * @param refNode OptionalOptional reference node. Used by dojo.place to place the newly creatednode somewhere in the dom relative to refNode. Can be a DomNode referenceor String ID of a node. * @param pos OptionalOptional positional reference. Defaults to "last" by way of dojo.place,though can be set to "first","after","before","last", "replace" or "only"to further control the placement of the new node relative to the refNode.'refNode' is required if a 'pos' is specified. */ - create(tag: HTMLElement, attrs: Object, refNode: String, pos: String): any; + create(tag: HTMLElement, attrs: Object, refNode?: String, pos?: String): any; /** * Create an element, allowing for optional attribute decoration * and placement. @@ -19103,7 +19103,7 @@ declare module dojo { * @param refNode OptionalOptional reference node. Used by dojo.place to place the newly creatednode somewhere in the dom relative to refNode. Can be a DomNode referenceor String ID of a node. * @param pos OptionalOptional positional reference. Defaults to "last" by way of dojo.place,though can be set to "first","after","before","last", "replace" or "only"to further control the placement of the new node relative to the refNode.'refNode' is required if a 'pos' is specified. */ - create(tag: String, attrs: Object, refNode: String, pos: String): any; + create(tag: String, attrs: Object, refNode?: String, pos?: String): any; /** * Removes a node from its parent, clobbering it and all of its * children. @@ -19142,7 +19142,7 @@ declare module dojo { * @param refNode id or node reference to use as basis for placement * @param position Optionalstring noting the position of node relative to refNode or anumber indicating the location in the childNodes collection of refNode.Accepted string values are:beforeafterreplaceonlyfirstlast"first" and "last" indicate positions as children of refNode, "replace" replaces refNode,"only" replaces all children. position defaults to "last" if not specified */ - place(node: HTMLElement, refNode: HTMLElement, position: String): HTMLElement; + place(node: HTMLElement, refNode: HTMLElement, position?: String): HTMLElement; /** * Attempt to insert node into the DOM, choosing from various positioning options. * Returns the first argument resolved to a DOM node. @@ -19151,7 +19151,7 @@ declare module dojo { * @param refNode id or node reference to use as basis for placement * @param position Optionalstring noting the position of node relative to refNode or anumber indicating the location in the childNodes collection of refNode.Accepted string values are:beforeafterreplaceonlyfirstlast"first" and "last" indicate positions as children of refNode, "replace" replaces refNode,"only" replaces all children. position defaults to "last" if not specified */ - place(node: String, refNode: HTMLElement, position: String): HTMLElement; + place(node: String, refNode: HTMLElement, position?: String): HTMLElement; /** * Attempt to insert node into the DOM, choosing from various positioning options. * Returns the first argument resolved to a DOM node. @@ -19160,7 +19160,7 @@ declare module dojo { * @param refNode id or node reference to use as basis for placement * @param position Optionalstring noting the position of node relative to refNode or anumber indicating the location in the childNodes collection of refNode.Accepted string values are:beforeafterreplaceonlyfirstlast"first" and "last" indicate positions as children of refNode, "replace" replaces refNode,"only" replaces all children. position defaults to "last" if not specified */ - place(node: HTMLElement, refNode: String, position: String): HTMLElement; + place(node: HTMLElement, refNode: String, position?: String): HTMLElement; /** * Attempt to insert node into the DOM, choosing from various positioning options. * Returns the first argument resolved to a DOM node. @@ -19169,7 +19169,7 @@ declare module dojo { * @param refNode id or node reference to use as basis for placement * @param position Optionalstring noting the position of node relative to refNode or anumber indicating the location in the childNodes collection of refNode.Accepted string values are:beforeafterreplaceonlyfirstlast"first" and "last" indicate positions as children of refNode, "replace" replaces refNode,"only" replaces all children. position defaults to "last" if not specified */ - place(node: String, refNode: String, position: String): HTMLElement; + place(node: String, refNode: String, position?: String): HTMLElement; /** * Attempt to insert node into the DOM, choosing from various positioning options. * Returns the first argument resolved to a DOM node. @@ -19178,7 +19178,7 @@ declare module dojo { * @param refNode id or node reference to use as basis for placement * @param position Optionalstring noting the position of node relative to refNode or anumber indicating the location in the childNodes collection of refNode.Accepted string values are:beforeafterreplaceonlyfirstlast"first" and "last" indicate positions as children of refNode, "replace" replaces refNode,"only" replaces all children. position defaults to "last" if not specified */ - place(node: HTMLElement, refNode: HTMLElement, position: number): HTMLElement; + place(node: HTMLElement, refNode: HTMLElement, position?: number): HTMLElement; /** * Attempt to insert node into the DOM, choosing from various positioning options. * Returns the first argument resolved to a DOM node. @@ -19187,7 +19187,7 @@ declare module dojo { * @param refNode id or node reference to use as basis for placement * @param position Optionalstring noting the position of node relative to refNode or anumber indicating the location in the childNodes collection of refNode.Accepted string values are:beforeafterreplaceonlyfirstlast"first" and "last" indicate positions as children of refNode, "replace" replaces refNode,"only" replaces all children. position defaults to "last" if not specified */ - place(node: String, refNode: HTMLElement, position: number): HTMLElement; + place(node: String, refNode: HTMLElement, position?: number): HTMLElement; /** * Attempt to insert node into the DOM, choosing from various positioning options. * Returns the first argument resolved to a DOM node. @@ -19196,7 +19196,7 @@ declare module dojo { * @param refNode id or node reference to use as basis for placement * @param position Optionalstring noting the position of node relative to refNode or anumber indicating the location in the childNodes collection of refNode.Accepted string values are:beforeafterreplaceonlyfirstlast"first" and "last" indicate positions as children of refNode, "replace" replaces refNode,"only" replaces all children. position defaults to "last" if not specified */ - place(node: HTMLElement, refNode: String, position: number): HTMLElement; + place(node: HTMLElement, refNode: String, position?: number): HTMLElement; /** * Attempt to insert node into the DOM, choosing from various positioning options. * Returns the first argument resolved to a DOM node. @@ -19205,14 +19205,14 @@ declare module dojo { * @param refNode id or node reference to use as basis for placement * @param position Optionalstring noting the position of node relative to refNode or anumber indicating the location in the childNodes collection of refNode.Accepted string values are:beforeafterreplaceonlyfirstlast"first" and "last" indicate positions as children of refNode, "replace" replaces refNode,"only" replaces all children. position defaults to "last" if not specified */ - place(node: String, refNode: String, position: number): HTMLElement; + place(node: String, refNode: String, position?: number): HTMLElement; /** * instantiates an HTML fragment returning the corresponding DOM. * * @param frag the HTML fragment * @param doc Optionaloptional document to use when creating DOM nodes, defaults todojo/_base/window.doc if not specified. */ - toDom(frag: String, doc: HTMLDocument): any; + toDom(frag: String, doc?: HTMLDocument): any; } /** * Permalink: http://dojotoolkit.org/api/1.9/dojo/dom-prop.html @@ -19258,7 +19258,7 @@ declare module dojo { * @param name the name of the property to set, or a hash object to setmultiple properties at once. * @param value OptionalThe value to set for the property */ - set(node: HTMLElement, name: String, value: String): any; + set(node: HTMLElement, name: String, value?: String): any; /** * Sets a property on an HTML element. * Handles normalized setting of properties on DOM nodes. @@ -19277,7 +19277,7 @@ declare module dojo { * @param name the name of the property to set, or a hash object to setmultiple properties at once. * @param value OptionalThe value to set for the property */ - set(node: String, name: String, value: String): any; + set(node: String, name: String, value?: String): any; /** * Sets a property on an HTML element. * Handles normalized setting of properties on DOM nodes. @@ -19296,7 +19296,7 @@ declare module dojo { * @param name the name of the property to set, or a hash object to setmultiple properties at once. * @param value OptionalThe value to set for the property */ - set(node: HTMLElement, name: Object, value: String): any; + set(node: HTMLElement, name: Object, value?: String): any; /** * Sets a property on an HTML element. * Handles normalized setting of properties on DOM nodes. @@ -19315,7 +19315,7 @@ declare module dojo { * @param name the name of the property to set, or a hash object to setmultiple properties at once. * @param value OptionalThe value to set for the property */ - set(node: String, name: Object, value: String): any; + set(node: String, name: Object, value?: String): any; } module dom_prop { /** @@ -19414,28 +19414,28 @@ declare module dojo { * @param name * @param value Optional */ - set(node: HTMLElement, name: String, value: String): any; + set(node: HTMLElement, name: String, value?: String): any; /** * * @param node * @param name * @param value Optional */ - set(node: String, name: String, value: String): any; + set(node: String, name: String, value?: String): any; /** * * @param node * @param name * @param value Optional */ - set(node: HTMLElement, name: Object, value: String): any; + set(node: HTMLElement, name: Object, value?: String): any; /** * * @param node * @param name * @param value Optional */ - set(node: String, name: Object, value: String): any; + set(node: String, name: Object, value?: String): any; /** * converts style value to pixels on IE or return a numeric value. * @@ -19460,7 +19460,7 @@ declare module dojo { * * @param doc OptionalOptional document to query. If unspecified, use win.doc. */ - docScroll(doc: HTMLDocument): Object; + docScroll(doc?: HTMLDocument): Object; /** * In RTL direction, scrollLeft should be a negative value, but IE * returns a positive one. All codes using documentElement.scrollLeft @@ -19470,7 +19470,7 @@ declare module dojo { * @param scrollLeft * @param doc OptionalOptional document to query. If unspecified, use win.doc. */ - fixIeBiDiScrollLeft(scrollLeft: number, doc: HTMLDocument): number; + fixIeBiDiScrollLeft(scrollLeft: number, doc?: HTMLDocument): number; /** * returns an object with properties useful for noting the border * dimensions. @@ -19484,7 +19484,7 @@ declare module dojo { * @param node * @param computedStyle OptionalThis parameter accepts computed styles object.If this parameter is omitted, the functions will calldojo/dom-style.getComputedStyle to get one. It is a better way, callingdojo/dom-style.getComputedStyle once, and then pass the reference to thiscomputedStyle parameter. Wherever possible, reuse the returnedobject of dojo/dom-style.getComputedStyle(). */ - getBorderExtents(node: HTMLElement, computedStyle: Object): Object; + getBorderExtents(node: HTMLElement, computedStyle?: Object): Object; /** * Returns an object that encodes the width, height, left and top * positions of the node's content box, irrespective of the @@ -19493,7 +19493,7 @@ declare module dojo { * @param node * @param computedStyle OptionalThis parameter accepts computed styles object.If this parameter is omitted, the functions will calldojo/dom-style.getComputedStyle to get one. It is a better way, callingdojo/dom-style.getComputedStyle once, and then pass the reference to thiscomputedStyle parameter. Wherever possible, reuse the returnedobject of dojo/dom-style.getComputedStyle(). */ - getContentBox(node: HTMLElement, computedStyle: Object): Object; + getContentBox(node: HTMLElement, computedStyle?: Object): Object; /** * returns the offset in x and y from the document body to the * visual edge of the page for IE @@ -19513,7 +19513,7 @@ declare module dojo { * * @param doc OptionalOptional document to query. If unspecified, use win.doc. */ - getIeDocumentElementOffset(doc: HTMLDocument): Object; + getIeDocumentElementOffset(doc?: HTMLDocument): Object; /** * returns an object that encodes the width, height, left and top * positions of the node's margin box. @@ -19521,7 +19521,7 @@ declare module dojo { * @param node * @param computedStyle OptionalThis parameter accepts computed styles object.If this parameter is omitted, the functions will calldojo/dom-style.getComputedStyle to get one. It is a better way, callingdojo/dom-style.getComputedStyle once, and then pass the reference to thiscomputedStyle parameter. Wherever possible, reuse the returnedobject of dojo/dom-style.getComputedStyle(). */ - getMarginBox(node: HTMLElement, computedStyle: Object): Object; + getMarginBox(node: HTMLElement, computedStyle?: Object): Object; /** * returns object with properties useful for box fitting with * regards to box margins (i.e., the outer-box). @@ -19536,7 +19536,7 @@ declare module dojo { * @param node * @param computedStyle OptionalThis parameter accepts computed styles object.If this parameter is omitted, the functions will calldojo/dom-style.getComputedStyle to get one. It is a better way, callingdojo/dom-style.getComputedStyle once, and then pass the reference to thiscomputedStyle parameter. Wherever possible, reuse the returnedobject of dojo/dom-style.getComputedStyle(). */ - getMarginExtents(node: HTMLElement, computedStyle: Object): Object; + getMarginExtents(node: HTMLElement, computedStyle?: Object): Object; /** * returns an object that encodes the width and height of * the node's margin box @@ -19544,7 +19544,7 @@ declare module dojo { * @param node * @param computedStyle OptionalThis parameter accepts computed styles object.If this parameter is omitted, the functions will calldojo/dom-style.getComputedStyle to get one. It is a better way, callingdojo/dom-style.getComputedStyle once, and then pass the reference to thiscomputedStyle parameter. Wherever possible, reuse the returnedobject of dojo/dom-style.getComputedStyle(). */ - getMarginSize(node: HTMLElement, computedStyle: Object): Object; + getMarginSize(node: HTMLElement, computedStyle?: Object): Object; /** * returns an object that encodes the width and height of * the node's margin box @@ -19552,7 +19552,7 @@ declare module dojo { * @param node * @param computedStyle OptionalThis parameter accepts computed styles object.If this parameter is omitted, the functions will calldojo/dom-style.getComputedStyle to get one. It is a better way, callingdojo/dom-style.getComputedStyle once, and then pass the reference to thiscomputedStyle parameter. Wherever possible, reuse the returnedobject of dojo/dom-style.getComputedStyle(). */ - getMarginSize(node: String, computedStyle: Object): Object; + getMarginSize(node: String, computedStyle?: Object): Object; /** * Returns object with properties useful for box fitting with * regards to padding. @@ -19566,7 +19566,7 @@ declare module dojo { * @param node * @param computedStyle OptionalThis parameter accepts computed styles object.If this parameter is omitted, the functions will calldojo/dom-style.getComputedStyle to get one. It is a better way, callingdojo/dom-style.getComputedStyle once, and then pass the reference to thiscomputedStyle parameter. Wherever possible, reuse the returnedobject of dojo/dom-style.getComputedStyle(). */ - getPadBorderExtents(node: HTMLElement, computedStyle: Object): Object; + getPadBorderExtents(node: HTMLElement, computedStyle?: Object): Object; /** * Returns object with special values specifically useful for node * fitting. @@ -19584,13 +19584,13 @@ declare module dojo { * @param node * @param computedStyle OptionalThis parameter accepts computed styles object.If this parameter is omitted, the functions will calldojo/dom-style.getComputedStyle to get one. It is a better way, callingdojo/dom-style.getComputedStyle once, and then pass the reference to thiscomputedStyle parameter. Wherever possible, reuse the returnedobject of dojo/dom-style.getComputedStyle(). */ - getPadExtents(node: HTMLElement, computedStyle: Object): Object; + getPadExtents(node: HTMLElement, computedStyle?: Object): Object; /** * Returns true if the current language is left-to-right, and false otherwise. * * @param doc OptionalOptional document to query. If unspecified, use win.doc. */ - isBodyLtr(doc: HTMLDocument): boolean; + isBodyLtr(doc?: HTMLDocument): boolean; /** * Normalizes the geometry of a DOM event, normalizing the pageX, pageY, * offsetX, offsetY, layerX, and layerX properties @@ -19638,7 +19638,7 @@ declare module dojo { * @param box hash with optional "w", and "h" properties for "width", and "height"respectively. All specified properties should have numeric values in whole pixels. * @param computedStyle OptionalThis parameter accepts computed styles object.If this parameter is omitted, the functions will calldojo/dom-style.getComputedStyle to get one. It is a better way, callingdojo/dom-style.getComputedStyle once, and then pass the reference to thiscomputedStyle parameter. Wherever possible, reuse the returnedobject of dojo/dom-style.getComputedStyle(). */ - setContentSize(node: HTMLElement, box: Object, computedStyle: Object): void; + setContentSize(node: HTMLElement, box: Object, computedStyle?: Object): void; /** * sets the size of the node's margin box and placement * (left/top), irrespective of box model. Think of it as a @@ -19649,7 +19649,7 @@ declare module dojo { * @param box hash with optional "l", "t", "w", and "h" properties for "left", "right", "width", and "height"respectively. All specified properties should have numeric values in whole pixels. * @param computedStyle OptionalThis parameter accepts computed styles object.If this parameter is omitted, the functions will calldojo/dom-style.getComputedStyle to get one. It is a better way, callingdojo/dom-style.getComputedStyle once, and then pass the reference to thiscomputedStyle parameter. Wherever possible, reuse the returnedobject of dojo/dom-style.getComputedStyle(). */ - setMarginBox(node: HTMLElement, box: Object, computedStyle: Object): void; + setMarginBox(node: HTMLElement, box: Object, computedStyle?: Object): void; } /** * Permalink: http://dojotoolkit.org/api/1.9/dojo/gears.html @@ -19698,7 +19698,7 @@ declare module dojo { * @param cont the content to be set on the parent element.This can be an html string, a node reference or a NodeList, dojo/NodeList, Array or other enumerable list of nodes * @param params OptionalOptional flags/properties to configure the content-setting. See dojo/html/_ContentSetter */ - set(node: HTMLElement, cont: String, params: Object): any; + set(node: HTMLElement, cont: String, params?: Object): any; /** * inserts (replaces) the given content into the given node. dojo/dom-construct.place(cont, node, "only") * may be a better choice for simple HTML insertion. @@ -19715,7 +19715,7 @@ declare module dojo { * @param cont the content to be set on the parent element.This can be an html string, a node reference or a NodeList, dojo/NodeList, Array or other enumerable list of nodes * @param params OptionalOptional flags/properties to configure the content-setting. See dojo/html/_ContentSetter */ - set(node: HTMLElement, cont: HTMLElement, params: Object): any; + set(node: HTMLElement, cont: HTMLElement, params?: Object): any; /** * inserts (replaces) the given content into the given node. dojo/dom-construct.place(cont, node, "only") * may be a better choice for simple HTML insertion. @@ -19732,7 +19732,7 @@ declare module dojo { * @param cont the content to be set on the parent element.This can be an html string, a node reference or a NodeList, dojo/NodeList, Array or other enumerable list of nodes * @param params OptionalOptional flags/properties to configure the content-setting. See dojo/html/_ContentSetter */ - set(node: HTMLElement, cont: NodeList, params: Object): any; + set(node: HTMLElement, cont: NodeList, params?: Object): any; } module html { /** @@ -19800,21 +19800,21 @@ declare module dojo { * @param cont OptionalAn html string, node or enumerable list of nodes for insertion into the domIf not provided, the object's content property will be used * @param params Optional */ - set(cont: String, params: Object): any; + set(cont: String, params?: Object): any; /** * front-end to the set-content sequence * * @param cont OptionalAn html string, node or enumerable list of nodes for insertion into the domIf not provided, the object's content property will be used * @param params Optional */ - set(cont: HTMLElement, params: Object): any; + set(cont: HTMLElement, params?: Object): any; /** * front-end to the set-content sequence * * @param cont OptionalAn html string, node or enumerable list of nodes for insertion into the domIf not provided, the object's content property will be used * @param params Optional */ - set(cont: NodeList, params: Object): any; + set(cont: NodeList, params?: Object): any; /** * sets the content on the node * @@ -20473,7 +20473,7 @@ declare module dojo { * @param expression A string representation of a Number * @param options OptionalAn object with the following properties:pattern (String, optional): override formatting patternwith this string. Default value is based on locale. Overriding this property will defeatlocalization. Literal characters in patterns are not supported.type (String, optional): choose a format type based on the locale from the following:decimal, scientific (not yet supported), percent, currency. decimal by default.locale (String, optional): override the locale used to determine formatting rulesstrict (Boolean, optional): strict parsing, false by default. Strict parsing requires input as produced by the format() method.Non-strict is more permissive, e.g. flexible on white space, omitting thousands separatorsfractional (Boolean|Array, optional): Whether to include the fractional portion, where the number of decimal places are implied by patternor explicit 'places' parameter. The value [true,false] makes the fractional portion optional. */ - parse(expression: String, options: Object): number; + parse(expression: String, options?: Object): number; /** * Builds the regular needed to parse a number * Returns regular expression with positive and negative match, group @@ -20493,7 +20493,7 @@ declare module dojo { * @param places OptionalThe number of decimal places where rounding takes place. Defaults to 0 for whole rounding.Must be non-negative. * @param increment OptionalRounds next place to nearest value of increment/10. 10 by default. */ - round(value: number, places: number, increment: number): number; + round(value: number, places?: number, increment?: number): number; } module number_ { /** @@ -20738,7 +20738,7 @@ declare module dojo { * @param scripts OptionalArray of + */ + export enum SandboxMode { EMULATED, IFRAME, NATIVE } + + } +} + +declare var HtmlService: GoogleAppsScript.HTML.HtmlService; \ No newline at end of file diff --git a/google-apps-script/google-apps-script.jdbc.d.ts b/google-apps-script/google-apps-script.jdbc.d.ts new file mode 100644 index 0000000000..d4a90b8ba2 --- /dev/null +++ b/google-apps-script/google-apps-script.jdbc.d.ts @@ -0,0 +1,902 @@ +// Type definitions for Google Apps Script 2015-11-12 +// Project: https://developers.google.com/apps-script/ +// Definitions by: motemen +// Definitions: https://github.com/DefinitelyTyped/DefinitelyTyped + +/// +/// + +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; \ No newline at end of file diff --git a/google-apps-script/google-apps-script.language.d.ts b/google-apps-script/google-apps-script.language.d.ts new file mode 100644 index 0000000000..2e5f19ad70 --- /dev/null +++ b/google-apps-script/google-apps-script.language.d.ts @@ -0,0 +1,25 @@ +// Type definitions for Google Apps Script 2015-11-12 +// Project: https://developers.google.com/apps-script/ +// Definitions by: motemen +// Definitions: https://github.com/DefinitelyTyped/DefinitelyTyped + +/// + +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; \ No newline at end of file diff --git a/google-apps-script/google-apps-script.lock.d.ts b/google-apps-script/google-apps-script.lock.d.ts new file mode 100644 index 0000000000..c0689e5df2 --- /dev/null +++ b/google-apps-script/google-apps-script.lock.d.ts @@ -0,0 +1,60 @@ +// Type definitions for Google Apps Script 2015-11-12 +// Project: https://developers.google.com/apps-script/ +// Definitions by: motemen +// Definitions: https://github.com/DefinitelyTyped/DefinitelyTyped + +/// + +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; \ No newline at end of file diff --git a/google-apps-script/google-apps-script.mail.d.ts b/google-apps-script/google-apps-script.mail.d.ts new file mode 100644 index 0000000000..473c7d17a4 --- /dev/null +++ b/google-apps-script/google-apps-script.mail.d.ts @@ -0,0 +1,31 @@ +// Type definitions for Google Apps Script 2015-11-12 +// Project: https://developers.google.com/apps-script/ +// Definitions by: motemen +// Definitions: https://github.com/DefinitelyTyped/DefinitelyTyped + +/// + +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; \ No newline at end of file diff --git a/google-apps-script/google-apps-script.maps.d.ts b/google-apps-script/google-apps-script.maps.d.ts new file mode 100644 index 0000000000..6a5c45c8c0 --- /dev/null +++ b/google-apps-script/google-apps-script.maps.d.ts @@ -0,0 +1,319 @@ +// Type definitions for Google Apps Script 2015-11-12 +// Project: https://developers.google.com/apps-script/ +// Definitions by: motemen +// Definitions: https://github.com/DefinitelyTyped/DefinitelyTyped + +/// +/// + +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.
', + * 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; \ No newline at end of file diff --git a/google-apps-script/google-apps-script.optimization.d.ts b/google-apps-script/google-apps-script.optimization.d.ts new file mode 100644 index 0000000000..f4371eef17 --- /dev/null +++ b/google-apps-script/google-apps-script.optimization.d.ts @@ -0,0 +1,228 @@ +// Type definitions for Google Apps Script 2015-11-12 +// Project: https://developers.google.com/apps-script/ +// Definitions by: motemen +// Definitions: https://github.com/DefinitelyTyped/DefinitelyTyped + +/// + +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; \ No newline at end of file diff --git a/google-apps-script/google-apps-script.properties.d.ts b/google-apps-script/google-apps-script.properties.d.ts new file mode 100644 index 0000000000..8bd5ecc28e --- /dev/null +++ b/google-apps-script/google-apps-script.properties.d.ts @@ -0,0 +1,91 @@ +// Type definitions for Google Apps Script 2015-11-12 +// Project: https://developers.google.com/apps-script/ +// Definitions by: motemen +// Definitions: https://github.com/DefinitelyTyped/DefinitelyTyped + +/// + +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; \ No newline at end of file diff --git a/google-apps-script/google-apps-script.script.d.ts b/google-apps-script/google-apps-script.script.d.ts new file mode 100644 index 0000000000..9cc52d80f9 --- /dev/null +++ b/google-apps-script/google-apps-script.script.d.ts @@ -0,0 +1,215 @@ +// Type definitions for Google Apps Script 2015-11-12 +// Project: https://developers.google.com/apps-script/ +// Definitions by: motemen +// Definitions: https://github.com/DefinitelyTyped/DefinitelyTyped + +/// +/// +/// +/// +/// + +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; \ No newline at end of file diff --git a/google-apps-script/google-apps-script.sites.d.ts b/google-apps-script/google-apps-script.sites.d.ts new file mode 100644 index 0000000000..aa5f9444f8 --- /dev/null +++ b/google-apps-script/google-apps-script.sites.d.ts @@ -0,0 +1,241 @@ +// Type definitions for Google Apps Script 2015-11-12 +// Project: https://developers.google.com/apps-script/ +// Definitions by: motemen +// Definitions: https://github.com/DefinitelyTyped/DefinitelyTyped + +/// +/// + +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; \ No newline at end of file diff --git a/google-apps-script/google-apps-script.spreadsheet.d.ts b/google-apps-script/google-apps-script.spreadsheet.d.ts new file mode 100644 index 0000000000..aad5225d94 --- /dev/null +++ b/google-apps-script/google-apps-script.spreadsheet.d.ts @@ -0,0 +1,918 @@ +// Type definitions for Google Apps Script 2015-11-12 +// Project: https://developers.google.com/apps-script/ +// Definitions by: motemen +// Definitions: https://github.com/DefinitelyTyped/DefinitelyTyped + +/// +/// +/// +/// + +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; \ No newline at end of file diff --git a/google-apps-script/google-apps-script.types.d.ts b/google-apps-script/google-apps-script.types.d.ts new file mode 100644 index 0000000000..5204a8a2a4 --- /dev/null +++ b/google-apps-script/google-apps-script.types.d.ts @@ -0,0 +1,12 @@ +// Type definitions for Google Apps Script 2015-11-12 +// Project: https://developers.google.com/apps-script/ +// Definitions by: 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; +} diff --git a/google-apps-script/google-apps-script.ui.d.ts b/google-apps-script/google-apps-script.ui.d.ts new file mode 100644 index 0000000000..00dabefd0f --- /dev/null +++ b/google-apps-script/google-apps-script.ui.d.ts @@ -0,0 +1,3628 @@ +// Type definitions for Google Apps Script 2015-11-12 +// Project: https://developers.google.com/apps-script/ +// Definitions by: motemen +// Definitions: https://github.com/DefinitelyTyped/DefinitelyTyped + +/// + +declare module GoogleAppsScript { + export module UI { + /** + * + * Deprecated. The UI service was + * + * deprecated on December 11, 2014. To create user interfaces, use the + * HTML service instead. + * An absolute panel positions all of its children absolutely, allowing them to overlap. + * + * Here is an example of how to use this widget: + * + * function doGet() { + * var app = UiApp.createApplication(); + * var button = app.createButton("a button"); + * var panel = app.createAbsolutePanel(); + * // add a widget at position (10, 20) + * panel.add(button, 10, 20); + * app.add(panel); + * return app; + * } + * + * Internally, UiApp widgets are built on top of the + * Google Web Toolkit, and it can sometimes be helpful to look at the GWT documentation + * directly. You can find the AbsolutePanel documentation here. + */ + export interface AbsolutePanel { + add(widget: Widget): AbsolutePanel; + add(widget: Widget, left: Integer, top: Integer): AbsolutePanel; + addStyleDependentName(styleName: string): AbsolutePanel; + addStyleName(styleName: string): AbsolutePanel; + clear(): AbsolutePanel; + getId(): string; + getTag(): string; + getType(): string; + remove(index: Integer): AbsolutePanel; + remove(widget: Widget): AbsolutePanel; + setHeight(height: string): AbsolutePanel; + setId(id: string): AbsolutePanel; + setLayoutData(layout: Object): AbsolutePanel; + setPixelSize(width: Integer, height: Integer): AbsolutePanel; + setSize(width: string, height: string): AbsolutePanel; + setStyleAttribute(attribute: string, value: string): AbsolutePanel; + setStyleAttributes(attributes: Object): AbsolutePanel; + setStyleName(styleName: string): AbsolutePanel; + setStylePrimaryName(styleName: string): AbsolutePanel; + setTag(tag: string): AbsolutePanel; + setTitle(title: string): AbsolutePanel; + setVisible(visible: boolean): AbsolutePanel; + setWidgetPosition(widget: Widget, left: Integer, top: Integer): AbsolutePanel; + setWidth(width: string): AbsolutePanel; + } + + /** + * + * Deprecated. The UI service was + * + * deprecated on December 11, 2014. To create user interfaces, use the + * HTML service instead. + * A widget that represents a simple element. That is, a hyperlink to a different page. + * + * By design, these hyperlinks always open in a new page. Links that reload the current page are + * not allowed. + * + * Here is an example of how to use this widget: + * + * function doGet() { + * var app = UiApp.createApplication(); + * // Creates a link to your favorite search engine. + * var anchor = app.createAnchor("a link", "http://www.google.com"); + * app.add(anchor); + * return app; + * } + * + * Internally, UiApp widgets are built on top of the + * Google Web Toolkit, and it can sometimes be helpful to look at the GWT documentation + * directly. You can find the Anchor documentation here. + */ + export interface Anchor { + addBlurHandler(handler: Handler): Anchor; + addClickHandler(handler: Handler): Anchor; + addFocusHandler(handler: Handler): Anchor; + addKeyDownHandler(handler: Handler): Anchor; + addKeyPressHandler(handler: Handler): Anchor; + addKeyUpHandler(handler: Handler): Anchor; + addMouseDownHandler(handler: Handler): Anchor; + addMouseMoveHandler(handler: Handler): Anchor; + addMouseOutHandler(handler: Handler): Anchor; + addMouseOverHandler(handler: Handler): Anchor; + addMouseUpHandler(handler: Handler): Anchor; + addMouseWheelHandler(handler: Handler): Anchor; + addStyleDependentName(styleName: string): Anchor; + addStyleName(styleName: string): Anchor; + getId(): string; + getTag(): string; + getType(): string; + setAccessKey(accessKey: Char): Anchor; + setDirection(direction: Component): Anchor; + setEnabled(enabled: boolean): Anchor; + setFocus(focus: boolean): Anchor; + setHTML(html: string): Anchor; + setHeight(height: string): Anchor; + setHorizontalAlignment(horizontalAlignment: HorizontalAlignment): Anchor; + setHref(href: string): Anchor; + setId(id: string): Anchor; + setLayoutData(layout: Object): Anchor; + setName(name: string): Anchor; + setPixelSize(width: Integer, height: Integer): Anchor; + setSize(width: string, height: string): Anchor; + setStyleAttribute(attribute: string, value: string): Anchor; + setStyleAttributes(attributes: Object): Anchor; + setStyleName(styleName: string): Anchor; + setStylePrimaryName(styleName: string): Anchor; + setTabIndex(index: Integer): Anchor; + setTag(tag: string): Anchor; + setTarget(target: string): Anchor; + setText(text: string): Anchor; + setTitle(title: string): Anchor; + setVisible(visible: boolean): Anchor; + setWidth(width: string): Anchor; + setWordWrap(wordWrap: boolean): Anchor; + } + + /** + * + * Deprecated. The UI service was + * + * deprecated on December 11, 2014. To create user interfaces, use the + * HTML service instead. + * A standard push-button widget. + * + * Here is an example of how to use this widget: + * + * function doGet() { + * var app = UiApp.createApplication(); + * // create a button and give it a click handler + * var button = app.createButton("click me!").setId("button"); + * button.addClickHandler(app.createServerHandler("handlerFunction")); + * app.add(button); + * return app; + * } + * + * function handlerFunction(eventInfo) { + * var app = UiApp.getActiveApplication(); + * app.getElementById("button").setText("I was clicked!"); + * return app; + * } + * + * Internally, UiApp widgets are built on top of the + * Google Web Toolkit, and it can sometimes be helpful to look at the GWT documentation + * directly. You can find the Button documentation here. + */ + export interface Button { + addBlurHandler(handler: Handler): Button; + addClickHandler(handler: Handler): Button; + addFocusHandler(handler: Handler): Button; + addKeyDownHandler(handler: Handler): Button; + addKeyPressHandler(handler: Handler): Button; + addKeyUpHandler(handler: Handler): Button; + addMouseDownHandler(handler: Handler): Button; + addMouseMoveHandler(handler: Handler): Button; + addMouseOutHandler(handler: Handler): Button; + addMouseOverHandler(handler: Handler): Button; + addMouseUpHandler(handler: Handler): Button; + addMouseWheelHandler(handler: Handler): Button; + addStyleDependentName(styleName: string): Button; + addStyleName(styleName: string): Button; + getId(): string; + getTag(): string; + getType(): string; + setAccessKey(accessKey: Char): Button; + setEnabled(enabled: boolean): Button; + setFocus(focus: boolean): Button; + setHTML(html: string): Button; + setHeight(height: string): Button; + setId(id: string): Button; + setLayoutData(layout: Object): Button; + setPixelSize(width: Integer, height: Integer): Button; + setSize(width: string, height: string): Button; + setStyleAttribute(attribute: string, value: string): Button; + setStyleAttributes(attributes: Object): Button; + setStyleName(styleName: string): Button; + setStylePrimaryName(styleName: string): Button; + setTabIndex(index: Integer): Button; + setTag(tag: string): Button; + setText(text: string): Button; + setTitle(title: string): Button; + setVisible(visible: boolean): Button; + setWidth(width: string): Button; + } + + /** + * + * Deprecated. The UI service was + * + * deprecated on December 11, 2014. To create user interfaces, use the + * HTML service instead. + * A panel that wraps its contents in a border with a caption that appears in the upper left + * corner of the border. This is an implementation of the fieldset HTML element. + * + * Note that this panel can contain at most one direct child widget. To add more children, make the + * child of this panel a different panel that can contain more than one child. + * + * Note also that the placement of the caption in a caption panel will vary slightly from browser to + * browser, so this widget is not a good choice when precise cross-browser layout is needed. + * + * Here is an example of how to use this widget: + * + * function doGet() { + * var app = UiApp.createApplication(); + * var panel = app.createCaptionPanel("my caption!"); + * panel.add(app.createButton("a button inside...")); + * app.add(panel); + * return app; + * } + * + * Internally, UiApp widgets are built on top of the + * Google Web Toolkit, and it can sometimes be helpful to look at the GWT documentation + * directly. You can find the CaptionPanel documentation here. + */ + export interface CaptionPanel { + add(widget: Widget): CaptionPanel; + addStyleDependentName(styleName: string): CaptionPanel; + addStyleName(styleName: string): CaptionPanel; + clear(): CaptionPanel; + getId(): string; + getTag(): string; + getType(): string; + setCaptionText(text: string): CaptionPanel; + setContentWidget(widget: Widget): CaptionPanel; + setHeight(height: string): CaptionPanel; + setId(id: string): CaptionPanel; + setLayoutData(layout: Object): CaptionPanel; + setPixelSize(width: Integer, height: Integer): CaptionPanel; + setSize(width: string, height: string): CaptionPanel; + setStyleAttribute(attribute: string, value: string): CaptionPanel; + setStyleAttributes(attributes: Object): CaptionPanel; + setStyleName(styleName: string): CaptionPanel; + setStylePrimaryName(styleName: string): CaptionPanel; + setTag(tag: string): CaptionPanel; + setText(text: string): CaptionPanel; + setTitle(title: string): CaptionPanel; + setVisible(visible: boolean): CaptionPanel; + setWidget(widget: Widget): CaptionPanel; + setWidth(width: string): CaptionPanel; + } + + /** + * + * Deprecated. The UI service was + * + * deprecated on December 11, 2014. To create user interfaces, use the + * HTML service instead. + * A standard check box widget. + * + * Here is an example of how to use this widget: + * + * function doGet() { + * var app = UiApp.createApplication(); + * var handler = app.createServerHandler("change"); + * var check = app.createCheckBox("click me").addValueChangeHandler(handler); + * app.add(check); + * return app; + * } + * + * function change() { + * var app = UiApp.getActiveApplication(); + * app.add(app.createLabel("The value changed!")); + * return app; + * } + * + * Internally, UiApp widgets are built on top of the + * Google Web Toolkit, and it can sometimes be helpful to look at the GWT documentation + * directly. You can find the CheckBox documentation here. + */ + export interface CheckBox { + addBlurHandler(handler: Handler): CheckBox; + addClickHandler(handler: Handler): CheckBox; + addFocusHandler(handler: Handler): CheckBox; + addKeyDownHandler(handler: Handler): CheckBox; + addKeyPressHandler(handler: Handler): CheckBox; + addKeyUpHandler(handler: Handler): CheckBox; + addMouseDownHandler(handler: Handler): CheckBox; + addMouseMoveHandler(handler: Handler): CheckBox; + addMouseOutHandler(handler: Handler): CheckBox; + addMouseOverHandler(handler: Handler): CheckBox; + addMouseUpHandler(handler: Handler): CheckBox; + addMouseWheelHandler(handler: Handler): CheckBox; + addStyleDependentName(styleName: string): CheckBox; + addStyleName(styleName: string): CheckBox; + addValueChangeHandler(handler: Handler): CheckBox; + getId(): string; + getTag(): string; + getType(): string; + setAccessKey(accessKey: Char): CheckBox; + setEnabled(enabled: boolean): CheckBox; + setFocus(focus: boolean): CheckBox; + setFormValue(formValue: string): CheckBox; + setHTML(html: string): CheckBox; + setHeight(height: string): CheckBox; + setId(id: string): CheckBox; + setLayoutData(layout: Object): CheckBox; + setName(name: string): CheckBox; + setPixelSize(width: Integer, height: Integer): CheckBox; + setSize(width: string, height: string): CheckBox; + setStyleAttribute(attribute: string, value: string): CheckBox; + setStyleAttributes(attributes: Object): CheckBox; + setStyleName(styleName: string): CheckBox; + setStylePrimaryName(styleName: string): CheckBox; + setTabIndex(index: Integer): CheckBox; + setTag(tag: string): CheckBox; + setText(text: string): CheckBox; + setTitle(title: string): CheckBox; + setValue(value: boolean): CheckBox; + setValue(value: boolean, fireEvents: boolean): CheckBox; + setVisible(visible: boolean): CheckBox; + setWidth(width: string): CheckBox; + } + + /** + * + * Deprecated. The UI service was + * + * deprecated on December 11, 2014. To create user interfaces, use the + * HTML service instead. + * An event handler that runs in the user's browser without needing a call back to the server. + * These will, in general, run much faster than ServerHandlers but they are also more + * limited in what they can do. + * + * Any method that accepts a "Handler" parameter can accept a ClientHandler. + * + * If you set validators on a ClientHandler, they will be checked before the handler performs its + * actions. The actions will only be performed if the validators succeed. + * + * If you have multiple ClientHandlers for the same event on the same widget, they will perform + * their actions in the order that they were added. + * + * An example of using client handlers: + * + * function doGet() { + * var app = UiApp.createApplication(); + * var button = app.createButton("Say Hello"); + * + * // Create a label with the "Hello World!" text and hide it for now + * var label = app.createLabel("Hello World!").setVisible(false); + * + * // Create a new handler that does not require the server. + * // We give the handler two actions to perform on different targets. + * // The first action disables the widget that invokes the handler + * // and the second displays the label. + * var handler = app.createClientHandler() + * .forEventSource().setEnabled(false) + * .forTargets(label).setVisible(true); + * + * // Add our new handler to be invoked when the button is clicked + * button.addClickHandler(handler); + * + * app.add(button); + * app.add(label); + * return app; + * } + */ + export interface ClientHandler { + forEventSource(): ClientHandler; + forTargets(...widgets: Object[]): ClientHandler; + getId(): string; + getTag(): string; + getType(): string; + setEnabled(enabled: boolean): ClientHandler; + setHTML(html: string): ClientHandler; + setId(id: string): ClientHandler; + setStyleAttribute(row: Integer, column: Integer, attribute: string, value: string): ClientHandler; + setStyleAttribute(attribute: string, value: string): ClientHandler; + setStyleAttributes(row: Integer, column: Integer, attributes: Object): ClientHandler; + setStyleAttributes(attributes: Object): ClientHandler; + setTag(tag: string): ClientHandler; + setText(text: string): ClientHandler; + setValue(value: boolean): ClientHandler; + setVisible(visible: boolean): ClientHandler; + validateEmail(widget: Widget): ClientHandler; + validateInteger(widget: Widget): ClientHandler; + validateLength(widget: Widget, min: Integer, max: Integer): ClientHandler; + validateMatches(widget: Widget, pattern: string): ClientHandler; + validateMatches(widget: Widget, pattern: string, flags: string): ClientHandler; + validateNotEmail(widget: Widget): ClientHandler; + validateNotInteger(widget: Widget): ClientHandler; + validateNotLength(widget: Widget, min: Integer, max: Integer): ClientHandler; + validateNotMatches(widget: Widget, pattern: string): ClientHandler; + validateNotMatches(widget: Widget, pattern: string, flags: string): ClientHandler; + validateNotNumber(widget: Widget): ClientHandler; + validateNotOptions(widget: Widget, options: String[]): ClientHandler; + validateNotRange(widget: Widget, min: Number, max: Number): ClientHandler; + validateNotSum(widgets: Widget[], sum: Integer): ClientHandler; + validateNumber(widget: Widget): ClientHandler; + validateOptions(widget: Widget, options: String[]): ClientHandler; + validateRange(widget: Widget, min: Number, max: Number): ClientHandler; + validateSum(widgets: Widget[], sum: Integer): ClientHandler; + } + + /** + * + * Deprecated. The UI service was + * + * deprecated on December 11, 2014. To create user interfaces, use the + * HTML service instead. + * A generic component object. + * Implementing classes + * + * NameBrief description + * + * AbsolutePanelAn absolute panel positions all of its children absolutely, allowing them to overlap. + * + * AnchorA widget that represents a simple element. + * + * ButtonA standard push-button widget. + * + * CaptionPanelA panel that wraps its contents in a border with a caption that appears in the upper left + * corner of the border. + * + * ChartA Chart object, which can be embedded into documents, UI elements, or used as a static image. + * + * CheckBoxA standard check box widget. + * + * ClientHandlerAn event handler that runs in the user's browser without needing a call back to the server. + * + * ControlA user interface control object, that drives the data displayed by a DashboardPanel. + * + * DashboardPanelA dashboard is a visual structure that enables the organization and management + * of multiple charts that share the same underlying data. + * + * DateBoxA text box that shows a DatePicker when the user focuses on it. + * + * DatePickerA date picker widget. + * + * DecoratedStackPanelA StackPanel that wraps each item in a 2x3 grid (six box), which allows users to add + * rounded corners. + * + * DecoratedTabBarA TabBar that wraps each tab in a 2x3 grid (six box), which allows users to add rounded corners. + * + * DecoratedTabPanelA TabPanel that uses a DecoratedTabBar with rounded corners. + * + * DecoratorPanelA SimplePanel that wraps its contents in stylized boxes, which can be used to add rounded + * corners to a Widget. + * + * DialogBoxA form of popup that has a caption area at the top and can be dragged by the + * user. + * + * DocsListDialogA "file-open" dialog for Google Drive. + * + * EmbeddedChartRepresents a chart that has been embedded into a Spreadsheet. + * + * FileUploadA widget that wraps the HTML element. + * + * FlexTableA flexible table that creates cells on demand. + * + * FlowPanelA panel that formats its child widgets using the default HTML layout behavior. + * + * FocusPanelA simple panel that makes its contents focusable, and adds the ability to catch mouse and + * keyboard events. + * + * FormPanelA panel that wraps its contents in an HTML
element. + * + * GridA rectangular grid that can contain text, html, or a child widget within its cells. + * + * HTMLA widget that contains arbitrary text, which is interpreted as HTML. + * + * HandlerBase interface for client and server handlers. + * + * HiddenRepresents a hidden field for storing data in the user's browser that can be passed back to a + * handler as a "callback element". + * + * HorizontalPanelA panel that lays all of its widgets out in a single horizontal column. + * + * ImageA widget that displays the image at a given URL. + * + * InlineLabelA widget that contains arbitrary text, not interpreted as HTML. + * + * LabelA widget that contains arbitrary text, not interpreted as HTML. + * + * ListBoxA widget that presents a list of choices to the user, either as a list box or + * as a drop-down list. + * + * MenuBarA standard menu bar widget. + * + * MenuItemAn entry in a MenuBar. + * + * MenuItemSeparatorA separator that can be placed in a MenuBar. + * + * PasswordTextBoxA text box that visually masks its input to prevent eavesdropping. + * + * PopupPanelA panel that can "pop up" over other widgets. + * + * PushButtonA normal push button with custom styling. + * + * RadioButtonA mutually-exclusive selection radio button widget. + * + * ResetButtonA standard push-button widget which will automatically reset its enclosing FormPanel if + * any. + * + * ScrollPanelA panel that wraps its contents in a scrollable element. + * + * ServerHandlerAn event handler that runs on the server. + * + * SimpleCheckBoxA simple checkbox widget, with no label. + * + * SimplePanelA panel that can contain only one widget. + * + * SimpleRadioButtonA simple radio button widget, with no label. + * + * SplitLayoutPanelA panel that adds user-positioned splitters between each of its child widgets. + * + * StackPanelA panel that stacks its children vertically, displaying only one at a time, + * with a header for each child which the user can click to display. + * + * SubmitButtonA standard push-button widget which will automatically submit its enclosing FormPanel if + * any. + * + * SuggestBoxA SuggestBox is a text box or text area which displays a + * pre-configured set of selections that match the user's input. + * + * TabBarA horizontal bar of folder-style tabs, most commonly used as part of a TabPanel. + * + * TabPanelA panel that represents a tabbed set of pages, each of which contains another + * widget. + * + * TextAreaA text box that allows multiple lines of text to be entered. + * + * TextBoxA standard single-line text box. + * + * ToggleButtonA ToggleButton is a stylish stateful button which allows the + * user to toggle between up and down states. + * + * TreeA standard hierarchical tree widget. + * + * TreeItemAn item that can be contained within a Tree. + * + * VerticalPanelA panel that lays all of its widgets out in a single vertical column. + * + * WidgetBase interface for UiApp widgets. + */ + export interface Component { + getId(): string; + getType(): string; + } + + /** + * + * Deprecated. The UI service was + * + * deprecated on December 11, 2014. To create user interfaces, use the + * HTML service instead. + * A text box that shows a DatePicker when the user focuses on it. + * + * Here is an example of how to use this widget: + * + * function doGet() { + * var app = UiApp.createApplication(); + * var handler = app.createServerHandler("change"); + * var dateBox = app.createDateBox().addValueChangeHandler(handler).setId("datebox"); + * app.add(dateBox); + * return app; + * } + * + * function change(eventInfo) { + * var app = UiApp.getActiveApplication(); + * app.add(app.createLabel("The value of the date box changed to " + + * eventInfo.parameter.datebox)); + * return app; + * } + * + * Internally, UiApp widgets are built on top of the + * Google Web Toolkit, and it can sometimes be helpful to look at the GWT documentation + * directly. You can find the DateBox documentation here. + */ + export interface DateBox { + addStyleDependentName(styleName: string): DateBox; + addStyleName(styleName: string): DateBox; + addValueChangeHandler(handler: Handler): DateBox; + getId(): string; + getTag(): string; + getType(): string; + hideDatePicker(): DateBox; + setAccessKey(accessKey: Char): DateBox; + setEnabled(enabled: boolean): DateBox; + setFireEventsForInvalid(fireEvents: boolean): DateBox; + setFocus(focus: boolean): DateBox; + setFormat(dateTimeFormat: DateTimeFormat): DateBox; + setHeight(height: string): DateBox; + setId(id: string): DateBox; + setLayoutData(layout: Object): DateBox; + setName(name: string): DateBox; + setPixelSize(width: Integer, height: Integer): DateBox; + setSize(width: string, height: string): DateBox; + setStyleAttribute(attribute: string, value: string): DateBox; + setStyleAttributes(attributes: Object): DateBox; + setStyleName(styleName: string): DateBox; + setStylePrimaryName(styleName: string): DateBox; + setTabIndex(index: Integer): DateBox; + setTag(tag: string): DateBox; + setTitle(title: string): DateBox; + setValue(date: Date): DateBox; + setVisible(visible: boolean): DateBox; + setWidth(width: string): DateBox; + showDatePicker(): DateBox; + } + + /** + * + * Deprecated. The UI service was + * + * deprecated on December 11, 2014. To create user interfaces, use the + * HTML service instead. + * A date picker widget. + * + * Here is an example of how to use this widget: + * + * function doGet() { + * var app = UiApp.createApplication(); + * var handler = app.createServerHandler("change"); + * var picker = app.createDatePicker().addValueChangeHandler(handler).setId("picker"); + * app.add(picker); + * return app; + * } + * + * function change(eventInfo) { + * var app = UiApp.getActiveApplication(); + * app.add(app.createLabel("The value of the date picker changed to " + + * eventInfo.parameter.picker)); + * return app; + * } + * + * Internally, UiApp widgets are built on top of the + * Google Web Toolkit, and it can sometimes be helpful to look at the GWT documentation + * directly. You can find the DatePicker documentation here. + */ + export interface DatePicker { + addStyleDependentName(styleName: string): DatePicker; + addStyleName(styleName: string): DatePicker; + addValueChangeHandler(handler: Handler): DatePicker; + getId(): string; + getTag(): string; + getType(): string; + setCurrentMonth(date: Date): DatePicker; + setHeight(height: string): DatePicker; + setId(id: string): DatePicker; + setLayoutData(layout: Object): DatePicker; + setName(name: string): DatePicker; + setPixelSize(width: Integer, height: Integer): DatePicker; + setSize(width: string, height: string): DatePicker; + setStyleAttribute(attribute: string, value: string): DatePicker; + setStyleAttributes(attributes: Object): DatePicker; + setStyleName(styleName: string): DatePicker; + setStylePrimaryName(styleName: string): DatePicker; + setTag(tag: string): DatePicker; + setTitle(title: string): DatePicker; + setValue(date: Date): DatePicker; + setVisible(visible: boolean): DatePicker; + setWidth(width: string): DatePicker; + } + + /** + * + * Deprecated. The UI service was + * + * deprecated on December 11, 2014. To create user interfaces, use the + * HTML service instead. + * Date and time format constants for widgets such as + * DateBox. + * + * These correspond to the predefined constants from the Google Web Toolkit. You can read + * more about these constants + * here. + */ + export enum DateTimeFormat { ISO_8601, RFC_2822, DATE_FULL, DATE_LONG, DATE_MEDIUM, DATE_SHORT, TIME_FULL, TIME_LONG, TIME_MEDIUM, TIME_SHORT, DATE_TIME_FULL, DATE_TIME_LONG, DATE_TIME_MEDIUM, DATE_TIME_SHORT, DAY, HOUR_MINUTE, HOUR_MINUTE_SECOND, HOUR24_MINUTE, HOUR24_MINUTE_SECOND, MINUTE_SECOND, MONTH, MONTH_ABBR, MONTH_ABBR_DAY, MONTH_DAY, MONTH_NUM_DAY, MONTH_WEEKDAY_DAY, YEAR, YEAR_MONTH, YEAR_MONTH_ABBR, YEAR_MONTH_ABBR_DAY, YEAR_MONTH_DAY, YEAR_MONTH_NUM, YEAR_MONTH_NUM_DAY, YEAR_MONTH_WEEKDAY_DAY, YEAR_QUARTER, YEAR_QUARTER_ABBR } + + /** + * + * Deprecated. The UI service was + * + * deprecated on December 11, 2014. To create user interfaces, use the + * HTML service instead. + * A StackPanel that wraps each item in a 2x3 grid (six box), which allows users to add + * rounded corners. + * + * Internally, UiApp widgets are built on top of the + * Google Web Toolkit, and it can sometimes be helpful to look at the GWT documentation + * directly. You can find the DecoratedStackPanel documentation here. + */ + export interface DecoratedStackPanel { + add(widget: Widget): DecoratedStackPanel; + add(widget: Widget, text: string): DecoratedStackPanel; + add(widget: Widget, text: string, asHtml: boolean): DecoratedStackPanel; + addStyleDependentName(styleName: string): DecoratedStackPanel; + addStyleName(styleName: string): DecoratedStackPanel; + clear(): DecoratedStackPanel; + getId(): string; + getTag(): string; + getType(): string; + remove(index: Integer): DecoratedStackPanel; + remove(widget: Widget): DecoratedStackPanel; + setHeight(height: string): DecoratedStackPanel; + setId(id: string): DecoratedStackPanel; + setLayoutData(layout: Object): DecoratedStackPanel; + setPixelSize(width: Integer, height: Integer): DecoratedStackPanel; + setSize(width: string, height: string): DecoratedStackPanel; + setStackText(index: Integer, text: string): DecoratedStackPanel; + setStackText(index: Integer, text: string, asHtml: boolean): DecoratedStackPanel; + setStyleAttribute(attribute: string, value: string): DecoratedStackPanel; + setStyleAttributes(attributes: Object): DecoratedStackPanel; + setStyleName(styleName: string): DecoratedStackPanel; + setStylePrimaryName(styleName: string): DecoratedStackPanel; + setTag(tag: string): DecoratedStackPanel; + setTitle(title: string): DecoratedStackPanel; + setVisible(visible: boolean): DecoratedStackPanel; + setWidth(width: string): DecoratedStackPanel; + } + + /** + * + * Deprecated. The UI service was + * + * deprecated on December 11, 2014. To create user interfaces, use the + * HTML service instead. + * A TabBar that wraps each tab in a 2x3 grid (six box), which allows users to add rounded corners. + * + * Internally, UiApp widgets are built on top of the + * Google Web Toolkit, and it can sometimes be helpful to look at the GWT documentation + * directly. You can find the DecoratedTabBar documentation here. + */ + export interface DecoratedTabBar { + addBeforeSelectionHandler(handler: Handler): DecoratedTabBar; + addSelectionHandler(handler: Handler): DecoratedTabBar; + addStyleDependentName(styleName: string): DecoratedTabBar; + addStyleName(styleName: string): DecoratedTabBar; + addTab(title: string): DecoratedTabBar; + addTab(title: string, asHtml: boolean): DecoratedTabBar; + addTab(widget: Widget): DecoratedTabBar; + getId(): string; + getTag(): string; + getType(): string; + selectTab(index: Integer): DecoratedTabBar; + setHeight(height: string): DecoratedTabBar; + setId(id: string): DecoratedTabBar; + setLayoutData(layout: Object): DecoratedTabBar; + setPixelSize(width: Integer, height: Integer): DecoratedTabBar; + setSize(width: string, height: string): DecoratedTabBar; + setStyleAttribute(attribute: string, value: string): DecoratedTabBar; + setStyleAttributes(attributes: Object): DecoratedTabBar; + setStyleName(styleName: string): DecoratedTabBar; + setStylePrimaryName(styleName: string): DecoratedTabBar; + setTabEnabled(index: Integer, enabled: boolean): DecoratedTabBar; + setTabText(index: Integer, text: string): DecoratedTabBar; + setTag(tag: string): DecoratedTabBar; + setTitle(title: string): DecoratedTabBar; + setVisible(visible: boolean): DecoratedTabBar; + setWidth(width: string): DecoratedTabBar; + } + + /** + * + * Deprecated. The UI service was + * + * deprecated on December 11, 2014. To create user interfaces, use the + * HTML service instead. + * A TabPanel that uses a DecoratedTabBar with rounded corners. + * + * Internally, UiApp widgets are built on top of the + * Google Web Toolkit, and it can sometimes be helpful to look at the GWT documentation + * directly. You can find the DecoratedTabPanel documentation here. + */ + export interface DecoratedTabPanel { + add(widget: Widget): DecoratedTabPanel; + add(widget: Widget, text: string): DecoratedTabPanel; + add(widget: Widget, text: string, asHtml: boolean): DecoratedTabPanel; + add(widget: Widget, tabWidget: Widget): DecoratedTabPanel; + addBeforeSelectionHandler(handler: Handler): DecoratedTabPanel; + addSelectionHandler(handler: Handler): DecoratedTabPanel; + addStyleDependentName(styleName: string): DecoratedTabPanel; + addStyleName(styleName: string): DecoratedTabPanel; + getId(): string; + getTag(): string; + getType(): string; + selectTab(index: Integer): DecoratedTabPanel; + setAnimationEnabled(animationEnabled: boolean): DecoratedTabPanel; + setHeight(height: string): DecoratedTabPanel; + setId(id: string): DecoratedTabPanel; + setLayoutData(layout: Object): DecoratedTabPanel; + setPixelSize(width: Integer, height: Integer): DecoratedTabPanel; + setSize(width: string, height: string): DecoratedTabPanel; + setStyleAttribute(attribute: string, value: string): DecoratedTabPanel; + setStyleAttributes(attributes: Object): DecoratedTabPanel; + setStyleName(styleName: string): DecoratedTabPanel; + setStylePrimaryName(styleName: string): DecoratedTabPanel; + setTag(tag: string): DecoratedTabPanel; + setTitle(title: string): DecoratedTabPanel; + setVisible(visible: boolean): DecoratedTabPanel; + setWidth(width: string): DecoratedTabPanel; + } + + /** + * + * Deprecated. The UI service was + * + * deprecated on December 11, 2014. To create user interfaces, use the + * HTML service instead. + * A SimplePanel that wraps its contents in stylized boxes, which can be used to add rounded + * corners to a Widget. + * + * Note that this panel can contain at most one direct child widget. To add more children, make the + * child of this panel a different panel that can contain more than one child. + * + * Internally, UiApp widgets are built on top of the + * Google Web Toolkit, and it can sometimes be helpful to look at the GWT documentation + * directly. You can find the DecoratorPanel documentation here. + */ + export interface DecoratorPanel { + add(widget: Widget): DecoratorPanel; + addStyleDependentName(styleName: string): DecoratorPanel; + addStyleName(styleName: string): DecoratorPanel; + clear(): DecoratorPanel; + getId(): string; + getTag(): string; + getType(): string; + setHeight(height: string): DecoratorPanel; + setId(id: string): DecoratorPanel; + setLayoutData(layout: Object): DecoratorPanel; + setPixelSize(width: Integer, height: Integer): DecoratorPanel; + setSize(width: string, height: string): DecoratorPanel; + setStyleAttribute(attribute: string, value: string): DecoratorPanel; + setStyleAttributes(attributes: Object): DecoratorPanel; + setStyleName(styleName: string): DecoratorPanel; + setStylePrimaryName(styleName: string): DecoratorPanel; + setTag(tag: string): DecoratorPanel; + setTitle(title: string): DecoratorPanel; + setVisible(visible: boolean): DecoratorPanel; + setWidget(widget: Widget): DecoratorPanel; + setWidth(width: string): DecoratorPanel; + } + + /** + * + * Deprecated. The UI service was + * + * deprecated on December 11, 2014. To create user interfaces, use the + * HTML service instead. + * A form of popup that has a caption area at the top and can be dragged by the + * user. Unlike a PopupPanel, calls to setWidth(width) and + * setHeight(height) will set the width and height of the dialog box + * itself, even if a widget has not been added as yet. + * + * In general it's not recommended to add this panel as a child of another widget or of the app + * as that will make it behave like any other inline panel and not act as a popup. Instead, create + * the popup and then use its show() and hide() methods to show and hide it. See + * the example below. + * + * Internally, UiApp widgets are built on top of the + * Google Web Toolkit, and it can sometimes be helpful to look at the GWT documentation + * directly. You can find the DialogBox documentation here. + * + * Here is an example showing how to use the dialog box widget: + * + * function doGet() { + * var app = UiApp.createApplication(); + * // Create a dialog box. + * var dialog = app.createDialogBox(); + * // Set the position and dimensions. + * dialog.setPopupPosition(100, 100).setSize(500, 500); + * // Show the dialog. Note that it does not have to be "added" to the UiInstance. + * dialog.show(); + * return app; + * } + */ + export interface DialogBox { + add(widget: Widget): DialogBox; + addAutoHidePartner(partner: Component): DialogBox; + addCloseHandler(handler: Handler): DialogBox; + addStyleDependentName(styleName: string): DialogBox; + addStyleName(styleName: string): DialogBox; + clear(): DialogBox; + getId(): string; + getTag(): string; + getType(): string; + hide(): DialogBox; + setAnimationEnabled(animationEnabled: boolean): DialogBox; + setAutoHideEnabled(enabled: boolean): DialogBox; + setGlassEnabled(enabled: boolean): DialogBox; + setGlassStyleName(styleName: string): DialogBox; + setHTML(html: string): DialogBox; + setHeight(height: string): DialogBox; + setId(id: string): DialogBox; + setLayoutData(layout: Object): DialogBox; + setModal(modal: boolean): DialogBox; + setPixelSize(width: Integer, height: Integer): DialogBox; + setPopupPosition(left: Integer, top: Integer): DialogBox; + setPopupPositionAndShow(a: Component): DialogBox; + setPreviewingAllNativeEvents(previewing: boolean): DialogBox; + setSize(width: string, height: string): DialogBox; + setStyleAttribute(attribute: string, value: string): DialogBox; + setStyleAttributes(attributes: Object): DialogBox; + setStyleName(styleName: string): DialogBox; + setStylePrimaryName(styleName: string): DialogBox; + setTag(tag: string): DialogBox; + setText(text: string): DialogBox; + setTitle(title: string): DialogBox; + setVisible(visible: boolean): DialogBox; + setWidget(widget: Widget): DialogBox; + setWidth(width: string): DialogBox; + show(): DialogBox; + } + + /** + * + * Deprecated. The UI service was + * + * deprecated on December 11, 2014. To create user interfaces, use the + * HTML service instead. + * A "file-open" dialog for Google Drive. Unlike most UiApp objects, DocsListDialog + * should not be added to the UiInstance. The + * example below shows how to display a DocsListDialog in the + * new version of Google Sheets. + * + * Note that HTML service offers a similar but superior + * feature, Google Picker. In almost all + * cases, using Google Picker is preferable. + * + * function onOpen() { + * SpreadsheetApp.getUi() // Or DocumentApp or FormApp. + * .createMenu('Custom Menu') + * .addItem('Select file', 'showDialog') + * .addToUi(); + * } + * + * function showDialog() { + * // Dummy call to DriveApp to ensure the OAuth dialog requests Google Drive scope, so that the + * // getOAuthToken() call below returns a token with the necessary permissions. + * DriveApp.getRootFolder(); + * + * var app = UiApp.createApplication() + * .setWidth(570) + * .setHeight(352); + * + * var serverHandler = app.createServerHandler('pickerHandler'); + * + * app.createDocsListDialog() + * .addCloseHandler(serverHandler) + * .addSelectionHandler(serverHandler) + * .setOAuthToken(ScriptApp.getOAuthToken()) + * .showDocsPicker(); + * + * SpreadsheetApp.getUi() // Or DocumentApp or FormApp. + * .showModalDialog(app,' '); + * } + * + * function pickerHandler(e) { + * var action = e.parameter.eventType; + * var app = UiApp.getActiveApplication(); + * + * if (action == 'selection') { + * var doc = e.parameter.items[0]; + * var id = doc.id; + * var name = doc.name; + * var url = doc.url; + * app.add(app.createLabel('You picked ')); + * app.add(app.createAnchor(name, url)); + * app.add(app.createLabel('(ID: ' + id + ').')); + * } else if (action == 'close') { + * app.add(app.createLabel('You clicked "Cancel".')); + * } + * + * return app; + * } + */ + export interface DocsListDialog { + addCloseHandler(handler: Handler): DocsListDialog; + addSelectionHandler(handler: Handler): DocsListDialog; + addView(fileType: FileType): DocsListDialog; + getId(): string; + getType(): string; + setDialogTitle(title: string): DocsListDialog; + setHeight(height: Integer): DocsListDialog; + setInitialView(fileType: FileType): DocsListDialog; + setMultiSelectEnabled(multiSelectEnabled: boolean): DocsListDialog; + setOAuthToken(oAuthToken: string): DocsListDialog; + setWidth(width: Integer): DocsListDialog; + showDocsPicker(): DocsListDialog; + } + + /** + * + * Deprecated. The UI service was + * + * deprecated on December 11, 2014. To create user interfaces, use the + * HTML service instead. + * File type constants for the + * DocsListDialog. + */ + export enum FileType { ALL, ALL_DOCS, DRAWINGS, DOCUMENTS, SPREADSHEETS, FOLDERS, RECENTLY_PICKED, PRESENTATIONS, FORMS, PHOTOS, PHOTO_ALBUMS, PDFS } + + /** + * + * Deprecated. The UI service was + * + * deprecated on December 11, 2014. To create user interfaces, use the + * HTML service instead. + * A widget that wraps the HTML element. This widget + * must be used within a FormPanel. + * + * The result of a FileUpload is a "Blob" which can we used in various other functions. Below is an + * example of how to use FileUpload. + * + * function doGet(e) { + * + * var app = UiApp.createApplication().setTitle("Upload CSV to Sheet"); + * var formContent = app.createVerticalPanel(); + * formContent.add(app.createFileUpload().setName('thefile')); + * formContent.add(app.createSubmitButton()); + * var form = app.createFormPanel(); + * form.add(formContent); + * app.add(form); + * return app; + * } + * + * function doPost(e) { + * // data returned is a blob for FileUpload widget + * var fileBlob = e.parameter.thefile; + * var doc = DocsList.createFile(fileBlob); + * } + * + * Internally, UiApp widgets are built on top of the + * Google Web Toolkit, and it can sometimes be helpful to look at the GWT documentation + * directly. You can find the FileUpload documentation here. + */ + export interface FileUpload { + addChangeHandler(handler: Handler): FileUpload; + addStyleDependentName(styleName: string): FileUpload; + addStyleName(styleName: string): FileUpload; + getId(): string; + getTag(): string; + getType(): string; + setEnabled(enabled: boolean): FileUpload; + setHeight(height: string): FileUpload; + setId(id: string): FileUpload; + setLayoutData(layout: Object): FileUpload; + setName(name: string): FileUpload; + setPixelSize(width: Integer, height: Integer): FileUpload; + setSize(width: string, height: string): FileUpload; + setStyleAttribute(attribute: string, value: string): FileUpload; + setStyleAttributes(attributes: Object): FileUpload; + setStyleName(styleName: string): FileUpload; + setStylePrimaryName(styleName: string): FileUpload; + setTag(tag: string): FileUpload; + setTitle(title: string): FileUpload; + setVisible(visible: boolean): FileUpload; + setWidth(width: string): FileUpload; + } + + /** + * + * Deprecated. The UI service was + * + * deprecated on December 11, 2014. To create user interfaces, use the + * HTML service instead. + * A flexible table that creates cells on demand. It can be jagged (that is, + * each row can contain a different number of cells) and individual cells can be + * set to span multiple rows or columns. + * + * Here is an example of how to use this widget: + * + * function doGet() { + * var app = UiApp.createApplication(); + * app.add(app.createFlexTable() + * .insertRow(0).insertRow(0).insertRow(0) + * .insertCell(0, 0) + * .insertCell(0, 1) + * .insertCell(0, 2) + * .insertCell(1, 0) + * .insertCell(1, 1) + * .insertCell(2, 0) + * .setBorderWidth(5).setCellPadding(10).setCellSpacing(10)); + * return app; + * } + * + * Internally, UiApp widgets are built on top of the + * Google Web Toolkit, and it can sometimes be helpful to look at the GWT documentation + * directly. You can find the FlexTable documentation here. + */ + export interface FlexTable { + addCell(row: Integer): FlexTable; + addClickHandler(handler: Handler): FlexTable; + addStyleDependentName(styleName: string): FlexTable; + addStyleName(styleName: string): FlexTable; + clear(): FlexTable; + getId(): string; + getTag(): string; + getType(): string; + insertCell(beforeRow: Integer, beforeColumn: Integer): FlexTable; + insertRow(beforeRow: Integer): FlexTable; + removeCell(row: Integer, column: Integer): FlexTable; + removeCells(row: Integer, column: Integer, num: Integer): FlexTable; + removeRow(row: Integer): FlexTable; + setBorderWidth(width: Integer): FlexTable; + setCellPadding(padding: Integer): FlexTable; + setCellSpacing(spacing: Integer): FlexTable; + setColumnStyleAttribute(column: Integer, attribute: string, value: string): FlexTable; + setColumnStyleAttributes(column: Integer, attributes: Object): FlexTable; + setHeight(height: string): FlexTable; + setId(id: string): FlexTable; + setLayoutData(layout: Object): FlexTable; + setPixelSize(width: Integer, height: Integer): FlexTable; + setRowStyleAttribute(row: Integer, attribute: string, value: string): FlexTable; + setRowStyleAttributes(row: Integer, attributes: Object): FlexTable; + setSize(width: string, height: string): FlexTable; + setStyleAttribute(row: Integer, column: Integer, attribute: string, value: string): FlexTable; + setStyleAttribute(attribute: string, value: string): FlexTable; + setStyleAttributes(row: Integer, column: Integer, attributes: Object): FlexTable; + setStyleAttributes(attributes: Object): FlexTable; + setStyleName(styleName: string): FlexTable; + setStylePrimaryName(styleName: string): FlexTable; + setTag(tag: string): FlexTable; + setText(row: Integer, column: Integer, text: string): FlexTable; + setTitle(title: string): FlexTable; + setVisible(visible: boolean): FlexTable; + setWidget(row: Integer, column: Integer, widget: Widget): FlexTable; + setWidth(width: string): FlexTable; + } + + /** + * + * Deprecated. The UI service was + * + * deprecated on December 11, 2014. To create user interfaces, use the + * HTML service instead. + * A panel that formats its child widgets using the default HTML layout behavior. + * + * Here is an example of how to use this widget: + * + * function doGet() { + * var app = UiApp.createApplication(); + * var panel = app.createFlowPanel(); + * panel.add(app.createButton("button 1")); + * panel.add(app.createButton("button 2")); + * app.add(panel); + * return app; + * } + * + * Internally, UiApp widgets are built on top of the + * Google Web Toolkit, and it can sometimes be helpful to look at the GWT documentation + * directly. You can find the FlowPanel documentation here. + */ + export interface FlowPanel { + add(widget: Widget): FlowPanel; + addStyleDependentName(styleName: string): FlowPanel; + addStyleName(styleName: string): FlowPanel; + clear(): FlowPanel; + getId(): string; + getTag(): string; + getType(): string; + insert(widget: Widget, beforeIndex: Integer): FlowPanel; + remove(index: Integer): FlowPanel; + remove(widget: Widget): FlowPanel; + setHeight(height: string): FlowPanel; + setId(id: string): FlowPanel; + setLayoutData(layout: Object): FlowPanel; + setPixelSize(width: Integer, height: Integer): FlowPanel; + setSize(width: string, height: string): FlowPanel; + setStyleAttribute(attribute: string, value: string): FlowPanel; + setStyleAttributes(attributes: Object): FlowPanel; + setStyleName(styleName: string): FlowPanel; + setStylePrimaryName(styleName: string): FlowPanel; + setTag(tag: string): FlowPanel; + setTitle(title: string): FlowPanel; + setVisible(visible: boolean): FlowPanel; + setWidth(width: string): FlowPanel; + } + + /** + * + * Deprecated. The UI service was + * + * deprecated on December 11, 2014. To create user interfaces, use the + * HTML service instead. + * A simple panel that makes its contents focusable, and adds the ability to catch mouse and + * keyboard events. + * + * Note that this panel can contain at most one direct child widget. To add more children, make the + * child of this panel a different panel that can contain more than one child. + * + * Here is an example of how to use this widget: + * + * function doGet() { + * var app = UiApp.createApplication(); + * var focus = app.createFocusPanel(); + * var flow = app.createFlowPanel(); + * flow.add(app.createButton("button 1")); + * flow.add(app.createButton("button 2")); + * focus.add(flow); + * app.add(focus); + * return app; + * } + * + * Internally, UiApp widgets are built on top of the + * Google Web Toolkit, and it can sometimes be helpful to look at the GWT documentation + * directly. You can find the FocusPanel documentation here. + */ + export interface FocusPanel { + add(widget: Widget): FocusPanel; + addBlurHandler(handler: Handler): FocusPanel; + addClickHandler(handler: Handler): FocusPanel; + addFocusHandler(handler: Handler): FocusPanel; + addKeyDownHandler(handler: Handler): FocusPanel; + addKeyPressHandler(handler: Handler): FocusPanel; + addKeyUpHandler(handler: Handler): FocusPanel; + addMouseDownHandler(handler: Handler): FocusPanel; + addMouseMoveHandler(handler: Handler): FocusPanel; + addMouseOutHandler(handler: Handler): FocusPanel; + addMouseOverHandler(handler: Handler): FocusPanel; + addMouseUpHandler(handler: Handler): FocusPanel; + addMouseWheelHandler(handler: Handler): FocusPanel; + addStyleDependentName(styleName: string): FocusPanel; + addStyleName(styleName: string): FocusPanel; + clear(): FocusPanel; + getId(): string; + getTag(): string; + getType(): string; + setAccessKey(accessKey: Char): FocusPanel; + setFocus(focus: boolean): FocusPanel; + setHeight(height: string): FocusPanel; + setId(id: string): FocusPanel; + setLayoutData(layout: Object): FocusPanel; + setPixelSize(width: Integer, height: Integer): FocusPanel; + setSize(width: string, height: string): FocusPanel; + setStyleAttribute(attribute: string, value: string): FocusPanel; + setStyleAttributes(attributes: Object): FocusPanel; + setStyleName(styleName: string): FocusPanel; + setStylePrimaryName(styleName: string): FocusPanel; + setTabIndex(index: Integer): FocusPanel; + setTag(tag: string): FocusPanel; + setTitle(title: string): FocusPanel; + setVisible(visible: boolean): FocusPanel; + setWidget(widget: Widget): FocusPanel; + setWidth(width: string): FocusPanel; + } + + /** + * + * Deprecated. The UI service was + * + * deprecated on December 11, 2014. To create user interfaces, use the + * HTML service instead. + * A panel that wraps its contents in an HTML element. + * + * This panel can be used with a SubmitButton to post form values to the server. All + * children of this panel (direct, or even children of sub-panels) that have a setName function + * and have been given a name will have their values sent to the server when the form is submitted. + * The submit can be handled in the special "doPost" function, as shown in the example. + * + * Note that this panel can contain at most one direct child widget. To add more children, make the + * child of this panel a different panel that can contain more than one child. + * + * Here is an example of how to use this widget: + * + * function doGet() { + * var app = UiApp.createApplication(); + * var form = app.createFormPanel(); + * var flow = app.createFlowPanel(); + * flow.add(app.createTextBox().setName("textBox")); + * flow.add(app.createListBox().setName("listBox").addItem("option 1").addItem("option 2")); + * flow.add(app.createSubmitButton("Submit")); + * form.add(flow); + * app.add(form); + * return app; + * } + * + * function doPost(eventInfo) { + * var app = UiApp.getActiveApplication(); + * app.add(app.createLabel("Form submitted. The text box's value was '" + + * eventInfo.parameter.textBox + + * "' and the list box's value was '" + + * eventInfo.parameter.listBox + "'")); + * return app; + * } + * + * Internally, UiApp widgets are built on top of the + * Google Web Toolkit, and it can sometimes be helpful to look at the GWT documentation + * directly. You can find the FormPanel documentation here. + */ + export interface FormPanel { + add(widget: Widget): FormPanel; + addStyleDependentName(styleName: string): FormPanel; + addStyleName(styleName: string): FormPanel; + addSubmitCompleteHandler(handler: Handler): FormPanel; + addSubmitHandler(handler: Handler): FormPanel; + clear(): FormPanel; + getId(): string; + getTag(): string; + getType(): string; + setAction(action: string): FormPanel; + setEncoding(encoding: string): FormPanel; + setHeight(height: string): FormPanel; + setId(id: string): FormPanel; + setLayoutData(layout: Object): FormPanel; + setMethod(method: string): FormPanel; + setPixelSize(width: Integer, height: Integer): FormPanel; + setSize(width: string, height: string): FormPanel; + setStyleAttribute(attribute: string, value: string): FormPanel; + setStyleAttributes(attributes: Object): FormPanel; + setStyleName(styleName: string): FormPanel; + setStylePrimaryName(styleName: string): FormPanel; + setTag(tag: string): FormPanel; + setTitle(title: string): FormPanel; + setVisible(visible: boolean): FormPanel; + setWidget(widget: Widget): FormPanel; + setWidth(width: string): FormPanel; + } + + /** + * + * Deprecated. The UI service was + * + * deprecated on December 11, 2014. To create user interfaces, use the + * HTML service instead. + * A rectangular grid that can contain text, html, or a child widget within its cells. It must be + * resized explicitly to the desired number of rows and columns. + * + * Here is an example of how to use this widget: + * + * function doGet() { + * var app = UiApp.createApplication(); + * app.add(app.createGrid(3, 3) + * .setBorderWidth(1) + * .setCellSpacing(10) + * .setCellPadding(10) + * .setText(0, 0, "X") + * .setText(1, 1, "X") + * .setText(2, 2, "X") + * .setText(0, 1, "O") + * .setText(0, 2, "O") + * .setStyleAttribute(0, 0, "color", "red") + * .setStyleAttribute(1, 1, "color", "red") + * .setStyleAttribute(2, 2, "color", "red") + * .setStyleAttribute(0, 1, "color", "blue") + * .setStyleAttribute(0, 2, "color", "blue")); + * return app; + * } + * + * Internally, UiApp widgets are built on top of the + * Google Web Toolkit, and it can sometimes be helpful to look at the GWT documentation + * directly. You can find the Grid documentation here. + */ + export interface Grid { + addClickHandler(handler: Handler): Grid; + addStyleDependentName(styleName: string): Grid; + addStyleName(styleName: string): Grid; + clear(): Grid; + getId(): string; + getTag(): string; + getType(): string; + resize(rows: Integer, columns: Integer): Grid; + setBorderWidth(width: Integer): Grid; + setCellPadding(padding: Integer): Grid; + setCellSpacing(spacing: Integer): Grid; + setColumnStyleAttribute(column: Integer, attribute: string, value: string): Grid; + setColumnStyleAttributes(column: Integer, attributes: Object): Grid; + setHeight(height: string): Grid; + setId(id: string): Grid; + setLayoutData(layout: Object): Grid; + setPixelSize(width: Integer, height: Integer): Grid; + setRowStyleAttribute(row: Integer, attribute: string, value: string): Grid; + setRowStyleAttributes(row: Integer, attributes: Object): Grid; + setSize(width: string, height: string): Grid; + setStyleAttribute(row: Integer, column: Integer, attribute: string, value: string): Grid; + setStyleAttribute(attribute: string, value: string): Grid; + setStyleAttributes(row: Integer, column: Integer, attributes: Object): Grid; + setStyleAttributes(attributes: Object): Grid; + setStyleName(styleName: string): Grid; + setStylePrimaryName(styleName: string): Grid; + setTag(tag: string): Grid; + setText(row: Integer, column: Integer, text: string): Grid; + setTitle(title: string): Grid; + setVisible(visible: boolean): Grid; + setWidget(row: Integer, column: Integer, widget: Widget): Grid; + setWidth(width: string): Grid; + } + + /** + * + * Deprecated. The UI service was + * + * deprecated on December 11, 2014. To create user interfaces, use the + * HTML service instead. + * A widget that contains arbitrary text, which is interpreted as HTML. + * + * Only basic HTML markup such as bold, italic, etc. are allowed; in particular, scripts will be + * stripped out completely. + * + * Here is an example of how to use this widget: + * + * function doGet() { + * var app = UiApp.createApplication(); + * app.add(app.createHTML("Hello World!")); + * return app; + * } + * + * Internally, UiApp widgets are built on top of the + * Google Web Toolkit, and it can sometimes be helpful to look at the GWT documentation + * directly. You can find the HTML documentation here. + */ + export interface HTML { + addClickHandler(handler: Handler): HTML; + addMouseDownHandler(handler: Handler): HTML; + addMouseMoveHandler(handler: Handler): HTML; + addMouseOutHandler(handler: Handler): HTML; + addMouseOverHandler(handler: Handler): HTML; + addMouseUpHandler(handler: Handler): HTML; + addMouseWheelHandler(handler: Handler): HTML; + addStyleDependentName(styleName: string): HTML; + addStyleName(styleName: string): HTML; + getId(): string; + getTag(): string; + getType(): string; + setDirection(direction: Component): HTML; + setHTML(html: string): HTML; + setHeight(height: string): HTML; + setHorizontalAlignment(horizontalAlignment: HorizontalAlignment): HTML; + setId(id: string): HTML; + setLayoutData(layout: Object): HTML; + setPixelSize(width: Integer, height: Integer): HTML; + setSize(width: string, height: string): HTML; + setStyleAttribute(attribute: string, value: string): HTML; + setStyleAttributes(attributes: Object): HTML; + setStyleName(styleName: string): HTML; + setStylePrimaryName(styleName: string): HTML; + setTag(tag: string): HTML; + setText(text: string): HTML; + setTitle(title: string): HTML; + setVisible(visible: boolean): HTML; + setWidth(width: string): HTML; + setWordWrap(wordWrap: boolean): HTML; + } + + /** + * + * Deprecated. The UI service was + * + * deprecated on December 11, 2014. To create user interfaces, use the + * HTML service instead. + * Base interface for client and server handlers. + * Implementing classes + * + * NameBrief description + * + * ClientHandlerAn event handler that runs in the user's browser without needing a call back to the server. + * + * ServerHandlerAn event handler that runs on the server. + */ + export interface Handler { + getId(): string; + getTag(): string; + getType(): string; + setId(id: string): Handler; + setTag(tag: string): Handler; + validateEmail(widget: Widget): Handler; + validateInteger(widget: Widget): Handler; + validateLength(widget: Widget, min: Integer, max: Integer): Handler; + validateMatches(widget: Widget, pattern: string): Handler; + validateMatches(widget: Widget, pattern: string, flags: string): Handler; + validateNotEmail(widget: Widget): Handler; + validateNotInteger(widget: Widget): Handler; + validateNotLength(widget: Widget, min: Integer, max: Integer): Handler; + validateNotMatches(widget: Widget, pattern: string): Handler; + validateNotMatches(widget: Widget, pattern: string, flags: string): Handler; + validateNotNumber(widget: Widget): Handler; + validateNotOptions(widget: Widget, options: String[]): Handler; + validateNotRange(widget: Widget, min: Number, max: Number): Handler; + validateNotSum(widgets: Widget[], sum: Integer): Handler; + validateNumber(widget: Widget): Handler; + validateOptions(widget: Widget, options: String[]): Handler; + validateRange(widget: Widget, min: Number, max: Number): Handler; + validateSum(widgets: Widget[], sum: Integer): Handler; + } + + /** + * + * Deprecated. The UI service was + * + * deprecated on December 11, 2014. To create user interfaces, use the + * HTML service instead. + * Represents a hidden field for storing data in the user's browser that can be passed back to a + * handler as a "callback element". + * + * Here is an example of how to use this widget: + * + * function doGet() { + * var app = UiApp.createApplication(); + * // Note that the name "appState" for callbacks, and the id "hidden" for + * // getting a reference to the widget, are not required to be the same. + * var hidden = app.createHidden("appState", "0").setId("hidden"); + * app.add(hidden); + * var handler = app.createServerHandler("click").addCallbackElement(hidden); + * app.add(app.createButton("click me!", handler)); + * app.add(app.createLabel("clicked 0 times").setId("label")); + * return app; + * } + * + * function click(eventInfo) { + * var app = UiApp.createApplication(); + * // We have the value of the hidden field because it was a callback element. + * var numClicks = Number(eventInfo.parameter.appState); + * numClicks++; + * // Just store the number as a string. We could actually store arbitrarily complex data + * // here using JSON.stringify() to turn a JavaScript object into a string to store, and + * // JSON.parse() to turn the string back into an object. + * app.getElementById("hidden").setValue(String(numClicks)); + * app.getElementById("label").setText("clicked " + numClicks + " times"); + * return app; + * } + * + * Internally, UiApp widgets are built on top of the + * Google Web Toolkit, and it can sometimes be helpful to look at the GWT documentation + * directly. You can find the Hidden documentation here. + */ + export interface Hidden { + addStyleDependentName(styleName: string): Hidden; + addStyleName(styleName: string): Hidden; + getId(): string; + getTag(): string; + getType(): string; + setDefaultValue(value: string): Hidden; + setHeight(height: string): Hidden; + setID(id: string): Hidden; + setId(id: string): Hidden; + setLayoutData(layout: Object): Hidden; + setName(name: string): Hidden; + setPixelSize(width: Integer, height: Integer): Hidden; + setSize(width: string, height: string): Hidden; + setStyleAttribute(attribute: string, value: string): Hidden; + setStyleAttributes(attributes: Object): Hidden; + setStyleName(styleName: string): Hidden; + setStylePrimaryName(styleName: string): Hidden; + setTag(tag: string): Hidden; + setTitle(title: string): Hidden; + setValue(value: string): Hidden; + setVisible(visible: boolean): Hidden; + setWidth(width: string): Hidden; + } + + /** + * + * Deprecated. The UI service was + * + * deprecated on December 11, 2014. To create user interfaces, use the + * HTML service instead. + * Horizontal alignment constants to use with setHorizontalAlignment methods in UiApp. + */ + export enum HorizontalAlignment { LEFT, RIGHT, CENTER, DEFAULT, JUSTIFY, LOCALE_START, LOCALE_END } + + /** + * + * Deprecated. The UI service was + * + * deprecated on December 11, 2014. To create user interfaces, use the + * HTML service instead. + * A panel that lays all of its widgets out in a single horizontal column. + * + * Here is an example of how to use this widget: + * + * function doGet() { + * var app = UiApp.createApplication(); + * var panel = app.createHorizontalPanel(); + * panel.add(app.createButton("button 1")); + * panel.add(app.createButton("button 2")); + * app.add(panel); + * return app; + * } + * + * Internally, UiApp widgets are built on top of the + * Google Web Toolkit, and it can sometimes be helpful to look at the GWT documentation + * directly. You can find the HorizontalPanel documentation here. + */ + export interface HorizontalPanel { + add(widget: Widget): HorizontalPanel; + addStyleDependentName(styleName: string): HorizontalPanel; + addStyleName(styleName: string): HorizontalPanel; + clear(): HorizontalPanel; + getId(): string; + getTag(): string; + getType(): string; + remove(index: Integer): HorizontalPanel; + remove(widget: Widget): HorizontalPanel; + setBorderWidth(width: Integer): HorizontalPanel; + setCellHeight(widget: Widget, height: string): HorizontalPanel; + setCellHorizontalAlignment(widget: Widget, horizontalAlignment: HorizontalAlignment): HorizontalPanel; + setCellVerticalAlignment(widget: Widget, verticalAlignment: VerticalAlignment): HorizontalPanel; + setCellWidth(widget: Widget, width: string): HorizontalPanel; + setHeight(height: string): HorizontalPanel; + setHorizontalAlignment(horizontalAlignment: HorizontalAlignment): HorizontalPanel; + setId(id: string): HorizontalPanel; + setLayoutData(layout: Object): HorizontalPanel; + setPixelSize(width: Integer, height: Integer): HorizontalPanel; + setSize(width: string, height: string): HorizontalPanel; + setSpacing(spacing: Integer): HorizontalPanel; + setStyleAttribute(attribute: string, value: string): HorizontalPanel; + setStyleAttributes(attributes: Object): HorizontalPanel; + setStyleName(styleName: string): HorizontalPanel; + setStylePrimaryName(styleName: string): HorizontalPanel; + setTag(tag: string): HorizontalPanel; + setTitle(title: string): HorizontalPanel; + setVerticalAlignment(verticalAlignment: VerticalAlignment): HorizontalPanel; + setVisible(visible: boolean): HorizontalPanel; + setWidth(width: string): HorizontalPanel; + } + + /** + * + * Deprecated. The UI service was + * + * deprecated on December 11, 2014. To create user interfaces, use the + * HTML service instead. + * A widget that displays the image at a given URL. + * + * The image can be in 'unclipped' mode (the default) or 'clipped' mode. + * In clipped mode, a viewport is overlaid on top of the image so that a subset of the image will be + * displayed. In unclipped mode, there is no viewport - the entire image will be + * visible. Whether an image is in clipped or unclipped mode depends on how the + * image is constructed, and how it is transformed after construction. Methods + * will operate differently depending on the mode that the image is in. These + * differences are detailed in the documentation for each method. + * + * Here is an example of how to use this widget: + * + * function doGet() { + * var app = UiApp.createApplication(); + * // The very first Google Doodle! + * app.add(app.createImage("http://www.google.com/logos/googleburn.jpg")); + * // Just the man in the middle + * app.add(app.createImage("http://www.google.com/logos/googleburn.jpg", 118, 0, 50, 106)); + * return app; + * } + * + * Due to browser-specific HTML constructions needed to achieve the clipping effect, certain CSS + * attributes, such as padding and background, may not work as expected when an image is in clipped + * mode. These limitations can usually be easily worked around by encapsulating the image in a + * container widget that can itself be styled. + * + * Internally, UiApp widgets are built on top of the + * Google Web Toolkit, and it can sometimes be helpful to look at the GWT documentation + * directly. You can find the Image documentation here. + */ + export interface Image { + addClickHandler(handler: Handler): Image; + addErrorHandler(handler: Handler): Image; + addLoadHandler(handler: Handler): Image; + addMouseDownHandler(handler: Handler): Image; + addMouseMoveHandler(handler: Handler): Image; + addMouseOutHandler(handler: Handler): Image; + addMouseOverHandler(handler: Handler): Image; + addMouseUpHandler(handler: Handler): Image; + addMouseWheelHandler(handler: Handler): Image; + addStyleDependentName(styleName: string): Image; + addStyleName(styleName: string): Image; + getId(): string; + getTag(): string; + getType(): string; + setHeight(height: string): Image; + setId(id: string): Image; + setLayoutData(layout: Object): Image; + setPixelSize(width: Integer, height: Integer): Image; + setResource(resource: Component): Image; + setSize(width: string, height: string): Image; + setStyleAttribute(attribute: string, value: string): Image; + setStyleAttributes(attributes: Object): Image; + setStyleName(styleName: string): Image; + setStylePrimaryName(styleName: string): Image; + setTag(tag: string): Image; + setTitle(title: string): Image; + setUrl(url: string): Image; + setUrlAndVisibleRect(url: string, left: Integer, top: Integer, width: Integer, height: Integer): Image; + setVisible(visible: boolean): Image; + setVisibleRect(left: Integer, top: Integer, width: Integer, height: Integer): Image; + setWidth(width: string): Image; + } + + /** + * + * Deprecated. The UI service was + * + * deprecated on December 11, 2014. To create user interfaces, use the + * HTML service instead. + * A widget that contains arbitrary text, not interpreted as HTML. + * + * This widget uses a element, causing it to be displayed with inline layout. + * + * Internally, UiApp widgets are built on top of the + * Google Web Toolkit, and it can sometimes be helpful to look at the GWT documentation + * directly. You can find the InlineLabel documentation here. + */ + export interface InlineLabel { + addClickHandler(handler: Handler): InlineLabel; + addMouseDownHandler(handler: Handler): InlineLabel; + addMouseMoveHandler(handler: Handler): InlineLabel; + addMouseOutHandler(handler: Handler): InlineLabel; + addMouseOverHandler(handler: Handler): InlineLabel; + addMouseUpHandler(handler: Handler): InlineLabel; + addMouseWheelHandler(handler: Handler): InlineLabel; + addStyleDependentName(styleName: string): InlineLabel; + addStyleName(styleName: string): InlineLabel; + getId(): string; + getTag(): string; + getType(): string; + setDirection(direction: Component): InlineLabel; + setHeight(height: string): InlineLabel; + setHorizontalAlignment(horizontalAlignment: HorizontalAlignment): InlineLabel; + setId(id: string): InlineLabel; + setLayoutData(layout: Object): InlineLabel; + setPixelSize(width: Integer, height: Integer): InlineLabel; + setSize(width: string, height: string): InlineLabel; + setStyleAttribute(attribute: string, value: string): InlineLabel; + setStyleAttributes(attributes: Object): InlineLabel; + setStyleName(styleName: string): InlineLabel; + setStylePrimaryName(styleName: string): InlineLabel; + setTag(tag: string): InlineLabel; + setText(text: string): InlineLabel; + setTitle(title: string): InlineLabel; + setVisible(visible: boolean): InlineLabel; + setWidth(width: string): InlineLabel; + setWordWrap(wordWrap: boolean): InlineLabel; + } + + /** + * + * Deprecated. The UI service was + * + * deprecated on December 11, 2014. To create user interfaces, use the + * HTML service instead. + * A widget that contains arbitrary text, not interpreted as HTML. + * + * Here is an example of how to use this widget: + * + * function doGet() { + * var app = UiApp.createApplication(); + * app.add(app.createLabel("Hello World!")); + * return app; + * } + * + * Internally, UiApp widgets are built on top of the + * Google Web Toolkit, and it can sometimes be helpful to look at the GWT documentation + * directly. You can find the Label documentation here. + */ + export interface Label { + addClickHandler(handler: Handler): Label; + addMouseDownHandler(handler: Handler): Label; + addMouseMoveHandler(handler: Handler): Label; + addMouseOutHandler(handler: Handler): Label; + addMouseOverHandler(handler: Handler): Label; + addMouseUpHandler(handler: Handler): Label; + addMouseWheelHandler(handler: Handler): Label; + addStyleDependentName(styleName: string): Label; + addStyleName(styleName: string): Label; + getId(): string; + getTag(): string; + getType(): string; + setDirection(direction: Component): Label; + setHeight(height: string): Label; + setHorizontalAlignment(horizontalAlignment: HorizontalAlignment): Label; + setId(id: string): Label; + setLayoutData(layout: Object): Label; + setPixelSize(width: Integer, height: Integer): Label; + setSize(width: string, height: string): Label; + setStyleAttribute(attribute: string, value: string): Label; + setStyleAttributes(attributes: Object): Label; + setStyleName(styleName: string): Label; + setStylePrimaryName(styleName: string): Label; + setTag(tag: string): Label; + setText(text: string): Label; + setTitle(title: string): Label; + setVisible(visible: boolean): Label; + setWidth(width: string): Label; + setWordWrap(wordWrap: boolean): Label; + } + + /** + * + * Deprecated. The UI service was + * + * deprecated on December 11, 2014. To create user interfaces, use the + * HTML service instead. + * A widget that presents a list of choices to the user, either as a list box or + * as a drop-down list. + * + * Here is an example usage, which should be executed from within a spreadsheet bound script. + * + * // execute this in a spreadsheet + * function show() { + * var doc = SpreadsheetApp.getActiveSpreadsheet(); + * var app = UiApp.createApplication().setTitle('My Application'); + * var panel = app.createVerticalPanel(); + * var lb = app.createListBox(true).setId('myId').setName('myLbName'); + * + * // add items to ListBox + * lb.setVisibleItemCount(3); + * lb.addItem('first'); + * lb.addItem('second'); + * lb.addItem('third'); + * lb.addItem('fourth'); + * lb.addItem('fifth'); + * lb.addItem('sixth'); + * + * panel.add(lb); + * var button = app.createButton('press me'); + * var handler = app.createServerClickHandler('click').addCallbackElement(panel); + * button.addClickHandler(handler); + * panel.add(button); + * app.add(panel); + * doc.show(app); + * } + * + * function click(eventInfo) { + * var app = UiApp.getActiveApplication(); + * // get values of ListBox + * var value = eventInfo.parameter.myLbName; + * // multi select box returns a comma separated string + * var n = value.split(','); + * + * var doc = SpreadsheetApp.getActiveSpreadsheet(); + * doc.getRange('a1').setValue(value); + * doc.getRange('b1').setValue('there are ' + n.length + ' items selected'); + * return app; + * } + * + * Internally, UiApp widgets are built on top of the + * Google Web Toolkit, and it can sometimes be helpful to look at the GWT documentation + * directly. You can find the ListBox documentation here. + */ + export interface ListBox { + addBlurHandler(handler: Handler): ListBox; + addChangeHandler(handler: Handler): ListBox; + addClickHandler(handler: Handler): ListBox; + addFocusHandler(handler: Handler): ListBox; + addItem(text: string): ListBox; + addItem(text: string, value: string): ListBox; + addKeyDownHandler(handler: Handler): ListBox; + addKeyPressHandler(handler: Handler): ListBox; + addKeyUpHandler(handler: Handler): ListBox; + addMouseDownHandler(handler: Handler): ListBox; + addMouseMoveHandler(handler: Handler): ListBox; + addMouseOutHandler(handler: Handler): ListBox; + addMouseOverHandler(handler: Handler): ListBox; + addMouseUpHandler(handler: Handler): ListBox; + addMouseWheelHandler(handler: Handler): ListBox; + addStyleDependentName(styleName: string): ListBox; + addStyleName(styleName: string): ListBox; + clear(): ListBox; + getId(): string; + getTag(): string; + getType(): string; + removeItem(index: Integer): ListBox; + setAccessKey(accessKey: Char): ListBox; + setEnabled(enabled: boolean): ListBox; + setFocus(focus: boolean): ListBox; + setHeight(height: string): ListBox; + setId(id: string): ListBox; + setItemSelected(index: Integer, selected: boolean): ListBox; + setItemText(index: Integer, text: string): ListBox; + setLayoutData(layout: Object): ListBox; + setName(name: string): ListBox; + setPixelSize(width: Integer, height: Integer): ListBox; + setSelectedIndex(index: Integer): ListBox; + setSize(width: string, height: string): ListBox; + setStyleAttribute(attribute: string, value: string): ListBox; + setStyleAttributes(attributes: Object): ListBox; + setStyleName(styleName: string): ListBox; + setStylePrimaryName(styleName: string): ListBox; + setTabIndex(index: Integer): ListBox; + setTag(tag: string): ListBox; + setTitle(title: string): ListBox; + setValue(index: Integer, value: string): ListBox; + setVisible(visible: boolean): ListBox; + setVisibleItemCount(count: Integer): ListBox; + setWidth(width: string): ListBox; + } + + /** + * + * Deprecated. The UI service was + * + * deprecated on December 11, 2014. To create user interfaces, use the + * HTML service instead. + * A standard menu bar widget. + * + * A menu bar can contain any number of menu items, + * each of which can either fire an event handler or open a cascaded menu bar. + * + * Internally, UiApp widgets are built on top of the + * Google Web Toolkit, and it can sometimes be helpful to look at the GWT documentation + * directly. You can find the MenuBar documentation here. + */ + export interface MenuBar { + addCloseHandler(handler: Handler): MenuBar; + addItem(item: MenuItem): MenuBar; + addItem(text: string, asHtml: boolean, command: Handler): MenuBar; + addItem(text: string, asHtml: boolean, subMenu: MenuBar): MenuBar; + addItem(text: string, command: Handler): MenuBar; + addItem(text: string, subMenu: MenuBar): MenuBar; + addSeparator(): MenuBar; + addSeparator(separator: MenuItemSeparator): MenuBar; + addStyleDependentName(styleName: string): MenuBar; + addStyleName(styleName: string): MenuBar; + getId(): string; + getTag(): string; + getType(): string; + setAnimationEnabled(animationEnabled: boolean): MenuBar; + setAutoOpen(autoOpen: boolean): MenuBar; + setHeight(height: string): MenuBar; + setId(id: string): MenuBar; + setLayoutData(layout: Object): MenuBar; + setPixelSize(width: Integer, height: Integer): MenuBar; + setSize(width: string, height: string): MenuBar; + setStyleAttribute(attribute: string, value: string): MenuBar; + setStyleAttributes(attributes: Object): MenuBar; + setStyleName(styleName: string): MenuBar; + setStylePrimaryName(styleName: string): MenuBar; + setTag(tag: string): MenuBar; + setTitle(title: string): MenuBar; + setVisible(visible: boolean): MenuBar; + setWidth(width: string): MenuBar; + } + + /** + * + * Deprecated. The UI service was + * + * deprecated on December 11, 2014. To create user interfaces, use the + * HTML service instead. + * An entry in a MenuBar. + * + * Menu items can either fire an event handler when they are clicked, or open a cascading sub-menu. + * + * Internally, UiApp widgets are built on top of the + * Google Web Toolkit, and it can sometimes be helpful to look at the GWT documentation + * directly. You can find the MenuItem documentation here. + */ + export interface MenuItem { + addStyleDependentName(styleName: string): MenuItem; + addStyleName(styleName: string): MenuItem; + getId(): string; + getTag(): string; + getType(): string; + setCommand(handler: Handler): MenuItem; + setHTML(html: string): MenuItem; + setHeight(height: string): MenuItem; + setId(id: string): MenuItem; + setPixelSize(width: Integer, height: Integer): MenuItem; + setSize(width: string, height: string): MenuItem; + setStyleAttribute(attribute: string, value: string): MenuItem; + setStyleAttributes(attributes: Object): MenuItem; + setStyleName(styleName: string): MenuItem; + setStylePrimaryName(styleName: string): MenuItem; + setSubMenu(subMenu: MenuBar): MenuItem; + setTag(tag: string): MenuItem; + setText(text: string): MenuItem; + setTitle(title: string): MenuItem; + setVisible(visible: boolean): MenuItem; + setWidth(width: string): MenuItem; + } + + /** + * + * Deprecated. The UI service was + * + * deprecated on December 11, 2014. To create user interfaces, use the + * HTML service instead. + * A separator that can be placed in a MenuBar. + * + * Internally, UiApp widgets are built on top of the + * Google Web Toolkit, and it can sometimes be helpful to look at the GWT documentation + * directly. You can find the MenuItemSeparator documentation here. + */ + export interface MenuItemSeparator { + addStyleDependentName(styleName: string): MenuItemSeparator; + addStyleName(styleName: string): MenuItemSeparator; + getId(): string; + getTag(): string; + getType(): string; + setHeight(height: string): MenuItemSeparator; + setId(id: string): MenuItemSeparator; + setPixelSize(width: Integer, height: Integer): MenuItemSeparator; + setSize(width: string, height: string): MenuItemSeparator; + setStyleAttribute(attribute: string, value: string): MenuItemSeparator; + setStyleAttributes(attributes: Object): MenuItemSeparator; + setStyleName(styleName: string): MenuItemSeparator; + setStylePrimaryName(styleName: string): MenuItemSeparator; + setTag(tag: string): MenuItemSeparator; + setTitle(title: string): MenuItemSeparator; + setVisible(visible: boolean): MenuItemSeparator; + setWidth(width: string): MenuItemSeparator; + } + + /** + * + * Deprecated. The UI service was + * + * deprecated on December 11, 2014. To create user interfaces, use the + * HTML service instead. + * A text box that visually masks its input to prevent eavesdropping. + * + * Here is an example of how to use this widget: + * + * function doGet() { + * var app = UiApp.createApplication(); + * var text = app.createPasswordTextBox().setName("text"); + * var handler = app.createServerHandler("test").addCallbackElement(text); + * app.add(text); + * app.add(app.createButton("Test", handler)); + * app.add(app.createLabel("0 characters").setId("label")); + * return app; + * } + * + * function test(eventInfo) { + * var app = UiApp.createApplication(); + * // Because the text box was named "text" and added as a callback element to the + * // button's click event, we have its value available in eventInfo.parameter.text. + * var pass = eventInfo.parameter.text; + * var isStrong = + * pass.length >= 10 && /[A-Z]/.test(pass) && /[a-z]/.test(pass) && /[0-9]/.test(pass); + * var label = app.getElementById("label"); + * if (isStrong) { + * label.setText("Strong! Well, not really, but this is just an example.") + * .setStyleAttribute("color", "green"); + * } else { + * label.setText("Weak! Use at least 10 characters, with uppercase, lowercase, and digits") + * .setStyleAttribute("color", "red"); + * } + * return app; + * } + * + * Internally, UiApp widgets are built on top of the + * Google Web Toolkit, and it can sometimes be helpful to look at the GWT documentation + * directly. You can find the PasswordTextBox documentation here. + */ + export interface PasswordTextBox { + addBlurHandler(handler: Handler): PasswordTextBox; + addChangeHandler(handler: Handler): PasswordTextBox; + addClickHandler(handler: Handler): PasswordTextBox; + addFocusHandler(handler: Handler): PasswordTextBox; + addKeyDownHandler(handler: Handler): PasswordTextBox; + addKeyPressHandler(handler: Handler): PasswordTextBox; + addKeyUpHandler(handler: Handler): PasswordTextBox; + addMouseDownHandler(handler: Handler): PasswordTextBox; + addMouseMoveHandler(handler: Handler): PasswordTextBox; + addMouseOutHandler(handler: Handler): PasswordTextBox; + addMouseOverHandler(handler: Handler): PasswordTextBox; + addMouseUpHandler(handler: Handler): PasswordTextBox; + addMouseWheelHandler(handler: Handler): PasswordTextBox; + addStyleDependentName(styleName: string): PasswordTextBox; + addStyleName(styleName: string): PasswordTextBox; + addValueChangeHandler(handler: Handler): PasswordTextBox; + getId(): string; + getTag(): string; + getType(): string; + setAccessKey(accessKey: Char): PasswordTextBox; + setCursorPos(position: Integer): PasswordTextBox; + setDirection(direction: Component): PasswordTextBox; + setEnabled(enabled: boolean): PasswordTextBox; + setFocus(focus: boolean): PasswordTextBox; + setHeight(height: string): PasswordTextBox; + setId(id: string): PasswordTextBox; + setLayoutData(layout: Object): PasswordTextBox; + setMaxLength(length: Integer): PasswordTextBox; + setName(name: string): PasswordTextBox; + setPixelSize(width: Integer, height: Integer): PasswordTextBox; + setReadOnly(readOnly: boolean): PasswordTextBox; + setSelectionRange(position: Integer, length: Integer): PasswordTextBox; + setSize(width: string, height: string): PasswordTextBox; + setStyleAttribute(attribute: string, value: string): PasswordTextBox; + setStyleAttributes(attributes: Object): PasswordTextBox; + setStyleName(styleName: string): PasswordTextBox; + setStylePrimaryName(styleName: string): PasswordTextBox; + setTabIndex(index: Integer): PasswordTextBox; + setTag(tag: string): PasswordTextBox; + setText(text: string): PasswordTextBox; + setTextAlignment(textAlign: Component): PasswordTextBox; + setTitle(title: string): PasswordTextBox; + setValue(value: string): PasswordTextBox; + setValue(value: string, fireEvents: boolean): PasswordTextBox; + setVisible(visible: boolean): PasswordTextBox; + setVisibleLength(length: Integer): PasswordTextBox; + setWidth(width: string): PasswordTextBox; + } + + /** + * + * Deprecated. The UI service was + * + * deprecated on December 11, 2014. To create user interfaces, use the + * HTML service instead. + * A panel that can "pop up" over other widgets. It overlays the browser's + * client area (and any previously-created popups). + * + * In general it's not recommended to add this panel as a child of another widget or of the app + * as that will make it behave like any other inline panel and not act as a popup. Instead, create + * the popup and then use its show() and hide() methods to show and hide it. See + * the example below. + * + * To make the popup stay at a fixed location rather than scrolling with the page, try setting the + * 'position', 'fixed' style on it with setStyleAttribute(attribute, value). + * + * Note that this panel can contain at most one direct child widget. To add more children, make the + * child of this panel a different panel that can contain more than one child. + * + * Internally, UiApp widgets are built on top of the + * Google Web Toolkit, and it can sometimes be helpful to look at the GWT documentation + * directly. You can find the PopupPanel documentation here. + * + * Here is an example showing how to use the popup panel widget: + * + * function doGet() { + * var app = UiApp.createApplication(); + * // Create a popup panel and set it to be modal. + * var popupPanel = app.createPopupPanel(false, true); + * // Add a button to the panel and set the dimensions and position. + * popupPanel.add(app.createButton()).setWidth("100px").setHeight("100px") + * .setPopupPosition(100, 100); + * // Show the panel. Note that it does not have to be "added" to the UiInstance. + * popupPanel.show(); + * return app; + * } + */ + export interface PopupPanel { + add(widget: Widget): PopupPanel; + addAutoHidePartner(partner: Component): PopupPanel; + addCloseHandler(handler: Handler): PopupPanel; + addStyleDependentName(styleName: string): PopupPanel; + addStyleName(styleName: string): PopupPanel; + clear(): PopupPanel; + getId(): string; + getTag(): string; + getType(): string; + hide(): PopupPanel; + setAnimationEnabled(animationEnabled: boolean): PopupPanel; + setAutoHideEnabled(enabled: boolean): PopupPanel; + setGlassEnabled(enabled: boolean): PopupPanel; + setGlassStyleName(styleName: string): PopupPanel; + setHeight(height: string): PopupPanel; + setId(id: string): PopupPanel; + setLayoutData(layout: Object): PopupPanel; + setModal(modal: boolean): PopupPanel; + setPixelSize(width: Integer, height: Integer): PopupPanel; + setPopupPosition(left: Integer, top: Integer): PopupPanel; + setPopupPositionAndShow(a: Component): PopupPanel; + setPreviewingAllNativeEvents(previewing: boolean): PopupPanel; + setSize(width: string, height: string): PopupPanel; + setStyleAttribute(attribute: string, value: string): PopupPanel; + setStyleAttributes(attributes: Object): PopupPanel; + setStyleName(styleName: string): PopupPanel; + setStylePrimaryName(styleName: string): PopupPanel; + setTag(tag: string): PopupPanel; + setTitle(title: string): PopupPanel; + setVisible(visible: boolean): PopupPanel; + setWidget(widget: Widget): PopupPanel; + setWidth(width: string): PopupPanel; + show(): PopupPanel; + } + + /** + * + * Deprecated. The UI service was + * + * deprecated on December 11, 2014. To create user interfaces, use the + * HTML service instead. + * A normal push button with custom styling. + * + * Here is an example of how to use this widget: + * + * function doGet() { + * var app = UiApp.createApplication(); + * // create a button and give it a click handler + * var button = app.createPushButton().setText("click me!").setId("button"); + * button.addClickHandler(app.createServerHandler("handlerFunction")); + * app.add(button); + * return app; + * } + * + * function handlerFunction(eventInfo) { + * var app = UiApp.getActiveApplication(); + * app.add(app.createLabel("The button was clicked!")); + * return app; + * } + * + * Internally, UiApp widgets are built on top of the + * Google Web Toolkit, and it can sometimes be helpful to look at the GWT documentation + * directly. You can find the PushButton documentation here. + */ + export interface PushButton { + addBlurHandler(handler: Handler): PushButton; + addClickHandler(handler: Handler): PushButton; + addFocusHandler(handler: Handler): PushButton; + addKeyDownHandler(handler: Handler): PushButton; + addKeyPressHandler(handler: Handler): PushButton; + addKeyUpHandler(handler: Handler): PushButton; + addMouseDownHandler(handler: Handler): PushButton; + addMouseMoveHandler(handler: Handler): PushButton; + addMouseOutHandler(handler: Handler): PushButton; + addMouseOverHandler(handler: Handler): PushButton; + addMouseUpHandler(handler: Handler): PushButton; + addMouseWheelHandler(handler: Handler): PushButton; + addStyleDependentName(styleName: string): PushButton; + addStyleName(styleName: string): PushButton; + getId(): string; + getTag(): string; + getType(): string; + setAccessKey(accessKey: Char): PushButton; + setEnabled(enabled: boolean): PushButton; + setFocus(focus: boolean): PushButton; + setHTML(html: string): PushButton; + setHeight(height: string): PushButton; + setId(id: string): PushButton; + setLayoutData(layout: Object): PushButton; + setPixelSize(width: Integer, height: Integer): PushButton; + setSize(width: string, height: string): PushButton; + setStyleAttribute(attribute: string, value: string): PushButton; + setStyleAttributes(attributes: Object): PushButton; + setStyleName(styleName: string): PushButton; + setStylePrimaryName(styleName: string): PushButton; + setTabIndex(index: Integer): PushButton; + setTag(tag: string): PushButton; + setText(text: string): PushButton; + setTitle(title: string): PushButton; + setVisible(visible: boolean): PushButton; + setWidth(width: string): PushButton; + } + + /** + * + * Deprecated. The UI service was + * + * deprecated on December 11, 2014. To create user interfaces, use the + * HTML service instead. + * A mutually-exclusive selection radio button widget. + * + * This widget fires + * click events when the radio button is clicked, and value change events when the + * button becomes checked. Note, however, that browser limitations prevent + * value change events from being sent when the radio button is cleared as a side + * effect of another in the group being clicked. + * + * RadioButtons are grouped according to the following rules: + * + * In the absence of a FormPanel, RadioButtons with the same name are part of the same + * group. + * + * Within a FormPanel, all unnamed RadioButtons are part of the same group. + * + * Within a FormPanel, all RadioButtons with the same name are part of the same group - but + * not part of the same group as RadioButtons with the same name outside of the + * FormPanel. + * + * Note that radio button selections within a group do not propagate to server handlers created with + * UiInstance#createServerHandler(). Instead, to capture values on the server, use + * doPost() or separate handlers for each RadioButton. + * + * Internally, UiApp widgets are built on top of the + * Google Web Toolkit, and it can sometimes be helpful to look at the GWT documentation + * directly. You can find the RadioButton documentation here. + */ + export interface RadioButton { + addBlurHandler(handler: Handler): RadioButton; + addClickHandler(handler: Handler): RadioButton; + addFocusHandler(handler: Handler): RadioButton; + addKeyDownHandler(handler: Handler): RadioButton; + addKeyPressHandler(handler: Handler): RadioButton; + addKeyUpHandler(handler: Handler): RadioButton; + addMouseDownHandler(handler: Handler): RadioButton; + addMouseMoveHandler(handler: Handler): RadioButton; + addMouseOutHandler(handler: Handler): RadioButton; + addMouseOverHandler(handler: Handler): RadioButton; + addMouseUpHandler(handler: Handler): RadioButton; + addMouseWheelHandler(handler: Handler): RadioButton; + addStyleDependentName(styleName: string): RadioButton; + addStyleName(styleName: string): RadioButton; + addValueChangeHandler(handler: Handler): RadioButton; + getId(): string; + getTag(): string; + getType(): string; + setAccessKey(accessKey: Char): RadioButton; + setEnabled(enabled: boolean): RadioButton; + setFocus(focus: boolean): RadioButton; + setFormValue(formValue: string): RadioButton; + setHTML(html: string): RadioButton; + setHeight(height: string): RadioButton; + setId(id: string): RadioButton; + setLayoutData(layout: Object): RadioButton; + setName(name: string): RadioButton; + setPixelSize(width: Integer, height: Integer): RadioButton; + setSize(width: string, height: string): RadioButton; + setStyleAttribute(attribute: string, value: string): RadioButton; + setStyleAttributes(attributes: Object): RadioButton; + setStyleName(styleName: string): RadioButton; + setStylePrimaryName(styleName: string): RadioButton; + setTabIndex(index: Integer): RadioButton; + setTag(tag: string): RadioButton; + setText(text: string): RadioButton; + setTitle(title: string): RadioButton; + setValue(value: boolean): RadioButton; + setValue(value: boolean, fireEvents: boolean): RadioButton; + setVisible(visible: boolean): RadioButton; + setWidth(width: string): RadioButton; + } + + /** + * + * Deprecated. The UI service was + * + * deprecated on December 11, 2014. To create user interfaces, use the + * HTML service instead. + * A standard push-button widget which will automatically reset its enclosing FormPanel if + * any. + * + * Here is an example of how to use this widget: + * + * function doGet() { + * var app = UiApp.createApplication(); + * var panel = app.createFlowPanel(); + * panel.add(app.createTextBox().setText("some text")); + * panel.add(app.createResetButton("reset the textbox")); + * var form = app.createFormPanel(); + * form.add(panel); + * app.add(form); + * return app; + * } + * + * Internally, UiApp widgets are built on top of the + * Google Web Toolkit, and it can sometimes be helpful to look at the GWT documentation + * directly. You can find the ResetButton documentation here. + */ + export interface ResetButton { + addBlurHandler(handler: Handler): ResetButton; + addClickHandler(handler: Handler): ResetButton; + addFocusHandler(handler: Handler): ResetButton; + addKeyDownHandler(handler: Handler): ResetButton; + addKeyPressHandler(handler: Handler): ResetButton; + addKeyUpHandler(handler: Handler): ResetButton; + addMouseDownHandler(handler: Handler): ResetButton; + addMouseMoveHandler(handler: Handler): ResetButton; + addMouseOutHandler(handler: Handler): ResetButton; + addMouseOverHandler(handler: Handler): ResetButton; + addMouseUpHandler(handler: Handler): ResetButton; + addMouseWheelHandler(handler: Handler): ResetButton; + addStyleDependentName(styleName: string): ResetButton; + addStyleName(styleName: string): ResetButton; + getId(): string; + getTag(): string; + getType(): string; + setAccessKey(accessKey: Char): ResetButton; + setEnabled(enabled: boolean): ResetButton; + setFocus(focus: boolean): ResetButton; + setHTML(html: string): ResetButton; + setHeight(height: string): ResetButton; + setId(id: string): ResetButton; + setLayoutData(layout: Object): ResetButton; + setPixelSize(width: Integer, height: Integer): ResetButton; + setSize(width: string, height: string): ResetButton; + setStyleAttribute(attribute: string, value: string): ResetButton; + setStyleAttributes(attributes: Object): ResetButton; + setStyleName(styleName: string): ResetButton; + setStylePrimaryName(styleName: string): ResetButton; + setTabIndex(index: Integer): ResetButton; + setTag(tag: string): ResetButton; + setText(text: string): ResetButton; + setTitle(title: string): ResetButton; + setVisible(visible: boolean): ResetButton; + setWidth(width: string): ResetButton; + } + + /** + * + * Deprecated. The UI service was + * + * deprecated on December 11, 2014. To create user interfaces, use the + * HTML service instead. + * A panel that wraps its contents in a scrollable element. + * + * Note that this panel can contain at most one direct child widget. To add more children, make the + * child of this panel a different panel that can contain more than one child. + * + * Here is an example of how to use this widget: + * + * function doGet() { + * var app = UiApp.createApplication(); + * // Create some long content. + * var vertical = app.createVerticalPanel(); + * for (var i = 0; i < 100; ++i) { + * vertical.add(app.createButton("button " + i)); + * } + * var scroll = app.createScrollPanel().setPixelSize(100, 100); + * scroll.add(vertical); + * app.add(scroll); + * return app; + * } + * + * Internally, UiApp widgets are built on top of the + * Google Web Toolkit, and it can sometimes be helpful to look at the GWT documentation + * directly. You can find the ScrollPanel documentation here. + */ + export interface ScrollPanel { + add(widget: Widget): ScrollPanel; + addScrollHandler(handler: Handler): ScrollPanel; + addStyleDependentName(styleName: string): ScrollPanel; + addStyleName(styleName: string): ScrollPanel; + clear(): ScrollPanel; + getId(): string; + getTag(): string; + getType(): string; + setAlwaysShowScrollBars(alwaysShow: boolean): ScrollPanel; + setHeight(height: string): ScrollPanel; + setHorizontalScrollPosition(position: Integer): ScrollPanel; + setId(id: string): ScrollPanel; + setLayoutData(layout: Object): ScrollPanel; + setPixelSize(width: Integer, height: Integer): ScrollPanel; + setScrollPosition(position: Integer): ScrollPanel; + setSize(width: string, height: string): ScrollPanel; + setStyleAttribute(attribute: string, value: string): ScrollPanel; + setStyleAttributes(attributes: Object): ScrollPanel; + setStyleName(styleName: string): ScrollPanel; + setStylePrimaryName(styleName: string): ScrollPanel; + setTag(tag: string): ScrollPanel; + setTitle(title: string): ScrollPanel; + setVisible(visible: boolean): ScrollPanel; + setWidget(widget: Widget): ScrollPanel; + setWidth(width: string): ScrollPanel; + } + + /** + * + * Deprecated. The UI service was + * + * deprecated on December 11, 2014. To create user interfaces, use the + * HTML service instead. + * An event handler that runs on the server. These will, in general, run much slower than + * ClientHandlers but they are not limited in what they can do. + * + * Any method that accepts a "Handler" parameter can accept a ServerHandler. + * + * When a ServerHandler is invoked, the function it refers to is called on the Apps Script server in + * a "fresh" script. This means that no variable values will have survived from previous handlers or + * from the initial script that loaded the app. Global variables in the script will be re-evaluated, + * which means that it's a bad idea to do anything slow (like opening a Spreadsheet or fetching a + * Calendar) in a global variable. + * + * If you need to save state on the server, you can try using ScriptProperties or UserProperties. + * You can also add a Hidden field to your app storing the information you want to save + * and pass it back explicitly to handlers as a "callback element." + * + * If you set validators on a ServerHandler, they will be checked before the handler calls the + * server. The server will only be called if the validators succeed. + * + * If you have multiple ServerHandlers for the same event on the same widget, they will be called + * simultaneously. + */ + export interface ServerHandler { + addCallbackElement(widget: Widget): ServerHandler; + getId(): string; + getTag(): string; + getType(): string; + setCallbackFunction(functionToInvoke: string): ServerHandler; + setId(id: string): ServerHandler; + setTag(tag: string): ServerHandler; + validateEmail(widget: Widget): ServerHandler; + validateInteger(widget: Widget): ServerHandler; + validateLength(widget: Widget, min: Integer, max: Integer): ServerHandler; + validateMatches(widget: Widget, pattern: string): ServerHandler; + validateMatches(widget: Widget, pattern: string, flags: string): ServerHandler; + validateNotEmail(widget: Widget): ServerHandler; + validateNotInteger(widget: Widget): ServerHandler; + validateNotLength(widget: Widget, min: Integer, max: Integer): ServerHandler; + validateNotMatches(widget: Widget, pattern: string): ServerHandler; + validateNotMatches(widget: Widget, pattern: string, flags: string): ServerHandler; + validateNotNumber(widget: Widget): ServerHandler; + validateNotOptions(widget: Widget, options: String[]): ServerHandler; + validateNotRange(widget: Widget, min: Number, max: Number): ServerHandler; + validateNotSum(widgets: Widget[], sum: Integer): ServerHandler; + validateNumber(widget: Widget): ServerHandler; + validateOptions(widget: Widget, options: String[]): ServerHandler; + validateRange(widget: Widget, min: Number, max: Number): ServerHandler; + validateSum(widgets: Widget[], sum: Integer): ServerHandler; + } + + /** + * + * Deprecated. The UI service was + * + * deprecated on December 11, 2014. To create user interfaces, use the + * HTML service instead. + * A simple checkbox widget, with no label. + * + * Internally, UiApp widgets are built on top of the + * Google Web Toolkit, and it can sometimes be helpful to look at the GWT documentation + * directly. You can find the SimpleCheckBox documentation here. + */ + export interface SimpleCheckBox { + addBlurHandler(handler: Handler): SimpleCheckBox; + addClickHandler(handler: Handler): SimpleCheckBox; + addFocusHandler(handler: Handler): SimpleCheckBox; + addKeyDownHandler(handler: Handler): SimpleCheckBox; + addKeyPressHandler(handler: Handler): SimpleCheckBox; + addKeyUpHandler(handler: Handler): SimpleCheckBox; + addMouseDownHandler(handler: Handler): SimpleCheckBox; + addMouseMoveHandler(handler: Handler): SimpleCheckBox; + addMouseOutHandler(handler: Handler): SimpleCheckBox; + addMouseOverHandler(handler: Handler): SimpleCheckBox; + addMouseUpHandler(handler: Handler): SimpleCheckBox; + addMouseWheelHandler(handler: Handler): SimpleCheckBox; + addStyleDependentName(styleName: string): SimpleCheckBox; + addStyleName(styleName: string): SimpleCheckBox; + getId(): string; + getTag(): string; + getType(): string; + setAccessKey(accessKey: Char): SimpleCheckBox; + setChecked(checked: boolean): SimpleCheckBox; + setEnabled(enabled: boolean): SimpleCheckBox; + setFocus(focus: boolean): SimpleCheckBox; + setHeight(height: string): SimpleCheckBox; + setId(id: string): SimpleCheckBox; + setLayoutData(layout: Object): SimpleCheckBox; + setName(name: string): SimpleCheckBox; + setPixelSize(width: Integer, height: Integer): SimpleCheckBox; + setSize(width: string, height: string): SimpleCheckBox; + setStyleAttribute(attribute: string, value: string): SimpleCheckBox; + setStyleAttributes(attributes: Object): SimpleCheckBox; + setStyleName(styleName: string): SimpleCheckBox; + setStylePrimaryName(styleName: string): SimpleCheckBox; + setTabIndex(index: Integer): SimpleCheckBox; + setTag(tag: string): SimpleCheckBox; + setTitle(title: string): SimpleCheckBox; + setVisible(visible: boolean): SimpleCheckBox; + setWidth(width: string): SimpleCheckBox; + } + + /** + * + * Deprecated. The UI service was + * + * deprecated on December 11, 2014. To create user interfaces, use the + * HTML service instead. + * A panel that can contain only one widget. + * + * This panel is useful for adding styling effects to the child widget. To add more children, make + * the child of this panel a different panel that can contain more than one child. + * + * Here is an example of how to use this widget: + * + * function doGet() { + * var app = UiApp.createApplication(); + * var simple = app.createSimplePanel(); + * var flow = app.createFlowPanel(); + * flow.add(app.createButton("button 1")); + * flow.add(app.createButton("button 2")); + * simple.add(flow); + * app.add(simple); + * return app; + * } + * + * Internally, UiApp widgets are built on top of the + * Google Web Toolkit, and it can sometimes be helpful to look at the GWT documentation + * directly. You can find the SimplePanel documentation here. + */ + export interface SimplePanel { + add(widget: Widget): SimplePanel; + addStyleDependentName(styleName: string): SimplePanel; + addStyleName(styleName: string): SimplePanel; + clear(): SimplePanel; + getId(): string; + getTag(): string; + getType(): string; + setHeight(height: string): SimplePanel; + setId(id: string): SimplePanel; + setLayoutData(layout: Object): SimplePanel; + setPixelSize(width: Integer, height: Integer): SimplePanel; + setSize(width: string, height: string): SimplePanel; + setStyleAttribute(attribute: string, value: string): SimplePanel; + setStyleAttributes(attributes: Object): SimplePanel; + setStyleName(styleName: string): SimplePanel; + setStylePrimaryName(styleName: string): SimplePanel; + setTag(tag: string): SimplePanel; + setTitle(title: string): SimplePanel; + setVisible(visible: boolean): SimplePanel; + setWidget(widget: Widget): SimplePanel; + setWidth(width: string): SimplePanel; + } + + /** + * + * Deprecated. The UI service was + * + * deprecated on December 11, 2014. To create user interfaces, use the + * HTML service instead. + * A simple radio button widget, with no label. + * + * SimpleRadioButtons are grouped according to the same rules as RadioButtons. + * + * Internally, UiApp widgets are built on top of the + * Google Web Toolkit, and it can sometimes be helpful to look at the GWT documentation + * directly. You can find the SimpleRadioButton documentation here. + */ + export interface SimpleRadioButton { + addBlurHandler(handler: Handler): SimpleRadioButton; + addClickHandler(handler: Handler): SimpleRadioButton; + addFocusHandler(handler: Handler): SimpleRadioButton; + addKeyDownHandler(handler: Handler): SimpleRadioButton; + addKeyPressHandler(handler: Handler): SimpleRadioButton; + addKeyUpHandler(handler: Handler): SimpleRadioButton; + addMouseDownHandler(handler: Handler): SimpleRadioButton; + addMouseMoveHandler(handler: Handler): SimpleRadioButton; + addMouseOutHandler(handler: Handler): SimpleRadioButton; + addMouseOverHandler(handler: Handler): SimpleRadioButton; + addMouseUpHandler(handler: Handler): SimpleRadioButton; + addMouseWheelHandler(handler: Handler): SimpleRadioButton; + addStyleDependentName(styleName: string): SimpleRadioButton; + addStyleName(styleName: string): SimpleRadioButton; + getId(): string; + getTag(): string; + getType(): string; + setAccessKey(accessKey: Char): SimpleRadioButton; + setChecked(checked: boolean): SimpleRadioButton; + setEnabled(enabled: boolean): SimpleRadioButton; + setFocus(focus: boolean): SimpleRadioButton; + setHeight(height: string): SimpleRadioButton; + setId(id: string): SimpleRadioButton; + setLayoutData(layout: Object): SimpleRadioButton; + setName(name: string): SimpleRadioButton; + setPixelSize(width: Integer, height: Integer): SimpleRadioButton; + setSize(width: string, height: string): SimpleRadioButton; + setStyleAttribute(attribute: string, value: string): SimpleRadioButton; + setStyleAttributes(attributes: Object): SimpleRadioButton; + setStyleName(styleName: string): SimpleRadioButton; + setStylePrimaryName(styleName: string): SimpleRadioButton; + setTabIndex(index: Integer): SimpleRadioButton; + setTag(tag: string): SimpleRadioButton; + setTitle(title: string): SimpleRadioButton; + setVisible(visible: boolean): SimpleRadioButton; + setWidth(width: string): SimpleRadioButton; + } + + /** + * + * Deprecated. The UI service was + * + * deprecated on December 11, 2014. To create user interfaces, use the + * HTML service instead. + * A panel that adds user-positioned splitters between each of its child widgets. + * + * This panel is similar to a DockLayoutPanel, but each pair of child widgets has a splitter + * between them that the user can drag. + * + * Internally, UiApp widgets are built on top of the + * Google Web Toolkit, and it can sometimes be helpful to look at the GWT documentation + * directly. You can find the SplitLayoutPanel documentation here. + */ + export interface SplitLayoutPanel { + add(widget: Widget): SplitLayoutPanel; + addEast(widget: Widget, width: Number): SplitLayoutPanel; + addNorth(widget: Widget, height: Number): SplitLayoutPanel; + addSouth(widget: Widget, height: Number): SplitLayoutPanel; + addStyleDependentName(styleName: string): SplitLayoutPanel; + addStyleName(styleName: string): SplitLayoutPanel; + addWest(widget: Widget, width: Number): SplitLayoutPanel; + clear(): SplitLayoutPanel; + getId(): string; + getTag(): string; + getType(): string; + remove(index: Integer): SplitLayoutPanel; + remove(widget: Widget): SplitLayoutPanel; + setHeight(height: string): SplitLayoutPanel; + setId(id: string): SplitLayoutPanel; + setLayoutData(layout: Object): SplitLayoutPanel; + setPixelSize(width: Integer, height: Integer): SplitLayoutPanel; + setSize(width: string, height: string): SplitLayoutPanel; + setStyleAttribute(attribute: string, value: string): SplitLayoutPanel; + setStyleAttributes(attributes: Object): SplitLayoutPanel; + setStyleName(styleName: string): SplitLayoutPanel; + setStylePrimaryName(styleName: string): SplitLayoutPanel; + setTag(tag: string): SplitLayoutPanel; + setTitle(title: string): SplitLayoutPanel; + setVisible(visible: boolean): SplitLayoutPanel; + setWidgetMinSize(widget: Widget, minSize: Integer): SplitLayoutPanel; + setWidth(width: string): SplitLayoutPanel; + } + + /** + * + * Deprecated. The UI service was + * + * deprecated on December 11, 2014. To create user interfaces, use the + * HTML service instead. + * A panel that stacks its children vertically, displaying only one at a time, + * with a header for each child which the user can click to display. + * + * Internally, UiApp widgets are built on top of the + * Google Web Toolkit, and it can sometimes be helpful to look at the GWT documentation + * directly. You can find the StackPanel documentation here. + */ + export interface StackPanel { + add(widget: Widget): StackPanel; + add(widget: Widget, text: string): StackPanel; + add(widget: Widget, text: string, asHtml: boolean): StackPanel; + addStyleDependentName(styleName: string): StackPanel; + addStyleName(styleName: string): StackPanel; + clear(): StackPanel; + getId(): string; + getTag(): string; + getType(): string; + remove(index: Integer): StackPanel; + remove(widget: Widget): StackPanel; + setHeight(height: string): StackPanel; + setId(id: string): StackPanel; + setLayoutData(layout: Object): StackPanel; + setPixelSize(width: Integer, height: Integer): StackPanel; + setSize(width: string, height: string): StackPanel; + setStackText(index: Integer, text: string): StackPanel; + setStackText(index: Integer, text: string, asHtml: boolean): StackPanel; + setStyleAttribute(attribute: string, value: string): StackPanel; + setStyleAttributes(attributes: Object): StackPanel; + setStyleName(styleName: string): StackPanel; + setStylePrimaryName(styleName: string): StackPanel; + setTag(tag: string): StackPanel; + setTitle(title: string): StackPanel; + setVisible(visible: boolean): StackPanel; + setWidth(width: string): StackPanel; + } + + /** + * + * Deprecated. The UI service was + * + * deprecated on December 11, 2014. To create user interfaces, use the + * HTML service instead. + * A standard push-button widget which will automatically submit its enclosing FormPanel if + * any. + * + * Here is an example of how to use this widget: + * + * function doGet() { + * var app = UiApp.createApplication(); + * var form = app.createFormPanel(); + * var flow = app.createFlowPanel(); + * flow.add(app.createTextBox().setName("textBox")); + * flow.add(app.createSubmitButton("Submit")); + * form.add(flow); + * app.add(form); + * return app; + * } + * + * function doPost(eventInfo) { + * var app = UiApp.getActiveApplication(); + * app.add(app.createLabel("Form submitted. The text box's value was '" + + * eventInfo.parameter.textBox + "'")); + * return app; + * } + * + * Internally, UiApp widgets are built on top of the + * Google Web Toolkit, and it can sometimes be helpful to look at the GWT documentation + * directly. You can find the SubmitButton documentation here. + */ + export interface SubmitButton { + addBlurHandler(handler: Handler): SubmitButton; + addClickHandler(handler: Handler): SubmitButton; + addFocusHandler(handler: Handler): SubmitButton; + addKeyDownHandler(handler: Handler): SubmitButton; + addKeyPressHandler(handler: Handler): SubmitButton; + addKeyUpHandler(handler: Handler): SubmitButton; + addMouseDownHandler(handler: Handler): SubmitButton; + addMouseMoveHandler(handler: Handler): SubmitButton; + addMouseOutHandler(handler: Handler): SubmitButton; + addMouseOverHandler(handler: Handler): SubmitButton; + addMouseUpHandler(handler: Handler): SubmitButton; + addMouseWheelHandler(handler: Handler): SubmitButton; + addStyleDependentName(styleName: string): SubmitButton; + addStyleName(styleName: string): SubmitButton; + getId(): string; + getTag(): string; + getType(): string; + setAccessKey(accessKey: Char): SubmitButton; + setEnabled(enabled: boolean): SubmitButton; + setFocus(focus: boolean): SubmitButton; + setHTML(html: string): SubmitButton; + setHeight(height: string): SubmitButton; + setId(id: string): SubmitButton; + setLayoutData(layout: Object): SubmitButton; + setPixelSize(width: Integer, height: Integer): SubmitButton; + setSize(width: string, height: string): SubmitButton; + setStyleAttribute(attribute: string, value: string): SubmitButton; + setStyleAttributes(attributes: Object): SubmitButton; + setStyleName(styleName: string): SubmitButton; + setStylePrimaryName(styleName: string): SubmitButton; + setTabIndex(index: Integer): SubmitButton; + setTag(tag: string): SubmitButton; + setText(text: string): SubmitButton; + setTitle(title: string): SubmitButton; + setVisible(visible: boolean): SubmitButton; + setWidth(width: string): SubmitButton; + } + + /** + * + * Deprecated. This class is deprecated and should not be used in new scripts. + * A SuggestBox is a text box or text area which displays a + * pre-configured set of selections that match the user's input. + * + * This widget is not currently functional. + * + * Internally, UiApp widgets are built on top of the + * Google Web Toolkit, and it can sometimes be helpful to look at the GWT documentation + * directly. You can find the SuggestBox documentation here. + */ + export interface SuggestBox { + addKeyDownHandler(handler: Handler): SuggestBox; + addKeyPressHandler(handler: Handler): SuggestBox; + addKeyUpHandler(handler: Handler): SuggestBox; + addSelectionHandler(handler: Handler): SuggestBox; + addStyleDependentName(styleName: string): SuggestBox; + addStyleName(styleName: string): SuggestBox; + addValueChangeHandler(handler: Handler): SuggestBox; + getId(): string; + getTag(): string; + getType(): string; + setAccessKey(accessKey: Char): SuggestBox; + setAnimationEnabled(animationEnabled: boolean): SuggestBox; + setAutoSelectEnabled(autoSelectEnabled: boolean): SuggestBox; + setFocus(focus: boolean): SuggestBox; + setHeight(height: string): SuggestBox; + setId(id: string): SuggestBox; + setLayoutData(layout: Object): SuggestBox; + setLimit(limit: Integer): SuggestBox; + setPixelSize(width: Integer, height: Integer): SuggestBox; + setPopupStyleName(styleName: string): SuggestBox; + setSize(width: string, height: string): SuggestBox; + setStyleAttribute(attribute: string, value: string): SuggestBox; + setStyleAttributes(attributes: Object): SuggestBox; + setStyleName(styleName: string): SuggestBox; + setStylePrimaryName(styleName: string): SuggestBox; + setTabIndex(index: Integer): SuggestBox; + setTag(tag: string): SuggestBox; + setText(text: string): SuggestBox; + setTitle(title: string): SuggestBox; + setValue(value: string): SuggestBox; + setValue(value: string, fireEvents: boolean): SuggestBox; + setVisible(visible: boolean): SuggestBox; + setWidth(width: string): SuggestBox; + } + + /** + * + * Deprecated. The UI service was + * + * deprecated on December 11, 2014. To create user interfaces, use the + * HTML service instead. + * A horizontal bar of folder-style tabs, most commonly used as part of a TabPanel. + * + * Internally, UiApp widgets are built on top of the + * Google Web Toolkit, and it can sometimes be helpful to look at the GWT documentation + * directly. You can find the TabBar documentation here. + */ + export interface TabBar { + addBeforeSelectionHandler(handler: Handler): TabBar; + addSelectionHandler(handler: Handler): TabBar; + addStyleDependentName(styleName: string): TabBar; + addStyleName(styleName: string): TabBar; + addTab(title: string): TabBar; + addTab(title: string, asHtml: boolean): TabBar; + addTab(widget: Widget): TabBar; + getId(): string; + getTag(): string; + getType(): string; + selectTab(index: Integer): TabBar; + setHeight(height: string): TabBar; + setId(id: string): TabBar; + setLayoutData(layout: Object): TabBar; + setPixelSize(width: Integer, height: Integer): TabBar; + setSize(width: string, height: string): TabBar; + setStyleAttribute(attribute: string, value: string): TabBar; + setStyleAttributes(attributes: Object): TabBar; + setStyleName(styleName: string): TabBar; + setStylePrimaryName(styleName: string): TabBar; + setTabEnabled(index: Integer, enabled: boolean): TabBar; + setTabText(index: Integer, text: string): TabBar; + setTag(tag: string): TabBar; + setTitle(title: string): TabBar; + setVisible(visible: boolean): TabBar; + setWidth(width: string): TabBar; + } + + /** + * + * Deprecated. The UI service was + * + * deprecated on December 11, 2014. To create user interfaces, use the + * HTML service instead. + * A panel that represents a tabbed set of pages, each of which contains another + * widget. Its child widgets are shown as the user selects the various tabs + * associated with them. + * + * Internally, UiApp widgets are built on top of the + * Google Web Toolkit, and it can sometimes be helpful to look at the GWT documentation + * directly. You can find the TabPanel documentation here. + */ + export interface TabPanel { + add(widget: Widget): TabPanel; + add(widget: Widget, text: string): TabPanel; + add(widget: Widget, text: string, asHtml: boolean): TabPanel; + add(widget: Widget, tabWidget: Widget): TabPanel; + addBeforeSelectionHandler(handler: Handler): TabPanel; + addSelectionHandler(handler: Handler): TabPanel; + addStyleDependentName(styleName: string): TabPanel; + addStyleName(styleName: string): TabPanel; + getId(): string; + getTag(): string; + getType(): string; + selectTab(index: Integer): TabPanel; + setAnimationEnabled(animationEnabled: boolean): TabPanel; + setHeight(height: string): TabPanel; + setId(id: string): TabPanel; + setLayoutData(layout: Object): TabPanel; + setPixelSize(width: Integer, height: Integer): TabPanel; + setSize(width: string, height: string): TabPanel; + setStyleAttribute(attribute: string, value: string): TabPanel; + setStyleAttributes(attributes: Object): TabPanel; + setStyleName(styleName: string): TabPanel; + setStylePrimaryName(styleName: string): TabPanel; + setTag(tag: string): TabPanel; + setTitle(title: string): TabPanel; + setVisible(visible: boolean): TabPanel; + setWidth(width: string): TabPanel; + } + + /** + * + * Deprecated. The UI service was + * + * deprecated on December 11, 2014. To create user interfaces, use the + * HTML service instead. + * A text box that allows multiple lines of text to be entered. + * + * Here is an example of how to use this widget: + * + * function doGet() { + * var app = UiApp.createApplication(); + * var text = app.createTextArea().setName("text"); + * var handler = app.createServerHandler("count").addCallbackElement(text); + * app.add(text); + * app.add(app.createButton("Count", handler)); + * app.add(app.createLabel("0 characters").setId("label")); + * return app; + * } + * + * function count(eventInfo) { + * var app = UiApp.createApplication(); + * // Because the text area was named "text" and added as a callback element to the + * // button's click event, we have its value available in eventInfo.parameter.text. + * app.getElementById("label").setText(eventInfo.parameter.text.length + " characters"); + * return app; + * } + * + * Internally, UiApp widgets are built on top of the + * Google Web Toolkit, and it can sometimes be helpful to look at the GWT documentation + * directly. You can find the TextArea documentation here. + */ + export interface TextArea { + addBlurHandler(handler: Handler): TextArea; + addChangeHandler(handler: Handler): TextArea; + addClickHandler(handler: Handler): TextArea; + addFocusHandler(handler: Handler): TextArea; + addKeyDownHandler(handler: Handler): TextArea; + addKeyPressHandler(handler: Handler): TextArea; + addKeyUpHandler(handler: Handler): TextArea; + addMouseDownHandler(handler: Handler): TextArea; + addMouseMoveHandler(handler: Handler): TextArea; + addMouseOutHandler(handler: Handler): TextArea; + addMouseOverHandler(handler: Handler): TextArea; + addMouseUpHandler(handler: Handler): TextArea; + addMouseWheelHandler(handler: Handler): TextArea; + addStyleDependentName(styleName: string): TextArea; + addStyleName(styleName: string): TextArea; + addValueChangeHandler(handler: Handler): TextArea; + getId(): string; + getTag(): string; + getType(): string; + setAccessKey(accessKey: Char): TextArea; + setCharacterWidth(width: Integer): TextArea; + setCursorPos(position: Integer): TextArea; + setDirection(direction: Component): TextArea; + setEnabled(enabled: boolean): TextArea; + setFocus(focus: boolean): TextArea; + setHeight(height: string): TextArea; + setId(id: string): TextArea; + setLayoutData(layout: Object): TextArea; + setName(name: string): TextArea; + setPixelSize(width: Integer, height: Integer): TextArea; + setReadOnly(readOnly: boolean): TextArea; + setSelectionRange(position: Integer, length: Integer): TextArea; + setSize(width: string, height: string): TextArea; + setStyleAttribute(attribute: string, value: string): TextArea; + setStyleAttributes(attributes: Object): TextArea; + setStyleName(styleName: string): TextArea; + setStylePrimaryName(styleName: string): TextArea; + setTabIndex(index: Integer): TextArea; + setTag(tag: string): TextArea; + setText(text: string): TextArea; + setTextAlignment(textAlign: Component): TextArea; + setTitle(title: string): TextArea; + setValue(value: string): TextArea; + setValue(value: string, fireEvents: boolean): TextArea; + setVisible(visible: boolean): TextArea; + setVisibleLines(lines: Integer): TextArea; + setWidth(width: string): TextArea; + } + + /** + * + * Deprecated. The UI service was + * + * deprecated on December 11, 2014. To create user interfaces, use the + * HTML service instead. + * A standard single-line text box. + * + * Here is an example of how to use this widget: + * + * function doGet() { + * var app = UiApp.createApplication(); + * var text = app.createTextBox().setName("text"); + * var handler = app.createServerHandler("count").addCallbackElement(text); + * app.add(text); + * app.add(app.createButton("Count", handler)); + * app.add(app.createLabel("0 characters").setId("label")); + * return app; + * } + * + * function count(eventInfo) { + * var app = UiApp.createApplication(); + * // Because the text box was named "text" and added as a callback element to the + * // button's click event, we have its value available in eventInfo.parameter.text. + * app.getElementById("label").setText(eventInfo.parameter.text.length + " characters"); + * return app; + * } + * + * Internally, UiApp widgets are built on top of the + * Google Web Toolkit, and it can sometimes be helpful to look at the GWT documentation + * directly. You can find the TextBox documentation here. + */ + export interface TextBox { + addBlurHandler(handler: Handler): TextBox; + addChangeHandler(handler: Handler): TextBox; + addClickHandler(handler: Handler): TextBox; + addFocusHandler(handler: Handler): TextBox; + addKeyDownHandler(handler: Handler): TextBox; + addKeyPressHandler(handler: Handler): TextBox; + addKeyUpHandler(handler: Handler): TextBox; + addMouseDownHandler(handler: Handler): TextBox; + addMouseMoveHandler(handler: Handler): TextBox; + addMouseOutHandler(handler: Handler): TextBox; + addMouseOverHandler(handler: Handler): TextBox; + addMouseUpHandler(handler: Handler): TextBox; + addMouseWheelHandler(handler: Handler): TextBox; + addStyleDependentName(styleName: string): TextBox; + addStyleName(styleName: string): TextBox; + addValueChangeHandler(handler: Handler): TextBox; + getId(): string; + getTag(): string; + getType(): string; + setAccessKey(accessKey: Char): TextBox; + setCursorPos(position: Integer): TextBox; + setDirection(direction: Component): TextBox; + setEnabled(enabled: boolean): TextBox; + setFocus(focus: boolean): TextBox; + setHeight(height: string): TextBox; + setId(id: string): TextBox; + setLayoutData(layout: Object): TextBox; + setMaxLength(length: Integer): TextBox; + setName(name: string): TextBox; + setPixelSize(width: Integer, height: Integer): TextBox; + setReadOnly(readOnly: boolean): TextBox; + setSelectionRange(position: Integer, length: Integer): TextBox; + setSize(width: string, height: string): TextBox; + setStyleAttribute(attribute: string, value: string): TextBox; + setStyleAttributes(attributes: Object): TextBox; + setStyleName(styleName: string): TextBox; + setStylePrimaryName(styleName: string): TextBox; + setTabIndex(index: Integer): TextBox; + setTag(tag: string): TextBox; + setText(text: string): TextBox; + setTextAlignment(textAlign: Component): TextBox; + setTitle(title: string): TextBox; + setValue(value: string): TextBox; + setValue(value: string, fireEvents: boolean): TextBox; + setVisible(visible: boolean): TextBox; + setVisibleLength(length: Integer): TextBox; + setWidth(width: string): TextBox; + } + + /** + * + * Deprecated. The UI service was + * + * deprecated on December 11, 2014. To create user interfaces, use the + * HTML service instead. + * A ToggleButton is a stylish stateful button which allows the + * user to toggle between up and down states. + * + * Internally, UiApp widgets are built on top of the + * Google Web Toolkit, and it can sometimes be helpful to look at the GWT documentation + * directly. You can find the ToggleButton documentation here. + */ + export interface ToggleButton { + addBlurHandler(handler: Handler): ToggleButton; + addClickHandler(handler: Handler): ToggleButton; + addFocusHandler(handler: Handler): ToggleButton; + addKeyDownHandler(handler: Handler): ToggleButton; + addKeyPressHandler(handler: Handler): ToggleButton; + addKeyUpHandler(handler: Handler): ToggleButton; + addMouseDownHandler(handler: Handler): ToggleButton; + addMouseMoveHandler(handler: Handler): ToggleButton; + addMouseOutHandler(handler: Handler): ToggleButton; + addMouseOverHandler(handler: Handler): ToggleButton; + addMouseUpHandler(handler: Handler): ToggleButton; + addMouseWheelHandler(handler: Handler): ToggleButton; + addStyleDependentName(styleName: string): ToggleButton; + addStyleName(styleName: string): ToggleButton; + getId(): string; + getTag(): string; + getType(): string; + setAccessKey(accessKey: Char): ToggleButton; + setDown(down: boolean): ToggleButton; + setEnabled(enabled: boolean): ToggleButton; + setFocus(focus: boolean): ToggleButton; + setHTML(html: string): ToggleButton; + setHeight(height: string): ToggleButton; + setId(id: string): ToggleButton; + setLayoutData(layout: Object): ToggleButton; + setPixelSize(width: Integer, height: Integer): ToggleButton; + setSize(width: string, height: string): ToggleButton; + setStyleAttribute(attribute: string, value: string): ToggleButton; + setStyleAttributes(attributes: Object): ToggleButton; + setStyleName(styleName: string): ToggleButton; + setStylePrimaryName(styleName: string): ToggleButton; + setTabIndex(index: Integer): ToggleButton; + setTag(tag: string): ToggleButton; + setText(text: string): ToggleButton; + setTitle(title: string): ToggleButton; + setVisible(visible: boolean): ToggleButton; + setWidth(width: string): ToggleButton; + } + + /** + * + * Deprecated. The UI service was + * + * deprecated on December 11, 2014. To create user interfaces, use the + * HTML service instead. + * A standard hierarchical tree widget. The tree contains a hierarchy of + * TreeItems that the user can open, close, and select. + * + * Internally, UiApp widgets are built on top of the + * Google Web Toolkit, and it can sometimes be helpful to look at the GWT documentation + * directly. You can find the Tree documentation here. + */ + export interface Tree { + add(widget: Widget): Tree; + addBlurHandler(handler: Handler): Tree; + addCloseHandler(handler: Handler): Tree; + addFocusHandler(handler: Handler): Tree; + addItem(text: string): Tree; + addItem(item: TreeItem): Tree; + addItem(widget: Widget): Tree; + addKeyDownHandler(handler: Handler): Tree; + addKeyPressHandler(handler: Handler): Tree; + addKeyUpHandler(handler: Handler): Tree; + addMouseDownHandler(handler: Handler): Tree; + addMouseMoveHandler(handler: Handler): Tree; + addMouseOutHandler(handler: Handler): Tree; + addMouseOverHandler(handler: Handler): Tree; + addMouseUpHandler(handler: Handler): Tree; + addMouseWheelHandler(handler: Handler): Tree; + addOpenHandler(handler: Handler): Tree; + addSelectionHandler(handler: Handler): Tree; + addStyleDependentName(styleName: string): Tree; + addStyleName(styleName: string): Tree; + clear(): Tree; + getId(): string; + getTag(): string; + getType(): string; + setAccessKey(accessKey: Char): Tree; + setAnimationEnabled(animationEnabled: boolean): Tree; + setFocus(focus: boolean): Tree; + setHeight(height: string): Tree; + setId(id: string): Tree; + setLayoutData(layout: Object): Tree; + setPixelSize(width: Integer, height: Integer): Tree; + setSelectedItem(item: TreeItem): Tree; + setSelectedItem(item: TreeItem, fireEvents: boolean): Tree; + setSize(width: string, height: string): Tree; + setStyleAttribute(attribute: string, value: string): Tree; + setStyleAttributes(attributes: Object): Tree; + setStyleName(styleName: string): Tree; + setStylePrimaryName(styleName: string): Tree; + setTabIndex(index: Integer): Tree; + setTag(tag: string): Tree; + setTitle(title: string): Tree; + setVisible(visible: boolean): Tree; + setWidth(width: string): Tree; + } + + /** + * + * Deprecated. The UI service was + * + * deprecated on December 11, 2014. To create user interfaces, use the + * HTML service instead. + * An item that can be contained within a Tree. + * + * Internally, UiApp widgets are built on top of the + * Google Web Toolkit, and it can sometimes be helpful to look at the GWT documentation + * directly. You can find the TreeItem documentation here. + */ + export interface TreeItem { + addItem(text: string): TreeItem; + addItem(item: TreeItem): TreeItem; + addItem(widget: Widget): TreeItem; + addStyleDependentName(styleName: string): TreeItem; + addStyleName(styleName: string): TreeItem; + clear(): TreeItem; + getId(): string; + getTag(): string; + getType(): string; + setHTML(html: string): TreeItem; + setHeight(height: string): TreeItem; + setId(id: string): TreeItem; + setPixelSize(width: Integer, height: Integer): TreeItem; + setSelected(selected: boolean): TreeItem; + setSize(width: string, height: string): TreeItem; + setState(open: boolean): TreeItem; + setState(open: boolean, fireEvents: boolean): TreeItem; + setStyleAttribute(attribute: string, value: string): TreeItem; + setStyleAttributes(attributes: Object): TreeItem; + setStyleName(styleName: string): TreeItem; + setStylePrimaryName(styleName: string): TreeItem; + setTag(tag: string): TreeItem; + setText(text: string): TreeItem; + setTitle(title: string): TreeItem; + setUserObject(a: Object): TreeItem; + setVisible(visible: boolean): TreeItem; + setWidget(widget: Widget): TreeItem; + setWidth(width: string): TreeItem; + } + + /** + * + * Deprecated. The UI service was + * + * deprecated on December 11, 2014. To create user interfaces, use the + * HTML service instead. + * Create user interfaces for use inside Google Apps or as standalone services. + */ + export interface UiApp { + DateTimeFormat: DateTimeFormat + FileType: FileType + HorizontalAlignment: HorizontalAlignment + VerticalAlignment: VerticalAlignment + createApplication(): UiInstance; + getActiveApplication(): UiInstance; + getUserAgent(): string; + } + + /** + * + * Deprecated. The UI service was + * + * deprecated on December 11, 2014. To create user interfaces, use the + * HTML service instead. + * A representation of a user interface. + * + * You can use this to create a new user interface or manipulate an existing one. + */ + export interface UiInstance { + add(child: Widget): UiInstance; + close(): UiInstance; + createAbsolutePanel(): AbsolutePanel; + createAnchor(text: string, asHtml: boolean, href: string): Anchor; + createAnchor(text: string, href: string): Anchor; + createButton(): Button; + createButton(html: string): Button; + createButton(html: string, clickHandler: Handler): Button; + createCaptionPanel(): CaptionPanel; + createCaptionPanel(caption: string): CaptionPanel; + createCaptionPanel(caption: string, asHtml: boolean): CaptionPanel; + createCheckBox(): CheckBox; + createCheckBox(label: string): CheckBox; + createCheckBox(label: string, asHtml: boolean): CheckBox; + createClientHandler(): ClientHandler; + createDateBox(): DateBox; + createDatePicker(): DatePicker; + createDecoratedStackPanel(): DecoratedStackPanel; + createDecoratedTabBar(): DecoratedTabBar; + createDecoratedTabPanel(): DecoratedTabPanel; + createDecoratorPanel(): DecoratorPanel; + createDialogBox(): DialogBox; + createDialogBox(autoHide: boolean): DialogBox; + createDialogBox(autoHide: boolean, modal: boolean): DialogBox; + createDocsListDialog(): DocsListDialog; + createFileUpload(): FileUpload; + createFlexTable(): FlexTable; + createFlowPanel(): FlowPanel; + createFocusPanel(): FocusPanel; + createFocusPanel(child: Widget): FocusPanel; + createFormPanel(): FormPanel; + createGrid(): Grid; + createGrid(rows: Integer, columns: Integer): Grid; + createHTML(): HTML; + createHTML(html: string): HTML; + createHTML(html: string, wordWrap: boolean): HTML; + createHidden(): Hidden; + createHidden(name: string): Hidden; + createHidden(name: string, value: string): Hidden; + createHorizontalPanel(): HorizontalPanel; + createImage(): Image; + createImage(url: string): Image; + createImage(url: string, left: Integer, top: Integer, width: Integer, height: Integer): Image; + createInlineLabel(): InlineLabel; + createInlineLabel(text: string): InlineLabel; + createLabel(): Label; + createLabel(text: string): Label; + createLabel(text: string, wordWrap: boolean): Label; + createListBox(): ListBox; + createListBox(isMultipleSelect: boolean): ListBox; + createMenuBar(): MenuBar; + createMenuBar(vertical: boolean): MenuBar; + createMenuItem(text: string, asHtml: boolean, command: Handler): MenuItem; + createMenuItem(text: string, command: Handler): MenuItem; + createMenuItemSeparator(): MenuItemSeparator; + createPasswordTextBox(): PasswordTextBox; + createPopupPanel(): PopupPanel; + createPopupPanel(autoHide: boolean): PopupPanel; + createPopupPanel(autoHide: boolean, modal: boolean): PopupPanel; + createPushButton(): PushButton; + createPushButton(upText: string): PushButton; + createPushButton(upText: string, clickHandler: Handler): PushButton; + createPushButton(upText: string, downText: string): PushButton; + createPushButton(upText: string, downText: string, clickHandler: Handler): PushButton; + createRadioButton(name: string): RadioButton; + createRadioButton(name: string, label: string): RadioButton; + createRadioButton(name: string, label: string, asHtml: boolean): RadioButton; + createResetButton(): ResetButton; + createResetButton(html: string): ResetButton; + createResetButton(html: string, clickHandler: Handler): ResetButton; + createScrollPanel(): ScrollPanel; + createScrollPanel(child: Widget): ScrollPanel; + createServerBlurHandler(): ServerHandler; + createServerBlurHandler(functionName: string): ServerHandler; + createServerChangeHandler(): ServerHandler; + createServerChangeHandler(functionName: string): ServerHandler; + createServerClickHandler(): ServerHandler; + createServerClickHandler(functionName: string): ServerHandler; + createServerCloseHandler(): ServerHandler; + createServerCloseHandler(functionName: string): ServerHandler; + createServerCommand(): ServerHandler; + createServerCommand(functionName: string): ServerHandler; + createServerErrorHandler(): ServerHandler; + createServerErrorHandler(functionName: string): ServerHandler; + createServerFocusHandler(): ServerHandler; + createServerFocusHandler(functionName: string): ServerHandler; + createServerHandler(): ServerHandler; + createServerHandler(functionName: string): ServerHandler; + createServerInitializeHandler(): ServerHandler; + createServerInitializeHandler(functionName: string): ServerHandler; + createServerKeyHandler(): ServerHandler; + createServerKeyHandler(functionName: string): ServerHandler; + createServerLoadHandler(): ServerHandler; + createServerLoadHandler(functionName: string): ServerHandler; + createServerMouseHandler(): ServerHandler; + createServerMouseHandler(functionName: string): ServerHandler; + createServerScrollHandler(): ServerHandler; + createServerScrollHandler(functionName: string): ServerHandler; + createServerSelectionHandler(): ServerHandler; + createServerSelectionHandler(functionName: string): ServerHandler; + createServerSubmitHandler(): ServerHandler; + createServerSubmitHandler(functionName: string): ServerHandler; + createServerValueChangeHandler(): ServerHandler; + createServerValueChangeHandler(functionName: string): ServerHandler; + createSimpleCheckBox(): SimpleCheckBox; + createSimplePanel(): SimplePanel; + createSimpleRadioButton(name: string): SimpleRadioButton; + createSplitLayoutPanel(): SplitLayoutPanel; + createStackPanel(): StackPanel; + createSubmitButton(): SubmitButton; + createSubmitButton(html: string): SubmitButton; + createSuggestBox(): SuggestBox; + createTabBar(): TabBar; + createTabPanel(): TabPanel; + createTextArea(): TextArea; + createTextBox(): TextBox; + createToggleButton(): ToggleButton; + createToggleButton(upText: string): ToggleButton; + createToggleButton(upText: string, clickHandler: Handler): ToggleButton; + createToggleButton(upText: string, downText: string): ToggleButton; + createTree(): Tree; + createTreeItem(): TreeItem; + createTreeItem(text: string): TreeItem; + createTreeItem(child: Widget): TreeItem; + createVerticalPanel(): VerticalPanel; + getElementById(id: string): Component; + getId(): string; + isStandardsMode(): boolean; + loadComponent(componentName: string): Component; + loadComponent(componentName: string, optAdvancedArgs: Object): Component; + remove(index: Integer): UiInstance; + remove(widget: Widget): UiInstance; + setHeight(height: Integer): UiInstance; + setStandardsMode(standardsMode: boolean): UiInstance; + setStyleAttribute(attribute: string, value: string): UiInstance; + setTitle(title: string): UiInstance; + setWidth(width: Integer): UiInstance; + } + + /** + * + * Deprecated. The UI service was + * + * deprecated on December 11, 2014. To create user interfaces, use the + * HTML service instead. + * Vertical alignment constants to use with setVerticalAlignment methods in UiApp. + */ + export enum VerticalAlignment { TOP, MIDDLE, BOTTOM } + + /** + * + * Deprecated. The UI service was + * + * deprecated on December 11, 2014. To create user interfaces, use the + * HTML service instead. + * A panel that lays all of its widgets out in a single vertical column. + * + * Here is an example of how to use this widget: + * + * function doGet() { + * var app = UiApp.createApplication(); + * var panel = app.createVerticalPanel(); + * panel.add(app.createButton("button 1")); + * panel.add(app.createButton("button 2")); + * app.add(panel); + * return app; + * } + * + * Internally, UiApp widgets are built on top of the + * Google Web Toolkit, and it can sometimes be helpful to look at the GWT documentation + * directly. You can find the VerticalPanel documentation + * here. + */ + export interface VerticalPanel { + add(widget: Widget): VerticalPanel; + addStyleDependentName(styleName: string): VerticalPanel; + addStyleName(styleName: string): VerticalPanel; + clear(): VerticalPanel; + getId(): string; + getTag(): string; + getType(): string; + remove(index: Integer): VerticalPanel; + remove(widget: Widget): VerticalPanel; + setBorderWidth(width: Integer): VerticalPanel; + setCellHeight(widget: Widget, height: string): VerticalPanel; + setCellHorizontalAlignment(widget: Widget, horizontalAlignment: HorizontalAlignment): VerticalPanel; + setCellVerticalAlignment(widget: Widget, verticalAlignment: VerticalAlignment): VerticalPanel; + setCellWidth(widget: Widget, width: string): VerticalPanel; + setHeight(height: string): VerticalPanel; + setHorizontalAlignment(horizontalAlignment: HorizontalAlignment): VerticalPanel; + setId(id: string): VerticalPanel; + setLayoutData(layout: Object): VerticalPanel; + setPixelSize(width: Integer, height: Integer): VerticalPanel; + setSize(width: string, height: string): VerticalPanel; + setSpacing(spacing: Integer): VerticalPanel; + setStyleAttribute(attribute: string, value: string): VerticalPanel; + setStyleAttributes(attributes: Object): VerticalPanel; + setStyleName(styleName: string): VerticalPanel; + setStylePrimaryName(styleName: string): VerticalPanel; + setTag(tag: string): VerticalPanel; + setTitle(title: string): VerticalPanel; + setVerticalAlignment(verticalAlignment: VerticalAlignment): VerticalPanel; + setVisible(visible: boolean): VerticalPanel; + setWidth(width: string): VerticalPanel; + } + + /** + * + * Deprecated. The UI service was + * + * deprecated on December 11, 2014. To create user interfaces, use the + * HTML service instead. + * Base interface for UiApp widgets. + * Implementing classes + * + * NameBrief description + * + * AbsolutePanelAn absolute panel positions all of its children absolutely, allowing them to overlap. + * + * AnchorA widget that represents a simple element. + * + * ButtonA standard push-button widget. + * + * CaptionPanelA panel that wraps its contents in a border with a caption that appears in the upper left + * corner of the border. + * + * ChartA Chart object, which can be embedded into documents, UI elements, or used as a static image. + * + * CheckBoxA standard check box widget. + * + * ControlA user interface control object, that drives the data displayed by a DashboardPanel. + * + * DashboardPanelA dashboard is a visual structure that enables the organization and management + * of multiple charts that share the same underlying data. + * + * DateBoxA text box that shows a DatePicker when the user focuses on it. + * + * DatePickerA date picker widget. + * + * DecoratedStackPanelA StackPanel that wraps each item in a 2x3 grid (six box), which allows users to add + * rounded corners. + * + * DecoratedTabBarA TabBar that wraps each tab in a 2x3 grid (six box), which allows users to add rounded corners. + * + * DecoratedTabPanelA TabPanel that uses a DecoratedTabBar with rounded corners. + * + * DecoratorPanelA SimplePanel that wraps its contents in stylized boxes, which can be used to add rounded + * corners to a Widget. + * + * DialogBoxA form of popup that has a caption area at the top and can be dragged by the + * user. + * + * EmbeddedChartRepresents a chart that has been embedded into a Spreadsheet. + * + * FileUploadA widget that wraps the HTML element. + * + * FlexTableA flexible table that creates cells on demand. + * + * FlowPanelA panel that formats its child widgets using the default HTML layout behavior. + * + * FocusPanelA simple panel that makes its contents focusable, and adds the ability to catch mouse and + * keyboard events. + * + * FormPanelA panel that wraps its contents in an HTML element. + * + * GridA rectangular grid that can contain text, html, or a child widget within its cells. + * + * HTMLA widget that contains arbitrary text, which is interpreted as HTML. + * + * HiddenRepresents a hidden field for storing data in the user's browser that can be passed back to a + * handler as a "callback element". + * + * HorizontalPanelA panel that lays all of its widgets out in a single horizontal column. + * + * ImageA widget that displays the image at a given URL. + * + * InlineLabelA widget that contains arbitrary text, not interpreted as HTML. + * + * LabelA widget that contains arbitrary text, not interpreted as HTML. + * + * ListBoxA widget that presents a list of choices to the user, either as a list box or + * as a drop-down list. + * + * MenuBarA standard menu bar widget. + * + * PasswordTextBoxA text box that visually masks its input to prevent eavesdropping. + * + * PopupPanelA panel that can "pop up" over other widgets. + * + * PushButtonA normal push button with custom styling. + * + * RadioButtonA mutually-exclusive selection radio button widget. + * + * ResetButtonA standard push-button widget which will automatically reset its enclosing FormPanel if + * any. + * + * ScrollPanelA panel that wraps its contents in a scrollable element. + * + * SimpleCheckBoxA simple checkbox widget, with no label. + * + * SimplePanelA panel that can contain only one widget. + * + * SimpleRadioButtonA simple radio button widget, with no label. + * + * SplitLayoutPanelA panel that adds user-positioned splitters between each of its child widgets. + * + * StackPanelA panel that stacks its children vertically, displaying only one at a time, + * with a header for each child which the user can click to display. + * + * SubmitButtonA standard push-button widget which will automatically submit its enclosing FormPanel if + * any. + * + * SuggestBoxA SuggestBox is a text box or text area which displays a + * pre-configured set of selections that match the user's input. + * + * TabBarA horizontal bar of folder-style tabs, most commonly used as part of a TabPanel. + * + * TabPanelA panel that represents a tabbed set of pages, each of which contains another + * widget. + * + * TextAreaA text box that allows multiple lines of text to be entered. + * + * TextBoxA standard single-line text box. + * + * ToggleButtonA ToggleButton is a stylish stateful button which allows the + * user to toggle between up and down states. + * + * TreeA standard hierarchical tree widget. + * + * VerticalPanelA panel that lays all of its widgets out in a single vertical column. + */ + export interface Widget { + getId(): string; + getType(): string; + } + + } +} + +declare var UiApp: GoogleAppsScript.UI.UiApp; \ No newline at end of file diff --git a/google-apps-script/google-apps-script.url-fetch.d.ts b/google-apps-script/google-apps-script.url-fetch.d.ts new file mode 100644 index 0000000000..3e30b98095 --- /dev/null +++ b/google-apps-script/google-apps-script.url-fetch.d.ts @@ -0,0 +1,77 @@ +// Type definitions for Google Apps Script 2015-11-12 +// Project: https://developers.google.com/apps-script/ +// Definitions by: motemen +// Definitions: https://github.com/DefinitelyTyped/DefinitelyTyped + +/// +/// + +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; \ No newline at end of file diff --git a/google-apps-script/google-apps-script.utilities.d.ts b/google-apps-script/google-apps-script.utilities.d.ts new file mode 100644 index 0000000000..17d46a91c3 --- /dev/null +++ b/google-apps-script/google-apps-script.utilities.d.ts @@ -0,0 +1,76 @@ +// Type definitions for Google Apps Script 2015-11-12 +// Project: https://developers.google.com/apps-script/ +// Definitions by: motemen +// Definitions: https://github.com/DefinitelyTyped/DefinitelyTyped + +/// +/// + +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; \ No newline at end of file diff --git a/google-apps-script/google-apps-script.xml-service.d.ts b/google-apps-script/google-apps-script.xml-service.d.ts new file mode 100644 index 0000000000..075c6a47e6 --- /dev/null +++ b/google-apps-script/google-apps-script.xml-service.d.ts @@ -0,0 +1,347 @@ +// Type definitions for Google Apps Script 2015-11-12 +// Project: https://developers.google.com/apps-script/ +// Definitions by: motemen +// Definitions: https://github.com/DefinitelyTyped/DefinitelyTyped + +/// + +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 = '' + * + '' + * + '' + * + ''; + * 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 = 'The Amazing Adventures of Kavalier & Clay'; + * 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 = '' + * + '12' + * + '18' + * + '25' + * + ''; + * 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 = 'Text!More text!'; + * 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; \ No newline at end of file diff --git a/google-drive-realtime-api/google-drive-realtime-api.d.ts b/google-drive-realtime-api/google-drive-realtime-api.d.ts index 95f239a349..8d549355db 100644 --- a/google-drive-realtime-api/google-drive-realtime-api.d.ts +++ b/google-drive-realtime-api/google-drive-realtime-api.d.ts @@ -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; } diff --git a/googlemaps/google.maps.d.ts b/googlemaps/google.maps.d.ts index b951a966a8..298f2f6ea6 100644 --- a/googlemaps/google.maps.d.ts +++ b/googlemaps/google.maps.d.ts @@ -1338,6 +1338,7 @@ declare module google.maps { lightness?: number; saturation?: number; visibility?: string; + weight?: number; } /***** Layers *****/ diff --git a/graham_scan/graham_scan-tests.ts b/graham_scan/graham_scan-tests.ts new file mode 100644 index 0000000000..4317db851e --- /dev/null +++ b/graham_scan/graham_scan-tests.ts @@ -0,0 +1,12 @@ +/// + +// 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(); diff --git a/graham_scan/graham_scan.d.ts b/graham_scan/graham_scan.d.ts new file mode 100644 index 0000000000..617df2e7e8 --- /dev/null +++ b/graham_scan/graham_scan.d.ts @@ -0,0 +1,8 @@ +// Type definitions for graham_scan v1.0.2 +// Project: https://github.com/brian3kb/graham_scan_js +// Definitions by: Harm Berntsen +// Definitions: https://github.com/DefinitelyTyped/DefinitelyTyped +declare class ConvexHullGrahamScan { + addPoint(x: number, y: number): void; + getHull(): {x: number, y: number}[]; +} diff --git a/gulp-rev/gulp-rev.d.ts b/gulp-rev/gulp-rev.d.ts index 6cd432b0de..e04a765b72 100644 --- a/gulp-rev/gulp-rev.d.ts +++ b/gulp-rev/gulp-rev.d.ts @@ -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 // Definitions: https://github.com/borisyankov/DefinitelyTyped diff --git a/helmet/helmet-tests.ts b/helmet/helmet-tests.ts new file mode 100644 index 0000000000..04cfcaf363 --- /dev/null +++ b/helmet/helmet-tests.ts @@ -0,0 +1,59 @@ +/// + +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" + }); +} diff --git a/helmet/helmet.d.ts b/helmet/helmet.d.ts new file mode 100644 index 0000000000..fca15b926e --- /dev/null +++ b/helmet/helmet.d.ts @@ -0,0 +1,57 @@ +// Type definitions for helmet +// Project: https://github.com/helmetjs/helmet +// Definitions by: Cyril Schumacher +// 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; +} diff --git a/highcharts/highcharts-tests.ts b/highcharts/highcharts-tests.ts index bfcbc91375..33c3c9e751 100644 --- a/highcharts/highcharts-tests.ts +++ b/highcharts/highcharts-tests.ts @@ -1,4 +1,4 @@ -/// +/// /// function originalTests() { diff --git a/highcharts/highcharts.d.ts b/highcharts/highcharts.d.ts index c7ce6a2d4f..94277ca252 100644 --- a/highcharts/highcharts.d.ts +++ b/highcharts/highcharts.d.ts @@ -3,8 +3,6 @@ // Definitions by: Damiano Gambarotto , Dan Lewi Harkestad // Definitions: https://github.com/borisyankov/DefinitelyTyped -/// - interface HighchartsPosition { align?: string; verticalAlign?: string; diff --git a/highcharts/highstock-tests.ts b/highcharts/highstock-tests.ts index fac6fa676f..5e7013f961 100644 --- a/highcharts/highstock-tests.ts +++ b/highcharts/highstock-tests.ts @@ -1,4 +1,5 @@ -/// +/// +/// 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 () { }] }); }); - diff --git a/highcharts/highstock.d.ts b/highcharts/highstock.d.ts index f5133c54a5..a4560099b4 100644 --- a/highcharts/highstock.d.ts +++ b/highcharts/highstock.d.ts @@ -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 // Definitions: https://github.com/borisyankov/DefinitelyTyped diff --git a/html-to-text/h2t-test.html b/html-to-text/h2t-test.html new file mode 100644 index 0000000000..1a3cafdf6a --- /dev/null +++ b/html-to-text/h2t-test.html @@ -0,0 +1,21 @@ + + + + + + + +

+ bold +

+

+ italic +

+ + + + diff --git a/html-to-text/html-to-text-tests.ts b/html-to-text/html-to-text-tests.ts new file mode 100644 index 0000000000..e49739aa10 --- /dev/null +++ b/html-to-text/html-to-text-tests.ts @@ -0,0 +1,29 @@ +/// + +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 = "

bold

italic

"; +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)); + diff --git a/html-to-text/html-to-text.d.ts b/html-to-text/html-to-text.d.ts new file mode 100644 index 0000000000..ce02e4bfe5 --- /dev/null +++ b/html-to-text/html-to-text.d.ts @@ -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 +// 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 | boolean; + + /** + * By default links are translated the following + * text => 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 ... + * 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; diff --git a/intro.js/intro.js-tests.ts b/intro.js/intro.js-tests.ts new file mode 100644 index 0000000000..b49eb5078e --- /dev/null +++ b/intro.js/intro.js-tests.ts @@ -0,0 +1,54 @@ +/// + +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'); + }); diff --git a/intro.js/intro.js.d.ts b/intro.js/intro.js.d.ts new file mode 100644 index 0000000000..d54a5456ef --- /dev/null +++ b/intro.js/intro.js.d.ts @@ -0,0 +1,70 @@ +// Type definitions for intro.js 1.0.0 +// Project: https://github.com/usablica/intro.js +// Definitions by: Maxime Fabre +// 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; +} diff --git a/jquery.colorbox/jquery.colorbox.d.ts b/jquery.colorbox/jquery.colorbox.d.ts index e13b0bbd52..cc34635a7d 100644 --- a/jquery.colorbox/jquery.colorbox.d.ts +++ b/jquery.colorbox/jquery.colorbox.d.ts @@ -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; diff --git a/jquery.gridster/gridster-tests.ts b/jquery.gridster/gridster-tests.ts index 3672c9555f..99edbb9a82 100644 --- a/jquery.gridster/gridster-tests.ts +++ b/jquery.gridster/gridster-tests.ts @@ -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('
  • The HTML of the widget...
  • ', 2, 1); gridster.remove_widget($('gridster li').eq(3).get(0)); var json = gridster.serialize(); + +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') +} diff --git a/jquery.gridster/gridster.d.ts b/jquery.gridster/gridster.d.ts index e003f0ebcc..89448b4c36 100644 --- a/jquery.gridster/gridster.d.ts +++ b/jquery.gridster/gridster.d.ts @@ -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 // Definitions: https://github.com/borisyankov/DefinitelyTyped @@ -32,13 +32,26 @@ OTHER DEALINGS IN THE SOFTWARE. /// 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; } diff --git a/jqueryui/jqueryui.d.ts b/jqueryui/jqueryui.d.ts index a49a779e28..d9a33ed4fc 100644 --- a/jqueryui/jqueryui.d.ts +++ b/jqueryui/jqueryui.d.ts @@ -590,6 +590,7 @@ declare module JQueryUI { resize?: ResizableEvent; start?: ResizableEvent; stop?: ResizableEvent; + create?: ResizableEvents; } interface Resizable extends Widget, ResizableOptions { diff --git a/js-data-angular/js-data-angular.d.ts b/js-data-angular/js-data-angular.d.ts index 242c6d5ab8..1fff95afb6 100644 --- a/js-data-angular/js-data-angular.d.ts +++ b/js-data-angular/js-data-angular.d.ts @@ -13,16 +13,12 @@ declare module JSData { } interface DS { - - bindAll(resourceName:string, params:DSFilterParams, scope:ng.IScope, expr:string, cb?:(err:DSError, items:Array)=>void):Function; - - bindOne(resourceName:string, id:string | number, scope:ng.IScope, expr:string, cb?:(err:DSError, item:T)=>void):Function; + bindAll(resourceName:string, params:DSFilterParams, scope:ng.IScope, expr:string, cb?:(err:DSError, items:Array>)=>void):Function; + bindOne(resourceName:string, id:string | number, scope:ng.IScope, expr:string, cb?:(err:DSError, item:T & DSInstanceShorthands)=>void):Function; } interface DSResourceDefinition { - - bindAll(params:DSFilterParams, scope:ng.IScope, expr:string, cb?:(err:DSError, items:Array)=>void):Function; - - bindOne(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>)=>void):Function; + bindOne(id:string | number, scope:ng.IScope, expr:string, cb?:(err:DSError, item:T & DSInstanceShorthands)=>void):Function; } -} \ No newline at end of file +} diff --git a/js-data-http/js-data-http-tests.ts b/js-data-http/js-data-http-tests.ts index 00457d7142..390e20aa9e 100644 --- a/js-data-http/js-data-http-tests.ts +++ b/js-data-http/js-data-http-tests.ts @@ -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 diff --git a/js-data-http/js-data-http.d.ts b/js-data-http/js-data-http.d.ts index 295e7cc6f7..5116f3972a 100644 --- a/js-data-http/js-data-http.d.ts +++ b/js-data-http/js-data-http.d.ts @@ -6,7 +6,7 @@ /// declare module JSData { - + interface DSHttpAdapterOptions { serialize?: (resourceName:string, data:any)=>any; deserialize?: (resourceName:string, data:any)=>any; @@ -37,4 +37,8 @@ declare module JSData { } } -declare var DSHttpAdapter:JSData.DSHttpAdapter; \ No newline at end of file +declare var DSHttpAdapter:JSData.DSHttpAdapter; + +declare module 'js-data-http' { + export = DSHttpAdapter; +} diff --git a/js-data/js-data-node-tests.ts b/js-data/js-data-node-tests.ts index a0b39a161b..e1989bb20b 100644 --- a/js-data/js-data-node-tests.ts +++ b/js-data/js-data-node-tests.ts @@ -1,17 +1,15 @@ -/// +/// import JSData = require('js-data'); -//TODO -//import DSRedisAdapter = require('js-data-redis') +import DSHttpAdapter = require('js-data-http') var store = new JSData.DS(); // register and use http by default for async operations -//TODO -//store.registerAdapter('redis', new DSRedisAdapter(), {default: true}); +store.registerAdapter('redis', new DSHttpAdapter(), {default: true}); // simplest model definition var User = store.defineResource('user'); User.find(1).then(function (user: any) { user; // { id: 1, name: 'John' } -}); \ No newline at end of file +}); diff --git a/js-data/js-data-tests.ts b/js-data/js-data-tests.ts index c6fe6d13bb..91bac29875 100644 --- a/js-data/js-data-tests.ts +++ b/js-data/js-data-tests.ts @@ -11,7 +11,7 @@ interface IUser { } interface IUserWithMethod extends IUser { - fullName?: () => string; + fullName:()=>string; } interface IUserWithComputedProperty extends IUser { @@ -20,10 +20,6 @@ interface IUserWithComputedProperty extends IUser { var store = new JSData.DS(); -// register and use http by default for async operations -//TODO -//store.registerAdapter('http', new DSHttpAdapter(), {default: true}); - // simplest model definition var User = store.defineResource('user'); @@ -31,12 +27,12 @@ User.find(1).then(function (user:IUser) { user; // { id: 1, name: 'John' } }); -var user:IUser = User.createInstance({name: 'John'}); +var user:IUser = User.createInstance({name: 'John'}); var store = new JSData.DS(); -var User = store.defineResource('user'); -var user:IUser = User.inject({id: 1, name: 'John'}); -var user2:IUser = User.inject({id: 1, age: 30}); +var User2 = store.defineResource('user'); +var user:IUser = User2.inject({id: 1, name: 'John'}); +var user2:IUser = User2.inject({id: 1, age: 30}); user; // User { id: 1, name: 'John', age: 30 } user2; // User { id: 1, name: 'John', age: 30 } @@ -70,7 +66,7 @@ User.create({ var store = new JSData.DS(); -var UserWithMethod = store.defineResource({ +var UserWithMethodResource = store.defineResource({ name: 'user', methods: { fullName: function () { @@ -79,7 +75,7 @@ var UserWithMethod = store.defineResource({ } }); -var userWithMethod = UserWithMethod.createInstance({first: 'John', last: 'Anderson'}); +var userWithMethod = UserWithMethodResource.createInstance({first: 'John', last: 'Anderson'}); userWithMethod.fullName(); // "John Anderson" @@ -102,7 +98,7 @@ var UserWithComputedProperty = store.defineResource({ } }); -var userWithComputedProperty:IUserWithComputedProperty = UserWithComputedProperty.inject({ +var userWithComputedProperty:IUserWithComputedProperty = UserWithComputedProperty.inject({ id: 1, first: 'John', last: 'Anderson' @@ -284,7 +280,7 @@ Post.filter({ limit: PAGE_SIZE }); -var User = store.defineResource({ +var User3 = store.defineResource({ name: 'user', relations: { hasMany: { @@ -362,7 +358,7 @@ User.find(10).then(function (user:IUser) { user.comments; // undefined user.profile; // undefined - User.loadRelations(user, ['comment', 'profile']).then(function (user:IUser) { + User.loadRelations(user.id, ['comment', 'profile']).then(function (user:IUser) { user.comments; // array user.profile; // object }); @@ -403,24 +399,24 @@ OtherOtherComment.update(1, {content: 'stuff'}, {params: {postId: false}}); // P var store = new JSData.DS({ // set the default - beforeCreate: function (resource, data, cb) { + beforeCreate: function (resource:JSData.DSResourceDefinition, data:any, cb:(err:Error, returnData:any)=>void) { // do something general cb(null, data); } }); -var User = store.defineResource({ +var User4 = store.defineResource({ name: 'user', // set just for this resource - beforeCreate: function (resource, data, cb) { + beforeCreate: function (resource:JSData.DSResourceDefinition, data:any, cb:(err:Error, returnData:any)=>void) { // do something more specific to "users" cb(null, data); } }); -User.create({name: 'John'}, { +User4.create({name: 'John'}, { // set just for this method call - beforeCreate: function (resource, data, cb) { + beforeCreate: function (resource:JSData.DSResourceDefinition, data:any, cb:(err:Error, returnData:any)=>void) { // do something specific for this method call cb(null, data); } @@ -521,4 +517,86 @@ var store = new JSData.DS(); var myResourceDefinition = store.defineResource('myResource'); -myResourceDefinition = store.definitions.myResource; \ No newline at end of file +myResourceDefinition = store.definitions.myResource; + +/** + * Custom action on datastore resource + */ + +interface Resource { + someProp:string; +} + +interface ActionsForResource { + myAction:JSData.DSActionFn; + myOtherAction:JSData.DSActionFn; +} + +var myOtherAction:JSData.DSActionConfig = { + method: 'GET', + endpoint: 'goHere' +}; + +var customActionResource = store.defineResource({ + name: 'actionResource', + actions: { + myAction: { + method: 'POST' + }, + myOtherAction: myOtherAction + } +}); + +customActionResource.myAction(3).then((result)=>{ + + var theCustomResult:number = result; +}); + +customActionResource.myOtherAction(2, {data:'blub'}).then(()=>{ + // success +}); + +customActionResource.find(1).then((result)=>{ + + var aProperty = result.someProp; +}); + +/** + * Instance shorthands + */ + +var customActionResourceInstance = customActionResource.get(1); + +customActionResourceInstance.DSCompute(); +customActionResourceInstance.DSChanges(); +customActionResourceInstance.DSChangeHistory(); +customActionResourceInstance.DSHasChanges(); +customActionResourceInstance.DSLastModified(); +customActionResourceInstance.DSLastSaved(); +customActionResourceInstance.DSPrevious(); +customActionResourceInstance.DSCreate(); +customActionResourceInstance.DSDestroy(); +customActionResourceInstance.DSLoadRelations('myRelation'); +customActionResourceInstance.DSRefresh(); +customActionResourceInstance.DSSave(); +customActionResourceInstance.DSUpdate(); + +/** + * Events + */ + +function myEvtHandler(definition:JSData.DSResourceDefinition, item:Resource) { + +} + +store.on("DS.change", myEvtHandler); +store.off("DS.change", myEvtHandler); +store.emit("DS.change", customActionResource, customActionResourceInstance); + +customActionResource.on("DS.change", myEvtHandler); +customActionResource.off("DS.change", myEvtHandler); +customActionResource.emit("DS.change", customActionResource, customActionResourceInstance); + +customActionResourceInstance.on("DS.change", myEvtHandler); +customActionResourceInstance.off("DS.change", myEvtHandler); +customActionResourceInstance.emit("DS.change", customActionResource, customActionResourceInstance); diff --git a/js-data/js-data.d.ts b/js-data/js-data.d.ts index 604b70e6c4..54b3a77b6a 100644 --- a/js-data/js-data.d.ts +++ b/js-data/js-data.d.ts @@ -1,4 +1,4 @@ -// Type definitions for JSData v1.5.4 +// Type definitions for JSData v2.8.0 // Project: https://github.com/js-data/js-data // Definitions by: Stefan Steinhart // Definitions: https://github.com/borisyankov/DefinitelyTyped @@ -7,135 +7,66 @@ // js-data module (js-data.js) /////////////////////////////////////////////////////////////////////////////// -// defining what exists in JSData and how it looks declare module JSData { interface JSDataPromise { + then(onFulfilled?:(value:R) => U | JSDataPromise, onRejected?:(error:any) => U | JSDataPromise): JSDataPromise; - then(onFulfilled?: (value: R) => U | JSDataPromise, onRejected?: (error: any) => U | JSDataPromise): JSDataPromise; - - catch(onRejected?: (error: any) => U | JSDataPromise): JSDataPromise; + catch(onRejected?:(error:any) => U | JSDataPromise): JSDataPromise; // enhanced with finally finally(finallyCb?:() => U):JSDataPromise; } - //TODO switch to class again when typescript supports open ended class declaration - interface DS { - - new(config?:DSConfiguration):DS; - - // rather undocumented - errors:DSErrors; - - // those are objects containing the defined resources and adapters - definitions:any; - adapters:any; - - defaults:DSConfiguration; - - // async - create(resourceName:string, attrs:Object, options?:DSConfiguration):JSDataPromise; - destroy(resourceName:string, id:string | number, options?:DSAdapterOperationConfiguration):JSDataPromise; - destroyAll(resourceName:string, params?:DSFilterParams, options?:DSAdapterOperationConfiguration):JSDataPromise; - find(resourceName:string, id:string | number, options?:DSAdapterOperationConfiguration):JSDataPromise; - findAll(resourceName:string, params?:DSFilterParams, options?:DSAdapterOperationConfiguration):JSDataPromise>; - loadRelations(resourceName:string, idOrInstance:string | number | Object, relations:string | Array, options?:DSAdapterOperationConfiguration):JSDataPromise; - update(resourceName:string, id:string | number, attrs:Object, options?:DSSaveConfiguration):JSDataPromise; - updateAll(resourceName:string, attrs:Object, params?:DSFilterParams, options?:DSAdapterOperationConfiguration):JSDataPromise>; - reap(resourceName:string, options?:DSConfiguration):JSDataPromise; - refresh(resourceName:string, id:string | number, options?:DSAdapterOperationConfiguration):JSDataPromise; - save(resourceName:string, id:string | number, options?:DSSaveConfiguration):JSDataPromise; - - // sync - changeHistory(resourceName:string, id?:string | number):Array; - changes(resourceName:string, id:string | number):Object; - compute(resourceName:string, idOrInstance:number | string | Object ):T; - createInstance(resourceName:string, attrs?:T, options?:DSAdapterOperationConfiguration):T; - defineResource(resourceNameOrDefinition:string | DSResourceDefinitionConfiguration):DSResourceDefinition; - digest():void; - eject(resourceName:string, id:string | number, options?:DSConfiguration):T; - ejectAll(resourceName:string, params:DSFilterParams, options?:DSConfiguration):Array; - filter(resourceName:string, params:DSFilterParams, options?:DSConfiguration):Array; - get(resourceName:string, id:string | number, options?:DSConfiguration):T; - getAll(resourceName:string, ids?:Array):Array; - hasChanges(resourceName:string, id:string | number):boolean; - inject(resourceName:string, attrs:T, options?:DSConfiguration):T; - inject(resourceName:string, items:Array, options?:DSConfiguration):Array; - is(resourceName:string, object:Object): boolean; - lastModified(resourceName:string, id?:string | number):number; // timestamp - lastSaved(resourceName:string, id?:string | number):number; // timestamp - link(resourceName:string, id:string | number, relations?:Array):T; - linkAll(resourceName:string, params:DSFilterParams, relations?:Array):T; - linkInverse(resourceName:string, id:string | number, relations?:Array):T; - previous(resourceName:string, id:string | number):T; - unlinkInverse(resourceName:string, id:string | number, relations?:Array):T; - - registerAdapter(adapterId:string, adapter:IDSAdapter, options?:{default: boolean}):void; - } - interface DSConfiguration extends IDSResourceLifecycleEventHandlers { actions?: Object; allowSimpleWhere?: boolean; basePath?: string; bypassCache?: boolean; cacheResponse?: boolean; + clearEmptyQueries?:boolean; + debug?:boolean; defaultAdapter?: string; - defaultFilter?: (collection:Array, resourceName:string, params:DSFilterParams, options:DSConfiguration)=>Array; + defaultFilter?: (collection:Array, resourceName:string, params:DSFilterArg, options:DSConfiguration)=>Array; + defaultValues?:Object; eagerEject?: boolean; - // TODO enable when eagerInject in DS#create is implemented - //eagerInject?: boolean; endpoint?: string; error?: boolean | ((message?:any, ...optionalParams:any[])=> void); fallbackAdapters?: Array; findAllFallbackAdapters?: Array; findAllStrategy?: string; - findBelongsTo?: boolean; findFallbackAdapters?: Array; - findHasOne?: boolean; - findHasMany?: boolean; - findInverseLinks?: boolean; findStrategy?: string + findStrictCache?:boolean; idAttribute?: string; ignoredChanges?: Array; - // TODO ignoreMissing is undocumented - //ignoreMissing: boolean; + ignoreMissing?: boolean; + instanceEvents?:boolean; keepChangeHistory?: boolean; - loadFromServer?: boolean; - log?: boolean | ((message?: any, ...optionalParams: any[])=> void); + linkRelations?:boolean; + log?: boolean | ((message?:any, ...optionalParams:any[])=> void); maxAge?: number; notify?: boolean; + omit?:Array; + onConflict?:string; // "merge"(default) or "replace" reapAction?: string; reapInterval?: number; + relationsEnumerable?:boolean; resetHistoryOnInject?: boolean; + returnMeta?:boolean; + scopes?:Object; strategy?: string; upsert?: boolean; useClass?: boolean; useFilter?: boolean; - } - - interface DSAdapterOperationConfiguration extends DSConfiguration { - adapter?: string; - bypassCache?: boolean; - cacheResponse?: boolean; - findStrategy?: string; - findFallbackAdapters?: string[]; - strategy?: string; - fallbackAdapters?: string[]; - - params: { - [paramName: string]: string | number | boolean; - }; - } - - interface DSSaveConfiguration extends DSAdapterOperationConfiguration { - changesOnly?: boolean; + watchChanges?:boolean; } interface DSResourceDefinitionConfiguration extends DSConfiguration { - name: string; computed?: any; + meta?:any; methods?: any; + name: string; relations?: { hasMany?: Object; hasOne?: Object; @@ -143,46 +74,6 @@ declare module JSData { }; } - interface DSResourceDefinition extends DSResourceDefinitionConfiguration { - - //async - create(attrs:Object, options?:DSConfiguration):JSDataPromise; - destroy(id:string | number, options?:DSAdapterOperationConfiguration):JSDataPromise; - destroyAll(params?:DSFilterParams, options?:DSAdapterOperationConfiguration):JSDataPromise; - find(id:string | number, options?:DSAdapterOperationConfiguration):JSDataPromise; - findAll(params?:DSFilterParams, options?:DSAdapterOperationConfiguration):JSDataPromise>; - loadRelations(idOrInstance:string | number | Object, relations:string | Array, options?:DSAdapterOperationConfiguration):JSDataPromise; - update(id:string | number, attrs:Object, options?:DSSaveConfiguration):JSDataPromise; - updateAll(attrs:Object, params?:DSFilterParams & T, options?:DSAdapterOperationConfiguration):JSDataPromise>; - reap(resourceNametions?:DSConfiguration):JSDataPromise; - refresh(id:string | number, options?:DSAdapterOperationConfiguration):JSDataPromise; - save(id:string | number, options?:DSSaveConfiguration):JSDataPromise; - - // sync - changeHistory(id?:string | number):Array; - changes(id:string | number):Object; - compute(idOrInstance:number | string | Object ):T; - createInstance(attrs?:T, options?:DSAdapterOperationConfiguration):T; - digest():void; - eject(id:string | number, options?:DSConfiguration):T; - ejectAll(params:DSFilterParams, options?:DSConfiguration):Array; - filter(params: DSFilterParams, options?: DSConfiguration): Array; - filter(params: DSFilterParamsForAllowSimpleWhere, options?: DSConfiguration): Array; - get(id:string | number, options?:DSConfiguration):T; - getAll(ids?:Array):Array; - hasChanges(id:string | number):boolean; - inject(attrs:T, options?:DSConfiguration):T; - inject(items:Array, options?:DSConfiguration):Array; - is(object:Object): boolean; - lastModified(id?:string | number):number; // timestamp - lastSaved(id?:string | number):number; // timestamp - link(id:string | number, relations?:Array):T; - linkAll(params:DSFilterParams, relations?:Array):T; - linkInverse(id:string | number, relations?:Array):T; - previous(id:string | number):T; - unlinkInverse(id:string | number, relations?:Array):T; - } - interface DSFilterParams { where?: Object; @@ -195,49 +86,194 @@ declare module JSData { sort?: string | Array | Array>; } - interface DSFilterParamsForAllowSimpleWhere { - [key: string]: string | number; + type DSFilterArg = DSFilterParams | Object; + + interface DSAdapterOperationConfiguration extends DSConfiguration { + adapter?: string; + params?: { + [paramName: string]: string | number | boolean; + }; } + interface DSSaveConfiguration extends DSAdapterOperationConfiguration { + changesOnly?: boolean; + } + + interface DSCollection extends Array { + fetch(params?:DSFilterArg, options?:DSConfiguration):JSDataPromise>>; + params:DSFilterArg; + resourceName:string; + } + + interface DSEvents { + on(name:string, handler:(...args:any[])=>void):void; + off(name:string, handler:(...args:any[])=>void):void; + emit(name:string, ...args:any[]):void; + } + + interface DS extends DSEvents { + new(config?:DSConfiguration):DS; + + // rather undocumented + errors:DSErrors; + + // those are objects containing the defined resources and adapters + definitions:any; + adapters:any; + + defaults:DSConfiguration; + + changeHistory(resourceName:string, id:string | number):Array; + changes(resourceName:string, id:string | number, options?:{ignoredChanges:Array}):Object; + clear():Array>; + compute(resourceName:string, idOrInstance:number | string | T):T & DSInstanceShorthands; + create(resourceName:string, attrs:Object, options?:DSConfiguration):JSDataPromise>; + createCollection(resourceName:string, array?:Array, params?:DSFilterArg, options?:DSConfiguration):DSCollection>; + createInstance(resourceName:string, attrs?:Object, options?:DSConfiguration):T & DSInstanceShorthands; + destroy(resourceName:string, id:string | number, options?:DSAdapterOperationConfiguration):JSDataPromise; + destroyAll(resourceName:string, params?:DSFilterArg, options?:DSAdapterOperationConfiguration):JSDataPromise; + digest():void; + eject(resourceName:string, id:string | number, options?:DSConfiguration):T & DSInstanceShorthands; + ejectAll(resourceName:string, params:DSFilterArg, options?:DSConfiguration):Array>; + filter(resourceName:string, params:DSFilterArg, options?:DSConfiguration):Array>; + find(resourceName:string, id:string | number, options?:DSAdapterOperationConfiguration):JSDataPromise>; + findAll(resourceName:string, params?:DSFilterArg, options?:DSAdapterOperationConfiguration):JSDataPromise>>; + get(resourceName:string, id:string | number):T & DSInstanceShorthands; + getAll(resourceName:string, ids?:Array):Array>; + hasChanges(resourceName:string, id:string | number):boolean; + inject(resourceName:string, attrs:TInject, options?:DSConfiguration):U & DSInstanceShorthands; + inject(resourceName:string, items:Array, options?:DSConfiguration):Array>; + is(resourceName:string, object:Object): boolean; + lastModified(resourceName:string, id?:string | number):number; // timestamp + lastSaved(resourceName:string, id?:string | number):number; // timestamp + loadRelations(resourceName:string, idOrInstance:string | number, relations:string | Array, options?:DSAdapterOperationConfiguration):JSDataPromise>; + previous(resourceName:string, id:string | number):T & DSInstanceShorthands; + reap(resourceName:string):JSDataPromise; + refresh(resourceName:string, id:string | number, options?:DSAdapterOperationConfiguration):JSDataPromise>; + refreshAll(resourceName:string, params?:DSFilterArg, options?:DSAdapterOperationConfiguration):JSDataPromise>>; + revert(resourceName:string, id:string | number):T & DSInstanceShorthands; + save(resourceName:string, id:string | number, options?:DSSaveConfiguration):JSDataPromise>; + update(resourceName:string, id:string | number, attrs:Object, options?:DSAdapterOperationConfiguration):JSDataPromise>; + updateAll(resourceName:string, attrs:Object, params?:DSFilterArg, options?:DSAdapterOperationConfiguration):JSDataPromise>>; + + defineResource(resourceNameOrDefinition:string | DSResourceDefinitionConfiguration):DSResourceDefinition; + defineResource(resourceNameOrDefinition:string | DSResourceDefinitionConfiguration):DSResourceDefinition & TActions; + registerAdapter(adapterId:string, adapter:IDSAdapter, options?:{default: boolean}):void; + } + + interface DSResourceDefinition extends DSResourceDefinitionConfiguration, DSEvents { + changeHistory(id:string | number):Array; + changes(id:string | number, options?:{ignoredChanges:Array}):Object; + clear():Array>; + compute(idOrInstance:number | string | T):T & DSInstanceShorthands; + create(attrs:Object, options?:DSConfiguration):JSDataPromise>; + createCollection(array?:Array, params?:DSFilterArg, options?:DSConfiguration):DSCollection>; + createInstance(attrs?:Object, options?:DSConfiguration):T & DSInstanceShorthands; + destroy(id:string | number, options?:DSAdapterOperationConfiguration):JSDataPromise; + destroyAll(params?:DSFilterArg, options?:DSAdapterOperationConfiguration):JSDataPromise; + digest():void; + eject(id:string | number, options?:DSConfiguration):T & DSInstanceShorthands; + ejectAll(params:DSFilterArg, options?:DSConfiguration):Array>; + filter(params:DSFilterArg, options?:DSConfiguration):Array>; + find(id:string | number, options?:DSAdapterOperationConfiguration):JSDataPromise>; + findAll(params?:DSFilterArg, options?:DSAdapterOperationConfiguration):JSDataPromise>>; + get(id:string | number):T & DSInstanceShorthands; + getAll(ids?:Array):Array>; + hasChanges(id:string | number):boolean; + inject(attrs:TInject, options?:DSConfiguration):T & DSInstanceShorthands; + inject(items:Array, options?:DSConfiguration):Array>; + is(object:Object): boolean; + lastModified(id?:string | number):number; // timestamp + lastSaved(id?:string | number):number; // timestamp + loadRelations(idOrInstance:string | number, relations:string | Array, options?:DSAdapterOperationConfiguration):JSDataPromise>; + previous(id:string | number):T & DSInstanceShorthands; + reap():JSDataPromise; + refresh(id:string | number, options?:DSAdapterOperationConfiguration):JSDataPromise>; + refreshAll(params?:DSFilterArg, options?:DSAdapterOperationConfiguration):JSDataPromise>>; + revert(id:string | number):T & DSInstanceShorthands; + save(id:string | number, options?:DSSaveConfiguration):JSDataPromise>; + update(id:string | number, attrs:Object, options?:DSAdapterOperationConfiguration):JSDataPromise>; + updateAll(attrs:Object, params?:DSFilterArg, options?:DSAdapterOperationConfiguration):JSDataPromise>>; + } + + // cannot specify T at interface level because the interface is used as generic constraint itself which ends up being recursive + export interface DSInstanceShorthands extends DSEvents { + DSCompute():void; + DSRefresh(options?:DSAdapterOperationConfiguration):JSDataPromise>; + DSSave(options?:DSSaveConfiguration):JSDataPromise>; + DSUpdate(options?:DSAdapterOperationConfiguration):JSDataPromise>; + DSDestroy(options?:DSAdapterOperationConfiguration):JSDataPromise; + DSCreate(options?:DSAdapterOperationConfiguration):JSDataPromise>; + DSLoadRelations(relations:string | Array, options?:DSAdapterOperationConfiguration):JSDataPromise>; + DSChangeHistory():Array; + DSChanges():Object; + DSHasChanges():boolean; + DSLastModified():number; // timestamp + DSLastSaved():number; // timestamp + DSPrevious():T & DSInstanceShorthands; + DSRevert():T & DSInstanceShorthands; + } + + type DSSyncLifecycleHookHandler = (resource:DSResourceDefinition, data:any) => void; + type DSAsyncLifecycleHookHandler = (resource:DSResourceDefinition, data:any) => JSDataPromise; + type DSAsyncLifecycleHookHandlerCb = (resource:DSResourceDefinition, data:any, cb:(err:Error, data:any)=>void) => void + interface IDSResourceLifecycleValidateEventHandlers { - beforeValidate?: (resourceName:string, data:any, cb:(err:any, data?:any)=>void)=>void; - validate?: (resourceName:string, data:any, cb:(err:any, data?:any)=>void)=>void; - afterValidate?: (resourceName:string, data:any, cb:(err:any, data?:any)=>void)=>void; + beforeValidate?: DSAsyncLifecycleHookHandler | DSAsyncLifecycleHookHandlerCb; + validate?: DSAsyncLifecycleHookHandler | DSAsyncLifecycleHookHandlerCb; + afterValidate?: DSAsyncLifecycleHookHandler | DSAsyncLifecycleHookHandlerCb; } interface IDSResourceLifecycleCreateEventHandlers { - beforeCreate?: (resourceName:string, data:any, cb:(err:any, data?:any)=>void)=>void; - afterCreate?: (resourceName:string, data:any, cb:(err:any, data?:any)=>void)=>void; - } - - interface IDSResourceLifecycleCreateInstanceEventHandlers { - beforeCreateInstance?: (resourceName:string, data:any)=>void; - afterCreateInstance?: (resourceName:string, data:any)=>void; + beforeCreate?: DSAsyncLifecycleHookHandler | DSAsyncLifecycleHookHandlerCb; + afterCreate?: DSAsyncLifecycleHookHandler | DSAsyncLifecycleHookHandlerCb; } interface IDSResourceLifecycleUpdateEventHandlers { - beforeUpdate?: (resourceName:string, data:any, cb:(err:any, data?:any)=>void)=>void; - afterUpdate?: (resourceName:string, data:any, cb:(err:any, data?:any)=>void)=>void; + beforeUpdate?: DSAsyncLifecycleHookHandler | DSAsyncLifecycleHookHandlerCb; + afterUpdate?: DSAsyncLifecycleHookHandler | DSAsyncLifecycleHookHandlerCb; } interface IDSResourceLifecycleDestroyEventHandlers { - beforeDestroy?: (resourceName:string, data:any, cb:(err:any, data?:any)=>void)=>void; - afterDestroy?: (resourceName:string, data:any, cb:(err:any, data?:any)=>void)=>void; + beforeDestroy?: DSAsyncLifecycleHookHandler | DSAsyncLifecycleHookHandlerCb; + afterDestroy?: DSAsyncLifecycleHookHandler | DSAsyncLifecycleHookHandlerCb; + } + + interface IDSResourceLifecycleCreateInstanceEventHandlers { + beforeCreateInstance?: DSSyncLifecycleHookHandler; + afterCreateInstance?: DSSyncLifecycleHookHandler; } interface IDSResourceLifecycleInjectEventHandlers { - beforeInject?: (resourceName:string, data:any)=>void; - afterInject?: (resourceName:string, data:any)=>void; + beforeInject?: DSSyncLifecycleHookHandler; + afterInject?: DSSyncLifecycleHookHandler; } interface IDSResourceLifecycleEjectEventHandlers { - beforeEject?: (resourceName:string, data:any)=>void; - afterEject?: (resourceName:string, data:any)=>void; + beforeEject?: DSSyncLifecycleHookHandler; + afterEject?: DSSyncLifecycleHookHandler; } interface IDSResourceLifecycleReapEventHandlers { - beforeReap?: (resourceName:string, data:any)=>void; - afterReap?: (resourceName:string, data:any)=>void; + beforeReap?: DSSyncLifecycleHookHandler; + afterReap?: DSSyncLifecycleHookHandler; + } + + interface IDSResourceLifecycleFindEventHandlers { + afterFind?: DSAsyncLifecycleHookHandler | DSAsyncLifecycleHookHandlerCb; + } + + interface IDSResourceLifecycleFindAllEventHandlers { + afterFindAll?: DSAsyncLifecycleHookHandler | DSAsyncLifecycleHookHandlerCb; + } + + interface IDSResourceLifecycleLoadRelationsEventHandlers { + afterLoadRelations?: DSAsyncLifecycleHookHandler | DSAsyncLifecycleHookHandlerCb; + } + + interface IDSResourceLifecycleCreateCollectionEventHandlers { + beforeCreateCollection?: DSSyncLifecycleHookHandler; + afterCreateCollection?: DSSyncLifecycleHookHandler; } interface IDSResourceLifecycleEventHandlers extends IDSResourceLifecycleCreateEventHandlers, @@ -247,8 +283,11 @@ declare module JSData { IDSResourceLifecycleDestroyEventHandlers, IDSResourceLifecycleInjectEventHandlers, IDSResourceLifecycleEjectEventHandlers, - IDSResourceLifecycleReapEventHandlers { - + IDSResourceLifecycleReapEventHandlers, + IDSResourceLifecycleFindEventHandlers, + IDSResourceLifecycleFindAllEventHandlers, + IDSResourceLifecycleLoadRelationsEventHandlers, + IDSResourceLifecycleCreateCollectionEventHandlers { } // errors @@ -271,19 +310,31 @@ declare module JSData { // DSAdapter interface interface IDSAdapter { - create(config:DSResourceDefinition, attrs:Object, options?:DSConfiguration):JSDataPromise; + create(config:DSResourceDefinition, attrs:Object, options?:DSConfiguration):JSDataPromise; - destroy(config:DSResourceDefinition, id:string | number, options?:DSConfiguration):JSDataPromise; + destroy(config:DSResourceDefinition, id:string | number, options?:DSConfiguration):JSDataPromise; + destroyAll(config:DSResourceDefinition, params:DSFilterArg, options?:DSConfiguration):JSDataPromise; - destroyAll(config:DSResourceDefinition, params:DSFilterParams, options?:DSConfiguration):JSDataPromise; + find(config:DSResourceDefinition, id:string | number, options?:DSConfiguration):JSDataPromise; + findAll(config:DSResourceDefinition, params?:DSFilterArg, options?:DSConfiguration):JSDataPromise; - find(config:DSResourceDefinition, id:string | number, options?:DSConfiguration):JSDataPromise; + update(config:DSResourceDefinition, id:string | number, attrs:Object, options?:DSConfiguration):JSDataPromise; + updateAll(config:DSResourceDefinition, attrs:Object, params?:DSFilterArg, options?:DSConfiguration):JSDataPromise; + } - findAll(config:DSResourceDefinition, params?:DSFilterParams, options?:DSConfiguration):JSDataPromise; + // Custom action config + interface DSActionConfig { + adapter?: string; + endpoint?: string; + pathname?: string; + method?: string; + } - update(config:DSResourceDefinition, id:string | number, attrs:Object, options?:DSConfiguration):JSDataPromise; - - updateAll(config:DSResourceDefinition, attrs:Object, params?:DSFilterParams & T, options?:DSConfiguration):JSDataPromise; + // Custom action method definition + // options are passed to adapter.HTTP() method-call, js-data-http adapter by default uses AXIOS but can also be $http in case of angular + // or a custom adapter implementation. The adapter can be set via the DSActionConfig. + interface DSActionFn { + (id:string | number, options?:Object):JSDataPromise } } @@ -295,6 +346,5 @@ declare var JSData:{ //Support node require declare module 'js-data' { - export = JSData; } diff --git a/js-data/legacy/js-data-1.5.4-tests.ts b/js-data/legacy/js-data-1.5.4-tests.ts new file mode 100644 index 0000000000..076db194b1 --- /dev/null +++ b/js-data/legacy/js-data-1.5.4-tests.ts @@ -0,0 +1,585 @@ +/// + +interface IUser { + id?: number; + name?: string; + age?: number; + first?: string; + last?: string; + comments?:Array; + profile?:any; +} + +interface IUserWithMethod { + fullName:()=>string; +} + +interface IUserWithComputedProperty extends IUser { + fullName?: string; +} + +var store = new JSData.DS(); + +// simplest model definition +var User = store.defineResource('user'); + +User.find(1).then(function (user:IUser) { + user; // { id: 1, name: 'John' } +}); + +var user:IUser = User.createInstance({name: 'John'}); + +var store = new JSData.DS(); +var User2 = store.defineResource('user'); +var user:IUser = User2.inject({id: 1, name: 'John'}); +var user2:IUser = User2.inject({id: 1, age: 30}); + +user; // User { id: 1, name: 'John', age: 30 } +user2; // User { id: 1, name: 'John', age: 30 } +User.get(1); // User { id: 1, name: 'John', age: 30 } +user === user2; // true +user === User.get(1); // true +user2 === User.get(1); // true + +var store = new JSData.DS({ + // set a default lifecycle hook + afterCreate: function () { + } +}); + +var User = store.defineResource({ + name: 'user', + // override the hook for this resource + afterCreate: function () { + } +}); + +User.create({ + name: 'john' +}, { + // override the hook just for this method call + afterCreate: function () { + } +}).then(()=> { + +}); + +var store = new JSData.DS(); + +var UserWithMethodResource = store.defineResource({ + name: 'user', + methods: { + fullName: function () { + return this.first + ' ' + this.last; + } + } +}); + +var userWithMethod = UserWithMethodResource.createInstance({first: 'John', last: 'Anderson'}); + +userWithMethod.fullName(); // "John Anderson" + +var store = new JSData.DS(); + +var UserWithComputedProperty = store.defineResource({ + name: 'user', + computed: { + // each function's argument list defines the fields + // that the computed property depends on + fullName: ['first', 'last', function (first:string, last:string) { + return first + ' ' + last; + }], + // shortand, use the array syntax above if you want + // you computed properties to work after you've + // minified your code. Shorthand style won't work when minified + initials: function (first:string, last:string) { + return first.toUpperCase()[0] + '. ' + last.toUpperCase()[0] + '.'; + } + } +}); + +var userWithComputedProperty:IUserWithComputedProperty = UserWithComputedProperty.inject({ + id: 1, + first: 'John', + last: 'Anderson' +}); + +userWithComputedProperty.fullName; // "John Anderson" + +userWithComputedProperty.first = 'Fred'; + +// js-data relies on dirty-checking, so the +// computed property (probably) hasn't been updated yet +userWithComputedProperty.fullName; // "John Anderson" + +// If your browser supports Object.observe this will have no effect +// otherwise it will trigger the dirty-checking +store.digest(); + +userWithComputedProperty.fullName; // "Fred Anderson" + +interface IComment { + comments?: any; + profile?: any; +} + +var aComment:JSData.DSResourceDefinition = store.defineResource('comment'); + +// Get all comments where comment.userId == 5 +aComment.filter({ + where: { + userId: { + '==': 5 + } + } +}); + +// Get all comments where comment.userId == 5 +aComment.filter({ + userId: 5 +}); + +// Get all comments where comment.userId === 5 +aComment.filter({ + where: { + userId: { + '===': 5 + } + } +}); + +// Get all comments where comment.userId != 5 +aComment.filter({ + where: { + userId: { + '!=': 5 + } + } +}); + +// Get all comments where comment.userId !== 5 +aComment.filter({ + where: { + userId: { + '!==': 5 + } + } +}); + +// Get all users where user.age > 30 +User.filter({ + where: { + age: { + '>': 30 + } + } +}); + +// Get all users where user.age >= 30 +User.filter({ + where: { + age: { + '>=': 30 + } + } +}); + +// Get all users where user.age < 30 +User.filter({ + where: { + age: { + '<': 30 + } + } +}); + +// Get all users where user.name is in "John Anderson" +User.filter({ + where: { + name: { + 'in': 'John Anderson' + } + } +}); + +// Get all users where user.role is in ["admin", "owner"] +User.filter({ + where: { + role: { + 'in': ['admin', 'owner'] + } + } +}); + +// Get all users where user.name is NOT in "John Anderson" +User.filter({ + where: { + name: { + 'notIn': 'John Anderson' + } + } +}); + +// Get all users where user.role is NOT in ["admin", "owner"] +User.filter({ + where: { + role: { + 'notIn': ['admin', 'owner'] + } + } +}); + +// Get all users where user.name contains "John" +User.filter({ + where: { + name: { + 'contains': 'John' + } + } +}); + +// Get all users where user.roles contains "admin" +User.filter({ + where: { + roles: { + 'contains': 'admin' + } + } +}); + +// Sorts users by age in ascending order +User.filter({ + orderBy: 'age' +}); + +// Sorts users by age in descending order +User.filter({ + orderBy: ['age', 'DESC'] +}); + +// Sorts users by age in descending order and then sort by name in ascending order to break a tie +User.filter({ + orderBy: [ + ['age', 'DESC'], + ['name', 'ASC'] + ] +}); + +var PAGE_SIZE = 20; +var currentPage = 1; + +interface IPost { + +} + +var Post:JSData.DSResourceDefinition; + +// Grab the first "page" of posts +Post.filter({ + offset: PAGE_SIZE * (currentPage - 1), + limit: PAGE_SIZE +}); + +var User3 = store.defineResource({ + name: 'user', + relations: { + hasMany: { + comment: { + localField: 'comments', + foreignKey: 'userId' + } + }, + hasOne: { + profile: { + localField: 'profile', + foreignKey: 'userId' + } + }, + belongsTo: { + organization: { + localKey: 'organizationId', + localField: 'organization', + + // if you add this to a belongsTo relation + // then js-data will attempt to use + // a nested url structure, e.g. /organization/15/user/4 + parent: true + } + } + } +}); + +var Organization = store.defineResource({ + name: 'organization', + relations: { + hasMany: { + // this is an example of multiple relations + // of the same type to the same resource + user: [ + { + localField: 'users', + foreignKey: 'organizationId' + }, + { + localField: 'owners', + foreignKey: 'organizationId' + } + ] + } + } +}); + +var Profile = store.defineResource({ + name: 'profile', + relations: { + belongsTo: { + user: { + localField: 'user', + localKey: 'userId' + } + } + } +}); + +var OtherComment = store.defineResource({ + name: 'comment', + relations: { + belongsTo: { + user: { + localField: 'user', + localKey: 'userId' + } + } + } +}); + +User.find(10).then(function (user:IUser) { + // let's assume the server only returned the user + user.comments; // undefined + user.profile; // undefined + + User.loadRelations(user, ['comment', 'profile']).then(function (user:IUser) { + user.comments; // array + user.profile; // object + }); +}); + +var OtherOtherComment = store.defineResource({ + name: 'comment', + relations: { + belongsTo: { + post: { + parent: true, + localKey: 'postId', + localField: 'post' + } + } + } +}); + +// The comment isn't in the data store yet, so js-data wouldn't know +// what the id of the parent "post" would be, so we pass it in manually +OtherOtherComment.find(5, {params: {postId: 4}}); // GET /post/4/comment/5 + +// vs + +var promise = OtherOtherComment.find(5); // GET /comment/5 + +promise.then().catch().finally(); + +OtherOtherComment.inject({id: 1, postId: 2}); + +// We don't have to provide the parentKey here +// because js-data found it in the comment +OtherOtherComment.update(1, {content: 'stuff'}); // PUT /post/2/comment/1 + +// If you don't want the nested for just one of the calls then +// you can do the following: +OtherOtherComment.update(1, {content: 'stuff'}, {params: {postId: false}}); // PUT /comment/1 + +var store = new JSData.DS({ + // set the default + beforeCreate: function (resource, data, cb) { + // do something general + cb(null, data); + } +}); + +var User4 = store.defineResource({ + name: 'user', + // set just for this resource + beforeCreate: function (resource, data, cb) { + // do something more specific to "users" + cb(null, data); + } +}); + +User4.create({name: 'John'}, { + // set just for this method call + beforeCreate: function (resource, data, cb) { + // do something specific for this method call + cb(null, data); + } +}); + +module CustomAdapterTest { + + class MyCustomAdapter implements JSData.IDSAdapter { + + // All of the methods shown here must return a promise + +// "definition" is a resource defintion that would +// be returned by DS#defineResource + +// "options" would be the options argument that +// was passed into the DS method that is calling +// the adapter method + + create(definition:JSData.DSResourceDefinition, attrs:Object, options:JSData.DSConfiguration):JSData.JSDataPromise { + // Must resolve the promise with the created item + + var promise:JSData.JSDataPromise; + return promise; + } + + find(definition:JSData.DSResourceDefinition, id:any, options:JSData.DSConfiguration):JSData.JSDataPromise { + // Must resolve the promise with the found item + + var promise:JSData.JSDataPromise; + return promise; + } + + findAll(definition:JSData.DSResourceDefinition, params:JSData.DSFilterParams, options:JSData.DSConfiguration):JSData.JSDataPromise { + // Must resolve the promise with the found items + + var promise:JSData.JSDataPromise; + return promise; + } + + update(definition:JSData.DSResourceDefinition, id:any, attrs:Object, options:JSData.DSConfiguration):JSData.JSDataPromise { + // Must resolve the promise with the updated items + + var promise:JSData.JSDataPromise; + return promise; + } + + updateAll(definition:JSData.DSResourceDefinition, attrs:Object, params:JSData.DSFilterParams, options:JSData.DSConfiguration):JSData.JSDataPromise { + // Must resolve the promise with the updated items + + var promise:JSData.JSDataPromise; + return promise; + } + + destroy(definition:JSData.DSResourceDefinition, id:any, options:JSData.DSConfiguration):JSData.JSDataPromise { + // Must return a promise + + var promise:JSData.JSDataPromise; + return promise; + } + + destroyAll(definition:JSData.DSResourceDefinition, params:JSData.DSFilterParams, options:JSData.DSConfiguration):JSData.JSDataPromise { + // Must return a promise + + var promise:JSData.JSDataPromise; + return promise; + } + } + + var store = new JSData.DS(); + store.registerAdapter('mca', new MyCustomAdapter(), {default: true}); + // the data store will now use your custom adapter by default +} + +/** + * showing the use of open ended interface to realize typings + * on the Datastore.definitions object where all resource definitions + * are saved. + */ + +interface MyCustomDataStore { + + myResource: JSData.DSResourceDefinition +} + +interface MyResourceDefinition { + +} + +module JSData { + + interface DS { + + definitions: MyCustomDataStore; + } +} + +var store = new JSData.DS(); + +var myResourceDefinition = store.defineResource('myResource'); + +myResourceDefinition = store.definitions.myResource; + +/** + * Custom action on datastore resource + */ + +interface Resource { + someProp:string; +} + +interface ActionsForResource { + myAction:JSData.DSActionFn; + myOtherAction:JSData.DSActionFn; +} + +var myOtherAction:JSData.DSActionConfig = { + method: 'GET', + endpoint: 'goHere' +}; + +var resourceWithCustomActions = store.defineResource({ + name: 'actionResource', + actions: { + myAction: { + method: 'POST' + }, + myOtherAction: myOtherAction + } +}); + +resourceWithCustomActions.myAction(3).then((result)=>{ + + var theCustomResult:number = result; +}); + +resourceWithCustomActions.myOtherAction(2, {data:'blub'}).then(()=>{ + // success +}); + +resourceWithCustomActions.find(1).then((result)=>{ + + var aProperty = result.someProp; +}); + +/** + * Instance shorthands + */ + +var customActionResourceInstance = resourceWithCustomActions.get(1); + +customActionResourceInstance.DSCompute(); +customActionResourceInstance.DSChanges(); +customActionResourceInstance.DSChangeHistory(); +customActionResourceInstance.DSHasChanges(); +customActionResourceInstance.DSLastModified(); +customActionResourceInstance.DSLastSaved(); +customActionResourceInstance.DSPrevious(); +customActionResourceInstance.DSCreate(); +customActionResourceInstance.DSDestroy(); +customActionResourceInstance.DSLink(); +customActionResourceInstance.DSLinkInverse(); +customActionResourceInstance.DSLoadRelations('myRelation'); +customActionResourceInstance.DSRefresh(); +customActionResourceInstance.DSSave(); +customActionResourceInstance.DSUnlinkInverse(); +customActionResourceInstance.DSUpdate(); diff --git a/js-data/legacy/js-data-1.5.4.d.ts b/js-data/legacy/js-data-1.5.4.d.ts new file mode 100644 index 0000000000..0140d8139b --- /dev/null +++ b/js-data/legacy/js-data-1.5.4.d.ts @@ -0,0 +1,317 @@ +// Type definitions for JSData v1.5.4 +// Project: https://github.com/js-data/js-data +// Definitions by: Stefan Steinhart +// Definitions: https://github.com/borisyankov/DefinitelyTyped + +/////////////////////////////////////////////////////////////////////////////// +// js-data module (js-data.js) +/////////////////////////////////////////////////////////////////////////////// + +// defining what exists in JSData and how it looks +declare module JSData { + + interface JSDataPromise { + then(onFulfilled?: (value: R) => U | JSDataPromise, onRejected?: (error: any) => U | JSDataPromise): JSDataPromise; + catch(onRejected?: (error: any) => U | JSDataPromise): JSDataPromise; + // enhanced with finally + finally(finallyCb?:() => U):JSDataPromise; + } + + interface DS { + + new(config?:DSConfiguration):DS; + + // rather undocumented + errors:DSErrors; + + // those are objects containing the defined resources and adapters + definitions:any; + adapters:any; + + defaults:DSConfiguration; + + // async + create(resourceName:string, attrs:Object, options?:DSConfiguration):JSDataPromise>; + destroy(resourceName:string, id:string | number, options?:DSAdapterOperationConfiguration):JSDataPromise; + destroyAll(resourceName:string, params?:DSFilterArg, options?:DSAdapterOperationConfiguration):JSDataPromise; + find(resourceName:string, id:string | number, options?:DSAdapterOperationConfiguration):JSDataPromise>; + findAll(resourceName:string, params?:DSFilterArg, options?:DSAdapterOperationConfiguration):JSDataPromise>>; + loadRelations(resourceName:string, idOrInstance:string | number | Object, relations:string | Array, options?:DSAdapterOperationConfiguration):JSDataPromise>; + update(resourceName:string, id:string | number, attrs:Object, options?:DSSaveConfiguration):JSDataPromise>; + updateAll(resourceName:string, attrs:Object, params?:DSFilterArg, options?:DSAdapterOperationConfiguration):JSDataPromise>>; + reap(resourceName:string, options?:DSConfiguration):JSDataPromise; + refresh(resourceName:string, id:string | number, options?:DSAdapterOperationConfiguration):JSDataPromise>; + save(resourceName:string, id:string | number, options?:DSSaveConfiguration):JSDataPromise>; + + // sync + changeHistory(resourceName:string, id?:string | number):Array; + changes(resourceName:string, id:string | number):Object; + compute(resourceName:string, idOrInstance:number | string | Object ):void; + createInstance(resourceName:string, attrs?:T, options?:DSAdapterOperationConfiguration):T & DSInstanceShorthands; + digest():void; + eject(resourceName:string, id:string | number, options?:DSConfiguration):T & DSInstanceShorthands; + ejectAll(resourceName:string, params:DSFilterArg, options?:DSConfiguration):Array>; + filter(resourceName:string, params:DSFilterArg, options?:DSConfiguration):Array>; + get(resourceName:string, id:string | number, options?:DSConfiguration):T & DSInstanceShorthands; + getAll(resourceName:string, ids?:Array):Array>; + hasChanges(resourceName:string, id:string | number):boolean; + inject(resourceName:string, item:T, options?:DSConfiguration):T & DSInstanceShorthands; + inject(resourceName:string, items:Array, options?:DSConfiguration):Array>; + is(resourceName:string, object:Object): boolean; + lastModified(resourceName:string, id?:string | number):number; // timestamp + lastSaved(resourceName:string, id?:string | number):number; // timestamp + link(resourceName:string, id:string | number, relations?:Array):T & DSInstanceShorthands; + linkAll(resourceName:string, params:DSFilterArg, relations?:Array):T & DSInstanceShorthands; + linkInverse(resourceName:string, id:string | number, relations?:Array):T & DSInstanceShorthands; + previous(resourceName:string, id:string | number):T & DSInstanceShorthands; + revert(resourceName:string, id:string | number):T & DSInstanceShorthands; + unlinkInverse(resourceName:string, id:string | number, relations?:Array):T & DSInstanceShorthands; + + defineResource(resourceNameOrDefinition:string | DSResourceDefinitionConfiguration):DSResourceDefinition; + defineResource(resourceNameOrDefinition:string | DSResourceDefinitionConfiguration):DSResourceDefinition & TActions; + registerAdapter(adapterId:string, adapter:IDSAdapter, options?:{default: boolean}):void; + } + + interface DSConfiguration extends IDSResourceLifecycleEventHandlers { + actions?: Object; + allowSimpleWhere?: boolean; + basePath?: string; + bypassCache?: boolean; + cacheResponse?: boolean; + defaultAdapter?: string; + defaultFilter?: (collection:Array, resourceName:string, params:DSFilterArg, options:DSConfiguration)=>Array; + eagerEject?: boolean; + endpoint?: string; + error?: boolean | ((message?:any, ...optionalParams:any[])=> void); + fallbackAdapters?: Array; + findAllFallbackAdapters?: Array; + findAllStrategy?: string; + findBelongsTo?: boolean; + findFallbackAdapters?: Array; + findHasOne?: boolean; + findHasMany?: boolean; + findInverseLinks?: boolean; + findStrategy?: string + idAttribute?: string; + ignoredChanges?: Array; + keepChangeHistory?: boolean; + loadFromServer?: boolean; + log?: boolean | ((message?: any, ...optionalParams: any[])=> void); + maxAge?: number; + notify?: boolean; + reapAction?: string; + reapInterval?: number; + resetHistoryOnInject?: boolean; + strategy?: string; + upsert?: boolean; + useClass?: boolean; + useFilter?: boolean; + } + + interface DSAdapterOperationConfiguration extends DSConfiguration { + adapter?: string; + params?: { + [paramName: string]: string | number | boolean; + }; + } + + interface DSSaveConfiguration extends DSAdapterOperationConfiguration { + changesOnly?: boolean; + } + + interface DSResourceDefinitionConfiguration extends DSConfiguration { + name: string; + computed?: any; + methods?: any; + relations?: { + hasMany?: Object; + hasOne?: Object; + belongsTo?: Object; + }; + } + + interface DSResourceDefinition extends DSResourceDefinitionConfiguration { + + //async + create(attrs:TInject, options?:DSConfiguration):JSDataPromise>; + destroy(id:string | number, options?:DSAdapterOperationConfiguration):JSDataPromise; + destroyAll(params?:DSFilterArg, options?:DSAdapterOperationConfiguration):JSDataPromise; + find(id:string | number, options?:DSAdapterOperationConfiguration):JSDataPromise>; + findAll(params?:DSFilterArg, options?:DSAdapterOperationConfiguration):JSDataPromise>>; + loadRelations(idOrInstance:string | number | Object, relations:string | Array, options?:DSAdapterOperationConfiguration):JSDataPromise>; + update(id:string | number, attrs:Object, options?:DSSaveConfiguration):JSDataPromise>; + updateAll(attrs:Object, params?:DSFilterArg, options?:DSAdapterOperationConfiguration):JSDataPromise>>; + reap(options?:DSConfiguration):JSDataPromise; + refresh(id:string | number, options?:DSAdapterOperationConfiguration):JSDataPromise>; + save(id:string | number, options?:DSSaveConfiguration):JSDataPromise>; + + // sync + changeHistory(id?:string | number):Array; + changes(id:string | number):Object; + compute(idOrInstance:number | string | Object ):void; + createInstance(attrs?:TInject, options?:DSAdapterOperationConfiguration):T & DSInstanceShorthands; + digest():void; + eject(id:string | number, options?:DSConfiguration):T & DSInstanceShorthands; + ejectAll(params:DSFilterArg, options?:DSConfiguration):Array>; + filter(params:DSFilterArg, options?:DSConfiguration):Array>; + get(id:string | number, options?:DSConfiguration):T & DSInstanceShorthands; + getAll(ids?:Array):Array>; + hasChanges(id:string | number):boolean; + inject(item:T, options?:DSConfiguration):T & DSInstanceShorthands; + inject(items:Array, options?:DSConfiguration):Array>; + is(object:Object): boolean; + lastModified(id?:string | number):number; // timestamp + lastSaved(id?:string | number):number; // timestamp + link(id:string | number, relations?:Array):T & DSInstanceShorthands; + linkAll(params:DSFilterArg, relations?:Array):T & DSInstanceShorthands; + linkInverse(id:string | number, relations?:Array):T & DSInstanceShorthands; + previous(id:string | number):T & DSInstanceShorthands; + unlinkInverse(id:string | number, relations?:Array):T & DSInstanceShorthands; + } + + export interface DSInstanceShorthands { + DSCompute():void; + DSRefresh(options?:DSAdapterOperationConfiguration):JSDataPromise>; + DSSave(options?:DSSaveConfiguration):JSDataPromise>; + DSUpdate(options?:DSAdapterOperationConfiguration):JSDataPromise>; + DSDestroy(options?:DSAdapterOperationConfiguration):JSDataPromise; + DSCreate(options?:DSConfiguration):JSDataPromise>; + DSLoadRelations(relations:string | Array, options?:DSAdapterOperationConfiguration):JSDataPromise>; + DSChangeHistory():Array; + DSChanges():Object; + DSHasChanges():boolean; + DSLastModified():number; // timestamp + DSLastSaved():number; // timestamp + DSLink(relations?:Array):T & DSInstanceShorthands; + DSLinkInverse(relations?:Array):T & DSInstanceShorthands; + DSPrevious():T & DSInstanceShorthands; + DSUnlinkInverse(relations?:Array):T & DSInstanceShorthands; + } + + interface DSFilterParams { + where?: Object; + + limit?: number; + + skip?: number; + offset?: number; + + orderBy?: string | Array | Array>; + sort?: string | Array | Array>; + } + + type DSFilterArg = DSFilterParams | Object; + + interface IDSResourceLifecycleValidateEventHandlers { + beforeValidate?: (resourceName:string, data:any, cb:(err:any, data?:any)=>void)=>void; + validate?: (resourceName:string, data:any, cb:(err:any, data?:any)=>void)=>void; + afterValidate?: (resourceName:string, data:any, cb:(err:any, data?:any)=>void)=>void; + } + + interface IDSResourceLifecycleCreateEventHandlers { + beforeCreate?: (resourceName:string, data:any, cb:(err:any, data?:any)=>void)=>void; + afterCreate?: (resourceName:string, data:any, cb:(err:any, data?:any)=>void)=>void; + } + + interface IDSResourceLifecycleCreateInstanceEventHandlers { + beforeCreateInstance?: (resourceName:string, data:any)=>void; + afterCreateInstance?: (resourceName:string, data:any)=>void; + } + + interface IDSResourceLifecycleUpdateEventHandlers { + beforeUpdate?: (resourceName:string, data:any, cb:(err:any, data?:any)=>void)=>void; + afterUpdate?: (resourceName:string, data:any, cb:(err:any, data?:any)=>void)=>void; + } + + interface IDSResourceLifecycleDestroyEventHandlers { + beforeDestroy?: (resourceName:string, data:any, cb:(err:any, data?:any)=>void)=>void; + afterDestroy?: (resourceName:string, data:any, cb:(err:any, data?:any)=>void)=>void; + } + + interface IDSResourceLifecycleInjectEventHandlers { + beforeInject?: (resourceName:string, data:any)=>void; + afterInject?: (resourceName:string, data:any)=>void; + } + + interface IDSResourceLifecycleEjectEventHandlers { + beforeEject?: (resourceName:string, data:any)=>void; + afterEject?: (resourceName:string, data:any)=>void; + } + + interface IDSResourceLifecycleReapEventHandlers { + beforeReap?: (resourceName:string, data:any)=>void; + afterReap?: (resourceName:string, data:any)=>void; + } + + interface IDSResourceLifecycleEventHandlers extends IDSResourceLifecycleCreateEventHandlers, + IDSResourceLifecycleCreateInstanceEventHandlers, + IDSResourceLifecycleValidateEventHandlers, + IDSResourceLifecycleUpdateEventHandlers, + IDSResourceLifecycleDestroyEventHandlers, + IDSResourceLifecycleInjectEventHandlers, + IDSResourceLifecycleEjectEventHandlers, + IDSResourceLifecycleReapEventHandlers { + + } + + // errors + interface DSErrors { + + // types + IllegalArgumentError:DSError; + IA:DSError; + RuntimeError:DSError; + R:DSError; + NonexistentResourceError:DSError; + NER:DSError; + } + + interface DSError extends Error { + new (message?:string):DSError; + message: string; + type: string; + } + + // DSAdapter interface + interface IDSAdapter { + create(config:DSResourceDefinition, attrs:Object, options?:DSConfiguration):JSDataPromise; + + destroy(config:DSResourceDefinition, id:string | number, options?:DSConfiguration):JSDataPromise; + + destroyAll(config:DSResourceDefinition, params:DSFilterArg, options?:DSConfiguration):JSDataPromise; + + find(config:DSResourceDefinition, id:string | number, options?:DSConfiguration):JSDataPromise; + + findAll(config:DSResourceDefinition, params?:DSFilterArg, options?:DSConfiguration):JSDataPromise; + + update(config:DSResourceDefinition, id:string | number, attrs:Object, options?:DSConfiguration):JSDataPromise; + updateAll(config:DSResourceDefinition, attrs:Object, params?:DSFilterArg, options?:DSConfiguration):JSDataPromise; + } + + // Custom action config + interface DSActionConfig { + adapter?: string; + endpoint?: string; + pathname?: string; + method?: string; + } + + // Custom action method definition + // options are passed to adapter.HTTP() method-call, js-data-http adapter by default uses AXIOS but can also be $http in case of angular + // or a custom adapter implementation. The adapter can be set via the DSActionConfig. + interface DSActionFn { + (id:string | number, options?:Object):JSDataPromise + } +} + +// declaring the existing global js object +declare var JSData:{ + DS: JSData.DS; + DSErrors: JSData.DSErrors; +}; + +//Support node require +declare module 'js-data' { + + export = JSData; +} diff --git a/js-data/legacy/js-data-node-1.5.4-tests.ts b/js-data/legacy/js-data-node-1.5.4-tests.ts new file mode 100644 index 0000000000..2a89031e74 --- /dev/null +++ b/js-data/legacy/js-data-node-1.5.4-tests.ts @@ -0,0 +1,11 @@ +/// + +import JSData = require('js-data'); +var store = new JSData.DS(); + +// simplest model definition +var User = store.defineResource('user'); + +User.find(1).then(function (user: any) { + user; // { id: 1, name: 'John' } +}); diff --git a/jsnlog/jsnlog-tests.ts b/jsnlog/jsnlog-tests.ts new file mode 100644 index 0000000000..dfb32a6c85 --- /dev/null +++ b/jsnlog/jsnlog-tests.ts @@ -0,0 +1,80 @@ +/// + +// ---------------------------------------------------------- +// JL + +var traceLevel: number = JL.getTraceLevel(); +var debugLevel: number = JL.getDebugLevel(); +var infoLevel: number = JL.getInfoLevel(); +var warnLevel: number = JL.getWarnLevel(); +var errorLevel: number = JL.getErrorLevel(); +var fatalLevel: number = JL.getFatalLevel(); + +JL.setOptions({ + enabled: true, + maxMessages: 5, + defaultAjaxUrl: '/jsnlog.logger', + clientIP: '0.0.0.0', + requestId: 'a reuest id', + defaultBeforeSend: null +}); + +// ---------------------------------------------------------- +// Ajax Appender + +var ajaxAppender1: JSNLog.JSNLogAjaxAppender = JL.createAjaxAppender('ajaxAppender'); + +ajaxAppender1.setOptions({ + level: 5000, + ipRegex: 'a regex', + userAgentRegex: 'a user agent string', + disallow: 'regex matching suppressed messages', + sendWithBufferLevel: 5000, + storeInBufferLevel: 2000, + bufferSize: 10, + batchSize: 2, + url: '/jsnlog.logger', + beforeSend: null +}); + +// ---------------------------------------------------------- +// Console Appender + +var consoleAppender1: JSNLog.JSNLogConsoleAppender = JL.createConsoleAppender('consoleAppender'); + +consoleAppender1.setOptions({ + level: 5000, + ipRegex: 'a regex', + userAgentRegex: 'a user agent string', + disallow: 'regex matching suppressed messages', + sendWithBufferLevel: 5000, + storeInBufferLevel: 2000, + bufferSize: 10, + batchSize: 2 +}); + + +// ---------------------------------------------------------- +// Loggers + +var logger1: JSNLog.JSNLogLogger = JL('mylogger'); + +var exception = {}; + +logger1.trace('log message').debug({ x: 1, y: 2}); +logger1.info(function() { return 5; }); +logger1.warn('log message'); +logger1.error('log message'); +logger1.fatal('log message'); +logger1.fatalException('log message', exception); +logger1.log(4000, 'log message', exception); + +logger1.setOptions({ + level: 5000, + ipRegex: 'a regex', + userAgentRegex: 'a user agent string', + disallow: 'regex matching suppressed messages', + appenders: [ ajaxAppender1, consoleAppender1 ], + onceOnly: [ 'regex1', 'regex2' ] +}); + diff --git a/jsnlog/jsnlog.d.ts b/jsnlog/jsnlog.d.ts new file mode 100644 index 0000000000..da9893fc78 --- /dev/null +++ b/jsnlog/jsnlog.d.ts @@ -0,0 +1,112 @@ +// Type definitions for JSNLog v2.11.0+ +// Project: https://github.com/mperdeck/jsnlog.js +// Definitions by: Mattijs Perdeck +// Definitions: https://github.com/borisyankov/DefinitelyTyped + +// ------------------------------- +// Full documentation is at +// http://jsnlog.com +// ------------------------------- + +/** +* Copyright 2015 Mattijs Perdeck. +* +* This project is licensed under the MIT license. +* +* Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the following conditions: + +* The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software. +* +* THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. +*/ + +// Declarations of all interfaces and ambient objects, except for JL itself. +// Provides strong typing in both jsnlog.ts itself and in TypeScript programs that use +// JSNLog. + +declare module JSNLog { + + interface JSNLogOptions { + enabled?: boolean; + maxMessages?: number; + defaultAjaxUrl?: string; + clientIP?: string; + requestId?: string; + defaultBeforeSend?: (xhr: XMLHttpRequest) => void; + } + + interface JSNLogFilterOptions { + level?: number; + ipRegex?: string; + userAgentRegex?: string; + disallow?: string; + } + + interface JSNLogLoggerOptions extends JSNLogFilterOptions { + appenders?: JSNLogAppender[]; + onceOnly?: string[]; + } + + // Base for all appender options types + interface JSNLogAppenderOptions extends JSNLogFilterOptions { + sendWithBufferLevel?: number; + storeInBufferLevel?: number; + bufferSize?: number; + batchSize?: number; + } + + interface JSNLogAjaxAppenderOptions extends JSNLogAppenderOptions { + url?: string; + beforeSend?: (xhr: XMLHttpRequest) => void; + } + + interface JSNLogLogger { + setOptions(options: JSNLogLoggerOptions): JSNLogLogger; + + trace(logObject: any): JSNLogLogger; + debug(logObject: any): JSNLogLogger; + info(logObject: any): JSNLogLogger; + warn(logObject: any): JSNLogLogger; + error(logObject: any): JSNLogLogger; + fatal(logObject: any): JSNLogLogger; + fatalException(logObject: any, e: any): JSNLogLogger; + log(level: number, logObject: any, e?: any): JSNLogLogger; + } + + interface JSNLogAppender { + setOptions(options: JSNLogAppenderOptions): JSNLogAppender; + } + + interface JSNLogAjaxAppender extends JSNLogAppender { + setOptions(options: JSNLogAjaxAppenderOptions): JSNLogAjaxAppender; + } + + interface JSNLogConsoleAppender extends JSNLogAppender { + } + + interface JSNLogStatic { + (loggerName?: string): JSNLogLogger; + + setOptions(options: JSNLogOptions): JSNLogStatic; + createAjaxAppender(appenderName: string): JSNLogAjaxAppender; + createConsoleAppender(appenderName: string): JSNLogConsoleAppender; + + getTraceLevel(): number; + getDebugLevel(): number; + getInfoLevel(): number; + getWarnLevel(): number; + getErrorLevel(): number; + getFatalLevel(): number; + } +} + +declare function __jsnlog_configure(jsnlog: JSNLog.JSNLogStatic): void; + + +// Ambient declaration of the JL object itself + +declare var JL: JSNLog.JSNLogStatic; + + + + diff --git a/jsuri/jsuri.d.ts b/jsuri/jsuri.d.ts index a50002140e..c96d420926 100644 --- a/jsuri/jsuri.d.ts +++ b/jsuri/jsuri.d.ts @@ -1,6 +1,6 @@ // Type definitions for jsUri 1.3+ // Project: https://github.com/derek-watson/jsUri -// Definitions by: Chris Charabaruk +// Definitions by: Chris Charabaruk , Florian Wagner // Definitions: https://github.com/borisyankov/DefinitelyTyped declare module jsuri { @@ -135,5 +135,9 @@ declare module jsuri { declare type Uri = jsuri.Uri; declare module 'jsuri' { - export = Uri; + export = jsuri.Uri; +} + +declare module 'jsUri' { + export = jsuri.Uri; } diff --git a/kendo-ui/kendo-ui-tests.ts b/kendo-ui/kendo-ui-tests.ts index 3c8a9bc042..fba08a02ed 100644 --- a/kendo-ui/kendo-ui-tests.ts +++ b/kendo-ui/kendo-ui-tests.ts @@ -1,2 +1,26 @@ /// /// + +var is = { + string: (msg: string) => { + return true; + } +} + +// TreeView +$(() => { + var treeview = $("#treeview").data("kendoTreeView"); + + is.string(treeview.text("#foo")); + + treeview.text("#foo", "bar"); +}); + +// Window +$(() => { + var window = $("#window").data("kendoWindow"); + + var dom = $("Foo"); + + window.content(dom); +}); diff --git a/kendo-ui/kendo-ui.d.ts b/kendo-ui/kendo-ui.d.ts index 0683ab238b..5168cdb846 100644 --- a/kendo-ui/kendo-ui.d.ts +++ b/kendo-ui/kendo-ui.d.ts @@ -1,8 +1,10 @@ -// Type definitions for Kendo UI Professional v2015.1.609 +// Type definitions for Kendo UI Professional v2015.3.1111 // Project: http://www.telerik.com/kendo-ui // Definitions by: Telerik // Definitions: https://github.com/borisyankov/DefinitelyTyped +/// + declare module kendo { function culture(): { name: string; @@ -87,7 +89,7 @@ declare module kendo { }; }; - var cultures: {[culture:string] : { + var cultures: {[culture: string] : { name?: string; calendar?: { AM: string[]; @@ -183,7 +185,7 @@ declare module kendo { function observable(data: any): kendo.data.ObservableObject; function observableHierarchy(array: any[]): kendo.data.ObservableArray; - function render(template:(data: any) => string, data: any[]): string; + function render(template: (data: any) => string, data: any[]): string; function template(template: string, options?: TemplateOptions): (data: any) => string; function guid(): string; @@ -214,7 +216,7 @@ declare module kendo { F2: number; F10: number; F12: number; - } + }; var support: { touch: boolean; @@ -242,7 +244,7 @@ declare module kendo { opera: boolean; version: string; }; - } + }; interface TemplateOptions { paramName?: string; @@ -268,6 +270,7 @@ declare module kendo { tagName?: string; wrap?: boolean; model?: Object; + evalTemplate?: boolean; init?: (e: ViewEvent) => void; show?: (e: ViewEvent) => void; hide?: (e: ViewEvent) => void; @@ -275,21 +278,21 @@ declare module kendo { interface ViewEvent { sender: View; - isDefaultPrevented(): boolean; preventDefault: Function; + isDefaultPrevented(): boolean; } class View extends Observable { constructor(element: Element, options?: ViewOptions); constructor(element: string, options?: ViewOptions); - init(element: Element, options?: ViewOptions): void; - init(element: string, options?: ViewOptions): void; - render(container?: any): JQuery; - destroy(): void; element: JQuery; content: any; tagName: string; model: Object; + init(element: Element, options?: ViewOptions): void; + init(element: string, options?: ViewOptions): void; + render(container?: any): JQuery; + destroy(): void; } class ViewContainer extends Observable { @@ -297,15 +300,15 @@ declare module kendo { } class Layout extends View { - showIn(selector: string, view: View): void; containers: { [selector: string]: ViewContainer; }; + showIn(selector: string, view: View): void; } class History extends Observable { - start(options: Object): void; - stop(): void; current: string; root: string; + start(options: Object): void; + stop(): void; change(callback: Function): void; navigate(location: string, silent?: boolean): void; } @@ -320,9 +323,9 @@ declare module kendo { interface RouterEvent { sender: Router; - isDefaultPrevented(): boolean; - preventDefault: Function; url: string; + preventDefault: Function; + isDefaultPrevented(): boolean; } class Route extends Class { @@ -333,12 +336,13 @@ declare module kendo { class Router extends Observable { constructor(options?: RouterOptions); + routes: Route[]; init(options?: RouterOptions): void; start(): void; destroy(): void; route(route: string, callback: Function): void; navigate(location: string, silent?: boolean): void; - routes: Route[]; + replace(location: string, silent?: boolean): void; } } @@ -457,8 +461,8 @@ declare module kendo.data { source: any; parents: any[]; path: string; - dependencies: { [path: string]: boolean; }; observable: boolean; + dependencies: { [path: string]: boolean; }; constructor(parents: any[], path: string); change(e: Object): void; start(source: kendo.Observable): void; @@ -491,17 +495,16 @@ declare module kendo.data { class Binder extends Class { static fn: Binder; - static extend(prototype: Object): Binder; - element: any; bindings: Bindings; + options: BinderOptions; constructor(element: any, bindings: Bindings, options?: BinderOptions); + static extend(prototype: Object): Binder; init(element: any, bindings: Bindings, options?: BinderOptions): void; bind(binding: Binding, attribute: string): void; destroy(): void; refresh(): void; refresh(attribute: string): void; - options: BinderOptions; } interface BinderOptions { @@ -509,32 +512,35 @@ declare module kendo.data { class ObservableObject extends Observable{ constructor(value?: any); + uid: string; init(value?: any): void; get(name: string): any; parent(): ObservableObject; set(name: string, value: any): void; toJSON(): Object; - uid: string; } class Model extends ObservableObject { + static idField: string; + static fields: DataSourceSchemaModelFields; + idField: string; _defaultId: any; fields: DataSourceSchemaModelFields; defaults: { [field: string]: any; }; - constructor(data?: any); - init(data?: any):void; - accept(data?: any): void; - dirty: boolean; id: any; - editable(field: string): boolean; - isNew(): boolean; - static idField: string; - static fields: DataSourceSchemaModelFields; + dirty: boolean; + static define(options: DataSourceSchemaModelWithFieldsObject): typeof Model; static define(options: DataSourceSchemaModelWithFieldsArray): typeof Model; + + constructor(data?: any); + init(data?: any): void; + accept(data?: any): void; + editable(field: string): boolean; + isNew(): boolean; } interface SchedulerEventData { @@ -552,8 +558,10 @@ declare module kendo.data { } class SchedulerEvent extends Model { + static idField: string; + static fields: DataSourceSchemaModelFields; + constructor(data?: SchedulerEventData); - init(data?: SchedulerEventData): void; description: string; end: Date; @@ -566,10 +574,11 @@ declare module kendo.data { recurrenceRule: string; recurrenceException: string; title: string; - static idField: string; - static fields: DataSourceSchemaModelFields; + static define(options: DataSourceSchemaModelWithFieldsObject): typeof SchedulerEvent; static define(options: DataSourceSchemaModelWithFieldsArray): typeof SchedulerEvent; + + init(data?: SchedulerEventData): void; clone(options: any, updateUid: boolean): SchedulerEvent; duration(): number; expand(start: Date, end: Date, zone: any): SchedulerEvent[]; @@ -583,19 +592,19 @@ declare module kendo.data { } class TreeListModel extends Model { - constructor(data?: any); - init(data?: any): void; + static idField: string; + static fields: DataSourceSchemaModelFields; id: any; parentId: any; - loaded(value: boolean): void; - loaded(): boolean; - - static idField: string; - static fields: DataSourceSchemaModelFields; static define(options: DataSourceSchemaModelWithFieldsObject): typeof TreeListModel; static define(options: DataSourceSchemaModelWithFieldsArray): typeof TreeListModel; + + constructor(data?: any); + init(data?: any): void; + loaded(value: boolean): void; + loaded(): boolean; } class TreeListDataSource extends DataSource { @@ -619,36 +628,40 @@ declare module kendo.data { } class GanttTask extends Model { - constructor(data?: any); - init(data?: any): void; - - id: any; - parentId: number; - orderId: number; - title: string; - start: Date; - end: Date; - percentComplete: number; - summary: boolean; - expanded: boolean; static idField: string; static fields: DataSourceSchemaModelFields; + + id: any; + parentId: number; + orderId: number; + title: string; + start: Date; + end: Date; + percentComplete: number; + summary: boolean; + expanded: boolean; + static define(options: DataSourceSchemaModelWithFieldsObject): typeof GanttTask; static define(options: DataSourceSchemaModelWithFieldsArray): typeof GanttTask; + + constructor(data?: any); + init(data?: any): void; } class GanttDependency extends Model { - constructor(data?: any); - init(data?: any): void; - - id: any; - predecessorId: number; - successorId: number; - type: number; static idField: string; static fields: DataSourceSchemaModelFields; + + id: any; + predecessorId: number; + successorId: number; + type: number; + static define(options: DataSourceSchemaModelWithFieldsObject): typeof GanttDependency; static define(options: DataSourceSchemaModelWithFieldsArray): typeof GanttDependency; + + constructor(data?: any); + init(data?: any): void; } class Node extends Model { @@ -836,13 +849,14 @@ declare module kendo.data { } interface DataSourceTransport { - parameterMap?(data: DataSourceTransportParameterMapData, type: string): any; create?: DataSourceTransportCreate; destroy?: DataSourceTransportDestroy; push?: Function; read?: DataSourceTransportRead; signalr?: DataSourceTransportSignalr; update?: DataSourceTransportUpdate; + + parameterMap?(data: DataSourceTransportParameterMapData, type: string): any; } interface DataSourceTransportSignalrClient { @@ -950,10 +964,11 @@ declare module kendo.data { } class ObservableArray extends Observable { - constructor(array: any[]); - init(array: any[]): void; + length: number; [index: number]: any; + constructor(array: any[]); + init(array: any[]): void; empty(): void; every(callback: (item: Object, index: number, source: ObservableArray) => boolean): boolean; filter(callback: (item: Object, index: number, source: ObservableArray) => boolean): any[]; @@ -961,7 +976,6 @@ declare module kendo.data { forEach(callback: (item: Object, index: number, source: ObservableArray) => void ): void; indexOf(item: any): number; join(separator: string): string; - length: number; map(callback: (item: Object, index: number, source: ObservableArray) => any): any[]; parent(): ObservableObject; pop(): ObservableObject; @@ -986,10 +1000,12 @@ declare module kendo.data { } class DataSource extends Observable{ + options: DataSourceOptions; + + static create(options?: DataSourceOptions): DataSource; + constructor(options?: DataSourceOptions); init(options?: DataSourceOptions): void; - static create(options?: DataSourceOptions): DataSource; - options: DataSourceOptions; add(model: Object): kendo.data.Model; add(model: kendo.data.Model): kendo.data.Model; aggregate(val: any): void; @@ -1020,6 +1036,12 @@ declare module kendo.data { page(page: number): void; pageSize(): number; pageSize(size: number): void; + pushCreate(model: Object): void; + pushCreate(models: any[]): void; + pushDestroy(model: Object): void; + pushDestroy(models: any[]): void; + pushUpdate(model: Object): void; + pushUpdate(models: any[]): void; query(options?: any): JQueryPromise; read(data?: any): JQueryPromise; remove(model: kendo.data.ObservableObject): void; @@ -1077,7 +1099,7 @@ declare module kendo.data { dir?: string; } - interface DataSourceTransportCreate { + interface DataSourceTransportCreate extends JQueryAjaxSettings { cache?: boolean; contentType?: string; data?: any; @@ -1086,7 +1108,7 @@ declare module kendo.data { url?: any; } - interface DataSourceTransportDestroy { + interface DataSourceTransportDestroy extends JQueryAjaxSettings { cache?: boolean; contentType?: string; data?: any; @@ -1095,7 +1117,7 @@ declare module kendo.data { url?: any; } - interface DataSourceTransportRead { + interface DataSourceTransportRead extends JQueryAjaxSettings { cache?: boolean; contentType?: string; data?: any; @@ -1104,7 +1126,7 @@ declare module kendo.data { url?: any; } - interface DataSourceTransportUpdate { + interface DataSourceTransportUpdate extends JQueryAjaxSettings { cache?: boolean; contentType?: string; data?: any; @@ -1221,7 +1243,7 @@ declare module kendo.data { } declare module kendo.data.transports { - var odata : DataSourceTransport; + var odata: DataSourceTransport; } declare module kendo.ui { @@ -1229,6 +1251,11 @@ declare module kendo.ui { class Widget extends Observable { static fn: Widget; + + element: JQuery; + options: Object; + events: string[]; + static extend(prototype: Object): Widget; constructor(element: Element, options?: Object); @@ -1238,11 +1265,8 @@ declare module kendo.ui { init(element: JQuery, options?: Object): void; init(selector: String, options?: Object): void; destroy(): void; - element: JQuery; setOptions(options: Object): void; resize(force?: boolean): void; - options: Object; - events: string[]; } function plugin(widget: typeof kendo.ui.Widget, register?: typeof kendo.ui, prefix?: String): void; @@ -1359,17 +1383,18 @@ declare module kendo.mobile { function init(element: Element): void; class Application extends Observable { + options: ApplicationOptions; + router: kendo.Router; + pane: kendo.mobile.ui.Pane; + constructor(element?: any, options?: ApplicationOptions); init(element?: any, options?: ApplicationOptions): void; - options: ApplicationOptions; hideLoading(): void; navigate(url: string, transition?: string): void; replace(url: string, transition?: string): void; scroller(): kendo.mobile.ui.Scroller; showLoading(): void; view(): kendo.mobile.ui.View; - router: kendo.Router; - pane: kendo.mobile.ui.Pane; } interface ApplicationOptions { @@ -1429,9 +1454,732 @@ declare module kendo.dataviz.map.layer { } } +declare module kendo.drawing.pdf { + function saveAs(group: kendo.drawing.Group, fileName: string, + proxyUrl?: string, callback?: Function): void; +} + +declare module kendo.drawing { + class Arc extends kendo.drawing.Element { + + + options: ArcOptions; + + + constructor(geometry: kendo.geometry.Arc, options?: ArcOptions); + + + bbox(): kendo.geometry.Rect; + clip(): kendo.drawing.Path; + clip(clip: kendo.drawing.Path): void; + clippedBBox(): kendo.geometry.Rect; + geometry(): kendo.geometry.Arc; + geometry(value: kendo.geometry.Arc): void; + fill(color: string, opacity?: number): kendo.drawing.Arc; + opacity(): number; + opacity(opacity: number): void; + stroke(color: string, width?: number, opacity?: number): kendo.drawing.Arc; + transform(): kendo.geometry.Transformation; + transform(transform: kendo.geometry.Transformation): void; + visible(): boolean; + visible(visible: boolean): void; + + } + + interface ArcOptions { + name?: string; + clip?: kendo.drawing.Path; + fill?: kendo.drawing.FillOptions; + opacity?: number; + stroke?: kendo.drawing.StrokeOptions; + transform?: kendo.geometry.Transformation; + visible?: boolean; + } + interface ArcEvent { + sender: Arc; + preventDefault: Function; + isDefaultPrevented(): boolean; + } + + + class Circle extends kendo.drawing.Element { + + + options: CircleOptions; + + + constructor(geometry: kendo.geometry.Circle, options?: CircleOptions); + + + bbox(): kendo.geometry.Rect; + clip(): kendo.drawing.Path; + clip(clip: kendo.drawing.Path): void; + clippedBBox(): kendo.geometry.Rect; + geometry(): kendo.geometry.Circle; + geometry(value: kendo.geometry.Circle): void; + fill(color: string, opacity?: number): kendo.drawing.Circle; + opacity(): number; + opacity(opacity: number): void; + stroke(color: string, width?: number, opacity?: number): kendo.drawing.Circle; + transform(): kendo.geometry.Transformation; + transform(transform: kendo.geometry.Transformation): void; + visible(): boolean; + visible(visible: boolean): void; + + } + + interface CircleOptions { + name?: string; + clip?: kendo.drawing.Path; + fill?: kendo.drawing.FillOptions; + opacity?: number; + stroke?: kendo.drawing.StrokeOptions; + transform?: kendo.geometry.Transformation; + visible?: boolean; + } + interface CircleEvent { + sender: Circle; + preventDefault: Function; + isDefaultPrevented(): boolean; + } + + + class Element extends kendo.Class { + + + options: ElementOptions; + + + constructor(options?: ElementOptions); + + + bbox(): kendo.geometry.Rect; + clip(): kendo.drawing.Path; + clip(clip: kendo.drawing.Path): void; + clippedBBox(): kendo.geometry.Rect; + opacity(): number; + opacity(opacity: number): void; + transform(): kendo.geometry.Transformation; + transform(transform: kendo.geometry.Transformation): void; + visible(): boolean; + visible(visible: boolean): void; + + } + + interface ElementOptions { + name?: string; + clip?: kendo.drawing.Path; + opacity?: number; + transform?: kendo.geometry.Transformation; + visible?: boolean; + } + interface ElementEvent { + sender: Element; + preventDefault: Function; + isDefaultPrevented(): boolean; + } + + + interface FillOptions { + + + + color: string; + opacity: number; + + + + + } + + + + class Gradient extends kendo.Class { + + + options: GradientOptions; + + stops: any; + + constructor(options?: GradientOptions); + + + addStop(offset: number, color: string, opacity: number): kendo.drawing.GradientStop; + removeStop(stop: kendo.drawing.GradientStop): void; + + } + + interface GradientOptions { + name?: string; + stops?: any; + } + interface GradientEvent { + sender: Gradient; + preventDefault: Function; + isDefaultPrevented(): boolean; + } + + + class GradientStop extends kendo.Class { + + + options: GradientStopOptions; + + + constructor(options?: GradientStopOptions); + + + + } + + interface GradientStopOptions { + name?: string; + offset?: number; + color?: string; + opacity?: number; + } + interface GradientStopEvent { + sender: GradientStop; + preventDefault: Function; + isDefaultPrevented(): boolean; + } + + + class Group extends kendo.drawing.Element { + + + options: GroupOptions; + + children: any; + + constructor(options?: GroupOptions); + + + append(element: kendo.drawing.Element): void; + clear(): void; + clip(): kendo.drawing.Path; + clip(clip: kendo.drawing.Path): void; + clippedBBox(): kendo.geometry.Rect; + insert(position: number, element: kendo.drawing.Element): void; + opacity(): number; + opacity(opacity: number): void; + remove(element: kendo.drawing.Element): void; + removeAt(index: number): void; + visible(): boolean; + visible(visible: boolean): void; + + } + + interface GroupOptions { + name?: string; + clip?: kendo.drawing.Path; + opacity?: number; + pdf?: kendo.drawing.PDFOptions; + transform?: kendo.geometry.Transformation; + visible?: boolean; + } + interface GroupEvent { + sender: Group; + preventDefault: Function; + isDefaultPrevented(): boolean; + } + + + class Image extends kendo.drawing.Element { + + + options: ImageOptions; + + + constructor(src: string, rect: kendo.geometry.Rect); + + + bbox(): kendo.geometry.Rect; + clip(): kendo.drawing.Path; + clip(clip: kendo.drawing.Path): void; + clippedBBox(): kendo.geometry.Rect; + opacity(): number; + opacity(opacity: number): void; + src(): string; + src(value: string): void; + rect(): kendo.geometry.Rect; + rect(value: kendo.geometry.Rect): void; + transform(): kendo.geometry.Transformation; + transform(transform: kendo.geometry.Transformation): void; + visible(): boolean; + visible(visible: boolean): void; + + } + + interface ImageOptions { + name?: string; + clip?: kendo.drawing.Path; + opacity?: number; + transform?: kendo.geometry.Transformation; + visible?: boolean; + } + interface ImageEvent { + sender: Image; + preventDefault: Function; + isDefaultPrevented(): boolean; + } + + + class Layout extends kendo.drawing.Group { + + + options: LayoutOptions; + + + constructor(rect: kendo.geometry.Rect, options?: LayoutOptions); + + + rect(): kendo.geometry.Rect; + rect(rect: kendo.geometry.Rect): void; + reflow(): void; + + } + + interface LayoutOptions { + name?: string; + alignContent?: string; + alignItems?: string; + justifyContent?: string; + lineSpacing?: number; + spacing?: number; + orientation?: string; + wrap?: boolean; + } + interface LayoutEvent { + sender: Layout; + preventDefault: Function; + isDefaultPrevented(): boolean; + } + + + class LinearGradient extends kendo.drawing.Gradient { + + + options: LinearGradientOptions; + + stops: any; + + constructor(options?: LinearGradientOptions); + + + addStop(offset: number, color: string, opacity: number): kendo.drawing.GradientStop; + end(): kendo.geometry.Point; + end(end: any): void; + end(end: kendo.geometry.Point): void; + start(): kendo.geometry.Point; + start(start: any): void; + start(start: kendo.geometry.Point): void; + removeStop(stop: kendo.drawing.GradientStop): void; + + } + + interface LinearGradientOptions { + name?: string; + stops?: any; + } + interface LinearGradientEvent { + sender: LinearGradient; + preventDefault: Function; + isDefaultPrevented(): boolean; + } + + + class MultiPath extends kendo.drawing.Element { + + + options: MultiPathOptions; + + paths: any; + + constructor(options?: MultiPathOptions); + + + bbox(): kendo.geometry.Rect; + clip(): kendo.drawing.Path; + clip(clip: kendo.drawing.Path): void; + clippedBBox(): kendo.geometry.Rect; + close(): kendo.drawing.MultiPath; + curveTo(controlOut: any, controlIn: any, endPoint: any): kendo.drawing.MultiPath; + curveTo(controlOut: any, controlIn: any, endPoint: kendo.geometry.Point): kendo.drawing.MultiPath; + curveTo(controlOut: any, controlIn: kendo.geometry.Point, endPoint: any): kendo.drawing.MultiPath; + curveTo(controlOut: any, controlIn: kendo.geometry.Point, endPoint: kendo.geometry.Point): kendo.drawing.MultiPath; + curveTo(controlOut: kendo.geometry.Point, controlIn: any, endPoint: any): kendo.drawing.MultiPath; + curveTo(controlOut: kendo.geometry.Point, controlIn: any, endPoint: kendo.geometry.Point): kendo.drawing.MultiPath; + curveTo(controlOut: kendo.geometry.Point, controlIn: kendo.geometry.Point, endPoint: any): kendo.drawing.MultiPath; + curveTo(controlOut: kendo.geometry.Point, controlIn: kendo.geometry.Point, endPoint: kendo.geometry.Point): kendo.drawing.MultiPath; + fill(color: string, opacity?: number): kendo.drawing.MultiPath; + lineTo(x: number, y?: number): kendo.drawing.MultiPath; + lineTo(x: any, y?: number): kendo.drawing.MultiPath; + lineTo(x: kendo.geometry.Point, y?: number): kendo.drawing.MultiPath; + moveTo(x: number, y?: number): kendo.drawing.MultiPath; + moveTo(x: any, y?: number): kendo.drawing.MultiPath; + moveTo(x: kendo.geometry.Point, y?: number): kendo.drawing.MultiPath; + opacity(): number; + opacity(opacity: number): void; + stroke(color: string, width?: number, opacity?: number): kendo.drawing.MultiPath; + transform(): kendo.geometry.Transformation; + transform(transform: kendo.geometry.Transformation): void; + visible(): boolean; + visible(visible: boolean): void; + + } + + interface MultiPathOptions { + name?: string; + clip?: kendo.drawing.Path; + fill?: kendo.drawing.FillOptions; + opacity?: number; + stroke?: kendo.drawing.StrokeOptions; + transform?: kendo.geometry.Transformation; + visible?: boolean; + } + interface MultiPathEvent { + sender: MultiPath; + preventDefault: Function; + isDefaultPrevented(): boolean; + } + + + class OptionsStore extends kendo.Class { + + + options: OptionsStoreOptions; + + observer: any; + + constructor(options?: OptionsStoreOptions); + + + get(field: string): any; + set(field: string, value: any): void; + + } + + interface OptionsStoreOptions { + name?: string; + } + interface OptionsStoreEvent { + sender: OptionsStore; + preventDefault: Function; + isDefaultPrevented(): boolean; + } + + + interface PDFOptions { + + + + creator: string; + date: Date; + keywords: string; + landscape: boolean; + margin: any; + paperSize: any; + subject: string; + title: string; + + + + + } + + + + class Path extends kendo.drawing.Element { + + + options: PathOptions; + + segments: any; + + constructor(options?: PathOptions); + + static fromPoints(points: any): kendo.drawing.Path; + static fromRect(rect: kendo.geometry.Rect): kendo.drawing.Path; + static parse(svgPath: string, options?: any): kendo.drawing.Path; + + bbox(): kendo.geometry.Rect; + clip(): kendo.drawing.Path; + clip(clip: kendo.drawing.Path): void; + clippedBBox(): kendo.geometry.Rect; + close(): kendo.drawing.Path; + curveTo(controlOut: any, controlIn: any, endPoint: any): kendo.drawing.Path; + curveTo(controlOut: any, controlIn: any, endPoint: kendo.geometry.Point): kendo.drawing.Path; + curveTo(controlOut: any, controlIn: kendo.geometry.Point, endPoint: any): kendo.drawing.Path; + curveTo(controlOut: any, controlIn: kendo.geometry.Point, endPoint: kendo.geometry.Point): kendo.drawing.Path; + curveTo(controlOut: kendo.geometry.Point, controlIn: any, endPoint: any): kendo.drawing.Path; + curveTo(controlOut: kendo.geometry.Point, controlIn: any, endPoint: kendo.geometry.Point): kendo.drawing.Path; + curveTo(controlOut: kendo.geometry.Point, controlIn: kendo.geometry.Point, endPoint: any): kendo.drawing.Path; + curveTo(controlOut: kendo.geometry.Point, controlIn: kendo.geometry.Point, endPoint: kendo.geometry.Point): kendo.drawing.Path; + fill(color: string, opacity?: number): kendo.drawing.Path; + lineTo(x: number, y?: number): kendo.drawing.Path; + lineTo(x: any, y?: number): kendo.drawing.Path; + lineTo(x: kendo.geometry.Point, y?: number): kendo.drawing.Path; + moveTo(x: number, y?: number): kendo.drawing.Path; + moveTo(x: any, y?: number): kendo.drawing.Path; + moveTo(x: kendo.geometry.Point, y?: number): kendo.drawing.Path; + opacity(): number; + opacity(opacity: number): void; + stroke(color: string, width?: number, opacity?: number): kendo.drawing.Path; + transform(): kendo.geometry.Transformation; + transform(transform: kendo.geometry.Transformation): void; + visible(): boolean; + visible(visible: boolean): void; + + } + + interface PathOptions { + name?: string; + clip?: kendo.drawing.Path; + fill?: kendo.drawing.FillOptions; + opacity?: number; + stroke?: kendo.drawing.StrokeOptions; + transform?: kendo.geometry.Transformation; + visible?: boolean; + } + interface PathEvent { + sender: Path; + preventDefault: Function; + isDefaultPrevented(): boolean; + } + + + class RadialGradient extends kendo.drawing.Gradient { + + + options: RadialGradientOptions; + + stops: any; + + constructor(options?: RadialGradientOptions); + + + addStop(offset: number, color: string, opacity: number): kendo.drawing.GradientStop; + center(): kendo.geometry.Point; + center(center: any): void; + center(center: kendo.geometry.Point): void; + radius(): number; + radius(value: number): void; + removeStop(stop: kendo.drawing.GradientStop): void; + + } + + interface RadialGradientOptions { + name?: string; + center?: any|kendo.geometry.Point; + radius?: number; + stops?: any; + } + interface RadialGradientEvent { + sender: RadialGradient; + preventDefault: Function; + isDefaultPrevented(): boolean; + } + + + class Rect extends kendo.drawing.Element { + + + options: RectOptions; + + + constructor(geometry: kendo.geometry.Rect, options?: RectOptions); + + + bbox(): kendo.geometry.Rect; + clip(): kendo.drawing.Path; + clip(clip: kendo.drawing.Path): void; + clippedBBox(): kendo.geometry.Rect; + geometry(): kendo.geometry.Rect; + geometry(value: kendo.geometry.Rect): void; + fill(color: string, opacity?: number): kendo.drawing.Rect; + opacity(): number; + opacity(opacity: number): void; + stroke(color: string, width?: number, opacity?: number): kendo.drawing.Rect; + transform(): kendo.geometry.Transformation; + transform(transform: kendo.geometry.Transformation): void; + visible(): boolean; + visible(visible: boolean): void; + + } + + interface RectOptions { + name?: string; + clip?: kendo.drawing.Path; + fill?: kendo.drawing.FillOptions; + opacity?: number; + stroke?: kendo.drawing.StrokeOptions; + transform?: kendo.geometry.Transformation; + visible?: boolean; + } + interface RectEvent { + sender: Rect; + preventDefault: Function; + isDefaultPrevented(): boolean; + } + + + class Segment extends kendo.Class { + + + options: SegmentOptions; + + + constructor(anchor: kendo.geometry.Point, controlIn: kendo.geometry.Point, controlOut: kendo.geometry.Point); + + + anchor(): kendo.geometry.Point; + anchor(value: kendo.geometry.Point): void; + controlIn(): kendo.geometry.Point; + controlIn(value: kendo.geometry.Point): void; + controlOut(): kendo.geometry.Point; + controlOut(value: kendo.geometry.Point): void; + + } + + interface SegmentOptions { + name?: string; + } + interface SegmentEvent { + sender: Segment; + preventDefault: Function; + isDefaultPrevented(): boolean; + } + + + interface StrokeOptions { + + + + color: string; + dashType: string; + lineCap: string; + lineJoin: string; + opacity: number; + width: number; + + + + + } + + + + class Surface extends kendo.Observable { + + + options: SurfaceOptions; + + + constructor(options?: SurfaceOptions); + + static create(element: JQuery, options?: any): kendo.drawing.Surface; + static create(element: Element, options?: any): kendo.drawing.Surface; + + clear(): void; + draw(element: kendo.drawing.Element): void; + eventTarget(e: any): kendo.drawing.Element; + resize(force?: boolean): void; + + } + + interface SurfaceOptions { + name?: string; + type?: string; + height?: string; + width?: string; + click?(e: SurfaceClickEvent): void; + mouseenter?(e: SurfaceMouseenterEvent): void; + mouseleave?(e: SurfaceMouseleaveEvent): void; + } + interface SurfaceEvent { + sender: Surface; + preventDefault: Function; + isDefaultPrevented(): boolean; + } + + interface SurfaceClickEvent extends SurfaceEvent { + element?: kendo.drawing.Element; + originalEvent?: any; + } + + interface SurfaceMouseenterEvent extends SurfaceEvent { + element?: kendo.drawing.Element; + originalEvent?: any; + } + + interface SurfaceMouseleaveEvent extends SurfaceEvent { + element?: kendo.drawing.Element; + originalEvent?: any; + } + + + class Text extends kendo.drawing.Element { + + + options: TextOptions; + + + constructor(content: string, position: kendo.geometry.Point, options?: TextOptions); + + + bbox(): kendo.geometry.Rect; + clip(): kendo.drawing.Path; + clip(clip: kendo.drawing.Path): void; + clippedBBox(): kendo.geometry.Rect; + content(): string; + content(value: string): void; + fill(color: string, opacity?: number): kendo.drawing.Text; + opacity(): number; + opacity(opacity: number): void; + position(): kendo.geometry.Point; + position(value: kendo.geometry.Point): void; + stroke(color: string, width?: number, opacity?: number): kendo.drawing.Text; + transform(): kendo.geometry.Transformation; + transform(transform: kendo.geometry.Transformation): void; + visible(): boolean; + visible(visible: boolean): void; + + } + + interface TextOptions { + name?: string; + clip?: kendo.drawing.Path; + fill?: kendo.drawing.FillOptions; + font?: string; + opacity?: number; + stroke?: kendo.drawing.StrokeOptions; + transform?: kendo.geometry.Transformation; + visible?: boolean; + } + interface TextEvent { + sender: Text; + preventDefault: Function; + isDefaultPrevented(): boolean; + } + + +} declare module kendo.geometry { class Arc extends Observable { + + options: ArcOptions; + + anticlockwise: boolean; + center: kendo.geometry.Point; + endAngle: number; + radiusX: number; + radiusY: number; + startAngle: number; + + + bbox(matrix: kendo.geometry.Matrix): kendo.geometry.Rect; getAnticlockwise(): boolean; getCenter(): kendo.geometry.Point; @@ -1446,12 +2194,7 @@ declare module kendo.geometry { setRadiusX(value: number): kendo.geometry.Arc; setRadiusY(value: number): kendo.geometry.Arc; setStartAngle(value: number): kendo.geometry.Arc; - anticlockwise: boolean; - center: kendo.geometry.Point; - endAngle: number; - radiusX: number; - radiusY: number; - startAngle: number; + } interface ArcOptions { @@ -1459,13 +2202,21 @@ declare module kendo.geometry { } interface ArcEvent { sender: Arc; - isDefaultPrevented(): boolean; preventDefault: Function; + isDefaultPrevented(): boolean; } class Circle extends Observable { + + options: CircleOptions; + + center: kendo.geometry.Point; + radius: number; + + + bbox(matrix: kendo.geometry.Matrix): kendo.geometry.Rect; clone(): kendo.geometry.Circle; equals(other: kendo.geometry.Circle): boolean; @@ -1475,8 +2226,7 @@ declare module kendo.geometry { setCenter(value: kendo.geometry.Point): kendo.geometry.Point; setCenter(value: any): kendo.geometry.Point; setRadius(value: number): kendo.geometry.Circle; - center: kendo.geometry.Point; - radius: number; + } interface CircleOptions { @@ -1484,29 +2234,36 @@ declare module kendo.geometry { } interface CircleEvent { sender: Circle; - isDefaultPrevented(): boolean; preventDefault: Function; + isDefaultPrevented(): boolean; } class Matrix extends Observable { + + options: MatrixOptions; - clone(): kendo.geometry.Matrix; - equals(other: kendo.geometry.Matrix): boolean; - round(digits: number): kendo.geometry.Matrix; - multiplyCopy(matrix: kendo.geometry.Matrix): kendo.geometry.Matrix; - toArray(digits: number): any; - toString(digits: number, separator: string): string; - static rotate(angle: number, x: number, y: number): kendo.geometry.Matrix; - static scale(scaleX: number, scaleY: number): kendo.geometry.Matrix; - static translate(x: number, y: number): kendo.geometry.Matrix; - static unit(): kendo.geometry.Matrix; + a: number; b: number; c: number; d: number; e: number; f: number; + + + static rotate(angle: number, x: number, y: number): kendo.geometry.Matrix; + static scale(scaleX: number, scaleY: number): kendo.geometry.Matrix; + static translate(x: number, y: number): kendo.geometry.Matrix; + static unit(): kendo.geometry.Matrix; + + clone(): kendo.geometry.Matrix; + equals(other: kendo.geometry.Matrix): boolean; + round(digits: number): kendo.geometry.Matrix; + multiplyCopy(matrix: kendo.geometry.Matrix): kendo.geometry.Matrix; + toArray(digits: number): any; + toString(digits: number, separator: string): string; + } interface MatrixOptions { @@ -1514,13 +2271,29 @@ declare module kendo.geometry { } interface MatrixEvent { sender: Matrix; - isDefaultPrevented(): boolean; preventDefault: Function; + isDefaultPrevented(): boolean; } class Point extends Observable { + + options: PointOptions; + + x: number; + y: number; + + constructor(x: number, y: number); + + static create(x: number, y: number): kendo.geometry.Point; + static create(x: any, y: number): kendo.geometry.Point; + static create(x: kendo.geometry.Point, y: number): kendo.geometry.Point; + static min(): kendo.geometry.Point; + static max(): kendo.geometry.Point; + static minPoint(): kendo.geometry.Point; + static maxPoint(): kendo.geometry.Point; + clone(): kendo.geometry.Point; distanceTo(point: kendo.geometry.Point): number; equals(other: kendo.geometry.Point): boolean; @@ -1541,15 +2314,7 @@ declare module kendo.geometry { translate(dx: number, dy: number): kendo.geometry.Point; translateWith(vector: kendo.geometry.Point): kendo.geometry.Point; translateWith(vector: any): kendo.geometry.Point; - static create(x: number, y: number): kendo.geometry.Point; - static create(x: any, y: number): kendo.geometry.Point; - static create(x: kendo.geometry.Point, y: number): kendo.geometry.Point; - static min(): kendo.geometry.Point; - static max(): kendo.geometry.Point; - static minPoint(): kendo.geometry.Point; - static maxPoint(): kendo.geometry.Point; - x: number; - y: number; + } interface PointOptions { @@ -1557,14 +2322,24 @@ declare module kendo.geometry { } interface PointEvent { sender: Point; - isDefaultPrevented(): boolean; preventDefault: Function; + isDefaultPrevented(): boolean; } class Rect extends Observable { - constructor(origin: kendo.geometry.Point, size: kendo.geometry.Size); + + options: RectOptions; + + origin: kendo.geometry.Point; + size: kendo.geometry.Size; + + constructor(origin: kendo.geometry.Point, size: kendo.geometry.Size); + + static fromPoints(pointA: kendo.geometry.Point, pointB: kendo.geometry.Point): kendo.geometry.Rect; + static union(rectA: kendo.geometry.Rect, rectB: kendo.geometry.Rect): kendo.geometry.Rect; + bbox(matrix: kendo.geometry.Matrix): kendo.geometry.Rect; bottomLeft(): kendo.geometry.Point; bottomRight(): kendo.geometry.Point; @@ -1581,10 +2356,7 @@ declare module kendo.geometry { topLeft(): kendo.geometry.Point; topRight(): kendo.geometry.Point; width(): number; - static fromPoints(pointA: kendo.geometry.Point, pointB: kendo.geometry.Point): kendo.geometry.Rect; - static union(rectA: kendo.geometry.Rect, rectB: kendo.geometry.Rect): kendo.geometry.Rect; - origin: kendo.geometry.Point; - size: kendo.geometry.Size; + } interface RectOptions { @@ -1592,24 +2364,31 @@ declare module kendo.geometry { } interface RectEvent { sender: Rect; - isDefaultPrevented(): boolean; preventDefault: Function; + isDefaultPrevented(): boolean; } class Size extends Observable { + + options: SizeOptions; + + width: number; + height: number; + + + static create(width: number, height: number): kendo.geometry.Size; + static create(width: any, height: number): kendo.geometry.Size; + static create(width: kendo.geometry.Size, height: number): kendo.geometry.Size; + clone(): kendo.geometry.Size; equals(other: kendo.geometry.Size): boolean; getWidth(): number; getHeight(): number; setWidth(value: number): kendo.geometry.Size; setHeight(value: number): kendo.geometry.Size; - static create(width: number, height: number): kendo.geometry.Size; - static create(width: any, height: number): kendo.geometry.Size; - static create(width: kendo.geometry.Size, height: number): kendo.geometry.Size; - width: number; - height: number; + } interface SizeOptions { @@ -1617,13 +2396,19 @@ declare module kendo.geometry { } interface SizeEvent { sender: Size; - isDefaultPrevented(): boolean; preventDefault: Function; + isDefaultPrevented(): boolean; } class Transformation extends Observable { + + options: TransformationOptions; + + + + clone(): kendo.geometry.Transformation; equals(other: kendo.geometry.Transformation): boolean; matrix(): kendo.geometry.Matrix; @@ -1632,6 +2417,7 @@ declare module kendo.geometry { rotate(angle: number, center: kendo.geometry.Point): kendo.geometry.Transformation; scale(scaleX: number, scaleY: number): kendo.geometry.Transformation; translate(x: number, y: number): kendo.geometry.Transformation; + } interface TransformationOptions { @@ -1639,544 +2425,31 @@ declare module kendo.geometry { } interface TransformationEvent { sender: Transformation; - isDefaultPrevented(): boolean; preventDefault: Function; - } - - -} -declare module kendo.drawing { - class Arc extends kendo.drawing.Element { - constructor(geometry: kendo.geometry.Arc, options?: ArcOptions); - options: ArcOptions; - bbox(): kendo.geometry.Rect; - clip(): kendo.drawing.Path; - clip(clip: kendo.drawing.Path): void; - clippedBBox(): kendo.geometry.Rect; - geometry(): kendo.geometry.Arc; - geometry(value: kendo.geometry.Arc): void; - fill(color: string, opacity?: number): kendo.drawing.Arc; - opacity(): number; - opacity(opacity: number): void; - stroke(color: string, width?: number, opacity?: number): kendo.drawing.Arc; - transform(): kendo.geometry.Transformation; - transform(transform: kendo.geometry.Transformation): void; - visible(): boolean; - visible(visible: boolean): void; - } - - interface ArcOptions { - name?: string; - clip?: kendo.drawing.Path; - fill?: kendo.drawing.FillOptions; - opacity?: number; - stroke?: kendo.drawing.StrokeOptions; - transform?: kendo.geometry.Transformation; - visible?: boolean; - } - interface ArcEvent { - sender: Arc; isDefaultPrevented(): boolean; - preventDefault: Function; - } - - - class Circle extends kendo.drawing.Element { - constructor(geometry: kendo.geometry.Circle, options?: CircleOptions); - options: CircleOptions; - bbox(): kendo.geometry.Rect; - clip(): kendo.drawing.Path; - clip(clip: kendo.drawing.Path): void; - clippedBBox(): kendo.geometry.Rect; - geometry(): kendo.geometry.Circle; - geometry(value: kendo.geometry.Circle): void; - fill(color: string, opacity?: number): kendo.drawing.Circle; - opacity(): number; - opacity(opacity: number): void; - stroke(color: string, width?: number, opacity?: number): kendo.drawing.Circle; - transform(): kendo.geometry.Transformation; - transform(transform: kendo.geometry.Transformation): void; - visible(): boolean; - visible(visible: boolean): void; - } - - interface CircleOptions { - name?: string; - clip?: kendo.drawing.Path; - fill?: kendo.drawing.FillOptions; - opacity?: number; - stroke?: kendo.drawing.StrokeOptions; - transform?: kendo.geometry.Transformation; - visible?: boolean; - } - interface CircleEvent { - sender: Circle; - isDefaultPrevented(): boolean; - preventDefault: Function; - } - - - class Element extends kendo.Class { - constructor(options?: ElementOptions); - options: ElementOptions; - bbox(): kendo.geometry.Rect; - clip(): kendo.drawing.Path; - clip(clip: kendo.drawing.Path): void; - clippedBBox(): kendo.geometry.Rect; - opacity(): number; - opacity(opacity: number): void; - transform(): kendo.geometry.Transformation; - transform(transform: kendo.geometry.Transformation): void; - visible(): boolean; - visible(visible: boolean): void; - } - - interface ElementOptions { - name?: string; - clip?: kendo.drawing.Path; - opacity?: number; - transform?: kendo.geometry.Transformation; - visible?: boolean; - } - interface ElementEvent { - sender: Element; - isDefaultPrevented(): boolean; - preventDefault: Function; - } - - - interface FillOptions { - color: string; - opacity: number; - } - - - - class Gradient extends kendo.Class { - constructor(options?: GradientOptions); - options: GradientOptions; - addStop(offset: number, color: string, opacity: number): kendo.drawing.GradientStop; - removeStop(stop: kendo.drawing.GradientStop): void; - stops: any; - } - - interface GradientOptions { - name?: string; - stops?: any; - } - interface GradientEvent { - sender: Gradient; - isDefaultPrevented(): boolean; - preventDefault: Function; - } - - - class GradientStop extends kendo.Class { - constructor(options?: GradientStopOptions); - options: GradientStopOptions; - } - - interface GradientStopOptions { - name?: string; - offset?: number; - color?: string; - opacity?: number; - } - interface GradientStopEvent { - sender: GradientStop; - isDefaultPrevented(): boolean; - preventDefault: Function; - } - - - class Group extends kendo.drawing.Element { - constructor(options?: GroupOptions); - options: GroupOptions; - append(element: kendo.drawing.Element): void; - clear(): void; - clip(): kendo.drawing.Path; - clip(clip: kendo.drawing.Path): void; - clippedBBox(): kendo.geometry.Rect; - opacity(): number; - opacity(opacity: number): void; - remove(element: kendo.drawing.Element): void; - removeAt(index: number): void; - visible(): boolean; - visible(visible: boolean): void; - children: any; - } - - interface GroupOptions { - name?: string; - clip?: kendo.drawing.Path; - opacity?: number; - pdf?: kendo.drawing.PDFOptions; - transform?: kendo.geometry.Transformation; - visible?: boolean; - } - interface GroupEvent { - sender: Group; - isDefaultPrevented(): boolean; - preventDefault: Function; - } - - - class Image extends kendo.drawing.Element { - constructor(src: string, rect: kendo.geometry.Rect); - options: ImageOptions; - bbox(): kendo.geometry.Rect; - clip(): kendo.drawing.Path; - clip(clip: kendo.drawing.Path): void; - clippedBBox(): kendo.geometry.Rect; - opacity(): number; - opacity(opacity: number): void; - src(): string; - src(value: string): void; - rect(): kendo.geometry.Rect; - rect(value: kendo.geometry.Rect): void; - transform(): kendo.geometry.Transformation; - transform(transform: kendo.geometry.Transformation): void; - visible(): boolean; - visible(visible: boolean): void; - } - - interface ImageOptions { - name?: string; - clip?: kendo.drawing.Path; - opacity?: number; - transform?: kendo.geometry.Transformation; - visible?: boolean; - } - interface ImageEvent { - sender: Image; - isDefaultPrevented(): boolean; - preventDefault: Function; - } - - - class Layout extends kendo.drawing.Group { - constructor(rect: kendo.geometry.Rect, options?: LayoutOptions); - options: LayoutOptions; - rect(): kendo.geometry.Rect; - rect(rect: kendo.geometry.Rect): void; - reflow(): void; - } - - interface LayoutOptions { - name?: string; - alignContent?: string; - alignItems?: string; - justifyContent?: string; - lineSpacing?: number; - spacing?: number; - orientation?: string; - wrap?: boolean; - } - interface LayoutEvent { - sender: Layout; - isDefaultPrevented(): boolean; - preventDefault: Function; - } - - - class LinearGradient extends kendo.drawing.Gradient { - constructor(options?: LinearGradientOptions); - options: LinearGradientOptions; - addStop(offset: number, color: string, opacity: number): kendo.drawing.GradientStop; - end(): kendo.geometry.Point; - end(end: any): void; - end(end: kendo.geometry.Point): void; - start(): kendo.geometry.Point; - start(start: any): void; - start(start: kendo.geometry.Point): void; - removeStop(stop: kendo.drawing.GradientStop): void; - stops: any; - } - - interface LinearGradientOptions { - name?: string; - stops?: any; - } - interface LinearGradientEvent { - sender: LinearGradient; - isDefaultPrevented(): boolean; - preventDefault: Function; - } - - - class MultiPath extends kendo.drawing.Element { - constructor(options?: MultiPathOptions); - options: MultiPathOptions; - bbox(): kendo.geometry.Rect; - clip(): kendo.drawing.Path; - clip(clip: kendo.drawing.Path): void; - clippedBBox(): kendo.geometry.Rect; - close(): kendo.drawing.MultiPath; - curveTo(controlOut: any, controlIn: any): kendo.drawing.MultiPath; - curveTo(controlOut: any, controlIn: kendo.geometry.Point): kendo.drawing.MultiPath; - curveTo(controlOut: kendo.geometry.Point, controlIn: any): kendo.drawing.MultiPath; - curveTo(controlOut: kendo.geometry.Point, controlIn: kendo.geometry.Point): kendo.drawing.MultiPath; - fill(color: string, opacity?: number): kendo.drawing.MultiPath; - lineTo(x: number, y?: number): kendo.drawing.MultiPath; - lineTo(x: any, y?: number): kendo.drawing.MultiPath; - lineTo(x: kendo.geometry.Point, y?: number): kendo.drawing.MultiPath; - moveTo(x: number, y?: number): kendo.drawing.MultiPath; - moveTo(x: any, y?: number): kendo.drawing.MultiPath; - moveTo(x: kendo.geometry.Point, y?: number): kendo.drawing.MultiPath; - opacity(): number; - opacity(opacity: number): void; - stroke(color: string, width?: number, opacity?: number): kendo.drawing.MultiPath; - transform(): kendo.geometry.Transformation; - transform(transform: kendo.geometry.Transformation): void; - visible(): boolean; - visible(visible: boolean): void; - paths: any; - } - - interface MultiPathOptions { - name?: string; - clip?: kendo.drawing.Path; - fill?: kendo.drawing.FillOptions; - opacity?: number; - stroke?: kendo.drawing.StrokeOptions; - transform?: kendo.geometry.Transformation; - visible?: boolean; - } - interface MultiPathEvent { - sender: MultiPath; - isDefaultPrevented(): boolean; - preventDefault: Function; - } - - - class OptionsStore extends kendo.Class { - constructor(options?: OptionsStoreOptions); - options: OptionsStoreOptions; - get(field: string): any; - set(field: string, value: any): void; - observer: any; - } - - interface OptionsStoreOptions { - name?: string; - } - interface OptionsStoreEvent { - sender: OptionsStore; - isDefaultPrevented(): boolean; - preventDefault: Function; - } - - - interface PDFOptions { - creator: string; - date: Date; - keywords: string; - landscape: boolean; - margin: any; - paperSize: any; - subject: string; - title: string; - } - - - - class Path extends kendo.drawing.Element { - constructor(options?: PathOptions); - options: PathOptions; - bbox(): kendo.geometry.Rect; - clip(): kendo.drawing.Path; - clip(clip: kendo.drawing.Path): void; - clippedBBox(): kendo.geometry.Rect; - close(): kendo.drawing.Path; - curveTo(controlOut: any, controlIn: any): kendo.drawing.Path; - curveTo(controlOut: any, controlIn: kendo.geometry.Point): kendo.drawing.Path; - curveTo(controlOut: kendo.geometry.Point, controlIn: any): kendo.drawing.Path; - curveTo(controlOut: kendo.geometry.Point, controlIn: kendo.geometry.Point): kendo.drawing.Path; - fill(color: string, opacity?: number): kendo.drawing.Path; - lineTo(x: number, y?: number): kendo.drawing.Path; - lineTo(x: any, y?: number): kendo.drawing.Path; - lineTo(x: kendo.geometry.Point, y?: number): kendo.drawing.Path; - moveTo(x: number, y?: number): kendo.drawing.Path; - moveTo(x: any, y?: number): kendo.drawing.Path; - moveTo(x: kendo.geometry.Point, y?: number): kendo.drawing.Path; - opacity(): number; - opacity(opacity: number): void; - stroke(color: string, width?: number, opacity?: number): kendo.drawing.Path; - transform(): kendo.geometry.Transformation; - transform(transform: kendo.geometry.Transformation): void; - visible(): boolean; - visible(visible: boolean): void; - static fromPoints(points: any): kendo.drawing.Path; - static fromRect(rect: kendo.geometry.Rect): kendo.drawing.Path; - static parse(svgPath: string, options?: any): kendo.drawing.Path; - segments: any; - } - - interface PathOptions { - name?: string; - clip?: kendo.drawing.Path; - fill?: kendo.drawing.FillOptions; - opacity?: number; - stroke?: kendo.drawing.StrokeOptions; - transform?: kendo.geometry.Transformation; - visible?: boolean; - } - interface PathEvent { - sender: Path; - isDefaultPrevented(): boolean; - preventDefault: Function; - } - - - class RadialGradient extends kendo.drawing.Gradient { - constructor(options?: RadialGradientOptions); - options: RadialGradientOptions; - addStop(offset: number, color: string, opacity: number): kendo.drawing.GradientStop; - center(): kendo.geometry.Point; - center(center: any): void; - center(center: kendo.geometry.Point): void; - radius(): number; - radius(value: number): void; - removeStop(stop: kendo.drawing.GradientStop): void; - stops: any; - } - - interface RadialGradientOptions { - name?: string; - center?: any; - radius?: number; - stops?: any; - } - interface RadialGradientEvent { - sender: RadialGradient; - isDefaultPrevented(): boolean; - preventDefault: Function; - } - - - class Segment extends kendo.Class { - constructor(anchor: kendo.geometry.Point, controlIn: kendo.geometry.Point, controlOut: kendo.geometry.Point); - options: SegmentOptions; - anchor(): kendo.geometry.Point; - anchor(value: kendo.geometry.Point): void; - controlIn(): kendo.geometry.Point; - controlIn(value: kendo.geometry.Point): void; - controlOut(): kendo.geometry.Point; - controlOut(value: kendo.geometry.Point): void; - } - - interface SegmentOptions { - name?: string; - } - interface SegmentEvent { - sender: Segment; - isDefaultPrevented(): boolean; - preventDefault: Function; - } - - - interface StrokeOptions { - color: string; - dashType: string; - lineCap: string; - lineJoin: string; - opacity: number; - width: number; - } - - - - class Surface extends kendo.Observable { - constructor(options?: SurfaceOptions); - options: SurfaceOptions; - clear(): void; - draw(element: kendo.drawing.Element): void; - eventTarget(e: any): kendo.drawing.Element; - resize(force?: boolean): void; - static create(element: JQuery, options?: any): kendo.drawing.Surface; - static create(element: Element, options?: any): kendo.drawing.Surface; - } - - interface SurfaceOptions { - name?: string; - type?: string; - height?: string; - width?: string; - click?(e: SurfaceClickEvent): void; - mouseenter?(e: SurfaceMouseenterEvent): void; - mouseleave?(e: SurfaceMouseleaveEvent): void; - } - interface SurfaceEvent { - sender: Surface; - isDefaultPrevented(): boolean; - preventDefault: Function; - } - - interface SurfaceClickEvent extends SurfaceEvent { - element?: kendo.drawing.Element; - originalEvent?: any; - } - - interface SurfaceMouseenterEvent extends SurfaceEvent { - element?: kendo.drawing.Element; - originalEvent?: any; - } - - interface SurfaceMouseleaveEvent extends SurfaceEvent { - element?: kendo.drawing.Element; - originalEvent?: any; - } - - - class Text extends kendo.drawing.Element { - constructor(content: string, position: kendo.geometry.Point, options?: TextOptions); - options: TextOptions; - bbox(): kendo.geometry.Rect; - clip(): kendo.drawing.Path; - clip(clip: kendo.drawing.Path): void; - clippedBBox(): kendo.geometry.Rect; - content(): string; - content(value: string): void; - fill(color: string, opacity?: number): kendo.drawing.Text; - opacity(): number; - opacity(opacity: number): void; - position(): kendo.geometry.Point; - position(value: kendo.geometry.Point): void; - stroke(color: string, width?: number, opacity?: number): kendo.drawing.Text; - transform(): kendo.geometry.Transformation; - transform(transform: kendo.geometry.Transformation): void; - visible(): boolean; - visible(visible: boolean): void; - } - - interface TextOptions { - name?: string; - clip?: kendo.drawing.Path; - fill?: kendo.drawing.FillOptions; - font?: string; - opacity?: number; - stroke?: kendo.drawing.StrokeOptions; - transform?: kendo.geometry.Transformation; - visible?: boolean; - } - interface TextEvent { - sender: Text; - isDefaultPrevented(): boolean; - preventDefault: Function; } } declare module kendo.ui { class AutoComplete extends kendo.ui.Widget { + static fn: AutoComplete; - static extend(proto: Object): AutoComplete; + + options: AutoCompleteOptions; + + dataSource: kendo.data.DataSource; + list: JQuery; + ul: JQuery; element: JQuery; wrapper: JQuery; + + static extend(proto: Object): AutoComplete; + constructor(element: Element, options?: AutoCompleteOptions); - options: AutoCompleteOptions; - dataSource: kendo.data.DataSource; + + close(): void; dataItem(index: number): any; destroy(): void; @@ -2192,8 +2465,7 @@ declare module kendo.ui { suggest(value: string): void; value(): string; value(value: string): void; - list: JQuery; - ul: JQuery; + } interface AutoCompleteAnimationClose { @@ -2219,22 +2491,23 @@ declare module kendo.ui { interface AutoCompleteOptions { name?: string; animation?: AutoCompleteAnimation; - dataSource?: any; + dataSource?: any|any|kendo.data.DataSource; dataTextField?: string; delay?: number; enable?: boolean; filter?: string; - fixedGroupTemplate?: any; - groupTemplate?: any; + fixedGroupTemplate?: string|Function; + groupTemplate?: string|Function; height?: number; highlightFirst?: boolean; ignoreCase?: boolean; minLength?: number; placeholder?: string; + popup?: any; separator?: string; suggest?: boolean; - headerTemplate?: any; - template?: any; + headerTemplate?: string|Function; + template?: string|Function; valuePrimitive?: boolean; virtual?: AutoCompleteVirtual; change?(e: AutoCompleteChangeEvent): void; @@ -2246,8 +2519,8 @@ declare module kendo.ui { } interface AutoCompleteEvent { sender: AutoComplete; - isDefaultPrevented(): boolean; preventDefault: Function; + isDefaultPrevented(): boolean; } interface AutoCompleteChangeEvent extends AutoCompleteEvent { @@ -2272,14 +2545,22 @@ declare module kendo.ui { class Button extends kendo.ui.Widget { + static fn: Button; - static extend(proto: Object): Button; + + options: ButtonOptions; + element: JQuery; wrapper: JQuery; + + static extend(proto: Object): Button; + constructor(element: Element, options?: ButtonOptions); - options: ButtonOptions; + + enable(toggle: boolean): void; + } interface ButtonOptions { @@ -2292,8 +2573,8 @@ declare module kendo.ui { } interface ButtonEvent { sender: Button; - isDefaultPrevented(): boolean; preventDefault: Function; + isDefaultPrevented(): boolean; } interface ButtonClickEvent extends ButtonEvent { @@ -2302,13 +2583,20 @@ declare module kendo.ui { class Calendar extends kendo.ui.Widget { + static fn: Calendar; - static extend(proto: Object): Calendar; + + options: CalendarOptions; + element: JQuery; wrapper: JQuery; + + static extend(proto: Object): Calendar; + constructor(element: Element, options?: CalendarOptions); - options: CalendarOptions; + + current(): Date; destroy(): void; max(): Date; @@ -2326,6 +2614,7 @@ declare module kendo.ui { value(value: Date): void; value(value: string): void; view(): any; + } interface CalendarMonth { @@ -2338,7 +2627,7 @@ declare module kendo.ui { culture?: string; dates?: any; depth?: string; - footer?: any; + footer?: string|Function; format?: string; max?: Date; min?: Date; @@ -2350,24 +2639,32 @@ declare module kendo.ui { } interface CalendarEvent { sender: Calendar; - isDefaultPrevented(): boolean; preventDefault: Function; + isDefaultPrevented(): boolean; } class ColorPalette extends kendo.ui.Widget { + static fn: ColorPalette; - static extend(proto: Object): ColorPalette; + + options: ColorPaletteOptions; + element: JQuery; wrapper: JQuery; + + static extend(proto: Object): ColorPalette; + constructor(element: Element, options?: ColorPaletteOptions); - options: ColorPaletteOptions; + + value(): string; value(color?: string): void; color(): kendo.Color; color(color?: kendo.Color): void; enable(enable?: boolean): void; + } interface ColorPaletteTileSize { @@ -2377,7 +2674,7 @@ declare module kendo.ui { interface ColorPaletteOptions { name?: string; - palette?: any; + palette?: string|any; columns?: number; tileSize?: ColorPaletteTileSize; value?: string; @@ -2385,19 +2682,26 @@ declare module kendo.ui { } interface ColorPaletteEvent { sender: ColorPalette; - isDefaultPrevented(): boolean; preventDefault: Function; + isDefaultPrevented(): boolean; } class ColorPicker extends kendo.ui.Widget { + static fn: ColorPicker; - static extend(proto: Object): ColorPicker; + + options: ColorPickerOptions; + element: JQuery; wrapper: JQuery; + + static extend(proto: Object): ColorPicker; + constructor(element: Element, options?: ColorPickerOptions); - options: ColorPickerOptions; + + close(): void; open(): void; toggle(): void; @@ -2406,6 +2710,7 @@ declare module kendo.ui { color(): kendo.Color; color(color?: kendo.Color): void; enable(enable?: boolean): void; + } interface ColorPickerMessages { @@ -2424,7 +2729,7 @@ declare module kendo.ui { columns?: number; tileSize?: ColorPickerTileSize; messages?: ColorPickerMessages; - palette?: any; + palette?: string|any; opacity?: boolean; preview?: boolean; toolIcon?: string; @@ -2436,8 +2741,8 @@ declare module kendo.ui { } interface ColorPickerEvent { sender: ColorPicker; - isDefaultPrevented(): boolean; preventDefault: Function; + isDefaultPrevented(): boolean; } interface ColorPickerChangeEvent extends ColorPickerEvent { @@ -2450,14 +2755,24 @@ declare module kendo.ui { class ComboBox extends kendo.ui.Widget { + static fn: ComboBox; - static extend(proto: Object): ComboBox; + + options: ComboBoxOptions; + + dataSource: kendo.data.DataSource; + input: JQuery; + list: JQuery; + ul: JQuery; element: JQuery; wrapper: JQuery; + + static extend(proto: Object): ComboBox; + constructor(element: Element, options?: ComboBoxOptions); - options: ComboBoxOptions; - dataSource: kendo.data.DataSource; + + close(): void; dataItem(index?: number): any; destroy(): void; @@ -2478,9 +2793,7 @@ declare module kendo.ui { toggle(toggle: boolean): void; value(): string; value(value: string): void; - input: JQuery; - list: JQuery; - ul: JQuery; + } interface ComboBoxAnimationClose { @@ -2509,23 +2822,24 @@ declare module kendo.ui { autoBind?: boolean; cascadeFrom?: string; cascadeFromField?: string; - dataSource?: any; + dataSource?: any|any|kendo.data.DataSource; dataTextField?: string; dataValueField?: string; delay?: number; enable?: boolean; filter?: string; - fixedGroupTemplate?: any; - groupTemplate?: any; + fixedGroupTemplate?: string|Function; + groupTemplate?: string|Function; height?: number; highlightFirst?: boolean; ignoreCase?: string; index?: number; minLength?: number; placeholder?: string; + popup?: any; suggest?: boolean; - headerTemplate?: any; - template?: any; + headerTemplate?: string|Function; + template?: string|Function; text?: string; value?: string; valuePrimitive?: boolean; @@ -2540,8 +2854,8 @@ declare module kendo.ui { } interface ComboBoxEvent { sender: ComboBox; - isDefaultPrevented(): boolean; preventDefault: Function; + isDefaultPrevented(): boolean; } interface ComboBoxChangeEvent extends ComboBoxEvent { @@ -2569,13 +2883,20 @@ declare module kendo.ui { class ContextMenu extends kendo.ui.Widget { + static fn: ContextMenu; - static extend(proto: Object): ContextMenu; + + options: ContextMenuOptions; + element: JQuery; wrapper: JQuery; + + static extend(proto: Object): ContextMenu; + constructor(element: Element, options?: ContextMenuOptions); - options: ContextMenuOptions; + + append(item: any, referenceItem: string): kendo.ui.ContextMenu; append(item: any, referenceItem: JQuery): kendo.ui.ContextMenu; close(element: Element): kendo.ui.ContextMenu; @@ -2608,6 +2929,7 @@ declare module kendo.ui { remove(element: string): kendo.ui.ContextMenu; remove(element: Element): kendo.ui.ContextMenu; remove(element: JQuery): kendo.ui.ContextMenu; + } interface ContextMenuAnimationClose { @@ -2630,14 +2952,14 @@ declare module kendo.ui { alignToAnchor?: boolean; animation?: ContextMenuAnimation; closeOnClick?: boolean; - dataSource?: any; + dataSource?: any|any; direction?: string; filter?: string; hoverDelay?: number; orientation?: string; popupCollision?: string; showOn?: string; - target?: any; + target?: string|JQuery; close?(e: ContextMenuCloseEvent): void; open?(e: ContextMenuOpenEvent): void; activate?(e: ContextMenuActivateEvent): void; @@ -2646,8 +2968,8 @@ declare module kendo.ui { } interface ContextMenuEvent { sender: ContextMenu; - isDefaultPrevented(): boolean; preventDefault: Function; + isDefaultPrevented(): boolean; } interface ContextMenuCloseEvent extends ContextMenuEvent { @@ -2684,13 +3006,20 @@ declare module kendo.ui { class DatePicker extends kendo.ui.Widget { + static fn: DatePicker; - static extend(proto: Object): DatePicker; + + options: DatePickerOptions; + element: JQuery; wrapper: JQuery; + + static extend(proto: Object): DatePicker; + constructor(element: Element, options?: DatePickerOptions); - options: DatePickerOptions; + + close(): void; destroy(): void; enable(enable: boolean): void; @@ -2706,6 +3035,7 @@ declare module kendo.ui { value(): Date; value(value: Date): void; value(value: string): void; + } interface DatePickerAnimationClose { @@ -2735,7 +3065,7 @@ declare module kendo.ui { culture?: string; dates?: any; depth?: string; - footer?: any; + footer?: string|Function; format?: string; max?: Date; min?: Date; @@ -2749,8 +3079,8 @@ declare module kendo.ui { } interface DatePickerEvent { sender: DatePicker; - isDefaultPrevented(): boolean; preventDefault: Function; + isDefaultPrevented(): boolean; } interface DatePickerChangeEvent extends DatePickerEvent { @@ -2764,13 +3094,20 @@ declare module kendo.ui { class DateTimePicker extends kendo.ui.Widget { + static fn: DateTimePicker; - static extend(proto: Object): DateTimePicker; + + options: DateTimePickerOptions; + element: JQuery; wrapper: JQuery; + + static extend(proto: Object): DateTimePicker; + constructor(element: Element, options?: DateTimePickerOptions); - options: DateTimePickerOptions; + + close(view: string): void; destroy(): void; enable(enable: boolean): void; @@ -2787,6 +3124,7 @@ declare module kendo.ui { value(): Date; value(value: Date): void; value(value: string): void; + } interface DateTimePickerAnimationClose { @@ -2832,8 +3170,8 @@ declare module kendo.ui { } interface DateTimePickerEvent { sender: DateTimePicker; - isDefaultPrevented(): boolean; preventDefault: Function; + isDefaultPrevented(): boolean; } interface DateTimePickerChangeEvent extends DateTimePickerEvent { @@ -2849,14 +3187,25 @@ declare module kendo.ui { class DropDownList extends kendo.ui.Widget { + static fn: DropDownList; - static extend(proto: Object): DropDownList; + + options: DropDownListOptions; + + dataSource: kendo.data.DataSource; + span: JQuery; + filterInput: JQuery; + list: JQuery; + ul: JQuery; element: JQuery; wrapper: JQuery; + + static extend(proto: Object): DropDownList; + constructor(element: Element, options?: DropDownListOptions); - options: DropDownListOptions; - dataSource: kendo.data.DataSource; + + close(): void; dataItem(index?: number): any; destroy(): void; @@ -2876,10 +3225,7 @@ declare module kendo.ui { toggle(toggle: boolean): void; value(): string; value(value: string): void; - span: JQuery; - filterInput: JQuery; - list: JQuery; - ul: JQuery; + } interface DropDownListAnimationClose { @@ -2908,23 +3254,24 @@ declare module kendo.ui { autoBind?: boolean; cascadeFrom?: string; cascadeFromField?: string; - dataSource?: any; + dataSource?: any|any|kendo.data.DataSource; dataTextField?: string; dataValueField?: string; delay?: number; enable?: boolean; filter?: string; - fixedGroupTemplate?: any; - groupTemplate?: any; + fixedGroupTemplate?: string|Function; + groupTemplate?: string|Function; height?: number; ignoreCase?: string; index?: number; minLength?: number; - optionLabel?: any; - optionLabelTemplate?: any; - headerTemplate?: any; - template?: any; - valueTemplate?: any; + popup?: any; + optionLabel?: string|any; + optionLabelTemplate?: string|Function; + headerTemplate?: string|Function; + template?: string|Function; + valueTemplate?: string|Function; text?: string; value?: string; valuePrimitive?: boolean; @@ -2939,8 +3286,8 @@ declare module kendo.ui { } interface DropDownListEvent { sender: DropDownList; - isDefaultPrevented(): boolean; preventDefault: Function; + isDefaultPrevented(): boolean; } interface DropDownListChangeEvent extends DropDownListEvent { @@ -2968,13 +3315,21 @@ declare module kendo.ui { class Editor extends kendo.ui.Widget { + static fn: Editor; - static extend(proto: Object): Editor; + + options: EditorOptions; + + body: Element; element: JQuery; wrapper: JQuery; + + static extend(proto: Object): Editor; + constructor(element: Element, options?: EditorOptions); - options: EditorOptions; + + createRange(document?: Document): Range; destroy(): void; encodedValue(): void; @@ -2991,7 +3346,7 @@ declare module kendo.ui { state(toolName: string): boolean; value(): string; value(value: string): void; - body: Element; + } interface EditorFileBrowserMessages { @@ -3038,32 +3393,32 @@ declare module kendo.ui { interface EditorFileBrowserTransportCreate { contentType?: string; - data?: any; + data?: any|string|Function; dataType?: string; type?: string; - url?: any; + url?: string|Function; } interface EditorFileBrowserTransportDestroy { contentType?: string; - data?: any; + data?: any|string|Function; dataType?: string; type?: string; - url?: any; + url?: string|Function; } interface EditorFileBrowserTransportRead { contentType?: string; - data?: any; + data?: any|string|Function; dataType?: string; type?: string; - url?: any; + url?: string|Function; } interface EditorFileBrowserTransport { read?: EditorFileBrowserTransportRead; uploadUrl?: string; - fileUrl?: any; + fileUrl?: string|Function; destroy?: EditorFileBrowserTransportDestroy; create?: EditorFileBrowserTransportCreate; } @@ -3120,33 +3475,33 @@ declare module kendo.ui { interface EditorImageBrowserTransportCreate { contentType?: string; - data?: any; + data?: any|string|Function; dataType?: string; type?: string; - url?: any; + url?: string|Function; } interface EditorImageBrowserTransportDestroy { contentType?: string; - data?: any; + data?: any|string|Function; dataType?: string; type?: string; - url?: any; + url?: string|Function; } interface EditorImageBrowserTransportRead { contentType?: string; - data?: any; + data?: any|string|Function; dataType?: string; type?: string; - url?: any; + url?: string|Function; } interface EditorImageBrowserTransport { read?: EditorImageBrowserTransportRead; - thumbnailUrl?: any; + thumbnailUrl?: string|Function; uploadUrl?: string; - imageUrl?: any; + imageUrl?: string|Function; destroy?: EditorImageBrowserTransportDestroy; create?: EditorImageBrowserTransportCreate; } @@ -3223,14 +3578,15 @@ declare module kendo.ui { } interface EditorPdfMargin { - bottom?: any; - left?: any; - right?: any; - top?: any; + bottom?: number|string; + left?: number|string; + right?: number|string; + top?: number|string; } interface EditorPdf { author?: string; + avoidLinks?: boolean|string; creator?: string; date?: Date; fileName?: string; @@ -3238,7 +3594,7 @@ declare module kendo.ui { keywords?: string; landscape?: boolean; margin?: EditorPdfMargin; - paperSize?: any; + paperSize?: string|any; proxyURL?: string; proxyTarget?: string; subject?: string; @@ -3246,8 +3602,10 @@ declare module kendo.ui { } interface EditorResizable { + content?: boolean; min?: number; max?: number; + toolbar?: boolean; } interface EditorSerialization { @@ -3300,8 +3658,8 @@ declare module kendo.ui { } interface EditorEvent { sender: Editor; - isDefaultPrevented(): boolean; preventDefault: Function; + isDefaultPrevented(): boolean; } interface EditorExecuteEvent extends EditorEvent { @@ -3319,19 +3677,27 @@ declare module kendo.ui { class FlatColorPicker extends kendo.ui.Widget { + static fn: FlatColorPicker; - static extend(proto: Object): FlatColorPicker; + + options: FlatColorPickerOptions; + element: JQuery; wrapper: JQuery; + + static extend(proto: Object): FlatColorPicker; + constructor(element: Element, options?: FlatColorPickerOptions); - options: FlatColorPickerOptions; + + focus(): void; value(): string; value(color?: string): void; color(): kendo.Color; color(color?: kendo.Color): void; enable(enable?: boolean): void; + } interface FlatColorPickerMessages { @@ -3351,8 +3717,8 @@ declare module kendo.ui { } interface FlatColorPickerEvent { sender: FlatColorPicker; - isDefaultPrevented(): boolean; preventDefault: Function; + isDefaultPrevented(): boolean; } interface FlatColorPickerChangeEvent extends FlatColorPickerEvent { @@ -3361,14 +3727,22 @@ declare module kendo.ui { class Gantt extends kendo.ui.Widget { + static fn: Gantt; - static extend(proto: Object): Gantt; + + options: GanttOptions; + + dataSource: kendo.data.DataSource; + dependencies: kendo.data.GanttDependencyDataSource; element: JQuery; wrapper: JQuery; + + static extend(proto: Object): Gantt; + constructor(element: Element, options?: GanttOptions); - options: GanttOptions; - dataSource: kendo.data.DataSource; + + clearSelection(): void; dataItem(row: string): kendo.data.GanttTask; dataItem(row: Element): kendo.data.GanttTask; @@ -3389,11 +3763,11 @@ declare module kendo.ui { setDependenciesDataSource(dataSource: kendo.data.GanttDependencyDataSource): void; view(): kendo.ui.GanttView; view(type?: string): void; - dependencies: kendo.data.GanttDependencyDataSource; + } interface GanttAssignments { - dataSource?: any; + dataSource?: any|any|kendo.data.DataSource; dataResourceIdField?: string; dataTaskIdField?: string; dataValueField?: string; @@ -3403,7 +3777,7 @@ declare module kendo.ui { field?: string; title?: string; format?: string; - width?: any; + width?: string|number; editable?: boolean; sortable?: boolean; } @@ -3414,7 +3788,7 @@ declare module kendo.ui { interface GanttEditable { confirmation?: boolean; - template?: any; + template?: string|Function; } interface GanttMessagesActions { @@ -3450,7 +3824,9 @@ declare module kendo.ui { interface GanttMessages { actions?: GanttMessagesActions; cancel?: string; + deleteDependencyConfirmation?: string; deleteDependencyWindowTitle?: string; + deleteTaskConfirmation?: string; deleteTaskWindowTitle?: string; destroy?: string; editor?: GanttMessagesEditor; @@ -3459,14 +3835,15 @@ declare module kendo.ui { } interface GanttPdfMargin { - bottom?: any; - left?: any; - right?: any; - top?: any; + bottom?: number|string; + left?: number|string; + right?: number|string; + top?: number|string; } interface GanttPdf { author?: string; + avoidLinks?: boolean|string; creator?: string; date?: Date; fileName?: string; @@ -3474,7 +3851,7 @@ declare module kendo.ui { keywords?: string; landscape?: boolean; margin?: GanttPdfMargin; - paperSize?: any; + paperSize?: string|any; proxyURL?: string; proxyTarget?: string; subject?: string; @@ -3484,31 +3861,31 @@ declare module kendo.ui { interface GanttResources { dataFormatField?: string; dataColorField?: string; - dataSource?: any; + dataSource?: any|any|kendo.data.DataSource; dataTextField?: string; field?: string; } interface GanttToolbarItem { name?: string; - template?: any; + template?: string|Function; text?: string; } interface GanttTooltip { - template?: any; + template?: string|Function; visible?: boolean; } interface GanttView { type?: string; selected?: boolean; - slotSize?: any; - timeHeaderTemplate?: any; - dayHeaderTemplate?: any; - weekHeaderTemplate?: any; - monthHeaderTemplate?: any; - yearHeaderTemplate?: any; + slotSize?: number|string; + timeHeaderTemplate?: string|Function; + dayHeaderTemplate?: string|Function; + weekHeaderTemplate?: string|Function; + monthHeaderTemplate?: string|Function; + yearHeaderTemplate?: string|Function; resizeTooltipFormat?: string; } @@ -3516,10 +3893,11 @@ declare module kendo.ui { name?: string; assignments?: GanttAssignments; autoBind?: boolean; + columnResizeHandleWidth?: number; columns?: GanttColumn[]; currentTimeMarker?: GanttCurrentTimeMarker; - dataSource?: any; - dependencies?: any; + dataSource?: any|any|kendo.data.GanttDataSource; + dependencies?: any|any|kendo.data.GanttDependencyDataSource; editable?: GanttEditable; navigatable?: boolean; workDayStart?: Date; @@ -3528,17 +3906,20 @@ declare module kendo.ui { workWeekEnd?: number; hourSpan?: number; snap?: boolean; - height?: any; - listWidth?: any; + height?: number|string; + listWidth?: string|number; messages?: GanttMessages; pdf?: GanttPdf; + resizable?: boolean; selectable?: boolean; showWorkDays?: boolean; showWorkHours?: boolean; + taskTemplate?: string|Function; toolbar?: GanttToolbarItem[]; tooltip?: GanttTooltip; views?: GanttView[]; resources?: GanttResources; + rowHeight?: number|string; dataBinding?(e: GanttDataBindingEvent): void; dataBound?(e: GanttDataBoundEvent): void; add?(e: GanttAddEvent): void; @@ -3547,6 +3928,7 @@ declare module kendo.ui { cancel?(e: GanttCancelEvent): void; save?(e: GanttSaveEvent): void; change?(e: GanttChangeEvent): void; + columnResize?(e: GanttColumnResizeEvent): void; navigate?(e: GanttNavigateEvent): void; moveStart?(e: GanttMoveStartEvent): void; move?(e: GanttMoveEvent): void; @@ -3558,8 +3940,8 @@ declare module kendo.ui { } interface GanttEvent { sender: Gantt; - isDefaultPrevented(): boolean; preventDefault: Function; + isDefaultPrevented(): boolean; } interface GanttDataBindingEvent extends GanttEvent { @@ -3596,6 +3978,12 @@ declare module kendo.ui { interface GanttChangeEvent extends GanttEvent { } + interface GanttColumnResizeEvent extends GanttEvent { + column?: any; + newWidth?: number; + oldWidth?: number; + } + interface GanttNavigateEvent extends GanttEvent { view?: string; } @@ -3638,14 +4026,31 @@ declare module kendo.ui { class Grid extends kendo.ui.Widget { + static fn: Grid; - static extend(proto: Object): Grid; + + options: GridOptions; + + dataSource: kendo.data.DataSource; + columns: GridColumn[]; + footer: JQuery; + pager: kendo.ui.Pager; + table: JQuery; + tbody: JQuery; + thead: JQuery; + content: JQuery; + lockedHeader: JQuery; + lockedTable: JQuery; + lockedContent: JQuery; element: JQuery; wrapper: JQuery; + + static extend(proto: Object): Grid; + constructor(element: Element, options?: GridOptions); - options: GridOptions; - dataSource: kendo.data.DataSource; + + addRow(): void; autoFitColumn(column: number): void; autoFitColumn(column: string): void; @@ -3703,20 +4108,11 @@ declare module kendo.ui { showColumn(column: any): void; unlockColumn(column: number): void; unlockColumn(column: string): void; - columns: GridColumn[]; - footer: JQuery; - pager: kendo.ui.Pager; - table: JQuery; - tbody: JQuery; - thead: JQuery; - content: JQuery; - lockedHeader: JQuery; - lockedTable: JQuery; - lockedContent: JQuery; + } interface GridAllowCopy { - delimeter?: any; + delimeter?: string|any; } interface GridColumnMenuMessages { @@ -3751,7 +4147,7 @@ declare module kendo.ui { } interface GridColumnFilterableCell { - dataSource?: any; + dataSource?: any|kendo.data.DataSource; dataTextField?: string; delay?: number; inputWidth?: number; @@ -3766,10 +4162,10 @@ declare module kendo.ui { interface GridColumnFilterable { cell?: GridColumnFilterableCell; multi?: boolean; - dataSource?: any; + dataSource?: any|any|kendo.data.DataSource; checkAll?: boolean; itemTemplate?: Function; - ui?: any; + ui?: string|Function; } interface GridColumnSortable { @@ -3784,33 +4180,33 @@ declare module kendo.ui { encoded?: boolean; field?: string; filterable?: GridColumnFilterable; - footerTemplate?: any; + footerTemplate?: string|Function; format?: string; groupable?: boolean; - groupHeaderTemplate?: any; - groupFooterTemplate?: any; + groupHeaderTemplate?: string|Function; + groupFooterTemplate?: string|Function; headerAttributes?: any; - headerTemplate?: any; + headerTemplate?: string|Function; hidden?: boolean; locked?: boolean; lockable?: boolean; minScreenWidth?: number; sortable?: GridColumnSortable; - template?: any; + template?: string|Function; title?: string; - width?: any; + width?: string|number; values?: any; menu?: boolean; } interface GridEditable { - confirmation?: any; + confirmation?: boolean|string|Function; cancelDelete?: string; confirmDelete?: string; createAt?: string; destroy?: boolean; mode?: string; - template?: any; + template?: string|Function; update?: boolean; window?: any; } @@ -3907,6 +4303,11 @@ declare module kendo.ui { interface GridMessages { commands?: GridMessagesCommands; + noRecords?: string; + } + + interface GridNoRecords { + template?: string|Function; } interface GridPageableMessages { @@ -3929,22 +4330,23 @@ declare module kendo.ui { numeric?: boolean; buttonCount?: number; input?: boolean; - pageSizes?: any; + pageSizes?: boolean|any; refresh?: boolean; info?: boolean; messages?: GridPageableMessages; } interface GridPdfMargin { - bottom?: any; - left?: any; - right?: any; - top?: any; + bottom?: number|string; + left?: number|string; + right?: number|string; + top?: number|string; } interface GridPdf { allPages?: boolean; author?: string; + avoidLinks?: boolean|string; creator?: string; date?: Date; fileName?: string; @@ -3952,7 +4354,7 @@ declare module kendo.ui { keywords?: string; landscape?: boolean; margin?: GridPdfMargin; - paperSize?: any; + paperSize?: string|any; proxyURL?: string; proxyTarget?: string; subject?: string; @@ -3970,35 +4372,36 @@ declare module kendo.ui { interface GridToolbarItem { name?: string; - template?: any; + template?: string|Function; text?: string; } interface GridOptions { name?: string; allowCopy?: GridAllowCopy; - altRowTemplate?: any; + altRowTemplate?: string|Function; autoBind?: boolean; columnResizeHandleWidth?: number; columns?: GridColumn[]; columnMenu?: GridColumnMenu; - dataSource?: any; - detailTemplate?: any; + dataSource?: any|any|kendo.data.DataSource; + detailTemplate?: string|Function; editable?: GridEditable; excel?: GridExcel; filterable?: GridFilterable; groupable?: GridGroupable; - height?: any; + height?: number|string; messages?: GridMessages; - mobile?: any; + mobile?: boolean|string; navigatable?: boolean; + noRecords?: GridNoRecords; pageable?: GridPageable; pdf?: GridPdf; reorderable?: boolean; resizable?: boolean; - rowTemplate?: any; + rowTemplate?: string|Function; scrollable?: GridScrollable; - selectable?: any; + selectable?: boolean|string; sortable?: GridSortable; toolbar?: GridToolbarItem[]; cancel?(e: GridCancelEvent): void; @@ -4022,11 +4425,12 @@ declare module kendo.ui { saveChanges?(e: GridSaveChangesEvent): void; columnLock?(e: GridColumnLockEvent): void; columnUnlock?(e: GridColumnUnlockEvent): void; + navigate?(e: GridNavigateEvent): void; } interface GridEvent { sender: Grid; - isDefaultPrevented(): boolean; preventDefault: Function; + isDefaultPrevented(): boolean; } interface GridCancelEvent extends GridEvent { @@ -4129,16 +4533,27 @@ declare module kendo.ui { column?: any; } + interface GridNavigateEvent extends GridEvent { + element?: JQuery; + } + class ListView extends kendo.ui.Widget { + static fn: ListView; - static extend(proto: Object): ListView; + + options: ListViewOptions; + + dataSource: kendo.data.DataSource; element: JQuery; wrapper: JQuery; + + static extend(proto: Object): ListView; + constructor(element: Element, options?: ListViewOptions); - options: ListViewOptions; - dataSource: kendo.data.DataSource; + + add(): void; cancel(): void; clearSelection(): void; @@ -4155,15 +4570,16 @@ declare module kendo.ui { select(items: JQuery): void; select(items: any): void; setDataSource(dataSource: kendo.data.DataSource): void; + } interface ListViewOptions { name?: string; autoBind?: boolean; - dataSource?: any; + dataSource?: any|any|kendo.data.DataSource; editTemplate?: Function; navigatable?: boolean; - selectable?: any; + selectable?: boolean|string; template?: Function; altTemplate?: Function; cancel?(e: ListViewCancelEvent): void; @@ -4176,8 +4592,8 @@ declare module kendo.ui { } interface ListViewEvent { sender: ListView; - isDefaultPrevented(): boolean; preventDefault: Function; + isDefaultPrevented(): boolean; } interface ListViewCancelEvent extends ListViewEvent { @@ -4202,19 +4618,27 @@ declare module kendo.ui { class MaskedTextBox extends kendo.ui.Widget { + static fn: MaskedTextBox; - static extend(proto: Object): MaskedTextBox; + + options: MaskedTextBoxOptions; + element: JQuery; wrapper: JQuery; + + static extend(proto: Object): MaskedTextBox; + constructor(element: Element, options?: MaskedTextBoxOptions); - options: MaskedTextBoxOptions; + + destroy(): void; enable(enable: boolean): void; readonly(readonly: boolean): void; raw(): string; value(): string; value(value: string): void; + } interface MaskedTextBoxOptions { @@ -4230,8 +4654,8 @@ declare module kendo.ui { } interface MaskedTextBoxEvent { sender: MaskedTextBox; - isDefaultPrevented(): boolean; preventDefault: Function; + isDefaultPrevented(): boolean; } interface MaskedTextBoxChangeEvent extends MaskedTextBoxEvent { @@ -4239,13 +4663,20 @@ declare module kendo.ui { class Menu extends kendo.ui.Widget { + static fn: Menu; - static extend(proto: Object): Menu; + + options: MenuOptions; + element: JQuery; wrapper: JQuery; + + static extend(proto: Object): Menu; + constructor(element: Element, options?: MenuOptions); - options: MenuOptions; + + append(item: any, referenceItem: string): kendo.ui.Menu; append(item: any, referenceItem: JQuery): kendo.ui.Menu; close(element: string): kendo.ui.Menu; @@ -4279,6 +4710,7 @@ declare module kendo.ui { remove(element: string): kendo.ui.Menu; remove(element: Element): kendo.ui.Menu; remove(element: JQuery): kendo.ui.Menu; + } interface MenuAnimationClose { @@ -4300,7 +4732,7 @@ declare module kendo.ui { name?: string; animation?: MenuAnimation; closeOnClick?: boolean; - dataSource?: any; + dataSource?: any|any; direction?: string; hoverDelay?: number; openOnClick?: boolean; @@ -4314,8 +4746,8 @@ declare module kendo.ui { } interface MenuEvent { sender: Menu; - isDefaultPrevented(): boolean; preventDefault: Function; + isDefaultPrevented(): boolean; } interface MenuCloseEvent extends MenuEvent { @@ -4340,14 +4772,25 @@ declare module kendo.ui { class MultiSelect extends kendo.ui.Widget { + static fn: MultiSelect; - static extend(proto: Object): MultiSelect; + + options: MultiSelectOptions; + + dataSource: kendo.data.DataSource; + input: JQuery; + list: JQuery; + ul: JQuery; + tagList: JQuery; element: JQuery; wrapper: JQuery; + + static extend(proto: Object): MultiSelect; + constructor(element: Element, options?: MultiSelectOptions); - options: MultiSelectOptions; - dataSource: kendo.data.DataSource; + + close(): void; dataItems(): any; destroy(): void; @@ -4362,10 +4805,7 @@ declare module kendo.ui { value(): any; value(value: any): void; value(value: string): void; - input: JQuery; - list: JQuery; - ul: JQuery; - tagList: JQuery; + } interface MultiSelectAnimationClose { @@ -4393,23 +4833,25 @@ declare module kendo.ui { animation?: MultiSelectAnimation; autoBind?: boolean; autoClose?: boolean; - dataSource?: any; + dataSource?: any|any|kendo.data.DataSource; dataTextField?: string; dataValueField?: string; delay?: number; enable?: boolean; filter?: string; - fixedGroupTemplate?: any; - groupTemplate?: any; + fixedGroupTemplate?: string|Function; + groupTemplate?: string|Function; height?: number; highlightFirst?: boolean; ignoreCase?: string; minLength?: number; maxSelectedItems?: number; placeholder?: string; - headerTemplate?: any; - itemTemplate?: any; + popup?: any; + headerTemplate?: string|Function; + itemTemplate?: string|Function; tagTemplate?: string; + tagMode?: string; value?: any; valuePrimitive?: boolean; virtual?: MultiSelectVirtual; @@ -4422,8 +4864,8 @@ declare module kendo.ui { } interface MultiSelectEvent { sender: MultiSelect; - isDefaultPrevented(): boolean; preventDefault: Function; + isDefaultPrevented(): boolean; } interface MultiSelectChangeEvent extends MultiSelectEvent { @@ -4448,13 +4890,20 @@ declare module kendo.ui { class Notification extends kendo.ui.Widget { + static fn: Notification; - static extend(proto: Object): Notification; + + options: NotificationOptions; + element: JQuery; wrapper: JQuery; + + static extend(proto: Object): Notification; + constructor(element: Element, options?: NotificationOptions); - options: NotificationOptions; + + error(data: any): void; error(data: string): void; error(data: Function): void; @@ -4472,6 +4921,7 @@ declare module kendo.ui { warning(data: any): void; warning(data: string): void; warning(data: Function): void; + } interface NotificationPosition { @@ -4490,23 +4940,23 @@ declare module kendo.ui { interface NotificationOptions { name?: string; allowHideAfter?: number; - animation?: any; - appendTo?: any; + animation?: any|boolean; + appendTo?: string|JQuery; autoHideAfter?: number; button?: boolean; - height?: any; + height?: number|string; hideOnClick?: boolean; position?: NotificationPosition; stacking?: string; templates?: NotificationTemplate[]; - width?: any; + width?: number|string; hide?(e: NotificationHideEvent): void; show?(e: NotificationShowEvent): void; } interface NotificationEvent { sender: Notification; - isDefaultPrevented(): boolean; preventDefault: Function; + isDefaultPrevented(): boolean; } interface NotificationHideEvent extends NotificationEvent { @@ -4519,13 +4969,20 @@ declare module kendo.ui { class NumericTextBox extends kendo.ui.Widget { + static fn: NumericTextBox; - static extend(proto: Object): NumericTextBox; + + options: NumericTextBoxOptions; + element: JQuery; wrapper: JQuery; + + static extend(proto: Object): NumericTextBox; + constructor(element: Element, options?: NumericTextBoxOptions); - options: NumericTextBoxOptions; + + destroy(): void; enable(enable: boolean): void; readonly(readonly: boolean): void; @@ -4542,6 +4999,7 @@ declare module kendo.ui { value(): number; value(value: number): void; value(value: string): void; + } interface NumericTextBoxOptions { @@ -4562,8 +5020,8 @@ declare module kendo.ui { } interface NumericTextBoxEvent { sender: NumericTextBox; - isDefaultPrevented(): boolean; preventDefault: Function; + isDefaultPrevented(): boolean; } interface NumericTextBoxChangeEvent extends NumericTextBoxEvent { @@ -4574,24 +5032,33 @@ declare module kendo.ui { class Pager extends kendo.ui.Widget { + static fn: Pager; - static extend(proto: Object): Pager; + + options: PagerOptions; + + dataSource: kendo.data.DataSource; element: JQuery; wrapper: JQuery; + + static extend(proto: Object): Pager; + constructor(element: Element, options?: PagerOptions); - options: PagerOptions; - dataSource: kendo.data.DataSource; + + totalPages(): number; pageSize(): number; - page(page: boolean): number; + page(page: number): number; refresh(): void; destroy(): void; + } interface PagerMessages { display?: string; empty?: string; + allPages?: string; page?: string; of?: string; itemsPerPage?: string; @@ -4606,13 +5073,13 @@ declare module kendo.ui { name?: string; autoBind?: boolean; buttonCount?: number; - dataSource?: any; + dataSource?: any|kendo.data.DataSource; selectTemplate?: string; linkTemplate?: string; info?: boolean; input?: boolean; numeric?: boolean; - pageSizes?: any; + pageSizes?: boolean|any; previousNext?: boolean; refresh?: boolean; messages?: PagerMessages; @@ -4620,8 +5087,8 @@ declare module kendo.ui { } interface PagerEvent { sender: Pager; - isDefaultPrevented(): boolean; preventDefault: Function; + isDefaultPrevented(): boolean; } interface PagerChangeEvent extends PagerEvent { @@ -4629,13 +5096,20 @@ declare module kendo.ui { class PanelBar extends kendo.ui.Widget { + static fn: PanelBar; - static extend(proto: Object): PanelBar; + + options: PanelBarOptions; + element: JQuery; wrapper: JQuery; + + static extend(proto: Object): PanelBar; + constructor(element: Element, options?: PanelBarOptions); - options: PanelBarOptions; + + append(item: string, referenceItem: string): kendo.ui.PanelBar; append(item: string, referenceItem: Element): kendo.ui.PanelBar; append(item: string, referenceItem: JQuery): kendo.ui.PanelBar; @@ -4693,6 +5167,7 @@ declare module kendo.ui { select(element?: string): void; select(element?: Element): void; select(element?: JQuery): void; + } interface PanelBarAnimationCollapse { @@ -4714,7 +5189,7 @@ declare module kendo.ui { name?: string; animation?: PanelBarAnimation; contentUrls?: any; - dataSource?: any; + dataSource?: any|any; expandMode?: string; activate?(e: PanelBarActivateEvent): void; collapse?(e: PanelBarCollapseEvent): void; @@ -4725,8 +5200,8 @@ declare module kendo.ui { } interface PanelBarEvent { sender: PanelBar; - isDefaultPrevented(): boolean; preventDefault: Function; + isDefaultPrevented(): boolean; } interface PanelBarActivateEvent extends PanelBarEvent { @@ -4757,17 +5232,25 @@ declare module kendo.ui { class PivotConfigurator extends kendo.ui.Widget { + static fn: PivotConfigurator; - static extend(proto: Object): PivotConfigurator; + + options: PivotConfiguratorOptions; + + dataSource: kendo.data.DataSource; element: JQuery; wrapper: JQuery; + + static extend(proto: Object): PivotConfigurator; + constructor(element: Element, options?: PivotConfiguratorOptions); - options: PivotConfiguratorOptions; - dataSource: kendo.data.DataSource; + + destroy(): void; refresh(): void; setDataSource(dataSource: kendo.data.PivotDataSource): void; + } interface PivotConfiguratorMessagesFieldMenuOperators { @@ -4810,28 +5293,35 @@ declare module kendo.ui { interface PivotConfiguratorOptions { name?: string; - dataSource?: any; + dataSource?: any|kendo.data.PivotDataSource; filterable?: boolean; sortable?: PivotConfiguratorSortable; - height?: any; + height?: number|string; messages?: PivotConfiguratorMessages; } interface PivotConfiguratorEvent { sender: PivotConfigurator; - isDefaultPrevented(): boolean; preventDefault: Function; + isDefaultPrevented(): boolean; } class PivotGrid extends kendo.ui.Widget { + static fn: PivotGrid; - static extend(proto: Object): PivotGrid; + + options: PivotGridOptions; + + dataSource: kendo.data.DataSource; element: JQuery; wrapper: JQuery; + + static extend(proto: Object): PivotGrid; + constructor(element: Element, options?: PivotGridOptions); - options: PivotGridOptions; - dataSource: kendo.data.DataSource; + + cellInfo(columnIndex: number, rowIndex: number): any; cellInfoByElement(cell: string): any; cellInfoByElement(cell: Element): any; @@ -4841,6 +5331,7 @@ declare module kendo.ui { setDataSource(dataSource: kendo.data.PivotDataSource): void; saveAsExcel(): void; saveAsPDF(): JQueryPromise; + } interface PivotGridExcel { @@ -4881,14 +5372,15 @@ declare module kendo.ui { } interface PivotGridPdfMargin { - bottom?: any; - left?: any; - right?: any; - top?: any; + bottom?: number|string; + left?: number|string; + right?: number|string; + top?: number|string; } interface PivotGridPdf { author?: string; + avoidLinks?: boolean|string; creator?: string; date?: Date; fileName?: string; @@ -4896,7 +5388,7 @@ declare module kendo.ui { keywords?: string; landscape?: boolean; margin?: PivotGridPdfMargin; - paperSize?: any; + paperSize?: string|any; proxyURL?: string; proxyTarget?: string; subject?: string; @@ -4909,7 +5401,7 @@ declare module kendo.ui { interface PivotGridOptions { name?: string; - dataSource?: any; + dataSource?: any|kendo.data.PivotDataSource; autoBind?: boolean; reorderable?: boolean; excel?: PivotGridExcel; @@ -4917,12 +5409,12 @@ declare module kendo.ui { filterable?: boolean; sortable?: PivotGridSortable; columnWidth?: number; - height?: any; - columnHeaderTemplate?: any; - dataCellTemplate?: any; - kpiStatusTemplate?: any; - kpiTrendTemplate?: any; - rowHeaderTemplate?: any; + height?: number|string; + columnHeaderTemplate?: string|Function; + dataCellTemplate?: string|Function; + kpiStatusTemplate?: string|Function; + kpiTrendTemplate?: string|Function; + rowHeaderTemplate?: string|Function; messages?: PivotGridMessages; dataBinding?(e: PivotGridDataBindingEvent): void; dataBound?(e: PivotGridDataBoundEvent): void; @@ -4933,8 +5425,8 @@ declare module kendo.ui { } interface PivotGridEvent { sender: PivotGrid; - isDefaultPrevented(): boolean; preventDefault: Function; + isDefaultPrevented(): boolean; } interface PivotGridDataBindingEvent extends PivotGridEvent { @@ -4963,19 +5455,96 @@ declare module kendo.ui { } - class ProgressBar extends kendo.ui.Widget { - static fn: ProgressBar; - static extend(proto: Object): ProgressBar; + class Popup extends kendo.ui.Widget { + + static fn: Popup; + + options: PopupOptions; + element: JQuery; wrapper: JQuery; - constructor(element: Element, options?: ProgressBarOptions); + + static extend(proto: Object): Popup; + + constructor(element: Element, options?: PopupOptions); + + + close(): void; + open(): void; + position(): void; + setOptions(options: any): void; + visible(): boolean; + + } + + interface PopupAnimationClose { + effects?: string; + duration?: number; + } + + interface PopupAnimationOpen { + effects?: string; + duration?: number; + } + + interface PopupAnimation { + close?: PopupAnimationClose; + open?: PopupAnimationOpen; + } + + interface PopupOptions { + name?: string; + animation?: PopupAnimation; + anchor?: string|JQuery; + appendTo?: string|JQuery; + origin?: string; + position?: string; + activate?(e: PopupActivateEvent): void; + close?(e: PopupCloseEvent): void; + deactivate?(e: PopupDeactivateEvent): void; + open?(e: PopupOpenEvent): void; + } + interface PopupEvent { + sender: Popup; + preventDefault: Function; + isDefaultPrevented(): boolean; + } + + interface PopupActivateEvent extends PopupEvent { + } + + interface PopupCloseEvent extends PopupEvent { + } + + interface PopupDeactivateEvent extends PopupEvent { + } + + interface PopupOpenEvent extends PopupEvent { + } + + + class ProgressBar extends kendo.ui.Widget { + + static fn: ProgressBar; + options: ProgressBarOptions; + + progressStatus: JQuery; + progressWrapper: JQuery; + + element: JQuery; + wrapper: JQuery; + + static extend(proto: Object): ProgressBar; + + constructor(element: Element, options?: ProgressBarOptions); + + enable(enable: boolean): void; value(): number; value(value: number): void; - progressStatus: JQuery; - progressWrapper: JQuery; + } interface ProgressBarAnimation { @@ -4999,8 +5568,8 @@ declare module kendo.ui { } interface ProgressBarEvent { sender: ProgressBar; - isDefaultPrevented(): boolean; preventDefault: Function; + isDefaultPrevented(): boolean; } interface ProgressBarChangeEvent extends ProgressBarEvent { @@ -5013,18 +5582,26 @@ declare module kendo.ui { class RangeSlider extends kendo.ui.Widget { + static fn: RangeSlider; - static extend(proto: Object): RangeSlider; + + options: RangeSliderOptions; + element: JQuery; wrapper: JQuery; + + static extend(proto: Object): RangeSlider; + constructor(element: Element, options?: RangeSliderOptions); - options: RangeSliderOptions; + + destroy(): void; enable(enable: boolean): void; value(): any; value(selectionStart: number, selectionEnd: number): void; resize(): void; + } interface RangeSliderTooltip { @@ -5049,8 +5626,8 @@ declare module kendo.ui { } interface RangeSliderEvent { sender: RangeSlider; - isDefaultPrevented(): boolean; preventDefault: Function; + isDefaultPrevented(): boolean; } interface RangeSliderChangeEvent extends RangeSliderEvent { @@ -5063,16 +5640,24 @@ declare module kendo.ui { class ResponsivePanel extends kendo.ui.Widget { + static fn: ResponsivePanel; - static extend(proto: Object): ResponsivePanel; + + options: ResponsivePanelOptions; + element: JQuery; wrapper: JQuery; + + static extend(proto: Object): ResponsivePanel; + constructor(element: Element, options?: ResponsivePanelOptions); - options: ResponsivePanelOptions; + + close(): void; destroy(): void; open(): void; + } interface ResponsivePanelOptions { @@ -5086,20 +5671,27 @@ declare module kendo.ui { } interface ResponsivePanelEvent { sender: ResponsivePanel; - isDefaultPrevented(): boolean; preventDefault: Function; + isDefaultPrevented(): boolean; } class Scheduler extends kendo.ui.Widget { + static fn: Scheduler; - static extend(proto: Object): Scheduler; + + options: SchedulerOptions; + + dataSource: kendo.data.DataSource; element: JQuery; wrapper: JQuery; + + static extend(proto: Object): Scheduler; + constructor(element: Element, options?: SchedulerOptions); - options: SchedulerOptions; - dataSource: kendo.data.DataSource; + + addEvent(data: any): void; cancelEvent(): void; data(): void; @@ -5124,6 +5716,8 @@ declare module kendo.ui { slotByElement(element: JQuery): any; view(): kendo.ui.SchedulerView; view(type?: string): void; + viewName(): string; + } interface SchedulerCurrentTimeMarker { @@ -5132,19 +5726,19 @@ declare module kendo.ui { } interface SchedulerEditable { - confirmation?: any; + confirmation?: boolean|string; create?: boolean; destroy?: boolean; editRecurringMode?: string; move?: boolean; resize?: boolean; - template?: any; + template?: string|Function; update?: boolean; window?: any; } interface SchedulerFooter { - command?: any; + command?: string|boolean; } interface SchedulerGroup { @@ -5152,6 +5746,10 @@ declare module kendo.ui { orientation?: string; } + interface SchedulerMessagesEditable { + confirmation?: string; + } + interface SchedulerMessagesEditor { allDayEvent?: string; description?: string; @@ -5269,6 +5867,7 @@ declare module kendo.ui { showWorkDay?: string; time?: string; today?: string; + editable?: SchedulerMessagesEditable; editor?: SchedulerMessagesEditor; recurrenceEditor?: SchedulerMessagesRecurrenceEditor; recurrenceMessages?: SchedulerMessagesRecurrenceMessages; @@ -5276,14 +5875,15 @@ declare module kendo.ui { } interface SchedulerPdfMargin { - bottom?: any; - left?: any; - right?: any; - top?: any; + bottom?: number|string; + left?: number|string; + right?: number|string; + top?: number|string; } interface SchedulerPdf { author?: string; + avoidLinks?: boolean|string; creator?: string; date?: Date; fileName?: string; @@ -5291,7 +5891,7 @@ declare module kendo.ui { keywords?: string; landscape?: boolean; margin?: SchedulerPdfMargin; - paperSize?: any; + paperSize?: string|any; proxyURL?: string; proxyTarget?: string; subject?: string; @@ -5300,7 +5900,7 @@ declare module kendo.ui { interface SchedulerResource { dataColorField?: string; - dataSource?: any; + dataSource?: any|any|kendo.data.DataSource; dataTextField?: string; dataValueField?: string; field?: string; @@ -5325,26 +5925,26 @@ declare module kendo.ui { } interface SchedulerView { - allDayEventTemplate?: any; + allDayEventTemplate?: string|Function; allDaySlot?: boolean; - allDaySlotTemplate?: any; + allDaySlotTemplate?: string|Function; columnWidth?: number; - dateHeaderTemplate?: any; - dayTemplate?: any; + dateHeaderTemplate?: string|Function; + dayTemplate?: string|Function; editable?: SchedulerViewEditable; endTime?: Date; eventHeight?: number; - eventTemplate?: any; - eventTimeTemplate?: any; + eventTemplate?: string|Function; + eventTimeTemplate?: string|Function; group?: SchedulerViewGroup; majorTick?: number; - majorTimeHeaderTemplate?: any; + majorTimeHeaderTemplate?: string|Function; minorTickCount?: number; - minorTimeHeaderTemplate?: any; + minorTimeHeaderTemplate?: string|Function; selected?: boolean; selectedDateFormat?: string; showWorkHours?: boolean; - slotTemplate?: any; + slotTemplate?: string|Function; startTime?: Date; title?: string; type?: string; @@ -5362,27 +5962,27 @@ declare module kendo.ui { interface SchedulerOptions { name?: string; - allDayEventTemplate?: any; + allDayEventTemplate?: string|Function; allDaySlot?: boolean; autoBind?: boolean; currentTimeMarker?: SchedulerCurrentTimeMarker; - dataSource?: any; + dataSource?: any|any|kendo.data.SchedulerDataSource; date?: Date; - dateHeaderTemplate?: any; + dateHeaderTemplate?: string|Function; editable?: SchedulerEditable; endTime?: Date; - eventTemplate?: any; + eventTemplate?: string|Function; footer?: SchedulerFooter; group?: SchedulerGroup; - height?: any; + height?: number|string; majorTick?: number; - majorTimeHeaderTemplate?: any; + majorTimeHeaderTemplate?: string|Function; max?: Date; messages?: SchedulerMessages; min?: Date; minorTickCount?: number; - minorTimeHeaderTemplate?: any; - mobile?: any; + minorTimeHeaderTemplate?: string|Function; + mobile?: boolean|string; pdf?: SchedulerPdf; resources?: SchedulerResource[]; selectable?: boolean; @@ -5392,8 +5992,8 @@ declare module kendo.ui { timezone?: string; toolbar?: SchedulerToolbarItem[]; views?: SchedulerView[]; - groupHeaderTemplate?: any; - width?: any; + groupHeaderTemplate?: string|Function; + width?: number|string; workDayStart?: Date; workDayEnd?: Date; workWeekStart?: number; @@ -5417,8 +6017,8 @@ declare module kendo.ui { } interface SchedulerEvent { sender: Scheduler; - isDefaultPrevented(): boolean; preventDefault: Function; + isDefaultPrevented(): boolean; } interface SchedulerAddEvent extends SchedulerEvent { @@ -5501,18 +6101,26 @@ declare module kendo.ui { class Slider extends kendo.ui.Widget { + static fn: Slider; - static extend(proto: Object): Slider; + + options: SliderOptions; + element: JQuery; wrapper: JQuery; + + static extend(proto: Object): Slider; + constructor(element: Element, options?: SliderOptions); - options: SliderOptions; + + destroy(): void; enable(enable: boolean): void; value(): number; value(value: number): void; resize(): void; + } interface SliderTooltip { @@ -5539,8 +6147,8 @@ declare module kendo.ui { } interface SliderEvent { sender: Slider; - isDefaultPrevented(): boolean; preventDefault: Function; + isDefaultPrevented(): boolean; } interface SliderChangeEvent extends SliderEvent { @@ -5553,15 +6161,23 @@ declare module kendo.ui { class Sortable extends kendo.ui.Widget { + static fn: Sortable; - static extend(proto: Object): Sortable; + + options: SortableOptions; + element: JQuery; wrapper: JQuery; + + static extend(proto: Object): Sortable; + constructor(element: Element, options?: SortableOptions); - options: SortableOptions; + + indexOf(element: JQuery): number; items(): JQuery; + } interface SortableCursorOffset { @@ -5572,17 +6188,18 @@ declare module kendo.ui { interface SortableOptions { name?: string; axis?: string; - container?: any; + autoScroll?: boolean; + container?: string|JQuery; connectWith?: string; cursor?: string; cursorOffset?: SortableCursorOffset; disabled?: string; filter?: string; handler?: string; - hint?: any; + hint?: Function|string|JQuery; holdToDrag?: boolean; ignore?: string; - placeholder?: any; + placeholder?: Function|string|JQuery; start?(e: SortableStartEvent): void; move?(e: SortableMoveEvent): void; end?(e: SortableEndEvent): void; @@ -5591,8 +6208,8 @@ declare module kendo.ui { } interface SortableEvent { sender: Sortable; - isDefaultPrevented(): boolean; preventDefault: Function; + isDefaultPrevented(): boolean; } interface SortableStartEvent extends SortableEvent { @@ -5629,13 +6246,20 @@ declare module kendo.ui { class Splitter extends kendo.ui.Widget { + static fn: Splitter; - static extend(proto: Object): Splitter; + + options: SplitterOptions; + element: JQuery; wrapper: JQuery; + + static extend(proto: Object): Splitter; + constructor(element: Element, options?: SplitterOptions); - options: SplitterOptions; + + ajaxRequest(pane: string, url: string, data: any): void; ajaxRequest(pane: string, url: string, data: string): void; ajaxRequest(pane: Element, url: string, data: any): void; @@ -5671,6 +6295,7 @@ declare module kendo.ui { toggle(pane: string, expand?: boolean): void; toggle(pane: Element, expand?: boolean): void; toggle(pane: JQuery, expand?: boolean): void; + } interface SplitterPane { @@ -5698,8 +6323,8 @@ declare module kendo.ui { } interface SplitterEvent { sender: Splitter; - isDefaultPrevented(): boolean; preventDefault: Function; + isDefaultPrevented(): boolean; } interface SplitterCollapseEvent extends SplitterEvent { @@ -5720,14 +6345,206 @@ declare module kendo.ui { } - class TabStrip extends kendo.ui.Widget { - static fn: TabStrip; - static extend(proto: Object): TabStrip; + class Spreadsheet extends kendo.ui.Widget { + + static fn: Spreadsheet; + + options: SpreadsheetOptions; + element: JQuery; wrapper: JQuery; - constructor(element: Element, options?: TabStripOptions); + + static extend(proto: Object): Spreadsheet; + + constructor(element: Element, options?: SpreadsheetOptions); + + + activeSheet(): kendo.spreadsheet.Sheet; + activeSheet(sheet?: kendo.spreadsheet.Sheet): void; + sheets(): any; + saveAsExcel(): void; + sheetByName(name: string): kendo.spreadsheet.Sheet; + sheetIndex(sheet: kendo.spreadsheet.Sheet): number; + sheetByIndex(index: number): kendo.spreadsheet.Sheet; + insertSheet(options: any): kendo.spreadsheet.Sheet; + moveSheetToIndex(sheet: kendo.spreadsheet.Sheet, index: number): void; + removeSheet(sheet: kendo.spreadsheet.Sheet): void; + renameSheet(sheet: kendo.spreadsheet.Sheet, newSheetName: string): kendo.spreadsheet.Sheet; + toJSON(): any; + fromJSON(options: any): void; + + } + + interface SpreadsheetExcel { + fileName?: string; + forceProxy?: boolean; + proxyURL?: string; + } + + interface SpreadsheetSheetColumn { + index?: number; + width?: number; + } + + interface SpreadsheetSheetFilterColumnCriteriaItem { + operator?: string; + value?: string; + } + + interface SpreadsheetSheetFilterColumn { + criteria?: SpreadsheetSheetFilterColumnCriteriaItem[]; + filter?: string; + index?: number; + logic?: string; + type?: string; + value?: number|string|Date; + values?: any; + } + + interface SpreadsheetSheetFilter { + columns?: SpreadsheetSheetFilterColumn[]; + ref?: string; + } + + interface SpreadsheetSheetRowCellBorderBottom { + color?: string; + size?: string; + } + + interface SpreadsheetSheetRowCellBorderLeft { + color?: string; + size?: string; + } + + interface SpreadsheetSheetRowCellBorderRight { + color?: string; + size?: string; + } + + interface SpreadsheetSheetRowCellBorderTop { + color?: string; + size?: string; + } + + interface SpreadsheetSheetRowCellValidation { + comparerType?: string; + dataType?: string; + from?: string; + to?: string; + allowNulls?: string; + messageTemplate?: string; + titleTemplate?: string; + } + + interface SpreadsheetSheetRowCell { + background?: string; + borderBottom?: SpreadsheetSheetRowCellBorderBottom; + borderLeft?: SpreadsheetSheetRowCellBorderLeft; + borderTop?: SpreadsheetSheetRowCellBorderTop; + borderRight?: SpreadsheetSheetRowCellBorderRight; + color?: string; + fontFamily?: string; + fontSize?: number; + italic?: boolean; + bold?: boolean; + format?: string; + formula?: string; + index?: number; + textAlign?: string; + underline?: boolean; + value?: number|string|boolean|Date; + validation?: SpreadsheetSheetRowCellValidation; + verticalAlign?: string; + wrap?: boolean; + } + + interface SpreadsheetSheetRow { + cells?: SpreadsheetSheetRowCell[]; + height?: number; + index?: number; + } + + interface SpreadsheetSheetSortColumn { + ascending?: boolean; + index?: number; + } + + interface SpreadsheetSheetSort { + columns?: SpreadsheetSheetSortColumn[]; + ref?: string; + } + + interface SpreadsheetSheet { + activeCell?: string; + name?: string; + columns?: SpreadsheetSheetColumn[]; + dataSource?: kendo.data.DataSource; + filter?: SpreadsheetSheetFilter; + frozenColumns?: number; + frozenRows?: number; + mergedCells?: any; + rows?: SpreadsheetSheetRow[]; + selection?: string; + sort?: SpreadsheetSheetSort; + } + + interface SpreadsheetInsertSheetOptions { + rows?: number; + columns?: number; + rowHeight?: number; + columnWidth?: number; + headerHeight?: number; + headerWidth?: number; + dataSource?: kendo.data.DataSource; + } + + interface SpreadsheetOptions { + name?: string; + activeSheet?: string; + columnWidth?: number; + columns?: number; + headerHeight?: number; + headerWidth?: number; + excel?: SpreadsheetExcel; + rowHeight?: number; + rows?: number; + sheets?: SpreadsheetSheet[]; + toolbar?: boolean; + render?(e: SpreadsheetRenderEvent): void; + excelExport?(e: SpreadsheetExcelExportEvent): void; + } + interface SpreadsheetEvent { + sender: Spreadsheet; + preventDefault: Function; + isDefaultPrevented(): boolean; + } + + interface SpreadsheetRenderEvent extends SpreadsheetEvent { + } + + interface SpreadsheetExcelExportEvent extends SpreadsheetEvent { + data?: any; + workbook?: kendo.ooxml.Workbook; + } + + + class TabStrip extends kendo.ui.Widget { + + static fn: TabStrip; + options: TabStripOptions; + + tabGroup: JQuery; + + element: JQuery; + wrapper: JQuery; + + static extend(proto: Object): TabStrip; + + constructor(element: Element, options?: TabStripOptions); + + activateTab(item: JQuery): void; append(tab: any): kendo.ui.TabStrip; contentElement(itemIndex: number): Element; @@ -5770,7 +6587,7 @@ declare module kendo.ui { select(element: JQuery): void; select(element: number): void; setDataSource(): void; - tabGroup: JQuery; + } interface TabStripAnimationClose { @@ -5788,6 +6605,10 @@ declare module kendo.ui { open?: TabStripAnimationOpen; } + interface TabStripScrollable { + distance?: number; + } + interface TabStripOptions { name?: string; animation?: TabStripAnimation; @@ -5800,7 +6621,9 @@ declare module kendo.ui { dataTextField?: string; dataUrlField?: string; navigatable?: boolean; + scrollable?: TabStripScrollable; tabPosition?: string; + value?: string; activate?(e: TabStripActivateEvent): void; contentLoad?(e: TabStripContentLoadEvent): void; error?(e: TabStripErrorEvent): void; @@ -5809,8 +6632,8 @@ declare module kendo.ui { } interface TabStripEvent { sender: TabStrip; - isDefaultPrevented(): boolean; preventDefault: Function; + isDefaultPrevented(): boolean; } interface TabStripActivateEvent extends TabStripEvent { @@ -5840,13 +6663,20 @@ declare module kendo.ui { class TimePicker extends kendo.ui.Widget { + static fn: TimePicker; - static extend(proto: Object): TimePicker; + + options: TimePickerOptions; + element: JQuery; wrapper: JQuery; + + static extend(proto: Object): TimePicker; + constructor(element: Element, options?: TimePickerOptions); - options: TimePickerOptions; + + close(): void; destroy(): void; enable(enable: boolean): void; @@ -5862,6 +6692,7 @@ declare module kendo.ui { value(): Date; value(value: Date): void; value(value: string): void; + } interface TimePickerAnimationClose { @@ -5896,8 +6727,8 @@ declare module kendo.ui { } interface TimePickerEvent { sender: TimePicker; - isDefaultPrevented(): boolean; preventDefault: Function; + isDefaultPrevented(): boolean; } interface TimePickerChangeEvent extends TimePickerEvent { @@ -5911,23 +6742,37 @@ declare module kendo.ui { class ToolBar extends kendo.ui.Widget { + static fn: ToolBar; - static extend(proto: Object): ToolBar; + + options: ToolBarOptions; + element: JQuery; wrapper: JQuery; + + static extend(proto: Object): ToolBar; + constructor(element: Element, options?: ToolBarOptions); - options: ToolBarOptions; + + add(command: any): void; destroy(): void; enable(command: string, enable: boolean): void; enable(command: Element, enable: boolean): void; enable(command: JQuery, enable: boolean): void; getSelectedFromGroup(groupName: string): void; + hide(command: string): void; + hide(command: Element): void; + hide(command: JQuery): void; remove(command: string): void; remove(command: Element): void; remove(command: JQuery): void; + show(command: string): void; + show(command: Element): void; + show(command: JQuery): void; toggle(): void; + } interface ToolBarItemButton { @@ -5935,6 +6780,7 @@ declare module kendo.ui { click?: Function; enable?: boolean; group?: string; + hidden?: boolean; icon?: string; id?: string; imageUrl?: string; @@ -5951,6 +6797,7 @@ declare module kendo.ui { interface ToolBarItemMenuButton { attributes?: any; enable?: boolean; + hidden?: boolean; icon?: string; id?: string; imageUrl?: string; @@ -5965,18 +6812,19 @@ declare module kendo.ui { click?: Function; enable?: boolean; group?: string; + hidden?: boolean; icon?: string; id?: string; imageUrl?: string; menuButtons?: ToolBarItemMenuButton[]; overflow?: string; - overflowTemplate?: any; + overflowTemplate?: string|Function; primary?: boolean; selected?: boolean; showIcon?: string; showText?: string; spriteCssClass?: string; - template?: any; + template?: string|Function; text?: string; togglable?: boolean; toggle?: Function; @@ -5997,8 +6845,8 @@ declare module kendo.ui { } interface ToolBarEvent { sender: ToolBar; - isDefaultPrevented(): boolean; preventDefault: Function; + isDefaultPrevented(): boolean; } interface ToolBarClickEvent extends ToolBarEvent { @@ -6028,17 +6876,25 @@ declare module kendo.ui { class Tooltip extends kendo.ui.Widget { + static fn: Tooltip; - static extend(proto: Object): Tooltip; + + options: TooltipOptions; + element: JQuery; wrapper: JQuery; + + static extend(proto: Object): Tooltip; + constructor(element: Element, options?: TooltipOptions); - options: TooltipOptions; + + show(element: JQuery): void; hide(): void; refresh(): void; target(): JQuery; + } interface TooltipAnimationClose { @@ -6081,8 +6937,8 @@ declare module kendo.ui { } interface TooltipEvent { sender: Tooltip; - isDefaultPrevented(): boolean; preventDefault: Function; + isDefaultPrevented(): boolean; } interface TooltipRequestStartEvent extends TooltipEvent { @@ -6097,15 +6953,23 @@ declare module kendo.ui { class Touch extends kendo.ui.Widget { + static fn: Touch; - static extend(proto: Object): Touch; + + options: TouchOptions; + element: JQuery; wrapper: JQuery; + + static extend(proto: Object): Touch; + constructor(element: Element, options?: TouchOptions); - options: TouchOptions; + + cancel(): void; destroy(): void; + } interface TouchOptions { @@ -6133,8 +6997,8 @@ declare module kendo.ui { } interface TouchEvent { sender: Touch; - isDefaultPrevented(): boolean; preventDefault: Function; + isDefaultPrevented(): boolean; } interface TouchTouchstartEvent extends TouchEvent { @@ -6200,14 +7064,21 @@ declare module kendo.ui { class TreeList extends kendo.ui.Widget { + static fn: TreeList; - static extend(proto: Object): TreeList; + + options: TreeListOptions; + + dataSource: kendo.data.DataSource; element: JQuery; wrapper: JQuery; + + static extend(proto: Object): TreeList; + constructor(element: Element, options?: TreeListOptions); - options: TreeListOptions; - dataSource: kendo.data.DataSource; + + addRow(parentRow: string): void; addRow(parentRow: Element): void; addRow(parentRow: JQuery): void; @@ -6220,6 +7091,8 @@ declare module kendo.ui { destroy(): void; editRow(row: JQuery): void; expand(): void; + itemFor(model: kendo.data.TreeListModel): JQuery; + itemFor(model: any): JQuery; refresh(): void; removeRow(row: string): void; removeRow(row: Element): void; @@ -6240,6 +7113,7 @@ declare module kendo.ui { unlockColumn(column: number): void; unlockColumn(column: string): void; reorderColumn(destIndex: number, column: any): void; + } interface TreeListColumnMenuMessages { @@ -6264,7 +7138,7 @@ declare module kendo.ui { } interface TreeListColumnFilterable { - ui?: any; + ui?: string|Function; } interface TreeListColumnSortable { @@ -6278,14 +7152,15 @@ declare module kendo.ui { expandable?: boolean; field?: string; filterable?: TreeListColumnFilterable; - footerTemplate?: any; + footerTemplate?: string|Function; format?: string; headerAttributes?: any; - headerTemplate?: any; + headerTemplate?: string|Function; + minScreenWidth?: number; sortable?: TreeListColumnSortable; - template?: any; + template?: string|Function; title?: string; - width?: any; + width?: string|number; hidden?: boolean; menu?: boolean; locked?: boolean; @@ -6294,7 +7169,8 @@ declare module kendo.ui { interface TreeListEditable { mode?: string; - template?: any; + move?: boolean; + template?: string|Function; window?: any; } @@ -6343,14 +7219,15 @@ declare module kendo.ui { } interface TreeListPdfMargin { - bottom?: any; - left?: any; - right?: any; - top?: any; + bottom?: number|string; + left?: number|string; + right?: number|string; + top?: number|string; } interface TreeListPdf { author?: string; + avoidLinks?: boolean|string; creator?: string; date?: Date; fileName?: string; @@ -6358,7 +7235,7 @@ declare module kendo.ui { keywords?: string; landscape?: boolean; margin?: TreeListPdfMargin; - paperSize?: any; + paperSize?: string|any; proxyURL?: string; proxyTarget?: string; subject?: string; @@ -6382,15 +7259,15 @@ declare module kendo.ui { resizable?: boolean; reorderable?: boolean; columnMenu?: TreeListColumnMenu; - dataSource?: any; + dataSource?: any|any|kendo.data.TreeListDataSource; editable?: TreeListEditable; excel?: TreeListExcel; filterable?: TreeListFilterable; - height?: any; + height?: number|string; messages?: TreeListMessages; pdf?: TreeListPdf; - scrollable?: any; - selectable?: any; + scrollable?: boolean|any; + selectable?: boolean|string; sortable?: TreeListSortable; toolbar?: TreeListToolbarItem[]; cancel?(e: TreeListCancelEvent): void; @@ -6398,6 +7275,10 @@ declare module kendo.ui { collapse?(e: TreeListCollapseEvent): void; dataBinding?(e: TreeListDataBindingEvent): void; dataBound?(e: TreeListDataBoundEvent): void; + dragstart?(e: TreeListDragstartEvent): void; + drag?(e: TreeListDragEvent): void; + dragend?(e: TreeListDragendEvent): void; + drop?(e: TreeListDropEvent): void; edit?(e: TreeListEditEvent): void; excelExport?(e: TreeListExcelExportEvent): void; expand?(e: TreeListExpandEvent): void; @@ -6408,14 +7289,15 @@ declare module kendo.ui { columnShow?(e: TreeListColumnShowEvent): void; columnHide?(e: TreeListColumnHideEvent): void; columnReorder?(e: TreeListColumnReorderEvent): void; + columnResize?(e: TreeListColumnResizeEvent): void; columnMenuInit?(e: TreeListColumnMenuInitEvent): void; columnLock?(e: TreeListColumnLockEvent): void; columnUnlock?(e: TreeListColumnUnlockEvent): void; } interface TreeListEvent { sender: TreeList; - isDefaultPrevented(): boolean; preventDefault: Function; + isDefaultPrevented(): boolean; } interface TreeListCancelEvent extends TreeListEvent { @@ -6436,6 +7318,27 @@ declare module kendo.ui { interface TreeListDataBoundEvent extends TreeListEvent { } + interface TreeListDragstartEvent extends TreeListEvent { + source?: kendo.data.TreeListModel; + } + + interface TreeListDragEvent extends TreeListEvent { + source?: kendo.data.TreeListModel; + target?: JQuery; + } + + interface TreeListDragendEvent extends TreeListEvent { + source?: kendo.data.TreeListModel; + destination?: kendo.data.TreeListModel; + } + + interface TreeListDropEvent extends TreeListEvent { + source?: kendo.data.TreeListModel; + destination?: kendo.data.TreeListModel; + valid?: boolean; + setValid?: boolean; + } + interface TreeListEditEvent extends TreeListEvent { container?: JQuery; model?: kendo.data.TreeListModel; @@ -6483,6 +7386,12 @@ declare module kendo.ui { oldIndex?: number; } + interface TreeListColumnResizeEvent extends TreeListEvent { + column?: any; + newWidth?: number; + oldWidth?: number; + } + interface TreeListColumnMenuInitEvent extends TreeListEvent { container?: JQuery; field?: string; @@ -6498,14 +7407,21 @@ declare module kendo.ui { class TreeView extends kendo.ui.Widget { + static fn: TreeView; - static extend(proto: Object): TreeView; + + options: TreeViewOptions; + + dataSource: kendo.data.DataSource; element: JQuery; wrapper: JQuery; + + static extend(proto: Object): TreeView; + constructor(element: Element, options?: TreeViewOptions); - options: TreeViewOptions; - dataSource: kendo.data.DataSource; + + append(nodeData: any, parentNode?: JQuery, success?: Function): JQuery; append(nodeData: JQuery, parentNode?: JQuery, success?: Function): JQuery; collapse(nodes: JQuery): void; @@ -6542,7 +7458,9 @@ declare module kendo.ui { select(node?: Element): void; select(node?: string): void; setDataSource(dataSource: kendo.data.HierarchicalDataSource): void; - text(): string; + text(node: JQuery): string; + text(node: Element): string; + text(node: string): string; text(node: JQuery, newText: string): void; text(node: Element, newText: string): void; text(node: string, newText: string): void; @@ -6550,6 +7468,7 @@ declare module kendo.ui { toggle(node: Element): void; toggle(node: string): void; updateIndeterminate(node: JQuery): void; + } interface TreeViewAnimationCollapse { @@ -6570,7 +7489,7 @@ declare module kendo.ui { interface TreeViewCheckboxes { checkChildren?: boolean; name?: string; - template?: any; + template?: string|Function; } interface TreeViewMessages { @@ -6583,16 +7502,17 @@ declare module kendo.ui { name?: string; animation?: TreeViewAnimation; autoBind?: boolean; + autoScroll?: boolean; checkboxes?: TreeViewCheckboxes; dataImageUrlField?: string; - dataSource?: any; + dataSource?: any|any|kendo.data.HierarchicalDataSource; dataSpriteCssClassField?: string; - dataTextField?: any; + dataTextField?: string|any; dataUrlField?: string; dragAndDrop?: boolean; loadOnDemand?: boolean; messages?: TreeViewMessages; - template?: any; + template?: string|Function; change?(e: TreeViewEvent): void; check?(e: TreeViewCheckEvent): void; collapse?(e: TreeViewCollapseEvent): void; @@ -6607,8 +7527,8 @@ declare module kendo.ui { } interface TreeViewEvent { sender: TreeView; - isDefaultPrevented(): boolean; preventDefault: Function; + isDefaultPrevented(): boolean; } interface TreeViewCheckEvent extends TreeViewEvent { @@ -6665,17 +7585,25 @@ declare module kendo.ui { class Upload extends kendo.ui.Widget { + static fn: Upload; - static extend(proto: Object): Upload; + + options: UploadOptions; + element: JQuery; wrapper: JQuery; + + static extend(proto: Object): Upload; + constructor(element: Element, options?: UploadOptions); - options: UploadOptions; + + destroy(): void; disable(): void; enable(enable?: boolean): void; toggle(enable: boolean): void; + } interface UploadAsync { @@ -6717,7 +7645,7 @@ declare module kendo.ui { localization?: UploadLocalization; multiple?: boolean; showFileList?: boolean; - template?: any; + template?: string|Function; cancel?(e: UploadCancelEvent): void; complete?(e: UploadEvent): void; error?(e: UploadErrorEvent): void; @@ -6729,44 +7657,44 @@ declare module kendo.ui { } interface UploadEvent { sender: Upload; - isDefaultPrevented(): boolean; preventDefault: Function; + isDefaultPrevented(): boolean; } interface UploadCancelEvent extends UploadEvent { - files?: any; + files?: UploadFile[]; } interface UploadErrorEvent extends UploadEvent { - files?: any; + files?: UploadFile[]; operation?: string; XMLHttpRequest?: any; } interface UploadProgressEvent extends UploadEvent { - files?: any; + files?: UploadFile[]; percentComplete?: number; } interface UploadRemoveEvent extends UploadEvent { - files?: any; + files?: UploadFile[]; data?: any; } interface UploadSelectEvent extends UploadEvent { e?: any; - files?: any; + files?: UploadFile[]; } interface UploadSuccessEvent extends UploadEvent { - files?: any; + files?: UploadFile[]; operation?: string; - response?: string; + response?: any; XMLHttpRequest?: any; } interface UploadUploadEvent extends UploadEvent { - files?: any; + files?: UploadFile[]; data?: any; formData?: any; XMLHttpRequest?: any; @@ -6774,18 +7702,26 @@ declare module kendo.ui { class Validator extends kendo.ui.Widget { + static fn: Validator; - static extend(proto: Object): Validator; + + options: ValidatorOptions; + element: JQuery; wrapper: JQuery; + + static extend(proto: Object): Validator; + constructor(element: Element, options?: ValidatorOptions); - options: ValidatorOptions; + + errors(): any; hideMessages(): void; validate(): boolean; validateInput(input: Element): boolean; validateInput(input: JQuery): boolean; + } interface ValidatorOptions { @@ -6798,8 +7734,8 @@ declare module kendo.ui { } interface ValidatorEvent { sender: Validator; - isDefaultPrevented(): boolean; preventDefault: Function; + isDefaultPrevented(): boolean; } interface ValidatorValidateEvent extends ValidatorEvent { @@ -6807,17 +7743,25 @@ declare module kendo.ui { class Window extends kendo.ui.Widget { + static fn: Window; - static extend(proto: Object): Window; + + options: WindowOptions; + element: JQuery; wrapper: JQuery; + + static extend(proto: Object): Window; + constructor(element: Element, options?: WindowOptions); - options: WindowOptions; + + center(): kendo.ui.Window; close(): kendo.ui.Window; content(): any; content(content?: string): void; + content(content?: JQuery): void; destroy(): void; maximize(): kendo.ui.Window; minimize(): kendo.ui.Window; @@ -6831,6 +7775,7 @@ declare module kendo.ui { toFront(): kendo.ui.Window; toggleMaximization(): kendo.ui.Window; unpin(): void; + } interface WindowAnimationClose { @@ -6853,8 +7798,8 @@ declare module kendo.ui { } interface WindowPosition { - top?: any; - left?: any; + top?: number|string; + left?: number|string; } interface WindowRefreshOptions { @@ -6869,7 +7814,7 @@ declare module kendo.ui { name?: string; actions?: any; animation?: WindowAnimation; - appendTo?: any; + appendTo?: any|string; autoFocus?: boolean; content?: WindowContent; draggable?: boolean; @@ -6882,10 +7827,11 @@ declare module kendo.ui { pinned?: boolean; position?: WindowPosition; resizable?: boolean; - title?: any; + scrollable?: boolean; + title?: string|boolean; visible?: boolean; - width?: any; - height?: any; + width?: number|string; + height?: number|string; activate?(e: WindowEvent): void; close?(e: WindowCloseEvent): void; deactivate?(e: WindowEvent): void; @@ -6898,8 +7844,8 @@ declare module kendo.ui { } interface WindowEvent { sender: Window; - isDefaultPrevented(): boolean; preventDefault: Function; + isDefaultPrevented(): boolean; } interface WindowCloseEvent extends WindowEvent { @@ -6915,13 +7861,20 @@ declare module kendo.ui { } declare module kendo.dataviz.ui { class Barcode extends kendo.ui.Widget { + static fn: Barcode; - static extend(proto: Object): Barcode; + + options: BarcodeOptions; + element: JQuery; wrapper: JQuery; + + static extend(proto: Object): Barcode; + constructor(element: Element, options?: BarcodeOptions); - options: BarcodeOptions; + + exportImage(options: any): JQueryPromise; exportPDF(options?: kendo.drawing.PDFOptions): JQueryPromise; exportSVG(options: any): JQueryPromise; @@ -6932,6 +7885,7 @@ declare module kendo.dataviz.ui { value(): string; value(value: number): void; value(value: string): void; + } interface BarcodeBorder { @@ -6986,20 +7940,27 @@ declare module kendo.dataviz.ui { } interface BarcodeEvent { sender: Barcode; - isDefaultPrevented(): boolean; preventDefault: Function; + isDefaultPrevented(): boolean; } class Chart extends kendo.ui.Widget { + static fn: Chart; - static extend(proto: Object): Chart; + + options: ChartOptions; + + dataSource: kendo.data.DataSource; element: JQuery; wrapper: JQuery; + + static extend(proto: Object): Chart; + constructor(element: Element, options?: ChartOptions); - options: ChartOptions; - dataSource: kendo.data.DataSource; + + destroy(): void; exportImage(options: any): JQueryPromise; exportPDF(options?: kendo.drawing.PDFOptions): JQueryPromise; @@ -7014,6 +7975,7 @@ declare module kendo.dataviz.ui { svg(): string; imageDataURL(): string; toggleHighlight(show: boolean, options: any): void; + } interface ChartCategoryAxisItemAutoBaseUnitSteps { @@ -7046,7 +8008,7 @@ declare module kendo.dataviz.ui { font?: string; format?: string; padding?: ChartCategoryAxisItemCrosshairTooltipPadding; - template?: any; + template?: string|Function; visible?: boolean; } @@ -7086,6 +8048,11 @@ declare module kendo.dataviz.ui { top?: number; } + interface ChartCategoryAxisItemLabelsRotation { + align?: string; + angle?: number|string; + } + interface ChartCategoryAxisItemLabels { background?: string; border?: ChartCategoryAxisItemLabelsBorder; @@ -7097,10 +8064,10 @@ declare module kendo.dataviz.ui { margin?: ChartCategoryAxisItemLabelsMargin; mirror?: boolean; padding?: ChartCategoryAxisItemLabelsPadding; - rotation?: number; + rotation?: ChartCategoryAxisItemLabelsRotation; skip?: number; step?: number; - template?: any; + template?: string|Function; visible?: boolean; visual?: Function; } @@ -7172,7 +8139,7 @@ declare module kendo.dataviz.ui { border?: ChartCategoryAxisItemNotesDataItemLabelBorder; color?: string; font?: string; - template?: any; + template?: string|Function; visible?: boolean; rotation?: number; format?: string; @@ -7218,7 +8185,7 @@ declare module kendo.dataviz.ui { border?: ChartCategoryAxisItemNotesLabelBorder; color?: string; font?: string; - template?: any; + template?: string|Function; visible?: boolean; rotation?: number; format?: string; @@ -7296,7 +8263,7 @@ declare module kendo.dataviz.ui { interface ChartCategoryAxisItem { autoBaseUnitSteps?: ChartCategoryAxisItemAutoBaseUnitSteps; - axisCrossingValue?: any; + axisCrossingValue?: any|Date|any; background?: string; baseUnit?: string; baseUnitStep?: any; @@ -7359,7 +8326,7 @@ declare module kendo.dataviz.ui { interface ChartLegendInactiveItemsLabels { color?: string; font?: string; - template?: any; + template?: string|Function; } interface ChartLegendInactiveItems { @@ -7367,6 +8334,7 @@ declare module kendo.dataviz.ui { } interface ChartLegendItem { + cursor?: string; visual?: Function; } @@ -7389,7 +8357,7 @@ declare module kendo.dataviz.ui { font?: string; margin?: ChartLegendLabelsMargin; padding?: ChartLegendLabelsPadding; - template?: any; + template?: string|Function; } interface ChartLegendMargin { @@ -7481,11 +8449,16 @@ declare module kendo.dataviz.ui { title?: ChartPaneTitle; } + interface ChartPannable { + key?: string; + lock?: string; + } + interface ChartPdfMargin { - bottom?: any; - left?: any; - right?: any; - top?: any; + bottom?: number|string; + left?: number|string; + right?: number|string; + top?: number|string; } interface ChartPdf { @@ -7497,7 +8470,7 @@ declare module kendo.dataviz.ui { keywords?: string; landscape?: boolean; margin?: ChartPdfMargin; - paperSize?: any; + paperSize?: string|any; proxyURL?: string; proxyTarget?: string; subject?: string; @@ -7533,10 +8506,10 @@ declare module kendo.dataviz.ui { } interface ChartSeriesItemBorder { - color?: any; - dashType?: any; - opacity?: any; - width?: any; + color?: string|Function; + dashType?: string|Function; + opacity?: number|Function; + width?: number|Function; } interface ChartSeriesItemConnectors { @@ -7551,26 +8524,26 @@ declare module kendo.dataviz.ui { } interface ChartSeriesItemErrorBars { - value?: any; + value?: string|number|any|Function; visual?: Function; - xValue?: any; - yValue?: any; + xValue?: string|number|any|Function; + yValue?: string|number|any|Function; endCaps?: boolean; color?: string; line?: ChartSeriesItemErrorBarsLine; } interface ChartSeriesItemExtremesBorder { - color?: any; - width?: any; + color?: string|Function; + width?: number|Function; } interface ChartSeriesItemExtremes { - background?: any; + background?: string|Function; border?: ChartSeriesItemExtremesBorder; - size?: any; - type?: any; - rotation?: any; + size?: number|Function; + type?: string|Function; + rotation?: number|Function; } interface ChartSeriesItemHighlightBorder { @@ -7596,15 +8569,15 @@ declare module kendo.dataviz.ui { } interface ChartSeriesItemLabelsBorder { - color?: any; - dashType?: any; - width?: any; + color?: string|Function; + dashType?: string|Function; + width?: number|Function; } interface ChartSeriesItemLabelsFromBorder { - color?: any; - dashType?: any; - width?: any; + color?: string|Function; + dashType?: string|Function; + width?: number|Function; } interface ChartSeriesItemLabelsFromMargin { @@ -7622,16 +8595,16 @@ declare module kendo.dataviz.ui { } interface ChartSeriesItemLabelsFrom { - background?: any; + background?: string|Function; border?: ChartSeriesItemLabelsFromBorder; - color?: any; - font?: any; - format?: any; + color?: string|Function; + font?: string|Function; + format?: string|Function; margin?: ChartSeriesItemLabelsFromMargin; padding?: ChartSeriesItemLabelsFromPadding; - position?: any; - template?: any; - visible?: any; + position?: string|Function; + template?: string|Function; + visible?: boolean|Function; } interface ChartSeriesItemLabelsMargin { @@ -7649,9 +8622,9 @@ declare module kendo.dataviz.ui { } interface ChartSeriesItemLabelsToBorder { - color?: any; - dashType?: any; - width?: any; + color?: string|Function; + dashType?: string|Function; + width?: number|Function; } interface ChartSeriesItemLabelsToMargin { @@ -7669,31 +8642,31 @@ declare module kendo.dataviz.ui { } interface ChartSeriesItemLabelsTo { - background?: any; + background?: string|Function; border?: ChartSeriesItemLabelsToBorder; - color?: any; - font?: any; - format?: any; + color?: string|Function; + font?: string|Function; + format?: string|Function; margin?: ChartSeriesItemLabelsToMargin; padding?: ChartSeriesItemLabelsToPadding; - position?: any; - template?: any; - visible?: any; + position?: string|Function; + template?: string|Function; + visible?: boolean|Function; } interface ChartSeriesItemLabels { align?: string; - background?: any; + background?: string|Function; border?: ChartSeriesItemLabelsBorder; - color?: any; + color?: string|Function; distance?: number; - font?: any; - format?: any; + font?: string|Function; + format?: string|Function; margin?: ChartSeriesItemLabelsMargin; padding?: ChartSeriesItemLabelsPadding; - position?: any; - template?: any; - visible?: any; + position?: string|Function; + template?: string|Function; + visible?: boolean|Function; visual?: Function; from?: ChartSeriesItemLabelsFrom; to?: ChartSeriesItemLabelsTo; @@ -7714,18 +8687,18 @@ declare module kendo.dataviz.ui { } interface ChartSeriesItemMarkersBorder { - color?: any; - width?: any; + color?: string|Function; + width?: number|Function; } interface ChartSeriesItemMarkers { - background?: any; + background?: string|Function; border?: ChartSeriesItemMarkersBorder; - size?: any; - type?: any; - visible?: any; + size?: number|Function; + type?: string|Function; + visible?: boolean|Function; visual?: Function; - rotation?: any; + rotation?: number|Function; } interface ChartSeriesItemNegativeValues { @@ -7757,7 +8730,7 @@ declare module kendo.dataviz.ui { border?: ChartSeriesItemNotesLabelBorder; color?: string; font?: string; - template?: any; + template?: string|Function; visible?: boolean; rotation?: number; format?: string; @@ -7779,16 +8752,16 @@ declare module kendo.dataviz.ui { } interface ChartSeriesItemOutliersBorder { - color?: any; - width?: any; + color?: string|Function; + width?: number|Function; } interface ChartSeriesItemOutliers { - background?: any; + background?: string|Function; border?: ChartSeriesItemOutliersBorder; - size?: any; - type?: any; - rotation?: any; + size?: number|Function; + type?: string|Function; + rotation?: number|Function; } interface ChartSeriesItemOverlay { @@ -7801,18 +8774,18 @@ declare module kendo.dataviz.ui { } interface ChartSeriesItemTargetBorder { - color?: any; - dashType?: any; - width?: any; + color?: string|Function; + dashType?: string|Function; + width?: number|Function; } interface ChartSeriesItemTargetLine { - width?: any; + width?: any|Function; } interface ChartSeriesItemTarget { border?: ChartSeriesItemTargetBorder; - color?: any; + color?: string|Function; line?: ChartSeriesItemTargetLine; } @@ -7835,23 +8808,23 @@ declare module kendo.dataviz.ui { font?: string; format?: string; padding?: ChartSeriesItemTooltipPadding; - template?: any; + template?: string|Function; visible?: boolean; } interface ChartSeriesItem { - aggregate?: any; + aggregate?: string|Function; axis?: string; border?: ChartSeriesItemBorder; categoryField?: string; closeField?: string; - color?: any; + color?: string|Function; colorField?: string; connectors?: ChartSeriesItemConnectors; currentField?: string; dashType?: string; data?: any; - downColor?: any; + downColor?: string|Function; downColorField?: string; segmentSpacing?: number; summaryField?: string; @@ -7961,7 +8934,7 @@ declare module kendo.dataviz.ui { format?: string; margin?: ChartSeriesDefaultsLabelsFromMargin; padding?: ChartSeriesDefaultsLabelsFromPadding; - template?: any; + template?: string|Function; visible?: boolean; } @@ -8007,7 +8980,7 @@ declare module kendo.dataviz.ui { format?: string; margin?: ChartSeriesDefaultsLabelsToMargin; padding?: ChartSeriesDefaultsLabelsToPadding; - template?: any; + template?: string|Function; visible?: boolean; } @@ -8019,7 +8992,7 @@ declare module kendo.dataviz.ui { format?: string; margin?: ChartSeriesDefaultsLabelsMargin; padding?: ChartSeriesDefaultsLabelsPadding; - template?: any; + template?: string|Function; visible?: boolean; visual?: Function; from?: ChartSeriesDefaultsLabelsFrom; @@ -8050,7 +9023,7 @@ declare module kendo.dataviz.ui { border?: ChartSeriesDefaultsNotesLabelBorder; color?: string; font?: string; - template?: any; + template?: string|Function; visible?: boolean; rotation?: number; format?: string; @@ -8097,7 +9070,7 @@ declare module kendo.dataviz.ui { font?: string; format?: string; padding?: ChartSeriesDefaultsTooltipPadding; - template?: any; + template?: string|Function; visible?: boolean; } @@ -8180,8 +9153,8 @@ declare module kendo.dataviz.ui { format?: string; padding?: ChartTooltipPadding; shared?: boolean; - sharedTemplate?: any; - template?: any; + sharedTemplate?: string|Function; + template?: string|Function; visible?: boolean; } @@ -8205,7 +9178,7 @@ declare module kendo.dataviz.ui { font?: string; format?: string; padding?: ChartValueAxisItemCrosshairTooltipPadding; - template?: any; + template?: string|Function; visible?: boolean; } @@ -8237,6 +9210,11 @@ declare module kendo.dataviz.ui { top?: number; } + interface ChartValueAxisItemLabelsRotation { + align?: string; + angle?: number|string; + } + interface ChartValueAxisItemLabels { background?: string; border?: ChartValueAxisItemLabelsBorder; @@ -8246,10 +9224,10 @@ declare module kendo.dataviz.ui { margin?: ChartValueAxisItemLabelsMargin; mirror?: boolean; padding?: ChartValueAxisItemLabelsPadding; - rotation?: number; + rotation?: ChartValueAxisItemLabelsRotation; skip?: number; step?: number; - template?: any; + template?: string|Function; visible?: boolean; visual?: Function; } @@ -8322,7 +9300,7 @@ declare module kendo.dataviz.ui { border?: ChartValueAxisItemNotesDataItemLabelBorder; color?: string; font?: string; - template?: any; + template?: string|Function; visible?: boolean; rotation?: number; format?: string; @@ -8368,7 +9346,7 @@ declare module kendo.dataviz.ui { border?: ChartValueAxisItemNotesLabelBorder; color?: string; font?: string; - template?: any; + template?: string|Function; visible?: boolean; rotation?: number; format?: string; @@ -8432,7 +9410,7 @@ declare module kendo.dataviz.ui { } interface ChartValueAxisItem { - axisCrossingValue?: any; + axisCrossingValue?: any|Date|any; background?: string; color?: string; crosshair?: ChartValueAxisItemCrosshair; @@ -8446,7 +9424,7 @@ declare module kendo.dataviz.ui { majorTicks?: ChartValueAxisItemMajorTicks; minorTicks?: ChartValueAxisItemMinorTicks; minorUnit?: number; - name?: any; + name?: string; narrowRange?: boolean; pane?: string; plotBands?: ChartValueAxisItemPlotBand[]; @@ -8477,7 +9455,7 @@ declare module kendo.dataviz.ui { font?: string; format?: string; padding?: ChartXAxisItemCrosshairTooltipPadding; - template?: any; + template?: string|Function; visible?: boolean; } @@ -8517,6 +9495,11 @@ declare module kendo.dataviz.ui { top?: number; } + interface ChartXAxisItemLabelsRotation { + align?: string; + angle?: number|string; + } + interface ChartXAxisItemLabels { background?: string; border?: ChartXAxisItemLabelsBorder; @@ -8528,10 +9511,10 @@ declare module kendo.dataviz.ui { margin?: ChartXAxisItemLabelsMargin; mirror?: boolean; padding?: ChartXAxisItemLabelsPadding; - rotation?: number; + rotation?: ChartXAxisItemLabelsRotation; skip?: number; step?: number; - template?: any; + template?: string|Function; visible?: boolean; visual?: Function; } @@ -8603,7 +9586,7 @@ declare module kendo.dataviz.ui { border?: ChartXAxisItemNotesDataItemLabelBorder; color?: string; font?: string; - template?: any; + template?: string|Function; visible?: boolean; rotation?: number; format?: string; @@ -8649,7 +9632,7 @@ declare module kendo.dataviz.ui { border?: ChartXAxisItemNotesLabelBorder; color?: string; font?: string; - template?: any; + template?: string|Function; visible?: boolean; rotation?: number; format?: string; @@ -8713,7 +9696,7 @@ declare module kendo.dataviz.ui { } interface ChartXAxisItem { - axisCrossingValue?: any; + axisCrossingValue?: any|Date|any; background?: string; baseUnit?: string; color?: string; @@ -8728,7 +9711,7 @@ declare module kendo.dataviz.ui { max?: any; min?: any; minorUnit?: number; - name?: any; + name?: string; narrowRange?: boolean; pane?: string; plotBands?: ChartXAxisItemPlotBand[]; @@ -8760,7 +9743,7 @@ declare module kendo.dataviz.ui { font?: string; format?: string; padding?: ChartYAxisItemCrosshairTooltipPadding; - template?: any; + template?: string|Function; visible?: boolean; } @@ -8800,6 +9783,11 @@ declare module kendo.dataviz.ui { top?: number; } + interface ChartYAxisItemLabelsRotation { + align?: string; + angle?: number; + } + interface ChartYAxisItemLabels { background?: string; border?: ChartYAxisItemLabelsBorder; @@ -8811,10 +9799,10 @@ declare module kendo.dataviz.ui { margin?: ChartYAxisItemLabelsMargin; mirror?: boolean; padding?: ChartYAxisItemLabelsPadding; - rotation?: number; + rotation?: ChartYAxisItemLabelsRotation; skip?: number; step?: number; - template?: any; + template?: string|Function; visible?: boolean; visual?: Function; } @@ -8886,7 +9874,7 @@ declare module kendo.dataviz.ui { border?: ChartYAxisItemNotesDataItemLabelBorder; color?: string; font?: string; - template?: any; + template?: string|Function; visible?: boolean; rotation?: number; format?: string; @@ -8932,7 +9920,7 @@ declare module kendo.dataviz.ui { border?: ChartYAxisItemNotesLabelBorder; color?: string; font?: string; - template?: any; + template?: string|Function; visible?: boolean; rotation?: number; format?: string; @@ -8996,7 +9984,7 @@ declare module kendo.dataviz.ui { } interface ChartYAxisItem { - axisCrossingValue?: any; + axisCrossingValue?: any|Date|any; background?: string; baseUnit?: string; color?: string; @@ -9011,7 +9999,7 @@ declare module kendo.dataviz.ui { max?: any; min?: any; minorUnit?: number; - name?: any; + name?: string; narrowRange?: boolean; pane?: string; plotBands?: ChartYAxisItemPlotBand[]; @@ -9022,6 +10010,20 @@ declare module kendo.dataviz.ui { notes?: ChartYAxisItemNotes; } + interface ChartZoomableMousewheel { + lock?: string; + } + + interface ChartZoomableSelection { + key?: string; + lock?: string; + } + + interface ChartZoomable { + mousewheel?: ChartZoomableMousewheel; + selection?: ChartZoomableSelection; + } + interface ChartExportImageOptions { width?: string; height?: string; @@ -9037,14 +10039,14 @@ declare module kendo.dataviz.ui { } interface ChartSeriesClickEventSeries { - type?: any; - name?: any; + type?: string; + name?: string; data?: any; } interface ChartSeriesHoverEventSeries { - type?: any; - name?: any; + type?: string; + name?: string; data?: any; } @@ -9054,9 +10056,10 @@ declare module kendo.dataviz.ui { axisDefaults?: any; categoryAxis?: ChartCategoryAxisItem[]; chartArea?: ChartChartArea; - dataSource?: any; + dataSource?: any|any|kendo.data.DataSource; legend?: ChartLegend; panes?: ChartPane[]; + pannable?: ChartPannable; pdf?: ChartPdf; plotArea?: ChartPlotArea; renderAs?: string; @@ -9070,6 +10073,7 @@ declare module kendo.dataviz.ui { valueAxis?: ChartValueAxisItem[]; xAxis?: ChartXAxisItem[]; yAxis?: ChartYAxisItem[]; + zoomable?: ChartZoomable; axisLabelClick?(e: ChartAxisLabelClickEvent): void; legendItemClick?(e: ChartLegendItemClickEvent): void; legendItemHover?(e: ChartLegendItemHoverEvent): void; @@ -9092,8 +10096,8 @@ declare module kendo.dataviz.ui { } interface ChartEvent { sender: Chart; - isDefaultPrevented(): boolean; preventDefault: Function; + isDefaultPrevented(): boolean; } interface ChartAxisLabelClickEvent extends ChartEvent { @@ -9145,6 +10149,7 @@ declare module kendo.dataviz.ui { value?: any; series?: any; dataItem?: any; + visual?: any; } interface ChartNoteHoverEvent extends ChartEvent { @@ -9153,6 +10158,7 @@ declare module kendo.dataviz.ui { value?: any; series?: any; dataItem?: any; + visual?: any; } interface ChartPlotAreaClickEvent extends ChartEvent { @@ -9221,14 +10227,23 @@ declare module kendo.dataviz.ui { class Diagram extends kendo.ui.Widget { + static fn: Diagram; - static extend(proto: Object): Diagram; + + options: DiagramOptions; + + dataSource: kendo.data.DataSource; + connections: DiagramConnection[]; + shapes: DiagramShape[]; element: JQuery; wrapper: JQuery; + + static extend(proto: Object): Diagram; + constructor(element: Element, options?: DiagramOptions); - options: DiagramOptions; - dataSource: kendo.data.DataSource; + + addConnection(connection: any, undoable: boolean): void; addShape(obj: any, undoable: boolean): kendo.dataviz.diagram.Shape; alignShapes(direction: string): void; @@ -9281,11 +10296,13 @@ declare module kendo.dataviz.ui { viewToModel(point: any): any; viewport(): void; zoom(zoom: number, point: any): void; + } interface DiagramConnectionDefaultsContent { - template?: any; + template?: string|Function; text?: string; + visual?: Function; } interface DiagramConnectionDefaultsEditableTool { @@ -9293,6 +10310,8 @@ declare module kendo.dataviz.ui { } interface DiagramConnectionDefaultsEditable { + drag?: boolean; + remove?: boolean; tools?: DiagramConnectionDefaultsEditableTool[]; } @@ -9362,16 +10381,20 @@ declare module kendo.dataviz.ui { content?: DiagramConnectionDefaultsContent; editable?: DiagramConnectionDefaultsEditable; endCap?: DiagramConnectionDefaultsEndCap; + fromConnector?: string; hover?: DiagramConnectionDefaultsHover; selectable?: boolean; selection?: DiagramConnectionDefaultsSelection; startCap?: DiagramConnectionDefaultsStartCap; stroke?: DiagramConnectionDefaultsStroke; + toConnector?: string; + type?: string; } interface DiagramConnectionContent { - template?: any; + template?: string|Function; text?: string; + visual?: Function; } interface DiagramConnectionEditableTool { @@ -9464,12 +10487,23 @@ declare module kendo.dataviz.ui { editable?: DiagramConnectionEditable; endCap?: DiagramConnectionEndCap; from?: DiagramConnectionFrom; + fromConnector?: string; hover?: DiagramConnectionHover; points?: DiagramConnectionPoint[]; selection?: DiagramConnectionSelection; startCap?: DiagramConnectionStartCap; stroke?: DiagramConnectionStroke; to?: DiagramConnectionTo; + toConnector?: string; + type?: string; + } + + interface DiagramEditableDragSnap { + size?: number; + } + + interface DiagramEditableDrag { + snap?: DiagramEditableDragSnap; } interface DiagramEditableResizeHandlesFill { @@ -9532,10 +10566,12 @@ declare module kendo.dataviz.ui { } interface DiagramEditable { - connectionTemplate?: any; + connectionTemplate?: string|Function; + drag?: DiagramEditableDrag; + remove?: boolean; resize?: DiagramEditableResize; rotate?: DiagramEditableRotate; - shapeTemplate?: any; + shapeTemplate?: string|Function; tools?: DiagramEditableTool[]; } @@ -9558,6 +10594,7 @@ declare module kendo.dataviz.ui { radialSeparation?: number; startRadialAngle?: number; subtype?: string; + tipOverTreeStartLevel?: number; type?: string; underneathHorizontalOffset?: number; underneathVerticalSeparation?: number; @@ -9570,10 +10607,10 @@ declare module kendo.dataviz.ui { } interface DiagramPdfMargin { - bottom?: any; - left?: any; - right?: any; - top?: any; + bottom?: number|string; + left?: number|string; + right?: number|string; + top?: number|string; } interface DiagramPdf { @@ -9585,7 +10622,7 @@ declare module kendo.dataviz.ui { keywords?: string; landscape?: boolean; margin?: DiagramPdfMargin; - paperSize?: any; + paperSize?: string|any; proxyURL?: string; proxyTarget?: string; subject?: string; @@ -9613,7 +10650,7 @@ declare module kendo.dataviz.ui { color?: string; fontFamily?: string; fontSize?: number; - template?: any; + template?: string|Function; text?: string; } @@ -9624,12 +10661,30 @@ declare module kendo.dataviz.ui { interface DiagramShapeDefaultsEditable { connect?: boolean; + drag?: boolean; + remove?: boolean; tools?: DiagramShapeDefaultsEditableTool[]; } + interface DiagramShapeDefaultsFillGradientStop { + offset?: number; + color?: string; + opacity?: number; + } + + interface DiagramShapeDefaultsFillGradient { + type?: string; + center?: any; + radius?: number; + start?: any; + end?: any; + stops?: DiagramShapeDefaultsFillGradientStop[]; + } + interface DiagramShapeDefaultsFill { color?: string; opacity?: number; + gradient?: DiagramShapeDefaultsFillGradient; } interface DiagramShapeDefaultsHoverFill { @@ -9683,7 +10738,7 @@ declare module kendo.dataviz.ui { color?: string; fontFamily?: string; fontSize?: number; - template?: any; + template?: string|Function; text?: string; } @@ -9697,9 +10752,25 @@ declare module kendo.dataviz.ui { tools?: DiagramShapeEditableTool[]; } + interface DiagramShapeFillGradientStop { + offset?: number; + color?: string; + opacity?: number; + } + + interface DiagramShapeFillGradient { + type?: string; + center?: any; + radius?: number; + start?: any; + end?: any; + stops?: DiagramShapeFillGradientStop[]; + } + interface DiagramShapeFill { color?: string; opacity?: number; + gradient?: DiagramShapeFillGradient; } interface DiagramShapeHoverFill { @@ -9760,8 +10831,8 @@ declare module kendo.dataviz.ui { autoBind?: boolean; connectionDefaults?: DiagramConnectionDefaults; connections?: DiagramConnection[]; - connectionsDataSource?: any; - dataSource?: any; + connectionsDataSource?: any|any|kendo.data.DataSource; + dataSource?: any|any|kendo.data.DataSource; editable?: DiagramEditable; layout?: DiagramLayout; pannable?: DiagramPannable; @@ -9769,7 +10840,7 @@ declare module kendo.dataviz.ui { selectable?: DiagramSelectable; shapeDefaults?: DiagramShapeDefaults; shapes?: DiagramShape[]; - template?: any; + template?: string|Function; zoom?: number; zoomMax?: number; zoomMin?: number; @@ -9779,6 +10850,9 @@ declare module kendo.dataviz.ui { change?(e: DiagramChangeEvent): void; click?(e: DiagramClickEvent): void; dataBound?(e: DiagramDataBoundEvent): void; + drag?(e: DiagramDragEvent): void; + dragEnd?(e: DiagramDragEndEvent): void; + dragStart?(e: DiagramDragStartEvent): void; edit?(e: DiagramEditEvent): void; itemBoundsChange?(e: DiagramItemBoundsChangeEvent): void; itemRotate?(e: DiagramItemRotateEvent): void; @@ -9793,8 +10867,8 @@ declare module kendo.dataviz.ui { } interface DiagramEvent { sender: Diagram; - isDefaultPrevented(): boolean; preventDefault: Function; + isDefaultPrevented(): boolean; } interface DiagramAddEvent extends DiagramEvent { @@ -9815,12 +10889,28 @@ declare module kendo.dataviz.ui { interface DiagramClickEvent extends DiagramEvent { item?: any; + meta?: any; point?: kendo.dataviz.diagram.Point; } interface DiagramDataBoundEvent extends DiagramEvent { } + interface DiagramDragEvent extends DiagramEvent { + connections?: any; + shapes?: any; + } + + interface DiagramDragEndEvent extends DiagramEvent { + connections?: any; + shapes?: any; + } + + interface DiagramDragStartEvent extends DiagramEvent { + connections?: any; + shapes?: any; + } + interface DiagramEditEvent extends DiagramEvent { container?: JQuery; connection?: kendo.data.Model; @@ -9829,11 +10919,11 @@ declare module kendo.dataviz.ui { interface DiagramItemBoundsChangeEvent extends DiagramEvent { bounds?: kendo.dataviz.diagram.Rect; - item?: any; + item?: kendo.dataviz.diagram.Shape; } interface DiagramItemRotateEvent extends DiagramEvent { - item?: any; + item?: kendo.dataviz.diagram.Shape; } interface DiagramMouseEnterEvent extends DiagramEvent { @@ -9845,6 +10935,7 @@ declare module kendo.dataviz.ui { } interface DiagramPanEvent extends DiagramEvent { + pan?: kendo.dataviz.diagram.Point; } interface DiagramRemoveEvent extends DiagramEvent { @@ -9875,13 +10966,20 @@ declare module kendo.dataviz.ui { class LinearGauge extends kendo.ui.Widget { + static fn: LinearGauge; - static extend(proto: Object): LinearGauge; + + options: LinearGaugeOptions; + element: JQuery; wrapper: JQuery; + + static extend(proto: Object): LinearGauge; + constructor(element: Element, options?: LinearGaugeOptions); - options: LinearGaugeOptions; + + allValues(values: any): any; destroy(): void; exportImage(options: any): JQueryPromise; @@ -9892,6 +10990,7 @@ declare module kendo.dataviz.ui { svg(): void; imageDataURL(): string; value(): void; + } interface LinearGaugeGaugeAreaBorder { @@ -9900,11 +10999,18 @@ declare module kendo.dataviz.ui { width?: number; } + interface LinearGaugeGaugeAreaMargin { + top?: number; + bottom?: number; + left?: number; + right?: number; + } + interface LinearGaugeGaugeArea { background?: any; border?: LinearGaugeGaugeAreaBorder; height?: number; - margin?: any; + margin?: LinearGaugeGaugeAreaMargin; width?: number; } @@ -9931,7 +11037,7 @@ declare module kendo.dataviz.ui { interface LinearGaugePointerItem { border?: LinearGaugePointerItemBorder; color?: string; - margin?: any; + margin?: number|any; opacity?: number; shape?: string; size?: number; @@ -9945,15 +11051,29 @@ declare module kendo.dataviz.ui { width?: number; } + interface LinearGaugeScaleLabelsMargin { + top?: number; + bottom?: number; + left?: number; + right?: number; + } + + interface LinearGaugeScaleLabelsPadding { + top?: number; + bottom?: number; + left?: number; + right?: number; + } + interface LinearGaugeScaleLabels { background?: string; border?: LinearGaugeScaleLabelsBorder; color?: string; font?: string; format?: string; - margin?: any; - padding?: any; - template?: any; + margin?: LinearGaugeScaleLabelsMargin; + padding?: LinearGaugeScaleLabelsPadding; + template?: string|Function; visible?: boolean; } @@ -10021,19 +11141,27 @@ declare module kendo.dataviz.ui { } interface LinearGaugeEvent { sender: LinearGauge; - isDefaultPrevented(): boolean; preventDefault: Function; + isDefaultPrevented(): boolean; } class Map extends kendo.ui.Widget { + static fn: Map; - static extend(proto: Object): Map; + + options: MapOptions; + + layers: any; element: JQuery; wrapper: JQuery; + + static extend(proto: Object): Map; + constructor(element: Element, options?: MapOptions); - options: MapOptions; + + center(): kendo.dataviz.map.Location; center(center: any): void; center(center: kendo.dataviz.map.Location): void; @@ -10061,7 +11189,7 @@ declare module kendo.dataviz.ui { viewToLocation(point: kendo.geometry.Point, zoom: number): kendo.dataviz.map.Location; zoom(): number; zoom(level: number): void; - layers: any; + } interface MapControlsAttribution { @@ -10087,6 +11215,7 @@ declare module kendo.dataviz.ui { opacity?: number; key?: string; imagerySet?: string; + culture?: string; } interface MapLayerDefaultsBubbleStyleFill { @@ -10112,7 +11241,7 @@ declare module kendo.dataviz.ui { maxSize?: number; minSize?: number; style?: MapLayerDefaultsBubbleStyle; - symbol?: any; + symbol?: string|Function; } interface MapLayerDefaultsMarkerTooltipAnimationClose { @@ -10188,6 +11317,7 @@ declare module kendo.dataviz.ui { marker?: MapLayerDefaultsMarker; shape?: MapLayerDefaultsShape; bubble?: MapLayerDefaultsBubble; + tileSize?: number; tile?: MapLayerDefaultsTile; bing?: MapLayerDefaultsBing; } @@ -10245,19 +11375,21 @@ declare module kendo.dataviz.ui { interface MapLayer { attribution?: string; autoBind?: boolean; - dataSource?: any; - extent?: any; + dataSource?: any|any|kendo.data.DataSource; + extent?: any|kendo.dataviz.map.Extent; key?: string; imagerySet?: string; + culture?: string; locationField?: string; shape?: string; + tileSize?: number; titleField?: string; tooltip?: MapLayerTooltip; maxSize?: number; minSize?: number; opacity?: number; subdomains?: any; - symbol?: any; + symbol?: string|Function; type?: string; style?: MapLayerStyle; urlTemplate?: string; @@ -10337,7 +11469,7 @@ declare module kendo.dataviz.ui { } interface MapMarker { - location?: any; + location?: any|kendo.dataviz.map.Location; shape?: string; title?: string; tooltip?: MapMarkerTooltip; @@ -10345,7 +11477,7 @@ declare module kendo.dataviz.ui { interface MapOptions { name?: string; - center?: any; + center?: any|kendo.dataviz.map.Location; controls?: MapControls; layerDefaults?: MapLayerDefaults; layers?: MapLayer[]; @@ -10375,8 +11507,8 @@ declare module kendo.dataviz.ui { } interface MapEvent { sender: Map; - isDefaultPrevented(): boolean; preventDefault: Function; + isDefaultPrevented(): boolean; } interface MapBeforeResetEvent extends MapEvent { @@ -10451,13 +11583,20 @@ declare module kendo.dataviz.ui { class QRCode extends kendo.ui.Widget { + static fn: QRCode; - static extend(proto: Object): QRCode; + + options: QRCodeOptions; + element: JQuery; wrapper: JQuery; + + static extend(proto: Object): QRCode; + constructor(element: Element, options?: QRCodeOptions); - options: QRCodeOptions; + + destroy(): void; exportImage(options: any): JQueryPromise; exportPDF(options?: kendo.drawing.PDFOptions): JQueryPromise; @@ -10469,6 +11608,7 @@ declare module kendo.dataviz.ui { svg(): string; value(options: string): void; value(options: number): void; + } interface QRCodeBorder { @@ -10494,24 +11634,31 @@ declare module kendo.dataviz.ui { errorCorrection?: string; padding?: number; renderAs?: string; - size?: any; - value?: any; + size?: number|string; + value?: number|string; } interface QRCodeEvent { sender: QRCode; - isDefaultPrevented(): boolean; preventDefault: Function; + isDefaultPrevented(): boolean; } class RadialGauge extends kendo.ui.Widget { + static fn: RadialGauge; - static extend(proto: Object): RadialGauge; + + options: RadialGaugeOptions; + element: JQuery; wrapper: JQuery; + + static extend(proto: Object): RadialGauge; + constructor(element: Element, options?: RadialGaugeOptions); - options: RadialGaugeOptions; + + allValues(values: any): any; destroy(): void; exportImage(options: any): JQueryPromise; @@ -10522,19 +11669,28 @@ declare module kendo.dataviz.ui { svg(): void; imageDataURL(): string; value(): void; + } interface RadialGaugeGaugeAreaBorder { color?: string; dashType?: string; + opacity?: number; width?: number; } + interface RadialGaugeGaugeAreaMargin { + top?: number; + bottom?: number; + left?: number; + right?: number; + } + interface RadialGaugeGaugeArea { background?: any; border?: RadialGaugeGaugeAreaBorder; height?: number; - margin?: any; + margin?: RadialGaugeGaugeAreaMargin; width?: number; } @@ -10552,19 +11708,34 @@ declare module kendo.dataviz.ui { interface RadialGaugeScaleLabelsBorder { color?: string; dashType?: string; + opacity?: number; width?: number; } + interface RadialGaugeScaleLabelsMargin { + top?: number; + bottom?: number; + left?: number; + right?: number; + } + + interface RadialGaugeScaleLabelsPadding { + top?: number; + bottom?: number; + left?: number; + right?: number; + } + interface RadialGaugeScaleLabels { background?: string; border?: RadialGaugeScaleLabelsBorder; color?: string; font?: string; format?: string; - margin?: any; - padding?: any; + margin?: RadialGaugeScaleLabelsMargin; + padding?: RadialGaugeScaleLabelsPadding; position?: string; - template?: any; + template?: string|Function; visible?: boolean; } @@ -10625,20 +11796,27 @@ declare module kendo.dataviz.ui { } interface RadialGaugeEvent { sender: RadialGauge; - isDefaultPrevented(): boolean; preventDefault: Function; + isDefaultPrevented(): boolean; } class Sparkline extends kendo.ui.Widget { + static fn: Sparkline; - static extend(proto: Object): Sparkline; + + options: SparklineOptions; + + dataSource: kendo.data.DataSource; element: JQuery; wrapper: JQuery; + + static extend(proto: Object): Sparkline; + constructor(element: Element, options?: SparklineOptions); - options: SparklineOptions; - dataSource: kendo.data.DataSource; + + destroy(): void; exportImage(options: any): JQueryPromise; exportPDF(options?: kendo.drawing.PDFOptions): JQueryPromise; @@ -10648,6 +11826,7 @@ declare module kendo.dataviz.ui { setOptions(options: any): void; svg(): string; imageDataURL(): string; + } interface SparklineCategoryAxisItemCrosshairTooltipBorder { @@ -10661,8 +11840,8 @@ declare module kendo.dataviz.ui { color?: string; font?: string; format?: string; - padding?: any; - template?: any; + padding?: number|any; + template?: string|Function; visible?: boolean; } @@ -10687,13 +11866,13 @@ declare module kendo.dataviz.ui { color?: string; font?: string; format?: string; - margin?: any; + margin?: number|any; mirror?: boolean; - padding?: any; + padding?: number|any; rotation?: number; skip?: number; step?: number; - template?: any; + template?: string|Function; visible?: boolean; culture?: string; dateFormats?: any; @@ -10766,7 +11945,7 @@ declare module kendo.dataviz.ui { border?: SparklineCategoryAxisItemNotesDataItemLabelBorder; color?: string; font?: string; - template?: any; + template?: string|Function; visible?: boolean; rotation?: number; format?: string; @@ -10812,7 +11991,7 @@ declare module kendo.dataviz.ui { border?: SparklineCategoryAxisItemNotesLabelBorder; color?: string; font?: string; - template?: any; + template?: string|Function; visible?: boolean; rotation?: number; format?: string; @@ -10851,7 +12030,7 @@ declare module kendo.dataviz.ui { border?: SparklineCategoryAxisItemTitleBorder; color?: string; font?: string; - margin?: any; + margin?: number|any; position?: string; rotation?: number; text?: string; @@ -10859,7 +12038,7 @@ declare module kendo.dataviz.ui { } interface SparklineCategoryAxisItem { - axisCrossingValue?: any; + axisCrossingValue?: any|Date|any; categories?: any; color?: string; field?: string; @@ -10899,7 +12078,7 @@ declare module kendo.dataviz.ui { opacity?: number; border?: SparklineChartAreaBorder; height?: number; - margin?: any; + margin?: number|any; width?: number; } @@ -10913,14 +12092,14 @@ declare module kendo.dataviz.ui { background?: string; opacity?: number; border?: SparklinePlotAreaBorder; - margin?: any; + margin?: number|any; } interface SparklineSeriesItemBorder { - color?: any; - dashType?: any; - opacity?: any; - width?: any; + color?: string|Function; + dashType?: string|Function; + opacity?: number|Function; + width?: number|Function; } interface SparklineSeriesItemConnectors { @@ -10943,24 +12122,24 @@ declare module kendo.dataviz.ui { } interface SparklineSeriesItemLabelsBorder { - color?: any; - dashType?: any; - width?: any; + color?: string|Function; + dashType?: string|Function; + width?: number|Function; } interface SparklineSeriesItemLabels { align?: string; - background?: any; + background?: string|Function; border?: SparklineSeriesItemLabelsBorder; - color?: any; + color?: string|Function; distance?: number; - font?: any; - format?: any; - margin?: any; - padding?: any; - position?: any; - template?: any; - visible?: any; + font?: string|Function; + format?: string|Function; + margin?: number|any; + padding?: number|any; + position?: string|Function; + template?: string|Function; + visible?: boolean|Function; } interface SparklineSeriesItemLine { @@ -10971,17 +12150,17 @@ declare module kendo.dataviz.ui { } interface SparklineSeriesItemMarkersBorder { - color?: any; - width?: any; + color?: string|Function; + width?: number|Function; } interface SparklineSeriesItemMarkers { - background?: any; + background?: string|Function; border?: SparklineSeriesItemMarkersBorder; - size?: any; - type?: any; - visible?: any; - rotation?: any; + size?: number|Function; + type?: string|Function; + visible?: boolean|Function; + rotation?: number|Function; } interface SparklineSeriesItemNotesIconBorder { @@ -11008,7 +12187,7 @@ declare module kendo.dataviz.ui { border?: SparklineSeriesItemNotesLabelBorder; color?: string; font?: string; - template?: any; + template?: string|Function; visible?: boolean; rotation?: number; format?: string; @@ -11038,18 +12217,18 @@ declare module kendo.dataviz.ui { } interface SparklineSeriesItemTargetBorder { - color?: any; - dashType?: any; + color?: string|Function; + dashType?: string|Function; width?: number; } interface SparklineSeriesItemTargetLine { - width?: any; + width?: any|Function; } interface SparklineSeriesItemTarget { line?: SparklineSeriesItemTargetLine; - color?: any; + color?: string|Function; border?: SparklineSeriesItemTargetBorder; } @@ -11064,8 +12243,8 @@ declare module kendo.dataviz.ui { color?: string; font?: string; format?: string; - padding?: any; - template?: any; + padding?: number|any; + template?: string|Function; visible?: boolean; } @@ -11079,11 +12258,11 @@ declare module kendo.dataviz.ui { field?: string; name?: string; highlight?: SparklineSeriesItemHighlight; - aggregate?: any; + aggregate?: string|Function; axis?: string; border?: SparklineSeriesItemBorder; categoryField?: string; - color?: any; + color?: string|Function; colorField?: string; connectors?: SparklineSeriesItemConnectors; gap?: number; @@ -11125,9 +12304,9 @@ declare module kendo.dataviz.ui { color?: string; font?: string; format?: string; - margin?: any; - padding?: any; - template?: any; + margin?: number|any; + padding?: number|any; + template?: string|Function; visible?: boolean; } @@ -11146,8 +12325,8 @@ declare module kendo.dataviz.ui { color?: string; font?: string; format?: string; - padding?: any; - template?: any; + padding?: number|any; + template?: string|Function; visible?: boolean; } @@ -11178,8 +12357,8 @@ declare module kendo.dataviz.ui { color?: string; font?: string; format?: string; - padding?: any; - template?: any; + padding?: number|any; + template?: string|Function; visible?: boolean; shared?: boolean; sharedTemplate?: string; @@ -11196,8 +12375,8 @@ declare module kendo.dataviz.ui { color?: string; font?: string; format?: string; - padding?: any; - template?: any; + padding?: number|any; + template?: string|Function; visible?: boolean; } @@ -11222,13 +12401,13 @@ declare module kendo.dataviz.ui { color?: string; font?: string; format?: string; - margin?: any; + margin?: number|any; mirror?: boolean; - padding?: any; + padding?: number|any; rotation?: number; skip?: number; step?: number; - template?: any; + template?: string|Function; visible?: boolean; } @@ -11298,7 +12477,7 @@ declare module kendo.dataviz.ui { border?: SparklineValueAxisItemNotesDataItemLabelBorder; color?: string; font?: string; - template?: any; + template?: string|Function; visible?: boolean; rotation?: number; format?: string; @@ -11344,7 +12523,7 @@ declare module kendo.dataviz.ui { border?: SparklineValueAxisItemNotesLabelBorder; color?: string; font?: string; - template?: any; + template?: string|Function; visible?: boolean; rotation?: number; format?: string; @@ -11383,8 +12562,8 @@ declare module kendo.dataviz.ui { border?: SparklineValueAxisItemTitleBorder; color?: string; font?: string; - margin?: any; - padding?: any; + margin?: number|any; + padding?: number|any; position?: string; rotation?: number; text?: string; @@ -11392,7 +12571,7 @@ declare module kendo.dataviz.ui { } interface SparklineValueAxisItem { - axisCrossingValue?: any; + axisCrossingValue?: any|Date|any; color?: string; labels?: SparklineValueAxisItemLabels; line?: SparklineValueAxisItemLine; @@ -11424,14 +12603,14 @@ declare module kendo.dataviz.ui { } interface SparklineSeriesClickEventSeries { - type?: any; - name?: any; + type?: string; + name?: string; data?: any; } interface SparklineSeriesHoverEventSeries { - type?: any; - name?: any; + type?: string; + name?: string; data?: any; } @@ -11468,8 +12647,8 @@ declare module kendo.dataviz.ui { } interface SparklineEvent { sender: Sparkline; - isDefaultPrevented(): boolean; preventDefault: Function; + isDefaultPrevented(): boolean; } interface SparklineAxisLabelClickEvent extends SparklineEvent { @@ -11540,14 +12719,21 @@ declare module kendo.dataviz.ui { class StockChart extends kendo.ui.Widget { + static fn: StockChart; - static extend(proto: Object): StockChart; + + options: StockChartOptions; + + dataSource: kendo.data.DataSource; element: JQuery; wrapper: JQuery; + + static extend(proto: Object): StockChart; + constructor(element: Element, options?: StockChartOptions); - options: StockChartOptions; - dataSource: kendo.data.DataSource; + + destroy(): void; exportImage(options: any): JQueryPromise; exportPDF(options?: kendo.drawing.PDFOptions): JQueryPromise; @@ -11558,6 +12744,7 @@ declare module kendo.dataviz.ui { setDataSource(dataSource: kendo.data.DataSource): void; svg(): string; imageDataURL(): string; + } interface StockChartCategoryAxisItemAutoBaseUnitSteps { @@ -11580,8 +12767,8 @@ declare module kendo.dataviz.ui { color?: string; font?: string; format?: string; - padding?: any; - template?: any; + padding?: number|any; + template?: string|Function; visible?: boolean; } @@ -11606,13 +12793,13 @@ declare module kendo.dataviz.ui { color?: string; font?: string; format?: string; - margin?: any; + margin?: number|any; mirror?: boolean; - padding?: any; + padding?: number|any; rotation?: number; skip?: number; step?: number; - template?: any; + template?: string|Function; visible?: boolean; culture?: string; dateFormats?: any; @@ -11685,7 +12872,7 @@ declare module kendo.dataviz.ui { border?: StockChartCategoryAxisItemNotesDataItemLabelBorder; color?: string; font?: string; - template?: any; + template?: string|Function; visible?: boolean; rotation?: number; format?: string; @@ -11731,7 +12918,7 @@ declare module kendo.dataviz.ui { border?: StockChartCategoryAxisItemNotesLabelBorder; color?: string; font?: string; - template?: any; + template?: string|Function; visible?: boolean; rotation?: number; format?: string; @@ -11783,7 +12970,7 @@ declare module kendo.dataviz.ui { border?: StockChartCategoryAxisItemTitleBorder; color?: string; font?: string; - margin?: any; + margin?: number|any; position?: string; rotation?: number; text?: string; @@ -11791,7 +12978,7 @@ declare module kendo.dataviz.ui { } interface StockChartCategoryAxisItem { - axisCrossingValue?: any; + axisCrossingValue?: any|Date|any; categories?: any; color?: string; field?: string; @@ -11834,7 +13021,7 @@ declare module kendo.dataviz.ui { opacity?: number; border?: StockChartChartAreaBorder; height?: number; - margin?: any; + margin?: number|any; width?: number; } @@ -11859,6 +13046,11 @@ declare module kendo.dataviz.ui { markers?: StockChartLegendInactiveItemsMarkers; } + interface StockChartLegendItem { + cursor?: string; + visual?: Function; + } + interface StockChartLegendLabels { color?: string; font?: string; @@ -11868,11 +13060,12 @@ declare module kendo.dataviz.ui { interface StockChartLegend { background?: string; border?: StockChartLegendBorder; + item?: StockChartLegendItem; labels?: StockChartLegendLabels; - margin?: any; + margin?: number|any; offsetX?: number; offsetY?: number; - padding?: any; + padding?: number|any; position?: string; reverse?: boolean; visible?: boolean; @@ -11909,7 +13102,7 @@ declare module kendo.dataviz.ui { font?: string; format?: string; padding?: StockChartNavigatorCategoryAxisItemCrosshairTooltipPadding; - template?: any; + template?: string|Function; visible?: boolean; } @@ -11963,7 +13156,7 @@ declare module kendo.dataviz.ui { rotation?: number; skip?: number; step?: number; - template?: any; + template?: string|Function; visible?: boolean; } @@ -12034,7 +13227,7 @@ declare module kendo.dataviz.ui { border?: StockChartNavigatorCategoryAxisItemNotesDataItemLabelBorder; color?: string; font?: string; - template?: any; + template?: string|Function; visible?: boolean; rotation?: number; format?: string; @@ -12080,7 +13273,7 @@ declare module kendo.dataviz.ui { border?: StockChartNavigatorCategoryAxisItemNotesLabelBorder; color?: string; font?: string; - template?: any; + template?: string|Function; visible?: boolean; rotation?: number; format?: string; @@ -12143,7 +13336,7 @@ declare module kendo.dataviz.ui { interface StockChartNavigatorCategoryAxisItem { autoBaseUnitSteps?: StockChartNavigatorCategoryAxisItemAutoBaseUnitSteps; - axisCrossingValue?: any; + axisCrossingValue?: any|Date|any; background?: string; baseUnit?: string; baseUnitStep?: any; @@ -12172,7 +13365,7 @@ declare module kendo.dataviz.ui { interface StockChartNavigatorHint { visible?: boolean; - template?: any; + template?: string|Function; format?: string; } @@ -12273,10 +13466,10 @@ declare module kendo.dataviz.ui { color?: string; font?: string; format?: string; - margin?: any; - padding?: any; + margin?: number|any; + padding?: number|any; position?: string; - template?: any; + template?: string|Function; visible?: boolean; } @@ -12294,7 +13487,7 @@ declare module kendo.dataviz.ui { interface StockChartNavigatorSeriesItemMarkers { background?: string; border?: StockChartNavigatorSeriesItemMarkersBorder; - rotation?: any; + rotation?: number|Function; size?: number; type?: string; visible?: boolean; @@ -12320,8 +13513,8 @@ declare module kendo.dataviz.ui { color?: string; font?: string; format?: string; - padding?: any; - template?: any; + padding?: number|any; + template?: string|Function; visible?: boolean; } @@ -12334,7 +13527,7 @@ declare module kendo.dataviz.ui { categoryField?: string; name?: string; highlight?: StockChartNavigatorSeriesItemHighlight; - aggregate?: any; + aggregate?: string|Function; axis?: string; border?: StockChartNavigatorSeriesItemBorder; closeField?: string; @@ -12387,7 +13580,7 @@ declare module kendo.dataviz.ui { border?: StockChartPaneTitleBorder; color?: string; font?: string; - margin?: any; + margin?: number|any; position?: string; text?: string; visible?: boolean; @@ -12395,8 +13588,8 @@ declare module kendo.dataviz.ui { interface StockChartPane { name?: string; - margin?: any; - padding?: any; + margin?: number|any; + padding?: number|any; background?: string; border?: StockChartPaneBorder; clip?: boolean; @@ -12405,10 +13598,10 @@ declare module kendo.dataviz.ui { } interface StockChartPdfMargin { - bottom?: any; - left?: any; - right?: any; - top?: any; + bottom?: number|string; + left?: number|string; + right?: number|string; + top?: number|string; } interface StockChartPdf { @@ -12420,7 +13613,7 @@ declare module kendo.dataviz.ui { keywords?: string; landscape?: boolean; margin?: StockChartPdfMargin; - paperSize?: any; + paperSize?: string|any; proxyURL?: string; proxyTarget?: string; subject?: string; @@ -12437,14 +13630,14 @@ declare module kendo.dataviz.ui { background?: string; opacity?: number; border?: StockChartPlotAreaBorder; - margin?: any; + margin?: number|any; } interface StockChartSeriesItemBorder { - color?: any; - dashType?: any; - opacity?: any; - width?: any; + color?: string|Function; + dashType?: string|Function; + opacity?: number|Function; + width?: number|Function; } interface StockChartSeriesItemHighlightBorder { @@ -12468,22 +13661,22 @@ declare module kendo.dataviz.ui { } interface StockChartSeriesItemLabelsBorder { - color?: any; - dashType?: any; - width?: any; + color?: string|Function; + dashType?: string|Function; + width?: number|Function; } interface StockChartSeriesItemLabels { - background?: any; + background?: string|Function; border?: StockChartSeriesItemLabelsBorder; - color?: any; - font?: any; - format?: any; - margin?: any; - padding?: any; - position?: any; - template?: any; - visible?: any; + color?: string|Function; + font?: string|Function; + format?: string|Function; + margin?: number|any; + padding?: number|any; + position?: string|Function; + template?: string|Function; + visible?: boolean|Function; } interface StockChartSeriesItemLine { @@ -12494,17 +13687,17 @@ declare module kendo.dataviz.ui { } interface StockChartSeriesItemMarkersBorder { - color?: any; - width?: any; + color?: string|Function; + width?: number|Function; } interface StockChartSeriesItemMarkers { - background?: any; + background?: string|Function; border?: StockChartSeriesItemMarkersBorder; - size?: any; - rotation?: any; - type?: any; - visible?: any; + size?: number|Function; + rotation?: number|Function; + type?: string|Function; + visible?: boolean|Function; } interface StockChartSeriesItemNotesIconBorder { @@ -12531,7 +13724,7 @@ declare module kendo.dataviz.ui { border?: StockChartSeriesItemNotesLabelBorder; color?: string; font?: string; - template?: any; + template?: string|Function; visible?: boolean; rotation?: number; format?: string; @@ -12561,18 +13754,18 @@ declare module kendo.dataviz.ui { } interface StockChartSeriesItemTargetBorder { - color?: any; - dashType?: any; - width?: any; + color?: string|Function; + dashType?: string|Function; + width?: number|Function; } interface StockChartSeriesItemTargetLine { - width?: any; + width?: any|Function; } interface StockChartSeriesItemTarget { line?: StockChartSeriesItemTargetLine; - color?: any; + color?: string|Function; border?: StockChartSeriesItemTargetBorder; } @@ -12587,8 +13780,8 @@ declare module kendo.dataviz.ui { color?: string; font?: string; format?: string; - padding?: any; - template?: any; + padding?: number|any; + template?: string|Function; visible?: boolean; } @@ -12603,13 +13796,13 @@ declare module kendo.dataviz.ui { targetField?: string; name?: string; highlight?: StockChartSeriesItemHighlight; - aggregate?: any; + aggregate?: string|Function; axis?: string; border?: StockChartSeriesItemBorder; closeField?: string; - color?: any; + color?: string|Function; colorField?: string; - downColor?: any; + downColor?: string|Function; downColorField?: string; gap?: number; labels?: StockChartSeriesItemLabels; @@ -12650,9 +13843,9 @@ declare module kendo.dataviz.ui { color?: string; font?: string; format?: string; - margin?: any; - padding?: any; - template?: any; + margin?: number|any; + padding?: number|any; + template?: string|Function; visible?: boolean; } @@ -12671,8 +13864,8 @@ declare module kendo.dataviz.ui { color?: string; font?: string; format?: string; - padding?: any; - template?: any; + padding?: number|any; + template?: string|Function; visible?: boolean; } @@ -12705,8 +13898,8 @@ declare module kendo.dataviz.ui { border?: StockChartTitleBorder; font?: string; color?: string; - margin?: any; - padding?: any; + margin?: number|any; + padding?: number|any; position?: string; text?: string; visible?: boolean; @@ -12723,8 +13916,8 @@ declare module kendo.dataviz.ui { color?: string; font?: string; format?: string; - padding?: any; - template?: any; + padding?: number|any; + template?: string|Function; visible?: boolean; shared?: boolean; sharedTemplate?: string; @@ -12741,8 +13934,8 @@ declare module kendo.dataviz.ui { color?: string; font?: string; format?: string; - padding?: any; - template?: any; + padding?: number|any; + template?: string|Function; visible?: boolean; } @@ -12767,13 +13960,13 @@ declare module kendo.dataviz.ui { color?: string; font?: string; format?: string; - margin?: any; + margin?: number|any; mirror?: boolean; - padding?: any; + padding?: number|any; rotation?: number; skip?: number; step?: number; - template?: any; + template?: string|Function; visible?: boolean; } @@ -12843,7 +14036,7 @@ declare module kendo.dataviz.ui { border?: StockChartValueAxisItemNotesDataItemLabelBorder; color?: string; font?: string; - template?: any; + template?: string|Function; visible?: boolean; rotation?: number; format?: string; @@ -12889,7 +14082,7 @@ declare module kendo.dataviz.ui { border?: StockChartValueAxisItemNotesLabelBorder; color?: string; font?: string; - template?: any; + template?: string|Function; visible?: boolean; rotation?: number; format?: string; @@ -12928,8 +14121,8 @@ declare module kendo.dataviz.ui { border?: StockChartValueAxisItemTitleBorder; color?: string; font?: string; - margin?: any; - padding?: any; + margin?: number|any; + padding?: number|any; position?: string; rotation?: number; text?: string; @@ -12937,7 +14130,7 @@ declare module kendo.dataviz.ui { } interface StockChartValueAxisItem { - axisCrossingValue?: any; + axisCrossingValue?: any|Date|any; background?: string; color?: string; labels?: StockChartValueAxisItemLabels; @@ -12971,14 +14164,14 @@ declare module kendo.dataviz.ui { } interface StockChartSeriesClickEventSeries { - type?: any; - name?: any; + type?: string; + name?: string; data?: any; } interface StockChartSeriesHoverEventSeries { - type?: any; - name?: any; + type?: string; + name?: string; data?: any; } @@ -13026,8 +14219,8 @@ declare module kendo.dataviz.ui { } interface StockChartEvent { sender: StockChart; - isDefaultPrevented(): boolean; preventDefault: Function; + isDefaultPrevented(): boolean; } interface StockChartAxisLabelClickEvent extends StockChartEvent { @@ -13148,38 +14341,46 @@ declare module kendo.dataviz.ui { class TreeMap extends kendo.ui.Widget { + static fn: TreeMap; - static extend(proto: Object): TreeMap; + + options: TreeMapOptions; + + dataSource: kendo.data.DataSource; element: JQuery; wrapper: JQuery; + + static extend(proto: Object): TreeMap; + constructor(element: Element, options?: TreeMapOptions); - options: TreeMapOptions; - dataSource: kendo.data.DataSource; + + + } interface TreeMapOptions { name?: string; - dataSource?: any; + dataSource?: any|any|kendo.data.HierarchicalDataSource; autoBind?: boolean; type?: string; theme?: string; valueField?: string; colorField?: string; textField?: string; - template?: any; + template?: string|Function; colors?: any; itemCreated?(e: TreeMapItemCreatedEvent): void; dataBound?(e: TreeMapDataBoundEvent): void; } interface TreeMapEvent { sender: TreeMap; - isDefaultPrevented(): boolean; preventDefault: Function; + isDefaultPrevented(): boolean; } interface TreeMapItemCreatedEvent extends TreeMapEvent { - element?: any; + element?: JQuery|Element; } interface TreeMapDataBoundEvent extends TreeMapEvent { @@ -13189,7 +14390,13 @@ declare module kendo.dataviz.ui { } declare module kendo.dataviz { class ChartAxis extends Observable { + + options: ChartAxisOptions; + + + + range(): any; slot(from: string, to?: string): kendo.geometry.Rect; slot(from: string, to?: number): kendo.geometry.Rect; @@ -13200,6 +14407,7 @@ declare module kendo.dataviz { slot(from: Date, to?: string): kendo.geometry.Rect; slot(from: Date, to?: number): kendo.geometry.Rect; slot(from: Date, to?: Date): kendo.geometry.Rect; + } interface ChartAxisOptions { @@ -13207,23 +14415,49 @@ declare module kendo.dataviz { } interface ChartAxisEvent { sender: ChartAxis; - isDefaultPrevented(): boolean; preventDefault: Function; + isDefaultPrevented(): boolean; } } declare module kendo.dataviz.diagram { class Circle extends Observable { - constructor(options?: CircleOptions); + + options: CircleOptions; + + + constructor(options?: CircleOptions); + + + position(): void; + position(offset: kendo.dataviz.diagram.Point): void; + rotate(angle: number, center: kendo.dataviz.diagram.Point): void; visible(): boolean; visible(visible: boolean): void; + + } + + interface CircleFillGradientStop { + offset?: number; + color?: string; + opacity?: number; + } + + interface CircleFillGradient { + type?: string; + center?: any; + radius?: number; + start?: any; + end?: any; + stops?: CircleFillGradientStop[]; } interface CircleFill { color?: string; opacity?: number; + gradient?: CircleFillGradient; } interface CircleStroke { @@ -13240,14 +14474,20 @@ declare module kendo.dataviz.diagram { } interface CircleEvent { sender: Circle; - isDefaultPrevented(): boolean; preventDefault: Function; + isDefaultPrevented(): boolean; } class Connection extends Observable { - constructor(options?: ConnectionOptions); + + options: ConnectionOptions; + + + constructor(options?: ConnectionOptions); + + source(): any; source(source: kendo.dataviz.diagram.Shape): void; source(source: kendo.dataviz.diagram.Point): void; @@ -13264,6 +14504,13 @@ declare module kendo.dataviz.diagram { points(): any; allPoints(): any; redraw(): void; + + } + + interface ConnectionContent { + template?: string|Function; + text?: string; + visual?: Function; } interface ConnectionEndCapFill { @@ -13317,24 +14564,35 @@ declare module kendo.dataviz.diagram { interface ConnectionOptions { name?: string; + content?: ConnectionContent; + fromConnector?: string; stroke?: ConnectionStroke; hover?: ConnectionHover; startCap?: ConnectionStartCap; endCap?: ConnectionEndCap; points?: ConnectionPoint[]; selectable?: boolean; + toConnector?: string; + type?: string; } interface ConnectionEvent { sender: Connection; - isDefaultPrevented(): boolean; preventDefault: Function; + isDefaultPrevented(): boolean; } class Connector extends Observable { - constructor(options?: ConnectorOptions); + + options: ConnectorOptions; + + + constructor(options?: ConnectorOptions); + + position(): kendo.dataviz.diagram.Point; + } interface ConnectorFill { @@ -13350,19 +14608,29 @@ declare module kendo.dataviz.diagram { } interface ConnectorEvent { sender: Connector; - isDefaultPrevented(): boolean; preventDefault: Function; + isDefaultPrevented(): boolean; } class Group extends Observable { - constructor(options?: GroupOptions); + + options: GroupOptions; + + + constructor(options?: GroupOptions); + + append(element: any): void; clear(): void; remove(element: any): void; + position(): void; + position(offset: kendo.dataviz.diagram.Point): void; + rotate(angle: number, center: kendo.dataviz.diagram.Point): void; visible(): boolean; visible(visible: boolean): void; + } interface GroupOptions { @@ -13372,16 +14640,26 @@ declare module kendo.dataviz.diagram { } interface GroupEvent { sender: Group; - isDefaultPrevented(): boolean; preventDefault: Function; + isDefaultPrevented(): boolean; } class Image extends Observable { - constructor(options?: ImageOptions); + + options: ImageOptions; + + + constructor(options?: ImageOptions); + + + position(): void; + position(offset: kendo.dataviz.diagram.Point): void; + rotate(angle: number, center: kendo.dataviz.diagram.Point): void; visible(): boolean; visible(visible: boolean): void; + } interface ImageOptions { @@ -13394,16 +14672,63 @@ declare module kendo.dataviz.diagram { } interface ImageEvent { sender: Image; - isDefaultPrevented(): boolean; preventDefault: Function; + isDefaultPrevented(): boolean; + } + + + class Layout extends Observable { + + + options: LayoutOptions; + + + constructor(rect: kendo.dataviz.diagram.Rect, options?: LayoutOptions); + + + append(element: any): void; + clear(): void; + rect(): kendo.dataviz.diagram.Rect; + rect(rect: kendo.dataviz.diagram.Rect): void; + reflow(): void; + remove(element: any): void; + visible(): boolean; + visible(visible: boolean): void; + + } + + interface LayoutOptions { + name?: string; + alignContent?: string; + alignItems?: string; + justifyContent?: string; + lineSpacing?: number; + spacing?: number; + orientation?: string; + wrap?: boolean; + } + interface LayoutEvent { + sender: Layout; + preventDefault: Function; + isDefaultPrevented(): boolean; } class Line extends Observable { - constructor(options?: LineOptions); + + options: LineOptions; + + + constructor(options?: LineOptions); + + + position(): void; + position(offset: kendo.dataviz.diagram.Point): void; + rotate(angle: number, center: kendo.dataviz.diagram.Point): void; visible(): boolean; visible(visible: boolean): void; + } interface LineStroke { @@ -13419,14 +14744,21 @@ declare module kendo.dataviz.diagram { } interface LineEvent { sender: Line; - isDefaultPrevented(): boolean; preventDefault: Function; + isDefaultPrevented(): boolean; } class Point extends Observable { - constructor(options?: PointOptions); + + options: PointOptions; + + + constructor(options?: PointOptions); + + + } interface PointOptions { @@ -13436,14 +14768,26 @@ declare module kendo.dataviz.diagram { } interface PointEvent { sender: Point; - isDefaultPrevented(): boolean; preventDefault: Function; + isDefaultPrevented(): boolean; } class Rect extends Observable { - constructor(options?: RectOptions); + + options: RectOptions; + + + constructor(options?: RectOptions); + + + position(): void; + position(offset: kendo.dataviz.diagram.Point): void; + rotate(angle: number, center: kendo.dataviz.diagram.Point): void; + visible(): boolean; + visible(visible: boolean): void; + } interface RectOptions { @@ -13455,21 +14799,44 @@ declare module kendo.dataviz.diagram { } interface RectEvent { sender: Rect; - isDefaultPrevented(): boolean; preventDefault: Function; + isDefaultPrevented(): boolean; } class Rectangle extends Observable { - constructor(options?: RectangleOptions); + + options: RectangleOptions; + + + constructor(options?: RectangleOptions); + + visible(): boolean; visible(visible: boolean): void; + + } + + interface RectangleFillGradientStop { + offset?: number; + color?: string; + opacity?: number; + } + + interface RectangleFillGradient { + type?: string; + center?: any; + radius?: number; + start?: any; + end?: any; + stops?: RectangleFillGradientStop[]; } interface RectangleFill { color?: string; opacity?: number; + gradient?: RectangleFillGradient; } interface RectangleStroke { @@ -13488,14 +14855,20 @@ declare module kendo.dataviz.diagram { } interface RectangleEvent { sender: Rectangle; - isDefaultPrevented(): boolean; preventDefault: Function; + isDefaultPrevented(): boolean; } class Shape extends Observable { - constructor(options?: ShapeOptions); + + options: ShapeOptions; + + + constructor(options?: ShapeOptions); + + position(): void; position(point: kendo.dataviz.diagram.Point): void; clone(): kendo.dataviz.diagram.Shape; @@ -13504,6 +14877,7 @@ declare module kendo.dataviz.diagram { getConnector(): void; getPosition(side: string): void; redraw(): void; + } interface ShapeConnector { @@ -13521,9 +14895,25 @@ declare module kendo.dataviz.diagram { connect?: boolean; } + interface ShapeFillGradientStop { + offset?: number; + color?: string; + opacity?: number; + } + + interface ShapeFillGradient { + type?: string; + center?: any; + radius?: number; + start?: any; + end?: any; + stops?: ShapeFillGradientStop[]; + } + interface ShapeFill { color?: string; opacity?: number; + gradient?: ShapeFillGradient; } interface ShapeHoverFill { @@ -13568,18 +14958,28 @@ declare module kendo.dataviz.diagram { } interface ShapeEvent { sender: Shape; - isDefaultPrevented(): boolean; preventDefault: Function; + isDefaultPrevented(): boolean; } class TextBlock extends Observable { - constructor(options?: TextBlockOptions); + + options: TextBlockOptions; + + + constructor(options?: TextBlockOptions); + + content(): string; content(content: string): void; + position(): void; + position(offset: kendo.dataviz.diagram.Point): void; + rotate(angle: number, center: kendo.dataviz.diagram.Point): void; visible(): boolean; visible(visible: boolean): void; + } interface TextBlockOptions { @@ -13595,17 +14995,31 @@ declare module kendo.dataviz.diagram { } interface TextBlockEvent { sender: TextBlock; - isDefaultPrevented(): boolean; preventDefault: Function; + isDefaultPrevented(): boolean; } } declare module kendo { class Color extends Observable { + + options: ColorOptions; + + + + diff(): number; equals(): boolean; + toHSV(): any; + toRGB(): any; + toBytes(): any; + toHex(): string; + toCss(): string; + toCssRgba(): string; + toDisplay(): string; + } interface ColorOptions { @@ -13613,14 +15027,14 @@ declare module kendo { } interface ColorEvent { sender: Color; - isDefaultPrevented(): boolean; preventDefault: Function; + isDefaultPrevented(): boolean; } module drawing { function align(elements: any, rect: kendo.geometry.Rect, alignment: string): void; - function drawDOM(element: JQuery): JQueryPromise; + function drawDOM(element: JQuery, options: any): JQueryPromise; function exportImage(group: kendo.drawing.Group, options: any): JQueryPromise; function exportPDF(group: kendo.drawing.Group, options: kendo.drawing.PDFOptions): JQueryPromise; function exportSVG(group: kendo.drawing.Group, options: any): JQueryPromise; @@ -13639,6 +15053,7 @@ declare module kendo { function transformOrigin(firstElement: HTMLElement, secondElement: HTMLElement): any; } + function antiForgeryTokens(): any; function bind(element: string, viewModel: any, namespace?: any): void; function bind(element: string, viewModel: kendo.data.ObservableObject, namespace?: any): void; function bind(element: JQuery, viewModel: any, namespace?: any): void; @@ -13671,11 +15086,218 @@ declare module kendo { function unbind(element: JQuery): void; function unbind(element: Element): void; +} +declare module kendo.spreadsheet { + class CustomFilter extends Observable { + + + options: CustomFilterOptions; + + + + + init(options: any): void; + + } + + interface CustomFilterOptions { + name?: string; + } + interface CustomFilterEvent { + sender: CustomFilter; + preventDefault: Function; + isDefaultPrevented(): boolean; + } + + + class DynamicFilter extends Observable { + + + options: DynamicFilterOptions; + + + + + init(options: any): void; + + } + + interface DynamicFilterOptions { + name?: string; + } + interface DynamicFilterEvent { + sender: DynamicFilter; + preventDefault: Function; + isDefaultPrevented(): boolean; + } + + + class Range extends Observable { + + + options: RangeOptions; + + + + + borderBottom(): any; + borderBottom(value?: any): void; + borderLeft(): any; + borderLeft(value?: any): void; + borderRight(): any; + borderRight(value?: any): void; + borderTop(): any; + borderTop(value?: any): void; + clear(options?: any): void; + clearFilter(indices: any): void; + clearFilter(indices: number): void; + filter(filter: boolean): void; + filter(filter: any): void; + format(): string; + format(format?: string): void; + formula(): string; + formula(formula?: string): void; + hasFilter(): boolean; + input(): any; + input(value?: string): void; + input(value?: number): void; + input(value?: Date): void; + isSortable(): boolean; + isFilterable(): boolean; + merge(): void; + select(): void; + sort(sort: number): void; + sort(sort: any): void; + unmerge(): void; + values(values: any): void; + validation(): any; + validation(value?: any): void; + value(): any; + value(value?: string): void; + value(value?: number): void; + value(value?: Date): void; + wrap(): boolean; + wrap(value?: boolean): void; + + } + + interface RangeOptions { + name?: string; + } + interface RangeEvent { + sender: Range; + preventDefault: Function; + isDefaultPrevented(): boolean; + } + + + class Sheet extends Observable { + + + options: SheetOptions; + + + + + clearFilter(indexes: number): void; + clearFilter(indexes: any): void; + columnWidth(): void; + columnWidth(index: number, width?: number): void; + deleteColumn(index: number): void; + fromJSON(data: any): void; + frozenColumns(): number; + frozenColumns(count?: number): void; + frozenRows(): number; + frozenRows(count?: number): void; + hideColumn(index: number): void; + hideRow(index: number): void; + insertColumn(index: number): void; + insertRow(index: number): void; + range(ref: string): kendo.spreadsheet.Range; + rowHeight(): void; + rowHeight(index: number, width?: number): void; + selection(): kendo.spreadsheet.Range; + toJSON(): void; + unhideColumn(index: number): void; + unhideRow(index: number): void; + + } + + interface SheetOptions { + name?: string; + change?(e: SheetChangeEvent): void; + } + interface SheetEvent { + sender: Sheet; + preventDefault: Function; + isDefaultPrevented(): boolean; + } + + interface SheetChangeEvent extends SheetEvent { + } + + + class TopFilter extends Observable { + + + options: TopFilterOptions; + + + + + init(options: any): void; + + } + + interface TopFilterOptions { + name?: string; + } + interface TopFilterEvent { + sender: TopFilter; + preventDefault: Function; + isDefaultPrevented(): boolean; + } + + + class ValueFilter extends Observable { + + + options: ValueFilterOptions; + + + + + init(options: any): void; + + } + + interface ValueFilterOptions { + name?: string; + } + interface ValueFilterEvent { + sender: ValueFilter; + preventDefault: Function; + isDefaultPrevented(): boolean; + } + + } declare module kendo.dataviz.map { class Extent extends kendo.Class { - constructor(nw: kendo.dataviz.map.Location, se: kendo.dataviz.map.Location); + + options: ExtentOptions; + + nw: kendo.dataviz.map.Location; + se: kendo.dataviz.map.Location; + + constructor(nw: kendo.dataviz.map.Location, se: kendo.dataviz.map.Location); + + static create(a: kendo.dataviz.map.Location, b?: kendo.dataviz.map.Location): kendo.dataviz.map.Extent; + static create(a: kendo.dataviz.map.Location, b?: any): kendo.dataviz.map.Extent; + static create(a: any, b?: kendo.dataviz.map.Location): kendo.dataviz.map.Extent; + static create(a: any, b?: any): kendo.dataviz.map.Extent; + contains(location: kendo.dataviz.map.Location): boolean; containsAny(locations: any): boolean; center(): kendo.dataviz.map.Location; @@ -13684,12 +15306,7 @@ declare module kendo.dataviz.map { edges(): any; toArray(): any; overlaps(extent: kendo.dataviz.map.Extent): boolean; - static create(a: kendo.dataviz.map.Location, b?: kendo.dataviz.map.Location): kendo.dataviz.map.Extent; - static create(a: kendo.dataviz.map.Location, b?: any): kendo.dataviz.map.Extent; - static create(a: any, b?: kendo.dataviz.map.Location): kendo.dataviz.map.Extent; - static create(a: any, b?: any): kendo.dataviz.map.Extent; - nw: kendo.dataviz.map.Location; - se: kendo.dataviz.map.Location; + } interface ExtentOptions { @@ -13697,17 +15314,24 @@ declare module kendo.dataviz.map { } interface ExtentEvent { sender: Extent; - isDefaultPrevented(): boolean; preventDefault: Function; + isDefaultPrevented(): boolean; } class Layer extends kendo.Class { - constructor(map: kendo.dataviz.ui.Map, options?: LayerOptions); + + options: LayerOptions; + + map: kendo.dataviz.ui.Map; + + constructor(map: kendo.dataviz.ui.Map, options?: LayerOptions); + + show(): void; hide(): void; - map: kendo.dataviz.ui.Map; + } interface LayerOptions { @@ -13715,14 +15339,27 @@ declare module kendo.dataviz.map { } interface LayerEvent { sender: Layer; - isDefaultPrevented(): boolean; preventDefault: Function; + isDefaultPrevented(): boolean; } class Location extends kendo.Class { - constructor(lat: number, lng: number); + + options: LocationOptions; + + lat: number; + lng: number; + + constructor(lat: number, lng: number); + + static create(lat: number, lng?: number): kendo.dataviz.map.Location; + static create(lat: any, lng?: number): kendo.dataviz.map.Location; + static create(lat: kendo.dataviz.map.Location, lng?: number): kendo.dataviz.map.Location; + static fromLngLat(lnglat: any): kendo.dataviz.map.Location; + static fromLatLng(lnglat: any): kendo.dataviz.map.Location; + clone(): kendo.dataviz.map.Location; destination(destination: kendo.dataviz.map.Location): number; distanceTo(distance: number, bearing: number): kendo.dataviz.map.Location; @@ -13731,13 +15368,7 @@ declare module kendo.dataviz.map { toArray(): any; toString(): string; wrap(): kendo.dataviz.map.Location; - static create(lat: number, lng?: number): kendo.dataviz.map.Location; - static create(lat: any, lng?: number): kendo.dataviz.map.Location; - static create(lat: kendo.dataviz.map.Location, lng?: number): kendo.dataviz.map.Location; - static fromLngLat(lnglat: any): kendo.dataviz.map.Location; - static fromLatLng(lnglat: any): kendo.dataviz.map.Location; - lat: number; - lng: number; + } interface LocationOptions { @@ -13745,30 +15376,90 @@ declare module kendo.dataviz.map { } interface LocationEvent { sender: Location; - isDefaultPrevented(): boolean; preventDefault: Function; + isDefaultPrevented(): boolean; + } + + + class MarkerLayer extends kendo.dataviz.map.Layer { + + + options: MarkerLayerOptions; + + map: kendo.dataviz.ui.Map; + + constructor(map: kendo.dataviz.ui.Map, options?: MarkerLayerOptions); + + + show(): void; + hide(): void; + setDataSource(): void; + + } + + interface MarkerLayerOptions { + name?: string; + } + interface MarkerLayerEvent { + sender: MarkerLayer; + preventDefault: Function; + isDefaultPrevented(): boolean; + } + + + class ShapeLayer extends kendo.dataviz.map.Layer { + + + options: ShapeLayerOptions; + + map: kendo.dataviz.ui.Map; + + constructor(map: kendo.dataviz.ui.Map, options?: ShapeLayerOptions); + + + show(): void; + hide(): void; + setDataSource(): void; + + } + + interface ShapeLayerOptions { + name?: string; + } + interface ShapeLayerEvent { + sender: ShapeLayer; + preventDefault: Function; + isDefaultPrevented(): boolean; } } declare module kendo.mobile.ui { class ActionSheet extends kendo.mobile.ui.Widget { + static fn: ActionSheet; - static extend(proto: Object): ActionSheet; + + options: ActionSheetOptions; + element: JQuery; wrapper: JQuery; + + static extend(proto: Object): ActionSheet; + constructor(element: Element, options?: ActionSheetOptions); - options: ActionSheetOptions; + + close(): void; destroy(): void; open(target: JQuery, context: any): void; + } interface ActionSheetPopup { - direction?: any; - height?: any; - width?: any; + direction?: number|string; + height?: number|string; + width?: number|string; } interface ActionSheetOptions { @@ -13781,8 +15472,8 @@ declare module kendo.mobile.ui { } interface ActionSheetEvent { sender: ActionSheet; - isDefaultPrevented(): boolean; preventDefault: Function; + isDefaultPrevented(): boolean; } interface ActionSheetOpenEvent extends ActionSheetEvent { @@ -13792,14 +15483,22 @@ declare module kendo.mobile.ui { class BackButton extends kendo.mobile.ui.Widget { + static fn: BackButton; - static extend(proto: Object): BackButton; + + options: BackButtonOptions; + element: JQuery; wrapper: JQuery; + + static extend(proto: Object): BackButton; + constructor(element: Element, options?: BackButtonOptions); - options: BackButtonOptions; + + destroy(): void; + } interface BackButtonOptions { @@ -13808,8 +15507,8 @@ declare module kendo.mobile.ui { } interface BackButtonEvent { sender: BackButton; - isDefaultPrevented(): boolean; preventDefault: Function; + isDefaultPrevented(): boolean; } interface BackButtonClickEvent extends BackButtonEvent { @@ -13819,17 +15518,25 @@ declare module kendo.mobile.ui { class Button extends kendo.mobile.ui.Widget { + static fn: Button; - static extend(proto: Object): Button; + + options: ButtonOptions; + element: JQuery; wrapper: JQuery; + + static extend(proto: Object): Button; + constructor(element: Element, options?: ButtonOptions); - options: ButtonOptions; + + badge(value: string): string; badge(value: boolean): string; destroy(): void; enable(enable: boolean): void; + } interface ButtonOptions { @@ -13842,8 +15549,8 @@ declare module kendo.mobile.ui { } interface ButtonEvent { sender: Button; - isDefaultPrevented(): boolean; preventDefault: Function; + isDefaultPrevented(): boolean; } interface ButtonClickEvent extends ButtonEvent { @@ -13853,13 +15560,20 @@ declare module kendo.mobile.ui { class ButtonGroup extends kendo.mobile.ui.Widget { + static fn: ButtonGroup; - static extend(proto: Object): ButtonGroup; + + options: ButtonGroupOptions; + element: JQuery; wrapper: JQuery; + + static extend(proto: Object): ButtonGroup; + constructor(element: Element, options?: ButtonGroupOptions); - options: ButtonGroupOptions; + + badge(button: string, value: string): string; badge(button: string, value: boolean): string; badge(button: number, value: string): string; @@ -13869,6 +15583,7 @@ declare module kendo.mobile.ui { enable(enable: boolean): void; select(li: JQuery): void; select(li: number): void; + } interface ButtonGroupOptions { @@ -13880,8 +15595,8 @@ declare module kendo.mobile.ui { } interface ButtonGroupEvent { sender: ButtonGroup; - isDefaultPrevented(): boolean; preventDefault: Function; + isDefaultPrevented(): boolean; } interface ButtonGroupSelectEvent extends ButtonGroupEvent { @@ -13890,18 +15605,26 @@ declare module kendo.mobile.ui { class Collapsible extends kendo.mobile.ui.Widget { + static fn: Collapsible; - static extend(proto: Object): Collapsible; + + options: CollapsibleOptions; + element: JQuery; wrapper: JQuery; + + static extend(proto: Object): Collapsible; + constructor(element: Element, options?: CollapsibleOptions); - options: CollapsibleOptions; + + collapse(instant: boolean): void; destroy(): void; expand(instant?: boolean): void; resize(): void; toggle(instant?: boolean): void; + } interface CollapsibleOptions { @@ -13916,20 +15639,28 @@ declare module kendo.mobile.ui { } interface CollapsibleEvent { sender: Collapsible; - isDefaultPrevented(): boolean; preventDefault: Function; + isDefaultPrevented(): boolean; } class DetailButton extends kendo.mobile.ui.Widget { + static fn: DetailButton; - static extend(proto: Object): DetailButton; + + options: DetailButtonOptions; + element: JQuery; wrapper: JQuery; + + static extend(proto: Object): DetailButton; + constructor(element: Element, options?: DetailButtonOptions); - options: DetailButtonOptions; + + destroy(): void; + } interface DetailButtonOptions { @@ -13938,8 +15669,8 @@ declare module kendo.mobile.ui { } interface DetailButtonEvent { sender: DetailButton; - isDefaultPrevented(): boolean; preventDefault: Function; + isDefaultPrevented(): boolean; } interface DetailButtonClickEvent extends DetailButtonEvent { @@ -13949,16 +15680,24 @@ declare module kendo.mobile.ui { class Drawer extends kendo.mobile.ui.Widget { + static fn: Drawer; - static extend(proto: Object): Drawer; + + options: DrawerOptions; + element: JQuery; wrapper: JQuery; + + static extend(proto: Object): Drawer; + constructor(element: Element, options?: DrawerOptions); - options: DrawerOptions; + + destroy(): void; hide(): void; show(): void; + } interface DrawerOptions { @@ -13977,8 +15716,8 @@ declare module kendo.mobile.ui { } interface DrawerEvent { sender: Drawer; - isDefaultPrevented(): boolean; preventDefault: Function; + isDefaultPrevented(): boolean; } interface DrawerAfterHideEvent extends DrawerEvent { @@ -13995,13 +15734,21 @@ declare module kendo.mobile.ui { class Layout extends kendo.mobile.ui.Widget { + static fn: Layout; - static extend(proto: Object): Layout; + + options: LayoutOptions; + element: JQuery; wrapper: JQuery; + + static extend(proto: Object): Layout; + constructor(element: Element, options?: LayoutOptions); - options: LayoutOptions; + + + } interface LayoutOptions { @@ -14014,8 +15761,8 @@ declare module kendo.mobile.ui { } interface LayoutEvent { sender: Layout; - isDefaultPrevented(): boolean; preventDefault: Function; + isDefaultPrevented(): boolean; } interface LayoutHideEvent extends LayoutEvent { @@ -14034,14 +15781,21 @@ declare module kendo.mobile.ui { class ListView extends kendo.mobile.ui.Widget { + static fn: ListView; - static extend(proto: Object): ListView; + + options: ListViewOptions; + + dataSource: kendo.data.DataSource; element: JQuery; wrapper: JQuery; + + static extend(proto: Object): ListView; + constructor(element: Element, options?: ListViewOptions); - options: ListViewOptions; - dataSource: kendo.data.DataSource; + + append(dataItems: any): void; prepend(dataItems: any): void; replace(dataItems: any): void; @@ -14051,6 +15805,7 @@ declare module kendo.mobile.ui { items(): JQuery; refresh(): void; setDataSource(dataSource: kendo.data.DataSource): void; + } interface ListViewFilterable { @@ -14072,16 +15827,16 @@ declare module kendo.mobile.ui { name?: string; appendOnRefresh?: boolean; autoBind?: boolean; - dataSource?: any; + dataSource?: kendo.data.DataSource|any; endlessScroll?: boolean; fixedHeaders?: boolean; - headerTemplate?: any; + headerTemplate?: string|Function; loadMore?: boolean; messages?: ListViewMessages; pullToRefresh?: boolean; pullParameters?: Function; style?: string; - template?: any; + template?: string|Function; type?: string; filterable?: ListViewFilterable; virtualViewSize?: number; @@ -14092,8 +15847,8 @@ declare module kendo.mobile.ui { } interface ListViewEvent { sender: ListView; - isDefaultPrevented(): boolean; preventDefault: Function; + isDefaultPrevented(): boolean; } interface ListViewClickEvent extends ListViewEvent { @@ -14105,15 +15860,23 @@ declare module kendo.mobile.ui { class Loader extends kendo.mobile.ui.Widget { + static fn: Loader; - static extend(proto: Object): Loader; + + options: LoaderOptions; + element: JQuery; wrapper: JQuery; + + static extend(proto: Object): Loader; + constructor(element: Element, options?: LoaderOptions); - options: LoaderOptions; + + hide(): void; show(): void; + } interface LoaderOptions { @@ -14121,22 +15884,30 @@ declare module kendo.mobile.ui { } interface LoaderEvent { sender: Loader; - isDefaultPrevented(): boolean; preventDefault: Function; + isDefaultPrevented(): boolean; } class ModalView extends kendo.mobile.ui.Widget { + static fn: ModalView; - static extend(proto: Object): ModalView; + + options: ModalViewOptions; + element: JQuery; wrapper: JQuery; + + static extend(proto: Object): ModalView; + constructor(element: Element, options?: ModalViewOptions); - options: ModalViewOptions; + + close(): void; destroy(): void; open(target: JQuery): void; + } interface ModalViewOptions { @@ -14151,8 +15922,8 @@ declare module kendo.mobile.ui { } interface ModalViewEvent { sender: ModalView; - isDefaultPrevented(): boolean; preventDefault: Function; + isDefaultPrevented(): boolean; } interface ModalViewBeforeOpenEvent extends ModalViewEvent { @@ -14171,15 +15942,23 @@ declare module kendo.mobile.ui { class NavBar extends kendo.mobile.ui.Widget { + static fn: NavBar; - static extend(proto: Object): NavBar; + + options: NavBarOptions; + element: JQuery; wrapper: JQuery; + + static extend(proto: Object): NavBar; + constructor(element: Element, options?: NavBarOptions); - options: NavBarOptions; + + destroy(): void; title(value: string): void; + } interface NavBarOptions { @@ -14187,26 +15966,33 @@ declare module kendo.mobile.ui { } interface NavBarEvent { sender: NavBar; - isDefaultPrevented(): boolean; preventDefault: Function; + isDefaultPrevented(): boolean; } class Pane extends kendo.mobile.ui.Widget { + static fn: Pane; - static extend(proto: Object): Pane; + + options: PaneOptions; + element: JQuery; wrapper: JQuery; + + static extend(proto: Object): Pane; + constructor(element: Element, options?: PaneOptions); - options: PaneOptions; + + destroy(): void; hideLoading(): void; navigate(url: string, transition: string): void; replace(url: string, transition: string): void; - Example(): void; showLoading(): void; view(): kendo.mobile.ui.View; + } interface PaneOptions { @@ -14222,8 +16008,8 @@ declare module kendo.mobile.ui { } interface PaneEvent { sender: Pane; - isDefaultPrevented(): boolean; preventDefault: Function; + isDefaultPrevented(): boolean; } interface PaneNavigateEvent extends PaneEvent { @@ -14236,16 +16022,24 @@ declare module kendo.mobile.ui { class PopOver extends kendo.mobile.ui.Widget { + static fn: PopOver; - static extend(proto: Object): PopOver; + + options: PopOverOptions; + element: JQuery; wrapper: JQuery; + + static extend(proto: Object): PopOver; + constructor(element: Element, options?: PopOverOptions); - options: PopOverOptions; + + close(): void; destroy(): void; open(target: JQuery): void; + } interface PopOverPane { @@ -14256,8 +16050,8 @@ declare module kendo.mobile.ui { } interface PopOverPopup { - height?: any; - width?: any; + height?: number|string; + width?: number|string; } interface PopOverOptions { @@ -14269,8 +16063,8 @@ declare module kendo.mobile.ui { } interface PopOverEvent { sender: PopOver; - isDefaultPrevented(): boolean; preventDefault: Function; + isDefaultPrevented(): boolean; } interface PopOverCloseEvent extends PopOverEvent { @@ -14282,14 +16076,21 @@ declare module kendo.mobile.ui { class ScrollView extends kendo.mobile.ui.Widget { + static fn: ScrollView; - static extend(proto: Object): ScrollView; + + options: ScrollViewOptions; + + dataSource: kendo.data.DataSource; element: JQuery; wrapper: JQuery; + + static extend(proto: Object): ScrollView; + constructor(element: Element, options?: ScrollViewOptions); - options: ScrollViewOptions; - dataSource: kendo.data.DataSource; + + content(content: string): void; content(content: JQuery): void; destroy(): void; @@ -14299,14 +16100,15 @@ declare module kendo.mobile.ui { scrollTo(page: number, instant: boolean): void; setDataSource(dataSource: kendo.data.DataSource): void; value(dataItem: any): any; + } interface ScrollViewOptions { name?: string; autoBind?: boolean; bounceVelocityThreshold?: number; - contentHeight?: any; - dataSource?: any; + contentHeight?: number|string; + dataSource?: kendo.data.DataSource|any; duration?: number; emptyTemplate?: string; enablePager?: boolean; @@ -14321,8 +16123,8 @@ declare module kendo.mobile.ui { } interface ScrollViewEvent { sender: ScrollView; - isDefaultPrevented(): boolean; preventDefault: Function; + isDefaultPrevented(): boolean; } interface ScrollViewChangingEvent extends ScrollViewEvent { @@ -14343,14 +16145,22 @@ declare module kendo.mobile.ui { class Scroller extends kendo.mobile.ui.Widget { + static fn: Scroller; - static extend(proto: Object): Scroller; + + options: ScrollerOptions; + element: JQuery; wrapper: JQuery; + + static extend(proto: Object): Scroller; + constructor(element: Element, options?: ScrollerOptions); - options: ScrollerOptions; + + animatedScrollTo(x: number, y: number): void; + contentResized(): void; destroy(): void; disable(): void; enable(): void; @@ -14361,6 +16171,7 @@ declare module kendo.mobile.ui { scrollTo(x: number, y: number): void; scrollWidth(): void; zoomOut(): void; + } interface ScrollerMessages { @@ -14384,8 +16195,8 @@ declare module kendo.mobile.ui { } interface ScrollerEvent { sender: Scroller; - isDefaultPrevented(): boolean; preventDefault: Function; + isDefaultPrevented(): boolean; } interface ScrollerScrollEvent extends ScrollerEvent { @@ -14395,16 +16206,24 @@ declare module kendo.mobile.ui { class SplitView extends kendo.mobile.ui.Widget { + static fn: SplitView; - static extend(proto: Object): SplitView; + + options: SplitViewOptions; + element: JQuery; wrapper: JQuery; + + static extend(proto: Object): SplitView; + constructor(element: Element, options?: SplitViewOptions); - options: SplitViewOptions; + + destroy(): void; expandPanes(): void; collapsePanes(): void; + } interface SplitViewOptions { @@ -14415,8 +16234,8 @@ declare module kendo.mobile.ui { } interface SplitViewEvent { sender: SplitView; - isDefaultPrevented(): boolean; preventDefault: Function; + isDefaultPrevented(): boolean; } interface SplitViewInitEvent extends SplitViewEvent { @@ -14429,19 +16248,27 @@ declare module kendo.mobile.ui { class Switch extends kendo.mobile.ui.Widget { + static fn: Switch; - static extend(proto: Object): Switch; + + options: SwitchOptions; + element: JQuery; wrapper: JQuery; + + static extend(proto: Object): Switch; + constructor(element: Element, options?: SwitchOptions); - options: SwitchOptions; + + check(): boolean; check(check: boolean): void; destroy(): void; enable(enable: boolean): void; refresh(): void; toggle(): void; + } interface SwitchOptions { @@ -14454,8 +16281,8 @@ declare module kendo.mobile.ui { } interface SwitchEvent { sender: Switch; - isDefaultPrevented(): boolean; preventDefault: Function; + isDefaultPrevented(): boolean; } interface SwitchChangeEvent extends SwitchEvent { @@ -14464,13 +16291,20 @@ declare module kendo.mobile.ui { class TabStrip extends kendo.mobile.ui.Widget { + static fn: TabStrip; - static extend(proto: Object): TabStrip; + + options: TabStripOptions; + element: JQuery; wrapper: JQuery; + + static extend(proto: Object): TabStrip; + constructor(element: Element, options?: TabStripOptions); - options: TabStripOptions; + + badge(tab: string, value: string): string; badge(tab: string, value: boolean): string; badge(tab: number, value: string): string; @@ -14481,6 +16315,7 @@ declare module kendo.mobile.ui { switchTo(url: number): void; switchByFullUrl(url: string): void; clear(): void; + } interface TabStripOptions { @@ -14490,8 +16325,8 @@ declare module kendo.mobile.ui { } interface TabStripEvent { sender: TabStrip; - isDefaultPrevented(): boolean; preventDefault: Function; + isDefaultPrevented(): boolean; } interface TabStripSelectEvent extends TabStripEvent { @@ -14500,16 +16335,24 @@ declare module kendo.mobile.ui { class View extends kendo.mobile.ui.Widget { + static fn: View; - static extend(proto: Object): View; + + options: ViewOptions; + element: JQuery; wrapper: JQuery; + + static extend(proto: Object): View; + constructor(element: Element, options?: ViewOptions); - options: ViewOptions; + + contentElement(): void; destroy(): void; enable(enable: boolean): void; + } interface ViewOptions { @@ -14532,8 +16375,8 @@ declare module kendo.mobile.ui { } interface ViewEvent { sender: View; - isDefaultPrevented(): boolean; preventDefault: Function; + isDefaultPrevented(): boolean; } interface ViewAfterShowEvent extends ViewEvent { @@ -14572,14 +16415,22 @@ declare module kendo.mobile.ui { } declare module kendo.ooxml { class Workbook extends Observable { - constructor(options?: WorkbookOptions); + + options: WorkbookOptions; - toDataURL(): string; + sheets: WorkbookSheet[]; + + constructor(options?: WorkbookOptions); + + + toDataURL(): string; + } interface WorkbookSheetColumn { autoWidth?: boolean; + index?: number; width?: number; } @@ -14598,26 +16449,35 @@ declare module kendo.ooxml { bold?: boolean; color?: string; colSpan?: number; + fontFamily?: string; fontName?: string; fontSize?: number; format?: string; hAlign?: string; + index?: any; italic?: boolean; rowSpan?: number; + textAlign?: string; underline?: boolean; wrap?: boolean; vAlign?: string; - value?: any; + verticalAlign?: string; + value?: Date|number|string|boolean; } interface WorkbookSheetRow { cells?: WorkbookSheetRowCell[]; + index?: number; + height?: number; } interface WorkbookSheet { columns?: WorkbookSheetColumn[]; freezePane?: WorkbookSheetFreezePane; + frozenColumns?: number; + frozenRows?: number; filter?: WorkbookSheetFilter; + name?: string; rows?: WorkbookSheetRow[]; title?: string; } @@ -14630,16 +16490,734 @@ declare module kendo.ooxml { } interface WorkbookEvent { sender: Workbook; - isDefaultPrevented(): boolean; preventDefault: Function; + isDefaultPrevented(): boolean; } } +declare module kendo.dataviz.drawing { + class Arc extends kendo.drawing.Element { + + + options: ArcOptions; + + + constructor(geometry: kendo.geometry.Arc, options?: ArcOptions); + + + bbox(): kendo.geometry.Rect; + clip(): kendo.drawing.Path; + clip(clip: kendo.drawing.Path): void; + clippedBBox(): kendo.geometry.Rect; + geometry(): kendo.geometry.Arc; + geometry(value: kendo.geometry.Arc): void; + fill(color: string, opacity?: number): kendo.drawing.Arc; + opacity(): number; + opacity(opacity: number): void; + stroke(color: string, width?: number, opacity?: number): kendo.drawing.Arc; + transform(): kendo.geometry.Transformation; + transform(transform: kendo.geometry.Transformation): void; + visible(): boolean; + visible(visible: boolean): void; + + } + + interface ArcOptions { + name?: string; + clip?: kendo.drawing.Path; + fill?: kendo.drawing.FillOptions; + opacity?: number; + stroke?: kendo.drawing.StrokeOptions; + transform?: kendo.geometry.Transformation; + visible?: boolean; + } + interface ArcEvent { + sender: Arc; + preventDefault: Function; + isDefaultPrevented(): boolean; + } + + + class Circle extends kendo.drawing.Element { + + + options: CircleOptions; + + + constructor(geometry: kendo.geometry.Circle, options?: CircleOptions); + + + bbox(): kendo.geometry.Rect; + clip(): kendo.drawing.Path; + clip(clip: kendo.drawing.Path): void; + clippedBBox(): kendo.geometry.Rect; + geometry(): kendo.geometry.Circle; + geometry(value: kendo.geometry.Circle): void; + fill(color: string, opacity?: number): kendo.drawing.Circle; + opacity(): number; + opacity(opacity: number): void; + stroke(color: string, width?: number, opacity?: number): kendo.drawing.Circle; + transform(): kendo.geometry.Transformation; + transform(transform: kendo.geometry.Transformation): void; + visible(): boolean; + visible(visible: boolean): void; + + } + + interface CircleOptions { + name?: string; + clip?: kendo.drawing.Path; + fill?: kendo.drawing.FillOptions; + opacity?: number; + stroke?: kendo.drawing.StrokeOptions; + transform?: kendo.geometry.Transformation; + visible?: boolean; + } + interface CircleEvent { + sender: Circle; + preventDefault: Function; + isDefaultPrevented(): boolean; + } + + + class Element extends kendo.Class { + + + options: ElementOptions; + + + constructor(options?: ElementOptions); + + + bbox(): kendo.geometry.Rect; + clip(): kendo.drawing.Path; + clip(clip: kendo.drawing.Path): void; + clippedBBox(): kendo.geometry.Rect; + opacity(): number; + opacity(opacity: number): void; + transform(): kendo.geometry.Transformation; + transform(transform: kendo.geometry.Transformation): void; + visible(): boolean; + visible(visible: boolean): void; + + } + + interface ElementOptions { + name?: string; + clip?: kendo.drawing.Path; + opacity?: number; + transform?: kendo.geometry.Transformation; + visible?: boolean; + } + interface ElementEvent { + sender: Element; + preventDefault: Function; + isDefaultPrevented(): boolean; + } + + + interface FillOptions { + + + + color: string; + opacity: number; + + + + + } + + + + class Gradient extends kendo.Class { + + + options: GradientOptions; + + stops: any; + + constructor(options?: GradientOptions); + + + addStop(offset: number, color: string, opacity: number): kendo.drawing.GradientStop; + removeStop(stop: kendo.drawing.GradientStop): void; + + } + + interface GradientOptions { + name?: string; + stops?: any; + } + interface GradientEvent { + sender: Gradient; + preventDefault: Function; + isDefaultPrevented(): boolean; + } + + + class GradientStop extends kendo.Class { + + + options: GradientStopOptions; + + + constructor(options?: GradientStopOptions); + + + + } + + interface GradientStopOptions { + name?: string; + offset?: number; + color?: string; + opacity?: number; + } + interface GradientStopEvent { + sender: GradientStop; + preventDefault: Function; + isDefaultPrevented(): boolean; + } + + + class Group extends kendo.drawing.Element { + + + options: GroupOptions; + + children: any; + + constructor(options?: GroupOptions); + + + append(element: kendo.drawing.Element): void; + clear(): void; + clip(): kendo.drawing.Path; + clip(clip: kendo.drawing.Path): void; + clippedBBox(): kendo.geometry.Rect; + insert(position: number, element: kendo.drawing.Element): void; + opacity(): number; + opacity(opacity: number): void; + remove(element: kendo.drawing.Element): void; + removeAt(index: number): void; + visible(): boolean; + visible(visible: boolean): void; + + } + + interface GroupOptions { + name?: string; + clip?: kendo.drawing.Path; + opacity?: number; + pdf?: kendo.drawing.PDFOptions; + transform?: kendo.geometry.Transformation; + visible?: boolean; + } + interface GroupEvent { + sender: Group; + preventDefault: Function; + isDefaultPrevented(): boolean; + } + + + class Image extends kendo.drawing.Element { + + + options: ImageOptions; + + + constructor(src: string, rect: kendo.geometry.Rect); + + + bbox(): kendo.geometry.Rect; + clip(): kendo.drawing.Path; + clip(clip: kendo.drawing.Path): void; + clippedBBox(): kendo.geometry.Rect; + opacity(): number; + opacity(opacity: number): void; + src(): string; + src(value: string): void; + rect(): kendo.geometry.Rect; + rect(value: kendo.geometry.Rect): void; + transform(): kendo.geometry.Transformation; + transform(transform: kendo.geometry.Transformation): void; + visible(): boolean; + visible(visible: boolean): void; + + } + + interface ImageOptions { + name?: string; + clip?: kendo.drawing.Path; + opacity?: number; + transform?: kendo.geometry.Transformation; + visible?: boolean; + } + interface ImageEvent { + sender: Image; + preventDefault: Function; + isDefaultPrevented(): boolean; + } + + + class Layout extends kendo.drawing.Group { + + + options: LayoutOptions; + + + constructor(rect: kendo.geometry.Rect, options?: LayoutOptions); + + + rect(): kendo.geometry.Rect; + rect(rect: kendo.geometry.Rect): void; + reflow(): void; + + } + + interface LayoutOptions { + name?: string; + alignContent?: string; + alignItems?: string; + justifyContent?: string; + lineSpacing?: number; + spacing?: number; + orientation?: string; + wrap?: boolean; + } + interface LayoutEvent { + sender: Layout; + preventDefault: Function; + isDefaultPrevented(): boolean; + } + + + class LinearGradient extends kendo.drawing.Gradient { + + + options: LinearGradientOptions; + + stops: any; + + constructor(options?: LinearGradientOptions); + + + addStop(offset: number, color: string, opacity: number): kendo.drawing.GradientStop; + end(): kendo.geometry.Point; + end(end: any): void; + end(end: kendo.geometry.Point): void; + start(): kendo.geometry.Point; + start(start: any): void; + start(start: kendo.geometry.Point): void; + removeStop(stop: kendo.drawing.GradientStop): void; + + } + + interface LinearGradientOptions { + name?: string; + stops?: any; + } + interface LinearGradientEvent { + sender: LinearGradient; + preventDefault: Function; + isDefaultPrevented(): boolean; + } + + + class MultiPath extends kendo.drawing.Element { + + + options: MultiPathOptions; + + paths: any; + + constructor(options?: MultiPathOptions); + + + bbox(): kendo.geometry.Rect; + clip(): kendo.drawing.Path; + clip(clip: kendo.drawing.Path): void; + clippedBBox(): kendo.geometry.Rect; + close(): kendo.drawing.MultiPath; + curveTo(controlOut: any, controlIn: any, endPoint: any): kendo.drawing.MultiPath; + curveTo(controlOut: any, controlIn: any, endPoint: kendo.geometry.Point): kendo.drawing.MultiPath; + curveTo(controlOut: any, controlIn: kendo.geometry.Point, endPoint: any): kendo.drawing.MultiPath; + curveTo(controlOut: any, controlIn: kendo.geometry.Point, endPoint: kendo.geometry.Point): kendo.drawing.MultiPath; + curveTo(controlOut: kendo.geometry.Point, controlIn: any, endPoint: any): kendo.drawing.MultiPath; + curveTo(controlOut: kendo.geometry.Point, controlIn: any, endPoint: kendo.geometry.Point): kendo.drawing.MultiPath; + curveTo(controlOut: kendo.geometry.Point, controlIn: kendo.geometry.Point, endPoint: any): kendo.drawing.MultiPath; + curveTo(controlOut: kendo.geometry.Point, controlIn: kendo.geometry.Point, endPoint: kendo.geometry.Point): kendo.drawing.MultiPath; + fill(color: string, opacity?: number): kendo.drawing.MultiPath; + lineTo(x: number, y?: number): kendo.drawing.MultiPath; + lineTo(x: any, y?: number): kendo.drawing.MultiPath; + lineTo(x: kendo.geometry.Point, y?: number): kendo.drawing.MultiPath; + moveTo(x: number, y?: number): kendo.drawing.MultiPath; + moveTo(x: any, y?: number): kendo.drawing.MultiPath; + moveTo(x: kendo.geometry.Point, y?: number): kendo.drawing.MultiPath; + opacity(): number; + opacity(opacity: number): void; + stroke(color: string, width?: number, opacity?: number): kendo.drawing.MultiPath; + transform(): kendo.geometry.Transformation; + transform(transform: kendo.geometry.Transformation): void; + visible(): boolean; + visible(visible: boolean): void; + + } + + interface MultiPathOptions { + name?: string; + clip?: kendo.drawing.Path; + fill?: kendo.drawing.FillOptions; + opacity?: number; + stroke?: kendo.drawing.StrokeOptions; + transform?: kendo.geometry.Transformation; + visible?: boolean; + } + interface MultiPathEvent { + sender: MultiPath; + preventDefault: Function; + isDefaultPrevented(): boolean; + } + + + class OptionsStore extends kendo.Class { + + + options: OptionsStoreOptions; + + observer: any; + + constructor(options?: OptionsStoreOptions); + + + get(field: string): any; + set(field: string, value: any): void; + + } + + interface OptionsStoreOptions { + name?: string; + } + interface OptionsStoreEvent { + sender: OptionsStore; + preventDefault: Function; + isDefaultPrevented(): boolean; + } + + + interface PDFOptions { + + + + creator: string; + date: Date; + keywords: string; + landscape: boolean; + margin: any; + paperSize: any; + subject: string; + title: string; + + + + + } + + + + class Path extends kendo.drawing.Element { + + + options: PathOptions; + + segments: any; + + constructor(options?: PathOptions); + + static fromPoints(points: any): kendo.drawing.Path; + static fromRect(rect: kendo.geometry.Rect): kendo.drawing.Path; + static parse(svgPath: string, options?: any): kendo.drawing.Path; + + bbox(): kendo.geometry.Rect; + clip(): kendo.drawing.Path; + clip(clip: kendo.drawing.Path): void; + clippedBBox(): kendo.geometry.Rect; + close(): kendo.drawing.Path; + curveTo(controlOut: any, controlIn: any, endPoint: any): kendo.drawing.Path; + curveTo(controlOut: any, controlIn: any, endPoint: kendo.geometry.Point): kendo.drawing.Path; + curveTo(controlOut: any, controlIn: kendo.geometry.Point, endPoint: any): kendo.drawing.Path; + curveTo(controlOut: any, controlIn: kendo.geometry.Point, endPoint: kendo.geometry.Point): kendo.drawing.Path; + curveTo(controlOut: kendo.geometry.Point, controlIn: any, endPoint: any): kendo.drawing.Path; + curveTo(controlOut: kendo.geometry.Point, controlIn: any, endPoint: kendo.geometry.Point): kendo.drawing.Path; + curveTo(controlOut: kendo.geometry.Point, controlIn: kendo.geometry.Point, endPoint: any): kendo.drawing.Path; + curveTo(controlOut: kendo.geometry.Point, controlIn: kendo.geometry.Point, endPoint: kendo.geometry.Point): kendo.drawing.Path; + fill(color: string, opacity?: number): kendo.drawing.Path; + lineTo(x: number, y?: number): kendo.drawing.Path; + lineTo(x: any, y?: number): kendo.drawing.Path; + lineTo(x: kendo.geometry.Point, y?: number): kendo.drawing.Path; + moveTo(x: number, y?: number): kendo.drawing.Path; + moveTo(x: any, y?: number): kendo.drawing.Path; + moveTo(x: kendo.geometry.Point, y?: number): kendo.drawing.Path; + opacity(): number; + opacity(opacity: number): void; + stroke(color: string, width?: number, opacity?: number): kendo.drawing.Path; + transform(): kendo.geometry.Transformation; + transform(transform: kendo.geometry.Transformation): void; + visible(): boolean; + visible(visible: boolean): void; + + } + + interface PathOptions { + name?: string; + clip?: kendo.drawing.Path; + fill?: kendo.drawing.FillOptions; + opacity?: number; + stroke?: kendo.drawing.StrokeOptions; + transform?: kendo.geometry.Transformation; + visible?: boolean; + } + interface PathEvent { + sender: Path; + preventDefault: Function; + isDefaultPrevented(): boolean; + } + + + class RadialGradient extends kendo.drawing.Gradient { + + + options: RadialGradientOptions; + + stops: any; + + constructor(options?: RadialGradientOptions); + + + addStop(offset: number, color: string, opacity: number): kendo.drawing.GradientStop; + center(): kendo.geometry.Point; + center(center: any): void; + center(center: kendo.geometry.Point): void; + radius(): number; + radius(value: number): void; + removeStop(stop: kendo.drawing.GradientStop): void; + + } + + interface RadialGradientOptions { + name?: string; + center?: any|kendo.geometry.Point; + radius?: number; + stops?: any; + } + interface RadialGradientEvent { + sender: RadialGradient; + preventDefault: Function; + isDefaultPrevented(): boolean; + } + + + class Rect extends kendo.drawing.Element { + + + options: RectOptions; + + + constructor(geometry: kendo.geometry.Rect, options?: RectOptions); + + + bbox(): kendo.geometry.Rect; + clip(): kendo.drawing.Path; + clip(clip: kendo.drawing.Path): void; + clippedBBox(): kendo.geometry.Rect; + geometry(): kendo.geometry.Rect; + geometry(value: kendo.geometry.Rect): void; + fill(color: string, opacity?: number): kendo.drawing.Rect; + opacity(): number; + opacity(opacity: number): void; + stroke(color: string, width?: number, opacity?: number): kendo.drawing.Rect; + transform(): kendo.geometry.Transformation; + transform(transform: kendo.geometry.Transformation): void; + visible(): boolean; + visible(visible: boolean): void; + + } + + interface RectOptions { + name?: string; + clip?: kendo.drawing.Path; + fill?: kendo.drawing.FillOptions; + opacity?: number; + stroke?: kendo.drawing.StrokeOptions; + transform?: kendo.geometry.Transformation; + visible?: boolean; + } + interface RectEvent { + sender: Rect; + preventDefault: Function; + isDefaultPrevented(): boolean; + } + + + class Segment extends kendo.Class { + + + options: SegmentOptions; + + + constructor(anchor: kendo.geometry.Point, controlIn: kendo.geometry.Point, controlOut: kendo.geometry.Point); + + + anchor(): kendo.geometry.Point; + anchor(value: kendo.geometry.Point): void; + controlIn(): kendo.geometry.Point; + controlIn(value: kendo.geometry.Point): void; + controlOut(): kendo.geometry.Point; + controlOut(value: kendo.geometry.Point): void; + + } + + interface SegmentOptions { + name?: string; + } + interface SegmentEvent { + sender: Segment; + preventDefault: Function; + isDefaultPrevented(): boolean; + } + + + interface StrokeOptions { + + + + color: string; + dashType: string; + lineCap: string; + lineJoin: string; + opacity: number; + width: number; + + + + + } + + + + class Surface extends kendo.Observable { + + + options: SurfaceOptions; + + + constructor(options?: SurfaceOptions); + + static create(element: JQuery, options?: any): kendo.drawing.Surface; + static create(element: Element, options?: any): kendo.drawing.Surface; + + clear(): void; + draw(element: kendo.drawing.Element): void; + eventTarget(e: any): kendo.drawing.Element; + resize(force?: boolean): void; + + } + + interface SurfaceOptions { + name?: string; + type?: string; + height?: string; + width?: string; + click?(e: SurfaceClickEvent): void; + mouseenter?(e: SurfaceMouseenterEvent): void; + mouseleave?(e: SurfaceMouseleaveEvent): void; + } + interface SurfaceEvent { + sender: Surface; + preventDefault: Function; + isDefaultPrevented(): boolean; + } + + interface SurfaceClickEvent extends SurfaceEvent { + element?: kendo.drawing.Element; + originalEvent?: any; + } + + interface SurfaceMouseenterEvent extends SurfaceEvent { + element?: kendo.drawing.Element; + originalEvent?: any; + } + + interface SurfaceMouseleaveEvent extends SurfaceEvent { + element?: kendo.drawing.Element; + originalEvent?: any; + } + + + class Text extends kendo.drawing.Element { + + + options: TextOptions; + + + constructor(content: string, position: kendo.geometry.Point, options?: TextOptions); + + + bbox(): kendo.geometry.Rect; + clip(): kendo.drawing.Path; + clip(clip: kendo.drawing.Path): void; + clippedBBox(): kendo.geometry.Rect; + content(): string; + content(value: string): void; + fill(color: string, opacity?: number): kendo.drawing.Text; + opacity(): number; + opacity(opacity: number): void; + position(): kendo.geometry.Point; + position(value: kendo.geometry.Point): void; + stroke(color: string, width?: number, opacity?: number): kendo.drawing.Text; + transform(): kendo.geometry.Transformation; + transform(transform: kendo.geometry.Transformation): void; + visible(): boolean; + visible(visible: boolean): void; + + } + + interface TextOptions { + name?: string; + clip?: kendo.drawing.Path; + fill?: kendo.drawing.FillOptions; + font?: string; + opacity?: number; + stroke?: kendo.drawing.StrokeOptions; + transform?: kendo.geometry.Transformation; + visible?: boolean; + } + interface TextEvent { + sender: Text; + preventDefault: Function; + isDefaultPrevented(): boolean; + } + + +} declare module kendo.dataviz.geometry { class Arc extends Observable { + + options: ArcOptions; + + anticlockwise: boolean; + center: kendo.geometry.Point; + endAngle: number; + radiusX: number; + radiusY: number; + startAngle: number; + + + bbox(matrix: kendo.geometry.Matrix): kendo.geometry.Rect; getAnticlockwise(): boolean; getCenter(): kendo.geometry.Point; @@ -14654,12 +17232,7 @@ declare module kendo.dataviz.geometry { setRadiusX(value: number): kendo.geometry.Arc; setRadiusY(value: number): kendo.geometry.Arc; setStartAngle(value: number): kendo.geometry.Arc; - anticlockwise: boolean; - center: kendo.geometry.Point; - endAngle: number; - radiusX: number; - radiusY: number; - startAngle: number; + } interface ArcOptions { @@ -14667,13 +17240,21 @@ declare module kendo.dataviz.geometry { } interface ArcEvent { sender: Arc; - isDefaultPrevented(): boolean; preventDefault: Function; + isDefaultPrevented(): boolean; } class Circle extends Observable { + + options: CircleOptions; + + center: kendo.geometry.Point; + radius: number; + + + bbox(matrix: kendo.geometry.Matrix): kendo.geometry.Rect; clone(): kendo.geometry.Circle; equals(other: kendo.geometry.Circle): boolean; @@ -14683,8 +17264,7 @@ declare module kendo.dataviz.geometry { setCenter(value: kendo.geometry.Point): kendo.geometry.Point; setCenter(value: any): kendo.geometry.Point; setRadius(value: number): kendo.geometry.Circle; - center: kendo.geometry.Point; - radius: number; + } interface CircleOptions { @@ -14692,29 +17272,36 @@ declare module kendo.dataviz.geometry { } interface CircleEvent { sender: Circle; - isDefaultPrevented(): boolean; preventDefault: Function; + isDefaultPrevented(): boolean; } class Matrix extends Observable { + + options: MatrixOptions; - clone(): kendo.geometry.Matrix; - equals(other: kendo.geometry.Matrix): boolean; - round(digits: number): kendo.geometry.Matrix; - multiplyCopy(matrix: kendo.geometry.Matrix): kendo.geometry.Matrix; - toArray(digits: number): any; - toString(digits: number, separator: string): string; - static rotate(angle: number, x: number, y: number): kendo.geometry.Matrix; - static scale(scaleX: number, scaleY: number): kendo.geometry.Matrix; - static translate(x: number, y: number): kendo.geometry.Matrix; - static unit(): kendo.geometry.Matrix; + a: number; b: number; c: number; d: number; e: number; f: number; + + + static rotate(angle: number, x: number, y: number): kendo.geometry.Matrix; + static scale(scaleX: number, scaleY: number): kendo.geometry.Matrix; + static translate(x: number, y: number): kendo.geometry.Matrix; + static unit(): kendo.geometry.Matrix; + + clone(): kendo.geometry.Matrix; + equals(other: kendo.geometry.Matrix): boolean; + round(digits: number): kendo.geometry.Matrix; + multiplyCopy(matrix: kendo.geometry.Matrix): kendo.geometry.Matrix; + toArray(digits: number): any; + toString(digits: number, separator: string): string; + } interface MatrixOptions { @@ -14722,13 +17309,29 @@ declare module kendo.dataviz.geometry { } interface MatrixEvent { sender: Matrix; - isDefaultPrevented(): boolean; preventDefault: Function; + isDefaultPrevented(): boolean; } class Point extends Observable { + + options: PointOptions; + + x: number; + y: number; + + constructor(x: number, y: number); + + static create(x: number, y: number): kendo.geometry.Point; + static create(x: any, y: number): kendo.geometry.Point; + static create(x: kendo.geometry.Point, y: number): kendo.geometry.Point; + static min(): kendo.geometry.Point; + static max(): kendo.geometry.Point; + static minPoint(): kendo.geometry.Point; + static maxPoint(): kendo.geometry.Point; + clone(): kendo.geometry.Point; distanceTo(point: kendo.geometry.Point): number; equals(other: kendo.geometry.Point): boolean; @@ -14749,15 +17352,7 @@ declare module kendo.dataviz.geometry { translate(dx: number, dy: number): kendo.geometry.Point; translateWith(vector: kendo.geometry.Point): kendo.geometry.Point; translateWith(vector: any): kendo.geometry.Point; - static create(x: number, y: number): kendo.geometry.Point; - static create(x: any, y: number): kendo.geometry.Point; - static create(x: kendo.geometry.Point, y: number): kendo.geometry.Point; - static min(): kendo.geometry.Point; - static max(): kendo.geometry.Point; - static minPoint(): kendo.geometry.Point; - static maxPoint(): kendo.geometry.Point; - x: number; - y: number; + } interface PointOptions { @@ -14765,14 +17360,24 @@ declare module kendo.dataviz.geometry { } interface PointEvent { sender: Point; - isDefaultPrevented(): boolean; preventDefault: Function; + isDefaultPrevented(): boolean; } class Rect extends Observable { - constructor(origin: kendo.geometry.Point, size: kendo.geometry.Size); + + options: RectOptions; + + origin: kendo.geometry.Point; + size: kendo.geometry.Size; + + constructor(origin: kendo.geometry.Point, size: kendo.geometry.Size); + + static fromPoints(pointA: kendo.geometry.Point, pointB: kendo.geometry.Point): kendo.geometry.Rect; + static union(rectA: kendo.geometry.Rect, rectB: kendo.geometry.Rect): kendo.geometry.Rect; + bbox(matrix: kendo.geometry.Matrix): kendo.geometry.Rect; bottomLeft(): kendo.geometry.Point; bottomRight(): kendo.geometry.Point; @@ -14789,10 +17394,7 @@ declare module kendo.dataviz.geometry { topLeft(): kendo.geometry.Point; topRight(): kendo.geometry.Point; width(): number; - static fromPoints(pointA: kendo.geometry.Point, pointB: kendo.geometry.Point): kendo.geometry.Rect; - static union(rectA: kendo.geometry.Rect, rectB: kendo.geometry.Rect): kendo.geometry.Rect; - origin: kendo.geometry.Point; - size: kendo.geometry.Size; + } interface RectOptions { @@ -14800,24 +17402,31 @@ declare module kendo.dataviz.geometry { } interface RectEvent { sender: Rect; - isDefaultPrevented(): boolean; preventDefault: Function; + isDefaultPrevented(): boolean; } class Size extends Observable { + + options: SizeOptions; + + width: number; + height: number; + + + static create(width: number, height: number): kendo.geometry.Size; + static create(width: any, height: number): kendo.geometry.Size; + static create(width: kendo.geometry.Size, height: number): kendo.geometry.Size; + clone(): kendo.geometry.Size; equals(other: kendo.geometry.Size): boolean; getWidth(): number; getHeight(): number; setWidth(value: number): kendo.geometry.Size; setHeight(value: number): kendo.geometry.Size; - static create(width: number, height: number): kendo.geometry.Size; - static create(width: any, height: number): kendo.geometry.Size; - static create(width: kendo.geometry.Size, height: number): kendo.geometry.Size; - width: number; - height: number; + } interface SizeOptions { @@ -14825,13 +17434,19 @@ declare module kendo.dataviz.geometry { } interface SizeEvent { sender: Size; - isDefaultPrevented(): boolean; preventDefault: Function; + isDefaultPrevented(): boolean; } class Transformation extends Observable { + + options: TransformationOptions; + + + + clone(): kendo.geometry.Transformation; equals(other: kendo.geometry.Transformation): boolean; matrix(): kendo.geometry.Matrix; @@ -14840,6 +17455,7 @@ declare module kendo.dataviz.geometry { rotate(angle: number, center: kendo.geometry.Point): kendo.geometry.Transformation; scale(scaleX: number, scaleY: number): kendo.geometry.Transformation; translate(x: number, y: number): kendo.geometry.Transformation; + } interface TransformationOptions { @@ -14847,530 +17463,8 @@ declare module kendo.dataviz.geometry { } interface TransformationEvent { sender: Transformation; - isDefaultPrevented(): boolean; preventDefault: Function; - } - - -} -declare module kendo.dataviz.drawing { - class Arc extends kendo.drawing.Element { - constructor(geometry: kendo.geometry.Arc, options?: ArcOptions); - options: ArcOptions; - bbox(): kendo.geometry.Rect; - clip(): kendo.drawing.Path; - clip(clip: kendo.drawing.Path): void; - clippedBBox(): kendo.geometry.Rect; - geometry(): kendo.geometry.Arc; - geometry(value: kendo.geometry.Arc): void; - fill(color: string, opacity?: number): kendo.drawing.Arc; - opacity(): number; - opacity(opacity: number): void; - stroke(color: string, width?: number, opacity?: number): kendo.drawing.Arc; - transform(): kendo.geometry.Transformation; - transform(transform: kendo.geometry.Transformation): void; - visible(): boolean; - visible(visible: boolean): void; - } - - interface ArcOptions { - name?: string; - clip?: kendo.drawing.Path; - fill?: kendo.drawing.FillOptions; - opacity?: number; - stroke?: kendo.drawing.StrokeOptions; - transform?: kendo.geometry.Transformation; - visible?: boolean; - } - interface ArcEvent { - sender: Arc; isDefaultPrevented(): boolean; - preventDefault: Function; - } - - - class Circle extends kendo.drawing.Element { - constructor(geometry: kendo.geometry.Circle, options?: CircleOptions); - options: CircleOptions; - bbox(): kendo.geometry.Rect; - clip(): kendo.drawing.Path; - clip(clip: kendo.drawing.Path): void; - clippedBBox(): kendo.geometry.Rect; - geometry(): kendo.geometry.Circle; - geometry(value: kendo.geometry.Circle): void; - fill(color: string, opacity?: number): kendo.drawing.Circle; - opacity(): number; - opacity(opacity: number): void; - stroke(color: string, width?: number, opacity?: number): kendo.drawing.Circle; - transform(): kendo.geometry.Transformation; - transform(transform: kendo.geometry.Transformation): void; - visible(): boolean; - visible(visible: boolean): void; - } - - interface CircleOptions { - name?: string; - clip?: kendo.drawing.Path; - fill?: kendo.drawing.FillOptions; - opacity?: number; - stroke?: kendo.drawing.StrokeOptions; - transform?: kendo.geometry.Transformation; - visible?: boolean; - } - interface CircleEvent { - sender: Circle; - isDefaultPrevented(): boolean; - preventDefault: Function; - } - - - class Element extends kendo.Class { - constructor(options?: ElementOptions); - options: ElementOptions; - bbox(): kendo.geometry.Rect; - clip(): kendo.drawing.Path; - clip(clip: kendo.drawing.Path): void; - clippedBBox(): kendo.geometry.Rect; - opacity(): number; - opacity(opacity: number): void; - transform(): kendo.geometry.Transformation; - transform(transform: kendo.geometry.Transformation): void; - visible(): boolean; - visible(visible: boolean): void; - } - - interface ElementOptions { - name?: string; - clip?: kendo.drawing.Path; - opacity?: number; - transform?: kendo.geometry.Transformation; - visible?: boolean; - } - interface ElementEvent { - sender: Element; - isDefaultPrevented(): boolean; - preventDefault: Function; - } - - - interface FillOptions { - color: string; - opacity: number; - } - - - - class Gradient extends kendo.Class { - constructor(options?: GradientOptions); - options: GradientOptions; - addStop(offset: number, color: string, opacity: number): kendo.drawing.GradientStop; - removeStop(stop: kendo.drawing.GradientStop): void; - stops: any; - } - - interface GradientOptions { - name?: string; - stops?: any; - } - interface GradientEvent { - sender: Gradient; - isDefaultPrevented(): boolean; - preventDefault: Function; - } - - - class GradientStop extends kendo.Class { - constructor(options?: GradientStopOptions); - options: GradientStopOptions; - } - - interface GradientStopOptions { - name?: string; - offset?: number; - color?: string; - opacity?: number; - } - interface GradientStopEvent { - sender: GradientStop; - isDefaultPrevented(): boolean; - preventDefault: Function; - } - - - class Group extends kendo.drawing.Element { - constructor(options?: GroupOptions); - options: GroupOptions; - append(element: kendo.drawing.Element): void; - clear(): void; - clip(): kendo.drawing.Path; - clip(clip: kendo.drawing.Path): void; - clippedBBox(): kendo.geometry.Rect; - opacity(): number; - opacity(opacity: number): void; - remove(element: kendo.drawing.Element): void; - removeAt(index: number): void; - visible(): boolean; - visible(visible: boolean): void; - children: any; - } - - interface GroupOptions { - name?: string; - clip?: kendo.drawing.Path; - opacity?: number; - pdf?: kendo.drawing.PDFOptions; - transform?: kendo.geometry.Transformation; - visible?: boolean; - } - interface GroupEvent { - sender: Group; - isDefaultPrevented(): boolean; - preventDefault: Function; - } - - - class Image extends kendo.drawing.Element { - constructor(src: string, rect: kendo.geometry.Rect); - options: ImageOptions; - bbox(): kendo.geometry.Rect; - clip(): kendo.drawing.Path; - clip(clip: kendo.drawing.Path): void; - clippedBBox(): kendo.geometry.Rect; - opacity(): number; - opacity(opacity: number): void; - src(): string; - src(value: string): void; - rect(): kendo.geometry.Rect; - rect(value: kendo.geometry.Rect): void; - transform(): kendo.geometry.Transformation; - transform(transform: kendo.geometry.Transformation): void; - visible(): boolean; - visible(visible: boolean): void; - } - - interface ImageOptions { - name?: string; - clip?: kendo.drawing.Path; - opacity?: number; - transform?: kendo.geometry.Transformation; - visible?: boolean; - } - interface ImageEvent { - sender: Image; - isDefaultPrevented(): boolean; - preventDefault: Function; - } - - - class Layout extends kendo.drawing.Group { - constructor(rect: kendo.geometry.Rect, options?: LayoutOptions); - options: LayoutOptions; - rect(): kendo.geometry.Rect; - rect(rect: kendo.geometry.Rect): void; - reflow(): void; - } - - interface LayoutOptions { - name?: string; - alignContent?: string; - alignItems?: string; - justifyContent?: string; - lineSpacing?: number; - spacing?: number; - orientation?: string; - wrap?: boolean; - } - interface LayoutEvent { - sender: Layout; - isDefaultPrevented(): boolean; - preventDefault: Function; - } - - - class LinearGradient extends kendo.drawing.Gradient { - constructor(options?: LinearGradientOptions); - options: LinearGradientOptions; - addStop(offset: number, color: string, opacity: number): kendo.drawing.GradientStop; - end(): kendo.geometry.Point; - end(end: any): void; - end(end: kendo.geometry.Point): void; - start(): kendo.geometry.Point; - start(start: any): void; - start(start: kendo.geometry.Point): void; - removeStop(stop: kendo.drawing.GradientStop): void; - stops: any; - } - - interface LinearGradientOptions { - name?: string; - stops?: any; - } - interface LinearGradientEvent { - sender: LinearGradient; - isDefaultPrevented(): boolean; - preventDefault: Function; - } - - - class MultiPath extends kendo.drawing.Element { - constructor(options?: MultiPathOptions); - options: MultiPathOptions; - bbox(): kendo.geometry.Rect; - clip(): kendo.drawing.Path; - clip(clip: kendo.drawing.Path): void; - clippedBBox(): kendo.geometry.Rect; - close(): kendo.drawing.MultiPath; - curveTo(controlOut: any, controlIn: any): kendo.drawing.MultiPath; - curveTo(controlOut: any, controlIn: kendo.geometry.Point): kendo.drawing.MultiPath; - curveTo(controlOut: kendo.geometry.Point, controlIn: any): kendo.drawing.MultiPath; - curveTo(controlOut: kendo.geometry.Point, controlIn: kendo.geometry.Point): kendo.drawing.MultiPath; - fill(color: string, opacity?: number): kendo.drawing.MultiPath; - lineTo(x: number, y?: number): kendo.drawing.MultiPath; - lineTo(x: any, y?: number): kendo.drawing.MultiPath; - lineTo(x: kendo.geometry.Point, y?: number): kendo.drawing.MultiPath; - moveTo(x: number, y?: number): kendo.drawing.MultiPath; - moveTo(x: any, y?: number): kendo.drawing.MultiPath; - moveTo(x: kendo.geometry.Point, y?: number): kendo.drawing.MultiPath; - opacity(): number; - opacity(opacity: number): void; - stroke(color: string, width?: number, opacity?: number): kendo.drawing.MultiPath; - transform(): kendo.geometry.Transformation; - transform(transform: kendo.geometry.Transformation): void; - visible(): boolean; - visible(visible: boolean): void; - paths: any; - } - - interface MultiPathOptions { - name?: string; - clip?: kendo.drawing.Path; - fill?: kendo.drawing.FillOptions; - opacity?: number; - stroke?: kendo.drawing.StrokeOptions; - transform?: kendo.geometry.Transformation; - visible?: boolean; - } - interface MultiPathEvent { - sender: MultiPath; - isDefaultPrevented(): boolean; - preventDefault: Function; - } - - - class OptionsStore extends kendo.Class { - constructor(options?: OptionsStoreOptions); - options: OptionsStoreOptions; - get(field: string): any; - set(field: string, value: any): void; - observer: any; - } - - interface OptionsStoreOptions { - name?: string; - } - interface OptionsStoreEvent { - sender: OptionsStore; - isDefaultPrevented(): boolean; - preventDefault: Function; - } - - - interface PDFOptions { - creator: string; - date: Date; - keywords: string; - landscape: boolean; - margin: any; - paperSize: any; - subject: string; - title: string; - } - - - - class Path extends kendo.drawing.Element { - constructor(options?: PathOptions); - options: PathOptions; - bbox(): kendo.geometry.Rect; - clip(): kendo.drawing.Path; - clip(clip: kendo.drawing.Path): void; - clippedBBox(): kendo.geometry.Rect; - close(): kendo.drawing.Path; - curveTo(controlOut: any, controlIn: any): kendo.drawing.Path; - curveTo(controlOut: any, controlIn: kendo.geometry.Point): kendo.drawing.Path; - curveTo(controlOut: kendo.geometry.Point, controlIn: any): kendo.drawing.Path; - curveTo(controlOut: kendo.geometry.Point, controlIn: kendo.geometry.Point): kendo.drawing.Path; - fill(color: string, opacity?: number): kendo.drawing.Path; - lineTo(x: number, y?: number): kendo.drawing.Path; - lineTo(x: any, y?: number): kendo.drawing.Path; - lineTo(x: kendo.geometry.Point, y?: number): kendo.drawing.Path; - moveTo(x: number, y?: number): kendo.drawing.Path; - moveTo(x: any, y?: number): kendo.drawing.Path; - moveTo(x: kendo.geometry.Point, y?: number): kendo.drawing.Path; - opacity(): number; - opacity(opacity: number): void; - stroke(color: string, width?: number, opacity?: number): kendo.drawing.Path; - transform(): kendo.geometry.Transformation; - transform(transform: kendo.geometry.Transformation): void; - visible(): boolean; - visible(visible: boolean): void; - static fromPoints(points: any): kendo.drawing.Path; - static fromRect(rect: kendo.geometry.Rect): kendo.drawing.Path; - static parse(svgPath: string, options?: any): kendo.drawing.Path; - segments: any; - } - - interface PathOptions { - name?: string; - clip?: kendo.drawing.Path; - fill?: kendo.drawing.FillOptions; - opacity?: number; - stroke?: kendo.drawing.StrokeOptions; - transform?: kendo.geometry.Transformation; - visible?: boolean; - } - interface PathEvent { - sender: Path; - isDefaultPrevented(): boolean; - preventDefault: Function; - } - - - class RadialGradient extends kendo.drawing.Gradient { - constructor(options?: RadialGradientOptions); - options: RadialGradientOptions; - addStop(offset: number, color: string, opacity: number): kendo.drawing.GradientStop; - center(): kendo.geometry.Point; - center(center: any): void; - center(center: kendo.geometry.Point): void; - radius(): number; - radius(value: number): void; - removeStop(stop: kendo.drawing.GradientStop): void; - stops: any; - } - - interface RadialGradientOptions { - name?: string; - center?: any; - radius?: number; - stops?: any; - } - interface RadialGradientEvent { - sender: RadialGradient; - isDefaultPrevented(): boolean; - preventDefault: Function; - } - - - class Segment extends kendo.Class { - constructor(anchor: kendo.geometry.Point, controlIn: kendo.geometry.Point, controlOut: kendo.geometry.Point); - options: SegmentOptions; - anchor(): kendo.geometry.Point; - anchor(value: kendo.geometry.Point): void; - controlIn(): kendo.geometry.Point; - controlIn(value: kendo.geometry.Point): void; - controlOut(): kendo.geometry.Point; - controlOut(value: kendo.geometry.Point): void; - } - - interface SegmentOptions { - name?: string; - } - interface SegmentEvent { - sender: Segment; - isDefaultPrevented(): boolean; - preventDefault: Function; - } - - - interface StrokeOptions { - color: string; - dashType: string; - lineCap: string; - lineJoin: string; - opacity: number; - width: number; - } - - - - class Surface extends kendo.Observable { - constructor(options?: SurfaceOptions); - options: SurfaceOptions; - clear(): void; - draw(element: kendo.drawing.Element): void; - eventTarget(e: any): kendo.drawing.Element; - resize(force?: boolean): void; - static create(element: JQuery, options?: any): kendo.drawing.Surface; - static create(element: Element, options?: any): kendo.drawing.Surface; - } - - interface SurfaceOptions { - name?: string; - type?: string; - height?: string; - width?: string; - click?(e: SurfaceClickEvent): void; - mouseenter?(e: SurfaceMouseenterEvent): void; - mouseleave?(e: SurfaceMouseleaveEvent): void; - } - interface SurfaceEvent { - sender: Surface; - isDefaultPrevented(): boolean; - preventDefault: Function; - } - - interface SurfaceClickEvent extends SurfaceEvent { - element?: kendo.drawing.Element; - originalEvent?: any; - } - - interface SurfaceMouseenterEvent extends SurfaceEvent { - element?: kendo.drawing.Element; - originalEvent?: any; - } - - interface SurfaceMouseleaveEvent extends SurfaceEvent { - element?: kendo.drawing.Element; - originalEvent?: any; - } - - - class Text extends kendo.drawing.Element { - constructor(content: string, position: kendo.geometry.Point, options?: TextOptions); - options: TextOptions; - bbox(): kendo.geometry.Rect; - clip(): kendo.drawing.Path; - clip(clip: kendo.drawing.Path): void; - clippedBBox(): kendo.geometry.Rect; - content(): string; - content(value: string): void; - fill(color: string, opacity?: number): kendo.drawing.Text; - opacity(): number; - opacity(opacity: number): void; - position(): kendo.geometry.Point; - position(value: kendo.geometry.Point): void; - stroke(color: string, width?: number, opacity?: number): kendo.drawing.Text; - transform(): kendo.geometry.Transformation; - transform(transform: kendo.geometry.Transformation): void; - visible(): boolean; - visible(visible: boolean): void; - } - - interface TextOptions { - name?: string; - clip?: kendo.drawing.Path; - fill?: kendo.drawing.FillOptions; - font?: string; - opacity?: number; - stroke?: kendo.drawing.StrokeOptions; - transform?: kendo.geometry.Transformation; - visible?: boolean; - } - interface TextEvent { - sender: Text; - isDefaultPrevented(): boolean; - preventDefault: Function; } @@ -15404,286 +17498,294 @@ interface JQuery { kendoAutoComplete(): JQuery; kendoAutoComplete(options: kendo.ui.AutoCompleteOptions): JQuery; - data(key: "kendoAutoComplete") : kendo.ui.AutoComplete; + data(key: "kendoAutoComplete"): kendo.ui.AutoComplete; kendoBarcode(): JQuery; kendoBarcode(options: kendo.dataviz.ui.BarcodeOptions): JQuery; - data(key: "kendoBarcode") : kendo.dataviz.ui.Barcode; + data(key: "kendoBarcode"): kendo.dataviz.ui.Barcode; kendoButton(): JQuery; kendoButton(options: kendo.ui.ButtonOptions): JQuery; - data(key: "kendoButton") : kendo.ui.Button; + data(key: "kendoButton"): kendo.ui.Button; kendoCalendar(): JQuery; kendoCalendar(options: kendo.ui.CalendarOptions): JQuery; - data(key: "kendoCalendar") : kendo.ui.Calendar; + data(key: "kendoCalendar"): kendo.ui.Calendar; kendoChart(): JQuery; kendoChart(options: kendo.dataviz.ui.ChartOptions): JQuery; - data(key: "kendoChart") : kendo.dataviz.ui.Chart; + data(key: "kendoChart"): kendo.dataviz.ui.Chart; kendoColorPalette(): JQuery; kendoColorPalette(options: kendo.ui.ColorPaletteOptions): JQuery; - data(key: "kendoColorPalette") : kendo.ui.ColorPalette; + data(key: "kendoColorPalette"): kendo.ui.ColorPalette; kendoColorPicker(): JQuery; kendoColorPicker(options: kendo.ui.ColorPickerOptions): JQuery; - data(key: "kendoColorPicker") : kendo.ui.ColorPicker; + data(key: "kendoColorPicker"): kendo.ui.ColorPicker; kendoComboBox(): JQuery; kendoComboBox(options: kendo.ui.ComboBoxOptions): JQuery; - data(key: "kendoComboBox") : kendo.ui.ComboBox; + data(key: "kendoComboBox"): kendo.ui.ComboBox; kendoContextMenu(): JQuery; kendoContextMenu(options: kendo.ui.ContextMenuOptions): JQuery; - data(key: "kendoContextMenu") : kendo.ui.ContextMenu; + data(key: "kendoContextMenu"): kendo.ui.ContextMenu; kendoDatePicker(): JQuery; kendoDatePicker(options: kendo.ui.DatePickerOptions): JQuery; - data(key: "kendoDatePicker") : kendo.ui.DatePicker; + data(key: "kendoDatePicker"): kendo.ui.DatePicker; kendoDateTimePicker(): JQuery; kendoDateTimePicker(options: kendo.ui.DateTimePickerOptions): JQuery; - data(key: "kendoDateTimePicker") : kendo.ui.DateTimePicker; + data(key: "kendoDateTimePicker"): kendo.ui.DateTimePicker; kendoDiagram(): JQuery; kendoDiagram(options: kendo.dataviz.ui.DiagramOptions): JQuery; - data(key: "kendoDiagram") : kendo.dataviz.ui.Diagram; + data(key: "kendoDiagram"): kendo.dataviz.ui.Diagram; kendoDropDownList(): JQuery; kendoDropDownList(options: kendo.ui.DropDownListOptions): JQuery; - data(key: "kendoDropDownList") : kendo.ui.DropDownList; + data(key: "kendoDropDownList"): kendo.ui.DropDownList; kendoEditor(): JQuery; kendoEditor(options: kendo.ui.EditorOptions): JQuery; - data(key: "kendoEditor") : kendo.ui.Editor; + data(key: "kendoEditor"): kendo.ui.Editor; kendoFlatColorPicker(): JQuery; kendoFlatColorPicker(options: kendo.ui.FlatColorPickerOptions): JQuery; - data(key: "kendoFlatColorPicker") : kendo.ui.FlatColorPicker; + data(key: "kendoFlatColorPicker"): kendo.ui.FlatColorPicker; kendoGantt(): JQuery; kendoGantt(options: kendo.ui.GanttOptions): JQuery; - data(key: "kendoGantt") : kendo.ui.Gantt; + data(key: "kendoGantt"): kendo.ui.Gantt; kendoGrid(): JQuery; kendoGrid(options: kendo.ui.GridOptions): JQuery; - data(key: "kendoGrid") : kendo.ui.Grid; + data(key: "kendoGrid"): kendo.ui.Grid; kendoLinearGauge(): JQuery; kendoLinearGauge(options: kendo.dataviz.ui.LinearGaugeOptions): JQuery; - data(key: "kendoLinearGauge") : kendo.dataviz.ui.LinearGauge; + data(key: "kendoLinearGauge"): kendo.dataviz.ui.LinearGauge; kendoListView(): JQuery; kendoListView(options: kendo.ui.ListViewOptions): JQuery; - data(key: "kendoListView") : kendo.ui.ListView; + data(key: "kendoListView"): kendo.ui.ListView; kendoMap(): JQuery; kendoMap(options: kendo.dataviz.ui.MapOptions): JQuery; - data(key: "kendoMap") : kendo.dataviz.ui.Map; + data(key: "kendoMap"): kendo.dataviz.ui.Map; kendoMaskedTextBox(): JQuery; kendoMaskedTextBox(options: kendo.ui.MaskedTextBoxOptions): JQuery; - data(key: "kendoMaskedTextBox") : kendo.ui.MaskedTextBox; + data(key: "kendoMaskedTextBox"): kendo.ui.MaskedTextBox; kendoMenu(): JQuery; kendoMenu(options: kendo.ui.MenuOptions): JQuery; - data(key: "kendoMenu") : kendo.ui.Menu; + data(key: "kendoMenu"): kendo.ui.Menu; kendoMobileActionSheet(): JQuery; kendoMobileActionSheet(options: kendo.mobile.ui.ActionSheetOptions): JQuery; - data(key: "kendoMobileActionSheet") : kendo.mobile.ui.ActionSheet; + data(key: "kendoMobileActionSheet"): kendo.mobile.ui.ActionSheet; kendoMobileBackButton(): JQuery; kendoMobileBackButton(options: kendo.mobile.ui.BackButtonOptions): JQuery; - data(key: "kendoMobileBackButton") : kendo.mobile.ui.BackButton; + data(key: "kendoMobileBackButton"): kendo.mobile.ui.BackButton; kendoMobileButton(): JQuery; kendoMobileButton(options: kendo.mobile.ui.ButtonOptions): JQuery; - data(key: "kendoMobileButton") : kendo.mobile.ui.Button; + data(key: "kendoMobileButton"): kendo.mobile.ui.Button; kendoMobileButtonGroup(): JQuery; kendoMobileButtonGroup(options: kendo.mobile.ui.ButtonGroupOptions): JQuery; - data(key: "kendoMobileButtonGroup") : kendo.mobile.ui.ButtonGroup; + data(key: "kendoMobileButtonGroup"): kendo.mobile.ui.ButtonGroup; kendoMobileCollapsible(): JQuery; kendoMobileCollapsible(options: kendo.mobile.ui.CollapsibleOptions): JQuery; - data(key: "kendoMobileCollapsible") : kendo.mobile.ui.Collapsible; + data(key: "kendoMobileCollapsible"): kendo.mobile.ui.Collapsible; kendoMobileDetailButton(): JQuery; kendoMobileDetailButton(options: kendo.mobile.ui.DetailButtonOptions): JQuery; - data(key: "kendoMobileDetailButton") : kendo.mobile.ui.DetailButton; + data(key: "kendoMobileDetailButton"): kendo.mobile.ui.DetailButton; kendoMobileDrawer(): JQuery; kendoMobileDrawer(options: kendo.mobile.ui.DrawerOptions): JQuery; - data(key: "kendoMobileDrawer") : kendo.mobile.ui.Drawer; + data(key: "kendoMobileDrawer"): kendo.mobile.ui.Drawer; kendoMobileLayout(): JQuery; kendoMobileLayout(options: kendo.mobile.ui.LayoutOptions): JQuery; - data(key: "kendoMobileLayout") : kendo.mobile.ui.Layout; + data(key: "kendoMobileLayout"): kendo.mobile.ui.Layout; kendoMobileListView(): JQuery; kendoMobileListView(options: kendo.mobile.ui.ListViewOptions): JQuery; - data(key: "kendoMobileListView") : kendo.mobile.ui.ListView; + data(key: "kendoMobileListView"): kendo.mobile.ui.ListView; kendoMobileLoader(): JQuery; kendoMobileLoader(options: kendo.mobile.ui.LoaderOptions): JQuery; - data(key: "kendoMobileLoader") : kendo.mobile.ui.Loader; + data(key: "kendoMobileLoader"): kendo.mobile.ui.Loader; kendoMobileModalView(): JQuery; kendoMobileModalView(options: kendo.mobile.ui.ModalViewOptions): JQuery; - data(key: "kendoMobileModalView") : kendo.mobile.ui.ModalView; + data(key: "kendoMobileModalView"): kendo.mobile.ui.ModalView; kendoMobileNavBar(): JQuery; kendoMobileNavBar(options: kendo.mobile.ui.NavBarOptions): JQuery; - data(key: "kendoMobileNavBar") : kendo.mobile.ui.NavBar; + data(key: "kendoMobileNavBar"): kendo.mobile.ui.NavBar; kendoMobilePane(): JQuery; kendoMobilePane(options: kendo.mobile.ui.PaneOptions): JQuery; - data(key: "kendoMobilePane") : kendo.mobile.ui.Pane; + data(key: "kendoMobilePane"): kendo.mobile.ui.Pane; kendoMobilePopOver(): JQuery; kendoMobilePopOver(options: kendo.mobile.ui.PopOverOptions): JQuery; - data(key: "kendoMobilePopOver") : kendo.mobile.ui.PopOver; + data(key: "kendoMobilePopOver"): kendo.mobile.ui.PopOver; kendoMobileScrollView(): JQuery; kendoMobileScrollView(options: kendo.mobile.ui.ScrollViewOptions): JQuery; - data(key: "kendoMobileScrollView") : kendo.mobile.ui.ScrollView; + data(key: "kendoMobileScrollView"): kendo.mobile.ui.ScrollView; kendoMobileScroller(): JQuery; kendoMobileScroller(options: kendo.mobile.ui.ScrollerOptions): JQuery; - data(key: "kendoMobileScroller") : kendo.mobile.ui.Scroller; + data(key: "kendoMobileScroller"): kendo.mobile.ui.Scroller; kendoMobileSplitView(): JQuery; kendoMobileSplitView(options: kendo.mobile.ui.SplitViewOptions): JQuery; - data(key: "kendoMobileSplitView") : kendo.mobile.ui.SplitView; + data(key: "kendoMobileSplitView"): kendo.mobile.ui.SplitView; kendoMobileSwitch(): JQuery; kendoMobileSwitch(options: kendo.mobile.ui.SwitchOptions): JQuery; - data(key: "kendoMobileSwitch") : kendo.mobile.ui.Switch; + data(key: "kendoMobileSwitch"): kendo.mobile.ui.Switch; kendoMobileTabStrip(): JQuery; kendoMobileTabStrip(options: kendo.mobile.ui.TabStripOptions): JQuery; - data(key: "kendoMobileTabStrip") : kendo.mobile.ui.TabStrip; + data(key: "kendoMobileTabStrip"): kendo.mobile.ui.TabStrip; kendoMobileView(): JQuery; kendoMobileView(options: kendo.mobile.ui.ViewOptions): JQuery; - data(key: "kendoMobileView") : kendo.mobile.ui.View; + data(key: "kendoMobileView"): kendo.mobile.ui.View; kendoMultiSelect(): JQuery; kendoMultiSelect(options: kendo.ui.MultiSelectOptions): JQuery; - data(key: "kendoMultiSelect") : kendo.ui.MultiSelect; + data(key: "kendoMultiSelect"): kendo.ui.MultiSelect; kendoNotification(): JQuery; kendoNotification(options: kendo.ui.NotificationOptions): JQuery; - data(key: "kendoNotification") : kendo.ui.Notification; + data(key: "kendoNotification"): kendo.ui.Notification; kendoNumericTextBox(): JQuery; kendoNumericTextBox(options: kendo.ui.NumericTextBoxOptions): JQuery; - data(key: "kendoNumericTextBox") : kendo.ui.NumericTextBox; + data(key: "kendoNumericTextBox"): kendo.ui.NumericTextBox; kendoPager(): JQuery; kendoPager(options: kendo.ui.PagerOptions): JQuery; - data(key: "kendoPager") : kendo.ui.Pager; + data(key: "kendoPager"): kendo.ui.Pager; kendoPanelBar(): JQuery; kendoPanelBar(options: kendo.ui.PanelBarOptions): JQuery; - data(key: "kendoPanelBar") : kendo.ui.PanelBar; + data(key: "kendoPanelBar"): kendo.ui.PanelBar; kendoPivotConfigurator(): JQuery; kendoPivotConfigurator(options: kendo.ui.PivotConfiguratorOptions): JQuery; - data(key: "kendoPivotConfigurator") : kendo.ui.PivotConfigurator; + data(key: "kendoPivotConfigurator"): kendo.ui.PivotConfigurator; kendoPivotGrid(): JQuery; kendoPivotGrid(options: kendo.ui.PivotGridOptions): JQuery; - data(key: "kendoPivotGrid") : kendo.ui.PivotGrid; + data(key: "kendoPivotGrid"): kendo.ui.PivotGrid; + + kendoPopup(): JQuery; + kendoPopup(options: kendo.ui.PopupOptions): JQuery; + data(key: "kendoPopup"): kendo.ui.Popup; kendoProgressBar(): JQuery; kendoProgressBar(options: kendo.ui.ProgressBarOptions): JQuery; - data(key: "kendoProgressBar") : kendo.ui.ProgressBar; + data(key: "kendoProgressBar"): kendo.ui.ProgressBar; kendoQRCode(): JQuery; kendoQRCode(options: kendo.dataviz.ui.QRCodeOptions): JQuery; - data(key: "kendoQRCode") : kendo.dataviz.ui.QRCode; + data(key: "kendoQRCode"): kendo.dataviz.ui.QRCode; kendoRadialGauge(): JQuery; kendoRadialGauge(options: kendo.dataviz.ui.RadialGaugeOptions): JQuery; - data(key: "kendoRadialGauge") : kendo.dataviz.ui.RadialGauge; + data(key: "kendoRadialGauge"): kendo.dataviz.ui.RadialGauge; kendoRangeSlider(): JQuery; kendoRangeSlider(options: kendo.ui.RangeSliderOptions): JQuery; - data(key: "kendoRangeSlider") : kendo.ui.RangeSlider; + data(key: "kendoRangeSlider"): kendo.ui.RangeSlider; kendoResponsivePanel(): JQuery; kendoResponsivePanel(options: kendo.ui.ResponsivePanelOptions): JQuery; - data(key: "kendoResponsivePanel") : kendo.ui.ResponsivePanel; + data(key: "kendoResponsivePanel"): kendo.ui.ResponsivePanel; kendoScheduler(): JQuery; kendoScheduler(options: kendo.ui.SchedulerOptions): JQuery; - data(key: "kendoScheduler") : kendo.ui.Scheduler; + data(key: "kendoScheduler"): kendo.ui.Scheduler; kendoSlider(): JQuery; kendoSlider(options: kendo.ui.SliderOptions): JQuery; - data(key: "kendoSlider") : kendo.ui.Slider; + data(key: "kendoSlider"): kendo.ui.Slider; kendoSortable(): JQuery; kendoSortable(options: kendo.ui.SortableOptions): JQuery; - data(key: "kendoSortable") : kendo.ui.Sortable; + data(key: "kendoSortable"): kendo.ui.Sortable; kendoSparkline(): JQuery; kendoSparkline(options: kendo.dataviz.ui.SparklineOptions): JQuery; - data(key: "kendoSparkline") : kendo.dataviz.ui.Sparkline; + data(key: "kendoSparkline"): kendo.dataviz.ui.Sparkline; kendoSplitter(): JQuery; kendoSplitter(options: kendo.ui.SplitterOptions): JQuery; - data(key: "kendoSplitter") : kendo.ui.Splitter; + data(key: "kendoSplitter"): kendo.ui.Splitter; + + kendoSpreadsheet(): JQuery; + kendoSpreadsheet(options: kendo.ui.SpreadsheetOptions): JQuery; + data(key: "kendoSpreadsheet"): kendo.ui.Spreadsheet; kendoStockChart(): JQuery; kendoStockChart(options: kendo.dataviz.ui.StockChartOptions): JQuery; - data(key: "kendoStockChart") : kendo.dataviz.ui.StockChart; + data(key: "kendoStockChart"): kendo.dataviz.ui.StockChart; kendoTabStrip(): JQuery; kendoTabStrip(options: kendo.ui.TabStripOptions): JQuery; - data(key: "kendoTabStrip") : kendo.ui.TabStrip; + data(key: "kendoTabStrip"): kendo.ui.TabStrip; kendoTimePicker(): JQuery; kendoTimePicker(options: kendo.ui.TimePickerOptions): JQuery; - data(key: "kendoTimePicker") : kendo.ui.TimePicker; + data(key: "kendoTimePicker"): kendo.ui.TimePicker; kendoToolBar(): JQuery; kendoToolBar(options: kendo.ui.ToolBarOptions): JQuery; - data(key: "kendoToolBar") : kendo.ui.ToolBar; + data(key: "kendoToolBar"): kendo.ui.ToolBar; kendoTooltip(): JQuery; kendoTooltip(options: kendo.ui.TooltipOptions): JQuery; - data(key: "kendoTooltip") : kendo.ui.Tooltip; + data(key: "kendoTooltip"): kendo.ui.Tooltip; kendoTouch(): JQuery; kendoTouch(options: kendo.ui.TouchOptions): JQuery; - data(key: "kendoTouch") : kendo.ui.Touch; + data(key: "kendoTouch"): kendo.ui.Touch; kendoTreeList(): JQuery; kendoTreeList(options: kendo.ui.TreeListOptions): JQuery; - data(key: "kendoTreeList") : kendo.ui.TreeList; + data(key: "kendoTreeList"): kendo.ui.TreeList; kendoTreeMap(): JQuery; kendoTreeMap(options: kendo.dataviz.ui.TreeMapOptions): JQuery; - data(key: "kendoTreeMap") : kendo.dataviz.ui.TreeMap; + data(key: "kendoTreeMap"): kendo.dataviz.ui.TreeMap; kendoTreeView(): JQuery; kendoTreeView(options: kendo.ui.TreeViewOptions): JQuery; - data(key: "kendoTreeView") : kendo.ui.TreeView; + data(key: "kendoTreeView"): kendo.ui.TreeView; kendoUpload(): JQuery; kendoUpload(options: kendo.ui.UploadOptions): JQuery; - data(key: "kendoUpload") : kendo.ui.Upload; + data(key: "kendoUpload"): kendo.ui.Upload; kendoValidator(): JQuery; kendoValidator(options: kendo.ui.ValidatorOptions): JQuery; - data(key: "kendoValidator") : kendo.ui.Validator; + data(key: "kendoValidator"): kendo.ui.Validator; kendoWindow(): JQuery; kendoWindow(options: kendo.ui.WindowOptions): JQuery; - data(key: "kendoWindow") : kendo.ui.Window; + data(key: "kendoWindow"): kendo.ui.Window; } diff --git a/leaflet/leaflet.d.ts b/leaflet/leaflet.d.ts index cc4aa51b67..565a3c25de 100755 --- a/leaflet/leaflet.d.ts +++ b/leaflet/leaflet.d.ts @@ -4176,6 +4176,11 @@ declare namespace L { * When this option is set, the TileLayer only loads tiles that are in the given geographical bounds. */ bounds?: LatLngBounds; + + /** + * Custom keys may be specified in TileLayerOptions so they can be used in a provided URL template. + */ + [additionalKeys: string]: any; } } diff --git a/line-reader/line-reader-tests.ts b/line-reader/line-reader-tests.ts new file mode 100644 index 0000000000..4d6ce42466 --- /dev/null +++ b/line-reader/line-reader-tests.ts @@ -0,0 +1,29 @@ +/// + +import lineReader = require('line-reader'); + +lineReader.open('line-reader-tests.ts', function(err: Error, reader: LineReader) { + if (err) throw err; + if (reader.hasNextLine()) { + try { + reader.nextLine(function(err: Error, line: string) { + if (err) throw err; + console.log(line); + }); + } finally { + reader.close(function(err: Error) { + if (err) throw err; + }) + } + } + else { + reader.close(function(err: Error) { + if (err) throw err; + }); + } +}); + +lineReader.eachLine('line-reader.d.ts', {encoding: 'utf8'}, function(line: string, last: boolean) { + console.log(line); + if (last) console.log(''); +}); diff --git a/line-reader/line-reader.d.ts b/line-reader/line-reader.d.ts new file mode 100644 index 0000000000..f744dec6f8 --- /dev/null +++ b/line-reader/line-reader.d.ts @@ -0,0 +1,27 @@ +// Type definitions for line-reader +// Project: https://github.com/nickewing/line-reader +// Definitions by: Sam Saint-Pettersen +// Definitions: https://github.com/borisyankov/DefinitelyTyped + +interface LineReaderOptions { + separator?: any; + encoding?: string; + bufferSize?: number; +} + +interface LineReader { + eachLine(): Function; // For Promise.promisify; + open(): Function; + eachLine(file: string, cb: (line: string, last?: boolean, cb?: Function) => void): LineReader; + eachLine(file: string, options: LineReaderOptions, cb: (line: string, last?: boolean, cb?: Function) => void): LineReader; + open(file: string, cb: (err: Error, reader: LineReader) => void): void; + open(file: string, options: LineReaderOptions, cb: (err: Error, reader: LineReader) => void): void; + hasNextLine(): boolean; + nextLine(cb: (err: Error, line: string) => void): void; + close(cb: (err: Error) => void): void; +} + +declare module "line-reader" { + var lr: LineReader; + export = lr; +} diff --git a/linq/linq.d.ts b/linq/linq.d.ts index c15bc895e4..11bf36df92 100644 --- a/linq/linq.d.ts +++ b/linq/linq.d.ts @@ -205,9 +205,9 @@ declare module linq { } interface OrderedEnumerable extends Enumerable { - ThenBy(keySelector: ($) => T): OrderedEnumerable; + ThenBy(keySelector: ($: T) => any): OrderedEnumerable; ThenBy(keySelector: string): OrderedEnumerable; - ThenByDescending(keySelector: ($) => T): OrderedEnumerable; + ThenByDescending(keySelector: ($: T) => any): OrderedEnumerable; ThenByDescending(keySelector: string): OrderedEnumerable; } diff --git a/lodash/lodash-tests.ts b/lodash/lodash-tests.ts index 4c587b57b5..30c0b99344 100644 --- a/lodash/lodash-tests.ts +++ b/lodash/lodash-tests.ts @@ -811,18 +811,17 @@ module TestLastIndexOf { module TestObject { let arrayOfKeys: string[]; let arrayOfValues: number[]; + let arrayOfKeyValuePairs: (string|number)[][] let listOfKeys: _.List; let listOfValues: _.List; + let listOfKeyValuePairs: _.List<_.List>; { let result: _.Dictionary; result = _.object<_.Dictionary>(arrayOfKeys); result = _.object<_.Dictionary>(listOfKeys); - - result = _(arrayOfKeys).object<_.Dictionary>().value(); - result = _(listOfKeys).object<_.Dictionary>().value(); } { @@ -838,15 +837,8 @@ module TestObject { result = _.object>(listOfKeys, listOfValues); result = _.object>(listOfKeys, arrayOfValues); - result = _(arrayOfKeys).object<_.Dictionary>(arrayOfValues).value(); - result = _(arrayOfKeys).object<_.Dictionary>(listOfValues).value(); - result = _(listOfKeys).object<_.Dictionary>(listOfValues).value(); - result = _(listOfKeys).object<_.Dictionary>(arrayOfValues).value(); - - result = _(arrayOfKeys).object>(arrayOfValues).value(); - result = _(arrayOfKeys).object>(listOfValues).value(); - result = _(listOfKeys).object>(listOfValues).value(); - result = _(listOfKeys).object>(arrayOfValues).value(); + result = _.object<_.Dictionary>(arrayOfKeyValuePairs); + result = _.object<_.Dictionary>(listOfKeyValuePairs); } { @@ -860,13 +852,86 @@ module TestObject { result = _.object(listOfKeys, listOfValues); result = _.object(listOfKeys, arrayOfValues); - result = _(arrayOfKeys).object().value(); - result = _(arrayOfKeys).object(arrayOfValues).value(); - result = _(arrayOfKeys).object(listOfValues).value(); + result = _.object<_.Dictionary>(arrayOfKeyValuePairs); + result = _.object<_.Dictionary>(listOfKeyValuePairs); + } - result = _(listOfKeys).object().value(); - result = _(listOfKeys).object(listOfValues).value(); - result = _(listOfKeys).object(arrayOfValues).value(); + { + let result: _.LoDashImplicitObjectWrapper<_.Dictionary>; + + result = _(arrayOfKeys).object<_.Dictionary>(); + result = _(listOfKeys).object<_.Dictionary>(); + } + + { + let result: _.LoDashImplicitObjectWrapper<_.Dictionary>; + + result = _(arrayOfKeys).object<_.Dictionary>(arrayOfValues); + result = _(arrayOfKeys).object<_.Dictionary>(listOfValues); + result = _(listOfKeys).object<_.Dictionary>(listOfValues); + result = _(listOfKeys).object<_.Dictionary>(arrayOfValues); + + result = _(arrayOfKeys).object>(arrayOfValues); + result = _(arrayOfKeys).object>(listOfValues); + result = _(listOfKeys).object>(listOfValues); + result = _(listOfKeys).object>(arrayOfValues); + + result = _(listOfKeys).object<_.Dictionary>(arrayOfKeyValuePairs); + result = _(listOfKeys).object<_.Dictionary>(listOfKeyValuePairs); + } + + { + let result: _.LoDashImplicitObjectWrapper<_.Dictionary>; + + result = _(arrayOfKeys).object(); + result = _(arrayOfKeys).object(arrayOfValues); + result = _(arrayOfKeys).object(listOfValues); + + result = _(listOfKeys).object(); + result = _(listOfKeys).object(listOfValues); + result = _(listOfKeys).object(arrayOfValues); + + result = _(listOfKeys).object(arrayOfKeyValuePairs); + result = _(listOfKeys).object(listOfKeyValuePairs); + } + + { + let result: _.LoDashExplicitObjectWrapper<_.Dictionary>; + + result = _(arrayOfKeys).chain().object<_.Dictionary>(); + result = _(listOfKeys).chain().object<_.Dictionary>(); + } + + { + let result: _.LoDashExplicitObjectWrapper<_.Dictionary>; + + result = _(arrayOfKeys).chain().object<_.Dictionary>(arrayOfValues); + result = _(arrayOfKeys).chain().object<_.Dictionary>(listOfValues); + result = _(listOfKeys).chain().object<_.Dictionary>(listOfValues); + result = _(listOfKeys).chain().object<_.Dictionary>(arrayOfValues); + + result = _(arrayOfKeys).chain().object>(arrayOfValues); + result = _(arrayOfKeys).chain().object>(listOfValues); + result = _(listOfKeys).chain().object>(listOfValues); + result = _(listOfKeys).chain().object>(arrayOfValues); + + result = _(listOfKeys).chain().object<_.Dictionary>(arrayOfKeyValuePairs); + result = _(listOfKeys).chain().object<_.Dictionary>(listOfKeyValuePairs); + } + + { + let result: _.LoDashExplicitObjectWrapper<_.Dictionary>; + + result = _(arrayOfKeys).chain().object(); + result = _(arrayOfKeys).chain().object(arrayOfValues); + result = _(arrayOfKeys).chain().object(listOfValues); + + result = _(listOfKeys).chain().object(); + result = _(listOfKeys).chain().object(listOfValues); + result = _(listOfKeys).chain().object(arrayOfValues); + + result = _(listOfKeys).chain().object(arrayOfKeyValuePairs); + result = _(listOfKeys).chain().object(listOfKeyValuePairs); } } @@ -932,26 +997,51 @@ module TestPull { } // _.pullAt -{ - let testPullAtArray: TResult[]; - let testPullAtList: _.List; - let result: TResult[]; - result = _.pullAt(testPullAtArray); - result = _.pullAt(testPullAtArray, 1); - result = _.pullAt(testPullAtArray, [2, 3], 1); - result = _.pullAt(testPullAtArray, 4, [2, 3], 1); - result = _.pullAt(testPullAtList); - result = _.pullAt(testPullAtList, 1); - result = _.pullAt(testPullAtList, [2, 3], 1); - result = _.pullAt(testPullAtList, 4, [2, 3], 1); - result = _(testPullAtArray).pullAt().value(); - result = _(testPullAtArray).pullAt(1).value(); - result = _(testPullAtArray).pullAt([2, 3], 1).value(); - result = _(testPullAtArray).pullAt(4, [2, 3], 1).value(); - result = _(testPullAtList).pullAt().value(); - result = _(testPullAtList).pullAt(1).value(); - result = _(testPullAtList).pullAt([2, 3], 1).value(); - result = _(testPullAtList).pullAt(4, [2, 3], 1).value(); +module TestPullAt { + let array: TResult[]; + let list: _.List; + + { + let result: TResult[]; + + result = _.pullAt(array); + result = _.pullAt(array, 1); + result = _.pullAt(array, [2, 3], 1); + result = _.pullAt(array, 4, [2, 3], 1); + + result = _.pullAt(list); + result = _.pullAt(list, 1); + result = _.pullAt(list, [2, 3], 1); + result = _.pullAt(list, 4, [2, 3], 1); + } + + { + let result: _.LoDashImplicitArrayWrapper; + + result = _(array).pullAt(); + result = _(array).pullAt(1); + result = _(array).pullAt([2, 3], 1); + result = _(array).pullAt(4, [2, 3], 1); + + result = _(list).pullAt(); + result = _(list).pullAt(1); + result = _(list).pullAt([2, 3], 1); + result = _(list).pullAt(4, [2, 3], 1); + } + + { + let result: _.LoDashExplicitArrayWrapper; + + result = _(array).chain().pullAt(); + result = _(array).chain().pullAt(1); + result = _(array).chain().pullAt([2, 3], 1); + result = _(array).chain().pullAt(4, [2, 3], 1); + + result = _(list).chain().pullAt(); + result = _(list).chain().pullAt(1); + result = _(list).chain().pullAt([2, 3], 1); + result = _(list).chain().pullAt(4, [2, 3], 1); + } } // _.remove @@ -1408,6 +1498,39 @@ result = _(['A', 'b', 'C', 'a', 'B', 'c']).unique(function (letter) { result = _([1, 2.5, 3, 1.5, 2, 3.5]).unique(function (num) { return this.floor(num); }, Math).value(); result = <{ x: number; }[]>_([{ 'x': 1 }, { 'x': 2 }, { 'x': 1 }]).unique('x').value(); +// _.upzip +module TestUnzip { + let array = [['a', 'b'], [1, 2], [true, false]]; + + let list: _.List<_.List> = { + 0: {0: 'a', 1: 'b', length: 2}, + 1: {0: 1, 1: 2, length: 2}, + 2: {0: true, 1: false, length: 2}, + length: 3 + }; + + { + let result: (string|number|boolean)[][]; + + result = _.unzip(array); + result = _.unzip(list); + } + + { + let result: _.LoDashImplicitArrayWrapper<(string|number|boolean)[]>; + + result = _(array).unzip(); + result = _(list).unzip(); + } + + { + let result: _.LoDashExplicitArrayWrapper<(string|number|boolean)[]>; + + result = _(array).chain().unzip(); + result = _(list).chain().unzip(); + } +} + // _.unzipWith { let testUnzipWithArray: (number[]|_.List)[]; @@ -1427,74 +1550,149 @@ result = <{ x: number; }[]>_([{ 'x': 1 }, { 'x': 2 }, { 'x': 1 }]).unique('x').v } // _.without -{ - let testWithoutArray: number[]; - let testWithoutList: _.List; - let result: number[]; - result = _.without(testWithoutArray); - result = _.without(testWithoutArray, 1); - result = _.without(testWithoutArray, 1, 2); - result = _.without(testWithoutArray, 1, 2, 3); - result = _.without(testWithoutList); - result = _.without(testWithoutList, 1); - result = _.without(testWithoutList, 1, 2); - result = _.without(testWithoutList, 1, 2, 3); - result = _(testWithoutArray).without().value(); - result = _(testWithoutArray).without(1).value(); - result = _(testWithoutArray).without(1, 2).value(); - result = _(testWithoutArray).without(1, 2, 3).value(); - result = _(testWithoutList).without().value(); - result = _(testWithoutList).without(1).value(); - result = _(testWithoutList).without(1, 2).value(); - result = _(testWithoutList).without(1, 2, 3).value(); +module TestWithout { + let array: number[]; + let list: _.List; + + { + let result: number[]; + + result = _.without(array); + result = _.without(array, 1); + result = _.without(array, 1, 2); + result = _.without(array, 1, 2, 3); + + result = _.without(list); + result = _.without(list, 1); + result = _.without(list, 1, 2); + result = _.without(list, 1, 2, 3); + } + + { + let result: _.LoDashImplicitArrayWrapper; + + result = _(array).without(); + result = _(array).without(1); + result = _(array).without(1, 2); + result = _(array).without(1, 2, 3); + result = _(list).without(); + result = _(list).without(1); + result = _(list).without(1, 2); + result = _(list).without(1, 2, 3); + } + + { + let result: _.LoDashExplicitArrayWrapper; + + result = _(array).chain().without(); + result = _(array).chain().without(1); + result = _(array).chain().without(1, 2); + result = _(array).chain().without(1, 2, 3); + + result = _(list).chain().without(); + result = _(list).chain().without(1); + result = _(list).chain().without(1, 2); + result = _(list).chain().without(1, 2, 3); + } } // _.xor module TestXor { let array: TResult[]; let list: _.List; - let result: TResult[]; - result = _.xor(); + { + let result: TResult[]; - result = _.xor(array); - result = _.xor(array, list); - result = _.xor(array, list, array); + result = _.xor(); - result = _.xor(list); - result = _.xor(list, array); - result = _.xor(list, array, list); + result = _.xor(array); + result = _.xor(array, list); + result = _.xor(array, list, array); - result = _(array).xor().value(); - result = _(array).xor(list).value(); - result = _(array).xor(list, array).value(); + result = _.xor(list); + result = _.xor(list, array); + result = _.xor(list, array, list); + } - result = _(list).xor().value(); - result = _(list).xor(array).value(); - result = _(list).xor(array, list).value(); + { + let result: _.LoDashImplicitArrayWrapper; + + result = _(array).xor(); + result = _(array).xor(list); + result = _(array).xor(list, array); + + result = _(list).xor(); + result = _(list).xor(array); + result = _(list).xor(array, list); + } + + { + let result: _.LoDashExplicitArrayWrapper; + + result = _(array).chain().xor(); + result = _(array).chain().xor(list); + result = _(array).chain().xor(list, array); + + result = _(list).chain().xor(); + result = _(list).chain().xor(array); + result = _(list).chain().xor(array, list); + } } -result = _.zip(['moe', 'larry'], [30, 40], [true, false]); -result = _.unzip(['moe', 'larry'], [30, 40], [true, false]); -result = _(['moe', 'larry']).zip([30, 40], [true, false]).value(); -result = _(['moe', 'larry']).unzip([30, 40], [true, false]).value(); +// _.zip +module TestZip { + let array: TResult[]; + let list: _.List; + + { + let result: TResult[][]; + + result = _.zip(array); + result = _.zip(array, list); + result = _.zip(array, list, array); + + result = _.zip(list); + result = _.zip(list, array); + result = _.zip(list, array, list); + } + + { + let result: _.LoDashImplicitArrayWrapper; + + result = _(array).zip(list); + result = _(array).zip(list, array); + + result = _(list).zip(array); + result = _(list).zip(array, list); + } + + { + let result: _.LoDashExplicitArrayWrapper; + + result = _(array).chain().zip(list); + result = _(array).chain().zip(list, array); + + result = _(list).chain().zip(array); + result = _(list).chain().zip(array, list); + } +} // _.zipObject module TestZipObject { let arrayOfKeys: string[]; let arrayOfValues: number[]; + let arrayOfKeyValuePairs: (string|number)[][] let listOfKeys: _.List; let listOfValues: _.List; + let listOfKeyValuePairs: _.List<_.List>; { let result: _.Dictionary; result = _.zipObject<_.Dictionary>(arrayOfKeys); result = _.zipObject<_.Dictionary>(listOfKeys); - - result = _(arrayOfKeys).zipObject<_.Dictionary>().value(); - result = _(listOfKeys).zipObject<_.Dictionary>().value(); } { @@ -1510,15 +1708,8 @@ module TestZipObject { result = _.zipObject>(listOfKeys, listOfValues); result = _.zipObject>(listOfKeys, arrayOfValues); - result = _(arrayOfKeys).zipObject<_.Dictionary>(arrayOfValues).value(); - result = _(arrayOfKeys).zipObject<_.Dictionary>(listOfValues).value(); - result = _(listOfKeys).zipObject<_.Dictionary>(listOfValues).value(); - result = _(listOfKeys).zipObject<_.Dictionary>(arrayOfValues).value(); - - result = _(arrayOfKeys).zipObject>(arrayOfValues).value(); - result = _(arrayOfKeys).zipObject>(listOfValues).value(); - result = _(listOfKeys).zipObject>(listOfValues).value(); - result = _(listOfKeys).zipObject>(arrayOfValues).value(); + result = _.zipObject<_.Dictionary>(arrayOfKeyValuePairs); + result = _.zipObject<_.Dictionary>(listOfKeyValuePairs); } { @@ -1532,13 +1723,86 @@ module TestZipObject { result = _.zipObject(listOfKeys, listOfValues); result = _.zipObject(listOfKeys, arrayOfValues); - result = _(arrayOfKeys).zipObject().value(); - result = _(arrayOfKeys).zipObject(arrayOfValues).value(); - result = _(arrayOfKeys).zipObject(listOfValues).value(); + result = _.zipObject<_.Dictionary>(arrayOfKeyValuePairs); + result = _.zipObject<_.Dictionary>(listOfKeyValuePairs); + } - result = _(listOfKeys).zipObject().value(); - result = _(listOfKeys).zipObject(listOfValues).value(); - result = _(listOfKeys).zipObject(arrayOfValues).value(); + { + let result: _.LoDashImplicitObjectWrapper<_.Dictionary>; + + result = _(arrayOfKeys).zipObject<_.Dictionary>(); + result = _(listOfKeys).zipObject<_.Dictionary>(); + } + + { + let result: _.LoDashImplicitObjectWrapper<_.Dictionary>; + + result = _(arrayOfKeys).zipObject<_.Dictionary>(arrayOfValues); + result = _(arrayOfKeys).zipObject<_.Dictionary>(listOfValues); + result = _(listOfKeys).zipObject<_.Dictionary>(listOfValues); + result = _(listOfKeys).zipObject<_.Dictionary>(arrayOfValues); + + result = _(arrayOfKeys).zipObject>(arrayOfValues); + result = _(arrayOfKeys).zipObject>(listOfValues); + result = _(listOfKeys).zipObject>(listOfValues); + result = _(listOfKeys).zipObject>(arrayOfValues); + + result = _(listOfKeys).zipObject<_.Dictionary>(arrayOfKeyValuePairs); + result = _(listOfKeys).zipObject<_.Dictionary>(listOfKeyValuePairs); + } + + { + let result: _.LoDashImplicitObjectWrapper<_.Dictionary>; + + result = _(arrayOfKeys).zipObject(); + result = _(arrayOfKeys).zipObject(arrayOfValues); + result = _(arrayOfKeys).zipObject(listOfValues); + + result = _(listOfKeys).zipObject(); + result = _(listOfKeys).zipObject(listOfValues); + result = _(listOfKeys).zipObject(arrayOfValues); + + result = _(listOfKeys).zipObject(arrayOfKeyValuePairs); + result = _(listOfKeys).zipObject(listOfKeyValuePairs); + } + + { + let result: _.LoDashExplicitObjectWrapper<_.Dictionary>; + + result = _(arrayOfKeys).chain().zipObject<_.Dictionary>(); + result = _(listOfKeys).chain().zipObject<_.Dictionary>(); + } + + { + let result: _.LoDashExplicitObjectWrapper<_.Dictionary>; + + result = _(arrayOfKeys).chain().zipObject<_.Dictionary>(arrayOfValues); + result = _(arrayOfKeys).chain().zipObject<_.Dictionary>(listOfValues); + result = _(listOfKeys).chain().zipObject<_.Dictionary>(listOfValues); + result = _(listOfKeys).chain().zipObject<_.Dictionary>(arrayOfValues); + + result = _(arrayOfKeys).chain().zipObject>(arrayOfValues); + result = _(arrayOfKeys).chain().zipObject>(listOfValues); + result = _(listOfKeys).chain().zipObject>(listOfValues); + result = _(listOfKeys).chain().zipObject>(arrayOfValues); + + result = _(listOfKeys).chain().zipObject<_.Dictionary>(arrayOfKeyValuePairs); + result = _(listOfKeys).chain().zipObject<_.Dictionary>(listOfKeyValuePairs); + } + + { + let result: _.LoDashExplicitObjectWrapper<_.Dictionary>; + + result = _(arrayOfKeys).chain().zipObject(); + result = _(arrayOfKeys).chain().zipObject(arrayOfValues); + result = _(arrayOfKeys).chain().zipObject(listOfValues); + + result = _(listOfKeys).chain().zipObject(); + result = _(listOfKeys).chain().zipObject(listOfValues); + result = _(listOfKeys).chain().zipObject(arrayOfValues); + + result = _(listOfKeys).chain().zipObject(arrayOfKeyValuePairs); + result = _(listOfKeys).chain().zipObject(listOfKeyValuePairs); } } @@ -2397,35 +2661,51 @@ module TestCollect { } } -result = _.contains([1, 2, 3], 1); -result = _.contains([1, 2, 3], 1, 2); -result = _.contains({ 'moe': 30, 'larry': 40, 'curly': 67 }, 40); -result = _.contains('curly', 'ur'); +// _.contains +module TestContains { + type SampleType = {a: string; b: number; c: boolean;}; -result = _([1, 2, 3]).contains(1); -result = _([1, 2, 3]).contains(1, 2); -result = _({ 'moe': 30, 'larry': 40, 'curly': 67 }).contains(40); -result = _('curly').contains('ur'); + let array: SampleType[]; + let list: _.List; + let dictionary: _.Dictionary; -result = _.include([1, 2, 3], 1); -result = _.include([1, 2, 3], 1, 2); -result = _.include({ 'moe': 30, 'larry': 40, 'curly': 67 }, 40); -result = _.include('curly', 'ur'); + let target: SampleType; -result = _([1, 2, 3]).include(1); -result = _([1, 2, 3]).include(1, 2); -result = _({ 'moe': 30, 'larry': 40, 'curly': 67 }).include(40); -result = _('curly').include('ur'); + { + let result: boolean; -result = _.includes([1, 2, 3], 1); -result = _.includes([1, 2, 3], 1, 2); -result = _.includes({ 'moe': 30, 'larry': 40, 'curly': 67 }, 40); -result = _.includes('curly', 'ur'); + result = _.contains(array, target); + result = _.contains(array, target, 42); -result = _([1, 2, 3]).includes(1); -result = _([1, 2, 3]).includes(1, 2); -result = _({ 'moe': 30, 'larry': 40, 'curly': 67 }).includes(40); -result = _('curly').includes('ur'); + result = _.contains(list, target); + result = _.contains(list, target, 42); + + result = _.contains(dictionary, target); + result = _.contains(dictionary, target, 42); + + result = _(array).contains(target); + result = _(array).contains(target, 42); + + result = _(list).contains(target); + result = _(list).contains(target, 42); + + result = _(dictionary).contains(target); + result = _(dictionary).contains(target, 42); + } + + { + let result: _.LoDashExplicitWrapper; + + result = _(array).chain().contains(target); + result = _(array).chain().contains(target, 42); + + result = _(list).chain().contains(target); + result = _(list).chain().contains(target, 42); + + result = _(dictionary).chain().contains(target); + result = _(dictionary).chain().contains(target, 42); + } +} result = <_.Dictionary>_.countBy([4.3, 6.1, 6.4], function (num) { return Math.floor(num); }); result = <_.Dictionary>_.countBy([4.3, 6.1, 6.4], function (num) { return this.floor(num); }, Math); @@ -2745,22 +3025,103 @@ module TestEvery { } } -result = _.filter([1, 2, 3, 4, 5, 6]); -result = _.filter([1, 2, 3, 4, 5, 6], function (num) { return num % 2 == 0; }); -result = _.filter(foodsCombined, 'organic'); -result = _.filter(foodsCombined, { 'type': 'fruit' }); +// _.filter +module TestFilter { + let array: TResult[]; + let list: _.List; + let dictionary: _.Dictionary; -result = _([1, 2, 3, 4, 5, 6]).filter(function (num) { return num % 2 == 0; }).value(); -result = _(foodsCombined).filter('organic').value(); -result = _(foodsCombined).filter({ 'type': 'fruit' }).value(); + let stringIterator: (char: string, index: number, string: string) => any; + let listIterator: (value: TResult, index: number, collection: _.List) => any; + let dictionaryIterator: (value: TResult, key: string, collection: _.Dictionary) => any; -result = _.select([1, 2, 3, 4, 5, 6], function (num) { return num % 2 == 0; }); -result = _.select(foodsCombined, 'organic'); -result = _.select(foodsCombined, { 'type': 'fruit' }); + { + let result: string[]; -result = _([1, 2, 3, 4, 5, 6]).select(function (num) { return num % 2 == 0; }).value(); -result = _(foodsCombined).select('organic').value(); -result = _(foodsCombined).select({ 'type': 'fruit' }).value(); + result = _.filter('', stringIterator); + result = _.filter('', stringIterator, any); + } + + { + let result: TResult[]; + + result = _.filter(array, listIterator); + result = _.filter(array, listIterator, any); + result = _.filter(array, ''); + result = _.filter(array, '', any); + result = _.filter<{a: number}, TResult>(array, {a: 42}); + + result = _.filter(list, listIterator); + result = _.filter(list, listIterator, any); + result = _.filter(list, ''); + result = _.filter(list, '', any); + result = _.filter<{a: number}, TResult>(list, {a: 42}); + + result = _.filter(dictionary, dictionaryIterator); + result = _.filter(dictionary, dictionaryIterator, any); + result = _.filter(dictionary, ''); + result = _.filter(dictionary, '', any); + result = _.filter<{a: number}, TResult>(dictionary, {a: 42}); + } + + { + let result: _.LoDashImplicitArrayWrapper; + + result = _('').filter(stringIterator); + result = _('').filter(stringIterator, any); + } + + { + let result: _.LoDashImplicitArrayWrapper; + + result = _(array).filter(listIterator); + result = _(array).filter(listIterator, any); + result = _(array).filter(''); + result = _(array).filter('', any); + result = _(array).filter<{a: number}>({a: 42}); + + result = _(list).filter(listIterator); + result = _(list).filter(listIterator, any); + result = _(list).filter(''); + result = _(list).filter('', any); + result = _(list).filter<{a: number}, TResult>({a: 42}); + + result = _(dictionary).filter(dictionaryIterator); + result = _(dictionary).filter(dictionaryIterator, any); + result = _(dictionary).filter(''); + result = _(dictionary).filter('', any); + result = _(dictionary).filter<{a: number}, TResult>({a: 42}); + } + + { + let result: _.LoDashExplicitArrayWrapper; + + result = _('').chain().filter(stringIterator); + result = _('').chain().filter(stringIterator, any); + } + + { + let result: _.LoDashExplicitArrayWrapper; + + result = _(array).chain().filter(listIterator); + result = _(array).chain().filter(listIterator, any); + result = _(array).chain().filter(''); + result = _(array).chain().filter('', any); + result = _(array).chain().filter<{a: number}>({a: 42}); + + result = _(list).chain().filter(listIterator); + result = _(list).chain().filter(listIterator, any); + result = _(list).chain().filter(''); + result = _(list).chain().filter('', any); + result = _(list).chain().filter<{a: number}, TResult>({a: 42}); + + result = _(dictionary).chain().filter(dictionaryIterator); + result = _(dictionary).chain().filter(dictionaryIterator, any); + result = _(dictionary).chain().filter(''); + result = _(dictionary).chain().filter('', any); + result = _(dictionary).chain().filter<{a: number}, TResult>({a: 42}); + } +} // _.find module TestFind { @@ -3034,6 +3395,98 @@ result = <_.Dictionary>_({ prop1: 4.2, prop2: 6.1, prop3: 6.4}).groupB result = <_.Dictionary>_({ prop1: 4.2, prop2: 6.1, prop3: 6.4}).groupBy(function (num) { return this.floor(num); }, Math).value(); result = <_.Dictionary>_({ prop1: 'one', prop2: 'two', prop3: 'three'}).groupBy('length').value(); +// _.include +module TestInclude { + type SampleType = {a: string; b: number; c: boolean;}; + + let array: SampleType[]; + let list: _.List; + let dictionary: _.Dictionary; + + let target: SampleType; + + { + let result: boolean; + + result = _.include(array, target); + result = _.include(array, target, 42); + + result = _.include(list, target); + result = _.include(list, target, 42); + + result = _.include(dictionary, target); + result = _.include(dictionary, target, 42); + + result = _(array).include(target); + result = _(array).include(target, 42); + + result = _(list).include(target); + result = _(list).include(target, 42); + + result = _(dictionary).include(target); + result = _(dictionary).include(target, 42); + } + + { + let result: _.LoDashExplicitWrapper; + + result = _(array).chain().include(target); + result = _(array).chain().include(target, 42); + + result = _(list).chain().include(target); + result = _(list).chain().include(target, 42); + + result = _(dictionary).chain().include(target); + result = _(dictionary).chain().include(target, 42); + } +} + +// _.includes +module TestIncludes { + type SampleType = {a: string; b: number; c: boolean;}; + + let array: SampleType[]; + let list: _.List; + let dictionary: _.Dictionary; + + let target: SampleType; + + { + let result: boolean; + + result = _.includes(array, target); + result = _.includes(array, target, 42); + + result = _.includes(list, target); + result = _.includes(list, target, 42); + + result = _.includes(dictionary, target); + result = _.includes(dictionary, target, 42); + + result = _(array).includes(target); + result = _(array).includes(target, 42); + + result = _(list).includes(target); + result = _(list).includes(target, 42); + + result = _(dictionary).includes(target); + result = _(dictionary).includes(target, 42); + } + + { + let result: _.LoDashExplicitWrapper; + + result = _(array).chain().includes(target); + result = _(array).chain().includes(target, 42); + + result = _(list).chain().includes(target); + result = _(list).chain().includes(target, 42); + + result = _(dictionary).chain().includes(target); + result = _(dictionary).chain().includes(target, 42); + } +} + result = <_.Dictionary>_.indexBy(keys, 'dir'); result = <_.Dictionary>_.indexBy(keys, function (key) { return String.fromCharCode(key.code); }); result = <_.Dictionary>_.indexBy(keys, function (key) { this.fromCharCode(key.code); }, String); @@ -3281,13 +3734,103 @@ result = _({ 'a': 1, 'b': 2, 'c': 3 }).inject(function (r: ABC result = _.reduceRight([[0, 1], [2, 3], [4, 5]], function (a: number[], b: number[]) { return a.concat(b); }, []); result = _.foldr([[0, 1], [2, 3], [4, 5]], function (a: number[], b: number[]) { return a.concat(b); }, []); -result = _.reject([1, 2, 3, 4, 5, 6], function (num) { return num % 2 == 0; }); -result = _.reject(foodsCombined, 'organic'); -result = _.reject(foodsCombined, { 'type': 'fruit' }); +// _.reject +module TestReject { + let array: TResult[]; + let list: _.List; + let dictionary: _.Dictionary; -result = _([1, 2, 3, 4, 5, 6]).reject(function (num) { return num % 2 == 0; }).value(); -result = _(foodsCombined).reject('organic').value(); -result = _(foodsCombined).reject({ 'type': 'fruit' }).value(); + let stringIterator: (char: string, index: number, string: string) => any; + let listIterator: (value: TResult, index: number, collection: _.List) => any; + let dictionaryIterator: (value: TResult, key: string, collection: _.Dictionary) => any; + + { + let result: string[]; + + result = _.reject('', stringIterator); + result = _.reject('', stringIterator, any); + } + + { + let result: TResult[]; + + result = _.reject(array, listIterator); + result = _.reject(array, listIterator, any); + result = _.reject(array, ''); + result = _.reject(array, '', any); + result = _.reject<{a: number}, TResult>(array, {a: 42}); + + result = _.reject(list, listIterator); + result = _.reject(list, listIterator, any); + result = _.reject(list, ''); + result = _.reject(list, '', any); + result = _.reject<{a: number}, TResult>(list, {a: 42}); + + result = _.reject(dictionary, dictionaryIterator); + result = _.reject(dictionary, dictionaryIterator, any); + result = _.reject(dictionary, ''); + result = _.reject(dictionary, '', any); + result = _.reject<{a: number}, TResult>(dictionary, {a: 42}); + } + + { + let result: _.LoDashImplicitArrayWrapper; + + result = _('').reject(stringIterator); + result = _('').reject(stringIterator, any); + } + + { + let result: _.LoDashImplicitArrayWrapper; + + result = _(array).reject(listIterator); + result = _(array).reject(listIterator, any); + result = _(array).reject(''); + result = _(array).reject('', any); + result = _(array).reject<{a: number}>({a: 42}); + + result = _(list).reject(listIterator); + result = _(list).reject(listIterator, any); + result = _(list).reject(''); + result = _(list).reject('', any); + result = _(list).reject<{a: number}, TResult>({a: 42}); + + result = _(dictionary).reject(dictionaryIterator); + result = _(dictionary).reject(dictionaryIterator, any); + result = _(dictionary).reject(''); + result = _(dictionary).reject('', any); + result = _(dictionary).reject<{a: number}, TResult>({a: 42}); + } + + { + let result: _.LoDashExplicitArrayWrapper; + + result = _('').chain().reject(stringIterator); + result = _('').chain().reject(stringIterator, any); + } + + { + let result: _.LoDashExplicitArrayWrapper; + + result = _(array).chain().reject(listIterator); + result = _(array).chain().reject(listIterator, any); + result = _(array).chain().reject(''); + result = _(array).chain().reject('', any); + result = _(array).chain().reject<{a: number}>({a: 42}); + + result = _(list).chain().reject(listIterator); + result = _(list).chain().reject(listIterator, any); + result = _(list).chain().reject(''); + result = _(list).chain().reject('', any); + result = _(list).chain().reject<{a: number}, TResult>({a: 42}); + + result = _(dictionary).chain().reject(dictionaryIterator); + result = _(dictionary).chain().reject(dictionaryIterator, any); + result = _(dictionary).chain().reject(''); + result = _(dictionary).chain().reject('', any); + result = _(dictionary).chain().reject<{a: number}, TResult>({a: 42}); + } +} result = _.sample([1, 2, 3, 4]); result = _.sample([1, 2, 3, 4], 2); @@ -3296,6 +3839,104 @@ result = <_.LoDashImplicitArrayWrapper>_([1, 2, 3, 4]).sample(2); result = _([1, 2, 3, 4]).sample().value(); result = _([1, 2, 3, 4]).sample(2).value(); +// _.select +module TestSelect { + let array: TResult[]; + let list: _.List; + let dictionary: _.Dictionary; + + let stringIterator: (char: string, index: number, string: string) => any; + let listIterator: (value: TResult, index: number, collection: _.List) => any; + let dictionaryIterator: (value: TResult, key: string, collection: _.Dictionary) => any; + + { + let result: string[]; + + result = _.select('', stringIterator); + result = _.select('', stringIterator, any); + } + + { + let result: TResult[]; + + result = _.select(array, listIterator); + result = _.select(array, listIterator, any); + result = _.select(array, ''); + result = _.select(array, '', any); + result = _.select<{a: number}, TResult>(array, {a: 42}); + + result = _.select(list, listIterator); + result = _.select(list, listIterator, any); + result = _.select(list, ''); + result = _.select(list, '', any); + result = _.select<{a: number}, TResult>(list, {a: 42}); + + result = _.select(dictionary, dictionaryIterator); + result = _.select(dictionary, dictionaryIterator, any); + result = _.select(dictionary, ''); + result = _.select(dictionary, '', any); + result = _.select<{a: number}, TResult>(dictionary, {a: 42}); + } + + { + let result: _.LoDashImplicitArrayWrapper; + + result = _('').select(stringIterator); + result = _('').select(stringIterator, any); + } + + { + let result: _.LoDashImplicitArrayWrapper; + + result = _(array).select(listIterator); + result = _(array).select(listIterator, any); + result = _(array).select(''); + result = _(array).select('', any); + result = _(array).select<{a: number}>({a: 42}); + + result = _(list).select(listIterator); + result = _(list).select(listIterator, any); + result = _(list).select(''); + result = _(list).select('', any); + result = _(list).select<{a: number}, TResult>({a: 42}); + + result = _(dictionary).select(dictionaryIterator); + result = _(dictionary).select(dictionaryIterator, any); + result = _(dictionary).select(''); + result = _(dictionary).select('', any); + result = _(dictionary).select<{a: number}, TResult>({a: 42}); + } + + { + let result: _.LoDashExplicitArrayWrapper; + + result = _('').chain().select(stringIterator); + result = _('').chain().select(stringIterator, any); + } + + { + let result: _.LoDashExplicitArrayWrapper; + + result = _(array).chain().select(listIterator); + result = _(array).chain().select(listIterator, any); + result = _(array).chain().select(''); + result = _(array).chain().select('', any); + result = _(array).chain().select<{a: number}>({a: 42}); + + result = _(list).chain().select(listIterator); + result = _(list).chain().select(listIterator, any); + result = _(list).chain().select(''); + result = _(list).chain().select('', any); + result = _(list).chain().select<{a: number}, TResult>({a: 42}); + + result = _(dictionary).chain().select(dictionaryIterator); + result = _(dictionary).chain().select(dictionaryIterator, any); + result = _(dictionary).chain().select(''); + result = _(dictionary).chain().select('', any); + result = _(dictionary).chain().select<{a: number}, TResult>({a: 42}); + } +} + // _.shuffle module TestShuffle { let array: TResult[]; @@ -3345,11 +3986,37 @@ module TestShuffle { } } -result = _.size([1, 2]); -result = _([1, 2]).size(); -result = _.size({ 'one': 1, 'two': 2, 'three': 3 }); -result = _({ 'one': 1, 'two': 2, 'three': 3 }).size(); -result = _.size('curly'); +// _.size +module TestSize { + type SampleType = {a: string; b: number; c: boolean;}; + + let array: SampleType[]; + let list: _.List; + let dictionary: _.Dictionary; + + { + let result: number; + + result = _.size(array); + result = _.size(list); + result = _.size(dictionary); + result = _.size(''); + + result = _(array).size(); + result = _(list).size(); + result = _(dictionary).size(); + result = _('').size(); + } + + { + let result: _.LoDashExplicitWrapper; + + result = _(array).chain().size(); + result = _(list).chain().size(); + result = _(dictionary).chain().size(); + result = _('').chain().size(); + } +} // _.some module TestSome { @@ -3576,8 +4243,34 @@ module TestAfter { } // _.ary -result = ['6', '8', '10'].map(_.ary<(s: string) => number>(parseInt, 1)); -result = ['6', '8', '10'].map(_(parseInt).ary<(s: string) => number>(1).value()); +module TestAry { + type SampleFunc = (a: number, b: string) => boolean; + + let func: SampleFunc; + + { + let result: SampleFunc; + + result = _.ary(func); + result = _.ary(func, 2); + result = _.ary(func); + result = _.ary(func, 2); + } + + { + let result: _.LoDashImplicitObjectWrapper; + + result = _(func).ary(); + result = _(func).ary(2); + } + + { + let result: _.LoDashExplicitObjectWrapper; + + result = _(func).chain().ary(); + result = _(func).chain().ary(2); + } +} // _.backflow module TestBackflow { @@ -3783,9 +4476,36 @@ returnedThrottled(4); result = _.defer(function () { console.log('deferred'); }); result = <_.LoDashImplicitWrapper>_(function () { console.log('deferred'); }).defer(); -var log = _.bind(console.log, console); -result = _.delay(log, 1000, 'logged later'); -result = <_.LoDashImplicitWrapper>_(log).delay(1000, 'logged later'); +// _.delay +module TestDelay { + type SampleFunc = (a: number, b: string) => boolean; + + let func: SampleFunc; + + { + let result: number; + + result = _.delay(func, 1); + result = _.delay(func, 1, 2); + result = _.delay(func, 1, 2, ''); + } + + { + let result: _.LoDashImplicitWrapper; + + result = _(func).delay(1); + result = _(func).delay(1, 2); + result = _(func).delay(1, 2, ''); + } + + { + let result: _.LoDashExplicitWrapper; + + result = _(func).chain().delay(1); + result = _(func).chain().delay(1, 2); + result = _(func).chain().delay(1, 2, ''); + } +} // _.flow var testFlowSquareFn = (n: number) => n * n; @@ -3840,25 +4560,58 @@ var returnedMemoize = _.throttle(function (a: any) { return a * 5; }, 5); returnedMemoize(4); // _.modArgs -function modArgsFn1(n: number): string {return n.toString()} -function modArgsFn2(n: boolean): string {return n.toString()} -interface ModArgsFunc { - (x: string, y: string): string[]; +module TestModArgs { + type Func1 = (a: boolean) => boolean; + type Func2 = (a: boolean, b: boolean) => boolean; + + let func1: Func1; + let func2: Func2; + + let transform1: (a: string) => boolean; + let transform2: (b: number) => boolean; + + { + let result: (a: string) => boolean; + + result = _.modArgs boolean>(func1, transform1); + result = _.modArgs boolean>(func1, [transform1]); + } + + { + let result: (a: string, b: number) => boolean; + + result = _.modArgs boolean>(func2, transform1, transform2); + result = _.modArgs boolean>(func2, [transform1, transform2]); + } + + { + let result: _.LoDashImplicitObjectWrapper<(a: string) => boolean>; + + result = _(func1).modArgs<(a: string) => boolean>(transform1); + result = _(func1).modArgs<(a: string) => boolean>([transform1]); + } + + { + let result: _.LoDashImplicitObjectWrapper<(a: string, b: number) => boolean>; + + result = _(func2).modArgs<(a: string, b: number) => boolean>(transform1, transform2); + result = _(func2).modArgs<(a: string, b: number) => boolean>([transform1, transform2]); + } + + { + let result: _.LoDashExplicitObjectWrapper<(a: string) => boolean>; + + result = _(func1).chain().modArgs<(a: string) => boolean>(transform1); + result = _(func1).chain().modArgs<(a: string) => boolean>([transform1]); + } + + { + let result: _.LoDashExplicitObjectWrapper<(a: string, b: number) => boolean>; + + result = _(func2).chain().modArgs<(a: string, b: number) => boolean>(transform1, transform2); + result = _(func2).chain().modArgs<(a: string, b: number) => boolean>([transform1, transform2]); + } } -interface ModArgsResult { - (x: number, y: boolean): string[] -} -result = _.modArgs((x: string, y: string) => [x, y], modArgsFn1, modArgsFn2); -result = result(1, true); - -result = _.modArgs((x: string, y: string) => [x, y], [modArgsFn1, modArgsFn2]); -result = result(1, true); - -result = _((x: string, y: string) => [x, y]).modArgs(modArgsFn1, modArgsFn2).value(); -result = result(1, true); - -result = _((x: string, y: string) => [x, y]).modArgs([modArgsFn1, modArgsFn2]).value(); -result = result(1, true); // _.negate interface TestNegatePredicate { @@ -3927,17 +4680,37 @@ result = (_.rearg(testReargFn, [2, 0, 1]))('b', 'c' result = (_(testReargFn).rearg(2, 0, 1).value())('b', 'c', 'a'); result = (_(testReargFn).rearg([2, 0, 1]).value())('b', 'c', 'a'); -//_.restParam -var testRestParamFn = (a: string, b: string, c: number[]) => a + ' ' + b + ' ' + c.join(' '); -interface testRestParamFunc { - (a: string, b: string, c: number[]): string; +// _.restParam +module TestRestParam { + type Func = (a: string, b: number[]) => boolean; + type ResultFunc = (a: string, ...b: number[]) => boolean; + + let func: Func; + + { + let result: ResultFunc; + + result = _.restParam(func); + result = _.restParam(func, 1); + + result = _.restParam(func); + result = _.restParam(func, 1); + } + + { + let result: _.LoDashImplicitObjectWrapper; + + result = _(func).restParam(); + result = _(func).restParam(1); + } + + { + let result: _.LoDashExplicitObjectWrapper; + + result = _(func).chain().restParam(); + result = _(func).chain().restParam(1); + } } -interface testRestParamResult { - (a: string, b: string, ...c: number[]): string; -} -result = (_.restParam(testRestParamFn, 2))('a', 'b', 1, 2, 3); -result = (_.restParam(testRestParamFn, 2))('a', 'b', 1, 2, 3); -result = (_(testRestParamFn).restParam(2).value())('a', 'b', 1, 2, 3); //_.spread var testSpreadFn = (who: string, what: string) => who + ' says ' + what; @@ -4077,16 +4850,44 @@ module TestEq { } // _.gt -result = _.gt(1, 2); -result = _(1).gt(2); -result = _([]).gt(2); -result = _({}).gt(2); +module TestGt { + { + let result: boolean; + + result = _.gt(any, any); + result = _(1).gt(any); + result = _([]).gt(any); + result = _({}).gt(any); + } + + { + let result: _.LoDashExplicitWrapper; + + result = _(1).chain().gt(any); + result = _([]).chain().gt(any); + result = _({}).chain().gt(any); + } +} // _.gte -result = _.gte(1, 2); -result = _(1).gte(2); -result = _([]).gte(2); -result = _({}).gte(2); +module TestGte { + { + let result: boolean; + + result = _.gte(any, any); + result = _(1).gte(any); + result = _([]).gte(any); + result = _({}).gte(any); + } + + { + let result: _.LoDashExplicitWrapper; + + result = _(1).chain().gte(any); + result = _([]).chain().gte(any); + result = _({}).chain().gte(any); + } +} // _.isArguments result = _.isArguments(any); @@ -4330,16 +5131,44 @@ result = _([]).isUndefined(); result = _({}).isUndefined(); // _.lt -result = _.lt(1, 2); -result = _(1).lt(2); -result = _([]).lt(2); -result = _({}).lt(2); +module TestLt { + { + let result: boolean; + + result = _.lt(any, any); + result = _(1).lt(any); + result = _([]).lt(any); + result = _({}).lt(any); + } + + { + let result: _.LoDashExplicitWrapper; + + result = _(1).chain().lt(any); + result = _([]).chain().lt(any); + result = _({}).chain().lt(any); + } +} // _.lte -result = _.lte(1, 2); -result = _(1).lte(2); -result = _([]).lte(2); -result = _({}).lte(2); +module TestLte { + { + let result: boolean; + + result = _.lte(any, any); + result = _(1).lte(any); + result = _([]).lte(any); + result = _({}).lte(any); + } + + { + let result: _.LoDashExplicitWrapper; + + result = _(1).chain().lte(any); + result = _([]).chain().lte(any); + result = _({}).chain().lte(any); + } +} // _.toArray module TestToArray { @@ -5259,49 +6088,202 @@ module TestFindLastKey { } } -result = _.forIn(new Dog('Dagny'), function (value, key) { - console.log(key); -}); +// _.forIn +module TestForIn { + type SampleObject = {a: number; b: string; c: boolean;}; -result = <_.LoDashImplicitObjectWrapper>_(new Dog('Dagny')).forIn(function (value, key) { - console.log(key); -}); + let dictionary: _.Dictionary; + let dictionaryIterator: (value: number, key: string, collection: _.Dictionary) => any; -result = _.forInRight(new Dog('Dagny'), function (value, key) { - console.log(key); -}); + let object: SampleObject; + let objectIterator: (element: any, key?: string, collection?: any) => any; -result = <_.LoDashImplicitObjectWrapper>_(new Dog('Dagny')).forInRight(function (value, key) { - console.log(key); -}); + { + let result: _.Dictionary; -interface ZeroOne { - 0: string; - 1: string; - one: string; + result = _.forIn(dictionary); + result = _.forIn(dictionary, dictionaryIterator); + result = _.forIn(dictionary, dictionaryIterator, any); + } + + { + let result: SampleObject; + + result = _.forIn(object); + result = _.forIn(object, objectIterator); + result = _.forIn(object, objectIterator, any); + } + + { + let result: _.LoDashImplicitObjectWrapper<_.Dictionary>; + + result = _(dictionary).forIn(); + result = _(dictionary).forIn(dictionaryIterator); + result = _(dictionary).forIn(dictionaryIterator, any); + } + + { + let result: _.LoDashExplicitObjectWrapper<_.Dictionary>; + + result = _(dictionary).chain().forIn(); + result = _(dictionary).chain().forIn(dictionaryIterator); + result = _(dictionary).chain().forIn(dictionaryIterator, any); + } } -result = _.forOwn({ '0': 'zero', '1': 'one', 'one': '2' }, function (num, key) { - console.log(key); -}); +// _.forInRight +module TestForInRight { + type SampleObject = {a: number; b: string; c: boolean;}; -result = <_.LoDashImplicitObjectWrapper>_({ '0': 'zero', '1': 'one', 'length': 2 }).forOwn(function (num, key) { - console.log(key); -}); + let dictionary: _.Dictionary; + let dictionaryIterator: (value: number, key: string, collection: _.Dictionary) => any; -result = _.forOwnRight({ '0': 'zero', '1': 'one', 'length': 2 }, function (num, key) { - console.log(key); -}); + let object: SampleObject; + let objectIterator: (element: any, key?: string, collection?: any) => any; -result = <_.LoDashImplicitObjectWrapper>_({ '0': 'zero', '1': 'one', 'length': 2 }).forOwnRight(function (num, key) { - console.log(key); -}); + { + let result: _.Dictionary; -result = _.functions(_); -result = _.methods(_); + result = _.forInRight(dictionary); + result = _.forInRight(dictionary, dictionaryIterator); + result = _.forInRight(dictionary, dictionaryIterator, any); + } -result = <_.LoDashImplicitArrayWrapper>_(_).functions(); -result = <_.LoDashImplicitArrayWrapper>_(_).methods(); + { + let result: SampleObject; + + result = _.forInRight(object); + result = _.forInRight(object, objectIterator); + result = _.forInRight(object, objectIterator, any); + } + + { + let result: _.LoDashImplicitObjectWrapper<_.Dictionary>; + + result = _(dictionary).forInRight(); + result = _(dictionary).forInRight(dictionaryIterator); + result = _(dictionary).forInRight(dictionaryIterator, any); + } + + { + let result: _.LoDashExplicitObjectWrapper<_.Dictionary>; + + result = _(dictionary).chain().forInRight(); + result = _(dictionary).chain().forInRight(dictionaryIterator); + result = _(dictionary).chain().forInRight(dictionaryIterator, any); + } +} + +// _.forOwn +module TestForOwn { + type SampleObject = {a: number; b: string; c: boolean;}; + + let dictionary: _.Dictionary; + let dictionaryIterator: (value: number, key: string, collection: _.Dictionary) => any; + + let object: SampleObject; + let objectIterator: (element: any, key?: string, collection?: any) => any; + + { + let result: _.Dictionary; + + result = _.forOwn(dictionary); + result = _.forOwn(dictionary, dictionaryIterator); + result = _.forOwn(dictionary, dictionaryIterator, any); + } + + { + let result: SampleObject; + + result = _.forOwn(object); + result = _.forOwn(object, objectIterator); + result = _.forOwn(object, objectIterator, any); + } + + { + let result: _.LoDashImplicitObjectWrapper<_.Dictionary>; + + result = _(dictionary).forOwn(); + result = _(dictionary).forOwn(dictionaryIterator); + result = _(dictionary).forOwn(dictionaryIterator, any); + } + + { + let result: _.LoDashExplicitObjectWrapper<_.Dictionary>; + + result = _(dictionary).chain().forOwn(); + result = _(dictionary).chain().forOwn(dictionaryIterator); + result = _(dictionary).chain().forOwn(dictionaryIterator, any); + } +} + +// _.forOwnRight +module TestForOwnRight { + type SampleObject = {a: number; b: string; c: boolean;}; + + let dictionary: _.Dictionary; + let dictionaryIterator: (value: number, key: string, collection: _.Dictionary) => any; + + let object: SampleObject; + let objectIterator: (element: any, key?: string, collection?: any) => any; + + { + let result: _.Dictionary; + + result = _.forOwnRight(dictionary); + result = _.forOwnRight(dictionary, dictionaryIterator); + result = _.forOwnRight(dictionary, dictionaryIterator, any); + } + + { + let result: SampleObject; + + result = _.forOwnRight(object); + result = _.forOwnRight(object, objectIterator); + result = _.forOwnRight(object, objectIterator, any); + } + + { + let result: _.LoDashImplicitObjectWrapper<_.Dictionary>; + + result = _(dictionary).forOwnRight(); + result = _(dictionary).forOwnRight(dictionaryIterator); + result = _(dictionary).forOwnRight(dictionaryIterator, any); + } + + { + let result: _.LoDashExplicitObjectWrapper<_.Dictionary>; + + result = _(dictionary).chain().forOwnRight(); + result = _(dictionary).chain().forOwnRight(dictionaryIterator); + result = _(dictionary).chain().forOwnRight(dictionaryIterator, any); + } +} + +// _.functions +module TestFunctions { + type SampleObject = {a: number; b: string; c: boolean;}; + + let object: SampleObject; + + { + let result: string[]; + + result = _.functions(object); + } + + { + let result: _.LoDashImplicitArrayWrapper; + + result = _(object).functions(); + } + + { + let result: _.LoDashExplicitArrayWrapper; + + result = _(object).chain().functions(); + } +} // _.get result = _.get({ 'a': [{ 'b': { 'c': 3 } }] }, 'a[0].b.c'); @@ -5319,14 +6301,34 @@ result = _.get({ 'a': [{ 'b': { 'c': 3 } }] }, 'a[0].b.c'); } // _.has -result = _.has({}, ''); -result = _.has({}, 42); -result = _.has({}, true); -result = _.has({}, ['', 42, true]); -result = _({}).has(''); -result = _({}).has(42); -result = _({}).has(true); -result = _({}).has(['', 42, true]); +module TestHas { + type SampleObject = {a: number; b: string; c: boolean;}; + + let object: SampleObject; + + { + let result: boolean; + + result = _.has(object, ''); + result = _.has(object, 42); + result = _.has(object, true); + result = _.has(object, ['', 42, true]); + + result = _(object).has(''); + result = _(object).has(42); + result = _(object).has(true); + result = _(object).has(['', 42, true]); + } + + { + let result: _.LoDashExplicitWrapper; + + result = _(object).chain().has(''); + result = _(object).chain().has(42); + result = _(object).chain().has(true); + result = _(object).chain().has(['', 42, true]); + } +} // _.invert { @@ -5337,15 +6339,28 @@ result = _({}).has(['', 42, true]); result = _({}).invert(true).value(); } -class Stooge { - constructor( - public name: string, - public age: number - ) { } -} +// _.keys +module TestKeys { + let object: _.Dictionary; -result = _.keys({ 'one': 1, 'two': 2, 'three': 3 }); -result = _({ 'one': 1, 'two': 2, 'three': 3 }).keys().value(); + { + let result: string[]; + + result = _.keys(object); + } + + { + let result: _.LoDashImplicitArrayWrapper; + + result = _(object).keys(); + } + + { + let result: _.LoDashExplicitArrayWrapper; + + result = _(object).chain().keys(); + } +} result = _.keysIn({ 'one': 1, 'two': 2, 'three': 3 }); result = _({ 'one': 1, 'two': 2, 'three': 3 }).keysIn().value(); @@ -5359,43 +6374,80 @@ module TestMapKeys { let listIterator: (value: TResult, index: number, collection: _.List) => string; let dictionaryIterator: (value: TResult, key: string, collection: _.Dictionary) => string; - let result: _.Dictionary; + { + let result: _.Dictionary; - result = _.mapKeys(array); - result = _.mapKeys(array, listIterator); - result = _.mapKeys(array, listIterator, any); - result = _.mapKeys(array, ''); - result = _.mapKeys(array, {}); + result = _.mapKeys(array); + result = _.mapKeys(array, listIterator); + result = _.mapKeys(array, listIterator, any); + result = _.mapKeys(array, ''); + result = _.mapKeys(array, '', any); + result = _.mapKeys(array, {}); - result = _.mapKeys(list); - result = _.mapKeys(list, listIterator); - result = _.mapKeys(list, listIterator, any); - result = _.mapKeys(list, ''); - result = _.mapKeys(list, {}); + result = _.mapKeys(list); + result = _.mapKeys(list, listIterator); + result = _.mapKeys(list, listIterator, any); + result = _.mapKeys(list, ''); + result = _.mapKeys(list, '', any); + result = _.mapKeys(list, {}); - result = _.mapKeys(dictionary); - result = _.mapKeys(dictionary, dictionaryIterator); - result = _.mapKeys(dictionary, dictionaryIterator, any); - result = _.mapKeys(dictionary, ''); - result = _.mapKeys(dictionary, {}); + result = _.mapKeys(dictionary); + result = _.mapKeys(dictionary, dictionaryIterator); + result = _.mapKeys(dictionary, dictionaryIterator, any); + result = _.mapKeys(dictionary, ''); + result = _.mapKeys(dictionary, '', any); + result = _.mapKeys(dictionary, {}); + } - result = _(array).mapKeys().value(); - result = _(array).mapKeys(listIterator).value(); - result = _(array).mapKeys(listIterator, any).value(); - result = _(array).mapKeys('').value(); - result = _(array).mapKeys<{}>({}).value(); + { + let result: _.LoDashImplicitObjectWrapper<_.Dictionary>; - result = _(list).mapKeys().value(); - result = _(list).mapKeys(listIterator).value(); - result = _(list).mapKeys(listIterator, any).value(); - result = _(list).mapKeys('').value(); - result = _(list).mapKeys({}).value(); + result = _(array).mapKeys(); + result = _(array).mapKeys(listIterator); + result = _(array).mapKeys(listIterator, any); + result = _(array).mapKeys(''); + result = _(array).mapKeys('', any); + result = _(array).mapKeys<{}>({}); - result = _(dictionary).mapKeys().value(); - result = _(dictionary).mapKeys(dictionaryIterator).value(); - result = _(dictionary).mapKeys(dictionaryIterator, any).value(); - result = _(dictionary).mapKeys('').value(); - result = _(dictionary).mapKeys({}).value(); + result = _(list).mapKeys(); + result = _(list).mapKeys(listIterator); + result = _(list).mapKeys(listIterator, any); + result = _(list).mapKeys(''); + result = _(list).mapKeys('', any); + result = _(list).mapKeys({}); + + result = _(dictionary).mapKeys(); + result = _(dictionary).mapKeys(dictionaryIterator); + result = _(dictionary).mapKeys(dictionaryIterator, any); + result = _(dictionary).mapKeys(''); + result = _(dictionary).mapKeys('', any); + result = _(dictionary).mapKeys({}); + } + + { + let result: _.LoDashExplicitObjectWrapper<_.Dictionary>; + + result = _(array).chain().mapKeys(); + result = _(array).chain().mapKeys(listIterator); + result = _(array).chain().mapKeys(listIterator, any); + result = _(array).chain().mapKeys(''); + result = _(array).chain().mapKeys('', any); + result = _(array).chain().mapKeys<{}>({}); + + result = _(list).chain().mapKeys(); + result = _(list).chain().mapKeys(listIterator); + result = _(list).chain().mapKeys(listIterator, any); + result = _(list).chain().mapKeys(''); + result = _(list).chain().mapKeys('', any); + result = _(list).chain().mapKeys({}); + + result = _(dictionary).chain().mapKeys(); + result = _(dictionary).chain().mapKeys(dictionaryIterator); + result = _(dictionary).chain().mapKeys(dictionaryIterator, any); + result = _(dictionary).chain().mapKeys(''); + result = _(dictionary).chain().mapKeys('', any); + result = _(dictionary).chain().mapKeys({}); + } } // _.merge @@ -5444,6 +6496,31 @@ module TestMerge { result = _({}).merge({}, {}, {}, {}, {}, customizer, any).value(); } +// _.methods +module TestFunctions { + type SampleObject = {a: number; b: string; c: boolean;}; + + let object: SampleObject; + + { + let result: string[]; + + result = _.methods(object); + } + + { + let result: _.LoDashImplicitArrayWrapper; + + result = _(object).methods(); + } + + { + let result: _.LoDashExplicitArrayWrapper; + + result = _(object).chain().methods(); + } +} + interface HasName { name: string; } @@ -5458,8 +6535,46 @@ result = _({ 'name': 'moe', 'age': 40 }).omit(function (value) { return typeof value == 'number'; }).value(); -result = _.pairs({ 'moe': 30, 'larry': 40 }); -result = _({ 'moe': 30, 'larry': 40 }).pairs().value(); +// _.pairs +module TestPairs { + let object: _.Dictionary; + + { + let result: any[][]; + + result = _.pairs<_.Dictionary>(object); + } + + { + let result: string[][]; + + result = _.pairs<_.Dictionary, string>(object); + } + + { + let result: _.LoDashImplicitArrayWrapper; + + result = _(object).pairs(); + } + + { + let result: _.LoDashImplicitArrayWrapper; + + result = _(object).pairs(); + } + + { + let result: _.LoDashExplicitArrayWrapper; + + result = _(object).chain().pairs(); + } + + { + let result: _.LoDashExplicitArrayWrapper; + + result = _(object).chain().pairs(); + } +} // _.pick interface TestPickFn { @@ -5488,14 +6603,41 @@ interface TestPickFn { } // _.set -{ - let testSetObject: TResult; - let testSetPath: {toSting(): string}; - let result: TResult; - result = _.set(testSetObject, testSetPath, any); - result = _.set(testSetObject, [testSetPath], any); - result = _(testSetObject).set(testSetPath, any).value(); - result = _(testSetObject).set([testSetPath], any).value(); +module TestSet { + type SampleValue = {a: number; b: string; c: boolean;}; + + let object: TResult; + let value = {a: 1, b: '', c: true}; + + { + let result: TResult; + + result = _.set(object, '', any); + result = _.set(object, ['a', 'b', 1], any); + + result = _.set(object, '', value); + result = _.set(object, ['a', 'b', 1], value); + } + + { + let result: _.LoDashImplicitObjectWrapper; + + result = _(object).set('', any); + result = _(object).set(['a', 'b', 1], any); + + result = _(object).set('', value); + result = _(object).set(['a', 'b', 1], value); + } + + { + let result: _.LoDashExplicitObjectWrapper; + + result = _(object).chain().set('', any); + result = _(object).chain().set(['a', 'b', 1], any); + + result = _(object).chain().set('', value); + result = _(object).chain().set(['a', 'b', 1], value); + } } // _.transform @@ -5565,16 +6707,27 @@ module TestTransform { } // _.values -class TestValues { - public a = 1; - public b = 2; - public c: string; +module TestValues { + let object: _.Dictionary; + + { + let result: TResult[]; + + result = _.values(object); + } + + { + let result: _.LoDashImplicitArrayWrapper; + + result = _(object).values(); + } + + { + let result: _.LoDashExplicitArrayWrapper; + + result = _(object).chain().values(); + } } -TestValues.prototype.c = 'a'; -result = _.values(new TestValues()); -// → [1, 2] (iteration order is not guaranteed) -result = _(new TestValues()).values().value(); -// → [1, 2] (iteration order is not guaranteed) // _.valueIn class TestValueIn { @@ -5588,22 +6741,6 @@ result = _.valuesIn(new TestValueIn()); result = _(new TestValueIn()).valuesIn().value(); // → [1, 2, 3] -/********** -* Utility * -***********/ - -// _.property -interface TestPropertyObject { - a: { - b: number; - } -} -var testPropertyObject: TestPropertyObject; -result = _.property('a.b')(testPropertyObject); -result = _.property(['a', 'b'])(testPropertyObject); -result = (_('a.b').property().value())(testPropertyObject); -result = (_(['a', 'b']).property().value())(testPropertyObject); - /********** * String * **********/ @@ -6560,6 +7697,36 @@ module TestNoop { } } +// _.property +module TestProperty { + interface SampleObject { + a: { + b: number[]; + } + } + + { + let result: (object: SampleObject) => number; + + result = _.property('a.b[0]'); + result = _.property(['a', 'b', 0]); + } + + { + let result: _.LoDashImplicitObjectWrapper<(object: SampleObject) => number>; + + result = _('a.b[0]').property(); + result = _(['a', 'b', 0]).property(); + } + + { + let result: _.LoDashExplicitObjectWrapper<(object: SampleObject) => number>; + + result = _('a.b[0]').chain().property(); + result = _(['a', 'b', 0]).chain().property(); + } +} + // _.propertyOf module TestPropertyOf { interface SampleObject { diff --git a/lodash/lodash.d.ts b/lodash/lodash.d.ts index 98d8bf55d9..73a783b64c 100644 --- a/lodash/lodash.d.ts +++ b/lodash/lodash.d.ts @@ -1403,7 +1403,7 @@ declare module _ { * @see _.zipObject */ object( - props: List, + props: List|List>, values?: List ): TResult; @@ -1411,7 +1411,7 @@ declare module _ { * @see _.zipObject */ object( - props: List, + props: List|List>, values?: List ): TResult; @@ -1419,7 +1419,7 @@ declare module _ { * @see _.zipObject */ object( - props: List, + props: List|List>, values?: List ): _.Dictionary; } @@ -1470,6 +1470,52 @@ declare module _ { ): _.LoDashImplicitObjectWrapper<_.Dictionary>; } + interface LoDashExplicitArrayWrapper { + /** + * @see _.zipObject + */ + object( + values?: List + ): _.LoDashExplicitObjectWrapper; + + /** + * @see _.zipObject + */ + object( + values?: List + ): _.LoDashExplicitObjectWrapper; + + /** + * @see _.zipObject + */ + object( + values?: List + ): _.LoDashExplicitObjectWrapper<_.Dictionary>; + } + + interface LoDashExplicitObjectWrapper { + /** + * @see _.zipObject + */ + object( + values?: List + ): _.LoDashExplicitObjectWrapper; + + /** + * @see _.zipObject + */ + object( + values?: List + ): _.LoDashExplicitObjectWrapper; + + /** + * @see _.zipObject + */ + object( + values?: List + ): _.LoDashExplicitObjectWrapper<_.Dictionary>; + } + //_.pull interface LoDashStatic { /** @@ -1536,7 +1582,7 @@ declare module _ { * @return Returns the new array of removed elements. */ pullAt( - array: T[]|List, + array: List, ...indexes: (number|number[])[] ): T[]; } @@ -1552,7 +1598,21 @@ declare module _ { /** * @see _.pullAt */ - pullAt(...indexes: (number|number[])[]): LoDashImplicitArrayWrapper; + pullAt(...indexes: (number|number[])[]): LoDashImplicitArrayWrapper; + } + + interface LoDashExplicitArrayWrapper { + /** + * @see _.pullAt + */ + pullAt(...indexes: (number|number[])[]): LoDashExplicitArrayWrapper; + } + + interface LoDashExplicitObjectWrapper { + /** + * @see _.pullAt + */ + pullAt(...indexes: (number|number[])[]): LoDashExplicitArrayWrapper; } //_.remove @@ -2721,6 +2781,46 @@ declare module _ { whereValue: W): LoDashImplicitArrayWrapper; } + //_.unzip + interface LoDashStatic { + /** + * This method is like _.zip except that it accepts an array of grouped elements and creates an array + * regrouping the elements to their pre-zip configuration. + * + * @param array The array of grouped elements to process. + * @return Returns the new array of regrouped elements. + */ + unzip(array: List>): T[][]; + } + + interface LoDashImplicitArrayWrapper { + /** + * @see _.unzip + */ + unzip(): LoDashImplicitArrayWrapper; + } + + interface LoDashImplicitObjectWrapper { + /** + * @see _.unzip + */ + unzip(): LoDashImplicitArrayWrapper; + } + + interface LoDashExplicitArrayWrapper { + /** + * @see _.unzip + */ + unzip(): LoDashExplicitArrayWrapper; + } + + interface LoDashExplicitObjectWrapper { + /** + * @see _.unzip + */ + unzip(): LoDashExplicitArrayWrapper; + } + //_.unzipWith interface LoDashStatic { /** @@ -2770,7 +2870,7 @@ declare module _ { * @return Returns the new array of filtered values. */ without( - array: T[]|List, + array: List, ...values: T[] ): T[]; } @@ -2786,7 +2886,21 @@ declare module _ { /** * @see _.without */ - without(...values: TValue[]): LoDashImplicitArrayWrapper; + without(...values: T[]): LoDashImplicitArrayWrapper; + } + + interface LoDashExplicitArrayWrapper { + /** + * @see _.without + */ + without(...values: T[]): LoDashExplicitArrayWrapper; + } + + interface LoDashExplicitObjectWrapper { + /** + * @see _.without + */ + without(...values: T[]): LoDashExplicitArrayWrapper; } //_.xor @@ -2811,46 +2925,61 @@ declare module _ { /** * @see _.xor */ - xor(...arrays: List[]): LoDashImplicitArrayWrapper; + xor(...arrays: List[]): LoDashImplicitArrayWrapper; + } + + interface LoDashExplicitArrayWrapper { + /** + * @see _.xor + */ + xor(...arrays: List[]): LoDashExplicitArrayWrapper; + } + + interface LoDashExplicitObjectWrapper { + /** + * @see _.xor + */ + xor(...arrays: List[]): LoDashExplicitArrayWrapper; } //_.zip interface LoDashStatic { /** - * Creates an array of grouped elements, the first of which contains the first - * elements of the given arrays, the second of which contains the second elements - * of the given arrays, and so on. - * @param arrays Arrays to process. - * @return A new array of grouped elements. - **/ - zip(...arrays: any[][]): any[][]; - - /** - * @see _.zip - **/ - zip(...arrays: any[]): any[]; - - /** - * @see _.zip - **/ - unzip(...arrays: any[][]): any[][]; - - /** - * @see _.zip - **/ - unzip(...arrays: any[]): any[]; + * Creates an array of grouped elements, the first of which contains the first elements of the given arrays, + * the second of which contains the second elements of the given arrays, and so on. + * + * @param arrays The arrays to process. + * @return Returns the new array of grouped elements. + */ + zip(...arrays: List[]): T[][]; } interface LoDashImplicitArrayWrapper { /** - * @see _.zip - **/ - zip(...arrays: any[][]): _.LoDashImplicitArrayWrapper; + * @see _.zip + */ + zip(...arrays: List[]): _.LoDashImplicitArrayWrapper; + } + interface LoDashImplicitObjectWrapper { /** - * @see _.zip - **/ - unzip(...arrays: any[]): _.LoDashImplicitArrayWrapper; + * @see _.zip + */ + zip(...arrays: List[]): _.LoDashImplicitArrayWrapper; + } + + interface LoDashExplicitArrayWrapper { + /** + * @see _.zip + */ + zip(...arrays: List[]): _.LoDashExplicitArrayWrapper; + } + + interface LoDashExplicitObjectWrapper { + /** + * @see _.zip + */ + zip(...arrays: List[]): _.LoDashExplicitArrayWrapper; } //_.zipObject @@ -2867,7 +2996,7 @@ declare module _ { * @return Returns the new object. */ zipObject( - props: List, + props: List|List>, values?: List ): TResult; @@ -2875,7 +3004,7 @@ declare module _ { * @see _.zipObject */ zipObject( - props: List, + props: List|List>, values?: List ): TResult; @@ -2883,7 +3012,7 @@ declare module _ { * @see _.zipObject */ zipObject( - props: List, + props: List|List>, values?: List ): _.Dictionary; } @@ -2934,6 +3063,52 @@ declare module _ { ): _.LoDashImplicitObjectWrapper<_.Dictionary>; } + interface LoDashExplicitArrayWrapper { + /** + * @see _.zipObject + */ + zipObject( + values?: List + ): _.LoDashExplicitObjectWrapper; + + /** + * @see _.zipObject + */ + zipObject( + values?: List + ): _.LoDashExplicitObjectWrapper; + + /** + * @see _.zipObject + */ + zipObject( + values?: List + ): _.LoDashExplicitObjectWrapper<_.Dictionary>; + } + + interface LoDashExplicitObjectWrapper { + /** + * @see _.zipObject + */ + zipObject( + values?: List + ): _.LoDashExplicitObjectWrapper; + + /** + * @see _.zipObject + */ + zipObject( + values?: List + ): _.LoDashExplicitObjectWrapper; + + /** + * @see _.zipObject + */ + zipObject( + values?: List + ): _.LoDashExplicitObjectWrapper<_.Dictionary>; + } + //_.zipWith interface LoDashStatic { /** @@ -3772,160 +3947,82 @@ declare module _ { //_.contains interface LoDashStatic { /** - * Checks if a given value is present in a collection using strict equality for comparisons, - * i.e. ===. If fromIndex is negative, it is used as the offset from the end of the collection. - * @param collection The collection to iterate over. - * @param target The value to check for. - * @param fromIndex The index to search from. - * @return True if the target element is found, else false. - **/ + * @see _.includes + */ contains( - collection: Array, + collection: List|Dictionary, target: T, - fromIndex?: number): boolean; + fromIndex?: number + ): boolean; /** - * @see _.contains - **/ - contains( - collection: List, - target: T, - fromIndex?: number): boolean; - - /** - * @see _.contains - * @param dictionary The dictionary to iterate over. - * @param value The value in the dictionary to search for. - **/ - contains( - dictionary: Dictionary, - value: T, - fromIndex?: number): boolean; - - /** - * @see _.contains - * @param searchString the string to search - * @param targetString the string to search for - **/ + * @see _.includes + */ contains( - searchString: string, - targetString: string, - fromIndex?: number): boolean; - - /** - * @see _.contains - **/ - include( - collection: Array, - target: T, - fromIndex?: number): boolean; - - /** - * @see _.contains - **/ - include( - collection: List, - target: T, - fromIndex?: number): boolean; - - /** - * @see _.contains - **/ - include( - dictionary: Dictionary, - value: T, - fromIndex?: number): boolean; - - /** - * @see _.contains - **/ - include( - searchString: string, - targetString: string, - fromIndex?: number): boolean; - - /** - * @see _.contains - **/ - includes( - collection: Array, - target: T, - fromIndex?: number): boolean; - - /** - * @see _.contains - **/ - includes( - collection: List, - target: T, - fromIndex?: number): boolean; - - /** - * @see _.contains - **/ - includes( - dictionary: Dictionary, - value: T, - fromIndex?: number): boolean; - - /** - * @see _.contains - **/ - includes( - searchString: string, - targetString: string, - fromIndex?: number): boolean; + collection: string, + target: string, + fromIndex?: number + ): boolean; } interface LoDashImplicitArrayWrapper { /** - * @see _.contains - **/ - contains(target: T, fromIndex?: number): boolean; - - /** - * @see _.contains - **/ - include(target: T, fromIndex?: number): boolean; - - /** - * @see _.contains - **/ - includes(target: T, fromIndex?: number): boolean; + * @see _.includes + */ + contains( + target: T, + fromIndex?: number + ): boolean; } interface LoDashImplicitObjectWrapper { /** - * @see _.contains - **/ - contains(target: TValue, fromIndex?: number): boolean; - - /** - * @see _.contains - **/ - include(target: TValue, fromIndex?: number): boolean; - - /** - * @see _.contains - **/ - includes(target: TValue, fromIndex?: number): boolean; + * @see _.includes + */ + contains( + target: TValue, + fromIndex?: number + ): boolean; } - interface LoDashImplicitStringWrapper { + interface LoDashImplicitWrapper { /** - * @see _.contains - **/ - contains(target: string, fromIndex?: number): boolean; + * @see _.includes + */ + contains( + target: string, + fromIndex?: number + ): boolean; + } + interface LoDashExplicitArrayWrapper { /** - * @see _.contains - **/ - include(target: string, fromIndex?: number): boolean; + * @see _.includes + */ + contains( + target: T, + fromIndex?: number + ): LoDashExplicitWrapper; + } + interface LoDashExplicitObjectWrapper { /** - * @see _.contains - **/ - includes(target: string, fromIndex?: number): boolean; + * @see _.includes + */ + contains( + target: TValue, + fromIndex?: number + ): LoDashExplicitWrapper; + } + + interface LoDashExplicitWrapper { + /** + * @see _.includes + */ + contains( + target: string, + fromIndex?: number + ): LoDashExplicitWrapper; } //_.countBy @@ -4507,228 +4604,177 @@ declare module _ { //_.filter interface LoDashStatic { /** - * Iterates over elements of a collection, returning an array of all elements the - * identity function returns truey for. - * - * @param collection The collection to iterate over. - * @return Returns a new array of elements that passed the callback check. - **/ - filter( - collection: (Array|List)): T[]; - - /** - * Iterates over elements of a collection, returning an array of all elements the - * callback returns truey for. The callback is bound to thisArg and invoked with three - * arguments; (value, index|key, collection). - * - * If a property name is provided for callback the created "_.pluck" style callback will - * return the property value of the given element. - * - * If an object is provided for callback the created "_.where" style callback will return - * true for elements that have the properties of the given object, else false. - * @param collection The collection to iterate over. - * @param callback The function called per iteration. - * @param context The this binding of callback. - * @return Returns a new array of elements that passed the callback check. - **/ - filter( - collection: Array, - callback: ListIterator, - thisArg?: any): T[]; - - /** - * @see _.filter - **/ + * Iterates over elements of collection, returning an array of all elements predicate returns truthy for. The + * predicate is bound to thisArg and invoked with three arguments: (value, index|key, collection). + * + * If a property name is provided for predicate the created _.property style callback returns the property + * value of the given element. + * + * If a value is also provided for thisArg the created _.matchesProperty style callback returns true for + * elements that have a matching property value, else false. + * + * If an object is provided for predicate the created _.matches style callback returns true for elements that + * have the properties of the given object, else false. + * + * @alias _.select + * + * @param collection The collection to iterate over. + * @param predicate The function invoked per iteration. + * @param thisArg The this binding of predicate. + * @return Returns the new filtered array. + */ filter( collection: List, - callback: ListIterator, - thisArg?: any): T[]; + predicate?: ListIterator, + thisArg?: any + ): T[]; /** - * @see _.filter - **/ + * @see _.filter + */ filter( collection: Dictionary, - callback: DictionaryIterator, - thisArg?: any): T[]; + predicate?: DictionaryIterator, + thisArg?: any + ): T[]; /** - * @see _.filter - * @param pluckValue _.pluck style callback - **/ + * @see _.filter + */ + filter( + collection: string, + predicate?: StringIterator, + thisArg?: any + ): string[]; + + /** + * @see _.filter + */ filter( - collection: Array, - pluckValue: string): T[]; + collection: List|Dictionary, + predicate: string, + thisArg?: any + ): T[]; /** - * @see _.filter - * @param pluckValue _.pluck style callback - **/ - filter( - collection: List, - pluckValue: string): T[]; + * @see _.filter + */ + filter( + collection: List|Dictionary, + predicate: W + ): T[]; + } + interface LoDashImplicitWrapper { /** - * @see _.filter - * @param pluckValue _.pluck style callback - **/ - filter( - collection: Dictionary, - pluckValue: string): T[]; - - /** - * @see _.filter - * @param pluckValue _.pluck style callback - **/ - filter( - collection: Array, - whereValue: W): T[]; - - /** - * @see _.filter - * @param pluckValue _.pluck style callback - **/ - filter( - collection: List, - whereValue: W): T[]; - - /** - * @see _.filter - * @param pluckValue _.pluck style callback - **/ - filter( - collection: Dictionary, - whereValue: W): T[]; - - /** - * @see _.filter - **/ - select( - collection: Array, - callback: ListIterator, - thisArg?: any): T[]; - - /** - * @see _.filter - **/ - select( - collection: List, - callback: ListIterator, - thisArg?: any): T[]; - - /** - * @see _.filter - **/ - select( - collection: Dictionary, - callback: DictionaryIterator, - thisArg?: any): T[]; - - /** - * @see _.filter - * @param pluckValue _.pluck style callback - **/ - select( - collection: Array, - pluckValue: string): T[]; - - /** - * @see _.filter - * @param pluckValue _.pluck style callback - **/ - select( - collection: List, - pluckValue: string): T[]; - - /** - * @see _.filter - * @param pluckValue _.pluck style callback - **/ - select( - collection: Dictionary, - pluckValue: string): T[]; - - /** - * @see _.filter - * @param pluckValue _.pluck style callback - **/ - select( - collection: Array, - whereValue: W): T[]; - - /** - * @see _.filter - * @param pluckValue _.pluck style callback - **/ - select( - collection: List, - whereValue: W): T[]; - - /** - * @see _.filter - * @param pluckValue _.pluck style callback - **/ - select( - collection: Dictionary, - whereValue: W): T[]; + * @see _.filter + */ + filter( + predicate?: StringIterator, + thisArg?: any + ): LoDashImplicitArrayWrapper; } interface LoDashImplicitArrayWrapper { /** - * @see _.filter - **/ - filter(): LoDashImplicitArrayWrapper; - - /** - * @see _.filter - **/ + * @see _.filter + */ filter( - callback: ListIterator, - thisArg?: any): LoDashImplicitArrayWrapper; + predicate: ListIterator, + thisArg?: any + ): LoDashImplicitArrayWrapper; /** - * @see _.filter - * @param pluckValue _.pluck style callback - **/ + * @see _.filter + */ filter( - pluckValue: string): LoDashImplicitArrayWrapper; + predicate: string, + thisArg?: any + ): LoDashImplicitArrayWrapper; /** - * @see _.filter - * @param pluckValue _.pluck style callback - **/ - filter( - whereValue: W): LoDashImplicitArrayWrapper; - - /** - * @see _.filter - **/ - select( - callback: ListIterator, - thisArg?: any): LoDashImplicitArrayWrapper; - - /** - * @see _.filter - * @param pluckValue _.pluck style callback - **/ - select( - pluckValue: string): LoDashImplicitArrayWrapper; - - /** - * @see _.filter - * @param pluckValue _.pluck style callback - **/ - select( - whereValue: W): LoDashImplicitArrayWrapper; + * @see _.filter + */ + filter(predicate: W): LoDashImplicitArrayWrapper; } interface LoDashImplicitObjectWrapper { /** - * @see _.filter - **/ - filter( - callback: ObjectIterator, - thisArg?: any): LoDashImplicitObjectWrapper; + * @see _.filter + */ + filter( + predicate: ListIterator|DictionaryIterator, + thisArg?: any + ): LoDashImplicitArrayWrapper; + + /** + * @see _.filter + */ + filter( + predicate: string, + thisArg?: any + ): LoDashImplicitArrayWrapper; + + /** + * @see _.filter + */ + filter(predicate: W): LoDashImplicitArrayWrapper; + } + + interface LoDashExplicitWrapper { + /** + * @see _.filter + */ + filter( + predicate?: StringIterator, + thisArg?: any + ): LoDashExplicitArrayWrapper; + } + + interface LoDashExplicitArrayWrapper { + /** + * @see _.filter + */ + filter( + predicate: ListIterator, + thisArg?: any + ): LoDashExplicitArrayWrapper; + + /** + * @see _.filter + */ + filter( + predicate: string, + thisArg?: any + ): LoDashExplicitArrayWrapper; + + /** + * @see _.filter + */ + filter(predicate: W): LoDashExplicitArrayWrapper; + } + + interface LoDashExplicitObjectWrapper { + /** + * @see _.filter + */ + filter( + predicate: ListIterator|DictionaryIterator, + thisArg?: any + ): LoDashExplicitArrayWrapper; + + /** + * @see _.filter + */ + filter( + predicate: string, + thisArg?: any + ): LoDashExplicitArrayWrapper; + + /** + * @see _.filter + */ + filter(predicate: W): LoDashExplicitArrayWrapper; } //_.find @@ -5357,6 +5403,176 @@ declare module _ { whereValue: W): _.LoDashImplicitObjectWrapper<_.Dictionary>; } + //_.include + interface LoDashStatic { + /** + * @see _.includes + */ + include( + collection: List|Dictionary, + target: T, + fromIndex?: number + ): boolean; + + /** + * @see _.includes + */ + include( + collection: string, + target: string, + fromIndex?: number + ): boolean; + } + + interface LoDashImplicitArrayWrapper { + /** + * @see _.includes + */ + include( + target: T, + fromIndex?: number + ): boolean; + } + + interface LoDashImplicitObjectWrapper { + /** + * @see _.includes + */ + include( + target: TValue, + fromIndex?: number + ): boolean; + } + + interface LoDashImplicitWrapper { + /** + * @see _.includes + */ + include( + target: string, + fromIndex?: number + ): boolean; + } + + interface LoDashExplicitArrayWrapper { + /** + * @see _.includes + */ + include( + target: T, + fromIndex?: number + ): LoDashExplicitWrapper; + } + + interface LoDashExplicitObjectWrapper { + /** + * @see _.includes + */ + include( + target: TValue, + fromIndex?: number + ): LoDashExplicitWrapper; + } + + interface LoDashExplicitWrapper { + /** + * @see _.includes + */ + include( + target: string, + fromIndex?: number + ): LoDashExplicitWrapper; + } + + //_.includes + interface LoDashStatic { + /** + * Checks if target is in collection using SameValueZero for equality comparisons. If fromIndex is negative, + * it’s used as the offset from the end of collection. + * + * @alias _.contains, _.include + * + * @param collection The collection to search. + * @param target The value to search for. + * @param fromIndex The index to search from. + * @return True if the target element is found, else false. + */ + includes( + collection: List|Dictionary, + target: T, + fromIndex?: number + ): boolean; + + /** + * @see _.includes + */ + includes( + collection: string, + target: string, + fromIndex?: number + ): boolean; + } + + interface LoDashImplicitArrayWrapper { + /** + * @see _.includes + */ + includes( + target: T, + fromIndex?: number + ): boolean; + } + + interface LoDashImplicitObjectWrapper { + /** + * @see _.includes + */ + includes( + target: TValue, + fromIndex?: number + ): boolean; + } + + interface LoDashImplicitWrapper { + /** + * @see _.includes + */ + includes( + target: string, + fromIndex?: number + ): boolean; + } + + interface LoDashExplicitArrayWrapper { + /** + * @see _.includes + */ + includes( + target: T, + fromIndex?: number + ): LoDashExplicitWrapper; + } + + interface LoDashExplicitObjectWrapper { + /** + * @see _.includes + */ + includes( + target: TValue, + fromIndex?: number + ): LoDashExplicitWrapper; + } + + interface LoDashExplicitWrapper { + /** + * @see _.includes + */ + includes( + target: string, + fromIndex?: number + ): LoDashExplicitWrapper; + } + //_.indexBy interface LoDashStatic { /** @@ -6208,108 +6424,166 @@ declare module _ { //_.reject interface LoDashStatic { /** - * The opposite of _.filter this method returns the elements of a collection that - * the callback does not return truey for. - * - * If a property name is provided for callback the created "_.pluck" style callback - * will return the property value of the given element. - * - * If an object is provided for callback the created "_.where" style callback will - * return true for elements that have the properties of the given object, else false. - * @param collection The collection to iterate over. - * @param callback The function called per iteration. - * @param thisArg The this binding of callback. - * @return A new array of elements that failed the callback check. - **/ - reject( - collection: Array, - callback: ListIterator, - thisArg?: any): T[]; - - /** - * @see _.reject - **/ + * The opposite of _.filter; this method returns the elements of collection that predicate does not return + * truthy for. + * + * @param collection The collection to iterate over. + * @param predicate The function invoked per iteration. + * @param thisArg The this binding of predicate. + * @return Returns the new filtered array. + */ reject( collection: List, - callback: ListIterator, - thisArg?: any): T[]; + predicate?: ListIterator, + thisArg?: any + ): T[]; /** - * @see _.reject - **/ + * @see _.reject + */ reject( collection: Dictionary, - callback: DictionaryIterator, - thisArg?: any): T[]; + predicate?: DictionaryIterator, + thisArg?: any + ): T[]; /** - * @see _.reject - * @param pluckValue _.pluck style callback - **/ + * @see _.reject + */ + reject( + collection: string, + predicate?: StringIterator, + thisArg?: any + ): string[]; + + /** + * @see _.reject + */ reject( - collection: Array, - pluckValue: string): T[]; + collection: List|Dictionary, + predicate: string, + thisArg?: any + ): T[]; /** - * @see _.reject - * @param pluckValue _.pluck style callback - **/ - reject( - collection: List, - pluckValue: string): T[]; + * @see _.reject + */ + reject( + collection: List|Dictionary, + predicate: W + ): T[]; + } + interface LoDashImplicitWrapper { /** - * @see _.reject - * @param pluckValue _.pluck style callback - **/ - reject( - collection: Dictionary, - pluckValue: string): T[]; - - /** - * @see _.reject - * @param whereValue _.where style callback - **/ - reject( - collection: Array, - whereValue: W): T[]; - - /** - * @see _.reject - * @param whereValue _.where style callback - **/ - reject( - collection: List, - whereValue: W): T[]; - - /** - * @see _.reject - * @param whereValue _.where style callback - **/ - reject( - collection: Dictionary, - whereValue: W): T[]; + * @see _.reject + */ + reject( + predicate?: StringIterator, + thisArg?: any + ): LoDashImplicitArrayWrapper; } interface LoDashImplicitArrayWrapper { /** - * @see _.reject - **/ + * @see _.reject + */ reject( - callback: ListIterator, - thisArg?: any): LoDashImplicitArrayWrapper; + predicate: ListIterator, + thisArg?: any + ): LoDashImplicitArrayWrapper; /** - * @see _.reject - * @param pluckValue _.pluck style callback - **/ - reject(pluckValue: string): LoDashImplicitArrayWrapper; + * @see _.reject + */ + reject( + predicate: string, + thisArg?: any + ): LoDashImplicitArrayWrapper; /** - * @see _.reject - * @param whereValue _.where style callback - **/ - reject(whereValue: W): LoDashImplicitArrayWrapper; + * @see _.reject + */ + reject(predicate: W): LoDashImplicitArrayWrapper; + } + + interface LoDashImplicitObjectWrapper { + /** + * @see _.reject + */ + reject( + predicate: ListIterator|DictionaryIterator, + thisArg?: any + ): LoDashImplicitArrayWrapper; + + /** + * @see _.reject + */ + reject( + predicate: string, + thisArg?: any + ): LoDashImplicitArrayWrapper; + + /** + * @see _.reject + */ + reject(predicate: W): LoDashImplicitArrayWrapper; + } + + interface LoDashExplicitWrapper { + /** + * @see _.reject + */ + reject( + predicate?: StringIterator, + thisArg?: any + ): LoDashExplicitArrayWrapper; + } + + interface LoDashExplicitArrayWrapper { + /** + * @see _.reject + */ + reject( + predicate: ListIterator, + thisArg?: any + ): LoDashExplicitArrayWrapper; + + /** + * @see _.reject + */ + reject( + predicate: string, + thisArg?: any + ): LoDashExplicitArrayWrapper; + + /** + * @see _.reject + */ + reject(predicate: W): LoDashExplicitArrayWrapper; + } + + interface LoDashExplicitObjectWrapper { + /** + * @see _.reject + */ + reject( + predicate: ListIterator|DictionaryIterator, + thisArg?: any + ): LoDashExplicitArrayWrapper; + + /** + * @see _.reject + */ + reject( + predicate: string, + thisArg?: any + ): LoDashExplicitArrayWrapper; + + /** + * @see _.reject + */ + reject(predicate: W): LoDashExplicitArrayWrapper; } //_.sample @@ -6362,6 +6636,165 @@ declare module _ { sample(): LoDashImplicitWrapper; } + //_.select + interface LoDashStatic { + /** + * @see _.filter + */ + select( + collection: List, + predicate?: ListIterator, + thisArg?: any + ): T[]; + + /** + * @see _.filter + */ + select( + collection: Dictionary, + predicate?: DictionaryIterator, + thisArg?: any + ): T[]; + + /** + * @see _.filter + */ + select( + collection: string, + predicate?: StringIterator, + thisArg?: any + ): string[]; + + /** + * @see _.filter + */ + select( + collection: List|Dictionary, + predicate: string, + thisArg?: any + ): T[]; + + /** + * @see _.filter + */ + select( + collection: List|Dictionary, + predicate: W + ): T[]; + } + + interface LoDashImplicitWrapper { + /** + * @see _.filter + */ + select( + predicate?: StringIterator, + thisArg?: any + ): LoDashImplicitArrayWrapper; + } + + interface LoDashImplicitArrayWrapper { + /** + * @see _.filter + */ + select( + predicate: ListIterator, + thisArg?: any + ): LoDashImplicitArrayWrapper; + + /** + * @see _.filter + */ + select( + predicate: string, + thisArg?: any + ): LoDashImplicitArrayWrapper; + + /** + * @see _.filter + */ + select(predicate: W): LoDashImplicitArrayWrapper; + } + + interface LoDashImplicitObjectWrapper { + /** + * @see _.filter + */ + select( + predicate: ListIterator|DictionaryIterator, + thisArg?: any + ): LoDashImplicitArrayWrapper; + + /** + * @see _.filter + */ + select( + predicate: string, + thisArg?: any + ): LoDashImplicitArrayWrapper; + + /** + * @see _.filter + */ + select(predicate: W): LoDashImplicitArrayWrapper; + } + + interface LoDashExplicitWrapper { + /** + * @see _.filter + */ + select( + predicate?: StringIterator, + thisArg?: any + ): LoDashExplicitArrayWrapper; + } + + interface LoDashExplicitArrayWrapper { + /** + * @see _.filter + */ + select( + predicate: ListIterator, + thisArg?: any + ): LoDashExplicitArrayWrapper; + + /** + * @see _.filter + */ + select( + predicate: string, + thisArg?: any + ): LoDashExplicitArrayWrapper; + + /** + * @see _.filter + */ + select(predicate: W): LoDashExplicitArrayWrapper; + } + + interface LoDashExplicitObjectWrapper { + /** + * @see _.filter + */ + select( + predicate: ListIterator|DictionaryIterator, + thisArg?: any + ): LoDashExplicitArrayWrapper; + + /** + * @see _.filter + */ + select( + predicate: string, + thisArg?: any + ): LoDashExplicitArrayWrapper; + + /** + * @see _.filter + */ + select(predicate: W): LoDashExplicitArrayWrapper; + } + //_.shuffle interface LoDashStatic { /** @@ -6423,47 +6856,62 @@ declare module _ { //_.size interface LoDashStatic { /** - * Gets the size of the collection by returning collection.length for arrays and array-like - * objects or the number of own enumerable properties for objects. - * @param collection The collection to inspect. - * @return collection.length - **/ - size(collection: Array): number; + * Gets the size of collection by returning its length for array-like values or the number of own enumerable + * properties for objects. + * + * @param collection The collection to inspect. + * @return Returns the size of collection. + */ + size(collection: List|Dictionary): number; /** - * @see _.size - **/ - size(collection: List): number; + * @see _.size + */ + size(collection: string): number; + } + interface LoDashImplicitWrapper { /** - * @see _.size - * @param object The object to inspect - * @return The number of own enumerable properties. - **/ - size(object: T): number; - - /** - * @see _.size - * @param aString The string to inspect - * @return The length of aString - **/ - size(aString: string): number; + * @see _.size + */ + size(): number; } interface LoDashImplicitArrayWrapper { /** * @see _.size - **/ + */ size(): number; } interface LoDashImplicitObjectWrapper { /** * @see _.size - **/ + */ size(): number; } + interface LoDashExplicitWrapper { + /** + * @see _.size + */ + size(): LoDashExplicitWrapper; + } + + interface LoDashExplicitArrayWrapper { + /** + * @see _.size + */ + size(): LoDashExplicitWrapper; + } + + interface LoDashExplicitObjectWrapper { + /** + * @see _.size + */ + size(): LoDashExplicitWrapper; + } + //_.some interface LoDashStatic { /** @@ -7021,19 +7469,34 @@ declare module _ { interface LoDashStatic { /** * Creates a function that accepts up to n arguments ignoring any additional arguments. + * * @param func The function to cap arguments for. * @param n The arity cap. - * @param guard Enables use as a callback for functions like `_.map`. * @returns Returns the new function. */ - ary(func: Function, n?: number, guard?: Object): TResult; + ary( + func: Function, + n?: number + ): TResult; + + ary( + func: T, + n?: number + ): TResult; } interface LoDashImplicitObjectWrapper { /** * @see _.ary */ - ary(n?: number, guard?: Object): LoDashImplicitObjectWrapper; + ary(n?: number): LoDashImplicitObjectWrapper; + } + + interface LoDashExplicitObjectWrapper { + /** + * @see _.ary + */ + ary(n?: number): LoDashExplicitObjectWrapper; } //_.backflow @@ -7457,26 +7920,38 @@ declare module _ { //_.delay interface LoDashStatic { /** - * Executes the func function after wait milliseconds. Additional arguments will be provided - * to func when it is invoked. - * @param func The function to delay. - * @param wait The number of milliseconds to delay execution. - * @param args Arguments to invoke the function with. - * @return The timer id. - **/ - delay( - func: Function, + * Invokes func after wait milliseconds. Any additional arguments are provided to func when it’s invoked. + * + * @param func The function to delay. + * @param wait The number of milliseconds to delay invocation. + * @param args The arguments to invoke the function with. + * @return Returns the timer id. + */ + delay( + func: T, wait: number, - ...args: any[]): number; + ...args: any[] + ): number; } interface LoDashImplicitObjectWrapper { /** - * @see _.delay - **/ + * @see _.delay + */ delay( wait: number, - ...args: any[]): LoDashImplicitWrapper; + ...args: any[] + ): LoDashImplicitWrapper; + } + + interface LoDashExplicitObjectWrapper { + /** + * @see _.delay + */ + delay( + wait: number, + ...args: any[] + ): LoDashExplicitWrapper; } //_.flow @@ -7557,6 +8032,7 @@ declare module _ { interface LoDashStatic { /** * Creates a function that runs each argument through a corresponding transform function. + * * @param func The function to wrap. * @param transforms The functions to transform arguments, specified as individual functions or arrays * of functions. @@ -7588,6 +8064,18 @@ declare module _ { modArgs(transforms: Function[]): LoDashImplicitObjectWrapper; } + interface LoDashExplicitObjectWrapper { + /** + * @see _.modArgs + */ + modArgs(...transforms: Function[]): LoDashExplicitObjectWrapper; + + /** + * @see _.modArgs + */ + modArgs(transforms: Function[]): LoDashExplicitObjectWrapper; + } + //_.negate interface LoDashStatic { /** @@ -7802,16 +8290,25 @@ declare module _ { /** * Creates a function that invokes func with the this binding of the created function and arguments from start * and beyond provided as an array. + * + * Note: This method is based on the rest parameter. + * * @param func The function to apply a rest parameter to. * @param start The start position of the rest parameter. * @return Returns the new function. */ - restParam(func: Function, start?: number): TResult; + restParam( + func: Function, + start?: number + ): TResult; /** * @see _.restParam */ - restParam(func: TFunc, start?: number): TResult; + restParam( + func: TFunc, + start?: number + ): TResult; } interface LoDashImplicitObjectWrapper { @@ -7821,6 +8318,13 @@ declare module _ { restParam(start?: number): LoDashImplicitObjectWrapper; } + interface LoDashExplicitObjectWrapper { + /** + * @see _.restParam + */ + restParam(start?: number): LoDashExplicitObjectWrapper; + } + //_.spread interface LoDashStatic { /** @@ -8063,38 +8567,60 @@ declare module _ { interface LoDashStatic { /** * Checks if value is greater than other. + * * @param value The value to compare. * @param other The other value to compare. * @return Returns true if value is greater than other, else false. */ - gt(value: any, other: any): boolean; + gt( + value: any, + other: any + ): boolean; } - interface LoDashImplicitWrapperBase { + interface LoDashImplicitWrapperBase { /** * @see _.gt */ gt(other: any): boolean; } + interface LoDashExplicitWrapperBase { + /** + * @see _.gt + */ + gt(other: any): LoDashExplicitWrapper; + } + //_.gte interface LoDashStatic { /** * Checks if value is greater than or equal to other. + * * @param value The value to compare. * @param other The other value to compare. * @return Returns true if value is greater than or equal to other, else false. */ - gte(value: any, other: any): boolean; + gte( + value: any, + other: any + ): boolean; } - interface LoDashImplicitWrapperBase { + interface LoDashImplicitWrapperBase { /** * @see _.gte */ gte(other: any): boolean; } + interface LoDashExplicitWrapperBase { + /** + * @see _.gte + */ + gte(other: any): LoDashExplicitWrapper; + } + //_.isArguments interface LoDashStatic { /** @@ -8513,38 +9039,60 @@ declare module _ { interface LoDashStatic { /** * Checks if value is less than other. + * * @param value The value to compare. * @param other The other value to compare. * @return Returns true if value is less than other, else false. */ - lt(value: any, other: any): boolean; + lt( + value: any, + other: any + ): boolean; } - interface LoDashImplicitWrapperBase { + interface LoDashImplicitWrapperBase { /** * @see _.lt */ lt(other: any): boolean; } + interface LoDashExplicitWrapperBase { + /** + * @see _.lt + */ + lt(other: any): LoDashExplicitWrapper; + } + //_.lte interface LoDashStatic { /** * Checks if value is less than or equal to other. + * * @param value The value to compare. * @param other The other value to compare. * @return Returns true if value is less than or equal to other, else false. */ - lte(value: any, other: any): boolean; + lte( + value: any, + other: any + ): boolean; } - interface LoDashImplicitWrapperBase { + interface LoDashImplicitWrapperBase { /** * @see _.lte */ lte(other: any): boolean; } + interface LoDashExplicitWrapperBase { + /** + * @see _.lte + */ + lte(other: any): LoDashExplicitWrapper; + } + //_.toArray interface LoDashStatic { /** @@ -9936,162 +10484,216 @@ declare module _ { //_.forIn interface LoDashStatic { /** - * Iterates over own and inherited enumerable properties of an object, executing the callback for - * each property. The callback is bound to thisArg and invoked with three arguments; (value, key, - * object). Callbacks may exit iteration early by explicitly returning false. - * @param object The object to iterate over. - * @param callback The function called per iteration. - * @param thisArg The this binding of callback. - * @return object - **/ + * Iterates over own and inherited enumerable properties of an object invoking iteratee for each property. The + * iteratee is bound to thisArg and invoked with three arguments: (value, key, object). Iteratee functions may + * exit iteration early by explicitly returning false. + * + * @param object The object to iterate over. + * @param iteratee The function invoked per iteration. + * @param thisArg The this binding of iteratee. + * @return Returns object. + */ forIn( object: Dictionary, - callback?: DictionaryIterator, - thisArg?: any): Dictionary; + iteratee?: DictionaryIterator, + thisArg?: any + ): Dictionary; /** - * @see _.forIn - **/ - forIn( + * @see _.forIn + */ + forIn( object: T, - callback?: ObjectIterator, - thisArg?: any): T; + iteratee?: ObjectIterator, + thisArg?: any + ): T; } interface LoDashImplicitObjectWrapper { /** - * @see _.forIn - **/ - forIn( - callback: ObjectIterator, - thisArg?: any): _.LoDashImplicitObjectWrapper; + * @see _.forIn + */ + forIn( + iteratee?: DictionaryIterator, + thisArg?: any + ): _.LoDashImplicitObjectWrapper; + } + + interface LoDashExplicitObjectWrapper { + /** + * @see _.forIn + */ + forIn( + iteratee?: DictionaryIterator, + thisArg?: any + ): _.LoDashExplicitObjectWrapper; } //_.forInRight interface LoDashStatic { /** - * This method is like _.forIn except that it iterates over elements of a collection in the - * opposite order. - * @param object The object to iterate over. - * @param callback The function called per iteration. - * @param thisArg The this binding of callback. - * @return object - **/ - forInRight( + * This method is like _.forIn except that it iterates over properties of object in the opposite order. + * + * @param object The object to iterate over. + * @param iteratee The function invoked per iteration. + * @param thisArg The this binding of iteratee. + * @return Returns object. + */ + forInRight( object: Dictionary, - callback?: DictionaryIterator, - thisArg?: any): Dictionary; + iteratee?: DictionaryIterator, + thisArg?: any + ): Dictionary; /** - * @see _.forInRight - **/ + * @see _.forInRight + */ forInRight( object: T, - callback?: ObjectIterator, - thisArg?: any): T; + iteratee?: ObjectIterator, + thisArg?: any + ): T; } interface LoDashImplicitObjectWrapper { /** - * @see _.forInRight - **/ - forInRight( - callback: ObjectIterator, - thisArg?: any): _.LoDashImplicitObjectWrapper; + * @see _.forInRight + */ + forInRight( + iteratee?: DictionaryIterator, + thisArg?: any + ): _.LoDashImplicitObjectWrapper; + } + + interface LoDashExplicitObjectWrapper { + /** + * @see _.forInRight + */ + forInRight( + iteratee?: DictionaryIterator, + thisArg?: any + ): _.LoDashExplicitObjectWrapper; } //_.forOwn interface LoDashStatic { /** - * Iterates over own enumerable properties of an object, executing the callback for each - * property. The callback is bound to thisArg and invoked with three arguments; (value, key, - * object). Callbacks may exit iteration early by explicitly returning false. - * @param object The object to iterate over. - * @param callback The function called per iteration. - * @param thisArg The this binding of callback. - * @return object - **/ - forOwn( + * Iterates over own enumerable properties of an object invoking iteratee for each property. The iteratee is + * bound to thisArg and invoked with three arguments: (value, key, object). Iteratee functions may exit + * iteration early by explicitly returning false. + * + * @param object The object to iterate over. + * @param iteratee The function invoked per iteration. + * @param thisArg The this binding of iteratee. + * @return Returns object. + */ + forOwn( object: Dictionary, - callback?: DictionaryIterator, - thisArg?: any): Dictionary; + iteratee?: DictionaryIterator, + thisArg?: any + ): Dictionary; /** - * @see _.forOwn - **/ + * @see _.forOwn + */ forOwn( object: T, - callback?: ObjectIterator, - thisArg?: any): T; + iteratee?: ObjectIterator, + thisArg?: any + ): T; } interface LoDashImplicitObjectWrapper { /** - * @see _.forOwn - **/ - forOwn( - callback: ObjectIterator, - thisArg?: any): _.LoDashImplicitObjectWrapper; + * @see _.forOwn + */ + forOwn( + iteratee?: DictionaryIterator, + thisArg?: any + ): _.LoDashImplicitObjectWrapper; + } + + interface LoDashExplicitObjectWrapper { + /** + * @see _.forOwn + */ + forOwn( + iteratee?: DictionaryIterator, + thisArg?: any + ): _.LoDashExplicitObjectWrapper; } //_.forOwnRight interface LoDashStatic { /** - * This method is like _.forOwn except that it iterates over elements of a collection in the - * opposite order. - * @param object The object to iterate over. - * @param callback The function called per iteration. - * @param thisArg The this binding of callback. - * @return object - **/ - forOwnRight( + * This method is like _.forOwn except that it iterates over properties of object in the opposite order. + * + * @param object The object to iterate over. + * @param iteratee The function invoked per iteration. + * @param thisArg The this binding of iteratee. + * @return Returns object. + */ + forOwnRight( object: Dictionary, - callback?: DictionaryIterator, - thisArg?: any): Dictionary; + iteratee?: DictionaryIterator, + thisArg?: any + ): Dictionary; + /** - * @see _.forOwnRight - **/ + * @see _.forOwnRight + */ forOwnRight( object: T, - callback?: ObjectIterator, - thisArg?: any): T; + iteratee?: ObjectIterator, + thisArg?: any + ): T; } interface LoDashImplicitObjectWrapper { /** - * @see _.forOwnRight - **/ - forOwnRight( - callback: ObjectIterator, - thisArg?: any): _.LoDashImplicitObjectWrapper; + * @see _.forOwnRight + */ + forOwnRight( + iteratee?: DictionaryIterator, + thisArg?: any + ): _.LoDashImplicitObjectWrapper; + } + + interface LoDashExplicitObjectWrapper { + /** + * @see _.forOwnRight + */ + forOwnRight( + iteratee?: DictionaryIterator, + thisArg?: any + ): _.LoDashExplicitObjectWrapper; } //_.functions interface LoDashStatic { /** - * Creates a sorted array of property names of all enumerable properties, own and inherited, of - * object that have function values. - * @param object The object to inspect. - * @return An array of property names that have function values. - **/ - functions(object: any): string[]; - - /** - * @see _functions - **/ - methods(object: any): string[]; + * Creates an array of function property names from all enumerable properties, own and inherited, of object. + * + * @alias _.methods + * + * @param object The object to inspect. + * @return Returns the new array of property names. + */ + functions(object: any): string[]; } interface LoDashImplicitObjectWrapper { /** - * @see _.functions - **/ + * @see _.functions + */ functions(): _.LoDashImplicitArrayWrapper; + } + interface LoDashExplicitObjectWrapper { /** - * @see _.functions - **/ - methods(): _.LoDashImplicitArrayWrapper; + * @see _.functions + */ + functions(): _.LoDashExplicitArrayWrapper; } //_.get @@ -10128,14 +10730,24 @@ declare module _ { * @param path The path to check. * @return Returns true if path is a direct property, else false. */ - has(object: any, path: string|number|boolean|Array): boolean; + has( + object: T, + path: StringRepresentable|StringRepresentable[] + ): boolean; } interface LoDashImplicitObjectWrapper { /** * @see _.has */ - has(path: string|number|boolean|Array): boolean; + has(path: StringRepresentable|StringRepresentable[]): boolean; + } + + interface LoDashExplicitObjectWrapper { + /** + * @see _.has + */ + has(path: StringRepresentable|StringRepresentable[]): LoDashExplicitWrapper; } //_.invert @@ -10161,18 +10773,26 @@ declare module _ { //_.keys interface LoDashStatic { /** - * Creates an array composed of the own enumerable property names of an object. - * @param object The object to inspect. - * @return An array of property names. - **/ + * Creates an array of the own enumerable property names of object. + * + * @param object The object to query. + * @return Returns the array of property names. + */ keys(object?: any): string[]; } interface LoDashImplicitObjectWrapper { /** - * @see _.keys - **/ - keys(): LoDashImplicitArrayWrapper + * @see _.keys + */ + keys(): LoDashImplicitArrayWrapper; + } + + interface LoDashExplicitObjectWrapper { + /** + * @see _.keys + */ + keys(): LoDashExplicitArrayWrapper; } //_.keysIn @@ -10231,7 +10851,8 @@ declare module _ { */ mapKeys( object: List|Dictionary, - iteratee?: string + iteratee?: string, + thisArg?: any ): Dictionary; } @@ -10255,7 +10876,8 @@ declare module _ { * @see _.mapKeys */ mapKeys( - iteratee?: string + iteratee?: string, + thisArg?: any ): LoDashImplicitObjectWrapper>; } @@ -10279,10 +10901,61 @@ declare module _ { * @see _.mapKeys */ mapKeys( - iteratee?: string + iteratee?: string, + thisArg?: any ): LoDashImplicitObjectWrapper>; } + interface LoDashExplicitArrayWrapper { + /** + * @see _.mapKeys + */ + mapKeys( + iteratee?: ListIterator, + thisArg?: any + ): LoDashExplicitObjectWrapper>; + + /** + * @see _.mapKeys + */ + mapKeys( + iteratee?: TObject + ): LoDashExplicitObjectWrapper>; + + /** + * @see _.mapKeys + */ + mapKeys( + iteratee?: string, + thisArg?: any + ): LoDashExplicitObjectWrapper>; + } + + interface LoDashExplicitObjectWrapper { + /** + * @see _.mapKeys + */ + mapKeys( + iteratee?: ListIterator|DictionaryIterator, + thisArg?: any + ): LoDashExplicitObjectWrapper>; + + /** + * @see _.mapKeys + */ + mapKeys( + iteratee?: TObject + ): LoDashExplicitObjectWrapper>; + + /** + * @see _.mapKeys + */ + mapKeys( + iteratee?: string, + thisArg?: any + ): LoDashExplicitObjectWrapper>; + } + //_.mapValues interface LoDashStatic { /** @@ -10462,6 +11135,28 @@ declare module _ { ): LoDashImplicitObjectWrapper; } + //_.methods + interface LoDashStatic { + /** + * @see _.functions + */ + methods(object: any): string[]; + } + + interface LoDashImplicitObjectWrapper { + /** + * @see _.functions + */ + methods(): _.LoDashImplicitArrayWrapper; + } + + interface LoDashExplicitObjectWrapper { + /** + * @see _.functions + */ + methods(): _.LoDashExplicitArrayWrapper; + } + //_.omit interface LoDashStatic { /** @@ -10518,19 +11213,28 @@ declare module _ { //_.pairs interface LoDashStatic { /** - * Creates a two dimensional array of an object's key-value pairs, - * i.e. [[key1, value1], [key2, value2]]. - * @param object The object to inspect. - * @return Aew array of key-value pairs. - **/ - pairs(object?: any): any[][]; + * Creates a two dimensional array of the key-value pairs for object, e.g. [[key1, value1], [key2, value2]]. + * + * @param object The object to query. + * @return Returns the new array of key-value pairs. + */ + pairs(object?: T): any[][]; + + pairs(object?: T): TResult[][]; } interface LoDashImplicitObjectWrapper { /** - * @see _.pairs - **/ - pairs(): LoDashImplicitArrayWrapper; + * @see _.pairs + */ + pairs(): LoDashImplicitArrayWrapper; + } + + interface LoDashExplicitObjectWrapper { + /** + * @see _.pairs + */ + pairs(): LoDashExplicitArrayWrapper; } //_.pick @@ -10622,18 +11326,37 @@ declare module _ { path: StringRepresentable|StringRepresentable[], value: any ): T; + + /** + * @see _.set + */ + set( + object: T, + path: StringRepresentable|StringRepresentable[], + value: V + ): T; } interface LoDashImplicitObjectWrapper { /** * @see _.set */ - set( + set( path: StringRepresentable|StringRepresentable[], - value: any + value: V ): LoDashImplicitObjectWrapper; } + interface LoDashExplicitObjectWrapper { + /** + * @see _.set + */ + set( + path: StringRepresentable|StringRepresentable[], + value: V + ): LoDashExplicitObjectWrapper; + } + //_.transform interface LoDashStatic { /** @@ -10729,18 +11452,26 @@ declare module _ { //_.values interface LoDashStatic { /** - * Creates an array of the own enumerable property values of object. - * @param object The object to query. - * @return Returns an array of property values. - **/ + * Creates an array of the own enumerable property values of object. + * + * @param object The object to query. + * @return Returns an array of property values. + */ values(object?: any): T[]; } interface LoDashImplicitObjectWrapper { /** - * @see _.values - **/ - values(): LoDashImplicitObjectWrapper; + * @see _.values + */ + values(): LoDashImplicitArrayWrapper; + } + + interface LoDashExplicitObjectWrapper { + /** + * @see _.values + */ + values(): LoDashExplicitArrayWrapper; } //_.valuesIn @@ -10757,7 +11488,7 @@ declare module _ { /** * @see _.valuesIn **/ - valuesIn(): LoDashImplicitObjectWrapper; + valuesIn(): LoDashImplicitArrayWrapper; } /********** @@ -12014,13 +12745,14 @@ declare module _ { interface LoDashStatic { /** * Creates a function that returns the property value at path on a given object. + * * @param path The path of the property to get. * @return Returns the new function. */ - property(path: string|string[]): (obj: TObj) => TResult; + property(path: StringRepresentable|StringRepresentable[]): (obj: TObj) => TResult; } - interface LoDashImplicitStringWrapper { + interface LoDashImplicitWrapper { /** * @see _.property */ @@ -12034,6 +12766,20 @@ declare module _ { property(): LoDashImplicitObjectWrapper<(obj: TObj) => TResult>; } + interface LoDashExplicitWrapper { + /** + * @see _.property + */ + property(): LoDashExplicitObjectWrapper<(obj: TObj) => TResult>; + } + + interface LoDashExplicitArrayWrapper { + /** + * @see _.property + */ + property(): LoDashExplicitObjectWrapper<(obj: TObj) => TResult>; + } + //_.propertyOf interface LoDashStatic { /** diff --git a/loglevel/loglevel-tests.ts b/loglevel/loglevel-tests.ts index 2c4f89733d..ab19939569 100644 --- a/loglevel/loglevel-tests.ts +++ b/loglevel/loglevel-tests.ts @@ -13,8 +13,15 @@ log.setLevel(0, false); log.setLevel("error"); log.setLevel("error", false); -log.setLevel(log.levels.WARN); -log.setLevel(log.levels.WARN, false); +log.setLevel(LogLevel.WARN); +log.setLevel(LogLevel.WARN, false); + +var logLevel = log.getLevel(); + +var testLogger = log.getLogger("TestLogger"); + +testLogger.setLevel(logLevel); +testLogger.warn("logging test"); var logging = log.noConflict(); diff --git a/loglevel/loglevel.d.ts b/loglevel/loglevel.d.ts index 9f3c53f5a0..33dd8cd638 100644 --- a/loglevel/loglevel.d.ts +++ b/loglevel/loglevel.d.ts @@ -1,101 +1,144 @@ -// Type definitions for loglevel 1.3.1 +// Type definitions for loglevel 1.4.0 // Project: https://github.com/pimterry/loglevel -// Definitions by: Stefan Profanter +// Definitions by: Stefan Profanter , Florian Wagner // Definitions: https://github.com/borisyankov/DefinitelyTyped -declare module loglevel { - - /** - * Log levels - */ - export enum levels { - TRACE = 0, - DEBUG = 1, - INFO = 2, - WARN = 3, - ERROR = 4, - SILENT = 5 - } - - /** - * Output trace message to console. - * This will also include a full stack trace - * - * @param msg any data to log to the console - */ - export function trace(msg:any):void; - - /** - * Output debug message to console including appropriate icons - * - * @param msg any data to log to the console - */ - export function debug(msg:any):void; - - /** - * Output info message to console including appropriate icons - * - * @param msg any data to log to the console - */ - export function info(msg:any):void; - - /** - * Output warn message to console including appropriate icons - * - * @param msg any data to log to the console - */ - export function warn(msg:any):void; - - /** - * Output error message to console including appropriate icons - * - * @param msg any data to log to the console - */ - export function error(msg:any):void; - - - /** - * This disables all logging below the given level, so that after a log.setLevel("warn") call log.warn("something") - * or log.error("something") will output messages, but log.info("something") will not. - * - * @param level 0=trace to 5=silent - * @param persist Where possible the log level will be persisted. LocalStorage will be used if available, falling back - * to cookies if not. If neither is available in the current environment (i.e. in Node), or if you pass - * false as the optional 'persist' second argument, persistence will be skipped. - */ - export function setLevel(level:number, persist?:boolean):void; - - - /** - * This disables all logging below the given level, so that after a log.setLevel("warn") call log.warn("something") - * or log.error("something") will output messages, but log.info("something") will not. - * - * @param level as a string, like 'error' (case-insensitive) - * @param persist Where possible the log level will be persisted. LocalStorage will be used if available, falling back - * to cookies if not. If neither is available in the current environment (i.e. in Node), or if you pass - * false as the optional 'persist' second argument, persistence will be skipped. - */ - export function setLevel(level:string, persist?:boolean):void; - - - /** - * This disables all logging below the given level, so that after a log.setLevel("warn") call log.warn("something") - * or log.error("something") will output messages, but log.info("something") will not. - * - * @param level as the value from the enum - * @param persist Where possible the log level will be persisted. LocalStorage will be used if available, falling back - * to cookies if not. If neither is available in the current environment (i.e. in Node), or if you pass - * false as the optional 'persist' second argument, persistence will be skipped. - */ - export function setLevel(level:levels, persist?:boolean):void; - - /** - * If you're using another JavaScript library that exposes a 'log' global, you can run into conflicts with loglevel. - * Similarly to jQuery, you can solve this by putting loglevel into no-conflict mode immediately after it is loaded - * onto the page. This resets to 'log' global to its value before loglevel was loaded (typically undefined), and - * returns the loglevel object, which you can then bind to another name yourself. - */ - export function noConflict():any; +/** + * Log levels + */ +declare const enum LogLevel { + TRACE = 0, + DEBUG = 1, + INFO = 2, + WARN = 3, + ERROR = 4, + SILENT = 5 } -declare var log:typeof loglevel; +interface Log { + + /** + * Output trace message to console. + * This will also include a full stack trace + * + * @param msg any data to log to the console + */ + trace(...msg : any[]):void; + + /** + * Output debug message to console including appropriate icons + * + * @param msg any data to log to the console + */ + debug(...msg : any[]):void; + + /** + * Output info message to console including appropriate icons + * + * @param msg any data to log to the console + */ + info(...msg : any[]):void; + + /** + * Output warn message to console including appropriate icons + * + * @param msg any data to log to the console + */ + warn(...msg : any[]):void; + + /** + * Output error message to console including appropriate icons + * + * @param msg any data to log to the console + */ + error(...msg : any[]):void; + + + /** + * This disables all logging below the given level, so that after a log.setLevel("warn") call log.warn("something") + * or log.error("something") will output messages, but log.info("something") will not. + * + * @param level 0=trace to 5=silent + * @param persist Where possible the log level will be persisted. LocalStorage will be used if available, falling + * back to cookies if not. If neither is available in the current environment (i.e. in Node), or if you pass + * false as the optional 'persist' second argument, persistence will be skipped. + */ + setLevel(level : LogLevel, persist? : boolean):void; + + + /** + * This disables all logging below the given level, so that after a log.setLevel("warn") call log.warn("something") + * or log.error("something") will output messages, but log.info("something") will not. + * + * @param level as a string, like 'error' (case-insensitive) + * @param persist Where possible the log level will be persisted. LocalStorage will be used if available, falling + * back to cookies if not. If neither is available in the current environment (i.e. in Node), or if you pass + * false as the optional 'persist' second argument, persistence will be skipped. + */ + setLevel(level : string, persist? : boolean):void; + + + /** + * This disables all logging below the given level, so that after a log.setLevel("warn") call log.warn("something") + * or log.error("something") will output messages, but log.info("something") will not. + * + * @param level as the value from the enum + * @param persist Where possible the log level will be persisted. LocalStorage will be used if available, falling + * back to cookies if not. If neither is available in the current environment (i.e. in Node), or if you pass + * false as the optional 'persist' second argument, persistence will be skipped. + */ + setLevel(level : LogLevel, persist? : boolean):void; + + /** + * If you're using another JavaScript library that exposes a 'log' global, you can run into conflicts with loglevel. + * Similarly to jQuery, you can solve this by putting loglevel into no-conflict mode immediately after it is loaded + * onto the page. This resets to 'log' global to its value before loglevel was loaded (typically undefined), and + * returns the loglevel object, which you can then bind to another name yourself. + */ + noConflict():any; + + /** + * Returns the current logging level, as a value from the enum. + * It's very unlikely you'll need to use this for normal application logging; it's provided partly to help plugin + * development, and partly to let you optimize logging code as below, where debug data is only generated if the + * level is set such that it'll actually be logged. This probably doesn't affect you, unless you've run profiling + * on your code and you have hard numbers telling you that your log data generation is a real performance problem. + */ + getLevel():LogLevel; + + /** + * This sets the current log level only if one has not been persisted and can’t be loaded. This is useful when + * initializing scripts; if a developer or user has previously called setLevel(), this won’t alter their settings. + * For example, your application might set the log level to error in a production environment, but when debugging + * an issue, you might call setLevel("trace") on the console to see all the logs. If that error setting was set + * using setDefaultLevel(), it will still say as trace on subsequent page loads and refreshes instead of resetting + * to error. + * + * The level argument takes is the same values that you might pass to setLevel(). Levels set using + * setDefaultLevel() never persist to subsequent page loads. + * + * @param level as the value from the enum + */ + setDefaultLevel(level : LogLevel):void; + + /** + * This gets you a new logger object that works exactly like the root log object, but can have its level and + * logging methods set independently. All loggers must have a name (which is a non-empty string). Calling + * getLogger() multiple times with the same name will return an identical logger object. + * In large applications, it can be incredibly useful to turn logging on and off for particular modules as you are + * working with them. Using the getLogger() method lets you create a separate logger for each part of your + * application with its own logging level. Likewise, for small, independent modules, using a named logger instead + * of the default root logger allows developers using your module to selectively turn on deep, trace-level logging + * when trying to debug problems, while logging only errors or silencing logging altogether under normal + * circumstances. + * @param name The name of the produced logger + */ + getLogger(name : String):Log; + +} + +declare var log : Log; + +declare module "loglevel" { + export = log; +} diff --git a/lovefield/lovefield-tests.ts b/lovefield/lovefield-tests.ts index 45de3299dd..b9bc73a82c 100644 --- a/lovefield/lovefield-tests.ts +++ b/lovefield/lovefield-tests.ts @@ -9,7 +9,9 @@ function main(): void { addColumn('deadline', lf.Type.DATE_TIME). addColumn('done', lf.Type.BOOLEAN). addPrimaryKey(['id'], false). - addIndex('idxDeadline', ['deadline'], false, lf.Order.DESC); + addIndex('idxDeadline', ['deadline'], false, lf.Order.DESC). + addNullable(['deadline']). + addUnique('uq_description', ['description']); var todoDb: lf.Database = null; var itemSchema: lf.schema.Table = null; diff --git a/lovefield/lovefield.d.ts b/lovefield/lovefield.d.ts index dc91b9f909..0b0afe023b 100644 --- a/lovefield/lovefield.d.ts +++ b/lovefield/lovefield.d.ts @@ -199,11 +199,11 @@ declare module lf { addIndex( name: string, columns: Array|Array, unique?: boolean, order?: Order): TableBuilder - addNullable(columns: Array): TableBuilder + addNullable(columns: Array): TableBuilder addPrimaryKey( columns: Array|Array, autoInc?: boolean): TableBuilder - addUnique(name: string, columns: Array): TableBuilder + addUnique(name: string, columns: Array): TableBuilder } function create(dbName: string, dbVersion: number): Builder diff --git a/material-ui/legacy/material-ui-0.12.1-tests .tsx b/material-ui/legacy/material-ui-0.12.1-tests .tsx new file mode 100644 index 0000000000..aa094c424d --- /dev/null +++ b/material-ui/legacy/material-ui-0.12.1-tests .tsx @@ -0,0 +1,468 @@ +/// +/// + +import * as React from "react/addons"; +import Checkbox = require("material-ui/lib/checkbox"); +import Colors = require("material-ui/lib/styles/colors"); +import AppBar = require("material-ui/lib/app-bar"); +import IconButton = require("material-ui/lib/icon-button"); +import FlatButton = require("material-ui/lib/flat-button"); +import Avatar = require("material-ui/lib/avatar"); +import FontIcon = require("material-ui/lib/font-icon"); +import Typography = require("material-ui/lib/styles/typography"); +import RaisedButton = require("material-ui/lib/raised-button"); +import FloatingActionButton = require("material-ui/lib/floating-action-button"); +import Card = require("material-ui/lib/card/card"); +import CardHeader = require("material-ui/lib/card/card-header"); +import CardText = require("material-ui/lib/card/card-text"); +import CardActions = require("material-ui/lib/card/card-actions"); +import Dialog = require("material-ui/lib/dialog"); +import DropDownMenu = require("material-ui/lib/drop-down-menu"); +import RadioButtonGroup = require("material-ui/lib/radio-button-group"); +import RadioButton = require("material-ui/lib/radio-button"); +import Toggle = require("material-ui/lib/toggle"); +import TextField = require("material-ui/lib/text-field"); +import SelectField = require("material-ui/lib/select-field"); +import IconMenu = require("material-ui/lib/menus/icon-menu"); +import Menu = require('material-ui/lib/menus/menu'); +import MenuItem = require('material-ui/lib/menus/menu-item'); +import MenuDivider = require('material-ui/lib/menus/menu-divider'); +import ThemeManager = require('material-ui/lib/styles/theme-manager'); + +import NavigationClose = require("material-ui/lib/svg-icon"); // TODO: Should actually import the actual "material-ui/lib/svg-icons/navigation/close", but they aren't defined yet. +import FileFolder = require("material-ui/lib/svg-icon"); // TODO: Should actually import the actual "material-ui/lib/svg-icons/file/folder", but they aren't defined yet. +import ToggleStar = require("material-ui/lib/svg-icon"); // TODO: Should actually import the actual "material-ui/lib/svg-icons/toggle/star", but they aren't defined yet. +import ActionGrade = require("material-ui/lib/svg-icon"); // TODO: Should actually import the actual "material-ui/lib/svg-icons/action/grade", but they aren't defined yet. +import ToggleStarBorder = require("material-ui/lib/svg-icon"); // TODO: Should actually import the actual "material-ui/lib/svg-icons/toggle/star-border", but they aren't defined yet. +import ArrowDropRight = require("material-ui/lib/svg-icon"); // TODO: Should actually import the actual "material-ui/lib/svg-icons/toggle/star-border", but they aren't defined yet. + +type CheckboxProps = __MaterialUI.CheckboxProps; +type MuiTheme = __MaterialUI.Styles.MuiTheme; +type TouchTapEvent = __MaterialUI.TouchTapEvent; + +class MaterialUiTests extends React.Component<{}, {}> implements React.LinkedStateMixin { + + // injected with mixin + linkState: (key: string) => React.ReactLink; + dialog: Dialog; + + private touchTapEventHandler(e: TouchTapEvent) { + this.dialog.show(); + } + private formEventHandler(e: React.FormEvent) { + } + private selectFieldChangeHandler(e: TouchTapEvent, si: number, mi: any) { + } + + render() { + + // "http://material-ui.com/#/customization/themes" + let muiTheme: MuiTheme = ThemeManager.getMuiTheme({ + palette: { + accent1Color: Colors.cyan100 + }, + spacing: { + + } + }); + + // "http://material-ui.com/#/customization/inline-styles" + let element: React.ReactElement; + element = + element = React.createElement(Checkbox, { + id: "checkboxId1", name: "checkboxName1", value: "checkboxValue1", label: "went for a run today", style: { + width: '50%', + margin: '0 auto' + }, iconStyle: { + fill: '#FF4081' + } + }); + + // "http://material-ui.com/#/components/appbar" + element = + element = } + iconElementRight={} />; + + // "http://material-ui.com/#/components/avatars" + //image avatar + element = ; + //SvgIcon avatar + element = } />; + //SvgIcon avatar with custom colors + element = } + color={Colors.orange200} + backgroundColor={Colors.pink400} />; + //FontIcon avatar + element = + } />; + //FontIcon avatar with custom colors + element = } + color={Colors.blue300} + backgroundColor={Colors.indigo900} />; + //Letter avatar + element = A; + //Letter avatar with custom colors + element = + + + + // "http://material-ui.com/#/components/buttons" + element = + + ; + element = + + ; + element = + + ; + + // "http://material-ui.com/#/components/cards" + element = + A} + showExpandableButton={true}> + + + Lorem ipsum dolor sit amet, consectetur adipiscing elit. + + + + + + + Lorem ipsum dolor sit amet, consectetur adipiscing elit. + + ; + + // "http://material-ui.com/#/components/date-picker" + + + // "http://material-ui.com/#/components/dialog" + let standardActions = [ + { text: 'Cancel' }, + { text: 'Submit', onTouchTap: this.touchTapEventHandler, ref: 'submit' } + ]; + + element = + The actions in this window are created from the json that's passed in. + ; + + //Custom Actions + let customActions = [ + , + + ]; + + element = + The actions in this window were passed in as an array of react objects. + ; + + + // "http://material-ui.com/#/components/dropdown-menu" + let menuItems = [ + { payload: '1', text: 'Never' }, + { payload: '2', text: 'Every Night' }, + { payload: '3', text: 'Weeknights' }, + { payload: '4', text: 'Weekends' }, + { payload: '5', text: 'Weekly' }, + ]; + element = ; + + // "http://material-ui.com/#/components/icons" + element = home; + + // "http://material-ui.com/#/components/icon-buttons" + //Method 1: muidocs-icon-github is defined in a style sheet. + element = ; + //Method 2: ActionGrade is a component created using mui.SvgIcon. + element = + + ; + //Method 3: Manually creating a mui.FontIcon component within IconButton + element = + + ; + //Method 4: Using Google material-icons + element = settings_system_daydream; + + // "http://material-ui.com/#/components/icon-menus" + element = }> + + + + + + ; + + // "http://material-ui.com/#/components/left-nav" + + + // "http://material-ui.com/#/components/lists" + + + // "http://material-ui.com/#/components/menus" + element = + + + + + ; + element = + + + + + + + + } /> + } /> + } /> + } /> + } /> + + + ; + + // "http://material-ui.com/#/components/paper" + + + // "http://material-ui.com/#/components/progress" + + + // "http://material-ui.com/#/components/refresh-indicator" + + + // "http://material-ui.com/#/components/sliders" + + + // "http://material-ui.com/#/components/switches" + element = ; + element = ; + element = } + unCheckedIcon={} + label="custom icon" />; + + element = + ; + ; + + ; + + element = ; + + element = ; + + element = ; + + // "http://material-ui.com/#/components/snackbar" + + + // "http://material-ui.com/#/components/table" + + + // "http://material-ui.com/#/components/tabs" + + + // "http://material-ui.com/#/components/text-fields" + element = ; + element = ; + element = ; + element = ; + element = ('valueLinkValue') } />; + element = ; + element = ; + element = ; + element = ; + element = ; + element = ; + element = ; + + //Select Fields + let arbitraryArrayMenuItems = [ + { + id: 0, + name: "zero", + }, + ]; + element = ; + element = ; + element = ; + element = ; + + //Floating Hint Text Labels + element = ; + element = ; + element = ; + element = ('floatingValueLinkValue') } />; + element = ; + element = ; + element = ; + element = ; + element = ; + element = ; + + + // "http://material-ui.com/#/components/time-picker" + + + // "http://material-ui.com/#/components/toolbars" + + return element; + } +} \ No newline at end of file diff --git a/material-ui/legacy/material-ui-0.12.1.d.ts b/material-ui/legacy/material-ui-0.12.1.d.ts new file mode 100644 index 0000000000..658a37ec40 --- /dev/null +++ b/material-ui/legacy/material-ui-0.12.1.d.ts @@ -0,0 +1,2249 @@ +// Type definitions for material-ui v0.12.1 +// Project: https://github.com/callemall/material-ui +// Definitions by: Nathan Brown +// Definitions: https://github.com/borisyankov/DefinitelyTyped + +/// + +declare module "material-ui" { + export import AppBar = __MaterialUI.AppBar; // require('material-ui/lib/app-bar'); + export import AppCanvas = __MaterialUI.AppCanvas; // require('material-ui/lib/app-canvas'); + export import Avatar = __MaterialUI.Avatar; // require('material-ui/lib/avatar'); + export import BeforeAfterWrapper = __MaterialUI.BeforeAfterWrapper; // require('material-ui/lib/before-after-wrapper'); + export import Card = __MaterialUI.Card.Card; // require('material-ui/lib/card/card'); + export import CardActions = __MaterialUI.Card.CardActions; // require('material-ui/lib/card/card-actions'); + export import CardExpandable = __MaterialUI.Card.CardExpandable; // require('material-ui/lib/card/card-expandable'); + export import CardHeader = __MaterialUI.Card.CardHeader; // require('material-ui/lib/card/card-header'); + export import CardMedia = __MaterialUI.Card.CardMedia; // require('material-ui/lib/card/card-media'); + export import CardText = __MaterialUI.Card.CardText; // require('material-ui/lib/card/card-text'); + export import CardTitle = __MaterialUI.Card.CardTitle; // require('material-ui/lib/card/card-title'); + export import Checkbox = __MaterialUI.Checkbox; // require('material-ui/lib/checkbox'); + export import CircularProgress = __MaterialUI.CircularProgress; // require('material-ui/lib/circular-progress'); + export import ClearFix = __MaterialUI.ClearFix; // require('material-ui/lib/clearfix'); + export import DatePicker = __MaterialUI.DatePicker.DatePicker; // require('material-ui/lib/date-picker/date-picker'); + export import DatePickerDialog = __MaterialUI.DatePicker.DatePickerDialog; // require('material-ui/lib/date-picker/date-picker-dialog'); + export import Dialog = __MaterialUI.Dialog // require('material-ui/lib/dialog'); + export import DropDownIcon = __MaterialUI.DropDownIcon; // require('material-ui/lib/drop-down-icon'); + export import DropDownMenu = __MaterialUI.DropDownMenu; // require('material-ui/lib/drop-down-menu'); + export import EnhancedButton = __MaterialUI.EnhancedButton; // require('material-ui/lib/enhanced-button'); + export import FlatButton = __MaterialUI.FlatButton; // require('material-ui/lib/flat-button'); + export import FloatingActionButton = __MaterialUI.FloatingActionButton; // require('material-ui/lib/floating-action-button'); + export import FontIcon = __MaterialUI.FontIcon; // require('material-ui/lib/font-icon'); + export import IconButton = __MaterialUI.IconButton; // require('material-ui/lib/icon-button'); + export import IconMenu = __MaterialUI.Menus.IconMenu; // require('material-ui/lib/menus/icon-menu'); + export import LeftNav = __MaterialUI.LeftNav; // require('material-ui/lib/left-nav'); + export import LinearProgress = __MaterialUI.LinearProgress; // require('material-ui/lib/linear-progress'); + export import List = __MaterialUI.Lists.List; // require('material-ui/lib/lists/list'); + export import ListDivider = __MaterialUI.Lists.ListDivider; // require('material-ui/lib/lists/list-divider'); + export import ListItem = __MaterialUI.Lists.ListItem; // require('material-ui/lib/lists/list-item'); + export import Menu = __MaterialUI.Menu.Menu; // require('material-ui/lib/menu/menu'); + export import MenuItem = __MaterialUI.Menu.MenuItem; // require('material-ui/lib/menu/menu-item'); + export import Mixins = __MaterialUI.Mixins; // require('material-ui/lib/mixins/'); + export import Overlay = __MaterialUI.Overlay; // require('material-ui/lib/overlay'); + export import Paper = __MaterialUI.Paper; // require('material-ui/lib/paper'); + export import RadioButton = __MaterialUI.RadioButton; // require('material-ui/lib/radio-button'); + export import RadioButtonGroup = __MaterialUI.RadioButtonGroup; // require('material-ui/lib/radio-button-group'); + export import RaisedButton = __MaterialUI.RaisedButton; // require('material-ui/lib/raised-button'); + export import RefreshIndicator = __MaterialUI.RefreshIndicator; // require('material-ui/lib/refresh-indicator'); + export import Ripples = __MaterialUI.Ripples; // require('material-ui/lib/ripples/'); + export import SelectField = __MaterialUI.SelectField; // require('material-ui/lib/select-field'); + export import Slider = __MaterialUI.Slider; // require('material-ui/lib/slider'); + export import SvgIcon = __MaterialUI.SvgIcon; // require('material-ui/lib/svg-icon'); + export import Icons = __MaterialUI.Icons; + export import Styles = __MaterialUI.Styles; // require('material-ui/lib/styles/'); + export import Snackbar = __MaterialUI.Snackbar; // require('material-ui/lib/snackbar'); + export import Tab = __MaterialUI.Tabs.Tab; // require('material-ui/lib/tabs/tab'); + export import Tabs = __MaterialUI.Tabs.Tabs; // require('material-ui/lib/tabs/tabs'); + export import Table = __MaterialUI.Table.Table; // require('material-ui/lib/table/table'); + export import TableBody = __MaterialUI.Table.TableBody; // require('material-ui/lib/table/table-body'); + export import TableFooter = __MaterialUI.Table.TableFooter; // require('material-ui/lib/table/table-footer'); + export import TableHeader = __MaterialUI.Table.TableHeader; // require('material-ui/lib/table/table-header'); + export import TableHeaderColumn = __MaterialUI.Table.TableHeaderColumn; // require('material-ui/lib/table/table-header-column'); + export import TableRow = __MaterialUI.Table.TableRow; // require('material-ui/lib/table/table-row'); + export import TableRowColumn = __MaterialUI.Table.TableRowColumn; // require('material-ui/lib/table/table-row-column'); + export import ThemeWrapper = __MaterialUI.ThemeWrapper; // require('material-ui/lib/theme-wrapper'); + export import Toggle = __MaterialUI.Toggle; // require('material-ui/lib/toggle'); + export import TimePicker = __MaterialUI.TimePicker; // require('material-ui/lib/time-picker'); + export import TextField = __MaterialUI.TextField; // require('material-ui/lib/text-field'); + export import Toolbar = __MaterialUI.Toolbar.Toolbar; // require('material-ui/lib/toolbar/toolbar'); + export import ToolbarGroup = __MaterialUI.Toolbar.ToolbarGroup; // require('material-ui/lib/toolbar/toolbar-group'); + export import ToolbarSeparator = __MaterialUI.Toolbar.ToolbarSeparator; // require('material-ui/lib/toolbar/toolbar-separator'); + export import ToolbarTitle = __MaterialUI.Toolbar.ToolbarTitle; // require('material-ui/lib/toolbar/toolbar-title'); + export import Tooltip = __MaterialUI.Tooltip; // require('material-ui/lib/tooltip'); + export import Utils = __MaterialUI.Utils; // require('material-ui/lib/utils/'); + + // export type definitions + export type TouchTapEvent = __MaterialUI.TouchTapEvent; + export type TouchTapEventHandler = __MaterialUI.TouchTapEventHandler; + export type DialogAction = __MaterialUI.DialogAction; +} + +declare namespace __MaterialUI { + import React = __React; + + // ReactLink is from "react/addons" + interface ReactLink { + value: T; + requestChange(newValue: T): void; + } + + // What's common between React.TouchEvent and React.MouseEvent + interface TouchTapEvent extends React.SyntheticEvent { + altKey: boolean; + ctrlKey: boolean; + getModifierState(key: string): boolean; + metaKey: boolean; + shiftKey: boolean; + } + + // What's common between React.TouchEventHandler and React.MouseEventHandler + interface TouchTapEventHandler extends React.EventHandler { } + + // more specific than React.HTMLAttributes + + interface AppBarProps extends React.Props { + iconClassNameLeft?: string; + iconClassNameRight?: string; + iconElementLeft?: React.ReactElement; + iconElementRight?: React.ReactElement; + iconStyleRight?: string; + style?: React.CSSProperties; + showMenuIconButton?: boolean; + title?: React.ReactNode; + zDepth?: number; + + onLeftIconButtonTouchTap?: TouchTapEventHandler; + onRightIconButtonTouchTap?: TouchTapEventHandler; + } + export class AppBar extends React.Component{ + } + + interface AppCanvasProps extends React.Props { + } + export class AppCanvas extends React.Component { + } + + interface AvatarProps extends React.Props { + icon?: React.ReactElement; + backgroundColor?: string; + color?: string; + size?: number; + src?: string; + style?: React.CSSProperties; + } + export class Avatar extends React.Component { + } + + interface BeforeAfterWrapperProps extends React.Props { + beforeStyle?: React.CSSProperties; + afterStyle?: React.CSSProperties; + beforeElementType?: string; + afterElementType?: string; + elementType?: string; + } + export class BeforeAfterWrapper extends React.Component { + } + + namespace Card { + + interface CardProps extends React.Props { + expandable?: boolean; + initiallyExpanded?: boolean; + onExpandedChange?: (isExpanded: boolean) => void; + style?: React.CSSProperties; + } + export class Card extends React.Component { + } + + interface CardActionsProps extends React.Props { + expandable?: boolean; + showExpandableButton?: boolean; + } + export class CardActions extends React.Component { + } + + interface CardExpandableProps extends React.Props { + onExpanding?: (isExpanded: boolean) => void; + expanded?: boolean; + } + export class CardExpandable extends React.Component { + } + + interface CardHeaderProps extends React.Props { + expandable?: boolean; + showExpandableButton?: boolean; + title?: string | React.ReactElement; + titleColor?: string; + titleStyle?: React.CSSProperties; + subtitle?: string | React.ReactElement; + subtitleColor?: string; + subtitleStyle?: React.CSSProperties; + textStyle?: React.CSSProperties; + style?: React.CSSProperties; + avatar: React.ReactElement | string; + } + export class CardHeader extends React.Component { + } + + interface CardMediaProps extends React.Props { + expandable?: boolean; + overlay?: React.ReactNode; + overlayStyle?: React.CSSProperties; + overlayContainerStyle?: React.CSSProperties; + overlayContentStyle?: React.CSSProperties; + mediaStyle?: React.CSSProperties; + style?: React.CSSProperties; + } + export class CardMedia extends React.Component { + } + + interface CardTextProps extends React.Props { + expandable?: boolean; + color?: string; + style?: React.CSSProperties; + } + export class CardText extends React.Component { + } + + interface CardTitleProps extends React.Props { + expandable?: boolean; + showExpandableButton?: boolean; + title?: string | React.ReactElement; + titleColor?: string; + titleStyle?: React.CSSProperties; + subtitle?: string | React.ReactElement; + subtitleColor?: string; + subtitleStyle?: React.CSSProperties; + textStyle?: React.CSSProperties; + style?: React.CSSProperties; + } + export class CardTitle extends React.Component { + } + } + + // what's not commonly overridden by Checkbox, RadioButton, or Toggle + interface CommonEnhancedSwitchProps extends React.HTMLAttributesBase { + // is root element + id?: string; + iconStyle?: React.CSSProperties; + labelStyle?: React.CSSProperties; + rippleStyle?: React.CSSProperties; + thumbStyle?: React.CSSProperties; + trackStyle?: React.CSSProperties; + name?: string; + value?: string; + label?: string; + required?: boolean; + disabled?: boolean; + defaultSwitched?: boolean; + disableFocusRipple?: boolean; + disableTouchRipple?: boolean; + } + + interface EnhancedSwitchProps extends CommonEnhancedSwitchProps { + // is root element + inputType: string; + switchElement: React.ReactElement; + onParentShouldUpdate: (isInputChecked: boolean) => void; + switched: boolean; + rippleColor?: string; + onSwitch?: (e: React.MouseEvent, isInputChecked: boolean) => void; + labelPosition?: string; + } + export class EnhancedSwitch extends React.Component { + isSwitched(): boolean; + setSwitched(newSwitchedValue: boolean): void; + getValue(): any; + isKeyboardFocused(): boolean; + } + + interface CheckboxProps extends CommonEnhancedSwitchProps { + // is root element + checkedIcon?: React.ReactElement<{ style?: React.CSSProperties }>; // Normally an SvgIcon + defaultChecked?: boolean; + iconStyle?: React.CSSProperties; + label?: string; + labelStyle?: React.CSSProperties; + labelPosition?: string; + style?: React.CSSProperties; + checked?: boolean; + unCheckedIcon?: React.ReactElement<{ style?: React.CSSProperties }>; // Normally an SvgIcon + + disabled?: boolean; + valueLink?: ReactLink; + checkedLink?: ReactLink; + + onCheck?: (event: React.MouseEvent, checked: boolean) => void; + } + export class Checkbox extends React.Component { + isChecked(): void; + setChecked(newCheckedValue: boolean): void; + } + + interface CircularProgressProps extends React.Props { + mode?: string; + value?: number; + min?: number; + max?: number; + size?: number; + color?: string; + innerStyle?: React.CSSProperties; + + } + export class CircularProgress extends React.Component { + } + + interface ClearFixProps extends React.Props { + } + export class ClearFix extends React.Component { + } + + namespace DatePicker { + interface DatePickerProps extends React.Props { + autoOk?: boolean; + defaultDate?: Date; + formatDate?: string; + hideToolbarYearChange?: boolean; + maxDate?: Date; + minDate?: Date; + mode?: string; + onDismiss?: () => void; + + // e is always null + onChange?: (e: any, d: Date) => void; + + onFocus?: React.FocusEventHandler; + onShow?: () => void; + onTouchTap?: React.TouchEventHandler; + shouldDisableDate?: (day: Date) => boolean; + showYearSelector?: boolean; + textFieldStyle?: React.CSSProperties; + } + export class DatePicker extends React.Component { + } + + interface DatePickerDialogProps extends React.Props { + disableYearSelection?: boolean; + initialDate?: Date; + maxDate?: Date; + minDate?: Date; + onAccept?: (d: Date) => void; + onClickAway?: () => void; + onDismiss?: () => void; + onShow?: () => void; + shouldDisableDate?: (day: Date) => boolean; + showYearSelector?: boolean; + } + export class DatePickerDialog extends React.Component { + } + } + + export interface DialogAction { + id?: string; + text: string; + ref?: string; + + onTouchTap?: TouchTapEventHandler; + onClick?: React.MouseEventHandler; + } + interface DialogProps extends React.Props { + actions?: Array>; + actionFocus?: string; + autoDetectWindowHeight?: boolean; + autoScrollBodyContent?: boolean; + bodyStyle?: React.CSSProperties; + contentClassName?: string; + contentInnerStyle?: React.CSSProperties; + contentStyle?: React.CSSProperties; + modal?: boolean; + openImmediately?: boolean; + repositionOnUpdate?: boolean; + title?: React.ReactNode; + + onClickAway?: () => void; + onDismiss?: () => void; + onShow?: () => void; + } + export class Dialog extends React.Component { + dismiss(): void; + show(): void; + } + + interface DropDownIconProps extends React.Props { + menuItems: Menu.MenuItemRequest[]; + closeOnMenuItemTouchTap?: boolean; + iconStyle?: React.CSSProperties; + iconClassName?: string; + iconLigature?: string; + + onChange?: Menu.ItemTapEventHandler; + } + export class DropDownIcon extends React.Component { + } + + interface DropDownMenuProps extends React.Props { + displayMember?: string; + valueMember?: string; + autoWidth?: boolean; + menuItems: Menu.MenuItemRequest[]; + menuItemStyle?: React.CSSProperties; + selectedIndex?: number; + underlineStyle?: React.CSSProperties; + iconStyle?: React.CSSProperties; + labelStyle?: React.CSSProperties; + style?: React.CSSProperties; + disabled?: boolean; + valueLink?: ReactLink; + value?: number; + + onChange?: Menu.ItemTapEventHandler; + } + export class DropDownMenu extends React.Component { + } + + // non generally overridden elements of EnhancedButton + interface SharedEnhancedButtonProps extends React.HTMLAttributesBase { + centerRipple?: boolean; + containerElement?: string | React.ReactElement; + disabled?: boolean; + disableFocusRipple?: boolean; + disableKeyboardFocus?: boolean; + disableTouchRipple?: boolean; + keyboardFocused?: boolean; + linkButton?: boolean; + focusRippleColor?: string; + focusRippleOpacity?: number; + touchRippleOpacity?: number; + tabIndex?: number; + + onBlur?: React.FocusEventHandler; + onFocus?: React.FocusEventHandler; + onKeyboardFocus?: (e: React.FocusEvent, isKeyboardFocused: boolean) => void; + onKeyDown?: React.KeyboardEventHandler; + onKeyUp?: React.KeyboardEventHandler; + onMouseEnter?: React.MouseEventHandler; + onMouseLeave?: React.MouseEventHandler; + onTouchStart?: React.TouchEventHandler; + onTouchEnd?: React.TouchEventHandler; + onTouchTap?: TouchTapEventHandler; + } + + interface EnhancedButtonProps extends SharedEnhancedButtonProps { + touchRippleColor?: string; + focusRippleColor?: string; + style?: React.CSSProperties; + } + export class EnhancedButton extends React.Component { + } + + interface FlatButtonProps extends SharedEnhancedButtonProps { + hoverColor?: string; + label?: string; + labelPosition?: string; + labelStyle?: React.CSSProperties; + linkButton?: boolean; + primary?: boolean; + secondary?: boolean; + rippleColor?: string; + style?: React.CSSProperties; + } + export class FlatButton extends React.Component { + } + + interface FloatingActionButtonProps extends SharedEnhancedButtonProps { + backgroundColor?: string; + disabled?: boolean; + disabledColor?: string; + iconClassName?: string; + iconStyle?: React.CSSProperties; + mini?: boolean; + secondary?: boolean; + style?: React.CSSProperties; + } + export class FloatingActionButton extends React.Component { + } + + interface FontIconProps extends React.Props { + color?: string; + hoverColor?: string; + onMouseLeave?: React.MouseEventHandler; + onMouseEnter?: React.MouseEventHandler; + style?: React.CSSProperties; + className?: string; + } + export class FontIcon extends React.Component { + } + + interface IconButtonProps extends SharedEnhancedButtonProps { + iconClassName?: string; + iconStyle?: React.CSSProperties; + style?: React.CSSProperties; + tooltip?: string; + tooltipPosition?: string; + tooltipStyles?: React.CSSProperties; + touch?: boolean; + + onBlur?: React.FocusEventHandler; + onFocus?: React.FocusEventHandler; + } + export class IconButton extends React.Component { + } + + interface LeftNavProps extends React.Props { + disableSwipeToOpen?: boolean; + docked?: boolean; + header?: React.ReactElement; + menuItems: Menu.MenuItemRequest[]; + onChange?: Menu.ItemTapEventHandler; + onNavOpen?: () => void; + onNavClose?: () => void; + openRight?: Boolean; + selectedIndex?: number; + menuItemClassName?: string; + menuItemClassNameSubheader?: string; + menuItemClassNameLink?: string; + } + export class LeftNav extends React.Component { + } + + interface LinearProgressProps extends React.Props { + mode?: string; + value?: number; + min?: number; + max?: number; + } + export class LinearProgress extends React.Component { + } + + namespace Lists { + interface ListProps extends React.Props { + insetSubheader?: boolean; + subheader?: string; + subheaderStyle?: React.CSSProperties; + zDepth?: number; + } + export class List extends React.Component { + } + + interface ListDividerProps extends React.Props { + inset?: boolean; + } + export class ListDivider extends React.Component { + } + + interface ListItemProps extends React.Props { + autoGenerateNestedIndicator?: boolean; + disableKeyboardFocus?: boolean; + initiallyOpen?: boolean; + innerDivStyle?: React.CSSProperties; + insetChildren?: boolean; + innerStyle?: React.CSSProperties; + leftAvatar?: React.ReactElement; + leftCheckbox?: React.ReactElement; + leftIcon?: React.ReactElement; + nestedLevel?: number; + nestedItems?: React.ReactElement[]; + onKeyboardFocus?: React.FocusEventHandler; + onNestedListToggle?: (item: ListItem) => void; + rightAvatar?: React.ReactElement; + rightIcon?: React.ReactElement; + rightIconButton?: React.ReactElement; + rightToggle?: React.ReactElement; + primaryText?: React.ReactNode; + secondaryText?: React.ReactNode; + secondaryTextLines?: number; + } + export class ListItem extends React.Component { + } + } + + // Old menu implementation. Being replaced by new "menus". + namespace Menu { + interface ItemTapEventHandler { + (e: TouchTapEvent, index: number, menuItem: MenuItemRequest): void; + } + + // almost extends MenuItemProps, but certain required items are generated in Menu and not passed here. + interface MenuItemRequest extends React.Props { + // use value from MenuItem.Types.* + type?: string; + + text?: string; + data?: string; + payload?: string; + icon?: React.ReactElement; + attribute?: string; + number?: string; + toggle?: boolean; + onTouchTap?: TouchTapEventHandler; + isDisabled?: boolean; + + // for MenuItems.Types.NESTED + items?: MenuItemRequest[]; + + // for custom text or payloads + [propertyName: string]: any; + } + + interface MenuProps extends React.Props { + index: number; + text?: string; + menuItems: MenuItemRequest[]; + zDepth?: number; + active?: boolean; + onItemTap?: ItemTapEventHandler; + menuItemStyle?: React.CSSProperties; + } + export class Menu extends React.Component { + } + + interface MenuItemProps extends React.Props { + index: number; + icon?: React.ReactElement; + iconClassName?: string; + iconRightClassName?: string; + iconStyle?: React.CSSProperties; + iconRightStyle?: React.CSSProperties; + attribute?: string; + number?: string; + data?: string; + toggle?: boolean; + onTouchTap?: (e: React.MouseEvent, key: number) => void; + onToggle?: (e: React.MouseEvent, key: number, toggled: boolean) => void; + selected?: boolean; + active?: boolean; + } + export class MenuItem extends React.Component { + static Types: { LINK: string, SUBHEADER: string, NESTED: string, } + } + } + + export namespace Mixins { + interface ClickAwayable extends React.Mixin { + } + var ClickAwayable: ClickAwayable; + + interface WindowListenable extends React.Mixin { + } + var WindowListenable: WindowListenable; + + interface StylePropable extends React.Mixin { + } + var StylePropable: StylePropable + + interface StyleResizable extends React.Mixin { + } + var StyleResizable: StyleResizable + } + + interface OverlayProps extends React.Props { + autoLockScrolling?: boolean; + show?: boolean; + transitionEnabled?: boolean; + } + export class Overlay extends React.Component { + } + + interface PaperProps extends React.HTMLAttributesBase { + circle?: boolean; + rounded?: boolean; + transitionEnabled?: boolean; + zDepth?: number; + } + export class Paper extends React.Component { + } + + interface RadioButtonProps extends CommonEnhancedSwitchProps { + // is root element + defaultChecked?: boolean; + iconStyle?: React.CSSProperties; + label?: string; + labelStyle?: React.CSSProperties; + labelPosition?: string; + style?: React.CSSProperties; + value?: string; + + onCheck?: (e: React.FormEvent, selected: string) => void; + } + export class RadioButton extends React.Component { + } + + interface RadioButtonGroupProps extends React.Props { + defaultSelected?: string; + labelPosition?: string; + name: string; + style?: React.CSSProperties; + valueSelected?: string; + + onChange?: (e: React.FormEvent, selected: string) => void; + } + export class RadioButtonGroup extends React.Component { + getSelectedValue(): string; + setSelectedValue(newSelectionValue: string): void; + clearValue(): void; + } + + interface RaisedButtonProps extends SharedEnhancedButtonProps { + className?: string; + disabled?: boolean; + label?: string; + primary?: boolean; + secondary?: boolean; + labelStyle?: React.CSSProperties; + backgroundColor?: string; + labelColor?: string; + disabledBackgroundColor?: string; + disabledLabelColor?: string; + fullWidth?: boolean; + } + export class RaisedButton extends React.Component { + } + + interface RefreshIndicatorProps extends React.Props { + left: number; + percentage?: number; + size?: number; + status?: string; + top: number; + } + export class RefreshIndicator extends React.Component { + } + + namespace Ripples { + interface CircleRippleProps extends React.Props { + color?: string; + opacity?: number; + } + export class CircleRipple extends React.Component { + } + + interface FocusRippleProps extends React.Props { + color?: string; + innerStyle?: React.CSSProperties; + opacity?: number; + show?: boolean; + } + export class FocusRipple extends React.Component { + } + + interface TouchRippleProps extends React.Props { + centerRipple?: boolean; + color?: string; + opacity?: number; + } + export class TouchRipple extends React.Component { + } + } + + interface SelectFieldProps extends React.Props { + // passed to TextField + errorStyle?: React.CSSProperties; + errorText?: string; + floatingLabelText?: string; + floatingLabelStyle?: React.CSSProperties; + fullWidth?: boolean; + hintText?: string | React.ReactElement; + + // passed to DropDownMenu + displayMember?: string; + valueMember?: string; + autoWidth?: boolean; + menuItems: Menu.MenuItemRequest[]; + menuItemStyle?: React.CSSProperties; + selectedIndex?: number; + underlineStyle?: React.CSSProperties; + iconStyle?: React.CSSProperties; + labelStyle?: React.CSSProperties; + style?: React.CSSProperties; + disabled?: boolean; + valueLink?: ReactLink; + value?: number; + + onChange?: Menu.ItemTapEventHandler; + onEnterKeyDown?: React.KeyboardEventHandler; + + // own properties + selectFieldRoot?: string; + multiLine?: boolean; + type?: string; + rows?: number; + inputStyle?: React.CSSProperties; + } + export class SelectField extends React.Component { + } + + interface SliderProps extends React.Props { + name: string; + defaultValue?: number; + description?: string; + error?: string; + max?: number; + min?: number; + required?: boolean; + step?: number; + value?: number; + } + export class Slider extends React.Component { + } + + interface SvgIconProps extends React.Props { + color?: string; + hoverColor?: string; + viewBox?: string; + } + export class SvgIcon extends React.Component { + } + + export namespace Icons { + export import NavigationMenu = __MaterialUI.NavigationMenu; + export import NavigationChevronLeft = __MaterialUI.NavigationChevronLeft; + export import NavigationChevronRight = __MaterialUI.NavigationChevronRight; + } + + interface NavigationMenuProps extends React.Props { + } + export class NavigationMenu extends React.Component { + } + + interface NavigationChevronLeftProps extends React.Props { + } + export class NavigationChevronLeft extends React.Component { + } + + interface NavigationChevronRightProps extends React.Props { + } + export class NavigationChevronRight extends React.Component { + } + + export namespace Styles { + interface AutoPrefix { + all(styles: React.CSSProperties): React.CSSProperties; + set(style: React.CSSProperties, key: string, value: string | number): void; + single(key: string): string; + singleHyphened(key: string): string; + } + export var AutoPrefix: AutoPrefix; + + interface Spacing { + iconSize?: number; + + desktopGutter?: number; + desktopGutterMore?: number; + desktopGutterLess?: number; + desktopGutterMini?: number; + desktopKeylineIncrement?: number; + desktopDropDownMenuItemHeight?: number; + desktopDropDownMenuFontSize?: number; + desktopLeftNavMenuItemHeight?: number; + desktopSubheaderHeight?: number; + desktopToolbarHeight?: number; + } + interface ThemePalette { + primary1Color?: string; + primary2Color?: string; + primary3Color?: string; + accent1Color?: string; + accent2Color?: string; + accent3Color?: string; + textColor?: string; + canvasColor?: string; + borderColor?: string; + disabledColor?: string; + alternateTextColor?: string; + } + interface MuiTheme { + rawTheme: RawTheme; + static: boolean; + appBar?: { + color?: string, + textColor?: string, + height?: number + }, + avatar?: { + borderColor?: string; + } + button?: { + height?: number, + minWidth?: number, + iconButtonSize?: number + }, + checkbox?: { + boxColor?: string, + checkedColor?: string, + requiredColor?: string, + disabledColor?: string, + labelColor?: string, + labelDisabledColor?: string + }, + datePicker?: { + color?: string, + textColor?: string, + calendarTextColor?: string, + selectColor?: string, + selectTextColor?: string, + }, + dropDownMenu?: { + accentColor?: string, + }, + flatButton?: { + color?: string, + textColor?: string, + primaryTextColor?: string, + secondaryTextColor?: string, + disabledColor?: string + }, + floatingActionButton?: { + buttonSize?: number, + miniSize?: number, + color?: string, + iconColor?: string, + secondaryColor?: string, + secondaryIconColor?: string, + disabledColor?: string, + disabledTextColor?: string + }, + inkBar?: { + backgroundColor?: string; + }, + leftNav?: { + width?: number, + color?: string, + }, + listItem?: { + nestedLevelDepth?: number; + }, + menu?: { + backgroundColor?: string, + containerBackgroundColor?: string, + }, + menuItem?: { + dataHeight?: number, + height?: number, + hoverColor?: string, + padding?: number, + selectedTextColor?: string, + }, + menuSubheader?: { + padding?: number, + borderColor?: string, + textColor?: string, + }, + paper?: { + backgroundColor?: string, + }, + radioButton?: { + borderColor?: string, + backgroundColor?: string, + checkedColor?: string, + requiredColor?: string, + disabledColor?: string, + size?: number, + labelColor?: string, + labelDisabledColor?: string + }, + raisedButton?: { + color?: string, + textColor?: string, + primaryColor?: string, + primaryTextColor?: string, + secondaryColor?: string, + secondaryTextColor?: string, + disabledColor?: string, + disabledTextColor?: string + }, + refreshIndicator?: { + strokeColor?: string; + loadingStrokeColor?: string; + }; + slider?: { + trackSize?: number, + trackColor?: string, + trackColorSelected?: string, + handleSize?: number, + handleSizeActive?: number, + handleSizeDisabled?: number, + handleColorZero?: string, + handleFillColor?: string, + selectionColor?: string, + rippleColor?: string, + }, + snackbar?: { + textColor?: string, + backgroundColor?: string, + actionColor?: string, + }, + table?: { + backgroundColor?: string; + }; + tableHeader?: { + borderColor?: string; + }; + tableHeaderColumn?: { + textColor?: string; + }; + tableFooter?: { + borderColor?: string; + textColor?: string; + }; + tableRow?: { + hoverColor?: string; + stripeColor?: string; + selectedColor?: string; + textColor?: string; + borderColor?: string; + }; + tableRowColumn?: { + height?: number; + spacing?: number; + }; + timePicker?: { + color?: string; + textColor?: string; + accentColor?: string; + clockColor?: string; + selectColor?: string; + selectTextColor?: string; + }; + toggle?: { + thumbOnColor?: string, + thumbOffColor?: string, + thumbDisabledColor?: string, + thumbRequiredColor?: string, + trackOnColor?: string, + trackOffColor?: string, + trackDisabledColor?: string, + trackRequiredColor?: string, + labelColor?: string, + labelDisabledColor?: string + }, + toolbar?: { + backgroundColor?: string, + height?: number, + titleFontSize?: number, + iconColor?: string, + separatorColor?: string, + menuHoverColor?: string, + }; + tabs?: { + backgroundColor?: string; + }; + textField?: { + textColor?: string; + hintColor?: string; + floatingLabelColor?: string; + disabledTextColor?: string; + errorColor?: string; + focusColor?: string; + backgroundColor?: string; + borderColor?: string; + }; + } + + interface RawTheme { + spacing: Spacing; + fontFamily?: string; + palette: ThemePalette; + } + + export function ThemeDecorator(muiTheme: Styles.MuiTheme):

    (Component: React.ComponentClass

    ) => React.ComponentClass

    ; + + interface ThemeManager { + getMuiTheme(rawTheme: RawTheme): MuiTheme; + modifyRawThemeSpacing(muiTheme: MuiTheme, newSpacing: Spacing): MuiTheme; + modifyRawThemePalette(muiTheme: MuiTheme, newPaletteKeys: ThemePalette): MuiTheme; + modifyRawThemeFontFamily(muiTheme: MuiTheme, newFontFamily: string): MuiTheme; + } + export var ThemeManager: ThemeManager; + + interface Transitions { + easeOut(duration?: string, property?: string | string[], delay?: string, easeFunction?: string): string; + create(duration?: string, property?: string, delay?: string, easeFunction?: string): string; + easeOutFunction: string; + easeInOutFunction: string; + } + export var Transitions: Transitions; + + interface Typography { + textFullBlack:string; + textDarkBlack: string; + textLightBlack: string; + textMinBlack: string; + textFullWhite: string; + textDarkWhite: string; + textLightWhite: string; + + // font weight + fontWeightLight: number; + fontWeightNormal: number; + fontWeightMedium: number; + + fontStyleButtonFontSize: number; + } + export var Typography: Typography; + + export var DarkRawTheme: RawTheme; + export var LightRawTheme: RawTheme; + } + + interface SnackbarProps extends React.Props { + message: string; + action?: string; + autoHideDuration?: number; + onActionTouchTap?: React.TouchEventHandler; + onShow?: () => void; + onDismiss?: () => void; + openOnMount?: boolean; + } + export class Snackbar extends React.Component { + } + + namespace Tabs { + interface TabProps extends React.Props { + label?: string; + value?: string; + selected?: boolean; + width?: string; + + // Called by Tabs component + onActive?: (tab: Tab) => void; + + onTouchTap?: (value: string, e: TouchTapEvent, tab: Tab) => void; + } + export class Tab extends React.Component { + } + + interface TabsProps extends React.Props { + contentContainerStyle?: React.CSSProperties; + initialSelectedIndex?: number; + inkBarStyle?: React.CSSProperties; + style?: React.CSSProperties; + tabItemContainerStyle?: React.CSSProperties; + tabWidth?: number; + value?: string | number; + + onChange?: (value: string | number, e: React.FormEvent, tab: Tab) => void; + } + export class Tabs extends React.Component { + } + } + + namespace Table { + interface TableProps extends React.Props { + allRowsSelected?: boolean; + fixedFooter?: boolean; + fixedHeader?: boolean; + height?: string; + multiSelectable?: boolean; + onCellClick?: (row: number, column: number) => void; + onCellHover?: (row: number, column: number) => void; + onCellHoverExit?: (row: number, column: number) => void; + onRowHover?: (row: number) => void; + onRowHoverExit?: (row: number) => void; + onRowSelection?: (selectedRows: number[])=> void; + selectable?: boolean; + } + export class Table extends React.Component { + } + + interface TableBodyProps extends React.Props { + allRowsSelected?: boolean; + deselectOnClickaway?: boolean; + displayRowCheckbox?: boolean; + multiSelectable?: boolean; + onCellClick?: (row: number, column: number) => void; + onCellHover?: (row: number, column: number) => void; + onCellHoverExit?: (row: number, column: number) => void; + onRowHover?: (row: number) => void; + onRowHoverExit?: (row: number) => void; + onRowSelection?: (selectedRows: number[])=> void; + preScanRows?: boolean; + selectable?: boolean; + showRowHover?: boolean; + stripedRows?: boolean; + } + export class TableBody extends React.Component { + } + + interface TableFooterProps extends React.Props { + adjustForCheckbox?: boolean; + } + export class TableFooter extends React.Component { + } + + interface TableHeaderProps extends React.Props { + adjustForCheckbox?: boolean; + displaySelectAll?: boolean; + enableSelectAll?: boolean; + onSelectAll?: (event: React.MouseEvent) => void; + selectAllSelected?: boolean; + } + export class TableHeader extends React.Component { + } + + interface TableHeaderColumnProps extends React.Props { + columnNumber?: number; + onClick?: (e: React.MouseEvent, column: number) => void; + tooltip?: string; + tooltipStyle?: React.CSSProperties; + } + export class TableHeaderColumn extends React.Component { + } + + interface TableRowProps extends React.Props { + displayBorder?: boolean; + hoverable?: boolean; + onCellClick?: (e: React.MouseEvent, row: number, column: number) => void; + onCellHover?: (e: React.MouseEvent, row: number, column: number) => void; + onCellHoverExit?: (e: React.MouseEvent, row: number, column: number) => void; + onRowClick?: (e: React.MouseEvent, row: number) => void; + onRowHover?: (e: React.MouseEvent, row: number) => void; + onRowHoverExit?: (e: React.MouseEvent, row: number) => void; + rowNumber?: number; + selectable?: boolean; + selected?: boolean; + striped?: boolean; + } + export class TableRow extends React.Component { + } + + interface TableRowColumnProps extends React.Props { + columnNumber?: number; + hoverable?: boolean; + onHover?: (e: React.MouseEvent, column: number) => void; + onHoverExit?: (e: React.MouseEvent, column: number) => void; + } + export class TableRowColumn extends React.Component { + } + } + + interface ThemeWrapperProps extends React.Props { + theme: Styles.MuiTheme; + } + export class ThemeWrapper extends React.Component { + } + + interface ToggleProps extends CommonEnhancedSwitchProps { + // is root element + + elementStyle?: React.CSSProperties; + labelStyle?: React.CSSProperties; + onToggle?: (e: React.MouseEvent, isInputChecked: boolean) => void; + toggled?: boolean; + defaultToggled?: boolean; + } + export class Toggle extends React.Component { + isToggled(): boolean; + setToggled(newToggledValue: boolean): void; + } + + interface TimePickerProps extends React.Props { + defaultTime?: Date; + format?: string; + pedantic?: boolean; + onFocus?: React.FocusEventHandler; + onTouchTap?: TouchTapEventHandler; + onChange?: (e: any, time: Date) => void; + onShow?: () => void; + onDismiss?: () => void; + } + export class TimePicker extends React.Component { + } + + interface TextFieldProps extends React.Props { + errorStyle?: React.CSSProperties; + errorText?: string; + floatingLabelText?: string; + floatingLabelStyle?: React.CSSProperties; + fullWidth?: boolean; + hintText?: string | React.ReactElement; + id?: string; + inputStyle?: React.CSSProperties; + multiLine?: boolean; + onEnterKeyDown?: React.KeyboardEventHandler; + style?: React.CSSProperties; + rows?: number, + underlineStyle?: React.CSSProperties; + underlineFocusStyle?: React.CSSProperties; + underlineDisabledStyle?: React.CSSProperties; + type?: string; + + disabled?: boolean; + isRtl?: boolean; + value?: string; + defaultValue?: string; + valueLink?: ReactLink; + + onBlur?: React.FocusEventHandler; + onChange?: React.FormEventHandler; + onFocus?: React.FocusEventHandler; + onKeyDown?: React.KeyboardEventHandler; + } + export class TextField extends React.Component { + blur(): void; + clearValue(): void; + focus(): void; + getValue(): string; + setErrorText(newErrorText: string): void; + setValue(newValue: string): void; + } + + namespace Toolbar { + interface ToolbarProps extends React.Props { + } + export class Toolbar extends React.Component { + } + + interface ToolbarGroupProps extends React.Props { + float?: string; + } + export class ToolbarGroup extends React.Component { + } + + interface ToolbarSeparatorProps extends React.Props { + } + export class ToolbarSeparator extends React.Component { + } + + interface ToolbarTitleProps extends React.HTMLAttributesBase { + text?: string; + } + export class ToolbarTitle extends React.Component { + } + } + + interface TooltipProps extends React.Props { + label: string; + show?: boolean; + touch?: boolean; + verticalPosition?: string; + horizontalPosition?: string; + } + export class Tooltip extends React.Component { + } + + export namespace Utils { + interface ContrastLevel { + range: [number, number]; + color: string; + } + interface ColorManipulator { + fade(color: string, amount: string|number): string; + lighten(color: string, amount: string|number): string; + darken(color: string, amount: string|number): string; + contrastRatio(background: string, foreground: string): number; + contrastRatioLevel(background: string, foreground: string): ContrastLevel; + } + export var ColorManipulator: ColorManipulator; + + interface CssEvent { + transitionEndEventName(): string; + animationEndEventName(): string; + onTransitionEnd(el: Element, callback: () => void): void; + onAnimationEnd(el: Element, callback: () => void): void; + } + export var CssEvent: CssEvent; + + interface Dom { + isDescendant(parent: Node, child: Node): boolean; + offset(el: Element): { top: number, left: number }; + getStyleAttributeAsNumber(el: HTMLElement, attr: string): number; + addClass(el: Element, className: string): void; + removeClass(el: Element, className: string): void; + hasClass(el: Element, className: string): boolean; + toggleClass(el: Element, className: string): void; + forceRedraw(el: HTMLElement): void; + withoutTransition(el: HTMLElement, callback: () => void): void; + } + export var Dom: Dom; + + interface Events { + once(el: Element, type: string, callback: EventListener): void; + on(el: Element, type: string, callback: EventListener): void; + off(el: Element, type: string, callback: EventListener): void; + isKeyboard(e: Event): boolean; + } + export var Events: Events; + + function Extend(base: T, override: S1): (T & S1); + + interface ImmutabilityHelper { + merge(base: any, ...args: any[]): any; + mergeItem(obj: any, key: any, newValueObject: any): any; + push(array: any[], obj: any): any[]; + shift(array: any[]): any[]; + } + export var ImmutabilityHelper: ImmutabilityHelper; + + interface KeyCode { + DOWN: number; + ESC: number; + ENTER: number; + LEFT: number; + RIGHT: number; + SPACE: number; + TAB: number; + UP: number; + } + var KeyCode: KeyCode; + + interface KeyLine { + Desktop: { + GUTTER: number; + GUTTER_LESS: number; + INCREMENT: number; + MENU_ITEM_HEIGHT: number; + }; + + getIncrementalDim(dim: number): number; + } + export var KeyLine: KeyLine; + + interface UniqueId { + generate(): string; + } + export var UniqueId: UniqueId; + + interface Styles { + mergeAndPrefix(base: any, ...args: any[]): React.CSSProperties; + } + export var Styles: Styles; + } + + // New menus available only through requiring directly to the end file + namespace Menus { + interface IconMenuProps extends React.Props { + closeOnItemTouchTap?: boolean; + desktop?: boolean; + iconButtonElement: React.ReactElement; + openDirection?: string; + menuStyle?: React.CSSProperties; + multiple?: boolean; + value?: string | Array; + width?: string | number; + touchTapCloseDelay?: number; + + onKeyboardFocus?: React.FocusEventHandler; + onItemTouchTap?: (e: TouchTapEvent, item: React.ReactElement) => void; + onChange?: (e: React.FormEvent, value: string | Array) => void; + } + export class IconMenu extends React.Component { + } + + interface MenuProps extends React.Props { + animated?: boolean; + autoWidth?: boolean; + desktop?: boolean; + listStyle?: React.CSSProperties; + maxHeight?: number; + multiple?: boolean; + openDirection?: string; + value?: string | Array; + width?: string | number; + zDepth?: number; + } + export class Menu extends React.Component{ + } + + interface MenuItemProps extends React.Props { + checked?: boolean; + desktop?: boolean; + disabled?: boolean; + innerDivStyle?: React.CSSProperties; + insetChildren?: boolean; + leftIcon?: React.ReactElement; + primaryText?: string | React.ReactElement; + rightIcon?: React.ReactElement; + secondaryText?: React.ReactNode; + value?: string; + + onEscKeyDown?: React.KeyboardEventHandler; + onItemTouchTap?: (e: TouchTapEvent, item: React.ReactElement) => void; + onChange?: (e: React.FormEvent, value: string) => void; + } + export class MenuItem extends React.Component{ + } + + interface MenuDividerProps extends React.Props { + inset?: boolean; + style?: React.CSSProperties; + } + export class MenuDivider extends React.Component{ + } + } +} // __MaterialUI + +declare module 'material-ui/lib/app-bar' { + import AppBar = __MaterialUI.AppBar; + export = AppBar; +} + +declare module 'material-ui/lib/app-canvas' { + import AppCanvas = __MaterialUI.AppCanvas; + export = AppCanvas; +} + +declare module 'material-ui/lib/avatar' { + import Avatar = __MaterialUI.Avatar; + export = Avatar; +} + +declare module 'material-ui/lib/before-after-wrapper' { + import BeforeAfterWrapper = __MaterialUI.BeforeAfterWrapper; + export = BeforeAfterWrapper; +} + +declare module 'material-ui/lib/card/card' { + import Card = __MaterialUI.Card.Card; + export = Card; +} + +declare module 'material-ui/lib/card/card-actions' { + import CardActions = __MaterialUI.Card.CardActions; + export = CardActions; +} + +declare module 'material-ui/lib/card/card-expandable' { + import CardExpandable = __MaterialUI.Card.CardExpandable; + export = CardExpandable; +} + +declare module 'material-ui/lib/card/card-header' { + import CardHeader = __MaterialUI.Card.CardHeader; + export = CardHeader; +} + +declare module 'material-ui/lib/card/card-media' { + import CardMedia = __MaterialUI.Card.CardMedia; + export = CardMedia; +} + +declare module 'material-ui/lib/card/card-text' { + import CardText = __MaterialUI.Card.CardText; + export = CardText; +} + +declare module 'material-ui/lib/card/card-title' { + import CardTitle = __MaterialUI.Card.CardTitle; + export = CardTitle; +} + +declare module 'material-ui/lib/checkbox' { + import Checkbox = __MaterialUI.Checkbox; + export = Checkbox; +} + +declare module 'material-ui/lib/circular-progress' { + import CircularProgress = __MaterialUI.CircularProgress; + export = CircularProgress; +} + +declare module 'material-ui/lib/clearfix' { + import ClearFix = __MaterialUI.ClearFix; + export = ClearFix; +} + +declare module 'material-ui/lib/date-picker/date-picker' { + import DatePicker = __MaterialUI.DatePicker.DatePicker; + export = DatePicker; +} + +declare module 'material-ui/lib/date-picker/date-picker-dialog' { + import DatePickerDialog = __MaterialUI.DatePicker.DatePickerDialog; + export = DatePickerDialog; +} + +declare module 'material-ui/lib/dialog' { + import Dialog = __MaterialUI.Dialog; + export = Dialog; +} + +declare module 'material-ui/lib/drop-down-icon' { + import DropDownIcon = __MaterialUI.DropDownIcon; + export = DropDownIcon; +} + +declare module 'material-ui/lib/drop-down-menu' { + import DropDownMenu = __MaterialUI.DropDownMenu; + export = DropDownMenu; +} + +declare module 'material-ui/lib/enhanced-button' { + import EnhancedButton = __MaterialUI.EnhancedButton; + export = EnhancedButton; +} + +declare module 'material-ui/lib/flat-button' { + import FlatButton = __MaterialUI.FlatButton; + export = FlatButton; +} + +declare module 'material-ui/lib/floating-action-button' { + import FloatingActionButton = __MaterialUI.FloatingActionButton; + export = FloatingActionButton; +} + +declare module 'material-ui/lib/font-icon' { + import FontIcon = __MaterialUI.FontIcon; + export = FontIcon; +} + +declare module 'material-ui/lib/icon-button' { + import IconButton = __MaterialUI.IconButton; + export = IconButton; +} + +declare module 'material-ui/lib/left-nav' { + import LeftNav = __MaterialUI.LeftNav; + export = LeftNav; +} + +declare module 'material-ui/lib/linear-progress' { + import LinearProgress = __MaterialUI.LinearProgress; + export = LinearProgress; +} + +declare module 'material-ui/lib/lists/list' { + import List = __MaterialUI.Lists.List; + export = List; +} + +declare module 'material-ui/lib/lists/list-divider' { + import ListDivider = __MaterialUI.Lists.ListDivider; + export = ListDivider; +} + +declare module 'material-ui/lib/lists/list-item' { + import ListItem = __MaterialUI.Lists.ListItem; + export = ListItem; +} + +declare module 'material-ui/lib/menu/menu' { + import Menu = __MaterialUI.Menu.Menu; + export = Menu; +} + +declare module 'material-ui/lib/menu/menu-item' { + import MenuItem = __MaterialUI.Menu.MenuItem; + export = MenuItem; +} + +declare module 'material-ui/lib/mixins/' { + export import ClickAwayable = __MaterialUI.Mixins.ClickAwayable; // require('material-ui/lib/mixins/click-awayable'); + export import WindowListenable = __MaterialUI.Mixins.WindowListenable; // require('material-ui/lib/mixins/window-listenable'); + export import StylePropable = __MaterialUI.Mixins.StylePropable; // require('material-ui/lib/mixins/style-propable'); + export import StyleResizable = __MaterialUI.Mixins.StyleResizable; // require('material-ui/lib/mixins/style-resizable'); +} + +declare module 'material-ui/lib/mixins/click-awayable' { + import ClickAwayable = __MaterialUI.Mixins.ClickAwayable; + export = ClickAwayable; +} + +declare module 'material-ui/lib/mixins/window-listenable' { + import WindowListenable = __MaterialUI.Mixins.WindowListenable; + export = WindowListenable; +} + +declare module 'material-ui/lib/mixins/style-propable' { + import StylePropable = __MaterialUI.Mixins.StylePropable; + export = StylePropable; +} + +declare module 'material-ui/lib/mixins/style-resizable' { + import StyleResizable = __MaterialUI.Mixins.StyleResizable; + export = StyleResizable; +} + +declare module 'material-ui/lib/overlay' { + import Overlay = __MaterialUI.Overlay; + export = Overlay; +} + +declare module 'material-ui/lib/paper' { + import Paper = __MaterialUI.Paper; + export = Paper; +} + +declare module 'material-ui/lib/radio-button' { + import RadioButton = __MaterialUI.RadioButton; + export = RadioButton; +} + +declare module 'material-ui/lib/radio-button-group' { + import RadioButtonGroup = __MaterialUI.RadioButtonGroup; + export = RadioButtonGroup; +} + +declare module 'material-ui/lib/raised-button' { + import RaisedButton = __MaterialUI.RaisedButton; + export = RaisedButton; +} + +declare module 'material-ui/lib/refresh-indicator' { + import RefreshIndicator = __MaterialUI.RefreshIndicator; + export = RefreshIndicator; +} + +declare module 'material-ui/lib/ripples/' { + export import CircleRipple = __MaterialUI.Ripples.CircleRipple; + export import FocusRipple = __MaterialUI.Ripples.FocusRipple; + export import TouchRipple = __MaterialUI.Ripples.TouchRipple; +} + +declare module 'material-ui/lib/select-field' { + import SelectField = __MaterialUI.SelectField; + export = SelectField; +} + +declare module 'material-ui/lib/slider' { + import Slider = __MaterialUI.Slider; + export = Slider; +} + +declare module 'material-ui/lib/svg-icon' { + import SvgIcon = __MaterialUI.SvgIcon; + export = SvgIcon; +} + +declare module 'material-ui/lib/svg-icons/navigation/menu' { + import NavigationMenu = __MaterialUI.NavigationMenu; + export = NavigationMenu; +} + +declare module 'material-ui/lib/svg-icons/navigation/chevron-left' { + import NavigationChevronLeft = __MaterialUI.NavigationChevronLeft; + export = NavigationChevronLeft; +} + +declare module 'material-ui/lib/svg-icons/navigation/chevron-right' { + import NavigationChevronRight = __MaterialUI.NavigationChevronRight; + export = NavigationChevronRight; +} + +declare module 'material-ui/lib/styles/' { + export import AutoPrefix = __MaterialUI.Styles.AutoPrefix; // require('material-ui/lib/styles/auto-prefix'); + export import Colors = __MaterialUI.Styles.Colors; // require('material-ui/lib/styles/colors'); + export import Spacing = require('material-ui/lib/styles/spacing'); + export import ThemeManager = __MaterialUI.Styles.ThemeManager; // require('material-ui/lib/styles/theme-manager'); + export import Transitions = __MaterialUI.Styles.Transitions; // require('material-ui/lib/styles/transitions'); + export import Typography = __MaterialUI.Styles.Typography; // require('material-ui/lib/styles/typography'); + export import LightRawTheme = __MaterialUI.Styles.LightRawTheme; // require('material-ui/lib/styles/raw-themes/light-raw-theme'), + export import DarkRawTheme = __MaterialUI.Styles.DarkRawTheme; // require('material-ui/lib/styles/raw-themes/dark-raw-theme'), + export import ThemeDecorator = __MaterialUI.Styles.ThemeDecorator; //require('material-ui/lib/styles/theme-decorator'); +} + +declare module 'material-ui/lib/styles/auto-prefix' { + import AutoPrefix = __MaterialUI.Styles.AutoPrefix; + export = AutoPrefix; +} + +declare module 'material-ui/lib/styles/spacing' { + type Spacing = __MaterialUI.Styles.Spacing; + var Spacing: Spacing; + export = Spacing; +} + +declare module 'material-ui/lib/styles/theme-manager' { + import ThemeManager = __MaterialUI.Styles.ThemeManager; + export = ThemeManager; +} + +declare module 'material-ui/lib/styles/transitions' { + import Transitions = __MaterialUI.Styles.Transitions; + export = Transitions; +} + +declare module 'material-ui/lib/styles/typography' { + import Typography = __MaterialUI.Styles.Typography; + export = Typography; +} + +declare module 'material-ui/lib/styles/raw-themes/light-raw-theme' { + import LightRawTheme = __MaterialUI.Styles.LightRawTheme; + export = LightRawTheme; +} + +declare module 'material-ui/lib/styles/raw-themes/dark-raw-theme' { + import DarkRawTheme = __MaterialUI.Styles.DarkRawTheme; + export = DarkRawTheme; +} + +declare module 'material-ui/lib/styles/theme-decorator' { + import ThemeDecorator = __MaterialUI.Styles.ThemeDecorator; + export = ThemeDecorator; +} + + +declare module 'material-ui/lib/snackbar' { + import Snackbar = __MaterialUI.Snackbar; + export = Snackbar; +} + +declare module 'material-ui/lib/tabs/tab' { + import Tab = __MaterialUI.Tabs.Tab; + export = Tab; +} + +declare module 'material-ui/lib/tabs/tabs' { + import Tabs = __MaterialUI.Tabs.Tabs; + export = Tabs; +} + +declare module 'material-ui/lib/table/table' { + import Table = __MaterialUI.Table.Table; + export = Table; +} + +declare module 'material-ui/lib/table/table-body' { + import TableBody = __MaterialUI.Table.TableBody; + export = TableBody; +} + +declare module 'material-ui/lib/table/table-footer' { + import TableFooter = __MaterialUI.Table.TableFooter; + export = TableFooter; +} + +declare module 'material-ui/lib/table/table-header' { + import TableHeader = __MaterialUI.Table.TableHeader; + export = TableHeader; +} + +declare module 'material-ui/lib/table/table-header-column' { + import TableHeaderColumn = __MaterialUI.Table.TableHeaderColumn; + export = TableHeaderColumn; +} + +declare module 'material-ui/lib/table/table-row' { + import TableRow = __MaterialUI.Table.TableRow; + export = TableRow; +} + +declare module 'material-ui/lib/table/table-row-column' { + import TableRowColumn = __MaterialUI.Table.TableRowColumn; + export = TableRowColumn; +} + +declare module 'material-ui/lib/theme-wrapper' { + import ThemeWrapper = __MaterialUI.ThemeWrapper; + export = ThemeWrapper; +} + +declare module 'material-ui/lib/toggle' { + import Toggle = __MaterialUI.Toggle; + export = Toggle; +} + +declare module 'material-ui/lib/time-picker' { + import TimePicker = __MaterialUI.TimePicker; + export = TimePicker; +} + +declare module 'material-ui/lib/text-field' { + import TextField = __MaterialUI.TextField; + export = TextField; +} + +declare module 'material-ui/lib/toolbar/toolbar' { + import Toolbar = __MaterialUI.Toolbar.Toolbar; + export = Toolbar; +} + +declare module 'material-ui/lib/toolbar/toolbar-group' { + import ToolbarGroup = __MaterialUI.Toolbar.ToolbarGroup; + export = ToolbarGroup; +} + +declare module 'material-ui/lib/toolbar/toolbar-separator' { + import ToolbarSeparator = __MaterialUI.Toolbar.ToolbarSeparator; + export = ToolbarSeparator; +} + +declare module 'material-ui/lib/toolbar/toolbar-title' { + import ToolbarTitle = __MaterialUI.Toolbar.ToolbarTitle; + export = ToolbarTitle; +} + +declare module 'material-ui/lib/tooltip' { + import Tooltip = __MaterialUI.Tooltip; + export = Tooltip; +} + +declare module 'material-ui/lib/utils/' { + export import ColorManipulator = __MaterialUI.Utils.ColorManipulator; // require('material-ui/lib/utils/color-manipulator'); + export import CssEvent = __MaterialUI.Utils.CssEvent; // require('material-ui/lib/utils/css-event'); + export import Dom = __MaterialUI.Utils.Dom; // require('material-ui/lib/utils/dom'); + export import Events = __MaterialUI.Utils.Events; // require('material-ui/lib/utils/events'); + export import Extend = __MaterialUI.Utils.Extend; // require('material-ui/lib/utils/extend'); + export import ImmutabilityHelper = __MaterialUI.Utils.ImmutabilityHelper; // require('material-ui/lib/utils/immutability-helper'); + export import KeyCode = __MaterialUI.Utils.KeyCode; // require('material-ui/lib/utils/key-code'); + export import KeyLine = __MaterialUI.Utils.KeyLine; // require('material-ui/lib/utils/key-line'); + export import UniqueId = __MaterialUI.Utils.UniqueId; // require('material-ui/lib/utils/unique-id'); + export import Styles = __MaterialUI.Utils.Styles; // require('material-ui/lib/utils/styles'); +} + +declare module 'material-ui/lib/utils/color-manipulator' { + import ColorManipulator = __MaterialUI.Utils.ColorManipulator; + export = ColorManipulator; +} + +declare module 'material-ui/lib/utils/css-event' { + import CssEvent = __MaterialUI.Utils.CssEvent; + export = CssEvent; +} + +declare module 'material-ui/lib/utils/dom' { + import Dom = __MaterialUI.Utils.Dom; + export = Dom; +} + +declare module 'material-ui/lib/utils/events' { + import Events = __MaterialUI.Utils.Events; + export = Events; +} + +declare module 'material-ui/lib/utils/extend' { + import Extend = __MaterialUI.Utils.Extend; + export = Extend; +} + +declare module 'material-ui/lib/utils/immutability-helper' { + import ImmutabilityHelper = __MaterialUI.Utils.ImmutabilityHelper; + export = ImmutabilityHelper; +} + +declare module 'material-ui/lib/utils/key-code' { + import KeyCode = __MaterialUI.Utils.KeyCode; + export = KeyCode; +} + +declare module 'material-ui/lib/utils/key-line' { + import KeyLine = __MaterialUI.Utils.KeyLine; + export = KeyLine; +} + +declare module 'material-ui/lib/utils/unique-id' { + import UniqueId = __MaterialUI.Utils.UniqueId; + export = UniqueId; +} + +declare module 'material-ui/lib/utils/styles' { + import Styles = __MaterialUI.Utils.Styles; + export = Styles; +} + +declare module "material-ui/lib/menus/icon-menu" { + import IconMenu = __MaterialUI.Menus.IconMenu; + export = IconMenu; +} + +declare module "material-ui/lib/menus/menu" { + import Menu = __MaterialUI.Menus.Menu; + export = Menu; +} + +declare module "material-ui/lib/menus/menu-item" { + import MenuItem = __MaterialUI.Menus.MenuItem; + export = MenuItem; +} + +declare module "material-ui/lib/menus/menu-divider" { + import MenuDivider = __MaterialUI.Menus.MenuDivider; + export = MenuDivider; +} + +declare module "material-ui/lib/styles/colors" { + import Colors = __MaterialUI.Styles.Colors; + export = Colors; +} + +declare namespace __MaterialUI.Styles { + interface Colors { + red50: string; + red100: string; + red200: string; + red300: string; + red400: string; + red500: string; + red600: string; + red700: string; + red800: string; + red900: string; + redA100: string; + redA200: string; + redA400: string; + redA700: string; + + pink50: string; + pink100: string; + pink200: string; + pink300: string; + pink400: string; + pink500: string; + pink600: string; + pink700: string; + pink800: string; + pink900: string; + pinkA100: string; + pinkA200: string; + pinkA400: string; + pinkA700: string; + + purple50: string; + purple100: string; + purple200: string; + purple300: string; + purple400: string; + purple500: string; + purple600: string; + purple700: string; + purple800: string; + purple900: string; + purpleA100: string; + purpleA200: string; + purpleA400: string; + purpleA700: string; + + deepPurple50: string; + deepPurple100: string; + deepPurple200: string; + deepPurple300: string; + deepPurple400: string; + deepPurple500: string; + deepPurple600: string; + deepPurple700: string; + deepPurple800: string; + deepPurple900: string; + deepPurpleA100: string; + deepPurpleA200: string; + deepPurpleA400: string; + deepPurpleA700: string; + + indigo50: string; + indigo100: string; + indigo200: string; + indigo300: string; + indigo400: string; + indigo500: string; + indigo600: string; + indigo700: string; + indigo800: string; + indigo900: string; + indigoA100: string; + indigoA200: string; + indigoA400: string; + indigoA700: string; + + blue50: string; + blue100: string; + blue200: string; + blue300: string; + blue400: string; + blue500: string; + blue600: string; + blue700: string; + blue800: string; + blue900: string; + blueA100: string; + blueA200: string; + blueA400: string; + blueA700: string; + + lightBlue50: string; + lightBlue100: string; + lightBlue200: string; + lightBlue300: string; + lightBlue400: string; + lightBlue500: string; + lightBlue600: string; + lightBlue700: string; + lightBlue800: string; + lightBlue900: string; + lightBlueA100: string; + lightBlueA200: string; + lightBlueA400: string; + lightBlueA700: string; + + cyan50: string; + cyan100: string; + cyan200: string; + cyan300: string; + cyan400: string; + cyan500: string; + cyan600: string; + cyan700: string; + cyan800: string; + cyan900: string; + cyanA100: string; + cyanA200: string; + cyanA400: string; + cyanA700: string; + + teal50: string; + teal100: string; + teal200: string; + teal300: string; + teal400: string; + teal500: string; + teal600: string; + teal700: string; + teal800: string; + teal900: string; + tealA100: string; + tealA200: string; + tealA400: string; + tealA700: string; + + green50: string; + green100: string; + green200: string; + green300: string; + green400: string; + green500: string; + green600: string; + green700: string; + green800: string; + green900: string; + greenA100: string; + greenA200: string; + greenA400: string; + greenA700: string; + + lightGreen50: string; + lightGreen100: string; + lightGreen200: string; + lightGreen300: string; + lightGreen400: string; + lightGreen500: string; + lightGreen600: string; + lightGreen700: string; + lightGreen800: string; + lightGreen900: string; + lightGreenA100: string; + lightGreenA200: string; + lightGreenA400: string; + lightGreenA700: string; + + lime50: string; + lime100: string; + lime200: string; + lime300: string; + lime400: string; + lime500: string; + lime600: string; + lime700: string; + lime800: string; + lime900: string; + limeA100: string; + limeA200: string; + limeA400: string; + limeA700: string; + + yellow50: string; + yellow100: string; + yellow200: string; + yellow300: string; + yellow400: string; + yellow500: string; + yellow600: string; + yellow700: string; + yellow800: string; + yellow900: string; + yellowA100: string; + yellowA200: string; + yellowA400: string; + yellowA700: string; + + amber50: string; + amber100: string; + amber200: string; + amber300: string; + amber400: string; + amber500: string; + amber600: string; + amber700: string; + amber800: string; + amber900: string; + amberA100: string; + amberA200: string; + amberA400: string; + amberA700: string; + + orange50: string; + orange100: string; + orange200: string; + orange300: string; + orange400: string; + orange500: string; + orange600: string; + orange700: string; + orange800: string; + orange900: string; + orangeA100: string; + orangeA200: string; + orangeA400: string; + orangeA700: string; + + deepOrange50: string; + deepOrange100: string; + deepOrange200: string; + deepOrange300: string; + deepOrange400: string; + deepOrange500: string; + deepOrange600: string; + deepOrange700: string; + deepOrange800: string; + deepOrange900: string; + deepOrangeA100: string; + deepOrangeA200: string; + deepOrangeA400: string; + deepOrangeA700: string; + + brown50: string; + brown100: string; + brown200: string; + brown300: string; + brown400: string; + brown500: string; + brown600: string; + brown700: string; + brown800: string; + brown900: string; + + blueGrey50: string; + blueGrey100: string; + blueGrey200: string; + blueGrey300: string; + blueGrey400: string; + blueGrey500: string; + blueGrey600: string; + blueGrey700: string; + blueGrey800: string; + blueGrey900: string; + + grey50: string; + grey100: string; + grey200: string; + grey300: string; + grey400: string; + grey500: string; + grey600: string; + grey700: string; + grey800: string; + grey900: string; + + black: string; + white: string; + + transparent: string; + fullBlack: string; + darkBlack: string; + lightBlack: string; + minBlack: string; + faintBlack: string; + fullWhite: string; + darkWhite: string; + lightWhite: string; + } + export var Colors: Colors; +} diff --git a/material-ui/material-ui-tests.tsx b/material-ui/material-ui-tests.tsx index 4e1e920d7b..641ce5fcfc 100644 --- a/material-ui/material-ui-tests.tsx +++ b/material-ui/material-ui-tests.tsx @@ -16,6 +16,7 @@ import RaisedButton = require("material-ui/lib/raised-button"); import FloatingActionButton = require("material-ui/lib/floating-action-button"); import Card = require("material-ui/lib/card/card"); import CardHeader = require("material-ui/lib/card/card-header"); +import DatePicker = require("material-ui/lib/date-picker/date-picker"); import CardText = require("material-ui/lib/card/card-text"); import CardActions = require("material-ui/lib/card/card-actions"); import Dialog = require("material-ui/lib/dialog"); @@ -30,6 +31,9 @@ import Menu = require('material-ui/lib/menus/menu'); import MenuItem = require('material-ui/lib/menus/menu-item'); import MenuDivider = require('material-ui/lib/menus/menu-divider'); import ThemeManager = require('material-ui/lib/styles/theme-manager'); +import GridList = require('material-ui/lib/grid-list/grid-list'); +import GridTile = require('material-ui/lib/grid-list/grid-tile'); + import NavigationClose = require("material-ui/lib/svg-icon"); // TODO: Should actually import the actual "material-ui/lib/svg-icons/navigation/close", but they aren't defined yet. import FileFolder = require("material-ui/lib/svg-icon"); // TODO: Should actually import the actual "material-ui/lib/svg-icons/file/folder", but they aren't defined yet. @@ -162,7 +166,10 @@ class MaterialUiTests extends React.Component<{}, {}> implements React.LinkedSta ; // "http://material-ui.com/#/components/date-picker" - + element = ; + element = ; // "http://material-ui.com/#/components/dialog" let standardActions = [ @@ -458,12 +465,29 @@ class MaterialUiTests extends React.Component<{}, {}> implements React.LinkedSta hintText="Password Field" floatingLabelText="Password" type="password" />; - + // "http://material-ui.com/#/components/time-picker" // "http://material-ui.com/#/components/toolbars" + + // "http://material-ui.com/#/components/grid-list" + element = ; + + element = GridTile} + actionPosition="left" + titlePosition="top" + titleBackground="rgba(0, 0, 0, 0.4)" + cols={2} + rows={1} > +

    Children are Required!

    +
    ; return element; } diff --git a/material-ui/material-ui.d.ts b/material-ui/material-ui.d.ts index c31925d6f7..4fb4861a2b 100644 --- a/material-ui/material-ui.d.ts +++ b/material-ui/material-ui.d.ts @@ -1,6 +1,6 @@ -// Type definitions for material-ui v0.12.1 +// Type definitions for material-ui v0.13.1 // Project: https://github.com/callemall/material-ui -// Definitions by: Nathan Brown +// Definitions by: Nathan Brown , Oliver Herrmann // Definitions: https://github.com/borisyankov/DefinitelyTyped /// @@ -71,6 +71,9 @@ declare module "material-ui" { export import ToolbarTitle = __MaterialUI.Toolbar.ToolbarTitle; // require('material-ui/lib/toolbar/toolbar-title'); export import Tooltip = __MaterialUI.Tooltip; // require('material-ui/lib/tooltip'); export import Utils = __MaterialUI.Utils; // require('material-ui/lib/utils/'); + + export import GridList = __MaterialUI.GridList.GridList; // require('material-ui/lib/gridlist/grid-list'); + export import GridTile = __MaterialUI.GridList.GridTile; // require('material-ui/lib/gridlist/grid-tile'); // export type definitions export type TouchTapEvent = __MaterialUI.TouchTapEvent; @@ -303,6 +306,8 @@ declare namespace __MaterialUI { autoOk?: boolean; defaultDate?: Date; formatDate?: string; + hintText?: string; + floatingLabelText?: string; hideToolbarYearChange?: boolean; maxDate?: Date; minDate?: Date; @@ -1120,6 +1125,7 @@ declare namespace __MaterialUI { tabItemContainerStyle?: React.CSSProperties; tabWidth?: number; value?: string | number; + tabTemplate?: __React.ComponentClass; onChange?: (value: string | number, e: React.FormEvent, tab: Tab) => void; } @@ -1240,6 +1246,10 @@ declare namespace __MaterialUI { defaultTime?: Date; format?: string; pedantic?: boolean; + style?: __React.CSSProperties; + textFieldStye?: __React.CSSProperties; + autoOk?: boolean; + openDialog?: () => void; onFocus?: React.FocusEventHandler; onTouchTap?: TouchTapEventHandler; onChange?: (e: any, time: Date) => void; @@ -1266,6 +1276,7 @@ declare namespace __MaterialUI { underlineFocusStyle?: React.CSSProperties; underlineDisabledStyle?: React.CSSProperties; type?: string; + hintStyle?: React.CSSProperties; disabled?: boolean; isRtl?: boolean; @@ -1470,6 +1481,34 @@ declare namespace __MaterialUI { export class MenuDivider extends React.Component{ } } + + namespace GridList { + + interface GridListProps extends React.Props { + cols?: number; + padding?: number; + cellHeight?: number; + } + + export class GridList extends React.Component{ + } + + interface GridTileProps extends React.Props { + title?: string; + subtitle?: __React.ReactNode; + titlePosition?: string; //"top"|"bottom" + titleBackground?: string; + actionIcon?: __React.ReactElement; + actionPosition?: string; //"left"|"right" + cols?: number; + rows?: number; + rootClass?: string | __React.Component; + } + + export class GridTile extends React.Component{ + } + + } } // __MaterialUI declare module 'material-ui/lib/app-bar' { @@ -1952,6 +1991,16 @@ declare module "material-ui/lib/menus/menu-divider" { export = MenuDivider; } +declare module "material-ui/lib/grid-list/grid-list" { + import GridList = __MaterialUI.GridList.GridList; + export = GridList; +} + +declare module "material-ui/lib/grid-list/grid-tile" { + import GridTile = __MaterialUI.GridList.GridTile; + export = GridTile; +} + declare module "material-ui/lib/styles/colors" { import Colors = __MaterialUI.Styles.Colors; export = Colors; diff --git a/mathjs/mathjs-tests.ts b/mathjs/mathjs-tests.ts new file mode 100644 index 0000000000..78c9ed9414 --- /dev/null +++ b/mathjs/mathjs-tests.ts @@ -0,0 +1,581 @@ +/// + + +/* +Basic usage examples +*/ +(function(){ + // functions and constants + math.round(math.e, 3); // 2.718 + math.atan2(3, -3) / math.pi; // 0.75 + math.log(10000, 10); // 4 + math.sqrt(-4); // 2i + math.pow([[-1, 2], [3, 1]], 2); // [[7, 0], [0, 7]] + + // expressions + math.eval('1.2 * (2 + 4.5)'); // 7.8 + math.eval('5.08 cm to inch'); // 2 inch + math.eval('sin(45 deg) ^ 2'); // 0.5 + math.eval('9 / 3 + 2i'); // 3 + 2i + math.eval('det([-1, 2; 3, 1])'); // -7 + + // chained operations + var a = math.chain(3) + .add(4) + .multiply(2) + .done(); // 14 + + // mixed use of different data types in functions + console.log('mixed use of data types'); + math.add(4, [5, 6]); // number + Array, [9, 10] + math.multiply(math.unit('5 mm'), 3); // Unit * number, 15 mm + math.subtract([2, 3, 4], 5); // Array - number, [-3, -2, -1] + math.add(math.matrix([2, 3]), [4, 5]); // Matrix + Array, [6, 8] +}()); + + +/* +Bignumbers examples +*/ +(function() { + // configure the default type of numbers as BigNumbers + math.config({ + number: 'bignumber', // Default type of number: + // 'number' (default), 'bignumber', or 'fraction' + precision: 20 // Number of significant digits for BigNumbers + }); + + console.log('round-off errors with numbers'); + math.add(0.1, 0.2); // number, 0.30000000000000004 + math.divide(0.3, 0.2); // number, 1.4999999999999998 + console.log(); + + console.log('no round-off errors with BigNumbers'); + math.add(math.bignumber(0.1), math.bignumber(0.2)); // BigNumber, 0.3 + math.divide(math.bignumber(0.3), math.bignumber(0.2)); // BigNumber, 1.5 + console.log(); + + console.log('create BigNumbers from strings when exceeding the range of a number'); + math.bignumber(1.2e+500); // BigNumber, Infinity WRONG + math.bignumber('1.2e+500'); // BigNumber, 1.2e+500 + console.log(); + + // one can work conveniently with BigNumbers using the expression parser. + // note though that BigNumbers are only supported in arithmetic functions + console.log('use BigNumbers in the expression parser'); + math.eval('0.1 + 0.2'); // BigNumber, 0.3 + math.eval('0.3 / 0.2'); // BigNumber, 1.5 + console.log(); +}()); + + + +/* +Chaining examples +*/ +(function() { + // create a chained operation using the function `chain(value)` + // end a chain using done(). Let's calculate (3 + 4) * 2 + var a = math.chain(3) + .add(4) + .multiply(2) + .done(); // 14 + + // Another example, calculate square(sin(pi / 4)) + var b = math.chain(math.pi) + .divide(4) + .sin() + .square() + .done(); // 0.5 + + // A chain has a few special methods: done, toString, valueOf, get, and set. + // these are demonstrated in the following examples + + // toString will return a string representation of the chain's value + var chain = math.chain(2).divide(3); + var str = chain.toString(); // "0.6666666666666666" + + // a chain has a function .valueOf(), which returns the value hold by the chain. + // This allows using it in regular operations. The function valueOf() acts the + // same as function done(). + chain.valueOf(); // 0.66666666666667 + + + // the function subset can be used to get or replace sub matrices + var array = [[1, 2], [3, 4]]; + var v = math.chain(array) + .subset(math.index(1, 0)) + .done(); // 3 + + var m = math.chain(array) + .subset(math.index(0, 0), 8) + .multiply(3) + .done(); // [[24, 6], [9, 12]] +}()); + + +/* +Complex numbers examples +*/ +(function(){ + var a = math.complex(2, 3); // 2 + 3i + + // read the real and complex parts of the complex number + a.re; // 2 + a.im; // 3 + + // clone a complex value + var clone = a.clone(); // 2 + 3i + + // adjust the complex value + a.re = 5; // 5 + 3i + + // create a complex number by providing a string with real and complex parts + var b = math.complex('3 - 7i'); // 3 - 7i + console.log(); + + // perform operations with complex numbers + console.log('perform operations'); + math.add(a, b); // 8 - 4i + math.multiply(a, b); // 36 - 26i + math.sin(a); // -9.6541254768548 + 2.8416922956064i + + // some operations will return a complex number depending on the arguments + math.sqrt(4); // 2 + math.sqrt(-4); // 2i + + // create a complex number from polar coordinates + console.log('create complex numbers with polar coordinates'); + var c = math.complex({r: math.sqrt(2), phi: math.pi / 4}); // 1 + i + + // get polar coordinates of a complex number + var d = math.complex(3, 4); + d.toPolar(); // { r: 5, phi: 0.9272952180016122 } +}()); + + +/* +Expressions examples +*/ +(function() { + // 1. using the function math.eval + // + // Function `eval` accepts a single expression or an array with + // expressions as first argument, and has an optional second argument + // containing a scope with variables and functions. The scope is a regular + // JavaScript Object. The scope will be used to resolve symbols, and to write + // assigned variables or function. + console.log('1. USING FUNCTION MATH.EVAL'); + + // evaluate expressions + console.log('\nevaluate expressions'); + math.eval('sqrt(3^2 + 4^2)'); // 5 + math.eval('sqrt(-4)'); // 2i + math.eval('2 inch to cm'); // 5.08 cm + math.eval('cos(45 deg)'); // 0.70711 + + // evaluate multiple expressions at once + console.log('\nevaluate multiple expressions at once'); + math.eval([ + 'f = 3', + 'g = 4', + 'f * g' + ]); // [3, 4, 12] + + // provide a scope (just a regular JavaScript Object) + console.log('\nevaluate expressions providing a scope with variables and functions'); + var scope: any = { + a: 3, + b: 4 + }; + + // variables can be read from the scope + math.eval('a * b', scope); // 12 + + // variable assignments are written to the scope + math.eval('c = 2.3 + 4.5', scope); // 6.8 + scope.c; // 6.8 + + // scope can contain both variables and functions + scope["hello"] = function (name: string) { + return 'hello, ' + name + '!'; + }; + math.eval('hello("hero")', scope); // "hello, hero!" + + // define a function as an expression + var f = math.eval('f(x) = x ^ a', scope); + f(2); // 8 + scope.f(2); // 8 + + + + // 2. using function math.parse + // + // Function `math.parse` parses expressions into a node tree. The syntax is + // similar to function `math.eval`. + // Function `parse` accepts a single expression or an array with + // expressions as first argument. The function returns a node tree, which + // then can be compiled against math, and then evaluated against an (optional + // scope. This scope is a regular JavaScript Object. The scope will be used + // to resolve symbols, and to write assigned variables or function. + console.log('\n2. USING FUNCTION MATH.PARSE'); + + // parse an expression + console.log('\nparse an expression into a node tree'); + var node1 = math.parse('sqrt(3^2 + 4^2)'); + node1.toString(); // "sqrt((3 ^ 2) + (4 ^ 2))" + + // compile and evaluate the compiled code + // you could also do this in two steps: node1.compile().eval() + node1.eval(); // 5 + + // provide a scope + console.log('\nprovide a scope'); + var node2 = math.parse('x^a'); + var code2 = node2.compile(); + node2.toString(); // "x ^ a" + var scope: any = { + x: 3, + a: 2 + }; + code2.eval(scope); // 9 + + // change a value in the scope and re-evaluate the node + scope.a = 3; + code2.eval(scope); // 27 + + + // 3. using function math.compile + // + // Function `math.compile` compiles expressions into a node tree. The syntax is + // similar to function `math.eval`. + // Function `compile` accepts a single expression or an array with + // expressions as first argument, and returns an object with a function eval + // to evaluate the compiled expression. On evaluation, an optional scope can + // be provided. This scope will be used to resolve symbols, and to write + // assigned variables or function. + console.log('\n3. USING FUNCTION MATH.COMPILE'); + + // parse an expression + console.log('\ncompile an expression'); + var code3 = math.compile('sqrt(3^2 + 4^2)'); + + // evaluate the compiled code + code3.eval(); // 5 + + // provide a scope for the variable assignment + console.log('\nprovide a scope'); + var code2 = math.compile('a = a + 3'); + var scope: any = { + a: 7 + }; + code2.eval(scope); + scope.a; // 10 + + + // 4. using a parser + // + // In addition to the static functions `math.eval` and `math.parse`, math.js + // contains a parser with functions `eval` and `parse`, which automatically + // keeps a scope with assigned variables in memory. The parser also contains + // some convenience methods to get, set, and remove variables from memory. + console.log('\n4. USING A PARSER'); + var parser = math.parser(); + + // evaluate with parser + console.log('\nevaluate expressions'); + parser.eval('sqrt(3^2 + 4^2)'); // 5 + parser.eval('sqrt(-4)'); // 2i + parser.eval('2 inch to cm'); // 5.08 cm + parser.eval('cos(45 deg)'); // 0.70711 + + // define variables and functions + console.log('\ndefine variables and functions'); + parser.eval('x = 7 / 2'); // 3.5 + parser.eval('x + 3'); // 6.5 + parser.eval('f(x, y) = x^y'); // f(x, y) + parser.eval('f(2, 3)'); // 8 + + // manipulate matrices + // Note that matrix indexes in the expression parser are one-based with the + // upper-bound included. On a JavaScript level however, math.js uses zero-based + // indexes with an excluded upper-bound. + console.log('\nmanipulate matrices'); + parser.eval('k = [1, 2; 3, 4]'); // [[1, 2], [3, 4]] + parser.eval('l = zeros(2, 2)'); // [[0, 0], [0, 0]] + parser.eval('l[1, 1:2] = [5, 6]'); // [[5, 6], [0, 0]] + parser.eval('l[2, :] = [7, 8]'); // [[5, 6], [7, 8]] + parser.eval('m = k * l'); // [[19, 22], [43, 50]] + parser.eval('n = m[2, 1]'); // 43 + parser.eval('n = m[:, 1]'); // [[19], [43]] + + // get and set variables and functions + console.log('\nget and set variables and function in the scope of the parser'); + var x = parser.get('x'); + console.log('x =', x); // x = 7 + var f = parser.get('f'); + console.log('f =', math.format(f)); // f = f(x, y) + var g = f(3, 3); + console.log('g =', g); // g = 27 + + parser.set('h', 500); + parser.eval('h / 2'); // 250 + parser.set('hello', function (name: string) { + return 'hello, ' + name + '!'; + }); + parser.eval('hello("hero")'); // "hello, hero!" + + // clear defined functions and variables + parser.clear(); +}()); + + +/* +Fractions examples +*/ +(function(){ + // configure the default type of numbers as Fractions + math.config({ + number: 'fraction' // Default type of number: + // 'number' (default), 'bignumber', or 'fraction' + }); + + console.log('basic usage'); + math.fraction(0.125); // Fraction, 1/8 + math.fraction(0.32); // Fraction, 8/25 + math.fraction('1/3'); // Fraction, 1/3 + math.fraction('0.(3)'); // Fraction, 1/3 + math.fraction(2, 3); // Fraction, 2/3 + math.fraction('0.(285714)'); // Fraction, 2/7 + console.log(); + + console.log('round-off errors with numbers'); + math.add(0.1, 0.2); // number, 0.30000000000000004 + math.divide(0.3, 0.2); // number, 1.4999999999999998 + console.log(); + + console.log('no round-off errors with fractions :)'); + math.add(math.fraction(0.1), math.fraction(0.2)); // Fraction, 3/10 + math.divide(math.fraction(0.3), math.fraction(0.2)); // Fraction, 3/2 + console.log(); + + console.log('represent an infinite number of repeating digits'); + math.fraction('1/3'); // Fraction, 0.(3) + math.fraction('2/7'); // Fraction, 0.(285714) + math.fraction('23/11'); // Fraction, 2.(09) + console.log(); + + // one can work conveniently with fractions using the expression parser. + // note though that Fractions are only supported by basic arithmetic functions + console.log('use fractions in the expression parser'); + math.eval('0.1 + 0.2'); // Fraction, 3/10 + math.eval('0.3 / 0.2'); // Fraction, 3/2 + math.eval('23 / 11'); // Fraction, 23/11 + console.log(); + + // output formatting + console.log('output formatting of fractions'); + var a = math.fraction('2/3'); + console.log(math.format(a)); // Fraction, 2/3 + console.log(math.format(a, {fraction: 'ratio'})); // Fraction, 2/3 + console.log(math.format(a, {fraction: 'decimal'})); // Fraction, 0.(6) + console.log(a.toString()); // Fraction, 0.(6) + console.log(); +}()); + +/* +Matrices examples +*/ +(function() { + // create matrices and arrays. a matrix is just a wrapper around an Array, + // providing some handy utilities. + console.log('create a matrix'); + var a = math.matrix([1, 4, 9, 16, 25]); // [1, 4, 9, 16, 25] + var b = math.matrix(math.ones([2, 3])); // [[1, 1, 1], [1, 1, 1]] + b.size(); // [2, 3] + + // the Array data of a Matrix can be retrieved using valueOf() + var array = a.valueOf(); // [1, 4, 9, 16, 25] + + // Matrices can be cloned + var clone = a.clone(); // [1, 4, 9, 16, 25] + console.log(); + + // perform operations with matrices + console.log('perform operations'); + math.sqrt(a); // [1, 2, 3, 4, 5] + var c = [1, 2, 3, 4, 5]; + math.factorial(c); // [1, 2, 6, 24, 120] + console.log(); + + // create and manipulate matrices. Arrays and Matrices can be used mixed. + console.log('manipulate matrices'); + var d = [[1, 2], [3, 4]]; // [[1, 2], [3, 4]] + var e = math.matrix([[5, 6], [1, 1]]); // [[5, 6], [1, 1]] + + // set a submatrix. + // Matrix indexes are zero-based. + e.subset(math.index(1, [0, 1]), [[7, 8]]); // [[5, 6], [7, 8]] + var f = math.multiply(d, e); // [[19, 22], [43, 50]] + var g = f.subset(math.index(1, 0)); // 43 + console.log(); + + // get a sub matrix + // Matrix indexes are zero-based. + console.log('get a sub matrix'); + var h = math.diag(math.range(1,4)); // [[1, 0, 0], [0, 2, 0], [0, 0, 3]] + h.subset( math.index([1, 2], [1, 2])); // [[2, 0], [0, 3]] + var i = math.range(1,6); // [1, 2, 3, 4, 5] + i.subset(math.index(math.range(1,4))); // [2, 3, 4] + console.log(); + + + // resize a multi dimensional matrix + console.log('resizing a matrix'); + var j = math.matrix(); + var defaultValue = 0; + j.resize([2, 2, 2], defaultValue); // [[[0, 0], [0, 0]], [[0, 0], [0, 0]]] + j.size(); // [2, 2, 2] + j.resize([2, 2]); // [[0, 0], [0, 0]] + j.size(); // [2, 2] + console.log(); + + // setting a value outside the matrices range will resize the matrix. + // new elements will be initialized with zero. + console.log('set a value outside a matrices range'); + var k = math.matrix(); + k.subset(math.index(2), 6); // [0, 0, 6] + console.log(); + + console.log('set a value outside a matrices range, leaving new entries uninitialized'); + var m = math.matrix(); + defaultValue = math.uninitialized; + m.subset(math.index(2), 6, defaultValue); // [undefined, undefined, 6] + console.log(); + + // create ranges + console.log('create ranges'); + math.range(1, 6); // [1, 2, 3, 4, 5] + math.range(0, 18, 3); // [0, 3, 6, 9, 12, 15] + math.range('2:-1:-3'); // [2, 1, 0, -1, -2] + math.factorial(math.range('1:6')); // [1, 2, 6, 24, 120] + console.log(); +}()); + +/* +Sparse matrices examples +*/ +(function() { + // create a sparse matrix + console.log('creating a 1000x1000 sparse matrix...'); + var a = math.eye(1000, 1000, 'sparse'); + + // do operations with a sparse matrix + console.log('doing some operations on the sparse matrix...'); + var b = math.multiply(a, a); + var c = math.multiply(b, math.complex(2, 2)); + var d = math.transpose(c); + var e = math.multiply(d, a); + + // we will not print the output, but doing the same operations + // with a dense matrix are very slow, try it for yourself. + console.log('already done'); + console.log('now try this with a dense matrix :)'); +}()); + +/* +Units examples +*/ +(function() { + // units can be created by providing a value and unit name, or by providing + // a string with a valued unit. + console.log('create units'); + var a = math.unit(45, 'cm'); // 450 mm + var b = math.unit('0.1m'); // 100 mm + console.log(); + + // units can be added, subtracted, and multiplied or divided by numbers and by other units + console.log('perform operations'); + math.add(a, b); // 0.55 m + math.multiply(b, 2); // 200 mm + math.divide(math.unit('1 m'), math.unit('1 s')); // 1 m / s + math.pow(math.unit('12 in'), 3); // 1728 in^3 + console.log(); + + // units can be converted to a specific type, or to a number + console.log('convert to another type or to a number'); + b.to('cm'); // 10 cm Alternatively: math.to(b, 'cm') + math.to(b, 'inch'); // 3.9370... inch + b.toNumber('cm'); // 10 + math.number(b, 'cm'); // 10 + console.log(); + + // the expression parser supports units too + console.log('parse expressions'); + math.eval('2 inch to cm'); // 5.08 cm + math.eval('cos(45 deg)'); // 0.70711... + math.eval('90 km/h to m/s'); // 25 m / s + console.log(); + + // convert a unit to a number + // A second parameter with the unit for the exported number must be provided + math.eval('number(5 cm, mm)'); // number, 50 + console.log(); + + // simplify units + console.log('simplify units'); + math.eval('100000 N / m^2'); // 100 kPa + math.eval('9.81 m/s^2 * 100 kg * 40 m'); // 39.24 kJ + console.log(); + + // example engineering calculations + console.log('compute molar volume of ideal gas at 65 Fahrenheit, 14.7 psi in L/mol'); + var Rg = math.unit('8.314 N m / (mol K)'); + var T = math.unit('65 degF'); + var P = math.unit('14.7 psi'); + var v = math.divide(math.multiply(Rg, T), P); + console.log('gas constant (Rg) = ', format(Rg)); + console.log('P = ' + format(P)); + console.log('T = ' + format(T)); + console.log('v = Rg * T / P = ' + format(math.to(v, 'L/mol'))); // 23.910... L / mol + console.log(); + + console.log('compute speed of fluid flowing out of hole in a container'); + var g = math.unit('9.81 m / s^2'); + var h = math.unit('1 m'); + var v2 = math.pow(math.multiply(2, math.multiply(g, h)), 0.5); // Can also use math.sqrt + console.log('g = ' + format(g)); + console.log('h = ' + format(h)); + console.log('v = (2 g h) ^ 0.5 = ' + format(v2)); // 4.429... m / s + console.log(); + + console.log('electrical power consumption:'); + var expr = '460 V * 20 A * 30 days to kWh'; + console.log(expr + ' = ' + math.eval(expr)); // 6624 kWh + console.log(); + + console.log('circuit design:'); + var expr = '24 V / (6 mA)'; + console.log(expr + ' = ' + math.eval(expr)); // 4 kohm + console.log(); + + console.log('operations on arrays:'); + var B = math.eval('[1, 0, 0] T'); + var v3 = math.eval('[0, 1, 0] m/s'); + var q = math.eval('1 C'); + var F = math.multiply(q, math.cross(v3, B)); + console.log('B (magnetic field strength) = ' + format(B)); // [1 T, 0 T, 0 T] + console.log('v (particle velocity) = ' + format(v3)); // [0 m / s, 1 m / s, 0 m / s] + console.log('q (particle charge) = ' + format(q)); // 1 C + console.log('F (force) = q (v cross B) = ' + format(F)); // [0 N, 0 N, -1 N] + + /** + * Helper function to format an output a value. + * @param {*} value + * @return {string} Returns the formatted value + */ + function format (value: any): string { + var precision = 14; + return math.format(value, precision); + } +}()); \ No newline at end of file diff --git a/mathjs/mathjs.d.ts b/mathjs/mathjs.d.ts new file mode 100644 index 0000000000..e6fa6a8778 --- /dev/null +++ b/mathjs/mathjs.d.ts @@ -0,0 +1,2138 @@ +// Type definitions for mathjs +// Project: http://mathjs.org/ +// Definitions by: Ilya Shestakov +// Definitions: https://github.com/borisyankov/DefinitelyTyped + +declare var math: mathjs.IMathJsStatic; + +declare module mathjs { + + type MathArray = number[]|number[][]; + type MathType = number|BigNumber|Fraction|Complex|Unit|MathArray|Matrix; + type MathExpression = string|string[]|MathArray|Matrix; + + export interface IMathJsStatic { + + e: number; + pi: number; + uninitialized: any; + + config(options: any): void; + + /** + * Solves the linear equation system by forwards substitution. Matrix must be a lower triangular matrix. + * @param L A N x N matrix or array (L) + * @param b A column vector with the b values + * @returns A column vector with the linear system solution (x) + */ + lsolve(L: Matrix|MathArray, b: Matrix|MathArray): Matrix|MathArray; + + /** + * Calculate the Matrix LU decomposition with partial pivoting. Matrix A is decomposed in two matrices (L, U) + * and a row permutation vector p where A[p,:] = L * U + * @param A A two dimensional matrix or array for which to get the LUP decomposition. + * @returns The lower triangular matrix, the upper triangular matrix and the permutation matrix. + */ + lup(A?: Matrix|MathArray): MathArray; + + /** + * Solves the linear system A * x = b where A is an [n x n] matrix and b is a [n] column vector. + * @param A Invertible Matrix or the Matrix LU decomposition + * @param b Column Vector + * @returns Column vector with the solution to the linear system A * x = b + */ + lusolve(A: Matrix|MathArray|Number, b: Matrix|MathArray): Matrix|MathArray; + + /** + * Calculate the Sparse Matrix LU decomposition with full pivoting. Sparse Matrix A is decomposed in + * two matrices (L, U) and two permutation vectors (pinv, q) where P * A * Q = L * U + * @param A A two dimensional sparse matrix for which to get the LU decomposition. + * @param order The Symbolic Ordering and Analysis order: 0 - Natural ordering, no permutation vector q is + * returned 1 - Matrix must be square, symbolic ordering and analisis is performed on M = A + A' 2 - Symbolic + * ordering and analisis is performed on M = A' * A. Dense columns from A' are dropped, A recreated from A'. + * This is appropriatefor LU factorization of unsymmetric matrices. 3 - Symbolic ordering and analisis is performed + * on M = A' * A. This is best used for LU factorization is matrix M has no dense rows. A dense row is a row with + * more than 10*sqr(columns) entries. + * @param threshold Partial pivoting threshold (1 for partial pivoting) + * @returns The lower triangular matrix, the upper triangular matrix and the permutation vectors. + */ + slu(A: Matrix, order: Number, threshold: Number): any; + + /** + * Solves the linear equation system by backward substitution. Matrix must be an upper triangular matrix. U * x = b + * @param U A N x N matrix or array (U) + * @param b A column vector with the b values + * @returns A column vector with the linear system solution (x) + */ + usolve(U: Matrix|MathArray, b:Matrix|MathArray): Matrix|MathArray; + + /** + * Calculate the absolute value of a number. For matrices, the function is evaluated element wise. + * @param x A number or matrix for which to get the absolute value + * @returns Absolute value of x + */ + abs(x: number): number; + abs(x: BigNumber): BigNumber; + abs(x: Fraction): Fraction; + abs(x: Complex): Complex; + abs(x: MathArray): MathArray; + abs(x: Matrix): Matrix; + abs(x: Unit): Unit; + + /** + * Add two values, x + y. For matrices, the function is evaluated element wise. + * @param x First value to add + * @param y Second value to add + * @returns Sum of x and y + */ + add(x: MathType, y: MathType): MathType; + + /** + * Calculate the cubic root of a value. For matrices, the function is evaluated element wise. + * @param x Value for which to calculate the cubic root. + * @param allRoots Optional, false by default. Only applicable when x is a number or complex number. If true, all complex roots are returned, if false (default) the principal root is returned. + * @returns Returns the cubic root of x + */ + cbrt(x: number, allRoots?: boolean): number; + cbrt(x: BigNumber, allRoots?: boolean): BigNumber; + cbrt(x: Fraction, allRoots?: boolean): Fraction; + cbrt(x: Complex, allRoots?: boolean): Complex; + cbrt(x: MathArray, allRoots?: boolean): MathArray; + cbrt(x: Matrix, allRoots?: boolean): Matrix; + cbrt(x: Unit, allRoots?: boolean): Unit; + + /** + * Round a value towards plus infinity If x is complex, both real and imaginary part are rounded towards plus infinity. For matrices, the function is evaluated element wise. + * @param x Number to be rounded + * @returns Rounded value + */ + ceil(x: number): number; + ceil(x: BigNumber): BigNumber; + ceil(x: Fraction): Fraction; + ceil(x: Complex): Complex; + ceil(x: MathArray): MathArray; + ceil(x: Matrix): Matrix; + ceil(x: Unit): Unit; + + /** + * Compute the cube of a value, x * x * x. For matrices, the function is evaluated element wise. + * @param x Number for which to calculate the cube + * @returns Cube of x + */ + cube(x: number): number; + cube(x: BigNumber): BigNumber; + cube(x: Fraction): Fraction; + cube(x: Complex): Complex; + cube(x: MathArray): MathArray; + cube(x: Matrix): Matrix; + cube(x: Unit): Unit; + + /** + * Divide two values, x / y. To divide matrices, x is multiplied with the inverse of y: x * inv(y). + * @param x Numerator + * @param y Denominator + * @returns Quotient, x / y + */ + divide(x: Unit, y: Unit): Unit; + divide(x: number, y: number): number; + divide(x:MathType, y:MathType): MathType; + + /** + * Divide two matrices element wise. The function accepts both matrices and scalar values. + * @param x Numerator + * @param y Denominator + * @returns Quotient, x ./ y + */ + dotDivide(x: MathType, y: MathType): MathType; + + /** + * Multiply two matrices element wise. The function accepts both matrices and scalar values. + * @param x Left hand value + * @param y Right hand value + * @returns Multiplication of x and y + */ + dotMultiply(x: MathType, y: MathType): MathType; + + /** + * Calculates the power of x to y element wise. + * @param x The base + * @param y The exponent + * @returns The value of x to the power y + */ + dotPow(x: MathType, y: MathType): MathType; + + /** + * Calculate the exponent of a value. For matrices, the function is evaluated element wise. + * @param x A number or matrix to exponentiate + * #returns Exponent of x + */ + exp(x: number): number; + exp(x: BigNumber ): BigNumber ; + exp(x: Complex ): Complex ; + exp(x: MathArray ): MathArray ; + exp(x: Matrix): Matrix; + + /** + * Round a value towards zero. For matrices, the function is evaluated element wise. + * @param x Number to be rounded + * @returns Rounded value + */ + fix(x: number): number; + fix(x: BigNumber ): BigNumber ; + fix(x: Fraction ): Fraction ; + fix(x: Complex ): Complex ; + fix(x: MathArray ): MathArray ; + fix(x: Matrix): Matrix; + + /** + * Round a value towards minus infinity. For matrices, the function is evaluated element wise. + * @param Number to be rounded + * @returns Rounded value + */ + floor(x: number): number; + floor(x: BigNumber ): BigNumber ; + floor(x: Fraction ): Fraction ; + floor(x: Complex ): Complex ; + floor(x: MathArray ): MathArray ; + floor(x: Matrix): Matrix; + + /** + * Calculate the greatest common divisor for two or more values or arrays. For matrices, the function is evaluated element wise. + */ + gcd(...args: number[]): number; + gcd(...args: BigNumber[]): BigNumber ; + gcd(...args: Fraction[]): Fraction ; + gcd(...args: MathArray[]): MathArray ; + gcd(...args: Matrix[]): Matrix; + + /** + * Calculate the hypotenusa of a list with values. The hypotenusa is defined as: + * hypot(a, b, c, ...) = sqrt(a^2 + b^2 + c^2 + ...) + * For matrix input, the hypotenusa is calculated for all values in the matrix. + */ + hypot(...args: number[]): number; + hypot(...args: BigNumber[]): BigNumber; + + /** + * Calculate the least common multiple for two or more values or arrays. lcm is defined as: + * lcm(a, b) = abs(a * b) / gcd(a, b) + * For matrices, the function is evaluated element wise. + */ + lcm(a: number, b: number): number; + lcm(a: BigNumber , b: BigNumber ): BigNumber ; + lcm(a: MathArray, b: MathArray): MathArray; + lcm(a: Matrix, b: Matrix): Matrix; + + /** + * Calculate the logarithm of a value. For matrices, the function is evaluated element wise. + * @param x Value for which to calculate the logarithm. + * @param base Optional base for the logarithm. If not provided, the natural logarithm of x is calculated. Default value: e. + */ + log(x: number|BigNumber|Complex|MathArray|Matrix, base?: number|BigNumber|Complex): number|BigNumber|Complex|MathArray|Matrix; + + /** + * Calculate the 10-base of a value. This is the same as calculating log(x, 10). For matrices, the function is evaluated element wise. + * @param x Value for which to calculate the logarithm. + */ + log10(x: number): number; + log10(x: BigNumber): BigNumber; + log10(x: Complex): Complex; + log10(x: MathArray): MathArray; + log10(x: Matrix): Matrix; + + /** + * Calculates the modulus, the remainder of an integer division. For matrices, the function is evaluated element wise. + * The modulus is defined as: + * x - y * floor(x / y) + * See http://en.wikipedia.org/wiki/Modulo_operation. + * @param x Dividend + * @param y Divisor + */ + mod(x: number|BigNumber|Fraction|MathArray|Matrix, y: number|BigNumber|Fraction|MathArray|Matrix): number|BigNumber|Fraction|MathArray|Matrix; + + /** + * Multiply two values, x * y. The result is squeezed. For matrices, the matrix product is calculated. + */ + multiply(x: MathArray|Matrix, y: MathArray|Matrix): Matrix; + multiply(x: MathArray|Matrix, y: MathType): Matrix; + multiply(x: Unit, y: Unit): Unit; + multiply(x: number, y: number): number; + multiply(x: MathType, y: MathType): MathType; + + /** + * Calculate the norm of a number, vector or matrix. The second parameter p is optional. If not provided, it defaults to 2. + * @param x Value for which to calculate the norm + * @param p Vector space. Supported numbers include Infinity and -Infinity. Supported strings are: 'inf', '-inf', and 'fro' (The Frobenius norm) Default value: 2. + * @returns the p-norm + */ + norm(x: number|BigNumber|Complex|MathArray|Matrix, p?: number|BigNumber|string): number|BigNumber; + + /** + * Calculate the nth root of a value. The principal nth root of a positive real number A, is the positive real solution of the equation + * x^root = A + * For matrices, the function is evaluated element wise. + * @param a Value for which to calculate the nth root + * @param root The root. Default value: 2. + */ + nthRoot(a: number|BigNumber|MathArray|Matrix|Complex, root?: number|BigNumber): number|Complex|MathArray|Matrix; + + /** + * Calculates the power of x to y, x ^ y. Matrix exponentiation is supported for square matrices x, and positive integer exponents y. + * @param x The base + * @param y The exponent + */ + pow(x: number|BigNumber|Complex|MathArray|Matrix, y: number|BigNumber|Complex): number|BigNumber|Complex|MathArray|Matrix; + + /** + * Round a value towards the nearest integer. For matrices, the function is evaluated element wise. + * @param x Number to be rounded + * @param n Number of decimals Default value: 0. + */ + round(x: number|BigNumber|Fraction|Complex|MathArray|Matrix, n?: number|BigNumber|MathArray): number|BigNumber|Fraction|Complex|MathArray|Matrix; + + /** + * Compute the sign of a value. The sign of a value x is: + * 1 when x > 1 + * -1 when x < 0 + * 0 when x == 0 + * For matrices, the function is evaluated element wise. + */ + sign(x: number): number; + sign(x: BigNumber ): BigNumber; + sign(x: Fraction ): Fraction ; + sign(x: Complex ): Complex ; + sign(x: MathArray): MathArray; + sign(x: Matrix): Matrix; + sign(x: Unit): Unit; + + /** + * Calculate the square root of a value. For matrices, the function is evaluated element wise. + */ + sqrt(x: number): number; + sqrt(x: BigNumber ): BigNumber; + sqrt(x: Complex ): Complex ; + sqrt(x: MathArray): MathArray; + sqrt(x: Matrix): Matrix; + sqrt(x: Unit): Unit; + + /** + * Compute the square of a value, x * x. For matrices, the function is evaluated element wise. + */ + square(x: number): number; + square(x: BigNumber ): BigNumber; + square(x: Fraction ): Fraction ; + square(x: Complex ): Complex ; + square(x: MathArray): MathArray; + square(x: Matrix): Matrix; + square(x: Unit): Unit; + + /** + * Subtract two values, x - y. For matrices, the function is evaluated element wise. + */ + subtract(x: MathType, y: MathType): MathType; + + /** + * Inverse the sign of a value, apply a unary minus operation. + * For matrices, the function is evaluated element wise. Boolean values and strings will be converted to a number. For complex numbers, both real and complex value are inverted. + */ + unaryMinus(x: number): number; + unaryMinus(x: BigNumber ): BigNumber; + unaryMinus(x: Fraction ): Fraction ; + unaryMinus(x: Complex ): Complex ; + unaryMinus(x: MathArray): MathArray; + unaryMinus(x: Matrix): Matrix; + unaryMinus(x: Unit): Unit; + + /** + * Unary plus operation. Boolean values and strings will be converted to a number, numeric values will be returned as is. + * For matrices, the function is evaluated element wise. + */ + unaryPlus(x: number): number; + unaryPlus(x: BigNumber ): BigNumber; + unaryPlus(x: Fraction ): Fraction ; + unaryPlus(x: string): string; + unaryPlus(x: Complex ): Complex ; + unaryPlus(x: MathArray): MathArray; + unaryPlus(x: Matrix): Matrix; + unaryPlus(x: Unit): Unit; + + /** + * Calculate the extended greatest common divisor for two values. See http://en.wikipedia.org/wiki/Extended_Euclidean_algorithm. + */ + xgcd(a: number|BigNumber, b: number|BigNumber): MathArray; + + /** + * Bitwise AND two values, x & y. For matrices, the function is evaluated element wise. + */ + bitAnd(x: number|BigNumber|MathArray|Matrix, y: number|BigNumber|MathArray|Matrix): number|BigNumber|MathArray|Matrix; + + /** + * Bitwise NOT value, ~x. For matrices, the function is evaluated element wise. For units, the function is evaluated on the best prefix base. + */ + bitNot(x: number): number; + bitNot(x: BigNumber ): BigNumber ; + bitNot(x: MathArray): MathArray; + bitNot(x: Matrix): Matrix; + + /** + * Bitwise OR two values, x | y. For matrices, the function is evaluated element wise. For units, the function is evaluated on the lowest print base. + */ + bitOr(x: number): number; + bitOr(x: BigNumber ): BigNumber ; + bitOr(x: MathArray): MathArray; + bitOr(x: Matrix): Matrix; + + /** + * Bitwise XOR two values, x ^ y. For matrices, the function is evaluated element wise. + */ + bitXor(x: number|BigNumber|MathArray|Matrix, y: number|BigNumber|MathArray|Matrix): number|BigNumber|MathArray|Matrix; + + /** + * Bitwise left logical shift of a value x by y number of bits, x << y. For matrices, the function is evaluated element wise. For units, the function is evaluated on the best prefix base. + * @param x Value to be shifted + * @param y Amount of shifts + */ + leftShift(x: number|BigNumber|MathArray|Matrix, y: number|BigNumber): number|BigNumber|MathArray|Matrix; + + /** + * Bitwise right arithmetic shift of a value x by y number of bits, x >> y. For matrices, the function is evaluated element wise. For units, the function is evaluated on the best prefix base. + * @param x Value to be shifted + * @param y Amount of shifts + */ + rightArithShift(x: number|BigNumber|MathArray|Matrix, y: number|BigNumber): number|BigNumber|MathArray|Matrix; + + /** + * Bitwise right logical shift of value x by y number of bits, x >>> y. For matrices, the function is evaluated element wise. For units, the function is evaluated on the best prefix base. + * @param x Value to be shifted + * @param y Amount of shifts + */ + rightLogShift(x: number|MathArray|Matrix, y: number): number|MathArray|Matrix; + + /** + * The Bell Numbers count the number of partitions of a set. A partition is a pairwise disjoint subset of S whose union is S. bellNumbers only takes integer arguments. The following condition must be enforced: n >= 0 + * @param n Total number of objects in the set + */ + bellNumbers(n: Number): Number; + bellNumbers(n: BigNumber): BigNumber; + + /** + * The Catalan Numbers enumerate combinatorial structures of many different types. catalan only takes integer arguments. The following condition must be enforced: n >= 0 + * @pararm n nth Catalan number + */ + catalan(n: Number): Number; + catalan(n: BigNumber): BigNumber; + + /** + * The composition counts of n into k parts. Composition only takes integer arguments. The following condition must be enforced: k <= n. + * @param n Total number of objects in the set + * @param k Number of objects in the subset + * @returns Returns the composition counts of n into k parts. + */ + composition(n: Number|BigNumber, k: Number|BigNumber): Number|BigNumber + + /** + * The Stirling numbers of the second kind, counts the number of ways to partition a set of n labelled objects into k nonempty unlabelled subsets. stirlingS2 only takes integer arguments. The following condition must be enforced: k <= n. + * If n = k or k = 1, then s(n,k) = 1 + * @param n Total number of objects in the set + * @param k Number of objects in the subset + */ + stirlingS2(n: Number|BigNumber, k: Number|BigNumber): Number|BigNumber; + + /** + * Compute the argument of a complex value. For a complex number a + bi, the argument is computed as atan2(b, a). For matrices, the function is evaluated element wise. + * @param x A complex number or array with complex numbers + */ + arg(x: number): number; + arg(x: Complex): number; + arg(x: MathArray): MathArray; + arg(x: Matrix): Matrix; + + /** + * Compute the complex conjugate of a complex value. If x = a+bi, the complex conjugate of x is a - bi. For matrices, the function is evaluated element wise. + * @param x A complex number or array with complex numbers + */ + conj(x: number|BigNumber|Complex|MathArray|Matrix): number|BigNumber|Complex|MathArray|Matrix; + + /** + * Get the imaginary part of a complex number. For a complex number a + bi, the function returns b. + * For matrices, the function is evaluated element wise. + */ + im(x: number|BigNumber|Complex|MathArray|Matrix): number|BigNumber|MathArray|Matrix; + + /** + * Get the real part of a complex number. For a complex number a + bi, the function returns a. + * For matrices, the function is evaluated element wise. + */ + re(x: number|BigNumber|Complex|MathArray|Matrix): number|BigNumber|MathArray|Matrix; + + /** + * Create a BigNumber, which can store numbers with arbitrary precision. When a matrix is provided, all elements will be converted to BigNumber. + */ + bignumber(x?: number|string|MathArray|Matrix|boolean): BigNumber; + + /** + * Create a boolean or convert a string or number to a boolean. In case of a number, true is returned for non-zero numbers, and false in case of zero. Strings can be 'true' or 'false', or can contain a number. When value is a matrix, all elements will be converted to boolean. + */ + boolean(x: string|number|boolean|MathArray|Matrix ): boolean|MathArray|Matrix; + + /** + * Wrap any value in a chain, allowing to perform chained operations on the value. + * All methods available in the math.js library can be called upon the chain, and then will be evaluated with the value itself as first argument. The chain can be closed by executing chain.done(), which returns the final value. + * The chain has a number of special functions: + * done() Finalize the chain and return the chain's value. + * valueOf() The same as done() + * toString() Executes math.format() onto the chain's value, returning a string representation of the value. + */ + chain(value?: any): IMathJsChain; + + /** + * Create a complex value or convert a value to a complex value. + */ + complex(): Complex; + complex(re: number, im: number): Complex; + complex(complex: Complex): Complex; + complex(arg: string): Complex; + complex(array: MathArray): Complex; + complex(obj: IPolarCoordinates): Complex; + + /** + * Create a fraction convert a value to a fraction. + */ + fraction(numerator: number|string|MathArray|Matrix, denominator?: number|string|MathArray|Matrix): Fraction|MathArray|Matrix; + + /** + * Create an index. An Index can store ranges having start, step, and end for multiple dimensions. Matrix.get, Matrix.set, and math.subset accept an Index as input. + */ + index(...ranges: any[]): Index; + + /** + * Create a Matrix. The function creates a new math.type.Matrix object from an Array. A Matrix has utility functions + * to manipulate the data in the matrix, like getting the size and getting or setting values in the matrix. Supported + * storage formats are 'dense' and 'sparse'. + */ + matrix(format?: string): Matrix; + matrix(data: MathArray|Matrix, format?: string, dataType?:string): Matrix; + + /** + * Create a number or convert a string, boolean, or unit to a number. When value is a matrix, all elements will be converted to number. + */ + number(value?: string|number|boolean|MathArray|Matrix|Unit): number|MathArray|Matrix; + number(unit: Unit, valuelessUnit: Unit|string): number|MathArray|Matrix; + + /** + * Create a Sparse Matrix. The function creates a new math.type.Matrix object from an Array. A Matrix has utility + * functions to manipulate the data in the matrix, like getting the size and getting or setting values in the matrix. + * @param data A two dimensional array + */ + sparse(data?: MathArray|Matrix, dataType?:string): Matrix; + + /** + * Create a string or convert any object into a string. Elements of Arrays and Matrices are processed element wise. + * @param value A value to convert to a string + */ + string(value: any): string|MathArray|Matrix; + + /** + * Create a unit. Depending on the passed arguments, the function will create and return a new math.type.Unit object. + * When a matrix is provided, all elements will be converted to units. + */ + unit(unit: string): Unit; + unit(value: number, unit: string): Unit; + + /** + * Parse and compile an expression. Returns a an object with a function eval([scope]) to evaluate the compiled expression. + */ + compile(expr: MathExpression): EvalFunction; + compile(exprs: MathExpression[]): EvalFunction[]; + + /** + * Evaluate an expression. + */ + eval(expr: MathExpression, scope?: any): any; + eval(exprs: MathExpression[], scope?: any): any; + + /** + * Retrieve help on a function or data type. Help files are retrieved from the documentation in math.expression.docs. + */ + help(search: any): Help; + + /** + * Parse an expression. Returns a node tree, which can be evaluated by invoking node.eval(); + */ + parse(expr: MathExpression, options?: any): MathNode; + parse(exprs: MathExpression[], options?: any): MathNode[]; + + /** + * Create a parser. The function creates a new math.expression.Parser object. + */ + parser(): Parser; + + /** + * Calculates: The eucledian distance between two points in 2 and 3 dimensional spaces. Distance between point + * and a line in 2 and 3 dimensional spaces. Pairwise distance between a set of 2D or 3D points NOTE: When + * substituting coefficients of a line(a, b and c), use ax + by + c = 0 instead of ax + by = c For parametric + * equation of a 3D line, x0, y0, z0, a, b, c are from: (x−x0, y−y0, z−z0) = t(a, b, c) + */ + distance(x: MathArray|Matrix|any, y: MathArray|Matrix|any): Number | BigNumber; + + /** + * Calculates the point of intersection of two lines in two or three dimensions and of a line and a plane in + * three dimensions. The inputs are in the form of arrays or 1 dimensional matrices. The line intersection functions + * return null if the lines do not meet. + * Note: Fill the plane coefficients as x + y + z = c and not as x + y + z + c = 0. + * @param w Co-ordinates of first end-point of first line + * @param x Co-ordinates of second end-point of first line + * @param y Co-ordinates of first end-point of second line OR Co-efficients of the plane's equation + * @param z Co-ordinates of second end-point of second line OR null if the calculation is for line and plane + * @returns Returns the point of intersection of lines/lines-planes + */ + intersect(w: MathArray|Matrix, x: MathArray|Matrix, y: MathArray|Matrix, z: MathArray|Matrix): MathArray; + + /** + * Logical and. Test whether two values are both defined with a nonzero/nonempty value. For matrices, the function is evaluated element wise. + */ + and(x: number|BigNumber|Complex|Unit|MathArray|Matrix, y: number|BigNumber|Complex|Unit|MathArray|Matrix): boolean|MathArray|Matrix; + + /** + * Logical not. Flips boolean value of a given parameter. For matrices, the function is evaluated element wise. + */ + not(x: number|BigNumber|Complex|Unit|MathArray|Matrix): boolean|MathArray|Matrix; + + /** + * Logical or. Test if at least one value is defined with a nonzero/nonempty value. For matrices, the function is evaluated element wise. + */ + or(x: number|BigNumber|Complex|Unit|MathArray|Matrix, y: number|BigNumber|Complex|Unit|MathArray|Matrix): boolean|MathArray|Matrix; + + /** + * Logical xor. Test whether one and only one value is defined with a nonzero/nonempty value. For matrices, the function is evaluated element wise. + */ + xor(x: number|BigNumber|Complex|Unit|MathArray|Matrix, y: number|BigNumber|Complex|Unit|MathArray|Matrix): boolean|MathArray|Matrix; + + /** + * Concatenate two or more matrices. + * dim: number is a zero-based dimension over which to concatenate the matrices. By default the last dimension of the matrices. + */ + concat(...args: (MathArray|Matrix|number)[]): MathArray|Matrix; + + /** + * Calculate the cross product for two vectors in three dimensional space. The cross product of A = [a1, a2, a3] + * and B =[b1, b2, b3] is defined as: + * cross(A, B) = [ a2 * b3 - a3 * b2, a3 * b1 - a1 * b3, a1 * b2 - a2 * b1 ] + */ + cross(x: MathArray|Matrix, y: MathArray|Matrix): Matrix; + + /** + * Calculate the determinant of a matrix. + */ + det(x: MathArray|Matrix): number; + + /** + * Create a diagonal matrix or retrieve the diagonal of a matrix. + * When x is a vector, a matrix with vector x on the diagonal will be returned. When x is a two dimensional matrix, + * the matrixes kth diagonal will be returned + * as vector. When k is positive, the values are placed on the super diagonal. When k is negative, the values are + * placed on the sub diagonal. + * @param X A two dimensional matrix or a vector + * @param k The diagonal where the vector will be filled in or retrieved. Default value: 0. + * @param format The matrix storage format. Default value: 'dense'. + */ + diag(X: MathArray|Matrix, format?: string): Matrix; + diag(X: MathArray|Matrix, k: number|BigNumber, format?: string): Matrix; + + /** + * Calculate the dot product of two vectors. The dot product of A = [a1, a2, a3, ..., an] and B = [b1, b2, b3, ..., bn] + * is defined as: + * dot(A, B) = a1 * b1 + a2 * b2 + a3 * b3 + ... + an * bn + */ + dot(x: MathArray|Matrix, y: MathArray|Matrix): number; + + /** + * Create a 2-dimensional identity matrix with size m x n or n x n. The matrix has ones on the diagonal and zeros elsewhere. + */ + eye(n: number, format?: string): Matrix; + eye(m: number, n: number, format?: string): Matrix; + eye(size: number[], format?: string): Matrix; + + /** + * Flatten a multi dimensional matrix into a single dimensional matrix. + */ + flatten(x: MathArray|Matrix): MathArray|Matrix; + + /** + * Calculate the inverse of a square matrix. + */ + inv(x: number|Complex|MathArray|Matrix): number|Complex|MathArray|Matrix; + + /** + * Create a matrix filled with ones. The created matrix can have one or multiple dimensions. + */ + ones(n: number, format?: string): MathArray|Matrix; + ones(m: number, n: number, format?: string): MathArray|Matrix; + ones(size: number[], format?: string): MathArray|Matrix; + + /** + * Create an array from a range. By default, the range end is excluded. This can be customized by providing an extra parameter includeEnd. + * @param str A string 'start:end' or 'start:step:end' + * @param start Start of the range + * @param end End of the range, excluded by default, included when parameter includeEnd=true + * @param step Step size. Default value is 1. + * @returns Parameters describing the ranges start, end, and optional step. + */ + range(str: string, includeEnd?: boolean): Matrix; + range(start: number|BigNumber, end:number|BigNumber, includeEnd?:boolean): Matrix; + range(start: number|BigNumber, end: number|BigNumber, step: number|BigNumber, includeEnd?:boolean): Matrix; + + /** + * Resize a matrix + * @param x Matrix to be resized + * @param size One dimensional array with numbers + * @param defaultValue Zero by default, except in case of a string, in that case defaultValue = ' ' Default value: 0. + */ + resize(x: MathArray|Matrix, size: MathArray|Matrix, defaultValue?: number|string): MathArray|Matrix; + + /** + * Calculate the size of a matrix or scalar. + */ + size(x: boolean|number|Complex|Unit|string|MathArray|Matrix): MathArray|Matrix; + + /** + * Squeeze a matrix, remove inner and outer singleton dimensions from a matrix. + */ + squeeze(x: MathArray|Matrix): Matrix|MathArray; + + /** + * Get or set a subset of a matrix or string. + * @param value An array, matrix, or string + * @param index An index containing ranges for each dimension + * @param replacement An array, matrix, or scalar. If provided, the subset is replaced with replacement. If not provided, the subset is returned + * @param defaultValue Default value, filled in on new entries when the matrix is resized. If not provided, math.matrix elements will be left undefined. Default value: undefined. + */ + subset(value: MathArray|Matrix|string, index: Index, replacement?: any, defaultValue?: any): MathArray|Matrix|string; + + /** + * Calculate the trace of a matrix: the sum of the elements on the main diagonal of a square matrix. + */ + trace(x: MathArray|Matrix): number; + + /** + * Transpose a matrix. All values of the matrix are reflected over its main diagonal. Only two dimensional matrices are supported. + */ + transpose(x: MathArray|Matrix): MathArray|Matrix; + + /** + * Create a matrix filled with zeros. The created matrix can have one or multiple dimensions. + */ + zeros(n: number, format?: string): MathArray|Matrix; + zeros(m: number, n: number, format?: string): MathArray|Matrix; + zeros(size: number[], format?: string): MathArray|Matrix; + + /** + * Compute the number of ways of picking k unordered outcomes from n possibilities. + * Combinations only takes integer arguments. The following condition must be enforced: k <= n. + */ + combinations(n: number|BigNumber, k: number|BigNumber): number|BigNumber; + + /** + * Create a distribution object with a set of random functions for given random distribution. + * @param name Name of a distribution. Choose from 'uniform', 'normal'. + */ + distribution(name: string): Distribution; + + /** + * Compute the factorial of a value + * Factorial only supports an integer value as argument. For matrices, the function is evaluated element wise. + */ + factorial(n: number|BigNumber|MathArray|Matrix): number|BigNumber|MathArray|Matrix; + + /** + * Compute the gamma function of a value using Lanczos approximation for small values, and an extended + * Stirling approximation for large values. + * For matrices, the function is evaluated element wise. + */ + gamma(n: number|MathArray|Matrix): number|MathArray|Matrix; + + /** + * Calculate the Kullback-Leibler (KL) divergence between two distributions + */ + kldivergence(x: MathArray|Matrix, y: MathArray|Matrix): number; + + /** + * Multinomial Coefficients compute the number of ways of picking a1, a2, ..., ai unordered outcomes from n possibilities. + * multinomial takes one array of integers as an argument. The following condition must be enforced: every ai <= 0 + */ + multinomial(a: number[]|BigNumber[]): number|BigNumber; + + /** + * Compute the number of ways of obtaining an ordered subset of k elements from a set of n elements. + * Permutations only takes integer arguments. The following condition must be enforced: k <= n. + * @param n The number of objects in total + * @param k The number of objects in the subset + */ + permutations(n: number|BigNumber, k?:number|BigNumber): number|BigNumber; + + /** + * Random pick a value from a one dimensional array. Array element is picked using a random function with uniform distribution. + */ + pickRandom(array: number[]): number; + + /** + * Return a random number larger or equal to min and smaller than max using a uniform distribution. + */ + random(): number; + random(max: number): number; + random(min: number, max: number): number; + random(size: MathArray|Matrix, max?: number): MathArray|Matrix; + random(size: MathArray|Matrix, min:number, max: number): MathArray|Matrix; + + /** + * Return a random integer number larger or equal to min and smaller than max using a uniform distribution. + */ + randomInt(max: number): number; + randomInt(min: number, max: number): number; + randomInt(size: MathArray|Matrix, max?: number): MathArray|Matrix; + randomInt(size: MathArray|Matrix, min:number, max: number): MathArray|Matrix; + + /** + * Compare two values. Returns 1 when x > y, -1 when x < y, and 0 when x == y. + * x and y are considered equal when the relative difference between x and y is smaller than the configured epsilon. + * The function cannot be used to compare values smaller than approximately 2.22e-16. + * For matrices, the function is evaluated element wise. + */ + compare(x: MathType, y: MathType): number|BigNumber|Fraction|MathArray|Matrix; + + /** + * Test element wise whether two matrices are equal. The function accepts both matrices and scalar values. + */ + deepEqual(x: MathType, y: MathType): number|BigNumber|Fraction|Complex|Unit|MathArray|Matrix; + + /** + * Test whether two values are equal. + * + * The function tests whether the relative difference between x and y is smaller than the configured epsilon. + * The function cannot be used to compare values smaller than approximately 2.22e-16. + * + * For matrices, the function is evaluated element wise. In case of complex numbers, x.re must equal y.re, and x.im must equal y.im. + * + * Values null and undefined are compared strictly, thus null is only equal to null and nothing else, and undefined is only equal to undefined and nothing else. + */ + equal(x: MathType, y: MathType): boolean|MathArray|Matrix; + + /** + * Test whether value x is larger than y. + * + * The function returns true when x is larger than y and the relative difference between x and y is larger than the configured epsilon. + * The function cannot be used to compare values smaller than approximately 2.22e-16. + * + * For matrices, the function is evaluated element wise. + */ + larger(x: MathType, y: MathType): boolean|MathArray|Matrix; + + /** + * Test whether value x is larger or equal to y. + * + * The function returns true when x is larger than y or the relative difference between x and y is smaller than the configured epsilon. + * The function cannot be used to compare values smaller than approximately 2.22e-16. + * + * For matrices, the function is evaluated element wise. + */ + largerEq(x: MathType, y: MathType): boolean|MathArray|Matrix; + + /** + * Test whether value x is smaller than y. + * + * The function returns true when x is smaller than y and the relative difference between x and y is smaller than the configured epsilon. + * The function cannot be used to compare values smaller than approximately 2.22e-16. + * + * For matrices, the function is evaluated element wise. + */ + smaller(x: MathType, y: MathType): boolean|MathArray|Matrix; + + /** + * Test whether value x is smaller or equal to y. + * + * The function returns true when x is smaller than y or the relative difference between x and y is smaller than the configured epsilon. + * The function cannot be used to compare values smaller than approximately 2.22e-16. For matrices, the function is evaluated element wise. + */ + smallerEq(x: MathType, y: MathType): boolean|MathArray|Matrix; + + /** + * Test whether two values are unequal. + * + * The function tests whether the relative difference between x and y is larger than the configured epsilon. The function cannot + * be used to compare values smaller than approximately 2.22e-16. + * + * For matrices, the function is evaluated element wise. In case of complex numbers, x.re must unequal y.re, or x.im must unequal y.im. + * + * Values null and undefined are compared strictly, thus null is unequal with everything except null, and undefined is unequal with + * everying except. undefined. + */ + unequal(x: MathType, y: MathType): boolean|MathArray|Matrix; + + /** + * Compute the maximum value of a matrix or a list with values. In case of a multi dimensional array, the maximum of the flattened + * array will be calculated. When dim is provided, the maximum over the selected dimension will be calculated. Parameter dim is zero-based. + */ + max(...args: MathType[]): any; + max(A: MathArray|Matrix, dim?: number): any; + + /** + * Compute the mean value of matrix or a list with values. In case of a multi dimensional array, the mean of the flattened array will be + * calculated. When dim is provided, the maximum over the selected dimension will be calculated. Parameter dim is zero-based. + */ + mean(...args: MathType[]): any; + mean(A: MathArray|Matrix, dim?: number): any; + + /** + * Compute the median of a matrix or a list with values. The values are sorted and the middle value is returned. In case of an + * even number of values, the average of the two middle values is returned. Supported types of values are: Number, BigNumber, Unit + * + * In case of a (multi dimensional) array or matrix, the median of all elements will be calculated. + */ + median(...args: MathType[]): any; + + /** + * Compute the maximum value of a matrix or a list of values. In case of a multi dimensional array, the maximum of the flattened + * array will be calculated. When dim is provided, the maximum over the selected dimension will be calculated. Parameter dim is zero-based. + */ + min(...args: MathType[]): any; + min(A: MathArray|Matrix, dim?: number): any; + + /** + * Computes the mode of a set of numbers or a list with values(numbers or characters). If there are more than one modes, it returns a list of those values. + */ + mode(...args: MathType[]): any; + + /** + * Compute the product of a matrix or a list with values. In case of a (multi dimensional) array or matrix, the sum of all elements will be calculated. + */ + prod(...args: MathType[]): any; + + /** + * Compute the prob order quantile of a matrix or a list with values. The sequence is sorted and the middle value is returned. + * Supported types of sequence values are: Number, BigNumber, Unit Supported types of probability are: Number, BigNumber + * + * In case of a (multi dimensional) array or matrix, the prob order quantile of all elements will be calculated. + */ + quantileSeq(A: MathArray|Matrix, prob: Number|BigNumber|MathArray, sorted?: boolean): Number|BigNumber|Unit|MathArray; + + /** + * Compute the standard deviation of a matrix or a list with values. The standard deviations is defined as the square root of the + * variance: std(A) = sqrt(var(A)). In case of a (multi dimensional) array or matrix, the standard deviation over all elements will + * be calculated. + * + * Optionally, the type of normalization can be specified as second parameter. The parameter normalization can be one of the following + * values: + * + * 'unbiased' (default) The sum of squared errors is divided by (n - 1) + * 'uncorrected' The sum of squared errors is divided by n + * 'biased' The sum of squared errors is divided by (n + 1) + */ + std(array: MathArray|Matrix, normalization?: string): number; + + /** + * Compute the sum of a matrix or a list with values. In case of a (multi dimensional) array or matrix, the sum of all elements will be calculated. + */ + sum(...args: (Number|BigNumber|Fraction)[]): any; + sum(array: MathArray|Matrix): any; + + /** + * Compute the variance of a matrix or a list with values. In case of a (multi dimensional) array or matrix, the variance over all + * elements will be calculated. + * + * Optionally, the type of normalization can be specified as second parameter. The parameter normalization can be one of the + * following values: + * + * 'unbiased' (default) The sum of squared errors is divided by (n - 1) + * 'uncorrected' The sum of squared errors is divided by n + * 'biased' The sum of squared errors is divided by (n + 1) + * Note that older browser may not like the variable name var. In that case, the function can be called as math['var'](...) + * instead of math.var(...). + */ + var(...args: (Number|BigNumber|Fraction)[]): any; + var(array: MathArray|Matrix, normalization?: string): any; + + /** + * Calculate the inverse cosine of a value. For matrices, the function is evaluated element wise. + */ + acos(x: number): number; + acos(x: BigNumber): BigNumber; + acos(x: Complex): Complex; + acos(x: MathArray): MathArray; + acos(x: Matrix): Matrix; + + /** + * Calculate the hyperbolic arccos of a value, defined as acosh(x) = ln(sqrt(x^2 - 1) + x). + * For matrices, the function is evaluated element wise. + */ + acosh(x: number): number; + acosh(x: BigNumber): BigNumber; + acosh(x: Complex): Complex; + acosh(x: MathArray): MathArray; + acosh(x: Matrix): Matrix; + + /** + * Calculate the inverse cotangent of a value. For matrices, the function is evaluated element wise. + */ + acot(x: number): number; + acot(x: BigNumber): BigNumber; + acot(x: MathArray): MathArray; + acot(x: Matrix): Matrix; + + /** + * Calculate the hyperbolic arccotangent of a value, defined as acoth(x) = (ln((x+1)/x) + ln(x/(x-1))) / 2. + * For matrices, the function is evaluated element wise. + */ + acoth(x: number): number; + acoth(x: BigNumber): BigNumber; + acoth(x: MathArray): MathArray; + acoth(x: Matrix): Matrix; + + /** + * Calculate the inverse cosecant of a value. For matrices, the function is evaluated element wise. + */ + acsc(x: number): number; + acsc(x: BigNumber): BigNumber; + acsc(x: MathArray): MathArray; + acsc(x: Matrix): Matrix; + + /** + * Calculate the hyperbolic arccosecant of a value, defined as acsch(x) = ln(1/x + sqrt(1/x^2 + 1)). + * For matrices, the function is evaluated element wise. + */ + acsch(x: number): number; + acsch(x: BigNumber): BigNumber; + acsch(x: MathArray): MathArray; + acsch(x: Matrix): Matrix; + + /** + * Calculate the inverse secant of a value. For matrices, the function is evaluated element wise. + */ + asec(x: number): number; + asec(x: BigNumber): BigNumber; + asec(x: MathArray): MathArray; + asec(x: Matrix): Matrix; + + /** + * Calculate the hyperbolic arcsecant of a value, defined as asech(x) = ln(sqrt(1/x^2 - 1) + 1/x). For matrices, the function is evaluated element wise. + */ + asech(x: number): number; + asech(x: BigNumber): BigNumber; + asech(x: MathArray): MathArray; + asech(x: Matrix): Matrix; + + /** + * Calculate the inverse sine of a value. For matrices, the function is evaluated element wise. + */ + asin(x: number): number; + asin(x: BigNumber): BigNumber; + asin(x: Complex): Complex; + asin(x: MathArray): MathArray; + asin(x: Matrix): Matrix; + + /** + * Calculate the hyperbolic arcsine of a value, defined as asinh(x) = ln(x + sqrt(x^2 + 1)). For matrices, the function is evaluated element wise. + */ + asinh(x: number): number; + asinh(x: BigNumber): BigNumber; + asinh(x: MathArray): MathArray; + asinh(x: Matrix): Matrix; + + /** + * Calculate the inverse tangent of a value. For matrices, the function is evaluated element wise. + */ + atan(x: number): number; + atan(x: BigNumber): BigNumber; + atan(x: MathArray): MathArray; + atan(x: Matrix): Matrix; + + /** + * Calculate the inverse tangent function with two arguments, y/x. By providing two arguments, the right quadrant of the + * computed angle can be determined. + * + * For matrices, the function is evaluated element wise. + */ + atan2(y: number, x: number): number; + atan2(y: MathArray|Matrix, x: MathArray|Matrix): MathArray|Matrix; + + /** + * Calculate the hyperbolic arctangent of a value, defined as atanh(x) = ln((1 + x)/(1 - x)) / 2. + * For matrices, the function is evaluated element wise. + */ + atanh(x: number): number; + atanh(x: BigNumber): BigNumber; + atanh(x: MathArray): MathArray; + atanh(x: Matrix): Matrix; + + /** + * Calculate the cosine of a value. For matrices, the function is evaluated element wise. + */ + asin(x: number): number; + asin(x: BigNumber): BigNumber; + asin(x: Complex): Complex; + asin(x: Unit): number; + asin(x: MathArray): MathArray; + asin(x: Matrix): Matrix; + + /** + * Calculate the hyperbolic cosine of a value, defined as cosh(x) = 1/2 * (exp(x) + exp(-x)). For matrices, the function is evaluated element wise. + */ + cosh(x: number): number; + cosh(x: BigNumber): BigNumber; + cosh(x: Complex): Complex; + cosh(x: Unit): number; + cosh(x: MathArray): MathArray; + cosh(x: Matrix): Matrix; + + /** + * Calculate the cotangent of a value. cot(x) is defined as 1 / tan(x). For matrices, the function is evaluated element wise. + */ + cot(x: number): number; + cot(x: Complex): Complex; + cot(x: Unit): number; + cot(x: MathArray): MathArray; + cot(x: Matrix): Matrix; + + /** + * Calculate the hyperbolic cotangent of a value, defined as coth(x) = 1 / tanh(x). For matrices, the function is evaluated element wise. + */ + coth(x: number): number; + coth(x: Complex): Complex; + coth(x: Unit): number; + coth(x: MathArray): MathArray; + coth(x: Matrix): Matrix; + + /** + * Calculate the cosecant of a value, defined as csc(x) = 1/sin(x). For matrices, the function is evaluated element wise. + */ + csc(x: number): number; + csc(x: Complex): Complex; + csc(x: Unit): number; + csc(x: MathArray): MathArray; + csc(x: Matrix): Matrix; + + /** + * Calculate the hyperbolic cosecant of a value, defined as csch(x) = 1 / sinh(x). For matrices, the function is evaluated element wise. + */ + csch(x: number): number; + csch(x: Complex): Complex; + csch(x: Unit): number; + csch(x: MathArray): MathArray; + csch(x: Matrix): Matrix; + + /** + * Calculate the secant of a value, defined as sec(x) = 1/cos(x). For matrices, the function is evaluated element wise. + */ + sec(x: number): number; + sec(x: Complex): Complex; + sec(x: Unit): number; + sec(x: MathArray): MathArray; + sec(x: Matrix): Matrix; + + /** + * Calculate the hyperbolic secant of a value, defined as sech(x) = 1 / cosh(x). For matrices, the function is evaluated element wise. + */ + sech(x: number): number; + sech(x: Complex): Complex; + sech(x: Unit): number; + sech(x: MathArray): MathArray; + sech(x: Matrix): Matrix; + + /** + * Calculate the sine of a value. For matrices, the function is evaluated element wise. + */ + sin(x: number): number; + sin(x: BigNumber): BigNumber; + sin(x: Complex): Complex; + sin(x: Unit): number; + sin(x: MathArray): MathArray; + sin(x: Matrix): Matrix; + + /** + * Calculate the hyperbolic sine of a value, defined as sinh(x) = 1/2 * (exp(x) - exp(-x)). For matrices, the function is evaluated element wise. + */ + sinh(x: number): number; + sinh(x: BigNumber): BigNumber; + sinh(x: Complex): Complex; + sinh(x: Unit): number; + sinh(x: MathArray): MathArray; + sinh(x: Matrix): Matrix; + + /** + * Calculate the tangent of a value. tan(x) is equal to sin(x) / cos(x). For matrices, the function is evaluated element wise. + */ + tan(x: number): number; + tan(x: BigNumber): BigNumber; + tan(x: Complex): Complex; + tan(x: Unit): number; + tan(x: MathArray): MathArray; + tan(x: Matrix): Matrix; + + /** + * Calculate the hyperbolic tangent of a value, defined as tanh(x) = (exp(2 * x) - 1) / (exp(2 * x) + 1). For matrices, the function is evaluated element wise. + */ + tanh(x: number): number; + tanh(x: BigNumber): BigNumber; + tanh(x: Complex): Complex; + tanh(x: Unit): number; + tanh(x: MathArray): MathArray; + tanh(x: Matrix): Matrix; + + /** + * Change the unit of a value. For matrices, the function is evaluated element wise. + * @param x The unit to be converted. + * @param unit New unit. Can be a string like "cm" or a unit without value. + */ + to(x: Unit|MathArray|Matrix, unit: Unit|string): Unit|MathArray|Matrix + + /** + * Clone an object. + */ + clone(x: any): any; + + /** + * Filter the items in an array or one dimensional matrix. + * @param x A one dimensional matrix or array to filter + * @param test + */ + filter(x: MathArray|Matrix, test: RegExp|((item: any)=>boolean)): MathArray|Matrix; + + /** + * Iterate over all elements of a matrix/array, and executes the given callback function. + * @param x The matrix to iterate on. + * @param callback The callback function is invoked with three parameters: the value of the element, the index of the element, and the Matrix/array being traversed. + */ + forEach(x: MathArray|Matrix, callback: (item: any)=>any): void; + + /** + * Format a value of any type into a string. + * @param value The value to be formatted + */ + format(value: any, options?: IFormatOptions|number|((item: any)=>string)): string; + + /** + * Test whether a value is an integer number. The function supports number, BigNumber, and Fraction. + * The function is evaluated element-wise in case of Array or Matrix input. + */ + isInteger(x: any): boolean; + + /** + * Test whether a value is negative: smaller than zero. The function supports types number, BigNumber, Fraction, and Unit. + * The function is evaluated element-wise in case of Array or Matrix input. + */ + isNegative(x: any): boolean; + + /** + * Test whether a value is an numeric value. The function is evaluated element-wise in case of Array or Matrix input. + */ + isNumeric(x: any): boolean; + + /** + * Test whether a value is positive: larger than zero. The function supports types number, BigNumber, Fraction, and Unit. + * The function is evaluated element-wise in case of Array or Matrix input. + */ + isPositive(x: any): boolean; + + /** + * Test whether a value is zero. The function can check for zero for types number, BigNumber, Fraction, Complex, and Unit. + * The function is evaluated element-wise in case of Array or Matrix input. + */ + isZero(x: any): boolean; + + /** + * Create a new matrix or array with the results of the callback function executed on each entry of the matrix/array. + * @param x The matrix to iterate on. + * @param callback The callback method is invoked with three parameters: the value of the element, the index of the element, and the matrix being traversed. + */ + map(x: MathArray|Matrix, callback: (item: any)=>any): MathArray|Matrix; + + /** + * Partition-based selection of an array or 1D matrix. Will find the kth smallest value, and mutates the input array. Uses Quickselect. + * @param x A one dimensional matrix or array to sort + * @param k The kth smallest value to be retrieved; zero-based index + * @param compare An optional comparator function. The function is called as compare(a, b), and must return 1 when a > b, -1 when a < b, and 0 when a == b. Default value: 'asc'. + * @returns Returns the kth lowest value. + */ + partitionSelect(x: MathArray|Matrix, k: number, compare?: string|((a: any, b: any)=>number)): any; + + /** + * Interpolate values into a string template. + * @param template A string containing variable placeholders. + * @param values An object containing variables which will be filled in in the template. + * @param precision Number of digits to format numbers. If not provided, the value will not be rounded. + */ + print(template:string, values: any, precision?: number): void; + + /** + * Sort the items in a matrix. + * @param x A one dimensional matrix or array to sort + * @param compare An optional comparator function. The function is called as compare(a, b), and must return 1 when a > b, -1 when a < b, and 0 when a == b. Default value: 'asc'. + */ + sort(x: MathArray|Matrix, compare?: string|((a: any, b: any)=>number)): MathArray|Matrix; + + /** + * Determine the type of a variable. + */ + typeof(x: any): string; + } + + export interface Matrix { + size(): number[]; + subset(index: Index, replacement?: any, defaultValue?: any): Matrix; + resize(size: MathArray|Matrix, defaultValue?: number|string): Matrix; + clone(): Matrix; + } + + export interface BigNumber { + + } + + export interface Fraction { + + } + + export interface Complex { + re: number; + im: number; + toPolar(): IPolarCoordinates; + clone(): Complex; + } + + export interface IPolarCoordinates { + r: number; + phi: number; + } + + export interface Unit { + to(unit: string): Unit; + toNumber(unit: string): number; + } + + export interface Index { + + } + + export interface EvalFunction { + eval(scope?: any): any; + } + + export interface MathNode { + compile(): EvalFunction; + eval(): any; + } + + export interface Parser { + eval(expr: string): any; + get(variable: string): any; + set(variable: string, value: any): void; + clear(): void; + } + + export interface Distribution { + random(size: any, min?: any, max?: any): any; + randomInt(min: any, max?: any): any; + pickRandom(array: any): any; + } + + export interface IFormatOptions { + /** + * Number notation. Choose from: + * 'fixed' Always use regular number notation. For example '123.40' and '14000000' + * 'exponential' Always use exponential notation. For example '1.234e+2' and '1.4e+7' + * 'auto' (default) Regular number notation for numbers having an absolute value between lower and upper bounds, and + * uses exponential notation elsewhere. Lower bound is included, upper bound is excluded. For example '123.4' and '1.4e7'. + */ + notation?: string; + + /** + * A number between 0 and 16 to round the digits of the number. In case of notations 'exponential' and 'auto', + * precision defines the total number of significant digits returned and is undefined by default. In case of notation 'fixed', + * precision defines the number of significant digits after the decimal point, and is 0 by default. + */ + precision?: number; + + /** + * An object containing two parameters, {number} lower and {number} upper, used by notation 'auto' to determine + * when to return exponential notation. Default values are lower=1e-3 and upper=1e5. Only applicable for notation auto. + */ + exponential?: {lower: number; upper: number}; + + /** + * Available values: 'ratio' (default) or 'decimal'. For example format(fraction(1, 3)) will output '1/3' when 'ratio' + * is configured, and will output 0.(3) when 'decimal' is configured. + */ + fraction?: string; + + /** + * A custom formatting function. Can be used to override the built-in notations. Function fn is called with + * value as parameter and must return a string. Is useful for example to format all values inside a matrix in a particular way. + * */ + fn?: (item: any)=>string; + } + + export interface Help { + toString(): string; + toJSON(): string; + } + + export interface IMathJsChain { + /** + * Solves the linear equation system by forwards substitution. Matrix must be a lower triangular matrix. + * @param b A column vector with the b values + */ + lsolve(b: Matrix|MathArray): IMathJsChain; + + /** + * Calculate the Matrix LU decomposition with partial pivoting. Matrix A is decomposed in two matrices (L, U) + * and a row permutation vector p where A[p,:] = L * U + */ + lup(): IMathJsChain; + + /** + * Solves the linear system A * x = b where A is an [n x n] matrix and b is a [n] column vector. + * @param b Column Vector + */ + lusolve(b: Matrix|MathArray): IMathJsChain; + + /** + * Calculate the Sparse Matrix LU decomposition with full pivoting. Sparse Matrix A is decomposed in + * two matrices (L, U) and two permutation vectors (pinv, q) where P * A * Q = L * U + * @param order The Symbolic Ordering and Analysis order: 0 - Natural ordering, no permutation vector q is + * returned 1 - Matrix must be square, symbolic ordering and analisis is performed on M = A + A' 2 - Symbolic + * ordering and analisis is performed on M = A' * A. Dense columns from A' are dropped, A recreated from A'. + * This is appropriatefor LU factorization of unsymmetric matrices. 3 - Symbolic ordering and analisis is performed + * on M = A' * A. This is best used for LU factorization is matrix M has no dense rows. A dense row is a row with + * more than 10*sqr(columns) entries. + * @param threshold Partial pivoting threshold (1 for partial pivoting) + * @returns The lower triangular matrix, the upper triangular matrix and the permutation vectors. + */ + slu(order: Number, threshold: Number): IMathJsChain; + + /** + * Solves the linear equation system by backward substitution. Matrix must be an upper triangular matrix. U * x = b + * @param b A column vector with the b values + * @returns A column vector with the linear system solution (x) + */ + usolve(b:Matrix|MathArray): IMathJsChain; + + /** + * Calculate the absolute value of a number. For matrices, the function is evaluated element wise. + */ + abs(): IMathJsChain; + + /** + * Add two values, x + y. For matrices, the function is evaluated element wise. + * @param y Second value to add + */ + add(y: MathType): IMathJsChain; + + /** + * Calculate the cubic root of a value. For matrices, the function is evaluated element wise. + * @param allRoots Optional, false by default. Only applicable when x is a number or complex number. If true, all complex roots are returned, if false (default) the principal root is returned. + */ + cbrt(allRoots?: boolean): IMathJsChain; + + /** + * Round a value towards plus infinity If x is complex, both real and imaginary part are rounded towards plus infinity. For matrices, the function is evaluated element wise. + */ + ceil(): IMathJsChain; + + /** + * Compute the cube of a value, x * x * x. For matrices, the function is evaluated element wise. + */ + cube(): IMathJsChain; + + /** + * Divide two values, x / y. To divide matrices, x is multiplied with the inverse of y: x * inv(y). + * @param y Denominator + */ + divide(y:MathType): IMathJsChain; + + /** + * Divide two matrices element wise. The function accepts both matrices and scalar values. + * @param y Denominator + */ + dotDivide(y: MathType): IMathJsChain; + + /** + * Multiply two matrices element wise. The function accepts both matrices and scalar values. + * @param y Right hand value + */ + dotMultiply(y: MathType): IMathJsChain; + + /** + * Calculates the power of x to y element wise. + * @param y The exponent + */ + dotPow(y: MathType): IMathJsChain; + + /** + * Calculate the exponent of a value. For matrices, the function is evaluated element wise. + */ + exp(): IMathJsChain; + + /** + * Round a value towards zero. For matrices, the function is evaluated element wise. + */ + fix(): IMathJsChain; + + /** + * Round a value towards minus infinity. For matrices, the function is evaluated element wise. + */ + floor(): IMathJsChain; + + /** + * Calculate the greatest common divisor for two or more values or arrays. For matrices, the function is evaluated element wise. + */ + gcd(...args: number[]): IMathJsChain; + gcd(...args: BigNumber[]): IMathJsChain ; + gcd(...args: Fraction[]): IMathJsChain ; + gcd(...args: MathArray[]): IMathJsChain ; + gcd(...args: Matrix[]): IMathJsChain; + + /** + * Calculate the hypotenusa of a list with values. The hypotenusa is defined as: + * hypot(a, b, c, ...) = sqrt(a^2 + b^2 + c^2 + ...) + * For matrix input, the hypotenusa is calculated for all values in the matrix. + */ + hypot(...args: number[]): IMathJsChain; + hypot(...args: BigNumber[]): IMathJsChain; + + /** + * Calculate the least common multiple for two or more values or arrays. lcm is defined as: + * lcm(a, b) = abs(a * b) / gcd(a, b) + * For matrices, the function is evaluated element wise. + */ + lcm(b: number): IMathJsChain; + lcm(b: BigNumber ): IMathJsChain ; + lcm(b: MathArray): IMathJsChain; + lcm(b: Matrix): IMathJsChain; + + /** + * Calculate the logarithm of a value. For matrices, the function is evaluated element wise. + * @param base Optional base for the logarithm. If not provided, the natural logarithm of x is calculated. Default value: e. + */ + log(base?: number|BigNumber|Complex): IMathJsChain; + + /** + * Calculate the 10-base of a value. This is the same as calculating log(x, 10). For matrices, the function is evaluated element wise. + */ + log10(): IMathJsChain; + + /** + * Calculates the modulus, the remainder of an integer division. For matrices, the function is evaluated element wise. + * The modulus is defined as: + * x - y * floor(x / y) + * See http://en.wikipedia.org/wiki/Modulo_operation. + * @param y Divisor + */ + mod(y: number|BigNumber|Fraction|MathArray|Matrix): IMathJsChain; + + /** + * Multiply two values, x * y. The result is squeezed. For matrices, the matrix product is calculated. + */ + multiply(y: MathType): IMathJsChain; + + /** + * Calculate the norm of a number, vector or matrix. The second parameter p is optional. If not provided, it defaults to 2. + * @param p Vector space. Supported numbers include Infinity and -Infinity. Supported strings are: 'inf', '-inf', and 'fro' (The Frobenius norm) Default value: 2. + */ + norm(p?: number|BigNumber|string): IMathJsChain; + + /** + * Calculate the nth root of a value. The principal nth root of a positive real number A, is the positive real solution of the equation + * x^root = A + * For matrices, the function is evaluated element wise. + * @param root The root. Default value: 2. + */ + nthRoot(root?: number|BigNumber): IMathJsChain; + + /** + * Calculates the power of x to y, x ^ y. Matrix exponentiation is supported for square matrices x, and positive integer exponents y. + * @param y The exponent + */ + pow(y: number|BigNumber|Complex): IMathJsChain; + + /** + * Round a value towards the nearest integer. For matrices, the function is evaluated element wise. + * @param n Number of decimals Default value: 0. + */ + round(n?: number|BigNumber|MathArray): IMathJsChain; + + /** + * Compute the sign of a value. The sign of a value x is: + * 1 when x > 1 + * -1 when x < 0 + * 0 when x == 0 + * For matrices, the function is evaluated element wise. + */ + sign(): IMathJsChain; + + /** + * Calculate the square root of a value. For matrices, the function is evaluated element wise. + */ + sqrt(): IMathJsChain; + + /** + * Compute the square of a value, x * x. For matrices, the function is evaluated element wise. + */ + square(): IMathJsChain; + + /** + * Subtract two values, x - y. For matrices, the function is evaluated element wise. + */ + subtract(y: MathType): IMathJsChain; + + /** + * Inverse the sign of a value, apply a unary minus operation. + * For matrices, the function is evaluated element wise. Boolean values and strings will be converted to a number. For complex numbers, both real and complex value are inverted. + */ + unaryMinus(): IMathJsChain; + + /** + * Unary plus operation. Boolean values and strings will be converted to a number, numeric values will be returned as is. + * For matrices, the function is evaluated element wise. + */ + unaryPlus(): IMathJsChain; + + /** + * Calculate the extended greatest common divisor for two values. See http://en.wikipedia.org/wiki/Extended_Euclidean_algorithm. + */ + xgcd(b: number|BigNumber): IMathJsChain; + + /** + * Bitwise AND two values, x & y. For matrices, the function is evaluated element wise. + */ + bitAnd(y: number|BigNumber|MathArray|Matrix): IMathJsChain; + + /** + * Bitwise NOT value, ~x. For matrices, the function is evaluated element wise. For units, the function is evaluated on the best prefix base. + */ + bitNot(): IMathJsChain; + + /** + * Bitwise OR two values, x | y. For matrices, the function is evaluated element wise. For units, the function is evaluated on the lowest print base. + */ + bitOr(): IMathJsChain; + + /** + * Bitwise XOR two values, x ^ y. For matrices, the function is evaluated element wise. + */ + bitXor(y: number|BigNumber|MathArray|Matrix): IMathJsChain; + + /** + * Bitwise left logical shift of a value x by y number of bits, x << y. For matrices, the function is evaluated element wise. For units, the function is evaluated on the best prefix base. + * @param x Value to be shifted + * @param y Amount of shifts + */ + leftShift(y: number|BigNumber): IMathJsChain; + + /** + * Bitwise right arithmetic shift of a value x by y number of bits, x >> y. For matrices, the function is evaluated element wise. For units, the function is evaluated on the best prefix base. + * @param x Value to be shifted + * @param y Amount of shifts + */ + rightArithShift(y: number|BigNumber): IMathJsChain; + + /** + * Bitwise right logical shift of value x by y number of bits, x >>> y. For matrices, the function is evaluated element wise. For units, the function is evaluated on the best prefix base. + * @param x Value to be shifted + * @param y Amount of shifts + */ + rightLogShift(y: number): IMathJsChain; + + /** + * The Bell Numbers count the number of partitions of a set. A partition is a pairwise disjoint subset of S whose union is S. bellNumbers only takes integer arguments. The following condition must be enforced: n >= 0 + * @param n Total number of objects in the set + */ + bellNumbers(): IMathJsChain; + + /** + * The Catalan Numbers enumerate combinatorial structures of many different types. catalan only takes integer arguments. The following condition must be enforced: n >= 0 + * @pararm n nth Catalan number + */ + catalan(): IMathJsChain; + + /** + * The composition counts of n into k parts. Composition only takes integer arguments. The following condition must be enforced: k <= n. + * @param n Total number of objects in the set + * @param k Number of objects in the subset + * @returns Returns the composition counts of n into k parts. + */ + composition(k: Number|BigNumber): IMathJsChain; + + /** + * The Stirling numbers of the second kind, counts the number of ways to partition a set of n labelled objects into k nonempty unlabelled subsets. stirlingS2 only takes integer arguments. The following condition must be enforced: k <= n. + * If n = k or k = 1, then s(n,k) = 1 + * @param n Total number of objects in the set + * @param k Number of objects in the subset + */ + stirlingS2(k: Number|BigNumber): IMathJsChain; + + /** + * Compute the argument of a complex value. For a complex number a + bi, the argument is computed as atan2(b, a). For matrices, the function is evaluated element wise. + * @param x A complex number or array with complex numbers + */ + arg(): IMathJsChain; + + /** + * Compute the complex conjugate of a complex value. If x = a+bi, the complex conjugate of x is a - bi. For matrices, the function is evaluated element wise. + * @param x A complex number or array with complex numbers + */ + conj(): IMathJsChain; + + /** + * Get the imaginary part of a complex number. For a complex number a + bi, the function returns b. + * For matrices, the function is evaluated element wise. + */ + im(): IMathJsChain; + + /** + * Get the real part of a complex number. For a complex number a + bi, the function returns a. + * For matrices, the function is evaluated element wise. + */ + re(): IMathJsChain; + + /** + * Calculates: The eucledian distance between two points in 2 and 3 dimensional spaces. Distance between point + * and a line in 2 and 3 dimensional spaces. Pairwise distance between a set of 2D or 3D points NOTE: When + * substituting coefficients of a line(a, b and c), use ax + by + c = 0 instead of ax + by = c For parametric + * equation of a 3D line, x0, y0, z0, a, b, c are from: (x−x0, y−y0, z−z0) = t(a, b, c) + */ + distance(y: MathArray|Matrix|any): IMathJsChain; + + /** + * Calculates the point of intersection of two lines in two or three dimensions and of a line and a plane in + * three dimensions. The inputs are in the form of arrays or 1 dimensional matrices. The line intersection functions + * return null if the lines do not meet. + * Note: Fill the plane coefficients as x + y + z = c and not as x + y + z + c = 0. + * @param w Co-ordinates of first end-point of first line + * @param x Co-ordinates of second end-point of first line + * @param y Co-ordinates of first end-point of second line OR Co-efficients of the plane's equation + * @param z Co-ordinates of second end-point of second line OR null if the calculation is for line and plane + * @returns Returns the point of intersection of lines/lines-planes + */ + intersect(x: MathArray|Matrix, y: MathArray|Matrix, z: MathArray|Matrix): IMathJsChain; + + /** + * Logical and. Test whether two values are both defined with a nonzero/nonempty value. For matrices, the function is evaluated element wise. + */ + and(y: number|BigNumber|Complex|Unit|MathArray|Matrix): IMathJsChain; + + /** + * Logical not. Flips boolean value of a given parameter. For matrices, the function is evaluated element wise. + */ + not(): IMathJsChain; + + /** + * Logical or. Test if at least one value is defined with a nonzero/nonempty value. For matrices, the function is evaluated element wise. + */ + or(y: number|BigNumber|Complex|Unit|MathArray|Matrix): IMathJsChain; + + /** + * Logical xor. Test whether one and only one value is defined with a nonzero/nonempty value. For matrices, the function is evaluated element wise. + */ + xor(y: number|BigNumber|Complex|Unit|MathArray|Matrix): IMathJsChain; + + /** + * Calculate the cross product for two vectors in three dimensional space. The cross product of A = [a1, a2, a3] + * and B =[b1, b2, b3] is defined as: + * cross(A, B) = [ a2 * b3 - a3 * b2, a3 * b1 - a1 * b3, a1 * b2 - a2 * b1 ] + */ + cross(y: MathArray|Matrix): IMathJsChain; + + /** + * Calculate the determinant of a matrix. + */ + det(): IMathJsChain; + + /** + * Resize a matrix + * @param x Matrix to be resized + * @param size One dimensional array with numbers + * @param defaultValue Zero by default, except in case of a string, in that case defaultValue = ' ' Default value: 0. + */ + resize(size: MathArray|Matrix, defaultValue?: number|string): IMathJsChain; + + /** + * Calculate the size of a matrix or scalar. + */ + size(): IMathJsChain; + + /** + * Squeeze a matrix, remove inner and outer singleton dimensions from a matrix. + */ + squeeze(): IMathJsChain; + + /** + * Get or set a subset of a matrix or string. + * @param value An array, matrix, or string + * @param index An index containing ranges for each dimension + * @param replacement An array, matrix, or scalar. If provided, the subset is replaced with replacement. If not provided, the subset is returned + * @param defaultValue Default value, filled in on new entries when the matrix is resized. If not provided, math.matrix elements will be left undefined. Default value: undefined. + */ + subset(index: Index, replacement?: any, defaultValue?: any): IMathJsChain; + + /** + * Calculate the trace of a matrix: the sum of the elements on the main diagonal of a square matrix. + */ + trace(): IMathJsChain; + + /** + * Transpose a matrix. All values of the matrix are reflected over its main diagonal. Only two dimensional matrices are supported. + */ + transpose(): IMathJsChain; + + /** + * Random pick a value from a one dimensional array. Array element is picked using a random function with uniform distribution. + */ + pickRandom(): IMathJsChain; + + /** + * Return a random number larger or equal to min and smaller than max using a uniform distribution. + */ + random(): IMathJsChain; + random(max?: number): IMathJsChain; + random(min:number, max: number): IMathJsChain; + + /** + * Return a random integer number larger or equal to min and smaller than max using a uniform distribution. + */ + randomInt(max?: number): IMathJsChain; + randomInt(min:number, max: number): IMathJsChain; + + /** + * Compare two values. Returns 1 when x > y, -1 when x < y, and 0 when x == y. + * x and y are considered equal when the relative difference between x and y is smaller than the configured epsilon. + * The function cannot be used to compare values smaller than approximately 2.22e-16. + * For matrices, the function is evaluated element wise. + */ + compare(y: MathType): IMathJsChain; + + /** + * Test element wise whether two matrices are equal. The function accepts both matrices and scalar values. + */ + deepEqual(y: MathType): IMathJsChain; + + /** + * Test whether two values are equal. + * + * The function tests whether the relative difference between x and y is smaller than the configured epsilon. + * The function cannot be used to compare values smaller than approximately 2.22e-16. + * + * For matrices, the function is evaluated element wise. In case of complex numbers, x.re must equal y.re, and x.im must equal y.im. + * + * Values null and undefined are compared strictly, thus null is only equal to null and nothing else, and undefined is only equal to undefined and nothing else. + */ + equal(y: MathType): IMathJsChain; + + /** + * Test whether value x is larger than y. + * + * The function returns true when x is larger than y and the relative difference between x and y is larger than the configured epsilon. + * The function cannot be used to compare values smaller than approximately 2.22e-16. + * + * For matrices, the function is evaluated element wise. + */ + larger(y: MathType): IMathJsChain; + + /** + * Test whether value x is larger or equal to y. + * + * The function returns true when x is larger than y or the relative difference between x and y is smaller than the configured epsilon. + * The function cannot be used to compare values smaller than approximately 2.22e-16. + * + * For matrices, the function is evaluated element wise. + */ + largerEq(y: MathType): IMathJsChain; + + /** + * Test whether value x is smaller than y. + * + * The function returns true when x is smaller than y and the relative difference between x and y is smaller than the configured epsilon. + * The function cannot be used to compare values smaller than approximately 2.22e-16. + * + * For matrices, the function is evaluated element wise. + */ + smaller(IMathJsChainy: MathType): IMathJsChain; + + /** + * Test whether value x is smaller or equal to y. + * + * The function returns true when x is smaller than y or the relative difference between x and y is smaller than the configured epsilon. + * The function cannot be used to compare values smaller than approximately 2.22e-16. For matrices, the function is evaluated element wise. + */ + smallerEq(IMathJsChainy: MathType): IMathJsChain; + + /** + * Test whether two values are unequal. + * + * The function tests whether the relative difference between x and y is larger than the configured epsilon. The function cannot + * be used to compare values smaller than approximately 2.22e-16. + * + * For matrices, the function is evaluated element wise. In case of complex numbers, x.re must unequal y.re, or x.im must unequal y.im. + * + * Values null and undefined are compared strictly, thus null is unequal with everything except null, and undefined is unequal with + * everying except. undefined. + */ + unequal(IMathJsChainy: MathType): IMathJsChain; + + /** + * Compute the maximum value of a matrix or a list with values. In case of a multi dimensional array, the maximum of the flattened + * array will be calculated. When dim is provided, the maximum over the selected dimension will be calculated. Parameter dim is zero-based. + */ + max(dim?: number): IMathJsChain; + + /** + * Compute the mean value of matrix or a list with values. In case of a multi dimensional array, the mean of the flattened array will be + * calculated. When dim is provided, the maximum over the selected dimension will be calculated. Parameter dim is zero-based. + */ + mean(dim?: number): IMathJsChain; + + /** + * Compute the median of a matrix or a list with values. The values are sorted and the middle value is returned. In case of an + * even number of values, the average of the two middle values is returned. Supported types of values are: Number, BigNumber, Unit + * + * In case of a (multi dimensional) array or matrix, the median of all elements will be calculated. + */ + median(): IMathJsChain; + + /** + * Compute the maximum value of a matrix or a list of values. In case of a multi dimensional array, the maximum of the flattened + * array will be calculated. When dim is provided, the maximum over the selected dimension will be calculated. Parameter dim is zero-based. + */ + min(dim?: number): IMathJsChain; + + /** + * Computes the mode of a set of numbers or a list with values(numbers or characters). If there are more than one modes, it returns a list of those values. + */ + mode(): IMathJsChain; + + /** + * Compute the product of a matrix or a list with values. In case of a (multi dimensional) array or matrix, the sum of all elements will be calculated. + */ + prod(): IMathJsChain; + + /** + * Compute the prob order quantile of a matrix or a list with values. The sequence is sorted and the middle value is returned. + * Supported types of sequence values are: Number, BigNumber, Unit Supported types of probability are: Number, BigNumber + * + * In case of a (multi dimensional) array or matrix, the prob order quantile of all elements will be calculated. + */ + quantileSeq(prob: Number|BigNumber|MathArray, sorted?: boolean): IMathJsChain; + + /** + * Compute the standard deviation of a matrix or a list with values. The standard deviations is defined as the square root of the + * variance: std(A) = sqrt(var(A)). In case of a (multi dimensional) array or matrix, the standard deviation over all elements will + * be calculated. + * + * Optionally, the type of normalization can be specified as second parameter. The parameter normalization can be one of the following + * values: + * + * 'unbiased' (default) The sum of squared errors is divided by (n - 1) + * 'uncorrected' The sum of squared errors is divided by n + * 'biased' The sum of squared errors is divided by (n + 1) + */ + std(normalization?: string): IMathJsChain; + + /** + * Compute the sum of a matrix or a list with values. In case of a (multi dimensional) array or matrix, the sum of all elements will be calculated. + */ + sum(): IMathJsChain; + + /** + * Compute the variance of a matrix or a list with values. In case of a (multi dimensional) array or matrix, the variance over all + * elements will be calculated. + * + * Optionally, the type of normalization can be specified as second parameter. The parameter normalization can be one of the + * following values: + * + * 'unbiased' (default) The sum of squared errors is divided by (n - 1) + * 'uncorrected' The sum of squared errors is divided by n + * 'biased' The sum of squared errors is divided by (n + 1) + * Note that older browser may not like the variable name var. In that case, the function can be called as math['var'](...) + * instead of math.var(...). + */ + var(normalization?: string): IMathJsChain; + + /** + * Calculate the inverse cosine of a value. For matrices, the function is evaluated element wise. + */ + acos(): IMathJsChain; + + /** + * Calculate the hyperbolic arccos of a value, defined as acosh(x) = ln(sqrt(x^2 - 1) + x). + * For matrices, the function is evaluated element wise. + */ + acosh(): IMathJsChain; + + /** + * Calculate the inverse cotangent of a value. For matrices, the function is evaluated element wise. + */ + acot(): IMathJsChain; + + /** + * Calculate the hyperbolic arccotangent of a value, defined as acoth(x) = (ln((x+1)/x) + ln(x/(x-1))) / 2. + * For matrices, the function is evaluated element wise. + */ + acoth(): IMathJsChain; + + /** + * Calculate the inverse cosecant of a value. For matrices, the function is evaluated element wise. + */ + acsc(): IMathJsChain; + + /** + * Calculate the hyperbolic arccosecant of a value, defined as acsch(x) = ln(1/x + sqrt(1/x^2 + 1)). + * For matrices, the function is evaluated element wise. + */ + acsch(): IMathJsChain; + + /** + * Calculate the inverse secant of a value. For matrices, the function is evaluated element wise. + */ + asec(): IMathJsChain; + + /** + * Calculate the hyperbolic arcsecant of a value, defined as asech(x) = ln(sqrt(1/x^2 - 1) + 1/x). For matrices, the function is evaluated element wise. + */ + asech(): IMathJsChain; + + /** + * Calculate the inverse sine of a value. For matrices, the function is evaluated element wise. + */ + asin(): IMathJsChain; + + /** + * Calculate the hyperbolic arcsine of a value, defined as asinh(x) = ln(x + sqrt(x^2 + 1)). For matrices, the function is evaluated element wise. + */ + asinh(): IMathJsChain; + + /** + * Calculate the inverse tangent of a value. For matrices, the function is evaluated element wise. + */ + atan(): IMathJsChain; + + /** + * Calculate the inverse tangent function with two arguments, y/x. By providing two arguments, the right quadrant of the + * computed angle can be determined. + * + * For matrices, the function is evaluated element wise. + */ + atan2(x: number): IMathJsChain; + atan2(x: MathArray|Matrix): IMathJsChain; + + /** + * Calculate the hyperbolic arctangent of a value, defined as atanh(x) = ln((1 + x)/(1 - x)) / 2. + * For matrices, the function is evaluated element wise. + */ + atanh(): IMathJsChain; + + /** + * Calculate the cosine of a value. For matrices, the function is evaluated element wise. + */ + asin(): IMathJsChain; + + /** + * Calculate the hyperbolic cosine of a value, defined as cosh(x) = 1/2 * (exp(x) + exp(-x)). For matrices, the function is evaluated element wise. + */ + cosh(): IMathJsChain; + + /** + * Calculate the cotangent of a value. cot(x) is defined as 1 / tan(x). For matrices, the function is evaluated element wise. + */ + cot(): IMathJsChain; + + /** + * Calculate the hyperbolic cotangent of a value, defined as coth(x) = 1 / tanh(x). For matrices, the function is evaluated element wise. + */ + coth(): IMathJsChain; + + /** + * Calculate the cosecant of a value, defined as csc(x) = 1/sin(x). For matrices, the function is evaluated element wise. + */ + csc(): IMathJsChain; + + /** + * Calculate the hyperbolic cosecant of a value, defined as csch(x) = 1 / sinh(x). For matrices, the function is evaluated element wise. + */ + csch(): IMathJsChain; + + /** + * Calculate the secant of a value, defined as sec(x) = 1/cos(x). For matrices, the function is evaluated element wise. + */ + sec(): IMathJsChain; + + /** + * Calculate the hyperbolic secant of a value, defined as sech(x) = 1 / cosh(x). For matrices, the function is evaluated element wise. + */ + sech(): IMathJsChain; + + /** + * Calculate the sine of a value. For matrices, the function is evaluated element wise. + */ + sin(): IMathJsChain; + + /** + * Calculate the hyperbolic sine of a value, defined as sinh(x) = 1/2 * (exp(x) - exp(-x)). For matrices, the function is evaluated element wise. + */ + sinh(): IMathJsChain; + + /** + * Calculate the tangent of a value. tan(x) is equal to sin(x) / cos(x). For matrices, the function is evaluated element wise. + */ + tan(): IMathJsChain; + + /** + * Calculate the hyperbolic tangent of a value, defined as tanh(x) = (exp(2 * x) - 1) / (exp(2 * x) + 1). For matrices, the function is evaluated element wise. + */ + tanh(): IMathJsChain; + + /** + * Change the unit of a value. For matrices, the function is evaluated element wise. + * @param x The unit to be converted. + * @param unit New unit. Can be a string like "cm" or a unit without value. + */ + to(unit: Unit|string): IMathJsChain; + + /** + * Clone an object. + */ + clone(): IMathJsChain; + + /** + * Filter the items in an array or one dimensional matrix. + * @param x A one dimensional matrix or array to filter + * @param test + */ + filter(test: RegExp|((item: any)=>boolean)): IMathJsChain; + + /** + * Format a value of any type into a string. + */ + format(options?: IFormatOptions|number|((item: any)=>string)): IMathJsChain; + + /** + * Create a new matrix or array with the results of the callback function executed on each entry of the matrix/array. + * @param callback The callback method is invoked with three parameters: the value of the element, the index of the element, and the matrix being traversed. + */ + map(callback: (item: any)=>any): IMathJsChain; + + /** + * Partition-based selection of an array or 1D matrix. Will find the kth smallest value, and mutates the input array. Uses Quickselect. + * @param k The kth smallest value to be retrieved; zero-based index + * @param compare An optional comparator function. The function is called as compare(a, b), and must return 1 when a > b, -1 when a < b, and 0 when a == b. Default value: 'asc'. + * @returns Returns the kth lowest value. + */ + partitionSelect(k: number, compare?: string|((a: any, b: any)=>number)): IMathJsChain; + + /** + * Sort the items in a matrix. + * @param compare An optional comparator function. The function is called as compare(a, b), and must return 1 when a > b, -1 when a < b, and 0 when a == b. Default value: 'asc'. + */ + sort(compare?: string|((a: any, b: any)=>number)): IMathJsChain; + + done(): any; + valueOf(): any; + toString(): string; + } +} \ No newline at end of file diff --git a/method-override/method-override-tests.ts b/method-override/method-override-tests.ts index 84b4e966e0..9023135d18 100644 --- a/method-override/method-override-tests.ts +++ b/method-override/method-override-tests.ts @@ -5,6 +5,7 @@ import methodOverride = require('method-override'); var app = express(); app.use(methodOverride('X-HTTP-Method-Override')); +app.use(methodOverride('X-HTTP-Method-Override', { methods: ["GET", 'POST'] })); app.use(methodOverride((req: express.Request, res: express.Response) => { if (req.body && typeof req.body === 'object' && '_method' in req.body) { // look in urlencoded POST bodies and delete it diff --git a/method-override/method-override.d.ts b/method-override/method-override.d.ts index 099b5eeb9a..22e3b74c1c 100644 --- a/method-override/method-override.d.ts +++ b/method-override/method-override.d.ts @@ -13,12 +13,15 @@ declare module Express { declare module "method-override" { import express = require('express'); - module e { - interface MethodOverrideOptions { + + namespace e { + export interface MethodOverrideOptions { methods: string[]; } } - function e(getter: string, options?: any): express.RequestHandler; - function e(getter: (req: express.Request, res: express.Response) => string, options?: any): express.RequestHandler; + + function e(getter?: string, options?: e.MethodOverrideOptions): express.RequestHandler; + function e(getter?: (req: express.Request, res: express.Response) => string, options?: e.MethodOverrideOptions): express.RequestHandler; + export = e; } \ No newline at end of file diff --git a/milliseconds/milliseconds-tests.ts b/milliseconds/milliseconds-tests.ts new file mode 100644 index 0000000000..04fa7408fe --- /dev/null +++ b/milliseconds/milliseconds-tests.ts @@ -0,0 +1,9 @@ +/// + +milliseconds.seconds(1) +milliseconds.minutes(2) +milliseconds.hours(3) +milliseconds.days(4) +milliseconds.weeks(5) +milliseconds.month(6) +milliseconds.years(7) diff --git a/milliseconds/milliseconds.d.ts b/milliseconds/milliseconds.d.ts new file mode 100644 index 0000000000..144886e457 --- /dev/null +++ b/milliseconds/milliseconds.d.ts @@ -0,0 +1,20 @@ +// Type definitions for milliseconds +// Project: http://npmjs.com/milliseconds +// Definitions by: Elmar Burke +// Definitions: https://github.com/DefinitelyTyped/DefinitelyTyped + +interface Milliseconds { + seconds(seconds: number): number + minutes(minutes: number): number + hours(hours: number): number + days(days: number): number + weeks(weeks: number): number + month(month: number): number + years(years: number): number +} + +declare var milliseconds: Milliseconds + +declare module 'milliseconds' { + export = milliseconds +} diff --git a/ng-cordova/app-version-tests.ts b/ng-cordova/app-version-tests.ts new file mode 100644 index 0000000000..b83fb9ebb0 --- /dev/null +++ b/ng-cordova/app-version-tests.ts @@ -0,0 +1,16 @@ +/// + +module ngCordova { + function test($cordovaAppVersion: IAppVersionService) { + + $cordovaAppVersion.getVersionNumber() + .then((versionNumber) => { + console.log(versionNumber.toLowerCase()); + }); + + $cordovaAppVersion.getVersionCode() + .then((versionCode) => { + console.log(versionCode.toLowerCase()); + }); + } +} diff --git a/ng-cordova/app-version.d.ts b/ng-cordova/app-version.d.ts new file mode 100644 index 0000000000..b81c71b948 --- /dev/null +++ b/ng-cordova/app-version.d.ts @@ -0,0 +1,13 @@ +// Type definitions for ngCordova datepicker plugin +// Project: https://github.com/driftyco/ng-cordova +// Definitions by: Jacques Kang +// Definitions: https://github.com/DefinitelyTyped/DefinitelyTyped + +/// + +declare module ngCordova { + export interface IAppVersionService { + getVersionNumber(): ng.IPromise; + getVersionCode(): ng.IPromise; + } +} diff --git a/ng-cordova/datepicker-tests.ts b/ng-cordova/datepicker-tests.ts new file mode 100644 index 0000000000..340b9fff03 --- /dev/null +++ b/ng-cordova/datepicker-tests.ts @@ -0,0 +1,31 @@ +/// +/// + +module ngCordova { + function smoketest($cordovaDatePicker: IDatePickerService, isIos: boolean) { + + // minDate is a Date object for iOS and a millisecond precision unix timestamp + // for Android, so you need to account for that when using the plugin. Also, + // on Android, only the date is enforced (time is not). + // - from https://github.com/VitaliiBlagodir/cordova-plugin-datepicker + var minDate = isIos ? new Date() : (new Date()).valueOf(); + + var options: DatePickerOptions = { + date: new Date(), + mode: 'date', + minDate: minDate, + maxDate: '', + allowOldDates: true, + allowFutureDates: false, + doneButtonLabel: 'DONE', + doneButtonColor: '#F2F3F4', + cancelButtonLabel: 'CANCEL', + cancelButtonColor: '#000000', + androidTheme: AndroidTheme.HoloDark + }; + + $cordovaDatePicker.show(options).then(function(date) { + alert(date); + }); + }; +} diff --git a/ng-cordova/datepicker.d.ts b/ng-cordova/datepicker.d.ts new file mode 100644 index 0000000000..b4b1959820 --- /dev/null +++ b/ng-cordova/datepicker.d.ts @@ -0,0 +1,46 @@ +// Type definitions for ngCordova datepicker plugin +// Project: https://github.com/VitaliiBlagodir/cordova-plugin-datepicker +// Definitions by: Jacques Kang +// Definitions: https://github.com/DefinitelyTyped/DefinitelyTyped + +/// + +declare module ngCordova { + + export enum AndroidTheme { + Traditional = 1, + HoloDark = 2, + HoloLight = 3, + DeviceDefaultDark = 4, + DeviceDefaultLight = 5 + } + + export interface DatePickerOptions { + mode?: string; + date?: Date | string | number; + minDate?: Date | string | number; + maxDate?: Date | string | number; + titleText?: string; + okText?: string; + cancelText?: string; + todayText?: string; + nowText?: string; + is24Hour?: boolean; + androidTheme?: AndroidTheme; + allowOldDates?: boolean; + allowFutureDates?: boolean; + doneButtonLabel?: string; + doneButtonColor?: string; + cancelButtonLabel?: string; + cancelButtonColor?: string; + x?: number; + y?: number; + minuteInterval?: number; + popoverArrowDirection?: string; + locale?: string; + } + + export interface IDatePickerService { + show(options?: DatePickerOptions): ng.IPromise; + } +} diff --git a/ng-cordova/tsd.d.ts b/ng-cordova/tsd.d.ts index 188cb367d1..d79755679d 100644 --- a/ng-cordova/tsd.d.ts +++ b/ng-cordova/tsd.d.ts @@ -12,3 +12,5 @@ /// /// /// +/// +/// diff --git a/node/node-tests.ts b/node/node-tests.ts index bd80329dca..930bd1a71e 100644 --- a/node/node-tests.ts +++ b/node/node-tests.ts @@ -23,6 +23,8 @@ assert.equal(3, "3", "uses == comparator"); assert.notStrictEqual(2, "2", "uses === comparator"); +assert.notDeepStrictEqual({ x: { y: "3" } }, { x: { y: 3 } }, "uses === comparator"); + assert.throws(() => { throw "a hammer at your face"; }, undefined, "DODGED IT"); assert.doesNotThrow(() => { diff --git a/node/node.d.ts b/node/node.d.ts index 5a163f0df9..017ca8e6b9 100644 --- a/node/node.d.ts +++ b/node/node.d.ts @@ -430,7 +430,7 @@ declare module "http" { import * as events from "events"; import * as net from "net"; import * as stream from "stream"; - + export interface RequestOptions { protocol?: string; host?: string; @@ -1808,6 +1808,8 @@ declare module "assert" { export function notDeepEqual(acutal: any, expected: any, message?: string): void; export function strictEqual(actual: any, expected: any, message?: string): void; export function notStrictEqual(actual: any, expected: any, message?: string): void; + export function deepStrictEqual(actual: any, expected: any, message?: string): void; + export function notDeepStrictEqual(actual: any, expected: any, message?: string): void; export var throws: { (block: Function, message?: string): void; (block: Function, error: Function, message?: string): void; diff --git a/openpgp/openpgp.d.ts b/openpgp/openpgp.d.ts index 0ae8445a23..309aea153e 100644 --- a/openpgp/openpgp.d.ts +++ b/openpgp/openpgp.d.ts @@ -1,4 +1,4 @@ -// Type definitions for openpgpjs +// Type definitions for openpgpjs // Project: http://openpgpjs.org/ // Definitions by: Guillaume Lacasa // Definitions: https://github.com/borisyankov/DefinitelyTyped @@ -22,7 +22,7 @@ declare module openpgp { } interface Keyid { - bytes: String, + bytes: string, } interface Signature { @@ -31,7 +31,7 @@ declare module openpgp { } interface VerifiedMessage { - text: String, + text: string, signatures: Array } @@ -41,34 +41,34 @@ declare module openpgp { @param publicKeys array of keys to verify signatures @param msg the message object with signed and encrypted data */ - function decryptAndVerifyMessage(privateKey: key.Key, publicKeys: Array, msg: String): Promise; + function decryptAndVerifyMessage(privateKey: key.Key, publicKeys: Array, msg: string): Promise; /** Decrypts message and verifies signatures @param privateKey private key with decrypted secret key data @param publicKey single key to verify signatures @param msg the message object with signed and encrypted data */ - function decryptAndVerifyMessage(privateKey: key.Key, publicKey: key.Key, msg: String): Promise; + function decryptAndVerifyMessage(privateKey: key.Key, publicKey: key.Key, msg: string): Promise; /** Decrypts message @param privateKey private key with decrypted secret key data @param msg the message object with the encrypted data */ - function decryptMessage(privateKey: key.Key, msg: message.Message): Promise; + function decryptMessage(privateKey: key.Key, msg: message.Message): Promise; /** Encrypts message text with keys @param keys array of keys used to encrypt the message @param text message as native JavaScript string @returns encrypted ASCII armored message */ - function encryptMessage(keys: Array, message: string): Promise; + function encryptMessage(keys: Array, message: string): Promise; /** Encrypts message text with keys @param single key used to encrypt the message @param text message as native JavaScript string */ - function encryptMessage(key: key.Key, message: string): Promise; + function encryptMessage(key: key.Key, message: string): Promise; /** Generates a new OpenPGP key pair. Currently only supports RSA keys. Primary and subkey will be of same type. @param options @@ -81,27 +81,27 @@ declare module openpgp { @param privateKey private key with decrypted secret key data for signing @param text private key with decrypted secret key data for signing */ - function signAndEncryptMessage(publicKeys: Array, privateKey: key.Key, text: String): Promise; + function signAndEncryptMessage(publicKeys: Array, privateKey: key.Key, text: string): Promise; /** Signs message text and encrypts it @param publicKeys single key used to encrypt the message @param privateKey private key with decrypted secret key data for signing @param text private key with decrypted secret key data for signing */ - function signAndEncryptMessage(publicKey: key.Key, privateKey: key.Key, text: String): Promise; + function signAndEncryptMessage(publicKey: key.Key, privateKey: key.Key, text: string): Promise; /** Signs a cleartext message - + @param privateKeys array of keys with decrypted secret key data to sign cleartext @param text cleartext */ - function signClearMessage(privateKeys: Array, text: String): Promise; + function signClearMessage(privateKeys: Array, text: string): Promise; /** Signs a cleartext message - + @param privateKeys single key with decrypted secret key data to sign cleartext @param text cleartext */ - function signClearMessage(privateKey: key.Key, text: String): Promise; + function signClearMessage(privateKey: key.Key, text: string): Promise; /** Verifies signatures of cleartext signed message @@ -126,13 +126,13 @@ declare module openpgp.armor { @param partindex @param parttotal */ - function armor(messagetype: enums.armor, body: Object, partindex: Number, parttotal: Number): String; + function armor(messagetype: enums.armor, body: Object, partindex: number, parttotal: number): string; /** DeArmor an OpenPGP armored message; verify the checksum and return the encoded bytes @param text OpenPGP armored message */ - function dearmor(text: String): Object; + function dearmor(text: string): Object; } declare module openpgp.cleartext { @@ -142,7 +142,7 @@ declare module openpgp.cleartext { interface CleartextMessage { /** Returns ASCII armored text of cleartext signed message */ - armor(): String; + armor(): string; /** Returns the key IDs of the keys that signed the cleartext message */ @@ -150,7 +150,7 @@ declare module openpgp.cleartext { /** Get cleartext */ - getText(): String; + getText(): string; /** Sign the cleartext message @param privateKeys private keys with decrypted secret key data for signing @@ -163,41 +163,41 @@ declare module openpgp.cleartext { verify(keys: Array): Array; } - function readArmored(armoredText: String): CleartextMessage; + function readArmored(armoredText: string): CleartextMessage; } declare module openpgp.config { var prefer_hash_algorithm: enums.hash; var encryption_cipher: enums.symmetric; var compression: enums.compression; - var show_version: Boolean; - var show_comment: Boolean; - var integrity_protect: Boolean; - var keyserver: String; - var debug: Boolean; + var show_version: boolean; + var show_comment: boolean; + var integrity_protect: boolean; + var keyserver: string; + var debug: boolean; } declare module openpgp.crypto { interface Mpi { - data: Number, - read(input: String): Number, - write(): String, + data: number, + read(input: string): number, + write(): string, } /** Generating a session key for the specified symmetric algorithm @param algo Algorithm to use */ - function generateSessionKey(algo: enums.symmetric): String; + function generateSessionKey(algo: enums.symmetric): string; /** generate random byte prefix as string for the specified algorithm @param algo Algorithm to use */ - function getPrefixRandom(algo: enums.symmetric): String; + function getPrefixRandom(algo: enums.symmetric): string; /** Returns the number of integers comprising the private key of an algorithm @param algo The public key algorithm */ - function getPrivateMpiCount(algo: enums.symmetric): Number; + function getPrivateMpiCount(algo: enums.symmetric): number; /** Decrypts data using the specified public key multiprecision integers of the private key, the specified secretMPIs of the private key and the specified algorithm. @param algo Algorithm to be used @@ -222,8 +222,8 @@ declare module openpgp.crypto.cfb { @param ciphertext to be decrypted provided as a string @param resync a boolean value specifying if a resync of the IV should be used or not. The encrypteddatapacket uses the "old" style with a resync. Decryption within an encryptedintegrityprotecteddata packet is not resyncing the IV. */ - function decrypt(cipherfn: String, key: String, ciphertext: String, resync: Boolean): String; - + function decrypt(cipherfn: string, key: string, ciphertext: string, resync: boolean): string; + /** This function encrypts a given with the specified prefixrandom using the specified blockcipher to encrypt a message @param prefixrandom random bytes of block_size length provided as a string to be used in prefixing the data @param cipherfn the algorithm cipher class to encrypt data in one block_size encryption @@ -231,14 +231,14 @@ declare module openpgp.crypto.cfb { @param key binary string representation of key to be used to encrypt the plaintext. This will be passed to the cipherfn @param resync a boolean value specifying if a resync of the IV should be used or not. The encrypteddatapacket uses the "old" style with a resync. Encryption within an encryptedintegrityprotecteddata packet is not resyncing the IV. */ - function encrypt(prefixrandom: String, cipherfn: String, plaintext: String, key: String, resync: Boolean): String; - + function encrypt(prefixrandom: string, cipherfn: string, plaintext: string, key: string, resync: boolean): string; + /** Decrypts the prefixed data for the Modification Detection Code (MDC) computation @param cipherfn cipherfn.encrypt Cipher function to use @param key binary string representation of key to be used to check the mdc This will be passed to the cipherfn @param ciphertext The encrypted data */ - function mdc(cipherfn: Object, key: String, ciphertext: String): String; + function mdc(cipherfn: Object, key: string, ciphertext: string): string; } declare module openpgp.crypto.hash { @@ -246,35 +246,35 @@ declare module openpgp.crypto.hash { @param algo Hash algorithm type @param data Data to be hashed */ - function digest(algo: enums.hash, data: String): String; + function digest(algo: enums.hash, data: string): string; /** Returns the hash size in bytes of the specified hash algorithm type @param algo Hash algorithm type */ - function getHashByteLength(algo: enums.hash): Number; + function getHashByteLength(algo: enums.hash): number; } declare module openpgp.crypto.random { /** Create a secure random big integer of bits length @param bits Bit length of the MPI to create */ - function getRandomBigInteger(bits: Number): Number; - + function getRandomBigInteger(bits: number): number; + /** Retrieve secure random byte string of the specified length @param length Length in bytes to generate */ - function getRandomBytes(length: Number): String; - + function getRandomBytes(length: number): string; + /** Helper routine which calls platform specific crypto random generator - @param buf + @param buf */ function getRandomValues(buf: Uint8Array): void; - + /** Return a secure random number in the specified range @param from Min of the random number @param to Max of the random number (max 32bit) */ - function getSecureRandom(from: Number, to: Number): Number; + function getSecureRandom(from: number, to: number): number; } declare module openpgp.crypto.signature { @@ -285,16 +285,16 @@ declare module openpgp.crypto.signature { @param secretMPIs Private key multiprecision integers which is used to sign the data @param data Data to be signed */ - function sign(hash_algo: enums.hash, algo: enums.publicKey, publicMPIs: Array, secretMPIs: Array, data: String): Mpi; + function sign(hash_algo: enums.hash, algo: enums.publicKey, publicMPIs: Array, secretMPIs: Array, data: string): Mpi; - /** + /** @param algo public Key algorithm @param hash_algo Hash algorithm @param msg_MPIs Signature multiprecision integers @param publickey_MPIs Public key multiprecision integers @param data Data on where the signature was computed on */ - function verify(algo: enums.publicKey, hash_algo: enums.hash, msg_MPIs: Array, publickey_MPIs: Array, data: String): Boolean; + function verify(algo: enums.publicKey, hash_algo: enums.hash, msg_MPIs: Array, publickey_MPIs: Array, data: string): boolean; } declare module openpgp.enums { @@ -364,6 +364,14 @@ declare module openpgp.enums { aes256, twofish } + + enum keyStatus { + invalid, + expired, + revoked, + valid, + no_self_cert + } } declare module openpgp.key { @@ -376,8 +384,19 @@ declare module openpgp.key { /** Class that represents an OpenPGP key. Must contain a primary key. Can contain additional subkeys, signatures, user ids, user attributes. */ interface Key { - armor(): String, - decrypt(passphrase: String): Boolean, + armor(): string, + decrypt(passphrase: string): boolean; + getExpirationTime(): Date; + getKeyIds(): Array; + getPreferredHashAlgorithm(): string; + getPrimaryUser(): any; + getUserIds(): Array; + isPrivate(): boolean; + isPublic(): boolean; + primaryKey: packet.PublicKey; + toPublic(): Key; + update(key: Key): void; + verifyPrimaryKey(): enums.keyStatus; } /** Generates a new OpenPGP key. Currently only supports RSA keys. Primary and subkey will be of same type. @@ -390,7 +409,7 @@ declare module openpgp.key { @param armoredText text to be parsed */ - function readArmored(armoredText: String): KeyResult; + function readArmored(armoredText: string): KeyResult; } @@ -400,7 +419,7 @@ declare module openpgp.message { interface Message { /** Returns ASCII armored text of message */ - armor(): String, + armor(): string, /** Decrypt the message @param privateKey private key with decrypted secret data @@ -418,7 +437,7 @@ declare module openpgp.message { /** Get literal data that is the body of the message */ - getLiteralData(): String, + getLiteralData(): string, /** Returns the key IDs of the keys that signed the message */ @@ -426,7 +445,7 @@ declare module openpgp.message { /** Get literal data as text */ - getText(): String, + getText(): string, /** Sign the message (the literal data packet of the message) @param privateKey private keys with decrypted secret key data for signing @@ -446,22 +465,41 @@ declare module openpgp.message { /** creates new message object from binary data @param bytes */ - function fromBinary(bytes: String): Message; + function fromBinary(bytes: string): Message; /** creates new message object from text @param text */ - function fromText(text: String): Message; + function fromText(text: string): Message; /** reads an OpenPGP armored message and returns a message object @param armoredText text to be parsed */ - function readArmored(armoredText: String): Message; + function readArmored(armoredText: string): Message; } declare module openpgp.packet { + interface PublicKey { + algorithm: enums.publicKey; + created: Date; + fingerprint: string; + + getBitSize(): number; + getFingerprint(): string; + getKeyId(): string; + read(input: string): any; + write(): any; + } + + interface SecretKey extends PublicKey { + read(bytes:string): void; + write(): string; + clearPrivateMPIs(str_passphrase: string): boolean; + encrypt(passphrase:string): void; + } + /** Allocate a new packet from structured packet clone @param packetClone packet clone */ @@ -470,33 +508,33 @@ declare module openpgp.packet { /** Allocate a new packet @param property name from enums.packet */ - function newPacketFromTag(tag: String): Object; + function newPacketFromTag(tag: string): Object; } declare module openpgp.util { /** Convert an array of integers(0.255) to a string @param bin An array of (binary) integers to convert */ - function bin2str(bin: Array): String; + function bin2str(bin: Array): string; /** Calculates a 16bit sum of a string by adding each character codes modulus 65535 - @param text String to create a sum of + @param text string to create a sum of */ - function calc_checksum(text: String): Number; + function calc_checksum(text: string): number; /** Convert a string of utf8 bytes to a native javascript string @param utf8 A valid squence of utf8 bytes */ - function decode_utf8(utf8: String): String + function decode_utf8(utf8: string): string /** Convert a native javascript string to a string of utf8 bytes param str The string to convert */ - function encode_utf8(str: String): String + function encode_utf8(str: string): string /** Return the algorithm type as string */ - function get_hashAlgorithmString(): String + function get_hashAlgorithmString(): string /** Get native Web Cryptography api. The default configuration is to use the api when available. But it can also be deactivated with config.useWebCrypto */ @@ -505,48 +543,48 @@ declare module openpgp.util { /** Create binary string from a hex encoded string @param str Hex string to convert */ - function hex2bin(str: String): String; + function hex2bin(str: string): string; /** Creating a hex string from an binary array of integers (0..255) @param str Array of bytes to convert */ - function hexidump(str: String): String; + function hexidump(str: string): string; /** Create hexstring from a binary - @param str String to convert + @param str string to convert */ - function hexstrdump(str: String): String; - + function hexstrdump(str: string): string; + /** Helper function to print a debug message. Debug messages are only printed if - @param str String of the debug message + @param str string of the debug message */ - function print_debug(str: String): void; - + function print_debug(str: string): void; + /** Helper function to print a debug message. Debug messages are only printed if - @param str String of the debug message + @param str string of the debug message */ - function print_debug_hexstr_dump(str: String): void; - + function print_debug_hexstr_dump(str: string): void; + /** Shifting a string to n bits right @param value The string to shift @param bitcount Amount of bits to shift (MUST be smaller than 9) */ - function shiftRight(value: String, bitcount: Number): String; - + function shiftRight(value: string, bitcount: number): string; + /** Convert a string to an array of integers(0.255) - @param str String to convert + @param str string to convert */ - function str2bin(str: String): Array; - + function str2bin(str: string): Array; + /** Convert a string to a Uint8Array - @param str String to convert + @param str string to convert */ - function str2Uint8Array(str: String): Uint8Array; - + function str2Uint8Array(str: string): Uint8Array; + /** Convert a Uint8Array to a string. This currently functions the same as bin2str. @param bin An array of (binary) integers to convert */ - function Uint8Array2str(bin: Uint8Array): String; + function Uint8Array2str(bin: Uint8Array): string; -} \ No newline at end of file +} diff --git a/pixi.js/pixi.js-tests.ts b/pixi.js/pixi.js-tests.ts index 6a462fc2eb..3d3098c384 100644 --- a/pixi.js/pixi.js-tests.ts +++ b/pixi.js/pixi.js-tests.ts @@ -1,5 +1,4 @@ /// - module basics { export class Basics { diff --git a/pixi.js/pixi.js.d.ts b/pixi.js/pixi.js.d.ts index d3f268d2f3..5886fc4192 100644 --- a/pixi.js/pixi.js.d.ts +++ b/pixi.js/pixi.js.d.ts @@ -1,4 +1,4 @@ -// Type definitions for Pixi.js 3.0.7 +// Type definitions for Pixi.js 3.0.9 dev // Project: https://github.com/GoodBoyDigital/pixi.js/ // Definitions by: clark-stevenson // Definitions: https://github.com/borisyankov/DefinitelyTyped @@ -10,7 +10,7 @@ declare class PIXI { static RAD_TO_DEG: number; static DEG_TO_RAD: number; static TARGET_FPMS: number; - static RENDER_TYPE: { + static RENDERER_TYPE: { UNKNOWN: number; WEBGL: number; CANVAS: number; @@ -155,6 +155,8 @@ declare module PIXI { toGlobal(position: Point): Point; toLocal(position: Point, from?: DisplayObject): Point; generateTexture(renderer: CanvasRenderer | WebGLRenderer, scaleMode: number, resolution: number): Texture; + setParent(container: Container): Container; + setTransform(x?: number, y?: number, scaleX?: number, scaleY?: number, rotation?: number, skewX?: number, skewY?: number, pivotX?: number, pivotY?: number): DisplayObject; destroy(): void; getChildByName(name: string): DisplayObject; getGlobalPosition(point: Point): Point; @@ -290,7 +292,7 @@ declare module PIXI { drawRoundedRect(x: number, y: number, width: number, height: number, radius: number): Graphics; drawCircle(x: number, y: number, radius: number): Graphics; drawEllipse(x: number, y: number, width: number, height: number): Graphics; - drawPolygon(path: number[]| Point[]): Graphics; + drawPolygon(path: number[] | Point[]): Graphics; clear(): Graphics; //todo generateTexture(renderer: WebGLRenderer | CanvasRenderer, resolution?: number, scaleMode?: number): Texture; @@ -344,6 +346,8 @@ declare module PIXI { identity(): Matrix; clone(): Matrix; copy(matrix: Matrix): Matrix; + set(a: number, b: number, c: number, d: number, tx: number, ty: number): Matrix; + setTransform(a: number, b: number, c: number, d: number, sr: number, cr: number, cy: number, sy: number, nsx: number, cs: number): PIXI.Matrix; static IDENTITY: Matrix; static TEMP_MATRIX: Matrix; @@ -444,6 +448,7 @@ declare module PIXI { rotation?: boolean; uvs?: boolean; alpha?: boolean; + } export class ParticleContainer extends Container { @@ -451,8 +456,11 @@ declare module PIXI { protected _maxSize: number; protected _batchSize: number; + protected _properties: boolean[]; + protected _buffers: WebGLBuffer[]; + protected _bufferToUpdate: number; - protected onChildrenChange: () => void; + protected onChildrenChange: (smallestChildIndex?: number) => void; interactiveChildren: boolean; blendMode: number; @@ -492,18 +500,17 @@ declare module PIXI { //renderers export interface RendererOptions { + view?: HTMLCanvasElement; transparent?: boolean antialias?: boolean; resolution?: number; + clearBeforeRendering?: boolean; preserveDrawingBuffer?: boolean; forceFXAA?: boolean; roundPixels?: boolean; - - autoResize?: boolean; backgroundColor?: number; - blendModes?: { [s: string]: any; }; - clearBeforeRender?: boolean; + } export class SystemRenderer extends EventEmitter { @@ -525,6 +532,7 @@ declare module PIXI { blendModes: any; //todo? preserveDrawingBuffer: boolean; clearBeforeRender: boolean; + roundPixels: boolean; backgroundColor: number; render(object: DisplayObject): void; @@ -543,8 +551,6 @@ declare module PIXI { refresh: boolean; maskManager: CanvasMaskManager; roundPixels: boolean; - currentScaleMode: number; - currentBlendMode: number; smoothProperty: string; render(object: DisplayObject): void; @@ -612,6 +618,7 @@ declare module PIXI { protected _createContext(): void; protected handleContextLost: (event: WebGLContextEvent) => void; protected _mapGlModes(): void; + protected _managedTextures: Texture[]; constructor(width?: number, height?: number, options?: RendererOptions); @@ -629,7 +636,7 @@ declare module PIXI { setObjectRenderer(objectRenderer: ObjectRenderer): void; setRenderTarget(renderTarget: RenderTarget): void; updateTexture(texture: BaseTexture | Texture): BaseTexture | Texture; - destroyTexture(texture: BaseTexture | Texture): void; + destroyTexture(texture: BaseTexture | Texture, _skipRemove?: boolean): void; } export class AbstractFilter { @@ -764,7 +771,7 @@ declare module PIXI { fragmentSrc: string; init(): void; - cacheUniformLocations(keys: string): void; + cachUniformLocations(keys: string): void; cacheAttributeLocations(keys: string): void; compile(): WebGLProgram; syncUniform(uniform: any): void; @@ -841,6 +848,7 @@ declare module PIXI { map(rect: Rectangle, rect2: Rectangle): void; upload(): void; + destroy(): void; } @@ -954,7 +962,7 @@ declare module PIXI { static fromImage(imageUrl: string, crossorigin?: boolean, scaleMode?: number): BaseTexture; static fromCanvas(canvas: HTMLCanvasElement, scaleMode?: number): BaseTexture; - protected _glTextures: any[]; + protected _glTextures: any; protected _sourceLoaded(): void; @@ -969,7 +977,7 @@ declare module PIXI { scaleMode: number; hasLoaded: boolean; isLoading: boolean; - source: HTMLImageElement | HTMLCanvasElement; + source: HTMLImageElement | HTMLCanvasElement | HTMLVideoElement; premultipliedAlpha: boolean; imageUrl: string; isPowerOfTwo: boolean; @@ -1072,10 +1080,9 @@ declare module PIXI { export class VideoBaseTexture extends BaseTexture { static fromVideo(video: HTMLVideoElement, scaleMode?: number): VideoBaseTexture; - static fromUrl(videoSrc: string | any | string[]| any[]): VideoBaseTexture; + static fromUrl(videoSrc: string | any | string[] | any[]): VideoBaseTexture; protected _loaded: boolean; - protected _onUpdate(): void; protected _onPlayStart(): void; protected _onPlayStop(): void; @@ -1096,11 +1103,11 @@ declare module PIXI { static uuid(): number; static hex2rgb(hex: number, out?: number[]): number[]; static hex2String(hex: number): string; - static rbg2hex(rgb: Number[]): number; + static rgb2hex(rgb: Number[]): number; static canUseNewCanvasBlendModel(): boolean; static getNextPowerOfTwo(number: number): number; static isPowerOfTwo(width: number, height: number): boolean; - static getResolutionOfUrl(url: string): boolean; + static getResolutionOfUrl(url: string): number; static sayHello(type: string): void; static isWebGLSupported(): boolean; static sign(n: number): number; @@ -1147,6 +1154,7 @@ declare module PIXI { textWidth: number; textHeight: number; maxWidth: number; + maxLineHeight: number; dirty: boolean; tint: number; @@ -1165,7 +1173,8 @@ declare module PIXI { static fromFrames(frame: string[]): MovieClip; static fromImages(images: string[]): MovieClip; - protected _textures: Texture; + protected _textures: Texture[]; + protected _durations: number[]; protected _currentTime: number; protected update(deltaTime: number): void; @@ -1527,6 +1536,10 @@ declare module PIXI { xhrType?: string; } + export interface ResourceDictionary { + + [index: string]: PIXI.loaders.Resource; + } export class Loader extends EventEmitter { constructor(baseUrl?: string, concurrency?: number); @@ -1534,7 +1547,7 @@ declare module PIXI { baseUrl: string; progress: number; loading: boolean; - resources: Resource[]; + resources: ResourceDictionary; add(name: string, url: string, options?: LoaderOptions, cb?: () => void): Loader; add(url: string, options?: LoaderOptions, cb?: () => void): Loader; @@ -1633,6 +1646,7 @@ declare module PIXI { blendMode: number; canvasPadding: number; drawMode: number; + shader: Shader; getBounds(matrix?: Matrix): Rectangle; containsPoint(point: Point): boolean; @@ -1660,6 +1674,15 @@ declare module PIXI { refresh(): void; } + export class Plane extends Mesh { + + segmentsX: number; + segmentsY: number; + + constructor(texture: Texture, segmentsX?: number, segmentsY?: number); + + } + export class MeshRenderer extends ObjectRenderer { @@ -1719,4 +1742,4 @@ declare module PIXI { declare module 'pixi.js' { export = PIXI; -} \ No newline at end of file +} diff --git a/react-day-picker/react-day-picker-tests.tsx b/react-day-picker/react-day-picker-tests.tsx new file mode 100644 index 0000000000..984834dfd6 --- /dev/null +++ b/react-day-picker/react-day-picker-tests.tsx @@ -0,0 +1,22 @@ +/// +/// + +import * as DayPicker2 from "react-day-picker"; + +function isSunday(day: Date) { + return day.getDay() === 0; +} + +// make sure global variable version works +function MyComponent2() { + return +} +DayPicker.DateUtils.clone(new Date()); +DayPicker.DateUtils.isDayInRange(new Date(), {from: new Date()}); + +// make sure imported version works +function MyComponent() { + return +} +DayPicker2.DateUtils.clone(new Date()); +DayPicker2.DateUtils.isDayInRange(new Date(), { from: new Date() }); diff --git a/react-day-picker/react-day-picker-tests.tsx.tscparams b/react-day-picker/react-day-picker-tests.tsx.tscparams new file mode 100644 index 0000000000..0fa3ed7176 --- /dev/null +++ b/react-day-picker/react-day-picker-tests.tsx.tscparams @@ -0,0 +1 @@ +--target es5 --noImplicitAny --jsx react diff --git a/react-day-picker/react-day-picker.d.ts b/react-day-picker/react-day-picker.d.ts new file mode 100644 index 0000000000..94214ec455 --- /dev/null +++ b/react-day-picker/react-day-picker.d.ts @@ -0,0 +1,66 @@ +// Type definitions for react-day-picker v1.1.4 +// Project: https://github.com/gpbl/react-day-picker +// Definitions by: Giampaolo Bellavite , Jason Killian +// Definitions: https://github.com/borisyankov/DefinitelyTyped + +/// + +declare module "react-day-picker" { + import DayPicker = ReactDayPicker.DayPicker; + export = DayPicker; +} + +declare var DayPicker: typeof ReactDayPicker.DayPicker; + +declare namespace ReactDayPicker { + interface LocaleUtils { + formatMonthTitle: (month: Date, locale: string) => string; + formatWeekdayShort: (weekday: number, locale: string) => string; + formatWeekdayLong: (weekday: number, locale: string) => string; + getFirstDayOfWeek: (locale: string) => number; + } + + interface Modifiers { + [name: string]: (date: Date) => boolean; + } + + interface Props extends __React.Props{ + modifiers?: Modifiers; + initialMonth?: Date; + numberOfMonths?: number; + renderDay?: (date: Date) => number | string | JSX.Element; + enableOutsideDays?: boolean; + canChangeMonth?: boolean; + fromMonth?: Date; + toMonth?: Date; + localeUtils?: LocaleUtils; + locale?: string; + onDayClick?: (e: __React.SyntheticEvent, day: Date, modifiers: string[]) => any; + onDayTouchTap?: (e: __React.SyntheticEvent, day: Date, modifiers: string[]) => any; + onDayMouseEnter?: (e: __React.SyntheticEvent, day: Date, modifiers: string[]) => any; + onDayMouseLeave?: (e: __React.SyntheticEvent, day: Date, modifiers: string[]) => any; + onMonthChange?: (month: Date) => any; + onCaptionClick?: (e: __React.SyntheticEvent, month: Date) => any; + className?: string; + style?: __React.CSSProperties; + tabIndex?: number; + } + + class DayPicker extends __React.Component { + showMonth(month: Date): void; + showPreviousMonth(): void; + showNextMonth(): void; + } + + namespace DayPicker { + var LocaleUtils: LocaleUtils; + namespace DateUtils { + function clone(d: Date): Date; + function isSameDay(d1?: Date, d2?: Date): boolean; + function isPastDay(d: Date): boolean; + function isDayBetween(day: Date, startDate: Date, endDate: Date): boolean; + function addDayToRange(day: Date, range: { from?: Date, to?: Date }): { from?: Date, to?: Date }; + function isDayInRange(day: Date, range: { from?: Date, to?: Date }): boolean; + } + } +} diff --git a/react-native/react-native-tests.tsx b/react-native/react-native-tests.tsx index 7c02ce9cad..2783ebeb08 100644 --- a/react-native/react-native-tests.tsx +++ b/react-native/react-native-tests.tsx @@ -7,15 +7,21 @@ Note: This must be compiled with the target set to ES6 The content of index.io.js could be something like -'use strict'; + 'use strict'; -import { AppRegistry } from 'react-native' -import Welcome from './gen/Welcome' + import { AppRegistry } from 'react-native' + import Welcome from './gen/Welcome' -AppRegistry.registerComponent('MopNative', () => Welcome); + AppRegistry.registerComponent('MopNative', () => Welcome); -*/ + + +NOTE: I (Bruno Grieder) complete these definitions as I port the UI Explorer to Typescript +If you are in a hurry for the latest definitions, or are looking for typescript examples, +check https://github.com/bgrieder/RNTSExplorer + + */ /// diff --git a/react-native/react-native.d.ts b/react-native/react-native.d.ts index 2b6f076d09..60f8afd1a2 100644 --- a/react-native/react-native.d.ts +++ b/react-native/react-native.d.ts @@ -10,9 +10,12 @@ // This work is based on an original work made by Bernd Paradies: https://github.com/bparadie // // WARNING: this work is very much beta: -// -it is still missing react-native definitions +// -it is still missing react-native definitions (see below) // -it re-exports the whole of react 0.14 which may not be what react-native actually does // +// I (Bruno Grieder) complete these definitions as I port the UI Explorer to Typescript +// If you are in a hurry for the latest definitions, check those in https://github.com/bgrieder/RNTSExplorer +// /////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////// /// @@ -44,7 +47,7 @@ declare namespace ReactNative { // not in lib.es6.d.ts but called by react-native - done(): void; + done(callback?: (value: T) => void): void; } export interface PromiseConstructor { @@ -131,6 +134,23 @@ declare namespace ReactNative { export type Runnable = ( appParameters: any ) => void; + + export interface PointProperties { + x: number + y: number + } + + export interface Insets { + top?: number + left?: number + bottom?: number + right?: number + } + + export interface NativeComponent { + setNativeProps: (props: Object) => void + } + export type AppConfig = { appKey: string; component: ReactClass; @@ -148,17 +168,49 @@ declare namespace ReactNative { static runApplication( appKey: string, appParameters: any ): void; } - /* - export interface ReactPropTypes extends React.ReactPropTypes - { + export interface LayoutAnimationTypes { + spring: string + linear: string + easeInEaseOut: string + easeIn: string + easeOut: string + } - } + export interface LayoutAnimationProperties { + opacity: string + scaleXY: string + } + + export interface LayoutAnimationAnim { + duration?: number + delay?: number + springDamping?: number + initialVelocity?: number + type?: string //LayoutAnimationTypes + property?: string //LayoutAnimationProperties + } + + export interface LayoutAnimationConfig { + duration: number + create?: LayoutAnimationAnim + update?: LayoutAnimationAnim + delete?: LayoutAnimationAnim + } + + export interface LayoutAnimationStatic { + + configureNext: ( config: LayoutAnimationConfig, onAnimationDidEnd?: () => void, onError?: ( error?: any ) => void ) => void + create: ( duration: number, type?: string, creationProp?: string ) => LayoutAnimationConfig + Types: LayoutAnimationTypes + Properties: LayoutAnimationProperties + configChecker: ( conf: {config: LayoutAnimationConfig}, name: string, next: string ) => void + Presets : { + easeInEaseOut: LayoutAnimationConfig + linear:LayoutAnimationConfig + spring: LayoutAnimationConfig + } + } - export interface PropTypes - { - [key:string]: React.Requireable; - } - */ /** * Flex Prop Types @@ -211,7 +263,6 @@ declare namespace ReactNative { scaleY?: number translateX?: number translateY?: number - } @@ -234,50 +285,71 @@ declare namespace ReactNative { } // @see https://facebook.github.io/react-native/docs/text.html#style - export interface TextStyle extends FlexStyle { - color?: string; - containerBackgroundColor?: string; - fontFamily?: string; - fontSize?: number; - fontStyle?: string; // 'normal' | 'italic'; - fontWeight?: string; // enum("normal", 'bold', '100', '200', '300', '400', '500', '600', '700', '800', '900') - letterSpacing?: number; - lineHeight?: number; - textAlign?: string; // enum("auto", 'left', 'right', 'center') + export interface TextStyle extends ViewStyle { + color?: string + fontFamily?: string + fontSize?: number + fontStyle?: string // 'normal' | 'italic'; + fontWeight?: string // enum("normal", 'bold', '100', '200', '300', '400', '500', '600', '700', '800', '900') + letterSpacing?: number + lineHeight?: number + textAlign?: string // enum("auto", 'left', 'right', 'center') + textDecorationLine?: string // enum("none", 'underline', 'line-through', 'underline line-through') + textDecorationStyle?: string // enum("solid", 'double', 'dotted', 'dashed') + textDecorationColor?: string writingDirection?: string; //enum("auto", 'ltr', 'rtl') + //containerBackgroundColor?: string + } + + export interface TextPropertiesIOS { + + /** + * When true, no visual change is made when text is pressed down. + * By default, a gray oval highlights the text on press down. + */ + suppressHighlighting?: boolean } // https://facebook.github.io/react-native/docs/text.html#props export interface TextProperties extends React.Props { - /** - * numberOfLines number - * - * Used to truncate the text with an elipsis after computing the text layout, including line wrapping, such that the total number of lines does not exceed this number. - */ - numberOfLines?: number; /** - * onLayout function - * + * Specifies should fonts scale to respect Text Size accessibility setting on iOS. + */ + allowFontScaling?: boolean + + /** + * Used to truncate the text with an elipsis after computing the text layout, including line wrapping, such that the total number of lines does not exceed this number. + */ + numberOfLines?: number + + /** * Invoked on mount and layout changes with * * {nativeEvent: { layout: {x, y, width, height}}}. */ - onLayout?: ( event: LayoutChangeEvent ) => void; + onLayout?: ( event: LayoutChangeEvent ) => void /** - * onPress function - * - * This function is called on press. Text intrinsically supports press handling with a default highlight state (which can be disabled with suppressHighlighting). + * This function is called on press. + * Text intrinsically supports press handling with a default highlight state (which can be disabled with suppressHighlighting). */ - onPress?: () => void; + onPress?: () => void /** * @see https://facebook.github.io/react-native/docs/text.html#style */ - style?: TextStyle; + style?: TextStyle + + /** + * Used to locate this view in end-to-end tests. + */ + testID?: string } + /** + * A React component for displaying text which supports nesting, styling, and touch handling. + */ export interface TextStatic extends React.ComponentClass { } @@ -331,7 +403,7 @@ declare namespace ReactNative { selectTextOnFocus?: boolean /** - * //FIXME: require typing + * //FIXME: requires typing * See DocumentSelectionState.js, some state that is responsible for maintaining selection information for a document */ selectionState?: any @@ -436,7 +508,7 @@ declare namespace ReactNative { /** * Callback that is called when the text input's text changes. */ - onChange?: (event: {nativeEvent: {text: string}}) => void + onChange?: ( event: {nativeEvent: {text: string}} ) => void /** * Callback that is called when the text input's text changes. @@ -447,7 +519,7 @@ declare namespace ReactNative { /** * Callback that is called when text input ends. */ - onEndEditing?: (event: {nativeEvent: {text: string}}) => void + onEndEditing?: ( event: {nativeEvent: {text: string}} ) => void /** * Callback that is called when the text input is focused @@ -457,12 +529,17 @@ declare namespace ReactNative { /** * Invoked on mount and layout changes with {x, y, width, height}. */ - onLayout?: (event: {nativeEvent: {x: number, y: number, width: number, height: number}}) => void + onLayout?: ( event: {nativeEvent: {x: number, y: number, width: number, height: number}} ) => void /** * Callback that is called when the text input's submit button is pressed. */ - onSubmitEditing?: (event: {nativeEvent: {text: string}}) => void + onSubmitEditing?: ( event: {nativeEvent: {text: string}} ) => void + + /** + * //FIXME: Not part of the doc but found in examples + */ + password?: boolean /** * The string that will be rendered before text input has been entered @@ -500,12 +577,175 @@ declare namespace ReactNative { value?: string } - export interface TextInputStatic extends React.ComponentClass { - + export interface TextInputStatic extends NativeComponent, React.ComponentClass { + blur: () => void + focus: () => void } - export interface AccessibilityTraits { - // TODO + + export interface GestureResponderEvent { + nativeEvent : { + /** + * Array of all touch events that have changed since the last event + */ + changedTouches: any[] + + /** + * The ID of the touch + */ + identifier: string + + /** + * The X position of the touch, relative to the element + */ + locationX: number + + /** + * The Y position of the touch, relative to the element + */ + locationY: number + + /** + * The X position of the touch, relative to the screen + */ + pageX: number + + /** + * The Y position of the touch, relative to the screen + */ + pageY: number + + /** + * The node id of the element receiving the touch event + */ + target: string + + /** + * A time identifier for the touch, useful for velocity calculation + */ + timestamp: number + + /** + * Array of all current touches on the screen + */ + touches : any[] + } + } + + /** + * Gesture recognition on mobile devices is much more complicated than web. + * A touch can go through several phases as the app determines what the user's intention is. + * For example, the app needs to determine if the touch is scrolling, sliding on a widget, or tapping. + * This can even change during the duration of a touch. There can also be multiple simultaneous touches. + * + * The touch responder system is needed to allow components to negotiate these touch interactions + * without any additional knowledge about their parent or child components. + * This system is implemented in ResponderEventPlugin.js, which contains further details and documentation. + * + * Best Practices + * Users can feel huge differences in the usability of web apps vs. native, and this is one of the big causes. + * Every action should have the following attributes: + * Feedback/highlighting- show the user what is handling their touch, and what will happen when they release the gesture + * Cancel-ability- when making an action, the user should be able to abort it mid-touch by dragging their finger away + * + * These features make users more comfortable while using an app, + * because it allows people to experiment and interact without fear of making mistakes. + * + * TouchableHighlight and Touchable* + * The responder system can be complicated to use. + * So we have provided an abstract Touchable implementation for things that should be "tappable". + * This uses the responder system and allows you to easily configure tap interactions declaratively. + * Use TouchableHighlight anywhere where you would use a button or link on web. + */ + export interface GestureResponderHandlers { + + /** + * A view can become the touch responder by implementing the correct negotiation methods. + * There are two methods to ask the view if it wants to become responder: + */ + + /** + * Does this view want to become responder on the start of a touch? + */ + onStartShouldSetResponder?: (event: GestureResponderEvent) => boolean + + /** + * Called for every touch move on the View when it is not the responder: does this view want to "claim" touch responsiveness? + */ + onMoveShouldSetResponder?: (event: GestureResponderEvent) => boolean + + /** + * If the View returns true and attempts to become the responder, one of the following will happen: + */ + + /** + * The View is now responding for touch events. + * This is the time to highlight and show the user what is happening + */ + onResponderGrant?: (event: GestureResponderEvent) => void + + /** + * Something else is the responder right now and will not release it + */ + onResponderReject?: (event: GestureResponderEvent) => void + + /** + * If the view is responding, the following handlers can be called: + */ + + /** + * The user is moving their finger + */ + onResponderMove?: (event: GestureResponderEvent) => void + + /** + * Fired at the end of the touch, ie "touchUp" + */ + onResponderRelease?: (event: GestureResponderEvent) => void + + /** + * Something else wants to become responder. + * Should this view release the responder? Returning true allows release + */ + onResponderTerminationRequest?: (event: GestureResponderEvent) => boolean + + /** + * The responder has been taken from the View. + * Might be taken by other views after a call to onResponderTerminationRequest, + * or might be taken by the OS without asking (happens with control center/ notification center on iOS) + */ + onResponderTerminate?: (event: GestureResponderEvent) => void + + /** + * onStartShouldSetResponder and onMoveShouldSetResponder are called with a bubbling pattern, + * where the deepest node is called first. + * That means that the deepest component will become responder when multiple Views return true for *ShouldSetResponder handlers. + * This is desirable in most cases, because it makes sure all controls and buttons are usable. + * + * However, sometimes a parent will want to make sure that it becomes responder. + * This can be handled by using the capture phase. + * Before the responder system bubbles up from the deepest component, + * it will do a capture phase, firing on*ShouldSetResponderCapture. + * So if a parent View wants to prevent the child from becoming responder on a touch start, + * it should have a onStartShouldSetResponderCapture handler which returns true. + */ + onStartShouldSetResponderCapture?: (event: GestureResponderEvent) => boolean + + /** + * onStartShouldSetResponder and onMoveShouldSetResponder are called with a bubbling pattern, + * where the deepest node is called first. + * That means that the deepest component will become responder when multiple Views return true for *ShouldSetResponder handlers. + * This is desirable in most cases, because it makes sure all controls and buttons are usable. + * + * However, sometimes a parent will want to make sure that it becomes responder. + * This can be handled by using the capture phase. + * Before the responder system bubbles up from the deepest component, + * it will do a capture phase, firing on*ShouldSetResponderCapture. + * So if a parent View wants to prevent the child from becoming responder on a touch start, + * it should have a onStartShouldSetResponderCapture handler which returns true. + */ + onMoveShouldSetResponderCapture?: () => void; + } // @see https://facebook.github.io/react-native/docs/view.html#style @@ -529,177 +769,120 @@ declare namespace ReactNative { shadowRadius?: number; } - /** - * @see https://facebook.github.io/react-native/docs/view.html#props - */ - export interface ViewProperties extends React.Props { + + export interface ViewPropertiesIOS { + /** - * accessibilityLabel string - * - * Overrides the text that's read by the screen reader when the user interacts with the element. By default, the label is constructed by traversing all the children and accumulating all the Text nodes separated by space. + * Provides additional traits to screen reader. + * By default no traits are provided unless specified otherwise in element * + * @enum('none', 'button', 'link', 'header', 'search', 'image', 'selected', 'plays', 'key', 'text','summary', 'disabled', 'frequentUpdates', 'startsMedia', 'adjustable', 'allowsDirectInteraction', 'pageTurn') */ - - accessibilityLabel?: string; - + accessibilityTraits?: string | string[]; /** - * accessibilityTraits AccessibilityTraits, [AccessibilityTraits] - * Provides additional traits to screen reader. By default no traits are provided unless specified otherwise in element + * Whether this view should be rendered as a bitmap before compositing. + * + * On iOS, this is useful for animations and interactions that do not modify this component's dimensions nor its children; + * for example, when translating the position of a static view, rasterization allows the renderer to reuse a cached bitmap of a static view + * and quickly composite it during each frame. + * + * Rasterization incurs an off-screen drawing pass and the bitmap consumes memory. + * Test and measure when using this property. */ + shouldRasterizeIOS?: boolean + } - accessibilityTraits?: AccessibilityTraits; + export interface ViewPropertiesAndroid { /** - * accessible bool + * Indicates to accessibility services to treat UI component like a native one. + * Works for Android only. * - * When true, indicates that the view is an accessibility element. By default, all the touchable elements are accessible. + * @enum('none', 'button', 'radiobutton_checked', 'radiobutton_unchecked' ) */ + accessibilityComponentType?: string - accessible?: boolean; /** - * onAcccessibilityTap function - * When accessible is true, the system will try to invoke this function when the user performs accessibility tap gesture. - * + * Indicates to accessibility services whether the user should be notified when this view changes. + * Works for Android API >= 19 only. + * See http://developer.android.com/reference/android/view/View.html#attr_android:accessibilityLiveRegion for references. */ - - onAcccessibilityTap?: () => void; + accessibilityLiveRegion?: string /** - * onLayout function - * - * Invoked on mount and layout changes with - * - * {nativeEvent: { layout: {x, y, width, height}}}. + * Views that are only used to layout their children or otherwise don't draw anything + * may be automatically removed from the native hierarchy as an optimization. + * Set this property to false to disable this optimization and ensure that this View exists in the native view hierarchy. */ - onLayout?: ( event: LayoutChangeEvent ) => void; + collapsable?: boolean + /** - * onMagicTap function + * Controls how view is important for accessibility which is if it fires accessibility events + * and if it is reported to accessibility services that query the screen. + * Works for Android only. See http://developer.android.com/reference/android/R.attr.html#importantForAccessibility for references. * - * When accessible is true, the system will invoke this function when the user performs the magic tap gesture. + * Possible values: + * 'auto' - The system determines whether the view is important for accessibility - default (recommended). + * 'yes' - The view is important for accessibility. + * 'no' - The view is not important for accessibility. + * 'no-hide-descendants' - The view is not important for accessibility, nor are any of its descendant views. */ + importantForAccessibility?: string - onMagicTap?: () => void; /** - * onMoveShouldSetResponder function + * Whether this view needs to rendered offscreen and composited with an alpha in order to preserve 100% correct colors and blending behavior. + * The default (false) falls back to drawing the component and its children + * with an alpha applied to the paint used to draw each element instead of rendering the full component offscreen and compositing it back with an alpha value. + * This default may be noticeable and undesired in the case where the View you are setting an opacity on + * has multiple overlapping elements (e.g. multiple overlapping Views, or text and a background). * - * For most touch interactions, you'll simply want to wrap your component in TouchableHighlight or TouchableOpacity. Check out Touchable.js, ScrollResponder.js and ResponderEventPlugin.js for more discussion. + * Rendering offscreen to preserve correct alpha behavior is extremely expensive + * and hard to debug for non-native developers, which is why it is not turned on by default. + * If you do need to enable this property for an animation, + * consider combining it with renderToHardwareTextureAndroid if the view contents are static (i.e. it doesn't need to be redrawn each frame). + * If that property is enabled, this View will be rendered off-screen once, + * saved in a hardware texture, and then composited onto the screen with an alpha each frame without having to switch rendering targets on the GPU. */ - onMoveShouldSetResponder?: () => void; + needsOffscreenAlphaCompositing?: boolean - onResponderGrant?: () => void; - - onResponderMove?: () => void; - - onResponderReject?: () => void; - - onResponderRelease?: () => void; - - onResponderTerminate?: () => void; - - onResponderTerminationRequest?: () => void; - - onStartShouldSetResponder?: () => void; - - onStartShouldSetResponderCapture?: () => void; /** - * pointerEvents enum('box-none', 'none', 'box-only', 'auto') - * - * In the absence of auto property, none is much like CSS's none value. box-none is as if you had applied the CSS class: - * - * .box-none { - * pointer-events: none; - * } - * .box-none * { - * pointer-events: all; - * } - * - * box-only is the equivalent of - * - * .box-only { - * pointer-events: all; - * } - * .box-only * { - * pointer-events: none; - * } - * - * But since pointerEvents does not affect layout/appearance, and we are already deviating from the spec by adding additional modes, - * we opt to not include pointerEvents on style. On some platforms, we would need to implement it as a className anyways. Using style or not is an implementation detail of the platform. - */ - - pointerEvents?: string; - - /** - * removeClippedSubviews bool - * - * This is a special performance property exposed by RCTView and is useful for scrolling content when there are many subviews, - * most of which are offscreen. For this property to be effective, it must be applied to a view that contains many subviews that extend outside its bound. - * The subviews must also have overflow: hidden, as should the containing view (or one of its superviews). - */ - - removeClippedSubviews?: boolean - - /** - * renderToHardwareTextureAndroid bool - * * Whether this view should render itself (and all of its children) into a single hardware texture on the GPU. * * On Android, this is useful for animations and interactions that only modify opacity, rotation, translation, and/or scale: * in those cases, the view doesn't have to be redrawn and display lists don't need to be re-executed. The texture can just be * re-used and re-composited with different parameters. The downside is that this can use up limited video memory, so this prop should be set back to false at the end of the interaction/animation. */ - renderToHardwareTextureAndroid?: boolean; - style?: ViewStyle; - - /** - * testID string - * - * Used to locate this view in end-to-end tests. - */ - - testID?: string; - } - - export interface ViewStatic extends React.ComponentClass { - } /** - * @see https://facebook.github.io/react-native/docs/activityindicatorios.html#props + * @see https://facebook.github.io/react-native/docs/view.html#props */ - export interface AlertIOSProperties { + export interface ViewProperties extends ViewPropertiesAndroid, ViewPropertiesIOS, GestureResponderHandlers, React.Props { + /** - * animating bool - * - * Whether to show the indicator (true, the default) or hide it (false). + * Overrides the text that's read by the screen reader when the user interacts with the element. By default, the label is constructed by traversing all the children and accumulating all the Text nodes separated by space. */ - animating?: boolean; + accessibilityLabel?: string; /** - * color string - * - * The foreground color of the spinner (default is gray). + * When true, indicates that the view is an accessibility element. + * By default, all the touchable elements are accessible. */ - - color?: string; + accessible?: boolean; /** - * hidesWhenStopped bool - * - * Whether the indicator should hide when not animating (true by default). + * When `accessible` is true, the system will try to invoke this function when the user performs accessibility tap gesture. */ - - hidesWhenStopped?: boolean; + onAcccessibilityTap?: () => void; /** - * onLayout function - * * Invoked on mount and layout changes with * * {nativeEvent: { layout: {x, y, width, height}}}. @@ -707,13 +890,145 @@ declare namespace ReactNative { onLayout?: ( event: LayoutChangeEvent ) => void; /** - * size enum('small', 'large') - * - * Size of the indicator. Small has a height of 20, large has a height of 36. + * When accessible is true, the system will invoke this function when the user performs the magic tap gesture. */ - size: string; // enum('small', 'large') + onMagicTap?: () => void; + + /** + * + * In the absence of auto property, none is much like CSS's none value. box-none is as if you had applied the CSS class: + * + * .box-none { + * pointer-events: none; + * } + * .box-none * { + * pointer-events: all; + * } + * + * box-only is the equivalent of + * + * .box-only { + * pointer-events: all; + * } + * .box-only * { + * pointer-events: none; + * } + * + * But since pointerEvents does not affect layout/appearance, and we are already deviating from the spec by adding additional modes, + * we opt to not include pointerEvents on style. On some platforms, we would need to implement it as a className anyways. Using style or not is an implementation detail of the platform. + */ + pointerEvents?: string; + + /** + * + * This is a special performance property exposed by RCTView and is useful for scrolling content when there are many subviews, + * most of which are offscreen. For this property to be effective, it must be applied to a view that contains many subviews that extend outside its bound. + * The subviews must also have overflow: hidden, as should the containing view (or one of its superviews). + */ + removeClippedSubviews?: boolean + + style?: ViewStyle; + + /** + * Used to locate this view in end-to-end tests. + */ + testID?: string; } + /** + * The most fundamental component for building UI, View is a container that supports layout with flexbox, style, some touch handling, + * and accessibility controls, and is designed to be nested inside other views and to have 0 to many children of any type. + * View maps directly to the native view equivalent on whatever platform React is running on, + * whether that is a UIView,
    , android.view, etc. + */ + export interface ViewStatic extends NativeComponent, React.ComponentClass { + + } + + /** + * //FIXME: No documentation extracted from code comment on WebView.ios.js + */ + export interface NavState { + + url?: string + title?: string + loading?: boolean + canGoBack?: boolean + canGoForward?: boolean; + + [key: string]: any + } + + export interface WebViewPropertiesAndroid { + + /** + * Used for android only, JS is enabled by default for WebView on iOS + */ + javaScriptEnabledAndroid?: boolean + } + + export interface WebViewPropertiesIOS { + + /** + * Used for iOS only, sets whether the webpage scales to fit the view and the user can change the scale + */ + scalesPageToFit?: boolean + } + + /** + * @see https://facebook.github.io/react-native/docs/webview.html#props + */ + export interface WebViewProperties extends WebViewPropertiesAndroid, WebViewPropertiesIOS, React.Props { + + automaticallyAdjustContentInsets?: boolean + + bounces?: boolean + + contentInset?: Insets + + html?: string + + /** + * Sets the JS to be injected when the webpage loads. + */ + injectedJavaScript?: string + + onNavigationStateChange?: ( event: NavState ) => void + + /** + * Allows custom handling of any webview requests by a JS handler. + * Return true or false from this method to continue loading the request. + */ + onShouldStartLoadWithRequest?: () => boolean + + /** + * view to show if there's an error + */ + renderError?: () => ViewStatic + + /** + * loading indicator to show + */ + renderLoading?: () => ViewStatic + + scrollEnabled?: boolean + + startInLoadingState?: boolean + + style?: ViewStyle + + url: string + } + + + export interface WebViewStatic extends React.ComponentClass { + + goBack: () => void + goForward: () => void + reload: () => void + } + + /** * @see */ @@ -721,13 +1036,6 @@ declare namespace ReactNative { /// TODO } - /** - * @see - */ - export interface SwitchIOSProperties { - /// TODO - } - export interface NavigatorIOSProperties extends React.Props { @@ -910,7 +1218,7 @@ declare namespace ReactNative { * This is called when the user changes the date or time in the UI. * The first and only argument is a Date object representing the new date and time. */ - onDateChange?: (newDate: Date) => void + onDateChange?: ( newDate: Date ) => void /** * Timezone offset in minutes. @@ -924,54 +1232,106 @@ declare namespace ReactNative { export interface DatePickerIOSStatic extends React.ComponentClass { } + + /** + * @see PickerIOS.ios.js + */ + export interface PickerIOSItemProperties extends React.Props { + value?: string | number + label?: string + } + + /** + * @see PickerIOS.ios.js + */ + export interface PickerIOSItemStatic extends React.ComponentClass { + } + + + /** + * @see https://facebook.github.io/react-native/docs/pickerios.html + * @see PickerIOS.ios.js + */ + export interface PickerIOSProperties extends React.Props { + + onValueChange?: ( value: string | number ) => void + + selectedValue?: string | number + + style?: ViewStyle + } + + /** + * @see https://facebook.github.io/react-native/docs/pickerios.html + * @see PickerIOS.ios.js + */ + export interface PickerIOSStatic extends React.ComponentClass { + + Item: PickerIOSItemStatic + } + + /** * @see https://facebook.github.io/react-native/docs/sliderios.html */ export interface SliderIOSProperties extends React.Props { - /** - maximumTrackTintColor string - The color used for the track to the right of the button. Overrides the default blue gradient image. - */ - maximumTrackTintColor?: string; /** - maximumValue number - - Initial maximum value of the slider. Default value is 1. + * If true the user won't be able to move the slider. Default value is false. */ - maximumValue?: number; + disabled?: boolean /** - minimumTrackTintColor string - The color used for the track to the left of the button. Overrides the default blue gradient image. + * Initial maximum value of the slider. Default value is 1. */ - minimumTrackTintColor?: string; + maximumValue?: number /** - minimumValue number - Initial minimum value of the slider. Default value is 0. + * The color used for the track to the right of the button. Overrides the default blue gradient image. */ - minimumValue?: number; + maximumTrackTintColor?: string /** - onSlidingComplete function - Callback called when the user finishes changing the value (e.g. when the slider is released). + * Initial minimum value of the slider. Default value is 0. */ - onSlidingComplete?: () => void; + minimumValue?: number /** - onValueChange function - Callback continuously called while the user is dragging the slider. + * The color used for the track to the left of the button. Overrides the default blue gradient image. */ - onValueChange?: ( value: number ) => void; + minimumTrackTintColor?: string /** - value number - Initial value of the slider. The value should be between minimumValue and maximumValue, which default to 0 and 1 respectively. Default value is 0. - - This is not a controlled component, e.g. if you don't update the value, the component won't be reset to its inital value. + * Callback called when the user finishes changing the value (e.g. when the slider is released). */ - value?: number; + onSlidingComplete?: () => void + + /** + * Callback continuously called while the user is dragging the slider. + */ + onValueChange?: ( value: number ) => void + + /** + * Step value of the slider. + * The value should be between 0 and (maximumValue - minimumValue). + * Default value is 0. + */ + step?: number + + /** + * Used to style and layout the Slider. + * @see StyleSheet.js and ViewStylePropTypes.js for more info. + */ + style?: ViewStyle + + /** + * Initial value of the slider. + * The value should be between minimumValue and maximumValue, which default to 0 and 1 respectively. + * Default value is 0. + * + * This is not a controlled component, e.g. if you don't update the value, the component won't be reset to its inital value. + */ + value?: number } export interface SliderIOSStatic extends React.ComponentClass { @@ -979,12 +1339,67 @@ declare namespace ReactNative { } /** - * @see + * //FIXME: no dcumentation, inferred + * @see SwitchIOS.ios.js */ - export interface CameraRollProperties { - /// TODO + export interface SwitchIOSStyle extends ViewStyle { + height?: number + width?: number } + + /** + * https://facebook.github.io/react-native/docs/switchios.html#props + */ + export interface SwitchIOSProperties extends React.Props { + + /** + * If true the user won't be able to toggle the switch. Default value is false. + */ + disabled?: boolean + + /** + * Background color when the switch is turned on. + */ + onTintColor?: string + + /** + * Callback that is called when the user toggles the switch. + */ + onValueChange?: ( value: boolean ) => void + + /** + * Background color for the switch round button. + */ + thumbTintColor?: string + + /** + * Background color when the switch is turned off. + */ + tintColor?: string + + /** + * The value of the switch, if true the switch will be turned on. Default value is false. + */ + value?: boolean + + style?: SwitchIOSStyle + } + + /** + * + * Use SwitchIOS to render a boolean input on iOS. + * + * This is a controlled component, so you must hook in to the onValueChange callback and update the value prop in order for the component to update, + * otherwise the user's change will be reverted immediately to reflect props.value as the source of truth. + * + * @see https://facebook.github.io/react-native/docs/switchios.html + */ + export interface SwitchIOSStatic extends React.ComponentClass { + + } + + /** * @see ImageResizeMode.js */ @@ -1039,7 +1454,7 @@ declare namespace ReactNative { * This is useful for creating resizable rounded buttons, shadows, and other resizable assets. * More info on Apple documentation */ - capInsets?: {top: number, left: number, bottom: number, right: number} + capInsets?: Insets /** * A static image to display while downloading the final image off the network. @@ -1195,7 +1610,7 @@ declare namespace ReactNative { * is exactly what was put into the data source, but it's also possible to * provide custom extractors. */ - renderRow?: ( rowData: any, sectionID: string, rowID: string, highlightRow?: boolean ) => React.ReactElement + renderRow?: ( rowData: any, sectionID: string | number, rowID: string | number, highlightRow?: boolean ) => React.ReactElement /** @@ -1213,7 +1628,7 @@ declare namespace ReactNative { * stick to the top until it is pushed off the screen by the next section * header. */ - renderSectionHeader?: ( sectionData: any, sectionId: string ) => React.ReactElement + renderSectionHeader?: ( sectionData: any, sectionId: string | number ) => React.ReactElement /** @@ -1222,7 +1637,7 @@ declare namespace ReactNative { * but not the last row if there is a section header below. * Take a sectionID and rowID of the row above and whether its adjacent row is highlighted. */ - renderSeparator?: ( sectionID: string, rowID: string, adjacentRowHighlighted?: boolean ) => React.ReactElement + renderSeparator?: ( sectionID: string | number, rowID: string | number, adjacentRowHighlighted?: boolean ) => React.ReactElement /** * How early to start rendering rows before they come on screen, in @@ -1236,56 +1651,212 @@ declare namespace ReactNative { } - /** - * @see https://facebook.github.io/react-native/docs/touchablewithoutfeedback.html - */ - export interface TouchableWithoutFeedbackProperties { - /* - accessible bool + export interface MapViewAnnotation { + latitude?: number + longitude?: number + animateDrop?: boolean + title?: string + subtitle?: string + hasLeftCallout?: boolean + hasRightCallout?: boolean + onLeftCalloutPress?: () => void + onRightCalloutPress?: () => void + id?: string + } - Called when the touch is released, but not if cancelled (e.g. by a scroll that steals the responder lock). + export interface MapViewRegion { + latitude: number + longitude: number + latitudeDelta: number + longitudeDelta: number + } + + export interface MapViewPropertiesIOS { + + /** + * If false points of interest won't be displayed on the map. + * Default value is true. */ - accessible?: boolean; - /* - delayLongPress number + showsPointsOfInterest?: boolean + } - Delay in ms, from onPressIn, before onLongPress is called. + export interface MapViewProperties extends MapViewPropertiesIOS, React.Props { + + /** + * Map annotations with title/subtitle. + */ + annotations?: MapViewAnnotation[] + + /** + * Insets for the map's legal label, originally at bottom left of the map. See EdgeInsetsPropType.js for more information. + */ + legalLabelInsets?: Insets + + /** + * The map type to be displayed. + * standard: standard road map (default) + * satellite: satellite view + * hybrid: satellite view with roads and points of interest overlayed + * + * enum('standard', 'satellite', 'hybrid') + */ + mapType?: string + + /** + * Maximum size of area that can be displayed. + */ + maxDelta?: number + + /** + * Minimum size of area that can be displayed. + */ + minDelta?: number + + /** + * Callback that is called once, when the user taps an annotation. + */ + onAnnotationPress?: () => void + + /** + * Callback that is called continuously when the user is dragging the map. + */ + onRegionChange?: ( region: MapViewRegion ) => void + + /** + * Callback that is called once, when the user is done moving the map. + */ + onRegionChangeComplete?: ( region: MapViewRegion ) => void + + /** + * When this property is set to true and a valid camera is associated with the map, + * the camera’s pitch angle is used to tilt the plane of the map. + * + * When this property is set to false, the camera’s pitch angle is ignored and + * the map is always displayed as if the user is looking straight down onto it. + */ + pitchEnabled?: boolean + + /** + * The region to be displayed by the map. + * The region is defined by the center coordinates and the span of coordinates to display. + */ + region?: MapViewRegion + + /** + * When this property is set to true and a valid camera is associated with the map, + * the camera’s heading angle is used to rotate the plane of the map around its center point. + * + * When this property is set to false, the camera’s heading angle is ignored and the map is always oriented + * so that true north is situated at the top of the map view + */ + rotateEnabled?: boolean + + /** + * If false the user won't be able to change the map region being displayed. + * Default value is true. + */ + scrollEnabled?: boolean + + /** + * If true the app will ask for the user's location and focus on it. + * Default value is false. + * + * NOTE: You need to add NSLocationWhenInUseUsageDescription key in Info.plist to enable geolocation, + * otherwise it is going to fail silently! + */ + showsUserLocation?: boolean + + /** + * Used to style and layout the MapView. + * See StyleSheet.js and ViewStylePropTypes.js for more info. + */ + style?: ViewStyle + + /** + * If false the user won't be able to pinch/zoom the map. + * Default value is true. + */ + zoomEnabled?: boolean + } + + /** + * @see https://facebook.github.io/react-native/docs/mapview.html#content + */ + export interface MapViewStatic extends React.ComponentClass { + } + + + export interface TouchableWithoutFeedbackAndroidProperties { + + /** + * Indicates to accessibility services to treat UI component like a native one. + * Works for Android only. + * + * @enum('none', 'button', 'radiobutton_checked', 'radiobutton_unchecked' ) + */ + accessibilityComponentType?: string + } + + export interface TouchableWithoutFeedbackIOSProperties { + + /** + * Provides additional traits to screen reader. + * By default no traits are provided unless specified otherwise in element + * + * @enum('none', 'button', 'link', 'header', 'search', 'image', 'selected', 'plays', 'key', 'text','summary', 'disabled', 'frequentUpdates', 'startsMedia', 'adjustable', 'allowsDirectInteraction', 'pageTurn') + */ + accessibilityTraits?: string | string[]; + + } + + /** + * @see https://facebook.github.io/react-native/docs/touchablewithoutfeedback.html#props + */ + export interface TouchableWithoutFeedbackProperties extends TouchableWithoutFeedbackAndroidProperties, TouchableWithoutFeedbackIOSProperties { + + + /** + * Called when the touch is released, but not if cancelled (e.g. by a scroll that steals the responder lock). + */ + accessible?: boolean + + /** + * Delay in ms, from onPressIn, before onLongPress is called. */ delayLongPress?: number; - /* - delayPressIn number - - Delay in ms, from the start of the touch, before onPressIn is called. + /** + * Delay in ms, from the start of the touch, before onPressIn is called. */ delayPressIn?: number; - /* - delayPressOut number - - Delay in ms, from the release of the touch, before onPressOut is called. + /** + * Delay in ms, from the release of the touch, before onPressOut is called. */ delayPressOut?: number; - /* - onLongPress function + /** + * Invoked on mount and layout changes with + * {nativeEvent: {layout: {x, y, width, height}}} */ + onLayout?: ( event: LayoutChangeEvent ) => void + onLongPress?: () => void; - /* - onPress function + /** + * Called when the touch is released, + * but not if cancelled (e.g. by a scroll that steals the responder lock). */ onPress?: () => void; - /* - onPressIn function - */ onPressIn?: () => void; - /* - onPressOut function - */ onPressOut?: () => void; + + /** + * //FIXME: not in doc but available in exmaples + */ + style?: ViewStyle } @@ -1293,6 +1864,13 @@ declare namespace ReactNative { } + /** + * Do not use unless you have a very good reason. + * All the elements that respond to press should have a visual feedback when touched. + * This is one of the primary reason a "web" app doesn't feel "native". + * + * @see https://facebook.github.io/react-native/docs/touchablewithoutfeedback.html + */ export interface TouchableWithoutFeedbackStatic extends React.ComponentClass { } @@ -1302,25 +1880,19 @@ declare namespace ReactNative { * @see https://facebook.github.io/react-native/docs/touchablehighlight.html#props */ export interface TouchableHighlightProperties extends TouchableWithoutFeedbackProperties, React.Props { + /** - * activeOpacity number - * * Determines what the opacity of the wrapped view should be when touch is active. */ activeOpacity?: number /** - * onHideUnderlay function * * Called immediately after the underlay is hidden */ - onHideUnderlay?: () => void - /** - * onShowUnderlay function - * * Called immediately after the underlay is shown */ onShowUnderlay?: () => void @@ -1332,14 +1904,24 @@ declare namespace ReactNative { /** - * underlayColor string - * * The color of the underlay that will show through when the touch is active. */ underlayColor?: string - } + /** + * A wrapper for making views respond properly to touches. + * On press down, the opacity of the wrapped view is decreased, + * which allows the underlay color to show through, darkening or tinting the view. + * The underlay comes from adding a view to the view hierarchy, + * which can sometimes cause unwanted visual artifacts if not used correctly, + * for example if the backgroundColor of the wrapped view isn't explicitly set to an opaque color. + * + * NOTE: TouchableHighlight supports only one child + * If you wish to have several child components, wrap them in a View. + * + * @see https://facebook.github.io/react-native/docs/touchablehighlight.html + */ export interface TouchableHighlightStatic extends React.ComponentClass { } @@ -1349,23 +1931,62 @@ declare namespace ReactNative { */ export interface TouchableOpacityProperties extends TouchableWithoutFeedbackProperties, React.Props { /** - * activeOpacity number - * * Determines what the opacity of the wrapped view should be when touch is active. + * Defaults to 0.2 */ - activeOpacity?: number; + activeOpacity?: number } + /** + * A wrapper for making views respond properly to touches. + * On press down, the opacity of the wrapped view is decreased, dimming it. + * This is done without actually changing the view hierarchy, + * and in general is easy to add to an app without weird side-effects. + * + * @see https://facebook.github.io/react-native/docs/touchableopacity.html + */ export interface TouchableOpacityStatic extends React.ComponentClass { } - export interface LeftToRightGesture { + /** + * @see https://facebook.github.io/react-native/docs/touchableopacity.html#props + */ + export interface TouchableNativeFeedbackProperties extends TouchableWithoutFeedbackProperties, React.Props { + /** + * Determines the type of background drawable that's going to be used to display feedback. + * It takes an object with type property and extra data depending on the type. + * It's recommended to use one of the following static methods to generate that dictionary: + * 1) TouchableNativeFeedback.SelectableBackground() - will create object that represents android theme's default background for selectable elements (?android:attr/selectableItemBackground) + * 2) TouchableNativeFeedback.SelectableBackgroundBorderless() - will create object that represent android theme's default background for borderless selectable elements (?android:attr/selectableItemBackgroundBorderless). Available on android API level 21+ + * 3) TouchableNativeFeedback.Ripple(color, borderless) - will create object that represents ripple drawable with specified color (as a string). If property borderless evaluates to true the ripple will render outside of the view bounds (see native actionbar buttons as an example of that behavior). This background type is available on Android API level 21+ + */ + background?: any + } + /** + * A wrapper for making views respond properly to touches (Android only). + * On Android this component uses native state drawable to display touch feedback. + * At the moment it only supports having a single View instance as a child node, + * as it's implemented by replacing that View with another instance of RCTView node with some additional properties set. + * + * Background drawable of native feedback touchable can be customized with background property. + * + * @see https://facebook.github.io/react-native/docs/touchablenativefeedback.html#content + */ + export interface TouchableNativeFeedbackStatic extends React.ComponentClass { + SelectableBackground: () => TouchableNativeFeedbackStatic + SelectableBackgroundBorderless: () => TouchableNativeFeedbackStatic + Ripple: ( color: string, borderless?: boolean ) => TouchableNativeFeedbackStatic + } + + + export interface LeftToRightGesture { + //TODO: } export interface AnimationInterpolator { - + //TODO: } // see /NavigatorSceneConfigs.js @@ -1668,7 +2289,7 @@ declare namespace ReactNative { * handle merging of old and new data separately and then pass that into * this function as the `dataBlob`. */ - cloneWithRows( dataBlob: Array | {[key: string]: any}, rowIdentities?: Array ): ListViewDataSource + cloneWithRows( dataBlob: Array | {[key: string ]: any}, rowIdentities?: Array ): ListViewDataSource /** * This performs the same function as the `cloneWithRows` function but here @@ -1681,7 +2302,7 @@ declare namespace ReactNative { * * Note: this returns a new object! */ - cloneWithRowsAndSections( dataBlob: Array | {[key: string]: any}, sectionIdentities?: Array, rowIdentities?: Array> ): ListViewDataSource + cloneWithRowsAndSections( dataBlob: Array | {[key: string]: any}, sectionIdentities?: Array, rowIdentities?: Array> ): ListViewDataSource getRowCount(): number @@ -1719,135 +2340,89 @@ declare namespace ReactNative { } - /** - * @see + * @see https://facebook.github.io/react-native/docs/tabbarios-item.html#props */ - export interface TabBarItemProperties { + export interface TabBarItemProperties extends React.Props { + + /** + * Little red bubble that sits at the top right of the icon. + */ + badge?: string | number + + /** + * A custom icon for the tab. It is ignored when a system icon is defined. + */ + icon?: {uri: string} | string + + /** + * Callback when this tab is being selected, + * you should change the state of your component to set selected={true}. + */ + onPress?: () => void + + /** + * It specifies whether the children are visible or not. If you see a blank content, you probably forgot to add a selected one. + */ + selected?: boolean + + /** + * A custom icon when the tab is selected. + * It is ignored when a system icon is defined. If left empty, the icon will be tinted in blue. + */ + selectedIcon?: {uri: string} | string; + + /** + * React style object. + */ + style?: ViewStyle + + /** + * Items comes with a few predefined system icons. + * Note that if you are using them, the title and selectedIcon will be overriden with the system ones. + * + * enum('bookmarks', 'contacts', 'downloads', 'favorites', 'featured', 'history', 'more', 'most-recent', 'most-viewed', 'recents', 'search', 'top-rated') + */ + systemIcon: string + + /** + * Text that appears under the icon. It is ignored when a system icon is defined. + */ + title?: string } - export interface TabBarItem extends React.ComponentClass { + export interface TabBarItemStatic extends React.ComponentClass { } /** - * @see + * @see https://facebook.github.io/react-native/docs/tabbarios.html#props */ - export interface TabBarIOSProperties { + export interface TabBarIOSProperties extends React.Props { + + /** + * Background color of the tab bar + */ + barTintColor?: string + + style?: ViewStyle + + /** + * Color of the currently selected tab icon + */ + tintColor?: string + + /** + * A Boolean value that indicates whether the tab bar is translucent + */ + translucent?: boolean } export interface TabBarIOSStatic extends React.ComponentClass { - Item: TabBarItem; + Item: TabBarItemStatic; } - export interface CameraRollFetchParams { - first: number; - groupTypes: string; - after?: string; - } - export interface CameraRollNodeInfo { - image: Image; - group_name: string; - timestamp: number; - location: any; - } - - export interface CameraRollEdgeInfo { - node: CameraRollNodeInfo; - } - - export interface CameraRollAssetInfo { - edges: CameraRollEdgeInfo[]; - page_info: { - has_next_page: boolean; - end_cursor: string; - }; - } - - export interface CameraRollStatic extends React.ComponentClass { - getPhotos( fetch: CameraRollFetchParams, - onAsset: ( assetInfo: CameraRollAssetInfo ) => void, - logError: ()=> void ): void; - } - - export interface PanHandlers { - - } - - export interface PanResponderEvent { - - } - - export interface PanResponderGestureState { - stateID: number; - moveX: number; - moveY: number; - x0: number; - y0: number; - dx: number; - dy: number; - vx: number; - vy: number; - numberActiveTouches: number; - // All `gestureState` accounts for timeStamps up until: - _accountsForMovesUpTo: number; - } - - /** - * @param {object} config Enhanced versions of all of the responder callbacks - * that provide not only the typical `ResponderSyntheticEvent`, but also the - * `PanResponder` gesture state. Simply replace the word `Responder` with - * `PanResponder` in each of the typical `onResponder*` callbacks. For - * example, the `config` object would look like: - * - * - `onMoveShouldSetPanResponder: (e, gestureState) => {...}` - * - `onMoveShouldSetPanResponderCapture: (e, gestureState) => {...}` - * - `onStartShouldSetPanResponder: (e, gestureState) => {...}` - * - `onStartShouldSetPanResponderCapture: (e, gestureState) => {...}` - * - `onPanResponderReject: (e, gestureState) => {...}` - * - `onPanResponderGrant: (e, gestureState) => {...}` - * - `onPanResponderStart: (e, gestureState) => {...}` - * - `onPanResponderEnd: (e, gestureState) => {...}` - * - `onPanResponderRelease: (e, gestureState) => {...}` - * - `onPanResponderMove: (e, gestureState) => {...}` - * - `onPanResponderTerminate: (e, gestureState) => {...}` - * - `onPanResponderTerminationRequest: (e, gestureState) => {...}` - * - * In general, for events that have capture equivalents, we update the - * gestureState once in the capture phase and can use it in the bubble phase - * as well. - * - * Be careful with onStartShould* callbacks. They only reflect updated - * `gestureState` for start/end events that bubble/capture to the Node. - * Once the node is the responder, you can rely on every start/end event - * being processed by the gesture and `gestureState` being updated - * accordingly. (numberActiveTouches) may not be totally accurate unless you - * are the responder. - */ - export interface PanResponderCallbacks { - onMoveShouldSetPanResponder?: ( e: PanResponderEvent, gestureState: PanResponderGestureState ) => boolean; - onStartShouldSetPanResponder?: ( e: PanResponderEvent, gestureState: PanResponderGestureState ) => void; - onPanResponderGrant?: ( e: PanResponderEvent, gestureState: PanResponderGestureState ) => void; - onPanResponderMove?: ( e: PanResponderEvent, gestureState: PanResponderGestureState ) => void; - onPanResponderRelease?: ( e: PanResponderEvent, gestureState: PanResponderGestureState ) => void; - onPanResponderTerminate?: ( e: PanResponderEvent, gestureState: PanResponderGestureState ) => void; - - onMoveShouldSetPanResponderCapture?: ( e: PanResponderEvent, gestureState: PanResponderGestureState ) => boolean; - onStartShouldSetPanResponderCapture?: ( e: PanResponderEvent, gestureState: PanResponderGestureState ) => boolean; - onPanResponderReject?: ( e: PanResponderEvent, gestureState: PanResponderGestureState ) => void; - onPanResponderStart?: ( e: PanResponderEvent, gestureState: PanResponderGestureState ) => void; - onPanResponderEnd?: ( e: PanResponderEvent, gestureState: PanResponderGestureState ) => void; - onPanResponderTerminationRequest?: ( e: PanResponderEvent, gestureState: PanResponderGestureState ) => void; - } - - export interface PanResponderInstance { - panHandlers: PanHandlers; - } - - export interface PanResponderStatic { - create( callbacks: PanResponderCallbacks ): PanResponderInstance; - } export interface PixelRatioStatic { get(): number; @@ -1868,19 +2443,6 @@ declare namespace ReactNative { scale: number; } - // @see https://facebook.github.io/react-native/docs/asyncstorage.html#content - export interface AsyncStorageStatic { - getItem( key: string, callback?: ( error?: Error, result?: string ) => void ): Promise; - setItem( key: string, value: string, callback?: ( error?: Error ) => void ): Promise; - removeItem( key: string, callback?: ( error?: Error ) => void ): Promise; - mergeItem( key: string, value: string, callback?: ( error?: Error ) => void ): Promise; - clear( callback?: ( error?: Error ) => void ): Promise; - getAllKeys( callback?: ( error?: Error, keys?: string[] ) => void ): Promise; - multiGet( keys: string[], callback?: ( errors?: Error[], result?: string[][] ) => void ): Promise; - multiSet( keyValuePairs: string[][], callback?: ( errors?: Error[] ) => void ): Promise; - multiRemove( keys: string[], callback?: ( errors?: Error[] ) => void ): Promise; - multiMerge( keyValuePairs: string[][], callback?: ( errors?: Error[] ) => void ): Promise; - } export interface InteractionManagerStatic { runAfterInteractions( fn: () => void ): void; @@ -1915,17 +2477,6 @@ declare namespace ReactNative { shadowRadius?: number } - export interface EdgeInsetsProperties { - top: number - left: number - bottom: number - right: number - } - - export interface PointProperties { - x: number - y: number - } export interface ScrollViewIOSProperties { @@ -1981,7 +2532,7 @@ declare namespace ReactNative { * The amount by which the scroll view content is inset from the edges of the scroll view. * Defaults to {0, 0, 0, 0}. */ - contentInset?: EdgeInsetsProperties // zeros + contentInset?: Insets // zeros /** * Used to manually set the starting scroll offset. @@ -2043,7 +2594,7 @@ declare namespace ReactNative { * This should normally be set to the same value as the contentInset. * Defaults to {0, 0, 0, 0}. */ - scrollIndicatorInsets?: EdgeInsetsProperties //zeroes + scrollIndicatorInsets?: Insets //zeroes /** * When true the scroll view scrolls to top when the status bar is tapped. @@ -2188,84 +2739,533 @@ declare namespace ReactNative { zoomScale: number; } - export interface AppStateIOSStatic { - currentState: string; - addEventListener( type: string, listener: ( state: string ) => void ): void; - removeEventListener( type: string, listener: ( state: string ) => void ): void; + + ////////////////////////////////////////////////////////////////////////// + // + // A P I s + // + ////////////////////////////////////////////////////////////////////////// + + /** + * //FIXME: no documentation - inferred from RCTACtionSheetManager.m + */ + export interface ActionSheetIOSOptions { + title?: string + options?: string[] + cancelButtonIndex?: number + destructiveButtonIndex?: number } - // exported singletons: + /** + * //FIXME: no documentation - inferred from RCTACtionSheetManager.m + */ + export interface ShareActionSheetIOSOptions { + message?: string + url?: string + } + + /** + * @see https://facebook.github.io/react-native/docs/actionsheetios.html#content + * //FIXME: no documentation - inferred from RCTACtionSheetManager.m + */ + export interface ActionSheetIOSStatic { + showActionSheetWithOptions: ( options: ActionSheetIOSOptions, callback: ( buttonIndex: number ) => void ) => void + showShareActionSheetWithOptions: ( options: ShareActionSheetIOSOptions, failureCallback: ( error: Error ) => void, successCallback: ( success: boolean, method: string ) => void ) => void + } + + + /** + * //FIXME: No documentation - inferred from RCTAdSupport.m + */ + export interface AdSupportIOSStatic { + getAdvertisingId: ( onSuccess: ( deviceId: string ) => void, onFailure: ( err: Error ) => void ) => void + getAdvertisingTrackingEnabled: ( onSuccess: ( hasTracking: boolean ) => void, onFailure: ( err: Error ) => void ) => void + } + + interface AlertIOSButton { + text: string + onPress?: () => void + } + + /** + * Launches an alert dialog with the specified title and message. + * + * Optionally provide a list of buttons. + * Tapping any button will fire the respective onPress callback and dismiss the alert. + * By default, the only button will be an 'OK' button + * + * The last button in the list will be considered the 'Primary' button and it will appear bold. + * + * @see https://facebook.github.io/react-native/docs/alertios.html#content + */ + export interface AlertIOSStatic { + alert: ( title: string, message?: string, buttons?: Array, type?: string ) => void + prompt: ( title: string, value?: string, buttons?: Array, callback?: ( value?: string ) => void ) => void + } + + + /** + * AppStateIOS can tell you if the app is in the foreground or background, + * and notify you when the state changes. + * + * AppStateIOS is frequently used to determine the intent and proper behavior + * when handling push notifications. + * + * iOS App States + * active - The app is running in the foreground + * background - The app is running in the background. The user is either in another app or on the home screen + * inactive - This is a transition state that currently never happens for typical React Native apps. + * + * For more information, see Apple's documentation: https://developer.apple.com/library/ios/documentation/iPhone/Conceptual/iPhoneOSProgrammingGuide/TheAppLifeCycle/TheAppLifeCycle.html + * + * @see https://facebook.github.io/react-native/docs/appstateios.html#content + */ + export interface AppStateIOSStatic { + currentState: string + addEventListener( type: string, listener: ( state: string ) => void ): void + removeEventListener( type: string, listener: ( state: string ) => void ): void + } + + /** + * AsyncStorage is a simple, asynchronous, persistent, key-value storage system that is global to the app. + * It should be used instead of LocalStorage. + * + * It is recommended that you use an abstraction on top of AsyncStorage + * instead of AsyncStorage directly for anything more than light usage since it operates globally. + * + * @see https://facebook.github.io/react-native/docs/asyncstorage.html#content + */ + export interface AsyncStorageStatic { + + /** + * Fetches key and passes the result to callback, along with an Error if there is any. + */ + getItem( key: string, callback?: ( error?: Error, result?: string ) => void ): Promise + + /** + * Sets value for key and calls callback on completion, along with an Error if there is any + */ + setItem( key: string, value: string, callback?: ( error?: Error ) => void ): Promise + + removeItem( key: string, callback?: ( error?: Error ) => void ): Promise + + /** + * Merges existing value with input value, assuming they are stringified json. Returns a Promise object. + * Not supported by all native implementation + */ + mergeItem( key: string, value: string, callback?: ( error?: Error ) => void ): Promise + + /** + * Erases all AsyncStorage for all clients, libraries, etc. You probably don't want to call this. + * Use removeItem or multiRemove to clear only your own keys instead. + */ + clear( callback?: ( error?: Error ) => void ): Promise + + /** + * Gets all keys known to the app, for all callers, libraries, etc + */ + getAllKeys( callback?: ( error?: Error, keys?: string[] ) => void ): Promise + + /** + * multiGet invokes callback with an array of key-value pair arrays that matches the input format of multiSet + */ + multiGet( keys: string[], callback?: ( errors?: Error[], result?: string[][] ) => void ): Promise + + /** + * multiSet and multiMerge take arrays of key-value array pairs that match the output of multiGet, + * + * multiSet([['k1', 'val1'], ['k2', 'val2']], cb); + */ + multiSet( keyValuePairs: string[][], callback?: ( errors?: Error[] ) => void ): Promise + + /** + * Delete all the keys in the keys array. + */ + multiRemove( keys: string[], callback?: ( errors?: Error[] ) => void ): Promise + + /** + * Merges existing values with input values, assuming they are stringified json. + * Returns a Promise object. + * + * Not supported by all native implementations. + */ + multiMerge( keyValuePairs: string[][], callback?: ( errors?: Error[] ) => void ): Promise + } + + + export interface CameraRollFetchParams { + first: number; + after?: string; + groupTypes: string; // 'Album','All','Event','Faces','Library','PhotoStream','SavedPhotos' + groupName?: string + assetType?: string + } + + export interface CameraRollNodeInfo { + image: Image; + group_name: string; + timestamp: number; + location: any; + } + + export interface CameraRollEdgeInfo { + node: CameraRollNodeInfo; + } + + export interface CameraRollAssetInfo { + edges: CameraRollEdgeInfo[]; + page_info: { + has_next_page: boolean; + end_cursor: string; + }; + } + + /** + * CameraRoll provides access to the local camera roll / gallery. + */ + export interface CameraRollStatic { + + GroupTypesOptions: string[] //'Album','All','Event','Faces','Library','PhotoStream','SavedPhotos' + + /** + * Saves the image to the camera roll / gallery. + * + * The CameraRoll API is not yet implemented for Android. + * + * @tag On Android, this is a local URI, such as "file:///sdcard/img.png". + * On iOS, the tag can be one of the following: + * local URI + * assets-library tag + * a tag not maching any of the above, which means the image data will be stored in memory (and consume memory as long as the process is alive) + * + * @param successCallback Invoked with the value of tag on success. + * @param errorCallback Invoked with error message on error. + */ + saveImageWithTag( tag: string, successCallback: ( tag?: string ) => void, errorCallback: ( error: Error ) => void ): void + + /** + * Invokes callback with photo identifier objects from the local camera roll of the device matching shape defined by getPhotosReturnChecker. + * + * @param {object} params See getPhotosParamChecker. + * @param {function} callback Invoked with arg of shape defined by getPhotosReturnChecker on success. + * @param {function} errorCallback Invoked with error message on error. + */ + getPhotos( fetch: CameraRollFetchParams, + callback: ( assetInfo: CameraRollAssetInfo ) => void, + errorCallback: ( error: Error )=> void ): void; + } + + export interface FetchableListenable { + fetch: () => Promise + + /** + * eventName is expected to be `change` + * //FIXME: No doc - inferred from NetInfo.js + */ + addEventListener: (eventName: string, listener: (result: T) => void) => void + + /** + * eventName is expected to be `change` + * //FIXME: No doc - inferred from NetInfo.js + */ + removeEventListener: (eventName: string, listener: (result: T) => void) => void + } + + /** + * NetInfo exposes info about online/offline status + * + * Asynchronously determine if the device is online and on a cellular network. + * + * - `none` - device is offline + * - `wifi` - device is online and connected via wifi, or is the iOS simulator + * - `cell` - device is connected via Edge, 3G, WiMax, or LTE + * - `unknown` - error case and the network status is unknown + + * @see https://facebook.github.io/react-native/docs/netinfo.html#content + */ + export interface NetInfoStatic extends FetchableListenable { + + /** + * + * Available on all platforms. + * Asynchronously fetch a boolean to determine internet connectivity. + */ + isConnected: FetchableListenable + + //FIXME: Documentation missing + isConnectionMetered: any + } + + /** + * //FIXME: Documentation ? + */ + export interface PanResponderEvent { + + bubbles: boolean + cancelable: boolean + currentTarget: number + defaultPrevented: boolean + dispatchConfig: any + dispatchMarker: any + eventPhase: any + isDefaultPrevented: () => boolean + isPropagationStopped: () => boolean + isTrusted: boolean + nativeEvent: GestureResponderEvent + path: any + target: number + timeStamp: number + touchHistory: any[] + type: any + + } + + + export interface PanResponderGestureState { + + /** + * ID of the gestureState- persisted as long as there at least one touch on + */ + stateID: number + + /** + * the latest screen coordinates of the recently-moved touch + */ + moveX: number + + /** + * the latest screen coordinates of the recently-moved touch + */ + moveY: number + + /** + * the screen coordinates of the responder grant + */ + x0: number + + /** + * the screen coordinates of the responder grant + */ + y0: number + + /** + * accumulated distance of the gesture since the touch started + */ + dx: number + + /** + * accumulated distance of the gesture since the touch started + */ + dy: number + + /** + * current velocity of the gesture + */ + vx: number + + /** + * current velocity of the gesture + */ + vy: number + + /** + * Number of touches currently on screeen + */ + numberActiveTouches: number + + + // All `gestureState` accounts for timeStamps up until: + _accountsForMovesUpTo: number + } + + + /** + * @see documentation of GestureResponderHandlers + */ + export interface PanResponderCallbacks { + onMoveShouldSetPanResponder?: ( e: PanResponderEvent, gestureState: PanResponderGestureState ) => boolean + onStartShouldSetPanResponder?: ( e: PanResponderEvent, gestureState: PanResponderGestureState ) => void + onPanResponderGrant?: ( e: PanResponderEvent, gestureState: PanResponderGestureState ) => void + onPanResponderMove?: ( e: PanResponderEvent, gestureState: PanResponderGestureState ) => void + onPanResponderRelease?: ( e: PanResponderEvent, gestureState: PanResponderGestureState ) => void + onPanResponderTerminate?: ( e: PanResponderEvent, gestureState: PanResponderGestureState ) => void + + onMoveShouldSetPanResponderCapture?: ( e: PanResponderEvent, gestureState: PanResponderGestureState ) => boolean + onStartShouldSetPanResponderCapture?: ( e: PanResponderEvent, gestureState: PanResponderGestureState ) => boolean + onPanResponderReject?: ( e: PanResponderEvent, gestureState: PanResponderGestureState ) => void + onPanResponderStart?: ( e: PanResponderEvent, gestureState: PanResponderGestureState ) => void + onPanResponderEnd?: ( e: PanResponderEvent, gestureState: PanResponderGestureState ) => void + onPanResponderTerminationRequest?: ( e: PanResponderEvent, gestureState: PanResponderGestureState ) => boolean + } + + export interface PanResponderInstance { + panHandlers: GestureResponderHandlers + } + + /** + * PanResponder reconciles several touches into a single gesture. + * It makes single-touch gestures resilient to extra touches, + * and can be used to recognize simple multi-touch gestures. + * + * It provides a predictable wrapper of the responder handlers provided by the gesture responder system. + * For each handler, it provides a new gestureState object alongside the normal event. + */ + export interface PanResponderStatic { + /** + * @param config Enhanced versions of all of the responder callbacks + * that provide not only the typical `ResponderSyntheticEvent`, but also the + * `PanResponder` gesture state. Simply replace the word `Responder` with + * `PanResponder` in each of the typical `onResponder*` callbacks. For + * example, the `config` object would look like: + * + * - `onMoveShouldSetPanResponder: (e, gestureState) => {...}` + * - `onMoveShouldSetPanResponderCapture: (e, gestureState) => {...}` + * - `onStartShouldSetPanResponder: (e, gestureState) => {...}` + * - `onStartShouldSetPanResponderCapture: (e, gestureState) => {...}` + * - `onPanResponderReject: (e, gestureState) => {...}` + * - `onPanResponderGrant: (e, gestureState) => {...}` + * - `onPanResponderStart: (e, gestureState) => {...}` + * - `onPanResponderEnd: (e, gestureState) => {...}` + * - `onPanResponderRelease: (e, gestureState) => {...}` + * - `onPanResponderMove: (e, gestureState) => {...}` + * - `onPanResponderTerminate: (e, gestureState) => {...}` + * - `onPanResponderTerminationRequest: (e, gestureState) => {...}` + * + * In general, for events that have capture equivalents, we update the + * gestureState once in the capture phase and can use it in the bubble phase + * as well. + * + * Be careful with onStartShould* callbacks. They only reflect updated + * `gestureState` for start/end events that bubble/capture to the Node. + * Once the node is the responder, you can rely on every start/end event + * being processed by the gesture and `gestureState` being updated + * accordingly. (numberActiveTouches) may not be totally accurate unless you + * are the responder. + */ + create( config: PanResponderCallbacks ): PanResponderInstance + } + + + + ////////////////////////////////////////////////////////////////////////// + // + // R E - E X P O R T S + // + ////////////////////////////////////////////////////////////////////////// + // export var AppRegistry: AppRegistryStatic; - export var ActivityIndicatorIOS: ActivityIndicatorIOSStatic; - export type ActivityIndicatorIOS = ActivityIndicatorIOSStatic; - - export var AsyncStorage: AsyncStorageStatic; - export type AsyncStorage = AsyncStorageStatic; - - export var CameraRoll: CameraRollStatic; - export type CameraRoll = CameraRollStatic; + export var ActivityIndicatorIOS: ActivityIndicatorIOSStatic + export type ActivityIndicatorIOS = ActivityIndicatorIOSStatic export var DatePickerIOS: DatePickerIOSStatic export type DatePickerIOS = DatePickerIOSStatic - export var Image: ImageStatic; - export type Image = ImageStatic; + export var Image: ImageStatic + export type Image = ImageStatic - export var ListView: ListViewStatic; - export type ListView = ListViewStatic; + export var LayoutAnimation: LayoutAnimationStatic + export type LayoutAnimation = LayoutAnimationStatic - export var Navigator: NavigatorStatic; - export type Navigator = NavigatorStatic; + export var ListView: ListViewStatic + export type ListView = ListViewStatic - export var NavigatorIOS: NavigatorIOSStatic; - export type NavigatorIOS = NavigatorIOSStatic; + export var MapView: MapViewStatic + export type MapView = MapViewStatic - export var SliderIOS: SliderIOSStatic; - export type SliderIOS = SliderIOSStatic; + export var Navigator: NavigatorStatic + export type Navigator = NavigatorStatic + + export var NavigatorIOS: NavigatorIOSStatic + export type NavigatorIOS = NavigatorIOSStatic + + export var PickerIOS: PickerIOSStatic + export type PickerIOS = PickerIOSStatic + + export var SliderIOS: SliderIOSStatic + export type SliderIOS = SliderIOSStatic export var ScrollView: ScrollViewStatic export type ScrollView = ScrollViewStatic - export var StyleSheet: StyleSheetStatic; - export type StyleSheet = StyleSheetStatic; + export var StyleSheet: StyleSheetStatic + export type StyleSheet = StyleSheetStatic - export var TabBarIOS: TabBarIOSStatic; - export type TabBarIOS = TabBarIOSStatic; + export var SwitchIOS: SwitchIOSStatic + export type SwitchIOS = SwitchIOSStatic - export var Text: TextStatic; - export type Text = TextStatic; + export var TabBarIOS: TabBarIOSStatic + export type TabBarIOS = TabBarIOSStatic + + export var Text: TextStatic + export type Text = TextStatic export var TextInput: TextInputStatic export type TextInput = TextInputStatic - export var TouchableHighlight: TouchableHighlightStatic; - export type TouchableHighlight = TouchableHighlightStatic; + export var TouchableHighlight: TouchableHighlightStatic + export type TouchableHighlight = TouchableHighlightStatic - export var TouchableOpacity: TouchableOpacityStatic; - export type TouchableOpacity = TouchableOpacityStatic; + export var TouchableNativeFeedback: TouchableNativeFeedbackStatic + export type TouchableNativeFeedback = TouchableNativeFeedbackStatic - export var TouchableWithoutFeedback: TouchableWithoutFeedbackStatic; - export type TouchableWithoutFeedback= TouchableWithoutFeedbackStatic; + export var TouchableOpacity: TouchableOpacityStatic + export type TouchableOpacity = TouchableOpacityStatic - export var View: ViewStatic; - export type View = ViewStatic; + export var TouchableWithoutFeedback: TouchableWithoutFeedbackStatic + export type TouchableWithoutFeedback= TouchableWithoutFeedbackStatic - export var AlertIOS: React.ComponentClass; - export var SegmentedControlIOS: React.ComponentClass; - export var SwitchIOS: React.ComponentClass; + export var View: ViewStatic + export type View = ViewStatic - export var PixelRatio: PixelRatioStatic; - export var DeviceEventEmitter: DeviceEventEmitterStatic; - export var DeviceEventSubscription: DeviceEventSubscriptionStatic; - export type DeviceEventSubscription = DeviceEventSubscriptionStatic; - export var InteractionManager: InteractionManagerStatic; - export var PanResponder: PanResponderStatic; - export var AppStateIOS: AppStateIOSStatic; + export var WebView: WebViewStatic + export type WebView = WebViewStatic + + + //////////// APIS ////////////// + export var ActionSheetIOS: ActionSheetIOSStatic + export type ActionSheetIOS = ActionSheetIOSStatic + + export var AdSupportIOS: AdSupportIOSStatic + export type AdSupportIOS = AdSupportIOSStatic + + export var AlertIOS: AlertIOSStatic + export type AlertIOS = AlertIOSStatic + + export var AppStateIOS: AppStateIOSStatic + export type AppStateIOS = AppStateIOSStatic + + export var AsyncStorage: AsyncStorageStatic + export type AsyncStorage = AsyncStorageStatic + + export var CameraRoll: CameraRollStatic + export type CameraRoll = CameraRollStatic + + export var NetInfo: NetInfoStatic + export type NetInfo = NetInfoStatic + + export var PanResponder: PanResponderStatic + export type PanResponder = PanResponderStatic + + export var SegmentedControlIOS: React.ComponentClass + + export var PixelRatio: PixelRatioStatic + export var DeviceEventEmitter: DeviceEventEmitterStatic + export var DeviceEventSubscription: DeviceEventSubscriptionStatic + export type DeviceEventSubscription = DeviceEventSubscriptionStatic + export var InteractionManager: InteractionManagerStatic + + + + + ////////////////////////////////////////////////////////////////////////// + // + // R E A C T - 0 . 1 4 + // + ////////////////////////////////////////////////////////////////////////// - //react re-exported export type ReactType = React.ReactType; export interface ReactElement

    extends React.ReactElement

    {} @@ -2490,8 +3490,8 @@ declare namespace ReactNative { //FIXME: Documentation ? export interface TestModuleStatic { - verifySnapshot: (done: (indicator?: any) => void) => void - markTestPassed: (indicator: any) => void + verifySnapshot: ( done: ( indicator?: any ) => void ) => void + markTestPassed: ( indicator: any ) => void markTestCompleted: () => void } diff --git a/react/react.d.ts b/react/react.d.ts index e3d0f43f7b..d8f3d512d3 100644 --- a/react/react.d.ts +++ b/react/react.d.ts @@ -448,6 +448,1235 @@ declare namespace __React { strokeOpacity?: number; strokeWidth?: number; + // Remaining properties auto-extracted from http://docs.webplatform.org. + // License: http://docs.webplatform.org/wiki/Template:CC-by-3.0 + /** + * Aligns a flex container's lines within the flex container when there is extra space in the cross-axis, similar to how justify-content aligns individual items within the main-axis. + */ + alignContent?: any; + + /** + * Sets the default alignment in the cross axis for all of the flex container's items, including anonymous flex items, similarly to how justify-content aligns items along the main axis. + */ + alignItems?: any; + + /** + * Allows the default alignment to be overridden for individual flex items. + */ + alignSelf?: any; + + /** + * This property allows precise alignment of elements, such as graphics, that do not have a baseline-table or lack the desired baseline in their baseline-table. With the alignment-adjust property, the position of the baseline identified by the alignment-baseline can be explicitly determined. It also determines precisely the alignment point for each glyph within a textual element. + */ + alignmentAdjust?: any; + + alignmentBaseline?: any; + + /** + * Defines a length of time to elapse before an animation starts, allowing an animation to begin execution some time after it is applied. + */ + animationDelay?: any; + + /** + * Defines whether an animation should run in reverse on some or all cycles. + */ + animationDirection?: any; + + /** + * Specifies how many times an animation cycle should play. + */ + animationIterationCount?: any; + + /** + * Defines the list of animations that apply to the element. + */ + animationName?: any; + + /** + * Defines whether an animation is running or paused. + */ + animationPlayState?: any; + + /** + * Allows changing the style of any element to platform-based interface elements or vice versa. + */ + appearance?: any; + + /** + * Determines whether or not the “back” side of a transformed element is visible when facing the viewer. + */ + backfaceVisibility?: any; + + /** + * This property describes how the element's background images should blend with each other and the element's background color. + * The value is a list of blend modes that corresponds to each background image. Each element in the list will apply to the corresponding element of background-image. If a property doesn’t have enough comma-separated values to match the number of layers, the UA must calculate its used value by repeating the list of values until there are enough. + */ + backgroundBlendMode?: any; + + backgroundComposite?: any; + + /** + * Applies one or more background images to an element. These can be any valid CSS image, including url() paths to image files or CSS gradients. + */ + backgroundImage?: any; + + /** + * Specifies what the background-position property is relative to. + */ + backgroundOrigin?: any; + + /** + * Sets the horizontal position of a background image. + */ + backgroundPositionX?: any; + + /** + * Background-repeat defines if and how background images will be repeated after they have been sized and positioned + */ + backgroundRepeat?: any; + + /** + * Obsolete - spec retired, not implemented. + */ + baselineShift?: any; + + /** + * Non standard. Sets or retrieves the location of the Dynamic HTML (DHTML) behavior. + */ + behavior?: any; + + /** + * Shorthand property that defines the different properties of all four sides of an element's border in a single declaration. It can be used to set border-width, border-style and border-color, or a subset of these. + */ + border?: any; + + /** + * Defines the shape of the border of the bottom-left corner. + */ + borderBottomLeftRadius?: any; + + /** + * Defines the shape of the border of the bottom-right corner. + */ + borderBottomRightRadius?: any; + + /** + * Sets the width of an element's bottom border. To set all four borders, use the border-width shorthand property which sets the values simultaneously for border-top-width, border-right-width, border-bottom-width, and border-left-width. + */ + borderBottomWidth?: any; + + /** + * Border-collapse can be used for collapsing the borders between table cells + */ + borderCollapse?: any; + + /** + * The CSS border-color property sets the color of an element's four borders. This property can have from one to four values, made up of the elementary properties: • border-top-color + * • border-right-color + * • border-bottom-color + * • border-left-color The default color is the currentColor of each of these values. + * If you provide one value, it sets the color for the element. Two values set the horizontal and vertical values, respectively. Providing three values sets the top, vertical, and bottom values, in that order. Four values set all for sides: top, right, bottom, and left, in that order. + */ + borderColor?: any; + + /** + * Specifies different corner clipping effects, such as scoop (inner curves), bevel (straight cuts) or notch (cut-off rectangles). Works along with border-radius to specify the size of each corner effect. + */ + borderCornerShape?: any; + + /** + * The property border-image-source is used to set the image to be used instead of the border style. If this is set to none the border-style is used instead. + */ + borderImageSource?: any; + + /** + * The border-image-width CSS property defines the offset to use for dividing the border image in nine parts, the top-left corner, central top edge, top-right-corner, central right edge, bottom-right corner, central bottom edge, bottom-left corner, and central right edge. They represent inward distance from the top, right, bottom, and left edges. + */ + borderImageWidth?: any; + + /** + * Shorthand property that defines the border-width, border-style and border-color of an element's left border in a single declaration. Note that you can use the corresponding longhand properties to set specific individual properties of the left border — border-left-width, border-left-style and border-left-color. + */ + borderLeft?: any; + + /** + * The CSS border-left-color property sets the color of an element's left border. This page explains the border-left-color value, but often you will find it more convenient to fix the border's left color as part of a shorthand set, either border-left or border-color. + * Colors can be defined several ways. For more information, see Usage. + */ + borderLeftColor?: any; + + /** + * Sets the style of an element's left border. To set all four borders, use the shorthand property, border-style. Otherwise, you can set the borders individually with border-top-style, border-right-style, border-bottom-style, border-left-style. + */ + borderLeftStyle?: any; + + /** + * Sets the width of an element's left border. To set all four borders, use the border-width shorthand property which sets the values simultaneously for border-top-width, border-right-width, border-bottom-width, and border-left-width. + */ + borderLeftWidth?: any; + + /** + * Shorthand property that defines the border-width, border-style and border-color of an element's right border in a single declaration. Note that you can use the corresponding longhand properties to set specific individual properties of the right border — border-right-width, border-right-style and border-right-color. + */ + borderRight?: any; + + /** + * Sets the color of an element's right border. This page explains the border-right-color value, but often you will find it more convenient to fix the border's right color as part of a shorthand set, either border-right or border-color. + * Colors can be defined several ways. For more information, see Usage. + */ + borderRightColor?: any; + + /** + * Sets the style of an element's right border. To set all four borders, use the shorthand property, border-style. Otherwise, you can set the borders individually with border-top-style, border-right-style, border-bottom-style, border-left-style. + */ + borderRightStyle?: any; + + /** + * Sets the width of an element's right border. To set all four borders, use the border-width shorthand property which sets the values simultaneously for border-top-width, border-right-width, border-bottom-width, and border-left-width. + */ + borderRightWidth?: any; + + /** + * Specifies the distance between the borders of adjacent cells. + */ + borderSpacing?: any; + + /** + * Sets the style of an element's four borders. This property can have from one to four values. With only one value, the value will be applied to all four borders; otherwise, this works as a shorthand property for each of border-top-style, border-right-style, border-bottom-style, border-left-style, where each border style may be assigned a separate value. + */ + borderStyle?: any; + + /** + * Shorthand property that defines the border-width, border-style and border-color of an element's top border in a single declaration. Note that you can use the corresponding longhand properties to set specific individual properties of the top border — border-top-width, border-top-style and border-top-color. + */ + borderTop?: any; + + /** + * Sets the color of an element's top border. This page explains the border-top-color value, but often you will find it more convenient to fix the border's top color as part of a shorthand set, either border-top or border-color. + * Colors can be defined several ways. For more information, see Usage. + */ + borderTopColor?: any; + + /** + * Sets the rounding of the top-left corner of the element. + */ + borderTopLeftRadius?: any; + + /** + * Sets the rounding of the top-right corner of the element. + */ + borderTopRightRadius?: any; + + /** + * Sets the style of an element's top border. To set all four borders, use the shorthand property, border-style. Otherwise, you can set the borders individually with border-top-style, border-right-style, border-bottom-style, border-left-style. + */ + borderTopStyle?: any; + + /** + * Sets the width of an element's top border. To set all four borders, use the border-width shorthand property which sets the values simultaneously for border-top-width, border-right-width, border-bottom-width, and border-left-width. + */ + borderTopWidth?: any; + + /** + * Sets the width of an element's four borders. This property can have from one to four values. This is a shorthand property for setting values simultaneously for border-top-width, border-right-width, border-bottom-width, and border-left-width. + */ + borderWidth?: any; + + /** + * Obsolete. + */ + boxAlign?: any; + + /** + * Breaks a box into fragments creating new borders, padding and repeating backgrounds or lets it stay as a continuous box on a page break, column break, or, for inline elements, at a line break. + */ + boxDecorationBreak?: any; + + /** + * Deprecated + */ + boxDirection?: any; + + /** + * Do not use. This property has been replaced by the flex-wrap property. + * Gets or sets a value that specifies the direction to add successive rows or columns when the value of box-lines is set to multiple. + */ + boxLineProgression?: any; + + /** + * Do not use. This property has been replaced by the flex-wrap property. + * Gets or sets a value that specifies whether child elements wrap onto multiple lines or columns based on the space available in the object. + */ + boxLines?: any; + + /** + * Do not use. This property has been replaced by flex-order. + * Specifies the ordinal group that a child element of the object belongs to. This ordinal value identifies the display order (along the axis defined by the box-orient property) for the group. + */ + boxOrdinalGroup?: any; + + /** + * The CSS break-after property allows you to force a break on multi-column layouts. More specifically, it allows you to force a break after an element. It allows you to determine if a break should occur, and what type of break it should be. The break-after CSS property describes how the page, column or region break behaves after the generated box. If there is no generated box, the property is ignored. + */ + breakAfter?: any; + + /** + * Control page/column/region breaks that fall above a block of content + */ + breakBefore?: any; + + /** + * Control page/column/region breaks that fall within a block of content + */ + breakInside?: any; + + /** + * The clear CSS property specifies if an element can be positioned next to or must be positioned below the floating elements that precede it in the markup. + */ + clear?: any; + + /** + * Deprecated; see clip-path. + * Lets you specify the dimensions of an absolutely positioned element that should be visible, and the element is clipped into this shape, and displayed. + */ + clip?: any; + + /** + * Clipping crops an graphic, so that only a portion of the graphic is rendered, or filled. This clip-rule property, when used with the clip-path property, defines which clip rule, or algorithm, to use when filling the different parts of a graphics. + */ + clipRule?: any; + + /** + * The color property sets the color of an element's foreground content (usually text), accepting any standard CSS color from keywords and hex values to RGB(a) and HSL(a). + */ + color?: any; + + /** + * Specifies how to fill columns (balanced or sequential). + */ + columnFill?: any; + + /** + * The column-gap property controls the width of the gap between columns in multi-column elements. + */ + columnGap?: any; + + /** + * Sets the width, style, and color of the rule between columns. + */ + columnRule?: any; + + /** + * Specifies the color of the rule between columns. + */ + columnRuleColor?: any; + + /** + * Specifies the width of the rule between columns. + */ + columnRuleWidth?: any; + + /** + * The column-span CSS property makes it possible for an element to span across all columns when its value is set to all. An element that spans more than one column is called a spanning element. + */ + columnSpan?: any; + + /** + * Specifies the width of columns in multi-column elements. + */ + columnWidth?: any; + + /** + * This property is a shorthand property for setting column-width and/or column-count. + */ + columns?: any; + + /** + * The counter-increment property accepts one or more names of counters (identifiers), each one optionally followed by an integer which specifies the value by which the counter should be incremented (e.g. if the value is 2, the counter increases by 2 each time it is invoked). + */ + counterIncrement?: any; + + /** + * The counter-reset property contains a list of one or more names of counters, each one optionally followed by an integer (otherwise, the integer defaults to 0.) Each time the given element is invoked, the counters specified by the property are set to the given integer. + */ + counterReset?: any; + + /** + * The cue property specifies sound files (known as an "auditory icon") to be played by speech media agents before and after presenting an element's content; if only one file is specified, it is played both before and after. The volume at which the file(s) should be played, relative to the volume of the main element, may also be specified. The icon files may also be set separately with the cue-before and cue-after properties. + */ + cue?: any; + + /** + * The cue-after property specifies a sound file (known as an "auditory icon") to be played by speech media agents after presenting an element's content; the volume at which the file should be played may also be specified. The shorthand property cue sets cue sounds for both before and after the element is presented. + */ + cueAfter?: any; + + /** + * The direction CSS property specifies the text direction/writing direction. The rtl is used for Hebrew or Arabic text, the ltr is for other languages. + */ + direction?: any; + + /** + * This property specifies the type of rendering box used for an element. It is a shorthand property for many other display properties. + */ + display?: any; + + /** + * The ‘fill’ property paints the interior of the given graphical element. The area to be painted consists of any areas inside the outline of the shape. To determine the inside of the shape, all subpaths are considered, and the interior is determined according to the rules associated with the current value of the ‘fill-rule’ property. The zero-width geometric outline of a shape is included in the area to be painted. + */ + fill?: any; + + /** + * The ‘fill-rule’ property indicates the algorithm which is to be used to determine what parts of the canvas are included inside the shape. For a simple, non-intersecting path, it is intuitively clear what region lies "inside"; however, for a more complex path, such as a path that intersects itself or where one subpath encloses another, the interpretation of "inside" is not so obvious. + * The ‘fill-rule’ property provides two options for how the inside of a shape is determined: + */ + fillRule?: any; + + /** + * Applies various image processing effects. This property is largely unsupported. See Compatibility section for more information. + */ + filter?: any; + + /** + * Obsolete, do not use. This property has been renamed to align-items. + * Specifies the alignment (perpendicular to the layout axis defined by the flex-direction property) of child elements of the object. + */ + flexAlign?: any; + + /** + * The flex-basis CSS property describes the initial main size of the flex item before any free space is distributed according to the flex factors described in the flex property (flex-grow and flex-shrink). + */ + flexBasis?: any; + + /** + * The flex-direction CSS property describes how flex items are placed in the flex container, by setting the direction of the flex container's main axis. + */ + flexDirection?: any; + + /** + * The flex-flow CSS property defines the flex container's main and cross axis. It is a shorthand property for the flex-direction and flex-wrap properties. + */ + flexFlow?: any; + + /** + * Do not use. This property has been renamed to align-self + * Specifies the alignment (perpendicular to the layout axis defined by flex-direction) of child elements of the object. + */ + flexItemAlign?: any; + + /** + * Do not use. This property has been renamed to align-content. + * Specifies how a flexbox's lines align within the flexbox when there is extra space along the axis that is perpendicular to the axis defined by the flex-direction property. + */ + flexLinePack?: any; + + /** + * Gets or sets a value that specifies the ordinal group that a flexbox element belongs to. This ordinal value identifies the display order for the group. + */ + flexOrder?: any; + + /** + * Elements which have the style float are floated horizontally. These elements can move as far to the left or right of the containing element. All elements after the floating element will flow around it, but elements before the floating element are not impacted. If several floating elements are placed after each other, they will float next to each other as long as there is room. + */ + float?: any; + + /** + * Flows content from a named flow (specified by a corresponding flow-into) through selected elements to form a dynamic chain of layout regions. + */ + flowFrom?: any; + + /** + * The font property is shorthand that allows you to do one of two things: you can either set up six of the most mature font properties in one line, or you can set one of a choice of keywords to adopt a system font setting. + */ + font?: any; + + /** + * The font-family property allows one or more font family names and/or generic family names to be specified for usage on the selected element(s)' text. The browser then goes through the list; for each character in the selection it applies the first font family that has an available glyph for that character. + */ + fontFamily?: any; + + /** + * The font-kerning property allows contextual adjustment of inter-glyph spacing, i.e. the spaces between the characters in text. This property controls metric kerning - that utilizes adjustment data contained in the font. Optical Kerning is not supported as yet. + */ + fontKerning?: any; + + /** + * The font-size-adjust property adjusts the font-size of the fallback fonts defined with font-family, so that the x-height is the same no matter what font is used. This preserves the readability of the text when fallback happens. + */ + fontSizeAdjust?: any; + + /** + * Allows you to expand or condense the widths for a normal, condensed, or expanded font face. + */ + fontStretch?: any; + + /** + * The font-style property allows normal, italic, or oblique faces to be selected. Italic forms are generally cursive in nature while oblique faces are typically sloped versions of the regular face. Oblique faces can be simulated by artificially sloping the glyphs of the regular face. + */ + fontStyle?: any; + + /** + * This value specifies whether the user agent is allowed to synthesize bold or oblique font faces when a font family lacks bold or italic faces. + */ + fontSynthesis?: any; + + /** + * The font-variant property enables you to select the small-caps font within a font family. + */ + fontVariant?: any; + + /** + * Fonts can provide alternate glyphs in addition to default glyph for a character. This property provides control over the selection of these alternate glyphs. + */ + fontVariantAlternates?: any; + + /** + * Lays out one or more grid items bound by 4 grid lines. Shorthand for setting grid-column-start, grid-column-end, grid-row-start, and grid-row-end in a single declaration. + */ + gridArea?: any; + + /** + * Controls a grid item's placement in a grid area, particularly grid position and a grid span. Shorthand for setting grid-column-start and grid-column-end in a single declaration. + */ + gridColumn?: any; + + /** + * Controls a grid item's placement in a grid area as well as grid position and a grid span. The grid-column-end property (with grid-row-start, grid-row-end, and grid-column-start) determines a grid item's placement by specifying the grid lines of a grid item's grid area. + */ + gridColumnEnd?: any; + + /** + * Determines a grid item's placement by specifying the starting grid lines of a grid item's grid area . A grid item's placement in a grid area consists of a grid position and a grid span. See also ( grid-row-start, grid-row-end, and grid-column-end) + */ + gridColumnStart?: any; + + /** + * Gets or sets a value that indicates which row an element within a Grid should appear in. Shorthand for setting grid-row-start and grid-row-end in a single declaration. + */ + gridRow?: any; + + /** + * Determines a grid item’s placement by specifying the block-end. A grid item's placement in a grid area consists of a grid position and a grid span. The grid-row-end property (with grid-row-start, grid-column-start, and grid-column-end) determines a grid item's placement by specifying the grid lines of a grid item's grid area. + */ + gridRowEnd?: any; + + /** + * Specifies a row position based upon an integer location, string value, or desired row size. + * css/properties/grid-row is used as short-hand for grid-row-position and grid-row-position + */ + gridRowPosition?: any; + + gridRowSpan?: any; + + /** + * Specifies named grid areas which are not associated with any particular grid item, but can be referenced from the grid-placement properties. The syntax of the grid-template-areas property also provides a visualization of the structure of the grid, making the overall layout of the grid container easier to understand. + */ + gridTemplateAreas?: any; + + /** + * Specifies (with grid-template-rows) the line names and track sizing functions of the grid. Each sizing function can be specified as a length, a percentage of the grid container’s size, a measurement of the contents occupying the column or row, or a fraction of the free space in the grid. + */ + gridTemplateColumns?: any; + + /** + * Specifies (with grid-template-columns) the line names and track sizing functions of the grid. Each sizing function can be specified as a length, a percentage of the grid container’s size, a measurement of the contents occupying the column or row, or a fraction of the free space in the grid. + */ + gridTemplateRows?: any; + + /** + * Sets the height of an element. The content area of the element height does not include the padding, border, and margin of the element. + */ + height?: any; + + /** + * Specifies the minimum number of characters in a hyphenated word + */ + hyphenateLimitChars?: any; + + /** + * Indicates the maximum number of successive hyphenated lines in an element. The ‘no-limit’ value means that there is no limit. + */ + hyphenateLimitLines?: any; + + /** + * Specifies the maximum amount of trailing whitespace (before justification) that may be left in a line before hyphenation is triggered to pull part of a word from the next line back up into the current one. + */ + hyphenateLimitZone?: any; + + /** + * Specifies whether or not words in a sentence can be split by the use of a manual or automatic hyphenation mechanism. + */ + hyphens?: any; + + imeMode?: any; + + layoutGrid?: any; + + layoutGridChar?: any; + + layoutGridLine?: any; + + layoutGridMode?: any; + + layoutGridType?: any; + + /** + * Sets the left edge of an element + */ + left?: any; + + /** + * The letter-spacing CSS property specifies the spacing behavior between text characters. + */ + letterSpacing?: any; + + /** + * Deprecated. Gets or sets line-breaking rules for text in selected languages such as Japanese, Chinese, and Korean. + */ + lineBreak?: any; + + /** + * Shorthand property that sets the list-style-type, list-style-position and list-style-image properties in one declaration. + */ + listStyle?: any; + + /** + * This property sets the image that will be used as the list item marker. When the image is available, it will replace the marker set with the 'list-style-type' marker. That also means that if the image is not available, it will show the style specified by list-style-property + */ + listStyleImage?: any; + + /** + * Specifies if the list-item markers should appear inside or outside the content flow. + */ + listStylePosition?: any; + + /** + * Specifies the type of list-item marker in a list. + */ + listStyleType?: any; + + /** + * The margin property is shorthand to allow you to set all four margins of an element at once. Its equivalent longhand properties are margin-top, margin-right, margin-bottom and margin-left. Negative values are also allowed. + */ + margin?: any; + + /** + * margin-bottom sets the bottom margin of an element. + */ + marginBottom?: any; + + /** + * margin-left sets the left margin of an element. + */ + marginLeft?: any; + + /** + * margin-right sets the right margin of an element. + */ + marginRight?: any; + + /** + * margin-top sets the top margin of an element. + */ + marginTop?: any; + + /** + * The marquee-direction determines the initial direction in which the marquee content moves. + */ + marqueeDirection?: any; + + /** + * The 'marquee-style' property determines a marquee's scrolling behavior. + */ + marqueeStyle?: any; + + /** + * This property is shorthand for setting mask-image, mask-mode, mask-repeat, mask-position, mask-clip, mask-origin, mask-composite and mask-size. Omitted values are set to their original properties' initial values. + */ + mask?: any; + + /** + * This property is shorthand for setting mask-border-source, mask-border-slice, mask-border-width, mask-border-outset, and mask-border-repeat. Omitted values are set to their original properties' initial values. + */ + maskBorder?: any; + + /** + * This property specifies how the images for the sides and the middle part of the mask image are scaled and tiled. The first keyword applies to the horizontal sides, the second one applies to the vertical ones. If the second keyword is absent, it is assumed to be the same as the first, similar to the CSS border-image-repeat property. + */ + maskBorderRepeat?: any; + + /** + * This property specifies inward offsets from the top, right, bottom, and left edges of the mask image, dividing it into nine regions: four corners, four edges, and a middle. The middle image part is discarded and treated as fully transparent black unless the fill keyword is present. The four values set the top, right, bottom and left offsets in that order, similar to the CSS border-image-slice property. + */ + maskBorderSlice?: any; + + /** + * Specifies an image to be used as a mask. An image that is empty, fails to download, is non-existent, or cannot be displayed is ignored and does not mask the element. + */ + maskBorderSource?: any; + + /** + * This property sets the width of the mask box image, similar to the CSS border-image-width property. + */ + maskBorderWidth?: any; + + /** + * Determines the mask painting area, which defines the area that is affected by the mask. The painted content of an element may be restricted to this area. + */ + maskClip?: any; + + /** + * For elements rendered as a single box, specifies the mask positioning area. For elements rendered as multiple boxes (e.g., inline boxes on several lines, boxes on several pages) specifies which boxes box-decoration-break operates on to determine the mask positioning area(s). + */ + maskOrigin?: any; + + /** + * This property must not be used. It is no longer included in any standard or standard track specification, nor is it implemented in any browser. It is only used when the text-align-last property is set to size. It controls allowed adjustments of font-size to fit line content. + */ + maxFontSize?: any; + + /** + * Sets the maximum height for an element. It prevents the height of the element to exceed the specified value. If min-height is specified and is greater than max-height, max-height is overridden. + */ + maxHeight?: any; + + /** + * Sets the maximum width for an element. It limits the width property to be larger than the value specified in max-width. + */ + maxWidth?: any; + + /** + * Sets the minimum width of an element. It limits the width property to be not smaller than the value specified in min-width. + */ + minWidth?: any; + + /** + * The CSS outline property is a shorthand property for setting one or more of the individual outline properties outline-style, outline-width and outline-color in a single rule. In most cases the use of this shortcut is preferable and more convenient. + * Outlines differ from borders in the following ways: • Outlines do not take up space, they are drawn above the content. + * • Outlines may be non-rectangular. They are rectangular in Gecko/Firefox. Internet Explorer attempts to place the smallest contiguous outline around all elements or shapes that are indicated to have an outline. Opera draws a non-rectangular shape around a construct. + */ + outline?: any; + + /** + * The outline-color property sets the color of the outline of an element. An outline is a line that is drawn around elements, outside the border edge, to make the element stand out. + */ + outlineColor?: any; + + /** + * The outline-offset property offsets the outline and draw it beyond the border edge. + */ + outlineOffset?: any; + + /** + * The overflow property controls how extra content exceeding the bounding box of an element is rendered. It can be used in conjunction with an element that has a fixed width and height, to eliminate text-induced page distortion. + */ + overflow?: any; + + /** + * Specifies the preferred scrolling methods for elements that overflow. + */ + overflowStyle?: any; + + /** + * The overflow-x property is a specific case of the generic overflow property. It controls how extra content exceeding the x-axis of the bounding box of an element is rendered. + */ + overflowX?: any; + + /** + * The padding optional CSS property sets the required padding space on one to four sides of an element. The padding area is the space between an element and its border. Negative values are not allowed but decimal values are permitted. The element size is treated as fixed, and the content of the element shifts toward the center as padding is increased. + * The padding property is a shorthand to avoid setting each side separately (padding-top, padding-right, padding-bottom, padding-left). + */ + padding?: any; + + /** + * The padding-bottom CSS property of an element sets the padding space required on the bottom of an element. The padding area is the space between the content of the element and its border. Contrary to margin-bottom values, negative values of padding-bottom are invalid. + */ + paddingBottom?: any; + + /** + * The padding-left CSS property of an element sets the padding space required on the left side of an element. The padding area is the space between the content of the element and its border. Contrary to margin-left values, negative values of padding-left are invalid. + */ + paddingLeft?: any; + + /** + * The padding-right CSS property of an element sets the padding space required on the right side of an element. The padding area is the space between the content of the element and its border. Contrary to margin-right values, negative values of padding-right are invalid. + */ + paddingRight?: any; + + /** + * The padding-top CSS property of an element sets the padding space required on the top of an element. The padding area is the space between the content of the element and its border. Contrary to margin-top values, negative values of padding-top are invalid. + */ + paddingTop?: any; + + /** + * The page-break-after property is supported in all major browsers. With CSS3, page-break-* properties are only aliases of the break-* properties. The CSS3 Fragmentation spec defines breaks for all CSS box fragmentation. + */ + pageBreakAfter?: any; + + /** + * The page-break-before property sets the page-breaking behavior before an element. With CSS3, page-break-* properties are only aliases of the break-* properties. The CSS3 Fragmentation spec defines breaks for all CSS box fragmentation. + */ + pageBreakBefore?: any; + + /** + * Sets the page-breaking behavior inside an element. With CSS3, page-break-* properties are only aliases of the break-* properties. The CSS3 Fragmentation spec defines breaks for all CSS box fragmentation. + */ + pageBreakInside?: any; + + /** + * The pause property determines how long a speech media agent should pause before and after presenting an element. It is a shorthand for the pause-before and pause-after properties. + */ + pause?: any; + + /** + * The pause-after property determines how long a speech media agent should pause after presenting an element. It may be replaced by the shorthand property pause, which sets pause time before and after. + */ + pauseAfter?: any; + + /** + * The pause-before property determines how long a speech media agent should pause before presenting an element. It may be replaced by the shorthand property pause, which sets pause time before and after. + */ + pauseBefore?: any; + + /** + * The perspective property defines how far an element is placed from the view on the z-axis, from the screen to the viewer. + * Perspective defines how an object is viewed. In graphic arts, perspective is the representation on a flat surface of what the viewer's eye would see in a 3D space. (See Wikipedia for more information about graphical perspective and for related illustrations.) + * The illusion of perspective on a flat surface, such as a computer screen, is created by projecting points on the flat surface as they would appear if the flat surface were a window through which the viewer was looking at the object. In discussion of virtual environments, this flat surface is called a projection plane. + */ + perspective?: any; + + /** + * The perspective-origin property establishes the origin for the perspective property. It effectively sets the X and Y position at which the viewer appears to be looking at the children of the element. + * When used with perspective, perspective-origin changes the appearance of an object, as if a viewer were looking at it from a different origin. An object appears differently if a viewer is looking directly at it versus looking at it from below, above, or from the side. Thus, the perspective-origin is like a vanishing point. + * The default value of perspective-origin is 50% 50%. This displays an object as if the viewer's eye were positioned directly at the center of the screen, both top-to-bottom and left-to-right. A value of 0% 0% changes the object as if the viewer was looking toward the top left angle. A value of 100% 100% changes the appearance as if viewed toward the bottom right angle. + */ + perspectiveOrigin?: any; + + /** + * The pointer-events property allows you to control whether an element can be the target for the pointing device (e.g, mouse, pen) events. + */ + pointerEvents?: any; + + /** + * The position property controls the type of positioning used by an element within its parent elements. The effect of the position property depends on a lot of factors, for example the position property of parent elements. + */ + position?: any; + + /** + * Obsolete: unsupported. + * This property determines whether or not a full-width punctuation mark character should be trimmed if it appears at the beginning of a line, so that its "ink" lines up with the first glyph in the line above and below. + */ + punctuationTrim?: any; + + /** + * Sets the type of quotation marks for embedded quotations. + */ + quotes?: any; + + /** + * Controls whether the last region in a chain displays additional 'overset' content according its default overflow property, or if it displays a fragment of content as if it were flowing into a subsequent region. + */ + regionFragment?: any; + + /** + * The rest-after property determines how long a speech media agent should pause after presenting an element's main content, before presenting that element's exit cue sound. It may be replaced by the shorthand property rest, which sets rest time before and after. + */ + restAfter?: any; + + /** + * The rest-before property determines how long a speech media agent should pause after presenting an intro cue sound for an element, before presenting that element's main content. It may be replaced by the shorthand property rest, which sets rest time before and after. + */ + restBefore?: any; + + /** + * Specifies the position an element in relation to the right side of the containing element. + */ + right?: any; + + rubyAlign?: any; + + rubyPosition?: any; + + /** + * Defines the alpha channel threshold used to extract a shape from an image. Can be thought of as a "minimum opacity" threshold; that is, a value of 0.5 means that the shape will enclose all the pixels that are more than 50% opaque. + */ + shapeImageThreshold?: any; + + /** + * A future level of CSS Shapes will define a shape-inside property, which will define a shape to wrap content within the element. See Editor's Draft and CSSWG wiki page on next-level plans + */ + shapeInside?: any; + + /** + * Adds a margin to a shape-outside. In effect, defines a new shape that is the smallest contour around all the points that are the shape-margin distance outward perpendicular to each point on the underlying shape. For points where a perpendicular direction is not defined (e.g., a triangle corner), takes all points on a circle centered at the point and with a radius of the shape-margin distance. This property accepts only non-negative values. + */ + shapeMargin?: any; + + /** + * Declares a shape around which text should be wrapped, with possible modifications from the shape-margin property. The shape defined by shape-outside and shape-margin changes the geometry of a float element's float area. + */ + shapeOutside?: any; + + /** + * The speak property determines whether or not a speech synthesizer will read aloud the contents of an element. + */ + speak?: any; + + /** + * The speak-as property determines how the speech synthesizer interprets the content: words as whole words or as a sequence of letters, numbers as a numerical value or a sequence of digits, punctuation as pauses in speech or named punctuation characters. + */ + speakAs?: any; + + /** + * The tab-size CSS property is used to customise the width of a tab (U+0009) character. + */ + tabSize?: any; + + /** + * The 'table-layout' property controls the algorithm used to lay out the table cells, rows, and columns. + */ + tableLayout?: any; + + /** + * The text-align CSS property describes how inline content like text is aligned in its parent block element. text-align does not control the alignment of block elements itself, only their inline content. + */ + textAlign?: any; + + /** + * The text-align-last CSS property describes how the last line of a block element or a line before line break is aligned in its parent block element. + */ + textAlignLast?: any; + + /** + * The text-decoration CSS property is used to set the text formatting to underline, overline, line-through or blink. + * underline and overline decorations are positioned under the text, line-through over it. + */ + textDecoration?: any; + + /** + * Sets the color of any text decoration, such as underlines, overlines, and strike throughs. + */ + textDecorationColor?: any; + + /** + * Sets what kind of line decorations are added to an element, such as underlines, overlines, etc. + */ + textDecorationLine?: any; + + textDecorationLineThrough?: any; + + textDecorationNone?: any; + + textDecorationOverline?: any; + + /** + * Specifies what parts of an element’s content are skipped over when applying any text decoration. + */ + textDecorationSkip?: any; + + /** + * This property specifies the style of the text decoration line drawn on the specified element. The intended meaning for the values are the same as those of the border-style-properties. + */ + textDecorationStyle?: any; + + textDecorationUnderline?: any; + + /** + * The text-emphasis property will apply special emphasis marks to the elements text. Slightly similar to the text-decoration property only that this property can have affect on the line-height. It also is noted that this is shorthand for text-emphasis-style and for text-emphasis-color. + */ + textEmphasis?: any; + + /** + * The text-emphasis-color property specifies the foreground color of the emphasis marks. + */ + textEmphasisColor?: any; + + /** + * The text-emphasis-style property applies special emphasis marks to an element's text. + */ + textEmphasisStyle?: any; + + /** + * This property helps determine an inline box's block-progression dimension, derived from the text-height and font-size properties for non-replaced elements, the height or the width for replaced elements, and the stacked block-progression dimension for inline-block elements. The block-progression dimension determines the position of the padding, border and margin for the element. + */ + textHeight?: any; + + /** + * Specifies the amount of space horizontally that should be left on the first line of the text of an element. This horizontal spacing is at the beginning of the first line and is in respect to the left edge of the containing block box. + */ + textIndent?: any; + + textJustifyTrim?: any; + + textKashidaSpace?: any; + + /** + * The text-line-through property is a shorthand property for text-line-through-style, text-line-through-color and text-line-through-mode. (Considered obsolete; use text-decoration instead.) + */ + textLineThrough?: any; + + /** + * Specifies the line colors for the line-through text decoration. + * (Considered obsolete; use text-decoration-color instead.) + */ + textLineThroughColor?: any; + + /** + * Sets the mode for the line-through text decoration, determining whether the text decoration affects the space characters or not. + * (Considered obsolete; use text-decoration-skip instead.) + */ + textLineThroughMode?: any; + + /** + * Specifies the line style for line-through text decoration. + * (Considered obsolete; use text-decoration-style instead.) + */ + textLineThroughStyle?: any; + + /** + * Specifies the line width for the line-through text decoration. + */ + textLineThroughWidth?: any; + + /** + * The text-overflow shorthand CSS property determines how overflowed content that is not displayed is signaled to the users. It can be clipped, display an ellipsis ('…', U+2026 HORIZONTAL ELLIPSIS) or a Web author-defined string. It covers the two long-hand properties text-overflow-mode and text-overflow-ellipsis + */ + textOverflow?: any; + + /** + * The text-overline property is the shorthand for the text-overline-style, text-overline-width, text-overline-color, and text-overline-mode properties. + */ + textOverline?: any; + + /** + * Specifies the line color for the overline text decoration. + */ + textOverlineColor?: any; + + /** + * Sets the mode for the overline text decoration, determining whether the text decoration affects the space characters or not. + */ + textOverlineMode?: any; + + /** + * Specifies the line style for overline text decoration. + */ + textOverlineStyle?: any; + + /** + * Specifies the line width for the overline text decoration. + */ + textOverlineWidth?: any; + + /** + * The text-rendering CSS property provides information to the browser about how to optimize when rendering text. Options are: legibility, speed or geometric precision. + */ + textRendering?: any; + + /** + * Obsolete: unsupported. + */ + textScript?: any; + + /** + * The CSS text-shadow property applies one or more drop shadows to the text and of an element. Each shadow is specified as an offset from the text, along with optional color and blur radius values. + */ + textShadow?: any; + + /** + * This property transforms text for styling purposes. (It has no effect on the underlying content.) + */ + textTransform?: any; + + /** + * Unsupported. + * This property will add a underline position value to the element that has an underline defined. + */ + textUnderlinePosition?: any; + + /** + * After review this should be replaced by text-decoration should it not? + * This property will set the underline style for text with a line value for underline, overline, and line-through. + */ + textUnderlineStyle?: any; + + /** + * This property specifies how far an absolutely positioned box's top margin edge is offset below the top edge of the box's containing block. For relatively positioned boxes, the offset is with respect to the top edges of the box itself (i.e., the box is given a position in the normal flow, then offset from that position according to these properties). + */ + top?: any; + + /** + * Determines whether touch input may trigger default behavior supplied by the user agent, such as panning or zooming. + */ + touchAction?: any; + + /** + * CSS transforms allow elements styled with CSS to be transformed in two-dimensional or three-dimensional space. Using this property, elements can be translated, rotated, scaled, and skewed. The value list may consist of 2D and/or 3D transform values. + */ + transform?: any; + + /** + * This property defines the origin of the transformation axes relative to the element to which the transformation is applied. + */ + transformOrigin?: any; + + /** + * This property allows you to define the relative position of the origin of the transformation grid along the z-axis. + */ + transformOriginZ?: any; + + /** + * This property specifies how nested elements are rendered in 3D space relative to their parent. + */ + transformStyle?: any; + + /** + * The transition CSS property is a shorthand property for transition-property, transition-duration, transition-timing-function, and transition-delay. It allows to define the transition between two states of an element. + */ + transition?: any; + + /** + * Defines when the transition will start. A value of ‘0s’ means the transition will execute as soon as the property is changed. Otherwise, the value specifies an offset from the moment the property is changed, and the transition will delay execution by that offset. + */ + transitionDelay?: any; + + /** + * The 'transition-duration' property specifies the length of time a transition animation takes to complete. + */ + transitionDuration?: any; + + /** + * The 'transition-property' property specifies the name of the CSS property to which the transition is applied. + */ + transitionProperty?: any; + + /** + * Sets the pace of action within a transition + */ + transitionTimingFunction?: any; + + /** + * The unicode-bidi CSS property specifies the level of embedding with respect to the bidirectional algorithm. + */ + unicodeBidi?: any; + + /** + * unicode-range allows you to set a specific range of characters to be downloaded from a font (embedded using @font-face) and made available for use on the current page. + */ + unicodeRange?: any; + + /** + * This is for all the high level UX stuff. + */ + userFocus?: any; + + /** + * For inputing user content + */ + userInput?: any; + + /** + * The vertical-align property controls how inline elements or text are vertically aligned compared to the baseline. If this property is used on table-cells it controls the vertical alignment of content of the table cell. + */ + verticalAlign?: any; + + /** + * The visibility property specifies whether the boxes generated by an element are rendered. + */ + visibility?: any; + + /** + * The voice-balance property sets the apparent position (in stereo sound) of the synthesized voice for spoken media. + */ + voiceBalance?: any; + + /** + * The voice-duration property allows the author to explicitly set the amount of time it should take a speech synthesizer to read an element's content, for example to allow the speech to be synchronized with other media. With a value of auto (the default) the length of time it takes to read the content is determined by the content itself and the voice-rate property. + */ + voiceDuration?: any; + + /** + * The voice-family property sets the speaker's voice used by a speech media agent to read an element. The speaker may be specified as a named character (to match a voice option in the speech reading software) or as a generic description of the age and gender of the voice. Similar to the font-family property for visual media, a comma-separated list of fallback options may be given in case the speech reader does not recognize the character name or cannot synthesize the requested combination of generic properties. + */ + voiceFamily?: any; + + /** + * The voice-pitch property sets pitch or tone (high or low) for the synthesized speech when reading an element; the pitch may be specified absolutely or relative to the normal pitch for the voice-family used to read the text. + */ + voicePitch?: any; + + /** + * The voice-range property determines how much variation in pitch or tone will be created by the speech synthesize when reading an element. Emphasized text, grammatical structures and punctuation may all be rendered as changes in pitch, this property determines how strong or obvious those changes are; large ranges are associated with enthusiastic or emotional speech, while small ranges are associated with flat or mechanical speech. + */ + voiceRange?: any; + + /** + * The voice-rate property sets the speed at which the voice synthesized by a speech media agent will read content. + */ + voiceRate?: any; + + /** + * The voice-stress property sets the level of vocal emphasis to be used for synthesized speech reading the element. + */ + voiceStress?: any; + + /** + * The voice-volume property sets the volume for spoken content in speech media. It replaces the deprecated volume property. + */ + voiceVolume?: any; + + /** + * The white-space property controls whether and how white space inside the element is collapsed, and whether lines may wrap at unforced "soft wrap" opportunities. + */ + whiteSpace?: any; + + /** + * Obsolete: unsupported. + */ + whiteSpaceTreatment?: any; + + /** + * Specifies the width of the content area of an element. The content area of the element width does not include the padding, border, and margin of the element. + */ + width?: any; + + /** + * The word-break property is often used when there is long generated content that is strung together without and spaces or hyphens to beak apart. A common case of this is when there is a long URL that does not have any hyphens. This case could potentially cause the breaking of the layout as it could extend past the parent element. + */ + wordBreak?: any; + + /** + * The word-spacing CSS property specifies the spacing behavior between "words". + */ + wordSpacing?: any; + + /** + * An alias of css/properties/overflow-wrap, word-wrap defines whether to break words when the content exceeds the boundaries of its container. + */ + wordWrap?: any; + + /** + * Specifies how exclusions affect inline content within block-level elements. Elements lay out their inline content in their content area but wrap around exclusion areas. + */ + wrapFlow?: any; + + /** + * Set the value that is used to offset the inner wrap shape from other shapes. Inline content that intersects a shape with this property will be pushed by this shape's margin. + */ + wrapMargin?: any; + + /** + * Obsolete and unsupported. Do not use. + * This CSS property controls the text when it reaches the end of the block in which it is enclosed. + */ + wrapOption?: any; + + /** + * writing-mode specifies if lines of text are laid out horizontally or vertically, and the direction which lines of text and blocks progress. + */ + writingMode?: any; + + [propertyName: string]: any; } diff --git a/reflux/reflux.d.ts b/reflux/reflux.d.ts index 035bca7f3f..d0d79a67c5 100644 --- a/reflux/reflux.d.ts +++ b/reflux/reflux.d.ts @@ -52,6 +52,7 @@ declare module RefluxCore { function createActions(definition: ActionsDefinition): any; function createActions(definitions: string[]): any; + function connect(store: Store, key?: string):void; function listenTo(store: Store, handler: string):void; function setState(state: any):void; } diff --git a/request-promise/request-promise-tests.ts b/request-promise/request-promise-tests.ts index 347cca818d..8c7840ad41 100644 --- a/request-promise/request-promise-tests.ts +++ b/request-promise/request-promise-tests.ts @@ -20,6 +20,21 @@ rp(options) // --> Displays length of response from server after post +//Defaults tests +(() => { + const githubUrl = 'https://github.com'; + const defaultJarRequest = rp.defaults({ jar: true }); + defaultJarRequest.get(githubUrl).then(() => {}); + //defaultJarRequest(); //this line doesn't compile (and shouldn't) + const defaultUrlRequest = rp.defaults({ url: githubUrl }); + defaultUrlRequest().then(() => {}); + defaultUrlRequest.get().then(() => {}); + const defaultBodyRequest = defaultUrlRequest.defaults({body: '{}', json: true}); + defaultBodyRequest.get().then(() => {}); + defaultBodyRequest.post().then(() => {}); + defaultBodyRequest.put().then(() => {}); +})(); + // Get full response after DELETE options = { method: 'DELETE', diff --git a/request-promise/request-promise.d.ts b/request-promise/request-promise.d.ts index 94e3d3152e..d442e527fc 100644 --- a/request-promise/request-promise.d.ts +++ b/request-promise/request-promise.d.ts @@ -19,12 +19,12 @@ declare module 'request-promise' { promise(): Promise; } - interface RequestPromiseOptions extends request.OptionalOptions { + interface RequestPromiseOptions extends request.CoreOptions { simple?: boolean; transform?: (body: any, response: http.IncomingMessage) => any; resolveWithFullResponse?: boolean; } - var requestPromise: request.RequestAPI; + var requestPromise: request.RequestAPI; export = requestPromise; } diff --git a/request/request-tests.ts b/request/request-tests.ts index 2e878893b3..1f638d8647 100644 --- a/request/request-tests.ts +++ b/request/request-tests.ts @@ -31,6 +31,22 @@ var bodyArr: request.RequestPart[] = [{ body: value }]; +//Defaults tests +(() => { + const githubUrl = 'https://github.com'; + const defaultJarRequest = request.defaults({ jar: true }); + defaultJarRequest.get(githubUrl); + //defaultJarRequest(); //this line doesn't compile (and shouldn't) + const defaultUrlRequest = request.defaults({ url: githubUrl }); + defaultUrlRequest(); + defaultUrlRequest.get(); + const defaultBodyRequest = defaultUrlRequest.defaults({body: '{}', json: true}); + defaultBodyRequest.get(); + defaultBodyRequest.post(); + defaultBodyRequest.put(); +})(); + + // --- --- --- --- --- --- --- --- --- --- --- --- obj = req.toJSON(); @@ -526,6 +542,9 @@ var specialRequest = baseRequest.defaults({ headers: {special: 'special value'} }); +const urlRequest = specialRequest.defaults({url: 'https://github.com'}); +urlRequest({}, function(error, response, body) {console.log(body);}); + request.put(url); request.patch(url); request.post(url); diff --git a/request/request.d.ts b/request/request.d.ts index bba6848561..d47ed5f9aa 100644 --- a/request/request.d.ts +++ b/request/request.d.ts @@ -16,35 +16,40 @@ declare module 'request' { import fs = require('fs'); namespace request { - export interface RequestAPI { - defaults(options: TOptions): RequestAPI; + export interface RequestAPI { + + defaults(options: TOptions): RequestAPI; + defaults(options: RequiredUriUrl & TOptions): DefaultUriUrlRequestApi; + (uri: string, options?: TOptions, callback?: RequestCallback): TRequest; (uri: string, callback?: RequestCallback): TRequest; - (options?: RequiredOptions & TOptions, callback?: RequestCallback): TRequest; + (options: TUriUrlOptions & TOptions, callback?: RequestCallback): TRequest; get(uri: string, options?: TOptions, callback?: RequestCallback): TRequest; get(uri: string, callback?: RequestCallback): TRequest; - get(options: RequiredOptions & TOptions, callback?: RequestCallback): TRequest; + get(options: TUriUrlOptions & TOptions, callback?: RequestCallback): TRequest; post(uri: string, options?: TOptions, callback?: RequestCallback): TRequest; post(uri: string, callback?: RequestCallback): TRequest; - post(options: RequiredOptions & TOptions, callback?: RequestCallback): TRequest; + post(options: TUriUrlOptions & TOptions, callback?: RequestCallback): TRequest; put(uri: string, options?: TOptions, callback?: RequestCallback): TRequest; put(uri: string, callback?: RequestCallback): TRequest; - put(options: RequiredOptions & TOptions, callback?: RequestCallback): TRequest; + put(options: TUriUrlOptions & TOptions, callback?: RequestCallback): TRequest; head(uri: string, options?: TOptions, callback?: RequestCallback): TRequest; head(uri: string, callback?: RequestCallback): TRequest; - head(options: RequiredOptions & TOptions, callback?: RequestCallback): TRequest; + head(options: TUriUrlOptions & TOptions, callback?: RequestCallback): TRequest; patch(uri: string, options?: TOptions, callback?: RequestCallback): TRequest; patch(uri: string, callback?: RequestCallback): TRequest; - patch(options: RequiredOptions & TOptions, callback?: RequestCallback): TRequest; + patch(options: TUriUrlOptions & TOptions, callback?: RequestCallback): TRequest; del(uri: string, options?: TOptions, callback?: RequestCallback): TRequest; del(uri: string, callback?: RequestCallback): TRequest; - del(options: RequiredOptions & TOptions, callback?: RequestCallback): TRequest; + del(options: TUriUrlOptions & TOptions, callback?: RequestCallback): TRequest; forever(agentOptions: any, optionsArg: any): TRequest; jar(): CookieJar; @@ -54,15 +59,22 @@ declare module 'request' { debug: boolean; } - interface UriOptions { - uri: string; + interface DefaultUriUrlRequestApi extends RequestAPI { + + defaults(options: TOptions): DefaultUriUrlRequestApi; + (): TRequest; + get(): TRequest; + post(): TRequest; + put(): TRequest; + head(): TRequest; + patch(): TRequest; + del(): TRequest; } - interface UrlOptions { - url: string; - } - - interface OptionalOptions { + interface CoreOptions { + baseUrl?: string; callback?: (error: any, response: http.IncomingMessage, body: any) => void; jar?: any; // CookieJar formData?: any; // Object @@ -100,8 +112,19 @@ declare module 'request' { har?: HttpArchiveRequest; } - export type RequiredOptions = UriOptions | UrlOptions; - export type Options = RequiredOptions & OptionalOptions; + interface UriOptions { + uri: string; + } + interface UrlOptions { + url: string; + } + export type RequiredUriUrl = UriOptions | UrlOptions; + + interface OptionalUriUrl { + uri?: string; + url?: string; + } + export type Options = RequiredUriUrl & CoreOptions; export interface RequestCallback { (error: any, response: http.IncomingMessage, body: any): void; @@ -223,6 +246,6 @@ declare module 'request' { toString(): string; } } - var request: request.RequestAPI; + var request: request.RequestAPI; export = request; } diff --git a/scalike/scalike-tests.ts b/scalike/scalike-tests.ts new file mode 100644 index 0000000000..6f2057468a --- /dev/null +++ b/scalike/scalike-tests.ts @@ -0,0 +1,29 @@ +/// + +import {Optional, Some, None, Try, Right, Left, Either, Future} from "scalike"; + +// Optional +Optional(1).map(x => x + 1); // Some(2) +Optional(null).map(x => x + 1); // None +Optional(undefined).map(x => x + 1); // None +Optional(1).flatMap(x => Some(x + 1)).fold(0, x => x + 1); // 3 + +// Try +function something() { return 1; } +Try(something); // Success(1) +function throwError() { throw new Error; } +Try(throwError); // Failure(Error) +Try(() => 1).map(x => x + 1); // Success(2) + +// Either +function validate(x: number): Either { + return x !== 1 ? Left('this is not 1') : Right(x); +} +validate(1).right().getOrElse(0); // 1 +validate(2).left().getOrElse("err"); // "this is not 1" + +// Future +Future(something).map(x => x + 1); // Future(2) +Future.successful(1).value; // Optional(Success(1) +const fu = Future(something); +Future.sequence([fu, fu, fu]); // Future([1, 1, 1]) diff --git a/scalike/scalike.d.ts b/scalike/scalike.d.ts new file mode 100644 index 0000000000..1c14a1dc36 --- /dev/null +++ b/scalike/scalike.d.ts @@ -0,0 +1,271 @@ +// Type definitions for scalike API +// Project: https://github.com/ryoppy/scalike-typescript +// Definitions by: ryoppy +// Definitions: https://github.com/DefinitelyTyped/DefinitelyTyped + +/// + +declare module scalike { + + export interface Either { + value: A | B; + isLeft: boolean; + isRight: boolean; + left(): LeftProjection; + right(): RightProjection; + fold(fa: (a: A) => X, fb: (b: B) => X): X; + swap(): Either; + } + export function Right(b: B): Either; + export function Left(a: A): Either; + export class LeftProjection { + private self; + constructor(self: Either); + toString(): string; + get(): A; + foreach(f: (a: A) => void): void; + getOrElse(x: X): A; + forall(f: (a: A) => boolean): boolean; + exists(f: (a: A) => boolean): boolean; + filter(f: (a: A) => boolean): Optional>; + map(f: (a: A) => X): Either; + flatMap(f: (a: A) => Either): Either; + toOptional(): Optional; + } + export class RightProjection { + private self; + constructor(self: Either); + toString(): string; + get(): B; + foreach(f: (b: B) => void): void; + getOrElse(x: X): B; + forall(f: (b: B) => boolean): boolean; + exists(f: (b: B) => boolean): boolean; + filter(f: (b: B) => boolean): Optional>; + map(f: (b: B) => X): Either; + flatMap(f: (a: B) => Either): Either; + toOptional(): Optional; + } + + export interface Optional { + isEmpty: boolean; + nonEmpty: boolean; + get(): A; + getOrElse(a: B): A; + map(f: (a: A) => B): Optional; + fold(ifEmpty: B, f: (a: A) => B): B; + flatten(): Optional; + filter(f: (a: A) => boolean): Optional; + contains(b: B): boolean; + exists(f: (a: A) => boolean): boolean; + forall(f: (a: A) => boolean): boolean; + flatMap(f: (a: A) => Optional): Optional; + foreach(f: (a: A) => void): void; + orElse(ob: Optional): Optional; + apply1(ob: Optional, f: (a: A, b: B) => C): Optional; + apply2(ob: Optional, oc: Optional, f: (a: A, b: B, c: C) => D): Optional; + chain(ob: Optional): OptionalBuilder1; + } + export const None: Optional; + export function Optional(a: A): Optional; + export function Some(a: A): Optional; + export class OptionalBuilder1 { + private oa; + private ob; + constructor(oa: Optional, ob: Optional); + run(f: (a: A, b: B) => C): Optional; + chain(oc: Optional): OptionalBuilder2; + } + export class OptionalBuilder2 { + private oa; + private ob; + private oc; + constructor(oa: Optional, ob: Optional, oc: Optional); + run(f: (a: A, b: B, c: C) => D): Optional; + chain(od: Optional): OptionalBuilder3; + } + export class OptionalBuilder3 { + private oa; + private ob; + private oc; + private od; + constructor(oa: Optional, ob: Optional, oc: Optional, od: Optional); + run(f: (a: A, b: B, c: C, d: D) => E): Optional; + chain(oe: Optional): OptionalBuilder4; + } + export class OptionalBuilder4 { + private oa; + private ob; + private oc; + private od; + private oe; + constructor(oa: Optional, ob: Optional, oc: Optional, od: Optional, oe: Optional); + run(f: (a: A, b: B, c: C, d: D, e: E) => F): Optional; + chain(of: Optional): OptionalBuilder5; + } + export class OptionalBuilder5 { + private oa; + private ob; + private oc; + private od; + private oe; + private of; + constructor(oa: Optional, ob: Optional, oc: Optional, od: Optional, oe: Optional, of: Optional); + run(f: (a: A, b: B, c: C, d: D, e: E, f: F) => G): Optional; + } + + export interface Try { + isSuccess: boolean; + isFailure: boolean; + get(): A; + getError(): Error; + fold(fe: (e: Error) => B, ff: (a: A) => B): B; + getOrElse(a: B): A; + orElse(a: Try): Try; + foreach(f: (a: A) => void): void; + flatMap(f: (a: A) => Try): Try; + map(f: (a: A) => B): Try; + filter(f: (a: A) => boolean): Try; + toOptional(): Optional; + failed(): Try; + transform(fs: (a: A) => Try, ff: (e: Error) => Try): Try; + recover(f: (e: Error) => Optional>): Try; + apply1(ob: Try, f: (a: A, b: B) => C): Try; + apply2(ob: Try, oc: Try, f: (a: A, b: B, c: C) => D): Try; + chain(ob: Try): TryBuilder1; + } + export function Try(f: () => A): Try; + export function Success(a: A): Try; + export function Failure(e: Error): Try; + + export class TryBuilder1 { + private oa; + private ob; + constructor(oa: Try, ob: Try); + run(f: (a: A, b: B) => C): Try; + chain(oc: Try): TryBuilder2; + } + export class TryBuilder2 { + private oa; + private ob; + private oc; + constructor(oa: Try, ob: Try, oc: Try); + run(f: (a: A, b: B, c: C) => D): Try; + chain(od: Try): TryBuilder3; + } + export class TryBuilder3 { + private oa; + private ob; + private oc; + private od; + constructor(oa: Try, ob: Try, oc: Try, od: Try); + run(f: (a: A, b: B, c: C, d: D) => E): Try; + chain(oe: Try): TryBuilder4; + } + export class TryBuilder4 { + private oa; + private ob; + private oc; + private od; + private oe; + constructor(oa: Try, ob: Try, oc: Try, od: Try, oe: Try); + run(f: (a: A, b: B, c: C, d: D, e: E) => F): Try; + chain(of: Try): TryBuilder5; + } + export class TryBuilder5 { + private oa; + private ob; + private oc; + private od; + private oe; + private of; + constructor(oa: Try, ob: Try, oc: Try, od: Try, oe: Try, of: Try); + run(f: (a: A, b: B, c: C, d: D, e: E, f: F) => G): Try; + } + + export interface Future { + getPromise(): Promise; + onComplete(f: (t: Try) => B): void; + isCompleted(): boolean; + value(): Optional>; + failed(): Future; + foreach(f: (a: A) => B): void; + transform(f: (t: Try) => Try): Future; + transform1(fs: (a: A) => B, ff: (e: Error) => Error): Future; + transformWith(f: (t: Try) => Future): Future; + map(f: (a: A) => B): Future; + flatMap(f: (a: A) => Future): Future; + filter(f: (a: A) => boolean): Future; + recover(f: (e: Error) => Optional): Future; + recoverWith(f: (e: Error) => Optional>): Future; + zip(fu: Future): Future<[A, B]>; + zipWith(fu: Future, f: (a: A, b: B) => C): Future; + fallbackTo(fu: Future): Future; + andThen(f: (t: Try) => B): Future; + apply1(ob: Future, f: (a: A, b: B) => C): Future; + apply2(ob: Future, oc: Future, f: (a: A, b: B, c: C) => D): Future; + chain(ob: Future): FutureBuilder1; + } + export function Future(f: Promise | (() => A)): Future; + export namespace Future { + function fromPromise(p: Promise): Future; + function unit(): Future; + function failed(e: Error): Future; + function successful(a: A): Future; + function fromTry(t: Try): Future; + function sequence(fus: Array>): Future>; + function firstCompletedOf(fus: Array>): Future; + function find(fus: Array>, f: (a: A) => boolean): Future>; + function foldLeft(fu: Array>, zero: B, f: (b: B, a: A) => B): Future; + function reduceLeft(fu: Array>, f: (b: B, a: A) => B): Future; + function traverse(fu: Array, f: (a: A) => Future): Future>; + } + export class FutureBuilder1 { + private oa; + private ob; + constructor(oa: Future, ob: Future); + run(f: (a: A, b: B) => C): Future; + chain(oc: Future): FutureBuilder2; + } + export class FutureBuilder2 { + private oa; + private ob; + private oc; + constructor(oa: Future, ob: Future, oc: Future); + run(f: (a: A, b: B, c: C) => D): Future; + chain(od: Future): FutureBuilder3; + } + export class FutureBuilder3 { + private oa; + private ob; + private oc; + private od; + constructor(oa: Future, ob: Future, oc: Future, od: Future); + run(f: (a: A, b: B, c: C, d: D) => E): Future; + chain(oe: Future): FutureBuilder4; + } + export class FutureBuilder4 { + private oa; + private ob; + private oc; + private od; + private oe; + constructor(oa: Future, ob: Future, oc: Future, od: Future, oe: Future); + run(f: (a: A, b: B, c: C, d: D, e: E) => F): Future; + chain(of: Future): FutureBuilder5; + } + export class FutureBuilder5 { + private oa; + private ob; + private oc; + private od; + private oe; + private of; + constructor(oa: Future, ob: Future, oc: Future, od: Future, oe: Future, of: Future); + run(f: (a: A, b: B, c: C, d: D, e: E, f: F) => G): Future; + } +} + +declare module "scalike" { + export = scalike +} diff --git a/snapsvg/snapsvg.d.ts b/snapsvg/snapsvg.d.ts index aff964a6da..d4d6ba7a7a 100644 --- a/snapsvg/snapsvg.d.ts +++ b/snapsvg/snapsvg.d.ts @@ -264,6 +264,7 @@ declare module Snap { undrag(onMove: (dx: number, dy: number, event: MouseEvent) => void, onStart: (x: number, y: number, event: MouseEvent) => void, onEnd: (event: MouseEvent) => void): Snap.Element; + undrag(): Snap.Element; } export interface Fragment { diff --git a/srp/srp-tests.ts b/srp/srp-tests.ts new file mode 100644 index 0000000000..002a652d33 --- /dev/null +++ b/srp/srp-tests.ts @@ -0,0 +1,45 @@ +/// + +var srp = require('srp'); + + +// Test the `params` variable. +var params = srp.params['1024']; + + +// Test the `genKey` function. +srp.genKey(function (err: Error, buf: Buffer): void {}); +srp.genKey(16, function (err: Error, buf: Buffer): void {}); + + +// Test the `computeVerifier` function. +var salt = new Buffer('deadbeef', 'hex'); +var identifier = new Buffer('AzureDiamond'); +var password = new Buffer('hunter2'); + +var verifier = srp.computeVerifier(params, salt, identifier, password); + + +// Test the `Client` class. +var secret1 = new Buffer(32); +var client = new srp.Client(params, salt, identifier, password, secret1); + + +// Test the `Server` class. +var secret2 = new Buffer(32); +var server = new srp.Server(params, verifier, secret2); + + +// Test handshake protocol. +var A = client.computeA(); +server.setA(A); + +var B = server.computeB(); +client.setB(B); + +var M1 = client.computeM1(); +var M2 = server.checkM1(M1); +client.checkM2(M2); + +client.computeK(); +server.computeK(); diff --git a/srp/srp.d.ts b/srp/srp.d.ts new file mode 100644 index 0000000000..040c1ace69 --- /dev/null +++ b/srp/srp.d.ts @@ -0,0 +1,75 @@ +// Type definitions for node-srp +// Project: https://github.com/mozilla/node-srp +// Definitions by: Pat Smuk +// Definitions: https://github.com/DefinitelyTyped/DefinitelyTyped + +/// +/// + +declare namespace SRP { + export interface Params { + N_length_bits: number; + N: BigNum; + g: BigNum; + hash: string; + } + + export var params: { + [bits: string]: Params; + }; + + /** + * The verifier is calculated as described in Section 3 of [SRP-RFC]. + * We give the algorithm here for convenience. + * + * The verifier (v) is computed based on the salt (s), user name (I), + * password (P), and group parameters (N, g). + * + * x = H(s | H(I | ":" | P)) + * v = g^x % N + * + * @param {Params} params group parameters, with .N, .g, .hash + * @param {Buffer} salt salt + * @param {Buffer} I user identity + * @param {Buffer} P user password + * + * @returns {Buffer} + */ + export function computeVerifier(params: Params, salt: Buffer, I: Buffer, P: Buffer): Buffer; + + /** + * Generate a random key. + * + * @param {number} bytes length of key (default=32) + * @param {function} callback function to call with err,key + */ + export function genKey(bytes: number, callback: (error: Error, key: Buffer) => void): void; + + /** + * Generate a random 32-byte key. + * + * @param {function} callback function to call with err,key + */ + export function genKey(callback: (error: Error, key: Buffer) => void): void; + + export class Client { + constructor(params: Params, salt: Buffer, identity: Buffer, password: Buffer, secret1: Buffer); + computeA(): Buffer; + setB(B: Buffer): void; + computeM1(): Buffer; + checkM2(M2: Buffer): void; + computeK(): Buffer; + } + + export class Server { + constructor(params: Params, verifier: Buffer, secret2: Buffer); + computeB(): Buffer; + setA(A: Buffer): void; + checkM1(M1: Buffer): Buffer; + computeK(): Buffer; + } +} + +declare module "srp" { + export = SRP; +} diff --git a/statuses/statuses.d.ts b/statuses/statuses.d.ts index 7aacc2f614..2347eba0e6 100644 --- a/statuses/statuses.d.ts +++ b/statuses/statuses.d.ts @@ -1,4 +1,4 @@ -// Type definitions for http-errors v1.2.1 +// Type definitions for statuses v1.2.1 // Project: https://github.com/jshttp/statuses // Definitions by: Tanguy Krotoff // Definitions: https://github.com/borisyankov/DefinitelyTyped diff --git a/threejs/tests/webgl/webgl_animation_skinning_morph.ts b/threejs/tests/webgl/webgl_animation_skinning_morph.ts index f38376efb4..7c65905ae7 100644 --- a/threejs/tests/webgl/webgl_animation_skinning_morph.ts +++ b/threejs/tests/webgl/webgl_animation_skinning_morph.ts @@ -11,13 +11,15 @@ var SCREEN_HEIGHT = window.innerHeight; var FLOOR = -250; - var container, stats; + var container,stats; var camera, scene; var renderer; var mesh, helper; + var mixer; + var mouseX = 0, mouseY = 0; var windowHalfX = window.innerWidth / 2; @@ -25,51 +27,49 @@ var clock = new THREE.Clock(); - document.addEventListener('mousemove', onDocumentMouseMove, false); + document.addEventListener( 'mousemove', onDocumentMouseMove, false ); init(); animate(); function init() { - container = document.getElementById('container'); + container = document.getElementById( 'container' ); - camera = new THREE.PerspectiveCamera(30, SCREEN_WIDTH / SCREEN_HEIGHT, 1, 10000); + camera = new THREE.PerspectiveCamera( 30, SCREEN_WIDTH / SCREEN_HEIGHT, 1, 10000 ); camera.position.z = 2200; scene = new THREE.Scene(); - scene.fog = new THREE.Fog(0xffffff, 2000, 10000); + scene.fog = new THREE.Fog( 0xffffff, 2000, 10000 ); - scene.add(camera); + scene.add( camera ); // GROUND - var geometry = new THREE.PlaneBufferGeometry(16000, 16000); - var material = new THREE.MeshPhongMaterial({ emissive: 0xbbbbbb }); + var geometry = new THREE.PlaneBufferGeometry( 16000, 16000 ); + var material = new THREE.MeshPhongMaterial( { emissive: 0x888888 } ); - var ground = new THREE.Mesh(geometry, material); - ground.position.set(0, FLOOR, 0); - ground.rotation.x = -Math.PI / 2; - scene.add(ground); + var ground = new THREE.Mesh( geometry, material ); + ground.position.set( 0, FLOOR, 0 ); + ground.rotation.x = -Math.PI/2; + scene.add( ground ); ground.receiveShadow = true; // LIGHTS - var ambient = new THREE.AmbientLight(0x222222); - scene.add(ambient); + scene.add( new THREE.HemisphereLight( 0x111111, 0x444444 ) ); - - var light = new THREE.DirectionalLight(0xebf3ff, 1.6); - light.position.set(0, 140, 500).multiplyScalar(1.1); - scene.add(light); + var light = new THREE.DirectionalLight( 0xebf3ff, 1.5 ); + light.position.set( 0, 140, 500 ).multiplyScalar( 1.1 ); + scene.add( light ); light.castShadow = true; light.shadowMapWidth = 1024; - light.shadowMapHeight = 2048; + light.shadowMapHeight = 1024; var d = 390; @@ -81,41 +81,35 @@ light.shadowCameraFar = 3500; //light.shadowCameraVisible = true; - // - - var light = new THREE.DirectionalLight(0x497f13, 1); - light.position.set(0, -1, 0); - scene.add(light); - // RENDERER - renderer = new THREE.WebGLRenderer({ antialias: true }); - renderer.setClearColor(scene.fog.color); - renderer.setPixelRatio(window.devicePixelRatio); - renderer.setSize(SCREEN_WIDTH, SCREEN_HEIGHT); + renderer = new THREE.WebGLRenderer( { antialias: true } ); + renderer.setClearColor( scene.fog.color ); + renderer.setPixelRatio( window.devicePixelRatio ); + renderer.setSize( SCREEN_WIDTH, SCREEN_HEIGHT ); renderer.domElement.style.position = "relative"; - container.appendChild(renderer.domElement); + container.appendChild( renderer.domElement ); renderer.gammaInput = true; renderer.gammaOutput = true; - renderer.shadowMapEnabled = true; + renderer.shadowMap.enabled = true; // STATS stats = new Stats(); - container.appendChild(stats.domElement); + container.appendChild( stats.domElement ); // var loader = new THREE.JSONLoader(); - loader.load("models/skinned/knight.js", function (geometry, materials) { + loader.load( "models/skinned/knight.js", function ( geometry, materials ) { - createScene(geometry, materials, 0, FLOOR, -300, 60) + createScene( geometry, materials, 0, FLOOR, -300, 60 ) - }); + } ); // GUI @@ -123,7 +117,7 @@ // - window.addEventListener('resize', onWindowResize, false); + window.addEventListener( 'resize', onWindowResize, false ); } @@ -135,30 +129,13 @@ camera.aspect = window.innerWidth / window.innerHeight; camera.updateProjectionMatrix(); - renderer.setSize(window.innerWidth, window.innerHeight); + renderer.setSize( window.innerWidth, window.innerHeight ); } - function ensureLoop(animation) { + function createScene( geometry, materials, x, y, z, s ) { - for (var i = 0; i < animation.hierarchy.length; i++) { - - var bone = animation.hierarchy[i]; - - var first = bone.keys[0]; - var last = bone.keys[bone.keys.length - 1]; - - last.pos = first.pos; - last.rot = first.rot; - last.scl = first.scl; - - } - - } - - function createScene(geometry, materials, x, y, z, s) { - - ensureLoop(geometry.animation); + //ensureLoop( geometry.animation ); geometry.computeBoundingBox(); var bb = geometry.boundingBox; @@ -171,24 +148,15 @@ path + 'posz' + format, path + 'negz' + format ]; + for ( var i = 0; i < materials.length; i ++ ) { - //var envMap = THREE.ImageUtils.loadTextureCube( urls ); - - //var map = THREE.ImageUtils.loadTexture( "textures/UV_Grid_Sm.jpg" ); - - //var bumpMap = THREE.ImageUtils.generateDataTexture( 1, 1, new THREE.Color() ); - //var bumpMap = THREE.ImageUtils.loadTexture( "textures/water.jpg" ); - - for (var i = 0; i < materials.length; i++) { - - var m = materials[i]; + var m = materials[ i ]; m.skinning = true; m.morphTargets = true; - m.specular.setHSL(0, 0, 0.1); + m.specular.setHSL( 0, 0, 0.1 ); - m.color.setHSL(0.6, 0, 0.6); - m.ambient.copy(m.color); + m.color.setHSL( 0.6, 0, 0.6 ); //m.map = map; //m.envMap = envMap; @@ -198,47 +166,49 @@ //m.combine = THREE.MixOperation; //m.reflectivity = 0.75; - m.wrapAround = true; - } - mesh = new THREE.SkinnedMesh(geometry, new THREE.MeshFaceMaterial(materials)); - mesh.position.set(x, y - bb.min.y * s, z); - mesh.scale.set(s, s, s); - scene.add(mesh); + mesh = new THREE.SkinnedMesh( geometry, new THREE.MeshFaceMaterial( materials ) ); + mesh.position.set( x, y - bb.min.y * s, z ); + mesh.scale.set( s, s, s ); + scene.add( mesh ); mesh.castShadow = true; mesh.receiveShadow = true; - helper = new THREE.SkeletonHelper(mesh); + helper = new THREE.SkeletonHelper( mesh ); helper.material.linewidth = 3; helper.visible = false; - scene.add(helper); + scene.add( helper ); - var animation = new THREE.Animation(mesh, geometry.animation); - animation.play(); + var clipMorpher = THREE.AnimationClip.CreateFromMorphTargetSequence( 'facialExpressions', mesh.geometry.morphTargets, 3 ); + var clipBones = geometry.animations[0]; + + mixer = new THREE.AnimationMixer( mesh ); + mixer.addAction( new THREE.AnimationAction( clipMorpher ) ); + mixer.addAction( new THREE.AnimationAction( clipBones ) ); } function initGUI() { var API = { - 'show model': true, - 'show skeleton': false + 'show model' : true, + 'show skeleton' : false }; var gui = new dat.GUI(); - gui.add(API, 'show model').onChange(function () { mesh.visible = API['show model']; }); + gui.add( API, 'show model' ).onChange( function() { mesh.visible = API[ 'show model' ]; } ); - gui.add(API, 'show skeleton').onChange(function () { helper.visible = API['show skeleton']; }); + gui.add( API, 'show skeleton' ).onChange( function() { helper.visible = API[ 'show skeleton' ]; } ); } - function onDocumentMouseMove(event) { + function onDocumentMouseMove( event ) { - mouseX = (event.clientX - windowHalfX); - mouseY = (event.clientY - windowHalfY); + mouseX = ( event.clientX - windowHalfX ); + mouseY = ( event.clientY - windowHalfY ); } @@ -246,7 +216,7 @@ function animate() { - requestAnimationFrame(animate); + requestAnimationFrame( animate ); render(); stats.update(); @@ -257,38 +227,17 @@ var delta = 0.75 * clock.getDelta(); - camera.position.x += (mouseX - camera.position.x) * .05; - camera.position.y = THREE.Math.clamp(camera.position.y + (- mouseY - camera.position.y) * .05, 0, 1000); + camera.position.x += ( mouseX - camera.position.x ) * .05; + camera.position.y = THREE.Math.clamp( camera.position.y + ( - mouseY - camera.position.y ) * .05, 0, 1000 ); - camera.lookAt(scene.position); - - // update skinning - - THREE.AnimationHandler.update(delta); - - if (helper !== undefined) helper.update(); - - // update morphs - - if (mesh) { - - var time = Date.now() * 0.001; - - // mouth - - mesh.morphTargetInfluences[1] = (1 + Math.sin(4 * time)) / 2; - - // frown ? - - mesh.morphTargetInfluences[2] = (1 + Math.sin(2 * time)) / 2; - - // eyes - - mesh.morphTargetInfluences[3] = (1 + Math.cos(4 * time)) / 2; + camera.lookAt( scene.position ); + if( mixer ) { + mixer.update( delta ); + helper.update(); } - renderer.render(scene, camera); + renderer.render( scene, camera ); } } \ No newline at end of file diff --git a/threejs/tests/webgl/webgl_buffergeometry.ts b/threejs/tests/webgl/webgl_buffergeometry.ts index cedd78d9cd..c01b0dfe6c 100644 --- a/threejs/tests/webgl/webgl_buffergeometry.ts +++ b/threejs/tests/webgl/webgl_buffergeometry.ts @@ -8,7 +8,7 @@ // ------- - if (!Detector.webgl) Detector.addGetWebGLMessage(); + if ( ! Detector.webgl ) Detector.addGetWebGLMessage(); var container, stats; @@ -21,27 +21,27 @@ function init() { - container = document.getElementById('container'); + container = document.getElementById( 'container' ); // - camera = new THREE.PerspectiveCamera(27, window.innerWidth / window.innerHeight, 1, 3500); + camera = new THREE.PerspectiveCamera( 27, window.innerWidth / window.innerHeight, 1, 3500 ); camera.position.z = 2750; scene = new THREE.Scene(); - scene.fog = new THREE.Fog(0x050505, 2000, 3500); + scene.fog = new THREE.Fog( 0x050505, 2000, 3500 ); // - scene.add(new THREE.AmbientLight(0x444444)); + scene.add( new THREE.AmbientLight( 0x444444 ) ); - var light1 = new THREE.DirectionalLight(0xffffff, 0.5); - light1.position.set(1, 1, 1); - scene.add(light1); + var light1 = new THREE.DirectionalLight( 0xffffff, 0.5 ); + light1.position.set( 1, 1, 1 ); + scene.add( light1 ); - var light2 = new THREE.DirectionalLight(0xffffff, 1.5); - light2.position.set(0, -1, 0); - scene.add(light2); + var light2 = new THREE.DirectionalLight( 0xffffff, 1.5 ); + light2.position.set( 0, -1, 0 ); + scene.add( light2 ); // @@ -49,29 +49,14 @@ var geometry = new THREE.BufferGeometry(); - // break geometry into - // chunks of 21,845 triangles (3 unique vertices per triangle) - // for indices to fit into 16 bit integer number - // floor(2^16 / 3) = 21845 - - var chunkSize = 21845; - - var indices = new Uint16Array(triangles * 3); - - for (var i = 0; i < indices.length; i++) { - - indices[i] = i % (3 * chunkSize); - - } - - var positions = new Float32Array(triangles * 3 * 3); - var normals = new Float32Array(triangles * 3 * 3); - var colors = new Float32Array(triangles * 3 * 3); + var positions = new Float32Array( triangles * 3 * 3 ); + var normals = new Float32Array( triangles * 3 * 3 ); + var colors = new Float32Array( triangles * 3 * 3 ); var color = new THREE.Color(); - var n = 800, n2 = n / 2; // triangles spread in the cube - var d = 12, d2 = d / 2; // individual triangle size + var n = 800, n2 = n/2; // triangles spread in the cube + var d = 12, d2 = d/2; // individual triangle size var pA = new THREE.Vector3(); var pB = new THREE.Vector3(); @@ -80,7 +65,7 @@ var cb = new THREE.Vector3(); var ab = new THREE.Vector3(); - for (var i = 0; i < positions.length; i += 9) { + for ( var i = 0; i < positions.length; i += 9 ) { // positions @@ -100,27 +85,27 @@ var cy = y + Math.random() * d - d2; var cz = z + Math.random() * d - d2; - positions[i] = ax; - positions[i + 1] = ay; - positions[i + 2] = az; + positions[ i ] = ax; + positions[ i + 1 ] = ay; + positions[ i + 2 ] = az; - positions[i + 3] = bx; - positions[i + 4] = by; - positions[i + 5] = bz; + positions[ i + 3 ] = bx; + positions[ i + 4 ] = by; + positions[ i + 5 ] = bz; - positions[i + 6] = cx; - positions[i + 7] = cy; - positions[i + 8] = cz; + positions[ i + 6 ] = cx; + positions[ i + 7 ] = cy; + positions[ i + 8 ] = cz; // flat face normals - pA.set(ax, ay, az); - pB.set(bx, by, bz); - pC.set(cx, cy, cz); + pA.set( ax, ay, az ); + pB.set( bx, by, bz ); + pC.set( cx, cy, cz ); - cb.subVectors(pC, pB); - ab.subVectors(pA, pB); - cb.cross(ab); + cb.subVectors( pC, pB ); + ab.subVectors( pA, pB ); + cb.cross( ab ); cb.normalize(); @@ -128,91 +113,76 @@ var ny = cb.y; var nz = cb.z; - normals[i] = nx; - normals[i + 1] = ny; - normals[i + 2] = nz; + normals[ i ] = nx; + normals[ i + 1 ] = ny; + normals[ i + 2 ] = nz; - normals[i + 3] = nx; - normals[i + 4] = ny; - normals[i + 5] = nz; + normals[ i + 3 ] = nx; + normals[ i + 4 ] = ny; + normals[ i + 5 ] = nz; - normals[i + 6] = nx; - normals[i + 7] = ny; - normals[i + 8] = nz; + normals[ i + 6 ] = nx; + normals[ i + 7 ] = ny; + normals[ i + 8 ] = nz; // colors - var vx = (x / n) + 0.5; - var vy = (y / n) + 0.5; - var vz = (z / n) + 0.5; + var vx = ( x / n ) + 0.5; + var vy = ( y / n ) + 0.5; + var vz = ( z / n ) + 0.5; - color.setRGB(vx, vy, vz); + color.setRGB( vx, vy, vz ); - colors[i] = color.r; - colors[i + 1] = color.g; - colors[i + 2] = color.b; + colors[ i ] = color.r; + colors[ i + 1 ] = color.g; + colors[ i + 2 ] = color.b; - colors[i + 3] = color.r; - colors[i + 4] = color.g; - colors[i + 5] = color.b; + colors[ i + 3 ] = color.r; + colors[ i + 4 ] = color.g; + colors[ i + 5 ] = color.b; - colors[i + 6] = color.r; - colors[i + 7] = color.g; - colors[i + 8] = color.b; + colors[ i + 6 ] = color.r; + colors[ i + 7 ] = color.g; + colors[ i + 8 ] = color.b; } - geometry.addAttribute('index', new THREE.BufferAttribute(indices, 1)); - geometry.addAttribute('position', new THREE.BufferAttribute(positions, 3)); - geometry.addAttribute('normal', new THREE.BufferAttribute(normals, 3)); - geometry.addAttribute('color', new THREE.BufferAttribute(colors, 3)); - - var offsets = triangles / chunkSize; - - for (var i = 0; i < offsets; i++) { - - var offset = { - start: i * chunkSize * 3, - index: i * chunkSize * 3, - count: Math.min(triangles - (i * chunkSize), chunkSize) * 3 - }; - - geometry.offsets.push(offset); - - } + geometry.addAttribute( 'position', new THREE.BufferAttribute( positions, 3 ) ); + geometry.addAttribute( 'normal', new THREE.BufferAttribute( normals, 3 ) ); + geometry.addAttribute( 'color', new THREE.BufferAttribute( colors, 3 ) ); geometry.computeBoundingSphere(); - var material = new THREE.MeshPhongMaterial({ + var material = new THREE.MeshPhongMaterial( { color: 0xaaaaaa, specular: 0xffffff, shininess: 250, side: THREE.DoubleSide, vertexColors: THREE.VertexColors - }); + } ); - mesh = new THREE.Mesh(geometry, material); - scene.add(mesh); + mesh = new THREE.Mesh( geometry, material ); + scene.add( mesh ); // - renderer = new THREE.WebGLRenderer({ antialias: false }); - renderer.setClearColor(scene.fog.color); - renderer.setPixelRatio(window.devicePixelRatio); - renderer.setSize(window.innerWidth, window.innerHeight); + renderer = new THREE.WebGLRenderer( { antialias: false } ); + renderer.setClearColor( scene.fog.color ); + renderer.setPixelRatio( window.devicePixelRatio ); + renderer.setSize( window.innerWidth, window.innerHeight ); renderer.gammaInput = true; renderer.gammaOutput = true; - container.appendChild(renderer.domElement); + container.appendChild( renderer.domElement ); // stats = new Stats(); stats.domElement.style.position = 'absolute'; stats.domElement.style.top = '0px'; - container.appendChild(stats.domElement); + container.appendChild( stats.domElement ); // - window.addEventListener('resize', onWindowResize, false); + window.addEventListener( 'resize', onWindowResize, false ); } @@ -221,7 +191,7 @@ camera.aspect = window.innerWidth / window.innerHeight; camera.updateProjectionMatrix(); - renderer.setSize(window.innerWidth, window.innerHeight); + renderer.setSize( window.innerWidth, window.innerHeight ); } @@ -229,7 +199,7 @@ function animate() { - requestAnimationFrame(animate); + requestAnimationFrame( animate ); render(); stats.update(); @@ -243,7 +213,7 @@ mesh.rotation.x = time * 0.25; mesh.rotation.y = time * 0.5; - renderer.render(scene, camera); + renderer.render( scene, camera ); } } \ No newline at end of file diff --git a/threejs/tests/webgl/webgl_camera.ts b/threejs/tests/webgl/webgl_camera.ts index 4ebb7f7bb0..a10a4ad0d5 100644 --- a/threejs/tests/webgl/webgl_camera.ts +++ b/threejs/tests/webgl/webgl_camera.ts @@ -18,27 +18,27 @@ function init() { - container = document.createElement('div'); - document.body.appendChild(container); + container = document.createElement( 'div' ); + document.body.appendChild( container ); scene = new THREE.Scene(); // - camera = new THREE.PerspectiveCamera(50, 0.5 * SCREEN_WIDTH / SCREEN_HEIGHT, 1, 10000); + camera = new THREE.PerspectiveCamera( 50, 0.5 * SCREEN_WIDTH / SCREEN_HEIGHT, 1, 10000 ); camera.position.z = 2500; - cameraPerspective = new THREE.PerspectiveCamera(50, 0.5 * SCREEN_WIDTH / SCREEN_HEIGHT, 150, 1000); + cameraPerspective = new THREE.PerspectiveCamera( 50, 0.5 * SCREEN_WIDTH / SCREEN_HEIGHT, 150, 1000 ); - cameraPerspectiveHelper = new THREE.CameraHelper(cameraPerspective); - scene.add(cameraPerspectiveHelper); + cameraPerspectiveHelper = new THREE.CameraHelper( cameraPerspective ); + scene.add( cameraPerspectiveHelper ); // - cameraOrtho = new THREE.OrthographicCamera(0.5 * SCREEN_WIDTH / - 2, 0.5 * SCREEN_WIDTH / 2, SCREEN_HEIGHT / 2, SCREEN_HEIGHT / - 2, 150, 1000); + cameraOrtho = new THREE.OrthographicCamera( 0.5 * SCREEN_WIDTH / - 2, 0.5 * SCREEN_WIDTH / 2, SCREEN_HEIGHT / 2, SCREEN_HEIGHT / - 2, 150, 1000 ); - cameraOrthoHelper = new THREE.CameraHelper(cameraOrtho); - scene.add(cameraOrthoHelper); + cameraOrthoHelper = new THREE.CameraHelper( cameraOrtho ); + scene.add( cameraOrthoHelper ); // @@ -51,72 +51,81 @@ cameraOrtho.rotation.y = Math.PI; cameraPerspective.rotation.y = Math.PI; - cameraRig = new THREE.Object3D(); + cameraRig = new THREE.Group(); - cameraRig.add(cameraPerspective); - cameraRig.add(cameraOrtho); + cameraRig.add( cameraPerspective ); + cameraRig.add( cameraOrtho ); - scene.add(cameraRig); + scene.add( cameraRig ); // - mesh = new THREE.Mesh(new THREE.SphereGeometry(100, 16, 8), new THREE.MeshBasicMaterial({ color: 0xffffff, wireframe: true })); - scene.add(mesh); + mesh = new THREE.Mesh( + new THREE.SphereBufferGeometry( 100, 16, 8 ), + new THREE.MeshBasicMaterial( { color: 0xffffff, wireframe: true } ) + ); + scene.add( mesh ); - var mesh2 = new THREE.Mesh(new THREE.SphereGeometry(50, 16, 8), new THREE.MeshBasicMaterial({ color: 0x00ff00, wireframe: true })); + var mesh2 = new THREE.Mesh( + new THREE.SphereBufferGeometry( 50, 16, 8 ), + new THREE.MeshBasicMaterial( { color: 0x00ff00, wireframe: true } ) + ); mesh2.position.y = 150; - mesh.add(mesh2); + mesh.add( mesh2 ); - var mesh3 = new THREE.Mesh(new THREE.SphereGeometry(5, 16, 8), new THREE.MeshBasicMaterial({ color: 0x0000ff, wireframe: true })); + var mesh3 = new THREE.Mesh( + new THREE.SphereBufferGeometry( 5, 16, 8 ), + new THREE.MeshBasicMaterial( { color: 0x0000ff, wireframe: true } ) + ); mesh3.position.z = 150; - cameraRig.add(mesh3); + cameraRig.add( mesh3 ); // var geometry = new THREE.Geometry(); - for (var i = 0; i < 10000; i++) { + for ( var i = 0; i < 10000; i ++ ) { var vertex = new THREE.Vector3(); - vertex.x = THREE.Math.randFloatSpread(2000); - vertex.y = THREE.Math.randFloatSpread(2000); - vertex.z = THREE.Math.randFloatSpread(2000); + vertex.x = THREE.Math.randFloatSpread( 2000 ); + vertex.y = THREE.Math.randFloatSpread( 2000 ); + vertex.z = THREE.Math.randFloatSpread( 2000 ); - geometry.vertices.push(vertex); + geometry.vertices.push( vertex ); } - var particles = new THREE.PointCloud(geometry, new THREE.PointCloudMaterial({ color: 0x888888 })); - scene.add(particles); + var particles = new THREE.Points( geometry, new THREE.PointsMaterial( { color: 0x888888 } ) ); + scene.add( particles ); // - renderer = new THREE.WebGLRenderer({ antialias: true }); - renderer.setPixelRatio(window.devicePixelRatio); - renderer.setSize(SCREEN_WIDTH, SCREEN_HEIGHT); + renderer = new THREE.WebGLRenderer( { antialias: true } ); + renderer.setPixelRatio( window.devicePixelRatio ); + renderer.setSize( SCREEN_WIDTH, SCREEN_HEIGHT ); renderer.domElement.style.position = "relative"; - container.appendChild(renderer.domElement); + container.appendChild( renderer.domElement ); renderer.autoClear = false; // stats = new Stats(); - container.appendChild(stats.domElement); + container.appendChild( stats.domElement ); // - window.addEventListener('resize', onWindowResize, false); - document.addEventListener('keydown', onKeyDown, false); + window.addEventListener( 'resize', onWindowResize, false ); + document.addEventListener( 'keydown', onKeyDown, false ); } // - function onKeyDown(event) { + function onKeyDown ( event ) { - switch (event.keyCode) { + switch( event.keyCode ) { case 79: /*O*/ @@ -134,16 +143,16 @@ } - }; + } // - function onWindowResize(event) { + function onWindowResize( event ) { SCREEN_WIDTH = window.innerWidth; SCREEN_HEIGHT = window.innerHeight; - renderer.setSize(SCREEN_WIDTH, SCREEN_HEIGHT); + renderer.setSize( SCREEN_WIDTH, SCREEN_HEIGHT ); camera.aspect = 0.5 * SCREEN_WIDTH / SCREEN_HEIGHT; camera.updateProjectionMatrix(); @@ -151,9 +160,9 @@ cameraPerspective.aspect = 0.5 * SCREEN_WIDTH / SCREEN_HEIGHT; cameraPerspective.updateProjectionMatrix(); - cameraOrtho.left = - 0.5 * SCREEN_WIDTH / 2; - cameraOrtho.right = 0.5 * SCREEN_WIDTH / 2; - cameraOrtho.top = SCREEN_HEIGHT / 2; + cameraOrtho.left = - 0.5 * SCREEN_WIDTH / 2; + cameraOrtho.right = 0.5 * SCREEN_WIDTH / 2; + cameraOrtho.top = SCREEN_HEIGHT / 2; cameraOrtho.bottom = - SCREEN_HEIGHT / 2; cameraOrtho.updateProjectionMatrix(); @@ -163,7 +172,7 @@ function animate() { - requestAnimationFrame(animate); + requestAnimationFrame( animate ); render(); stats.update(); @@ -175,16 +184,16 @@ var r = Date.now() * 0.0005; - mesh.position.x = 700 * Math.cos(r); - mesh.position.z = 700 * Math.sin(r); - mesh.position.y = 700 * Math.sin(r); + mesh.position.x = 700 * Math.cos( r ); + mesh.position.z = 700 * Math.sin( r ); + mesh.position.y = 700 * Math.sin( r ); - mesh.children[0].position.x = 70 * Math.cos(2 * r); - mesh.children[0].position.z = 70 * Math.sin(r); + mesh.children[ 0 ].position.x = 70 * Math.cos( 2 * r ); + mesh.children[ 0 ].position.z = 70 * Math.sin( r ); - if (activeCamera === cameraPerspective) { + if ( activeCamera === cameraPerspective ) { - cameraPerspective.fov = 35 + 30 * Math.sin(0.5 * r); + cameraPerspective.fov = 35 + 30 * Math.sin( 0.5 * r ); cameraPerspective.far = mesh.position.length(); cameraPerspective.updateProjectionMatrix(); @@ -205,19 +214,19 @@ } - cameraRig.lookAt(mesh.position); + cameraRig.lookAt( mesh.position ); renderer.clear(); activeHelper.visible = false; - renderer.setViewport(0, 0, SCREEN_WIDTH / 2, SCREEN_HEIGHT); - renderer.render(scene, activeCamera); + renderer.setViewport( 0, 0, SCREEN_WIDTH/2, SCREEN_HEIGHT ); + renderer.render( scene, activeCamera ); activeHelper.visible = true; - renderer.setViewport(SCREEN_WIDTH / 2, 0, SCREEN_WIDTH / 2, SCREEN_HEIGHT); - renderer.render(scene, camera); + renderer.setViewport( SCREEN_WIDTH/2, 0, SCREEN_WIDTH/2, SCREEN_HEIGHT ); + renderer.render( scene, camera ); } } \ No newline at end of file diff --git a/threejs/tests/webgl/webgl_interactive_raycasting_pointcloud.ts b/threejs/tests/webgl/webgl_interactive_raycasting_points.ts similarity index 76% rename from threejs/tests/webgl/webgl_interactive_raycasting_pointcloud.ts rename to threejs/tests/webgl/webgl_interactive_raycasting_points.ts index 980109f70b..550d4b4b94 100644 --- a/threejs/tests/webgl/webgl_interactive_raycasting_pointcloud.ts +++ b/threejs/tests/webgl/webgl_interactive_raycasting_points.ts @@ -5,17 +5,17 @@ () => { // ------- variable definitions that does not exist in the original code. These are for typescript. - var material: THREE.SpriteMaterial; - var container: HTMLElement; - var pcBuffer: THREE.PointCloud; - var v: any; + var material:THREE.SpriteMaterial; + var container:HTMLElement; + var pcBuffer:THREE.Points; + var v:any; // ------- if (!Detector.webgl) Detector.addGetWebGLMessage(); var renderer, scene, camera, stats; var pointclouds; - var raycaster, intersects; + var raycaster; var mouse = new THREE.Vector2(); var intersection = null; var spheres = []; @@ -48,14 +48,14 @@ var u = i / width; var v = j / length; var x = u - 0.5; - var y = (Math.cos(u * Math.PI * 8) + Math.sin(v * Math.PI * 8)) / 20; + var y = ( Math.cos(u * Math.PI * 8) + Math.sin(v * Math.PI * 8) ) / 20; var z = v - 0.5; positions[3 * k] = x; positions[3 * k + 1] = y; positions[3 * k + 2] = z; - var intensity = (y + 0.1) * 5; + var intensity = ( y + 0.1 ) * 5; colors[3 * k] = color.r * intensity; colors[3 * k + 1] = color.g * intensity; colors[3 * k + 2] = color.b * intensity; @@ -78,8 +78,8 @@ var geometry = generatePointCloudGeometry(color, width, length); - var material = new THREE.PointCloudMaterial({ size: pointSize, vertexColors: THREE.VertexColors }); - var pointcloud = new THREE.PointCloud(geometry, material); + var material = new THREE.PointsMaterial({size: pointSize, vertexColors: THREE.VertexColors}); + var pointcloud = new THREE.Points(geometry, material); return pointcloud; @@ -104,10 +104,10 @@ } - geometry.addAttribute('index', new THREE.BufferAttribute(indices, 1)); + geometry.setIndex(new THREE.BufferAttribute(indices, 1)); - var material = new THREE.PointCloudMaterial({ size: pointSize, vertexColors: THREE.VertexColors }); - var pointcloud = new THREE.PointCloud(geometry, material); + var material = new THREE.PointsMaterial({size: pointSize, vertexColors: THREE.VertexColors}); + var pointcloud = new THREE.Points(geometry, material); return pointcloud; @@ -132,13 +132,11 @@ } - geometry.addAttribute('index', new THREE.BufferAttribute(indices, 1)); + geometry.setIndex(new THREE.BufferAttribute(indices, 1)); + geometry.addDrawCall(0, indices.length); - var offset = { start: 0, count: indices.length, index: 0 }; - geometry.offsets.push(offset); - - var material = new THREE.PointCloudMaterial({ size: pointSize, vertexColors: THREE.VertexColors }); - var pointcloud = new THREE.PointCloud(geometry, material); + var material = new THREE.PointsMaterial({size: pointSize, vertexColors: THREE.VertexColors}); + var pointcloud = new THREE.Points(geometry, material); return pointcloud; @@ -147,7 +145,6 @@ function generateRegularPointcloud(color, width, length) { var geometry = new THREE.Geometry(); - var numPoints = width * length; var colors = []; @@ -160,17 +157,17 @@ var u = i / width; var v = j / length; var x = u - 0.5; - var y = (Math.cos(u * Math.PI * 8) + Math.sin(v * Math.PI * 8)) / 20; + var y = ( Math.cos(u * Math.PI * 8) + Math.sin(v * Math.PI * 8) ) / 20; var z = v - 0.5; - var vec = new THREE.Vector3(x, y, z); + var v2 = new THREE.Vector3(x, y, z); - var intensity = (y + 0.1) * 7; + var intensity = ( y + 0.1 ) * 7; colors[3 * k] = color.r * intensity; colors[3 * k + 1] = color.g * intensity; colors[3 * k + 2] = color.b * intensity; - geometry.vertices.push(vec); - colors[k] = (color.clone().multiplyScalar(intensity)); + geometry.vertices.push(v2); + colors[k] = ( color.clone().multiplyScalar(intensity) ); k++; @@ -181,8 +178,8 @@ geometry.colors = colors; geometry.computeBoundingBox(); - var material = new THREE.PointCloudMaterial({ size: pointSize, vertexColors: THREE.VertexColors }); - var pointcloud = new THREE.PointCloud(geometry, material); + var material = new THREE.PointsMaterial({size: pointSize, vertexColors: THREE.VertexColors}); + var pointcloud = new THREE.Points(geometry, material); return pointcloud; @@ -190,7 +187,7 @@ function init() { - container = document.getElementById('container'); + var container = document.getElementById('container'); scene = new THREE.Scene(); @@ -202,7 +199,7 @@ // - pcBuffer = generatePointcloud(new THREE.Color(1, 0, 0), width, length); + var pcBuffer = generatePointcloud(new THREE.Color(1, 0, 0), width, length); pcBuffer.scale.set(10, 10, 10); pcBuffer.position.set(-5, 0, 5); scene.add(pcBuffer); @@ -227,7 +224,7 @@ // var sphereGeometry = new THREE.SphereGeometry(0.1, 32, 32); - var sphereMaterial = new THREE.MeshBasicMaterial({ color: 0xff0000, shading: THREE.FlatShading }); + var sphereMaterial = new THREE.MeshBasicMaterial({color: 0xff0000, shading: THREE.FlatShading}); for (var i = 0; i < 40; i++) { @@ -247,7 +244,7 @@ // raycaster = new THREE.Raycaster(); - raycaster.params.PointCloud.threshold = threshold; + raycaster.params.Points.threshold = threshold; // @@ -267,8 +264,8 @@ event.preventDefault(); - mouse.x = (event.clientX / window.innerWidth) * 2 - 1; - mouse.y = - (event.clientY / window.innerHeight) * 2 + 1; + mouse.x = ( event.clientX / window.innerWidth ) * 2 - 1; + mouse.y = -( event.clientY / window.innerHeight ) * 2 + 1; } @@ -300,13 +297,13 @@ raycaster.setFromCamera(mouse, camera); var intersections = raycaster.intersectObjects(pointclouds); - intersection = (intersections.length) > 0 ? intersections[0] : null; + intersection = ( intersections.length ) > 0 ? intersections[0] : null; if (toggle > 0.02 && intersection !== null) { spheres[spheresIndex].position.copy(intersection.point); spheres[spheresIndex].scale.set(1, 1, 1); - spheresIndex = (spheresIndex + 1) % spheres.length; + spheresIndex = ( spheresIndex + 1 ) % spheres.length; toggle = 0; diff --git a/threejs/tests/webgl/webgl_lights_heimsphere.ts b/threejs/tests/webgl/webgl_lights_heimsphere.ts index a8cf0a7d12..fd2118e625 100644 --- a/threejs/tests/webgl/webgl_lights_heimsphere.ts +++ b/threejs/tests/webgl/webgl_lights_heimsphere.ts @@ -7,10 +7,11 @@ // ------- variable definitions that does not exist in the original code. These are for typescript. var morph: any; // ------- - if (!Detector.webgl) Detector.addGetWebGLMessage(); + + if ( ! Detector.webgl ) Detector.addGetWebGLMessage(); var camera, scene, renderer, dirLight, hemiLight; - var morphs = []; + var mixers = []; var stats; var clock = new THREE.Clock(); @@ -20,45 +21,45 @@ function init() { - var container = document.getElementById('container'); + var container = document.getElementById( 'container' ); - camera = new THREE.PerspectiveCamera(30, window.innerWidth / window.innerHeight, 1, 5000); - camera.position.set(0, 0, 250); + camera = new THREE.PerspectiveCamera( 30, window.innerWidth / window.innerHeight, 1, 5000 ); + camera.position.set( 0, 0, 250 ); scene = new THREE.Scene(); - scene.fog = new THREE.Fog(0xffffff, 1, 5000); - scene.fog.color.setHSL(0.6, 0, 1); + scene.fog = new THREE.Fog( 0xffffff, 1, 5000 ); + scene.fog.color.setHSL( 0.6, 0, 1 ); /* - controls = new THREE.TrackballControls( camera ); + controls = new THREE.TrackballControls( camera ); - controls.rotateSpeed = 1.0; - controls.zoomSpeed = 1.2; - controls.panSpeed = 0.8; + controls.rotateSpeed = 1.0; + controls.zoomSpeed = 1.2; + controls.panSpeed = 0.8; - controls.noZoom = false; - controls.noPan = false; + controls.noZoom = false; + controls.noPan = false; - controls.staticMoving = true; - controls.dynamicDampingFactor = 0.15; - */ + controls.staticMoving = true; + controls.dynamicDampingFactor = 0.15; + */ // LIGHTS - hemiLight = new THREE.HemisphereLight(0xffffff, 0xffffff, 0.6); - hemiLight.color.setHSL(0.6, 1, 0.6); - hemiLight.groundColor.setHSL(0.095, 1, 0.75); - hemiLight.position.set(0, 500, 0); - scene.add(hemiLight); + hemiLight = new THREE.HemisphereLight( 0xffffff, 0xffffff, 0.6 ); + hemiLight.color.setHSL( 0.6, 1, 0.6 ); + hemiLight.groundColor.setHSL( 0.095, 1, 0.75 ); + hemiLight.position.set( 0, 500, 0 ); + scene.add( hemiLight ); // - dirLight = new THREE.DirectionalLight(0xffffff, 1); - dirLight.color.setHSL(0.1, 1, 0.95); - dirLight.position.set(-1, 1.75, 1); - dirLight.position.multiplyScalar(50); - scene.add(dirLight); + dirLight = new THREE.DirectionalLight( 0xffffff, 1 ); + dirLight.color.setHSL( 0.1, 1, 0.95 ); + dirLight.position.set( -1, 1.75, 1 ); + dirLight.position.multiplyScalar( 50 ); + scene.add( dirLight ); dirLight.castShadow = true; @@ -74,108 +75,89 @@ dirLight.shadowCameraFar = 3500; dirLight.shadowBias = -0.0001; - dirLight.shadowDarkness = 0.35; //dirLight.shadowCameraVisible = true; // GROUND - var groundGeo = new THREE.PlaneBufferGeometry(10000, 10000); - var groundMat = new THREE.MeshPhongMaterial({ color: 0xffffff, specular: 0x050505 }); - groundMat.color.setHSL(0.095, 1, 0.75); + var groundGeo = new THREE.PlaneBufferGeometry( 10000, 10000 ); + var groundMat = new THREE.MeshPhongMaterial( { color: 0xffffff, specular: 0x050505 } ); + groundMat.color.setHSL( 0.095, 1, 0.75 ); - var ground = new THREE.Mesh(groundGeo, groundMat); - ground.rotation.x = -Math.PI / 2; + var ground = new THREE.Mesh( groundGeo, groundMat ); + ground.rotation.x = -Math.PI/2; ground.position.y = -33; - scene.add(ground); + scene.add( ground ); ground.receiveShadow = true; // SKYDOME - var vertexShader = document.getElementById('vertexShader').textContent; - var fragmentShader = document.getElementById('fragmentShader').textContent; + var vertexShader = document.getElementById( 'vertexShader' ).textContent; + var fragmentShader = document.getElementById( 'fragmentShader' ).textContent; var uniforms = { - topColor: { type: "c", value: new THREE.Color(0x0077ff) }, - bottomColor: { type: "c", value: new THREE.Color(0xffffff) }, - offset: { type: "f", value: 33 }, - exponent: { type: "f", value: 0.6 } - } - uniforms.topColor.value.copy(hemiLight.color); + topColor: { type: "c", value: new THREE.Color( 0x0077ff ) }, + bottomColor: { type: "c", value: new THREE.Color( 0xffffff ) }, + offset: { type: "f", value: 33 }, + exponent: { type: "f", value: 0.6 } + }; + uniforms.topColor.value.copy( hemiLight.color ); - scene.fog.color.copy(uniforms.bottomColor.value); + scene.fog.color.copy( uniforms.bottomColor.value ); - var skyGeo = new THREE.SphereGeometry(4000, 32, 15); - var skyMat = new THREE.ShaderMaterial({ vertexShader: vertexShader, fragmentShader: fragmentShader, uniforms: uniforms, side: THREE.BackSide }); + var skyGeo = new THREE.SphereGeometry( 4000, 32, 15 ); + var skyMat = new THREE.ShaderMaterial( { vertexShader: vertexShader, fragmentShader: fragmentShader, uniforms: uniforms, side: THREE.BackSide } ); - var sky = new THREE.Mesh(skyGeo, skyMat); - scene.add(sky); + var sky = new THREE.Mesh( skyGeo, skyMat ); + scene.add( sky ); // MODEL var loader = new THREE.JSONLoader(); - loader.load("models/animated/flamingo.js", function (geometry) { + loader.load( "models/animated/flamingo.js", function( geometry ) { - morphColorsToFaceColors(geometry); - geometry.computeMorphNormals(); - - var material = new THREE.MeshPhongMaterial({ color: 0xffffff, specular: 0xffffff, shininess: 20, morphTargets: true, morphNormals: true, vertexColors: THREE.FaceColors, shading: THREE.FlatShading }); - var meshAnim = new THREE.MorphAnimMesh(geometry, material); - - meshAnim.duration = 1000; + var material = new THREE.MeshPhongMaterial( { color: 0xffffff, specular: 0xffffff, shininess: 20, morphTargets: true, vertexColors: THREE.FaceColors, shading: THREE.FlatShading } ); + var mesh = new THREE.Mesh( geometry, material ); var s = 0.35; - meshAnim.scale.set(s, s, s); - meshAnim.position.y = 15; - meshAnim.rotation.y = -1; + mesh.scale.set( s, s, s ); + mesh.position.y = 15; + mesh.rotation.y = -1; - meshAnim.castShadow = true; - meshAnim.receiveShadow = true; + mesh.castShadow = true; + mesh.receiveShadow = true; - scene.add(meshAnim); - morphs.push(meshAnim); + scene.add( mesh ); - }); + var mixer = new THREE.AnimationMixer( mesh ); + mixer.addAction( new THREE.AnimationAction( geometry.animations[ 0 ] ).warpToDuration( 1 ) ); + mixers.push( mixer ); + + } ); // RENDERER - renderer = new THREE.WebGLRenderer({ antialias: true }); - renderer.setClearColor(scene.fog.color); - renderer.setPixelRatio(window.devicePixelRatio); - renderer.setSize(window.innerWidth, window.innerHeight); - container.appendChild(renderer.domElement); + renderer = new THREE.WebGLRenderer( { antialias: true } ); + renderer.setClearColor( scene.fog.color ); + renderer.setPixelRatio( window.devicePixelRatio ); + renderer.setSize( window.innerWidth, window.innerHeight ); + container.appendChild( renderer.domElement ); renderer.gammaInput = true; renderer.gammaOutput = true; - renderer.shadowMapEnabled = true; - renderer.shadowMapCullFace = THREE.CullFaceBack; + renderer.shadowMap.enabled = true; + renderer.shadowMap.cullFace = THREE.CullFaceBack; // STATS stats = new Stats(); - container.appendChild(stats.domElement); + container.appendChild( stats.domElement ); // - window.addEventListener('resize', onWindowResize, false); - document.addEventListener('keydown', onKeyDown, false); - - } - - function morphColorsToFaceColors(geometry) { - - if (geometry.morphColors && geometry.morphColors.length) { - - var colorMap = geometry.morphColors[0]; - - for (var i = 0; i < colorMap.colors.length; i++) { - - geometry.faces[i].color = colorMap.colors[i]; - - } - - } + window.addEventListener( 'resize', onWindowResize, false ); + document.addEventListener( 'keydown', onKeyDown, false ); } @@ -184,20 +166,20 @@ camera.aspect = window.innerWidth / window.innerHeight; camera.updateProjectionMatrix(); - renderer.setSize(window.innerWidth, window.innerHeight); + renderer.setSize( window.innerWidth, window.innerHeight ); } - function onKeyDown(event) { + function onKeyDown ( event ) { - switch (event.keyCode) { + switch ( event.keyCode ) { - case 72: /*h*/ + case 72: // h hemiLight.visible = !hemiLight.visible; break; - case 68: /*d*/ + case 68: // d dirLight.visible = !dirLight.visible; break; @@ -210,7 +192,7 @@ function animate() { - requestAnimationFrame(animate); + requestAnimationFrame( animate ); render(); stats.update(); @@ -223,14 +205,13 @@ //controls.update(); - for (var i = 0; i < morphs.length; i++) { + for ( var i = 0; i < mixers.length; i ++ ) { - morph = morphs[i]; - morph.updateAnimation(1000 * delta); + mixers[ i ].update( delta ); } - renderer.render(scene, camera); + renderer.render( scene, camera ); } } diff --git a/threejs/tests/webgl/webgl_particles_billboards.ts b/threejs/tests/webgl/webgl_particles_billboards.ts deleted file mode 100644 index 96b77588c0..0000000000 --- a/threejs/tests/webgl/webgl_particles_billboards.ts +++ /dev/null @@ -1,147 +0,0 @@ -/// -/// - -// https://github.com/mrdoob/three.js/blob/master/examples/webgl_particles_billboards.html - -() => { - if (!Detector.webgl) Detector.addGetWebGLMessage(); - - var container, stats; - var camera, scene, renderer, particles, geometry, material, i, h, color, sprite, size; - var mouseX = 0, mouseY = 0; - - var windowHalfX = window.innerWidth / 2; - var windowHalfY = window.innerHeight / 2; - - init(); - animate(); - - function init() { - - container = document.createElement('div'); - document.body.appendChild(container); - - camera = new THREE.PerspectiveCamera(55, window.innerWidth / window.innerHeight, 2, 2000); - camera.position.z = 1000; - - scene = new THREE.Scene(); - scene.fog = new THREE.FogExp2(0x000000, 0.001); - - geometry = new THREE.Geometry(); - - sprite = THREE.ImageUtils.loadTexture("textures/sprites/disc.png"); - - for (i = 0; i < 10000; i++) { - - var vertex = new THREE.Vector3(); - vertex.x = 2000 * Math.random() - 1000; - vertex.y = 2000 * Math.random() - 1000; - vertex.z = 2000 * Math.random() - 1000; - - geometry.vertices.push(vertex); - - } - - material = new THREE.PointCloudMaterial({ size: 35, sizeAttenuation: false, map: sprite, alphaTest: 0.5, transparent: true }); - material.color.setHSL(1.0, 0.3, 0.7); - - particles = new THREE.PointCloud(geometry, material); - scene.add(particles); - - // - - renderer = new THREE.WebGLRenderer(); - renderer.setPixelRatio(window.devicePixelRatio); - renderer.setSize(window.innerWidth, window.innerHeight); - container.appendChild(renderer.domElement); - - // - - stats = new Stats(); - stats.domElement.style.position = 'absolute'; - stats.domElement.style.top = '0px'; - container.appendChild(stats.domElement); - - // - - document.addEventListener('mousemove', onDocumentMouseMove, false); - document.addEventListener('touchstart', onDocumentTouchStart, false); - document.addEventListener('touchmove', onDocumentTouchMove, false); - - // - - window.addEventListener('resize', onWindowResize, false); - - } - - function onWindowResize() { - - windowHalfX = window.innerWidth / 2; - windowHalfY = window.innerHeight / 2; - - camera.aspect = window.innerWidth / window.innerHeight; - camera.updateProjectionMatrix(); - - renderer.setSize(window.innerWidth, window.innerHeight); - - } - - function onDocumentMouseMove(event) { - - mouseX = event.clientX - windowHalfX; - mouseY = event.clientY - windowHalfY; - - } - - function onDocumentTouchStart(event) { - - if (event.touches.length == 1) { - - event.preventDefault(); - - mouseX = event.touches[0].pageX - windowHalfX; - mouseY = event.touches[0].pageY - windowHalfY; - - } - } - - function onDocumentTouchMove(event) { - - if (event.touches.length == 1) { - - event.preventDefault(); - - mouseX = event.touches[0].pageX - windowHalfX; - mouseY = event.touches[0].pageY - windowHalfY; - - } - - } - - // - - function animate() { - - requestAnimationFrame(animate); - - render(); - stats.update(); - - } - - function render() { - - var time = Date.now() * 0.00005; - - camera.position.x += (mouseX - camera.position.x) * 0.05; - camera.position.y += (- mouseY - camera.position.y) * 0.05; - - camera.lookAt(scene.position); - - h = (360 * (1.0 + time) % 360) / 360; - material.color.setHSL(h, 0.5, 0.5); - - renderer.render(scene, camera); - - } -} \ No newline at end of file diff --git a/threejs/tests/webgl/webgl_points_billboards.ts b/threejs/tests/webgl/webgl_points_billboards.ts new file mode 100644 index 0000000000..37c41424bc --- /dev/null +++ b/threejs/tests/webgl/webgl_points_billboards.ts @@ -0,0 +1,147 @@ +/// +/// + +// https://github.com/mrdoob/three.js/blob/master/examples/webgl_particles_billboards.html + +() => { + if ( ! Detector.webgl ) Detector.addGetWebGLMessage(); + + var container, stats; + var camera, scene, renderer, particles, geometry, material, i, h, color, sprite, size; + var mouseX = 0, mouseY = 0; + + var windowHalfX = window.innerWidth / 2; + var windowHalfY = window.innerHeight / 2; + + init(); + animate(); + + function init() { + + container = document.createElement( 'div' ); + document.body.appendChild( container ); + + camera = new THREE.PerspectiveCamera( 55, window.innerWidth / window.innerHeight, 2, 2000 ); + camera.position.z = 1000; + + scene = new THREE.Scene(); + scene.fog = new THREE.FogExp2( 0x000000, 0.001 ); + + geometry = new THREE.Geometry(); + + sprite = THREE.ImageUtils.loadTexture( "textures/sprites/disc.png" ); + + for ( i = 0; i < 10000; i ++ ) { + + var vertex = new THREE.Vector3(); + vertex.x = 2000 * Math.random() - 1000; + vertex.y = 2000 * Math.random() - 1000; + vertex.z = 2000 * Math.random() - 1000; + + geometry.vertices.push( vertex ); + + } + + material = new THREE.PointsMaterial( { size: 35, sizeAttenuation: false, map: sprite, alphaTest: 0.5, transparent: true } ); + material.color.setHSL( 1.0, 0.3, 0.7 ); + + particles = new THREE.Points( geometry, material ); + scene.add( particles ); + + // + + renderer = new THREE.WebGLRenderer(); + renderer.setPixelRatio( window.devicePixelRatio ); + renderer.setSize( window.innerWidth, window.innerHeight ); + container.appendChild( renderer.domElement ); + + // + + stats = new Stats(); + stats.domElement.style.position = 'absolute'; + stats.domElement.style.top = '0px'; + container.appendChild( stats.domElement ); + + // + + document.addEventListener( 'mousemove', onDocumentMouseMove, false ); + document.addEventListener( 'touchstart', onDocumentTouchStart, false ); + document.addEventListener( 'touchmove', onDocumentTouchMove, false ); + + // + + window.addEventListener( 'resize', onWindowResize, false ); + + } + + function onWindowResize() { + + windowHalfX = window.innerWidth / 2; + windowHalfY = window.innerHeight / 2; + + camera.aspect = window.innerWidth / window.innerHeight; + camera.updateProjectionMatrix(); + + renderer.setSize( window.innerWidth, window.innerHeight ); + + } + + function onDocumentMouseMove( event ) { + + mouseX = event.clientX - windowHalfX; + mouseY = event.clientY - windowHalfY; + + } + + function onDocumentTouchStart( event ) { + + if ( event.touches.length == 1 ) { + + event.preventDefault(); + + mouseX = event.touches[ 0 ].pageX - windowHalfX; + mouseY = event.touches[ 0 ].pageY - windowHalfY; + + } + } + + function onDocumentTouchMove( event ) { + + if ( event.touches.length == 1 ) { + + event.preventDefault(); + + mouseX = event.touches[ 0 ].pageX - windowHalfX; + mouseY = event.touches[ 0 ].pageY - windowHalfY; + + } + + } + + // + + function animate() { + + requestAnimationFrame( animate ); + + render(); + stats.update(); + + } + + function render() { + + var time = Date.now() * 0.00005; + + camera.position.x += ( mouseX - camera.position.x ) * 0.05; + camera.position.y += ( - mouseY - camera.position.y ) * 0.05; + + camera.lookAt( scene.position ); + + h = ( 360 * ( 1.0 + time ) % 360 ) / 360; + material.color.setHSL( h, 0.5, 0.5 ); + + renderer.render( scene, camera ); + + } +} \ No newline at end of file diff --git a/threejs/tests/webgl/webgl_sprites.ts b/threejs/tests/webgl/webgl_sprites.ts index c7e2d4f845..3ec84bba15 100644 --- a/threejs/tests/webgl/webgl_sprites.ts +++ b/threejs/tests/webgl/webgl_sprites.ts @@ -25,14 +25,14 @@ var width = window.innerWidth; var height = window.innerHeight; - camera = new THREE.PerspectiveCamera(60, width / height, 1, 2100); + camera = new THREE.PerspectiveCamera( 60, width / height, 1, 2100 ); camera.position.z = 1500; - cameraOrtho = new THREE.OrthographicCamera(- width / 2, width / 2, height / 2, - height / 2, 1, 10); + cameraOrtho = new THREE.OrthographicCamera( - width / 2, width / 2, height / 2, - height / 2, 1, 10 ); cameraOrtho.position.z = 10; scene = new THREE.Scene(); - scene.fog = new THREE.Fog(0x000000, 1500, 2100); + scene.fog = new THREE.Fog( 0x000000, 1500, 2100 ); sceneOrtho = new THREE.Scene(); @@ -41,93 +41,93 @@ var amount = 200; var radius = 500; - var mapA = THREE.ImageUtils.loadTexture("textures/sprite0.png", undefined, createHUDSprites); - var mapB = THREE.ImageUtils.loadTexture("textures/sprite1.png"); - mapC = THREE.ImageUtils.loadTexture("textures/sprite2.png"); + var mapA = THREE.ImageUtils.loadTexture( "textures/sprite0.png", undefined, createHUDSprites ); + var mapB = THREE.ImageUtils.loadTexture( "textures/sprite1.png" ); + mapC = THREE.ImageUtils.loadTexture( "textures/sprite2.png" ); group = new THREE.Group(); - var materialC = new THREE.SpriteMaterial({ map: mapC, color: 0xffffff, fog: true }); - var materialB = new THREE.SpriteMaterial({ map: mapB, color: 0xffffff, fog: true }); + var materialC = new THREE.SpriteMaterial( { map: mapC, color: 0xffffff, fog: true } ); + var materialB = new THREE.SpriteMaterial( { map: mapB, color: 0xffffff, fog: true } ); - for (var a = 0; a < amount; a++) { + for ( var a = 0; a < amount; a ++ ) { var x = Math.random() - 0.5; var y = Math.random() - 0.5; var z = Math.random() - 0.5; - if (z < 0) { + if ( z < 0 ) { material = materialB.clone(); } else { material = materialC.clone(); - material.color.setHSL(0.5 * Math.random(), 0.75, 0.5); - material.map.offset.set(-0.5, -0.5); - material.map.repeat.set(2, 2); + material.color.setHSL( 0.5 * Math.random(), 0.75, 0.5 ); + material.map.offset.set( -0.5, -0.5 ); + material.map.repeat.set( 2, 2 ); } - var sprite = new THREE.Sprite(material); + var sprite = new THREE.Sprite( material ); - sprite.position.set(x, y, z); + sprite.position.set( x, y, z ); sprite.position.normalize(); - sprite.position.multiplyScalar(radius); + sprite.position.multiplyScalar( radius ); - group.add(sprite); + group.add( sprite ); } - scene.add(group); + scene.add( group ); // renderer renderer = new THREE.WebGLRenderer(); - renderer.setPixelRatio(window.devicePixelRatio); - renderer.setSize(window.innerWidth, window.innerHeight); + renderer.setPixelRatio( window.devicePixelRatio ); + renderer.setSize( window.innerWidth, window.innerHeight ); renderer.autoClear = false; // To allow render overlay on top of sprited sphere - document.body.appendChild(renderer.domElement); + document.body.appendChild( renderer.domElement ); // - window.addEventListener('resize', onWindowResize, false); + window.addEventListener( 'resize', onWindowResize, false ); } - function createHUDSprites(texture) { + function createHUDSprites ( texture ) { - var material = new THREE.SpriteMaterial({ map: texture }); + var material = new THREE.SpriteMaterial( { map: texture } ); var width = material.map.image.width; var height = material.map.image.height; - spriteTL = new THREE.Sprite(material); - spriteTL.scale.set(width, height, 1); - sceneOrtho.add(spriteTL); + spriteTL = new THREE.Sprite( material ); + spriteTL.scale.set( width, height, 1 ); + sceneOrtho.add( spriteTL ); - spriteTR = new THREE.Sprite(material); - spriteTR.scale.set(width, height, 1); - sceneOrtho.add(spriteTR); + spriteTR = new THREE.Sprite( material ); + spriteTR.scale.set( width, height, 1 ); + sceneOrtho.add( spriteTR ); - spriteBL = new THREE.Sprite(material); - spriteBL.scale.set(width, height, 1); - sceneOrtho.add(spriteBL); + spriteBL = new THREE.Sprite( material ); + spriteBL.scale.set( width, height, 1 ); + sceneOrtho.add( spriteBL ); - spriteBR = new THREE.Sprite(material); - spriteBR.scale.set(width, height, 1); - sceneOrtho.add(spriteBR); + spriteBR = new THREE.Sprite( material ); + spriteBR.scale.set( width, height, 1 ); + sceneOrtho.add( spriteBR ); - spriteC = new THREE.Sprite(material); - spriteC.scale.set(width, height, 1); - sceneOrtho.add(spriteC); + spriteC = new THREE.Sprite( material ); + spriteC.scale.set( width, height, 1 ); + sceneOrtho.add( spriteC ); updateHUDSprites(); - }; + } - function updateHUDSprites() { + function updateHUDSprites () { var width = window.innerWidth / 2; var height = window.innerHeight / 2; @@ -137,13 +137,13 @@ var imageWidth = material.map.image.width / 2; var imageHeight = material.map.image.height / 2; - spriteTL.position.set(- width + imageWidth, height - imageHeight, 1); // top left - spriteTR.position.set(width - imageWidth, height - imageHeight, 1); // top right - spriteBL.position.set(- width + imageWidth, - height + imageHeight, 1); // bottom left - spriteBR.position.set(width - imageWidth, - height + imageHeight, 1); // bottom right - spriteC.position.set(0, 0, 1); // center + spriteTL.position.set( - width + imageWidth, height - imageHeight, 1 ); // top left + spriteTR.position.set( width - imageWidth, height - imageHeight, 1 ); // top right + spriteBL.position.set( - width + imageWidth, - height + imageHeight, 1 ); // bottom left + spriteBR.position.set( width - imageWidth, - height + imageHeight, 1 ); // bottom right + spriteC.position.set( 0, 0, 1 ); // center - }; + } function onWindowResize() { @@ -161,13 +161,13 @@ updateHUDSprites(); - renderer.setSize(window.innerWidth, window.innerHeight); + renderer.setSize( window.innerWidth, window.innerHeight ); } function animate() { - requestAnimationFrame(animate); + requestAnimationFrame( animate ); render(); } @@ -176,28 +176,28 @@ var time = Date.now() / 1000; - for (var i = 0, l = group.children.length; i < l; i++) { + for ( var i = 0, l = group.children.length; i < l; i ++ ) { - var sprite = group.children[i]; + var sprite = group.children[ i ]; var material = sprite.material; - var scale = Math.sin(time + sprite.position.x * 0.01) * 0.3 + 1.0; + var scale = Math.sin( time + sprite.position.x * 0.01 ) * 0.3 + 1.0; var imageWidth = 1; var imageHeight = 1; - if (material.map && material.map.image && material.map.image.width) { + if ( material.map && material.map.image && material.map.image.width ) { imageWidth = material.map.image.width; imageHeight = material.map.image.height; } - sprite.material.rotation += 0.1 * (i / l); - sprite.scale.set(scale * imageWidth, scale * imageHeight, 1.0); + sprite.material.rotation += 0.1 * ( i / l ); + sprite.scale.set( scale * imageWidth, scale * imageHeight, 1.0 ); - if (material.map !== mapC) { + if ( material.map !== mapC ) { - material.opacity = Math.sin(time + sprite.position.x * 0.01) * 0.4 + 0.6; + material.opacity = Math.sin( time + sprite.position.x * 0.01 ) * 0.4 + 0.6; } @@ -208,9 +208,9 @@ group.rotation.z = time * 1.0; renderer.clear(); - renderer.render(scene, camera); + renderer.render( scene, camera ); renderer.clearDepth(); - renderer.render(sceneOrtho, cameraOrtho); + renderer.render( sceneOrtho, cameraOrtho ); } } \ No newline at end of file diff --git a/threejs/three-tests.ts b/threejs/three-tests.ts index ff97df43f9..2e9f37b109 100644 --- a/threejs/three-tests.ts +++ b/threejs/three-tests.ts @@ -33,14 +33,14 @@ THE SOFTWARE. /// /// /// -/// +/// /// /// /// /// /// /// -/// +/// /// /// /// diff --git a/threejs/three.d.ts b/threejs/three.d.ts index 433f170784..b01c38c63a 100644 --- a/threejs/three.d.ts +++ b/threejs/three.d.ts @@ -82,6 +82,17 @@ declare module THREE { export var OneMinusDstColorFactor: BlendingSrcFactor; export var SrcAlphaSaturateFactor: BlendingSrcFactor; + // depth modes + export enum DepthModes { } + export var NeverDepth: DepthModes; + export var AlwaysDepth: DepthModes; + export var LessDepth: DepthModes; + export var LessEqualDepth: DepthModes; + export var EqualDepth: DepthModes; + export var GreaterEqualDepth: DepthModes; + export var GreaterDepth: DepthModes; + export var NotEqualDepth: DepthModes; + // TEXTURE CONSTANTS // Operations export enum Combine { } @@ -153,11 +164,213 @@ declare module THREE { export var RGBA_PVRTC_4BPPV1_Format: CompressedPixelFormat; export var RGBA_PVRTC_2BPPV1_Format: CompressedPixelFormat; + // Loop styles for AnimationAction + export enum AnimationActionLoopStyles { } + export var LoopOnce: AnimationActionLoopStyles; + export var LoopRepeat: AnimationActionLoopStyles; + export var LoopPingPong: AnimationActionLoopStyles; + // log handlers export function warn(message?: any, ...optionalParams: any[]): void; export function error(message?: any, ...optionalParams: any[]): void; export function log(message?: any, ...optionalParams: any[]): void; + // Animation //////////////////////////////////////////////////////////////////////////////////////// + export class AnimationAction { + constructor(clip: AnimationClip, startTime?: number, timeScale?: number, weight?: number, loop?: boolean); + + clip: AnimationClip + localRoot: Mesh; + startTime: number; + timeScale: number; + weight: number; + loop: AnimationActionLoopStyles; + loopCount: number; + enabled: boolean; + actionTime: number; + clipTime: number; + propertyBindings: PropertyBinding[]; + + setLocalRoot( localRoot: Mesh ): AnimationAction; + updateTime( clipDeltaTime: number ): number; + syncWith( action: AnimationAction ): AnimationAction; + warpToDuration( duration: number ): AnimationAction; + init( time: number ): AnimationAction; + update( clipDeltaTime: number ): any[]; + getTimeScaleAt( time: number ): number; + getWeightAt( time: number ): number; + } + + export class AnimationClip { + constructor( name: string, duration?: number, tracks?: KeyframeTrack[] ); + + name: string; + tracks: KeyframeTrack[]; + duration: number; + results: any[]; + + getAt(clipTime: number): any[]; + trim(): AnimationClip; + optimize(): AnimationClip; + + static CreateFromMorphTargetSequence( name: string, morphTargetSequence: MorphTarget[], fps: number ): AnimationClip; + findByName( clipArray: AnimationClip, name: string ): AnimationClip; + static CreateClipsFromMorphTargetSequences( morphTargets: MorphTarget[], fps: number ): AnimationClip[]; + parse( json: any ): AnimationClip; + parseAnimation( animation: any, bones: Bone[], nodeName: string ): AnimationClip; + } + + export class AnimationMixer { + constructor( root: any ); + + root: any; + time: number; + timeScale: number; + actions: AnimationAction; + propertyBindingMap: any; + + addAction( action: AnimationAction ): void; + removeAllActions(): AnimationMixer; + removeAction( action: AnimationAction ): AnimationMixer; + findActionByName( name: string ): AnimationAction; + play( action: AnimationAction, optionalFadeInDuration?: number ): AnimationMixer; + fadeOut( action: AnimationAction, duration: number ): AnimationMixer; + fadeIn( action: AnimationAction, duration: number ): AnimationMixer; + warp( action: AnimationAction, startTimeScale: NumberKeyframeTrack, endTimeScale: NumberKeyframeTrack, duration: number ): AnimationMixer; + crossFade( fadeOutAction: AnimationAction, fadeInAction: AnimationAction, duration: number, warp: boolean ): AnimationMixer; + update( deltaTime: number ): AnimationMixer; + } + + export var AnimationUtils: { + getEqualsFunc( exemplarValue: any ): boolean; + clone(exemplarValue: T): T; + lerp( a: any, b: any, alpha: number, interTrack: boolean ): any; + lerp_object( a: any, b: any, alpha: number ): any; + slerp_object( a: any, b: any, alpha: number ): any; + lerp_number( a: any, b: any, alpha: number ): any; + lerp_boolean( a: any, b: any, alpha: number ): any; + lerp_boolean_immediate( a: any, b: any, alpha: number ): any; + lerp_string( a: any, b: any, alpha: number ): any; + lerp_string_immediate( a: any, b: any, alpha: number ): any; + getLerpFunc( exemplarValue: any, interTrack: boolean ): Function; + }; + + export class KeyframeTrack { + constructor(name: string, keys: any[]); + + name: string; + keys: any[]; + lastIndex: number; + + getAt( time: number ): any; + shift( timeOffset: number ): KeyframeTrack; + scale( timeScale: number ): KeyframeTrack; + trim( startTime: number, endTime: number ): KeyframeTrack; + validate(): KeyframeTrack; + optimize(): KeyframeTrack; + + keyComparator(key0: KeyframeTrack, key1: KeyframeTrack): number; + parse( json: any ): KeyframeTrack; + GetTrackTypeForTypeName( typeName: string ): any; + } + + export class PropertyBinding { + constructor( rootNode: any, trackName: string ); + + rootNode: any; + trackName: string; + referenceCount: number; + originalValue: any; + directoryName: string; + nodeName: string; + objectName: string; + objectIndex: number; + propertyName: string; + propertyIndex: number; + node: any; + cumulativeValue: number; + cumulativeWeight: number; + + reset(): void; + accumulate( value: any, weight: number ): void; + unbind(): void; + bind(): void; + apply(): void; + parseTrackName( trackName: string ): any; + findNode( root: any, nodeName: string ): any; + } + + export class BooleanKeyframeTrack extends KeyframeTrack { + constructor(name: string, keys: any[]); + + result: any; + + setResult( value: any ): void; + lerpValues( value0: any, value1: any, alpha: number ): any; + compareValues( value0: any, value1: any ): boolean; + clone(): BooleanKeyframeTrack; + parse( json: any ): BooleanKeyframeTrack; + } + + export class ColorKeyframeTrack extends KeyframeTrack { + constructor(name: string, keys: any[]); + + result: any; + + setResult( value: any ): void; + lerpValues( value0: any, value1: any, alpha: number ): any; + compareValues( value0: any, value1: any ): boolean; + clone(): ColorKeyframeTrack; + parse( json: any ): ColorKeyframeTrack; + } + + export class NumberKeyframeTrack { + constructor(); + + result: any; + + setResult( value: any ): void; + lerpValues( value0: any, value1: any, alpha: number ): any; + compareValues( value0: any, value1: any ): boolean; + clone(): NumberKeyframeTrack; + parse( json: any ): NumberKeyframeTrack; + } + + export class QuaternionKeyframeTrack { + constructor(); + + result: any; + + setResult( value: any ): void; + lerpValues( value0: any, value1: any, alpha: number ): any; + compareValues( value0: any, value1: any ): boolean; + clone(): QuaternionKeyframeTrack; + parse( json: any ): QuaternionKeyframeTrack; + } + + export class StringKeyframeTrack { + constructor(); + + result: any; + + setResult( value: any ): void; + lerpValues( value0: any, value1: any, alpha: number ): any; + compareValues( value0: any, value1: any ): boolean; + clone(): StringKeyframeTrack; + parse( json: any ): StringKeyframeTrack; + } + + export class VectorKeyframeTrack { + constructor(); + + result: any; + + setResult( value: any ): void; + lerpValues( value0: any, value1: any, alpha: number ): any; + compareValues( value0: any, value1: any ): boolean; + clone(): VectorKeyframeTrack; + parse( json: any ): VectorKeyframeTrack; + } // Cameras //////////////////////////////////////////////////////////////////////////////////////// @@ -188,7 +401,8 @@ declare module THREE { */ lookAt(vector: Vector3): void; - clone(camera?: Camera): Camera; + clone(): Camera; + copy(camera?: Camera): Camera; } export class CubeCamera extends Object3D { @@ -256,8 +470,9 @@ declare module THREE { * Updates the camera projection matrix. Must be called after change of parameters. */ updateProjectionMatrix(): void; - clone(): OrthographicCamera; + copy( source: OrthographicCamera ): OrthographicCamera; + toJSON( meta?: any ): any; } /** @@ -352,60 +567,36 @@ declare module THREE { */ updateProjectionMatrix(): void; clone(): PerspectiveCamera; + copy( source: PerspectiveCamera ): PerspectiveCamera; + toJSON( meta?: any ): any; } // Core /////////////////////////////////////////////////////////////////////////////////////////////// - /** - * @see src/core/InterleavedBuffer.js - */ - export class InterleavedBuffer { - constructor(array: ArrayLike, stride: number); - array: ArrayLike; - stride: number; - dynamic: boolean; - updateRange: {offset:number, count:number}; - version: number; - length: number; - count: number; - needsUpdate: boolean; - - setDynamic(dynamic: boolean): InterleavedBuffer; - copy(source: InterleavedBuffer): void; - copyAt(index1: number, attribute: InterleavedBufferAttribute, index2: number): InterleavedBuffer; - set(value: ArrayLike, index: number): InterleavedBuffer; - clone(): InterleavedBuffer; - } - - /** - * @see src/core/InstancedInterleavedBuffer.js - */ - export class InstancedInterleavedBuffer extends InterleavedBuffer { - constructor(array: ArrayLike, stride: number, meshPerAttribute?: number); - meshPerAttribute: number; - copy(source: InstancedInterleavedBuffer): InstancedInterleavedBuffer; - } - /** * @see src/core/BufferAttribute.js */ export class BufferAttribute { constructor(array: ArrayLike, itemSize: number); // array parameter should be TypedArray. + uuid: string; array: ArrayLike; itemSize: number; dynamic: boolean; updateRange: {offset:number, count:number}; + version: number; + needsUpdate: boolean; /** Deprecated, use count instead */ length: number; count: number; setDynamic(dynamic: boolean): BufferAttribute; + clone(): BufferAttribute; copy(source: BufferAttribute): BufferAttribute; copyAt(index1: number, attribute: BufferAttribute, index2: number): BufferAttribute; copyArray(array: ArrayLike): BufferAttribute; - copyColorArray(colors: {r:number, g:number, b:number}[]): BufferAttribute; + copyColorsArray(colors: {r:number, g:number, b:number}[]): BufferAttribute; copyIndicesArray(indices: {a:number, b:number, c:number}[]): BufferAttribute; copyVector2sArray(vectors: {x:number, y:number}[]): BufferAttribute; copyVector3sArray(vectors: {x:number, y:number, z:number}[]): BufferAttribute; @@ -427,83 +618,47 @@ declare module THREE { // deprecated (are these actually deprecated?) export class Int8Attribute extends BufferAttribute{ - constructor(data: any, itemSize: number); + constructor(array: any, itemSize: number); } // deprecated export class Uint8Attribute extends BufferAttribute { - constructor(data: any, itemSize: number); + constructor(array: any, itemSize: number); } // deprecated export class Uint8ClampedAttribute extends BufferAttribute { - constructor(data: any, itemSize: number); + constructor(array: any, itemSize: number); } // deprecated export class Int16Attribute extends BufferAttribute { - constructor(data: any, itemSize: number); + constructor(array: any, itemSize: number); } // deprecated export class Uint16Attribute extends BufferAttribute { - constructor(data: any, itemSize: number); + constructor(array: any, itemSize: number); } // deprecated export class Int32Attribute extends BufferAttribute { - constructor(data: any, itemSize: number); + constructor(array: any, itemSize: number); } // deprecated export class Uint32Attribute extends BufferAttribute { - constructor(data: any, itemSize: number); + constructor(array: any, itemSize: number); } // deprecated export class Float32Attribute extends BufferAttribute { - constructor(data: any, itemSize: number); + constructor(array: any, itemSize: number); } // deprecated export class Float64Attribute extends BufferAttribute { - constructor(data: any, itemSize: number); - } - - /** - * @see src/core/InstancedBufferAttribute.js - */ - export class InstancedBufferAttribute extends BufferAttribute { - constructor(data: ArrayLike, itemSize: number, meshPerAttribute?: number); - meshPerAttribute: number; - copy(source: InstancedBufferAttribute): InstancedBufferAttribute; - } - - /** - * @see src/core/InterleavedBufferAttribute.js - */ - export class InterleavedBufferAttribute { - constructor(interleavedBuffer: InterleavedBuffer, itemSize: number, offset: number); - - uuid: string; - data: InterleavedBuffer; - itemSize: number; - offset: number; - /** Deprecated, use count instead */ - length: number; - count: number; - - getX(index: number): number; - setX(index: number, x: number): InterleavedBufferAttribute; - getY(index: number): number; - setY(index: number, y: number): InterleavedBufferAttribute; - getZ(index: number): number; - setZ(index: number, z: number): InterleavedBufferAttribute; - getW(index: number): number; - setW(index: number, z: number): InterleavedBufferAttribute; - setXY(index: number, x: number, y: number): InterleavedBufferAttribute; - setXYZ(index: number, x: number, y: number, z: number): InterleavedBufferAttribute; - setXYZW(index: number, x: number, y: number, z: number, w: number): InterleavedBufferAttribute; + constructor(array: any, itemSize: number); } /** @@ -528,17 +683,19 @@ declare module THREE { uuid: string; name: string; type: string; + index: BufferAttribute; attributes: BufferAttribute|InterleavedBufferAttribute[]; - /** Deprecated. Use groups instead. */ - drawcalls: { start: number; count: number; index: number; }[]; - /** Deprecated. Use groups instead. */ - offsets: { start: number; count: number; index: number; }[]; - groups: { start: number, count: number, materialIndex?: number }[]; + morphAttributes: any; + groups: {start: number, count: number, materialIndex?: number}[]; boundingBox: Box3; boundingSphere: BoundingSphere; + drawRange: { start: number, count: number }; - addIndex(index: BufferAttribute): void; - setIndex(index: BufferAttribute): void; + /** Deprecated. */ + addIndex( index: BufferAttribute ): void; + + getIndex(): BufferAttribute; + setIndex( index: BufferAttribute ): void; /** Deprecated. This overloaded method is deprecated. */ addAttribute(name: string, array: any, itemSize: number): any; @@ -546,11 +703,15 @@ declare module THREE { getAttribute(name: string): BufferAttribute|InterleavedBufferAttribute; removeAttribute(name: string): void; - setIndex(index: BufferAttribute): void; - getIndex(): BufferAttribute; + /** Deprecated. */ + drawcalls(): any; + /** Deprecated. */ + offsets(): any; /** Deprecated. Use addGroup */ - addDrawCall(start: number, count: number, index: number): void; + addDrawCall(start: number, count: number, index?: number): void; + /** Deprecated. */ + clearDrawCalls(): void; addGroup(start: number, count: number, materialIndex?: number): void; clearGroups(): void; @@ -575,6 +736,8 @@ declare module THREE { fromGeometry(geometry: Geometry, settings?: any): BufferGeometry; + fromDirectGeometry( geometry: DirectGeometry ): BufferGeometry; + /** * Computes bounding box of the geometry, updating Geometry.boundingBox attribute. * Bounding boxes aren't computed by default. They need to be explicitly computed, otherwise they are null. @@ -616,47 +779,15 @@ declare module THREE { dispatchEvent(event: { type: string; target: any; }): void; } - /** - * @see src/core/InstancedBufferGeometry.js - */ - export class InstancedBufferGeometry extends BufferGeometry { + export class Channels { constructor(); - groups: {start:number, count:number, instances:number}[]; - addGroup(start: number, count: number, instances: number): void; - copy(source: InstancedBufferGeometry): InstancedBufferGeometry; - } - /** - * @see src/core/DirectGeometry.js - */ - export class DirectGeometry { - constructor(); - id: number; - uuid: string; - name: string; - type: string; - indices: number[]; - vertices: Vector3[]; - normals: Vector3[]; - colors: Color[]; - uvs: Vector2[]; - uvs2: Vector2[]; - groups: {start: number, materialIndex: number}[]; - morphTargets: MorphTarget[]; - skinWeights: number[]; - skinIndices: number[]; - boundingBox: Box3; - boundingSphere: BoundingSphere; - verticesNeedUpdate: boolean; - normalsNeedUpdate: boolean; - colorsNeedUpdate: boolean; - uvsNeedUpdate: boolean; - groupsNeedUpdate: boolean; - computeBoundingBox(): void; - computeBoundingSphere(): void; - computeGroups(geometry: Geometry): void; - fromGeometry(geometry: Geometry): DirectGeometry; - dispose(): void; + mask: number; + + set( channel: number ): void; + enable( channel: number ): void; + toggle( channel: number ): void; + disable( channel: number ): void; } /** @@ -720,17 +851,44 @@ declare module THREE { } /** - * Deprecated. Use new THREE.BufferAttribute().setDynamic(true) instead. + * @see src/core/DirectGeometry.js */ - export class DynamicBufferAttribute extends BufferAttribute { - constructor(array: any, itemSize: number); + export class DirectGeometry { + constructor(); - updateRange: { - offset: number; - count: number; - } + id: number; + uuid: string; + name: string; + type: string; + indices: number[]; + vertices: Vector3[]; + normals: Vector3[]; + colors: Color[]; + uvs: Vector2[]; + uvs2: Vector2[]; + groups: {start: number, materialIndex: number}[]; + morphTargets: MorphTarget[]; + skinWeights: number[]; + skinIndices: number[]; + boundingBox: Box3; + boundingSphere: BoundingSphere; + verticesNeedUpdate: boolean; + normalsNeedUpdate: boolean; + colorsNeedUpdate: boolean; + uvsNeedUpdate: boolean; + groupsNeedUpdate: boolean; - clone(): DynamicBufferAttribute; + computeBoundingBox(): void; + computeBoundingSphere(): void; + computeGroups(geometry: Geometry): void; + fromGeometry(geometry: Geometry): DirectGeometry; + dispose(): void; + + // EventDispatcher mixins + addEventListener(type: string, listener: (event: any) => void ): void; + hasEventListener(type: string, listener: (event: any) => void): void; + removeEventListener(type: string, listener: (event: any) => void): void; + dispatchEvent(event: { type: string; target: any; }): void; } /** @@ -883,7 +1041,6 @@ declare module THREE { radius: number; } - /** * Base class for geometries * @@ -983,13 +1140,6 @@ declare module THREE { */ boundingSphere: BoundingSphere; - /** - * Set to true if attribute buffers will need to change in runtime (using "dirty" flags). - * Unless set to true internal typed arrays corresponding to buffers will be deleted once sent to GPU. - * Defaults to true. - */ - dynamic: boolean; - /** * Set to true if the vertices array has been updated. */ @@ -1010,11 +1160,6 @@ declare module THREE { */ normalsNeedUpdate: boolean; - /** - * Set to true if the tangents in the faces has been updated. - */ - tangentsNeedUpdate: boolean; - /** * Set to true if the colors array has been updated. */ @@ -1035,6 +1180,15 @@ declare module THREE { */ applyMatrix(matrix: Matrix4): void; + rotateX(angle: number): Geometry; + rotateY(angle: number): Geometry; + rotateZ(angle: number): Geometry; + + translate(x: number, y: number, z: number): Geometry; + scale(x: number, y: number, z: number): Geometry; + lookAt( vector: Vector3 ): void; + + fromBufferGeometry(geometry: BufferGeometry): Geometry; /** @@ -1042,6 +1196,8 @@ declare module THREE { */ center(): Vector3; + normalize(): Geometry; + /** * Computes face normals. */ @@ -1090,6 +1246,8 @@ declare module THREE { */ clone(): Geometry; + copy(source: Geometry): Geometry; + /** * Removes The object from memory. * Don't forget to call this method when you remove an geometry because it can cuase meomory leaks. @@ -1099,8 +1257,8 @@ declare module THREE { //These properties do not exist in a normal Geometry class, but if you use the instance that was passed by JSONLoader, it will be added. bones: Bone[]; - animation: AnimationData; - animations: AnimationData[]; + animation: AnimationClip; + animations: AnimationClip[]; // EventDispatcher mixins addEventListener(type: string, listener: (event: any) => void ): void; @@ -1109,6 +1267,89 @@ declare module THREE { dispatchEvent(event: { type: string; target: any; }): void; } + /** + * @see src/core/InstancedBufferAttribute.js + */ + export class InstancedBufferAttribute extends BufferAttribute { + constructor(data: ArrayLike, itemSize: number, meshPerAttribute?: number); + meshPerAttribute: number; + + clone(): InstancedBufferAttribute; + copy(source: InstancedBufferAttribute): InstancedBufferAttribute; + } + + /** + * @see src/core/InstancedBufferGeometry.js + */ + export class InstancedBufferGeometry extends BufferGeometry { + constructor(); + groups: {start:number, count:number, instances:number}[]; + addGroup(start: number, count: number, instances: number): void; + + clone(): InstancedBufferGeometry; + copy(source: InstancedBufferGeometry): InstancedBufferGeometry; + } + + /** + * @see src/core/InstancedInterleavedBuffer.js + */ + export class InstancedInterleavedBuffer extends InterleavedBuffer { + constructor(array: ArrayLike, stride: number, meshPerAttribute?: number); + meshPerAttribute: number; + + clone(): InstancedInterleavedBuffer; + copy(source: InstancedInterleavedBuffer): InstancedInterleavedBuffer; + } + + /** + * @see src/core/InterleavedBuffer.js + */ + export class InterleavedBuffer { + constructor(array: ArrayLike, stride: number); + array: ArrayLike; + stride: number; + dynamic: boolean; + updateRange: {offset:number, count:number}; + version: number; + length: number; + count: number; + needsUpdate: boolean; + + setDynamic(dynamic: boolean): InterleavedBuffer; + clone(): InterleavedBuffer; + copy(source: InterleavedBuffer): InterleavedBuffer; + copyAt(index1: number, attribute: InterleavedBufferAttribute, index2: number): InterleavedBuffer; + set(value: ArrayLike, index: number): InterleavedBuffer; + clone(): InterleavedBuffer; + } + + /** + * @see src/core/InterleavedBufferAttribute.js + */ + export class InterleavedBufferAttribute { + constructor(interleavedBuffer: InterleavedBuffer, itemSize: number, offset: number); + + uuid: string; + data: InterleavedBuffer; + itemSize: number; + offset: number; + /** Deprecated, use count instead */ + length: number; + count: number; + + getX(index: number): number; + setX(index: number, x: number): InterleavedBufferAttribute; + getY(index: number): number; + setY(index: number, y: number): InterleavedBufferAttribute; + getZ(index: number): number; + setZ(index: number, z: number): InterleavedBufferAttribute; + getW(index: number): number; + setW(index: number, z: number): InterleavedBufferAttribute; + setXY(index: number, x: number, y: number): InterleavedBufferAttribute; + setXYZ(index: number, x: number, y: number, z: number): InterleavedBufferAttribute; + setXYZW(index: number, x: number, y: number, z: number, w: number): InterleavedBufferAttribute; + } + /** * Base class for scene graph objects */ @@ -1137,6 +1378,8 @@ declare module THREE { */ parent: Object3D; + channels: Channels; + /** * Array with object's children. */ @@ -1167,6 +1410,10 @@ declare module THREE { */ scale: Vector3; + modelViewMatrix: { value: Matrix4 }; + + normalMatrix: { value: Matrix3 }; + /** * When this is set, then the rotationMatrix gets calculated every frame. */ @@ -1223,14 +1470,7 @@ declare module THREE { * */ static DefaultUp: Vector3; - static DefaultMatrixAutoUpdate: boolean; - - /** - * Order of axis for Euler angles. - */ - // deprecated - eulerOrder: string; - + static DefaultMatrixAutoUpdate: Vector3; /** * This updates the position, rotation and scale with the matrix. @@ -1364,11 +1604,8 @@ declare module THREE { getWorldScale(optionalTarget?: Vector3): Vector3; getWorldDirection(optionalTarget?: Vector3): Vector3; - /** - * Translates object along arbitrary axis by distance. - * @param distance Distance. - * @param axis Translation direction. - */ + raycast(raycaster: Raycaster, intersects: any): void; + traverse(callback: (object: Object3D) => any): void; traverseVisible(callback: (object: Object3D) => any): void; @@ -1385,14 +1622,16 @@ declare module THREE { */ updateMatrixWorld(force: boolean): void; - toJSON(): any; + toJSON(meta?: any): any; + + clone(recursive?: boolean): Object3D; /** * * @param object * @param recursive */ - clone(object?: Object3D, recursive?: boolean): Object3D; + copy(source: Object3D, recursive?: boolean): Object3D; // EventDispatcher mixins addEventListener(type: string, listener: (event: any) => void ): void; @@ -1410,13 +1649,11 @@ declare module THREE { } export interface RaycasterParameters { - Sprite?: any; Mesh?: any; - Points?: any; - /** Deprecated, use Points */ - PointCloud?: any; - LOD?: any; Line?: any; + LOD?: any; + Points?: any; + Sprite?: any; } export class Raycaster { @@ -1443,42 +1680,36 @@ declare module THREE { constructor(hex?: number); color: Color; + receiveShadow: boolean; - shadow: LightShadow; - - /** Deprecated, use shadow */ shadowCameraFov: number; - shadowCameraNear: number; - shadowCameraFar: number; shadowCameraLeft: number; shadowCameraRight: number; shadowCameraTop: number; shadowCameraBottom: number; + shadowCameraNear: number; + shadowCameraFar: number; shadowBias: number; shadowDarkness: number; shadowMapWidth: number; shadowMapHeight: number; - shadowMap: RenderTarget; - shadowMapSize: number; - shadowCamera: Camera; - shadowMatrix: Matrix4; - clone(light?: Light): Light; + clone(recursive?: boolean): Light; + copy( source: Light ): Light; + toJSON( meta: any ): any; } - + export class LightShadow { constructor(camera: Camera); - camera: THREE.Camera; - + camera: Camera; bias: number; darkness: number; + mapSize: Vector2; + map: RenderTarget; + matrix: Matrix4; - mapSize: THREE.Vector2; - - map: any; - matrix: THREE.Matrix4; - + copy(source: LightShadow): void; clone(): LightShadow; } @@ -1498,7 +1729,8 @@ declare module THREE { */ constructor(hex?: number); - clone(): AmbientLight; + clone(recursive?: boolean): AmbientLight; + copy(source: AmbientLight): AmbientLight; } /** @@ -1527,7 +1759,10 @@ declare module THREE { */ intensity: number; - clone(): DirectionalLight; + shadow: LightShadow; + + clone(recursive?: boolean): DirectionalLight; + copy(source: DirectionalLight): DirectionalLight; } export class HemisphereLight extends Light { @@ -1536,7 +1771,8 @@ declare module THREE { groundColor: Color; intensity: number; - clone(): HemisphereLight; + clone(recursive?: boolean): HemisphereLight; + copy(source: HemisphereLight): HemisphereLight; } /** @@ -1564,7 +1800,10 @@ declare module THREE { decay: number; - clone(): PointLight; + shadow: LightShadow; + + clone(recursive?: boolean): PointLight; + copy(source: PointLight): PointLight; } /** @@ -1605,7 +1844,10 @@ declare module THREE { decay: number; - clone(): SpotLight; + shadow: LightShadow; + + clone(recursive?: boolean): SpotLight; + copy(source: PointLight): SpotLight; } // Loaders ////////////////////////////////////////////////////////////////////////////////// @@ -1631,8 +1873,6 @@ declare module THREE { export class Loader { constructor(); - imageLoader: ImageLoader; - /** * Will be called when load starts. * The default is a function with empty body. @@ -1659,22 +1899,32 @@ declare module THREE { extractUrlBase(url: string): string; initMaterials(materials: Material[], texturePath: string): Material[]; - needsTangents(materials: Material[]): boolean; - createMaterial(m: Material, texturePath: string): boolean; + createMaterial(m: Material, texturePath: string, crossOrigin?: string): boolean; static Handlers: LoaderHandler; } - export interface LoaderHandler { - handlers: any[]; - add(regex: string, loader: Loader): void; - get(file: string): Loader; + export interface LoaderHandler{ + handlers:any[]; + add(regex:string, loader:Loader):void; + get(file: string):Loader; + } + + export class AnimationLoader { + constructor(manager?: LoadingManager); + + manager: LoadingManager; + load(url: string, onLoad: (animations: AnimationClip[]) => void, onProgress?: (event: any) => void, onError?: (event: any) => void): void; + setCrossOrigin(crossOrigin: string): void; + parse(json: any, onLoad: (animations: AnimationClip[])=>void): void; } export class BinaryTextureLoader { - constructor(); + constructor(manager?: LoadingManager); + manager: LoadingManager; load(url: string, onLoad: (dataTexture: DataTexture) => void, onProgress?: (event: any) => void, onError?: (event: any) => void): void; + setCrossOrigin(crossOrigin: string): void; } export class BufferGeometryLoader { @@ -1697,24 +1947,23 @@ declare module THREE { } export var Cache: Cache; - export class CompressedTextureLoader { - constructor(); + export class CompressedTextureLoader{ + constructor(manager?: LoadingManager); - load(url: string, onLoad: (bufferGeometry: BufferGeometry) => void, onError?: (event: any) => void): void; + manager: LoadingManager; + load(url: string, onLoad: (texture: CompressedTexture) => void, onProgress?: (event: any) => void, onError?: (event: any) => void): void; + setCrossOrigin(crossOrigin: string): void; } - export class DataTextureLoader extends BinaryTextureLoader { - // alias for BinaryTextureLoader. + export class CubeTextureLoader { + constructor(manager?: LoadingManager); + + manager: LoadingManager; + load(url: string, onLoad: (texture: CubeTexture) => void, onProgress?: (event: any) => void, onError?: (event: any) => void): void; + setCrossOrigin(crossOrigin: string): void; + } - /* - * GeometryLoader class is experimental, and it is not yet included in the compiled source code. - * - export class GeometryLoader { - - } - */ - /** * A loader for loading an image. * Unlike other loaders, this one emits events instead of using predefined callbacks. So if you're interested in getting notified when things happen, you need to add listeners to the object. @@ -1739,19 +1988,14 @@ declare module THREE { * A loader for loading objects in JSON format. */ export class JSONLoader extends Loader { - constructor(); - + constructor(manager?: LoadingManager); + manager: LoadingManager; withCredentials: boolean; - /** - * @param url - * @param callback. This function will be called with the loaded model as an instance of geometry when the load is completed. - * @param texturePath If not specified, textures will be assumed to be in the same folder as the Javascript model file. - */ - load(url: string, callback: (geometry: Geometry, materials: Material[]) => void , texturePath?: string): void; - - loadAjaxJSON(context: JSONLoader, url: string, callback: (geometry: Geometry, materials: Material[]) => void , texturePath?: string, callbackProgress?: (progress: Progress) => void ): void; + load(url: string, onLoad?: (geometry: Geometry, materials: Material[]) => void, onProgress?: (event: any) => void, onError?: (event: any) => void): void; + setCrossOrigin(crossOrigin: string): void; + setTexturePath( value: string ): void; parse(json: any, texturePath?: string): { geometry: Geometry; materials?: Material[] }; } @@ -1783,16 +2027,19 @@ declare module THREE { itemStart(url: string): void; itemEnd(url: string): void; - + itemError(url: string): void; } export class MaterialLoader { constructor(manager?: LoadingManager); manager: LoadingManager; + textures: { [key:string]:Texture }; load(url: string, onLoad: (material: Material) => void): void; setCrossOrigin(crossOrigin: string): void; + setTextures(textures: { [key:string]:Texture }): void; + getTexture( name: string ):Texture; parse(json: any): Material; } @@ -1829,7 +2076,7 @@ declare module THREE { * * @param url */ - load(url: string, onLoad: (texture: Texture) => void): void; + load(url: string, onLoad: (texture: Texture) => void): Texture; setCrossOrigin(crossOrigin: string): void; } @@ -1841,9 +2088,10 @@ declare module THREE { responseType: string; crossOrigin: string; - load(url: string, onLoad?: (responseText: string) => void, onProgress?: (event: any) => void, onError?: (event: any) => void): void; + load(url: string, onLoad?: (responseText: string) => void, onProgress?: (event: any) => void, onError?: (event: any) => void): any; setResponseType(responseType: string): void; setCrossOrigin(crossOrigin: string): void; + setWithCredentials( withCredentials: string ): void; } // Materials ////////////////////////////////////////////////////////////////////////////////// @@ -1928,7 +2176,7 @@ declare module THREE { blendDstAlpha: number; blendEquationAlpha: number; - depthFunc: Function; + depthFunc: DepthModes; /** * Whether to have depth test enabled when rendering this material. Default is true. @@ -1943,6 +2191,8 @@ declare module THREE { colorWrite: boolean; + precision: any; + /** * Whether to use polygon offset. Default is false. This corresponds to the POLYGON_OFFSET_FILL WebGL feature. */ @@ -1980,8 +2230,9 @@ declare module THREE { needsUpdate: boolean; setValues(values: Object): void; - toJSON(): any; - clone(material?:Material): Material; + toJSON(meta?: any): any; + clone(): Material; + clone(source?:Material): Material; update(): void; dispose(): void; @@ -2012,6 +2263,7 @@ declare module THREE { fog: boolean; clone(): LineBasicMaterial; + copy(source: LineBasicMaterial): LineBasicMaterial; } export interface LineDashedMaterialParameters extends MaterialParameters { @@ -2036,6 +2288,7 @@ declare module THREE { fog: boolean; clone(): LineDashedMaterial; + copy(source: LineDashedMaterial): LineDashedMaterial; } /** @@ -2043,6 +2296,7 @@ declare module THREE { */ export interface MeshBasicMaterialParameters extends MaterialParameters{ color?: number; + opacity?: number; map?: Texture; aoMap?: Texture; aoMapIntensity?: number; @@ -2052,15 +2306,16 @@ declare module THREE { combine?: Combine; reflectivity?: number; refractionRatio?: number; - fog?: boolean; shading?: Shading; + blending?: Blending; + depthTest?: boolean; + depthWrite?: boolean; wireframe?: boolean; wireframeLinewidth?: number; - wireframeLinecap?: string; - wireframeLinejoin?: string; vertexColors?: Colors; skinning?: boolean; morphTargets?: boolean; + fog?: boolean; } export class MeshBasicMaterial extends Material { @@ -2087,6 +2342,7 @@ declare module THREE { morphTargets: boolean; clone(): MeshBasicMaterial; + copy(source: MeshBasicMaterial): MeshBasicMaterial; } export interface MeshDepthMaterialParameters extends MaterialParameters{ @@ -2101,21 +2357,13 @@ declare module THREE { wireframeLinewidth: number; clone(): MeshDepthMaterial; - } - - // MeshFaceMaterial does not inherit the Material class in the original code. However, it should treat as Material class. - // See tests/canvas/canvas_materials.ts. - export class MeshFaceMaterial extends Material { - constructor(materials?: Material[]); - materials: Material[]; - - toJSON(): any; - clone(): MeshFaceMaterial; + copy(source: MeshDepthMaterial): MeshDepthMaterial; } export interface MeshLambertMaterialParameters extends MaterialParameters{ color?: number; emissive?: number; + opacity?: number; map?: Texture; specularMap?: Texture; alphaMap?: Texture; @@ -2126,8 +2374,6 @@ declare module THREE { fog?: boolean; wireframe?: boolean; wireframeLinewidth?: number; - wireframeLinecap?: string; - wireframeLinejoin?: string; vertexColors?: Colors; skinning?: boolean; morphTargets?: boolean; @@ -2136,6 +2382,7 @@ declare module THREE { export class MeshLambertMaterial extends Material { constructor(parameters?: MeshLambertMaterialParameters); + color: Color; emissive: Color; map: Texture; @@ -2156,39 +2403,21 @@ declare module THREE { morphNormals: boolean; clone(): MeshLambertMaterial; + copy(source: MeshLambertMaterial): MeshLambertMaterial; } export interface MeshNormalMaterialParameters extends MaterialParameters{ - /** Line color in hexadecimal. Default is 0xffffff. */ - color?: number; - /** Sets the texture map. Default is null */ - map?: Texture; - /** Set light map. Default is null. */ - lightMap?: Texture; - /** Set specular map. Default is null. */ - specularMap?: Texture; - /** Set alpha map. Default is null. */ - alphaMap?: Texture; - /** Set env map. Default is null. */ - envMap?: Texture; - /** Define whether the material color is affected by global fog settings. Default is false. */ - fog?: boolean; - /** How the triangles of a curved surface are rendered. Default is THREE.SmoothShading. */ + opacity?: number; shading?: Shading; + blending?: Blending; + depthTest?: boolean; + depthWrite?: boolean; + /** Render geometry as wireframe. Default is false (i.e. render as smooth shaded). */ wireframe?: boolean; /** Controls wireframe thickness. Default is 1. */ wireframeLinewidth?: number; - /** Define appearance of line ends. Default is 'round'. */ - wireframeLinecap?: string; - /** Define appearance of line joints. Default is 'round'. */ - wireframeLinejoin?: string; - /** Define how the vertices gets colored. Default is THREE.NoColors. */ - vertexColors?: Colors; - /** Define whether the material uses skinning. Default is false. */ - skinning?: boolean; - /** Define whether the material uses morphTargets. Default is false. */ - morphTargets?: boolean; + } export class MeshNormalMaterial extends Material { @@ -2199,51 +2428,22 @@ declare module THREE { morphTargets: boolean; clone(): MeshNormalMaterial; + copy(source: MeshNormalMaterial): MeshNormalMaterial; } export interface MeshPhongMaterialParameters extends MaterialParameters { /** geometry color in hexadecimal. Default is 0xffffff. */ color?: number; - /** Sets the texture map. Default is null */ - map?: Texture; - /** Set light map. Default is null */ - lightMap?: Texture; - lightMapIntensity?: number; - - aoMap?: Texture; - aoMapIntensity?: number; - emissiveMap?: Texture; - - /** Set specular map. Default is null */ - specularMap?: Texture; - /** Set alpha map. Default is null */ - alphaMap?: Texture; - /** Set env map. Default is null */ - envMap?: Texture; - /** Define whether the material color is affected by global fog settings. Default is true */ - fog?: boolean; - /** Define shading type. Default is THREE.SmoothShading */ - shading?: Shading; - /** render geometry as wireframe. Default is false */ - wireframe?: string; - /** Line thickness. Default is 1. */ - wireframeLinewidth?: number; - /** Define appearance of line ends. Default is 'round' */ - wireframeLinecap?: string; - /** Define appearance of line joints. Default is 'round'. */ - wireframeLinejoin?: string; - /** Define how the vertices gets colored. Default is THREE.NoColors. */ - vertexColors?: Colors; - /** Define whether the material uses skinning. Default is false. */ - skinning?: boolean; - - /** Define whether the material uses morphTargets. Default is false. */ - morphTargets?: boolean; - emissive?: number; specular?: number; shininess?: number; - metal?: boolean; + opacity?: number; + map?: Texture; + lightMap?: Texture; + lightMapIntensity?: number; + aoMap?: Texture; + aoMapIntensity?: number; + emissiveMap?: Texture; bumpMap?: Texture; bumpScale?: number; normalMap?: Texture; @@ -2251,10 +2451,23 @@ declare module THREE { displacementMap?: Texture; displacementScale?: number; displacementBias?: number; + specularMap?: Texture; + alphaMap?: Texture; + envMap?: Texture; combine?: Combine; reflectivity?: number; refractionRatio?: number; + shading?: Shading; + blending?: Blending; + depthTest?: boolean; + depthWrite?: boolean; + wireframe?: string; + wireframeLinewidth?: number; + vertexColors?: Colors; + skinning?: boolean; + morphTargets?: boolean; morphNormals?: boolean; + fog?: boolean; } export class MeshPhongMaterial extends Material { @@ -2296,19 +2509,39 @@ declare module THREE { morphNormals: boolean; clone(): MeshPhongMaterial; + copy(source: MeshPhongMaterial): MeshPhongMaterial; } - export interface PointCloudMaterialParameters extends MaterialParameters{ + // MultiMaterial does not inherit the Material class in the original code. However, it should treat as Material class. + // See tests/canvas/canvas_materials.ts. + export class MultiMaterial extends Material { + constructor(materials?: Material[]); + materials: Material[]; + + toJSON(): any; + clone(): MultiMaterial; + } + + // deprecated + export class MeshFaceMaterial extends MultiMaterial { + + } + + export interface PointsMaterialParameters extends MaterialParameters{ color?: number; + opacity?: number; map?: Texture; size?: number; sizeAttenuation?: boolean; + blending?: Blending, + depthTest?: boolean; + depthWrite?: boolean; vertexColors?: Colors; fog?: boolean; } - export class PointCloudMaterial extends Material { - constructor(parameters?: PointCloudMaterialParameters); + export class PointsMaterial extends Material { + constructor(parameters?: PointsMaterialParameters); color: Color; map: Texture; @@ -2317,39 +2550,31 @@ declare module THREE { vertexColors: boolean; fog: boolean; - clone(): PointCloudMaterial; - } - - // deprecated - export class ParticleBasicMaterial extends PointCloudMaterial{ - - } - - // deprecated - export class ParticleSystemMaterial extends PointCloudMaterial{ - + clone(): PointsMaterial; + copy(source: PointsMaterial): PointsMaterial; } export class RawShaderMaterial extends ShaderMaterial { constructor(parameters?: ShaderMaterialParameters); - } export interface ShaderMaterialParameters extends MaterialParameters { defines?: any; uniforms?: any; - vertexShader?: string; fragmentShader?: string; + vertexShader?: string; shading?: Shading; - linewidth?: number; + blending?: Blending; + depthTest?: boolean; + depthWrite?: boolean; wireframe?: boolean; wireframeLinewidth?: number; - fog?: boolean; lights?: boolean; vertexColors?: Colors; skinning?: boolean; morphTargets?: boolean; morphNormals?: boolean; + fog?: boolean; } export class ShaderMaterial extends Material { @@ -2369,14 +2594,24 @@ declare module THREE { skinning: boolean; morphTargets: boolean; morphNormals: boolean; + derivatives: boolean; + defaultAttributeValues: any; + index0AttributeName: string; clone(): ShaderMaterial; + copy(source: ShaderMaterial): ShaderMaterial; + toJSON(meta: any): any; } export interface SpriteMaterialParameters extends MaterialParameters { color?: number; + opacity?: number; map?: Texture; - rotation?: number; + blending?: Blending; + depthTest?: boolean; + depthWrite?: boolean; + uvOffset?: Vector2; + uvScale?: Vector2; fog?: boolean; } @@ -2389,6 +2624,7 @@ declare module THREE { fog: boolean; clone(): SpriteMaterial; + copy(source: SpriteMaterial): SpriteMaterial; } // Math ////////////////////////////////////////////////////////////////////////////////// @@ -2402,6 +2638,7 @@ declare module THREE { set(min: Vector2, max: Vector2): Box2; setFromPoints(points: Vector2[]): Box2; setFromCenterAndSize(center: Vector2, size: Vector2): Box2; + clone(): Box2; copy(box: Box2): Box2; makeEmpty(): Box2; empty(): boolean; @@ -2420,7 +2657,6 @@ declare module THREE { union(box: Box2): Box2; translate(offset: Vector2): Box2; equals(box: Box2): boolean; - clone(): Box2; } export class Box3 { @@ -2433,6 +2669,7 @@ declare module THREE { setFromPoints(points: Vector3[]): Box3; setFromCenterAndSize(center: Vector3, size: Vector3): Box3; setFromObject(object: Object3D): Box3; + clone(): Box3; copy(box: Box3): Box3; makeEmpty(): Box3; empty(): boolean; @@ -2453,7 +2690,6 @@ declare module THREE { applyMatrix4(matrix: Matrix4): Box3; translate(offset: Vector3): Box3; equals(box: Box3): boolean; - clone(): Box3; } export interface HSL { @@ -2520,6 +2756,11 @@ declare module THREE { */ setStyle(style: string): Color; + /** + * Clones this color. + */ + clone(): Color; + /** * Copies given color. * @param color Color to copy. @@ -2575,13 +2816,8 @@ declare module THREE { multiplyScalar(s: number): Color; lerp(color: Color, alpha: number): Color; equals(color: Color): boolean; - fromArray(rgb: number[]): Color; + fromArray(rgb: number[], offset?: number): Color; toArray(array?: number[], offset?: number): number[]; - - /** - * Clones this color. - */ - clone(): Color; } export class ColorKeywords { @@ -2743,6 +2979,7 @@ declare module THREE { order: string; set(x: number, y: number, z: number, order?: string): Euler; + clone(): Euler; copy(euler: Euler): Euler; setFromRotationMatrix(m: Matrix4, order?: string, update?: boolean): Euler; setFromQuaternion(q:Quaternion, order?: string, update?: boolean): Euler; @@ -2753,8 +2990,6 @@ declare module THREE { toArray(array?: number[], offset?: number): number[]; toVector3(optionalResult?: Vector3): Vector3; onChange: () => void; - - clone(): Euler; } /** @@ -2769,14 +3004,13 @@ declare module THREE { planes: Plane[]; set(p0?: number, p1?: number, p2?: number, p3?: number, p4?: number, p5?: number): Frustum; + clone(): Frustum; copy(frustum: Frustum): Frustum; setFromMatrix(m: Matrix4): Frustum; intersectsObject(object: Object3D): boolean; intersectsSphere(sphere: Sphere): boolean; intersectsBox(box: Box3): boolean; containsPoint(point: Vector3): boolean; - clone(): Frustum; - } export class Line3 { @@ -2785,6 +3019,7 @@ declare module THREE { end: Vector3; set(start?: Vector3, end?: Vector3): Line3; + clone(): Line3; copy(line: Line3): Line3; center(optionalTarget?: Vector3): Vector3; delta(optionalTarget?: Vector3): Vector3; @@ -2795,7 +3030,6 @@ declare module THREE { closestPointToPoint(point: Vector3, clampToLine?: boolean, optionalTarget?: Vector3): Vector3; applyMatrix4(matrix: Matrix4): Line3; equals(line: Line3): boolean; - clone(): Line3; } interface Math { @@ -2804,12 +3038,12 @@ declare module THREE { /** * Clamps the x to be between a and b. * - * @param x Value to be clamped. - * @param a Minimum value - * @param b Maximum value. + * @param value Value to be clamped. + * @param min Minimum value + * @param max Maximum value. */ - clamp(x: number, a: number, b: number): number; - + clamp(value: number, min: number, max: number): number; + euclideanModulo( n: number, m: number ): number; /** * Linear mapping of x from range [a1, a2] to range [b1, b2]. @@ -2853,6 +3087,8 @@ declare module THREE { isPowerOfTwo(value: number): boolean; + nearestPowerOfTwo(value: number): number; + nextPowerOfTwo(value: number): number; } @@ -2925,8 +3161,10 @@ declare module THREE { set(n11: number, n12: number, n13: number, n21: number, n22: number, n23: number, n31: number, n32: number, n33: number): Matrix3; identity(): Matrix3; + clone(): Matrix3; copy(m: Matrix3): Matrix3; applyToVector3Array(array: number[], offset?: number, length?: number): number[]; + applyToBuffer( buffer: BufferAttribute, offset?: number, length?: number): BufferAttribute; multiplyScalar(s: number): Matrix3; determinant(): number; getInverse(matrix: Matrix3, throwOnInvertible?: boolean): Matrix3; @@ -2945,7 +3183,7 @@ declare module THREE { transposeIntoArray(r: number[]): number[]; fromArray(array: number[]): Matrix3; toArray(): number[]; - clone(): Matrix3; + } /** @@ -2986,13 +3224,9 @@ declare module THREE { * Resets this matrix to identity. */ identity(): Matrix4; - - /** - * Copies a matrix m into this matrix. - */ + clone(): Matrix4; copy(m: Matrix4): Matrix4; copyPosition(m: Matrix4): Matrix4; - extractBasis( xAxis: Vector3, yAxis: Vector3, zAxis: Vector3): Matrix4; makeBasis( xAxis: Vector3, yAxis: Vector3, zAxis: Vector3): Matrix4; @@ -3028,7 +3262,7 @@ declare module THREE { */ multiplyScalar(s: number): Matrix4; applyToVector3Array(array: number[], offset?: number, length?: number): number[]; - + applyToBuffer( buffer: BufferAttribute, offset?: number, length?: number): BufferAttribute; /** * Computes determinant of this matrix. * Based on http://www.euclideanspace.com/maths/algebra/matrix/functions/inverse/fourD/index.htm @@ -3127,12 +3361,9 @@ declare module THREE { * Creates an orthographic projection matrix. */ makeOrthographic(left: number, right: number, top: number, bottom: number, near: number, far: number): Matrix4; + equals( matrix: Matrix4 ): boolean; fromArray(array: number[]): Matrix4; toArray(): number[]; - /** - * Clones this matrix. - */ - clone(): Matrix4; } export class Plane { @@ -3145,6 +3376,7 @@ declare module THREE { setComponents(x: number, y: number, z: number, w: number): Plane; setFromNormalAndCoplanarPoint(normal: Vector3, point: Vector3): Plane; setFromCoplanarPoints(a: Vector3, b: Vector3, c: Vector3): Plane; + clone(): Plane; copy(plane: Plane): Plane; normalize(): Plane; negate(): Plane; @@ -3158,7 +3390,6 @@ declare module THREE { applyMatrix4(matrix: Matrix4, optionalNormalMatrix?: Matrix3): Plane; translate(offset: Vector3): Plane; equals(plane: Plane): boolean; - clone(): Plane; } /** @@ -3189,6 +3420,11 @@ declare module THREE { */ set(x: number, y: number, z: number, w: number): Quaternion; + /** + * Clones this quaternion. + */ + clone(): Quaternion; + /** * Copies values of q to this quaternion. */ @@ -3255,11 +3491,6 @@ declare module THREE { onChange: () => void; - /** - * Clones this quaternion. - */ - clone(): Quaternion; - /** * Adapted from http://www.euclideanspace.com/maths/algebra/realNormedAlgebra/quaternions/slerp/. */ @@ -3273,6 +3504,7 @@ declare module THREE { direction: Vector3; set(origin: Vector3, direction: Vector3): Ray; + clone(): Ray; copy(ray: Ray): Ray; at(t: number, optionalTarget?: Vector3): Vector3; recast(t: number): Ray; @@ -3290,7 +3522,6 @@ declare module THREE { intersectTriangle(a: Vector3, b: Vector3, c: Vector3, backfaceCulling: boolean, optionalTarget?: Vector3): Vector3; applyMatrix4(matrix4: Matrix4): Ray; equals(ray: Ray): boolean; - clone(): Ray; } export class Sphere { @@ -3301,6 +3532,7 @@ declare module THREE { set(center: Vector3, radius: number): Sphere; setFromPoints(points: Vector3[], optionalCenter?: Vector3): Sphere; + clone(): Sphere; copy(sphere: Sphere): Sphere; empty(): boolean; containsPoint(point: Vector3): boolean; @@ -3311,8 +3543,6 @@ declare module THREE { applyMatrix4(matrix: Matrix4): Sphere; translate(offset: Vector3): Sphere; equals(sphere: Sphere): boolean; - - clone(): Sphere; } export interface SplineControlPoint { @@ -3377,6 +3607,7 @@ declare module THREE { set(a: Vector3, b: Vector3, c: Vector3): Triangle; setFromPointsAndIndices(points: Vector3[], i0: number, i1: number, i2: number): Triangle; + clone(): Triangle; copy(triangle: Triangle): Triangle; area(): number; midpoint(optionalTarget?: Vector3): Vector3; @@ -3385,7 +3616,6 @@ declare module THREE { barycoordFromPoint(point: Vector3, optionalTarget?: Vector3): Vector3; containsPoint(point: Vector3): boolean; equals(triangle: Triangle): boolean; - clone(): Triangle; static normal(a: Vector3, b: Vector3, c: Vector3, optionalTarget?: Vector3): Vector3; static barycoordFromPoint(point: Vector3, a: Vector3, b: Vector3, c: Vector3, optionalTarget: Vector3): Vector3; @@ -3515,6 +3745,9 @@ declare module THREE { x: number; y: number; + width: number; + height: number; + /** * Sets value of this vector. */ @@ -3539,7 +3772,10 @@ declare module THREE { * Gets a component of this vector. */ getComponent(index: number): number; - + /** + * Clones this vector. + */ + clone(): Vector2; /** * Copies value of v to this vector. */ @@ -3555,8 +3791,7 @@ declare module THREE { */ addScalar(s: number): Vector2; addVectors(a: Vector2, b: Vector2): Vector2; - addScaledVector(v: Vector2, s: number): Vector2; - + addScaledVector( v: Vector2, s: number ): Vector2; /** * Subtracts v from this vector. */ @@ -3571,7 +3806,7 @@ declare module THREE { /** * Multiplies this vector by scalar s. */ - multiplyScalar(s: number): Vector2; + multiplyScalar(scalar: number): Vector2; divide(v: Vector2): Vector2; /** @@ -3610,10 +3845,6 @@ declare module THREE { * Computes length of this vector. */ length(): number; - - /** - * Computes Manhattan length of this vector. - */ lengthManhattan(): number; /** @@ -3634,7 +3865,7 @@ declare module THREE { /** * Normalizes this vector and multiplies it by l. */ - setLength(l: number): Vector2; + setLength(length: number): Vector2; lerp(v: Vector2, alpha: number): Vector2; @@ -3651,12 +3882,7 @@ declare module THREE { fromAttribute( attribute: BufferAttribute, index: number, offset?: number): Vector2; - rotateAround(center: Vector2, angle: number): Vector2; - - /** - * Clones this vector. - */ - clone(): Vector2; + rotateAround( center: Vector2, angle: number ): Vector2; } /** @@ -3702,7 +3928,10 @@ declare module THREE { setComponent(index: number, value: number): void; getComponent(index: number): number; - + /** + * Clones this vector. + */ + clone(): Vector3; /** * Copies value of v to this vector. */ @@ -3719,6 +3948,7 @@ declare module THREE { * Sets this vector to a + b. */ addVectors(a: Vector3, b: Vector3): Vector3; + addScaledVector( v: Vector3, s: number ): Vector3; /** * Subtracts v from this vector. @@ -3841,11 +4071,6 @@ declare module THREE { toArray(xyz?: number[], offset?: number): number[]; fromAttribute( attribute: BufferAttribute, index: number, offset?: number): Vector3; - - /** - * Clones this vector. - */ - clone(): Vector3; } /** @@ -3887,7 +4112,10 @@ declare module THREE { setComponent(index: number, value: number): void; getComponent(index: number): number; - + /** + * Clones this vector. + */ + clone(): Vector4; /** * Copies value of v to this vector. */ @@ -3903,8 +4131,7 @@ declare module THREE { * Sets this vector to a + b. */ addVectors(a: Vector4, b: Vector4): Vector4; - addScaledVector(v: Vector4, s: number): Vector4; - + addScaledVector( v: Vector4, s: number ): Vector4; /** * Subtracts v from this vector. */ @@ -3978,7 +4205,7 @@ declare module THREE { /** * Normalizes this vector and multiplies it by l. */ - setLength(l: number): Vector4; + setLength(length: number): Vector4; /** * Linearly interpolate between this vector and v with alpha factor. @@ -3997,11 +4224,6 @@ declare module THREE { toArray(xyzw?: number[], offset?: number): number[]; fromAttribute( attribute: BufferAttribute, index: number, offset?: number): Vector4; - - /** - * Clones this vector. - */ - clone(): Vector4; } // Objects ////////////////////////////////////////////////////////////////////////////////// @@ -4010,12 +4232,30 @@ declare module THREE { constructor(skin: SkinnedMesh); skin: SkinnedMesh; + + clone(): Bone; + copy(source: Bone): Bone; } export class Group extends Object3D { constructor(); } + export class LOD extends Object3D { + constructor(); + + levels: any[]; + + addLevel(object: Object3D, distance?: number): void; + getObjectForDistance(distance: number): Object3D; + raycast(raycaster: Raycaster, intersects: any): void; + update(camera: Camera): void; + + clone(): LOD; + copy(source: LOD): LOD; + toJSON(meta: any): any; + } + export interface LensFlareProperty { texture: Texture; // Texture size: number; // size in pixels (-1 = use texture.width) @@ -4040,58 +4280,42 @@ declare module THREE { add(texture: Texture, size?: number, distance?: number, blending?: Blending, color?: Color): void; add(obj: Object3D): void; - updateLensFlares(): void; + + clone(): LensFlare; + copy(source: LensFlare): LensFlare; } export class Line extends Object3D { - constructor(geometry?: Geometry, material?: LineDashedMaterial, mode?: number); - constructor(geometry?: Geometry, material?: LineBasicMaterial, mode?: number); - constructor(geometry?: Geometry, material?: ShaderMaterial, mode?: number); - constructor(geometry?: BufferGeometry, material?: LineDashedMaterial, mode?: number); - constructor(geometry?: BufferGeometry, material?: LineBasicMaterial, mode?: number); - constructor(geometry?: BufferGeometry, material?: ShaderMaterial, mode?: number); + constructor( + geometry?: Geometry | BufferGeometry, + material?: LineDashedMaterial | LineBasicMaterial | ShaderMaterial, + mode?: number + ); geometry: Geometry|BufferGeometry; material: Material; // LineDashedMaterial or LineBasicMaterial or ShaderMaterial raycast(raycaster: Raycaster, intersects: any): void; - clone(object?: Line): Line; + clone(): Line; + copy(source: Line): Line; } export class LineSegments extends Line { - constructor(geometry?: Geometry, material?: LineDashedMaterial); - constructor(geometry?: Geometry, material?: LineBasicMaterial); - constructor(geometry?: Geometry, material?: ShaderMaterial); - constructor(geometry?: BufferGeometry, material?: LineDashedMaterial); - constructor(geometry?: BufferGeometry, material?: LineBasicMaterial); - constructor(geometry?: BufferGeometry, material?: ShaderMaterial); + constructor( + geometry?: Geometry | BufferGeometry, + material?: LineDashedMaterial | LineBasicMaterial | ShaderMaterial, + mode?: number + ); - geometry: Geometry|BufferGeometry; - material: Material; // LineDashedMaterial or LineBasicMaterial or ShaderMaterial - - raycast(raycaster: Raycaster, intersects: any): void; - clone(object?: LineSegments): LineSegments; + clone(): LineSegments; + copy(source: LineSegments): LineSegments; } enum LineMode{} var LineStrip: LineMode; var LinePieces: LineMode; - export class LOD extends Object3D { - constructor(); - - levels: any[]; - /** Deprecated, use levels instead */ - objects: any[]; - - addLevel(object: Object3D, distance?: number): void; - getObjectForDistance(distance: number): Object3D; - raycast(raycaster: Raycaster, intersects: any): void; - update(camera: Camera): void; - clone(object?: LOD): LOD; - } - export class Mesh extends Object3D { constructor(geometry?: Geometry, material?: Material); constructor(geometry?: BufferGeometry, material?: Material); @@ -4102,39 +4326,8 @@ declare module THREE { updateMorphTargets(): void; getMorphTargetIndexByName(name: string): number; raycast(raycaster: Raycaster, intersects: any): void; - clone(object?: Mesh): Mesh; - } - - export class MorphAnimMesh extends Mesh { - constructor(geometry?: Geometry, material?: MeshBasicMaterial); - constructor(geometry?: Geometry, material?: MeshDepthMaterial); - constructor(geometry?: Geometry, material?: MeshFaceMaterial); - constructor(geometry?: Geometry, material?: MeshLambertMaterial); - constructor(geometry?: Geometry, material?: MeshNormalMaterial); - constructor(geometry?: Geometry, material?: MeshPhongMaterial); - constructor(geometry?: Geometry, material?: ShaderMaterial); - - duration: number; // milliseconds - mirroredLoop: boolean; - time: number; - lastKeyframe: number; - currentKeyframe: number; - direction: number; - directionBackwards: boolean; - - startKeyframe: number; - endKeyframe: number; - length: number; - - setFrameRange(start: number, end: number): void; - setDirectionForward(): void; - setDirectionBackward(): void; - parseAnimations(): void; - setAnimationLabel(label: string, start: number, end: number): void; - playAnimation(label: string, fps: number): void; - updateAnimation(delta: number): void; - interpolateTargets( a: number, b: number, t: number ): void; - clone(object?: MorphAnimMesh): MorphAnimMesh; + clone(): Mesh; + copy(source: Mesh): Mesh; } /** @@ -4142,16 +4335,16 @@ declare module THREE { * * @see src/objects/ParticleSystem.js */ - export class PointCloud extends Object3D { + export class Points extends Object3D { /** * @param geometry An instance of Geometry. * @param material An instance of Material (optional). */ - constructor(geometry: Geometry, material?: PointCloudMaterial); - constructor(geometry: Geometry, material?: ShaderMaterial); - constructor(geometry: BufferGeometry, material?: PointCloudMaterial); - constructor(geometry: BufferGeometry, material?: ShaderMaterial); + constructor( + geometry: Geometry | BufferGeometry, + material?: PointsMaterial | ShaderMaterial + ); /** * An instance of Geometry, where each vertex designates the position of a particle in the system. @@ -4164,7 +4357,8 @@ declare module THREE { material: Material; raycast(raycaster: Raycaster, intersects: any): void; - clone(object?: PointCloud): PointCloud; + clone(): Points; + copy(source: Points): Points; } export class Skeleton { @@ -4183,6 +4377,7 @@ declare module THREE { pose(): void; update(): void; clone(): Skeleton; + } export class SkinnedMesh extends Mesh { @@ -4202,7 +4397,8 @@ declare module THREE { pose(): void; normalizeSkinWeights(): void; updateMatrixWorld(force?: boolean): void; - clone(object?: SkinnedMesh): SkinnedMesh; + clone(): SkinnedMesh; + copy(source?: SkinnedMesh): SkinnedMesh; skeleton: Skeleton; } @@ -4214,7 +4410,8 @@ declare module THREE { material: SpriteMaterial; raycast(raycaster: Raycaster, intersects: any): void; - clone(object?: Sprite): Sprite; + clone(): Sprite; + copy(source?: Sprite): Sprite; } @@ -4391,8 +4588,6 @@ declare module THREE { }; }; - shadowMap: WebGLShadowMap; - /** * Return the WebGL context. */ @@ -4518,24 +4713,7 @@ declare module THREE { setRenderTarget(renderTarget: RenderTarget): void; readRenderTargetPixels( renderTarget: RenderTarget, x: number, y: number, width: number, height: number, buffer: any ): void; } - - export interface WebGLCapabilities { - getMaxPrecision(precision: string): string; - precision: string; - logarithmicDepthBuffer: boolean; - maxTextures: number; - maxVertexTextures: number; - maxTextureSize: number; - maxCubemapSize: number; - maxAttributes: number; - maxVertexUniforms: number; - maxVaryings: number; - maxFragmentUniforms: number; - vertexTextures: boolean; - floatFragmentTextures: boolean; - floatVertexTextures: boolean; - } - + export interface RenderTarget { } @@ -4554,6 +4732,7 @@ declare module THREE { export class WebGLRenderTarget implements RenderTarget { constructor(width: number, height: number, options?: WebGLRenderTargetOptions); + uuid: string; width: number; height: number; wrapS: Wrapping; @@ -4572,6 +4751,7 @@ declare module THREE { setSize(width: number, height: number): void; clone(): WebGLRenderTarget; + copy(source: WebGLRenderTarget): WebGLRenderTarget; dispose(): void; @@ -4593,27 +4773,33 @@ declare module THREE { [name: string]: string; common: string; + alphamap_fragment: string; alphamap_pars_fragment: string; alphatest_fragment: string; + aomap_fragment: string; + aomap_pars_fragment: string; + begin_vertex: string; + beginnormal_vertex: string; bumpmap_pars_fragment: string; color_fragment: string; color_pars_fragment: string; color_pars_vertex: string; color_vertex: string; - default_vertex: string; defaultnormal_vertex: string; + displacementmap_pars_vertex: string; + displacementmap_vertex: string; + emissivemap_fragment: string; + emissivemap_pars_fragment: string; envmap_fragment: string; envmap_pars_fragment: string; envmap_pars_vertex: string; envmap_vertex: string; fog_fragment: string; fog_pars_fragment: string; - + hemilight_fragment: string; lightmap_fragment: string; lightmap_pars_fragment: string; - lightmap_pars_vertex: string; - lightmap_vertex: string; lights_lambert_pars_vertex: string; lights_lambert_vertex: string; lights_phong_fragment: string; @@ -4627,14 +4813,14 @@ declare module THREE { logdepthbuf_vertex: string; map_fragment: string; map_pars_fragment: string; - map_pars_vertex: string; map_particle_fragment: string; map_particle_pars_fragment: string; - map_vertex: string; morphnormal_vertex: string; morphtarget_pars_vertex: string; morphtarget_vertex: string; + normal_phong_fragment: string; normalmap_pars_fragment: string; + project_vertex: string; shadowmap_fragment: string; shadowmap_pars_fragment: string; shadowmap_pars_vertex: string; @@ -4645,6 +4831,12 @@ declare module THREE { skinnormal_vertex: string; specularmap_fragment: string; specularmap_pars_fragment: string; + uv2_pars_fragment: string; + uv2_pars_vertex: string; + uv2_vertex: string; + uv_pars_fragment: string; + uv_pars_vertex: string; + uv_vertex: string; worldpos_vertex: string; } @@ -4673,11 +4865,15 @@ declare module THREE { export var UniformsLib: { common: any; - bump: any; + aomap: any; + lightmap: any; + emissivemap: any; + bumpmap: any; normalmap: any; + displacementmap: any; fog: any; lights: any; - particle: any; + points: any; shadowmap: any; }; @@ -4687,13 +4883,73 @@ declare module THREE { }; // Renderers / WebGL ///////////////////////////////////////////////////////////////////// - export class WebGLExtensions { - constructor(gl: WebGLRenderingContext); + export class WebGLBufferRenderer{ + constructor(_gl: any, extensions: any, _infoRender: any); // WebGLRenderingContext + + setMode( value: any ): void; + render( start: any, count: any ): void; + renderInstances( geometry: any ): void; + } + + export class WebGLCapabilities{ + constructor(gl: any, extensions: any, parameters: any); // WebGLRenderingContext + + getMaxPrecision: any; + precision: any; + maxTextures: any; + maxVertexTextures: any; + maxTextureSize: any; + maxCubemapSize: any; + maxAttributes: any; + maxVertexUniforms: any; + maxVaryings: any; + maxFragmentUniforms: any; + vertexTextures: any; + floatFragmentTextures: any; + floatVertexTextures: any; + } + + export class WebGLExtensions{ + constructor(gl: any); // WebGLRenderingContext get(name: string): any; } - export class WebGLProgram { + interface WebGLGeometriesInstance { + new (gl: any, properties: any, info: any): void; + get( object: any ): any; + } + interface WebGLGeometriesStatic{ + (_gl: any, extensions: any, _infoRender: any): WebGLGeometriesInstance; + } + export var WebGLGeometries: WebGLGeometriesStatic; + + + interface WebGLIndexedBufferRendererInstance { + new (gl: any, properties: any, info: any): void; + setMode( value: any ): void; + setIndex( index: any ): void; + render( start: any, count: any ): void; + renderInstances( geometry: any ): void; + } + interface WebGLIndexedBufferRendererStatic{ + (_gl: any, extensions: any, _infoRender: any): WebGLIndexedBufferRendererInstance; + } + export var WebGLIndexedBufferRenderer: WebGLIndexedBufferRendererStatic; + + + interface WebGLObjectsInstance { + new (gl: any, properties: any, info: any): void; + getAttributeBuffer( attribute: any ): any; + getWireframeAttribute(geometry: any): any; + update(object: any): void; + } + interface WebGLObjectsStatic{ + (gl: any, properties: any, info: any): WebGLObjectsInstance; + } + export var WebGLObjects: WebGLObjectsStatic; + + export class WebGLProgram{ constructor(renderer: WebGLRenderer, code: string, material: ShaderMaterial, parameters: WebGLRendererParameters); getUniforms(): any; @@ -4712,44 +4968,82 @@ declare module THREE { fragmentShader: WebGLShader; } - export class WebGLShader { - constructor(gl: WebGLRenderingContext, type: string, string: string); + interface WebGLProgramsInstance { + new (renderer: WebGLRenderer, capabilities: any): void; + + getParameters( material: any, lights: any, fog: any, object: any ): any[]; + getProgramCode( material: any, parameters: any ): any; + acquireProgram( material: any, parameters: any, code: any ): any; + releaseProgram( program: any ): void; + } + interface WebGLProgramsStatic{ + (): WebGLProgramsInstance; + } + export var WebGLPrograms: WebGLProgramsStatic; + + interface WebGLPropertiesInstance { + new (): void; + + get(object: any): any; + delete(object: any): void; + clear(): void; + } + interface WebGLPropertiesStatic{ + (): WebGLPropertiesInstance; + } + export var WebGLProperties: WebGLPropertiesStatic; + + export class WebGLShader{ + constructor(gl: any, type: string, string: string); } - interface WebGLStateInstance { - new(gl: WebGLRenderingContext, paramThreeToGL: Function): void; + interface WebGLShadowMapInstance{ + new ( _renderer: Renderer, _lights: any[], _objects: any[] ): void; + + enabled: boolean; + autoUpdate: boolean; + needsUpdate: boolean; + type: ShadowMapType; + cullFace: CullFace; + + render( scene: Scene ): void; + } + interface WebGLShadowMapStatic{ + ( _renderer: Renderer, _lights: any[], _objects: any[] ): WebGLStateInstance; + } + export var WebGLShadowMap: WebGLShadowMapStatic; + + interface WebGLStateInstance{ + new ( gl: any, extensions: any, paramThreeToGL: Function ): void; + init(): void; initAttributes(): void; enableAttribute(attribute: string): void; + enableAttributeAndDivisor( attribute: string, meshPerAttribute: any, extension: any ): void; disableUnusedAttributes(): void; - setBlending(blending: number, blendEquation: number, blendSrc: number, blendDst: number, blendEquationAlpha: number, blendSrcAlpha: number, blendDstAlpha: number): void; - setDepthTest(depthTest: number): void; - setDepthWrite(depthWrite: number): void; - setColorWrite(colorWrite: number): void; - setDoubleSided(doubleSided: number): void; - setFlipSided(flipSided: number): void; - setLineWidth(width: number): void; + enable( id: string ): void; + disable( id: string ): void; + getCompressedTextureFormats(): any; + setBlending( blending: number, blendEquation: number, blendSrc: number, blendDst: number, blendEquationAlpha: number, blendSrcAlpha: number, blendDstAlpha: number ): void; + setDepthFunc( func: Function): void; + setDepthTest( depthTest: number ): void; + setDepthWrite( depthWrite: number ): void; + setColorWrite( colorWrite: number ): void; + setFlipSided( flipSided: number ): void; + setLineWidth( width: number ): void; setPolygonOffset(polygonoffset: number, factor: number, units: number): void; + setScissorTest( scissorTest: boolean ): void; + activeTexture( webglSlot: any ): void; + bindTexture( webglType: any, webglTexture: any ): void; + compressedTexImage2D(): void; + texImage2D(): void; reset(): void; } - interface WebGLStateStatic { - (gl: WebGLRenderingContext, paramThreeToGL: Function): WebGLStateInstance; + interface WebGLStateStatic{ + ( gl: any, extensions: any, paramThreeToGL: Function ): WebGLStateInstance; } export var WebGLState: WebGLStateStatic; - interface WebGLTexturesInstance{ - new (webgglcontext: any): WebGLTexturesInstance; - - get(texture: Texture): any; // it will return result of gl.createTexture(). - create(texture: Texture): any; // it will return result of gl.createTexture(). - delete(texture: Texture): void; - } - interface WebGLTexturesStatic{ - (webgglcontext: any): WebGLTexturesInstance; - } - export var WebGLTextures: WebGLTexturesStatic; - - // Renderers / WebGL / Plugins ///////////////////////////////////////////////////////////////////// export interface RendererPlugin { init(renderer: WebGLRenderer): void; @@ -4763,18 +5057,6 @@ declare module THREE { render(scene: Scene, camera: Camera, viewportWidth: number, viewportHeight: number): void; } - export class WebGLShadowMap implements RendererPlugin { - constructor(); - - enabled: boolean; - type: ShadowMapType; - cullFace: CullFace; - - init(renderer: Renderer): void; - render(scene: Scene, camera: Camera): void; - update(scene: Scene, camera: Camera): void; - } - export class SpritePlugin implements RendererPlugin { constructor(); @@ -4853,13 +5135,13 @@ declare module THREE { overrideMaterial: Material; autoUpdate: boolean; - clone(): Scene; + copy(source: Scene): Scene; } // Textures ///////////////////////////////////////////////////////////////////// export class CanvasTexture extends Texture { constructor( - canvas?: HTMLCanvasElement, + canvas: HTMLImageElement | HTMLCanvasElement | HTMLVideoElement, mapping?: Mapping, wrapS?: Wrapping, wrapT?: Wrapping, @@ -4869,6 +5151,8 @@ declare module THREE { type?: TextureDataType, anisotropy?: number ); + + needsUpdate: boolean; } export class CompressedTexture extends Texture { @@ -4890,8 +5174,6 @@ declare module THREE { mipmaps: ImageData[]; flipY: boolean; generateMipmaps: boolean; - - clone(): CompressedTexture; } export class CubeTexture extends Texture { @@ -4909,7 +5191,7 @@ declare module THREE { images: any[]; - clone(texture?: CubeTexture): CubeTexture; + copy(source: CubeTexture): CubeTexture; } export class DataTexture extends Texture { @@ -4928,8 +5210,10 @@ declare module THREE { ); image: { data: ImageData; width: number; height: number; }; - - clone(): DataTexture; + magFilter: TextureFilter; + minFilter: TextureFilter; + flipY: boolean; + generateMipmaps: boolean; } export class Texture { @@ -4965,15 +5249,17 @@ declare module THREE { premultiplyAlpha: boolean; flipY: boolean; unpackAlignment: number; + version: number; needsUpdate: boolean; onUpdate: () => void; static DEFAULT_IMAGE: any; static DEFAULT_MAPPING: any; clone(): Texture; - update(): void; - toJSON(): any; + copy(source: Texture): Texture; + toJSON(meta: any): any; dispose(): void; + transformUv( uv: Vector ): void; // EventDispatcher mixins addEventListener(type: string, listener: (event: any) => void ): void; @@ -4999,50 +5285,27 @@ declare module THREE { } // Extras ///////////////////////////////////////////////////////////////////// - - export interface TypefaceData { - familyName: string; - cssFontWeight: string; - cssFontStyle: string; + export var CurveUtils: { + tangentQuadraticBezier(t: number, p0: number, p1: number, p2: number): number; + tangentCubicBezier(t: number, p0: number, p1: number, p2: number, p3: number): number; + tangentSpline(t: number, p0: number, p1: number, p2: number, p3: number): number; + interpolate(p0: number, p1: number, p2: number, p3: number, t: number): number; } - export var FontUtils: { - faces: { [weight: string]: { [style: string]: Face3; }; }; - face: string; - weight: string; - style: string; - size: number; - divisions: number; - - getFace(): Face3; - loadFace(data: TypefaceData): TypefaceData; - drawText(text: string): { paths: Path[]; offset: number; }; - extractGlyphPoints(c: string, face: Face3, scale: number, offset: number, path: Path): { offset: number; path: Path; }; - - generateShapes(text: string, parameters?: { size?: number; curveSegments?: number; font?: string; weight?: string; style?: string; }): Shape[]; - Triangulate: { - (contour: Vector2[], indices: boolean): Vector2[]; - area(contour: Vector2[]): number; - }; - }; - - export var GeometryUtils: { - // DEPRECATED - merge(geometry1: Geometry, object2: Mesh, materialIndexOffset?: number): void; - - // DEPRECATED - merge(geometry1: Geometry, object2: Geometry, materialIndexOffset?: number): void; - - // DEPRECATED - center(geometry: Geometry): Vector3; - }; - + // deprecated. export var ImageUtils: { crossOrigin: string; + // deprecated. loadTexture(url: string, mapping?: Mapping, onLoad?: (texture: Texture) => void, onError?: (message: string) => void): Texture; + + // deprecated. loadTextureCube(array: string[], mapping?: Mapping, onLoad?: (texture: Texture) => void , onError?: (message: string) => void ): Texture; + + // deprecated. getNormalMap(image: HTMLImageElement, depth?: number): HTMLCanvasElement; + + // deprecated. generateDataTexture(width: number, height: number, color: Color): DataTexture; }; @@ -5052,100 +5315,15 @@ declare module THREE { attach(child: Object3D, scene: Scene, parent: Object3D): void; }; - // Extras / Animation ///////////////////////////////////////////////////////////////////// - - export interface KeyFrame { - pos: number[]; - rot: number[]; - scl: number[]; - time: number; - } - - export interface KeyFrames { - keys: KeyFrame[]; - parent: number; - } - - export interface AnimationData { - JIT: number; - fps: number; - hierarchy: KeyFrames[]; - length: number; - name: string; - } - - export class Animation { - constructor(root: Mesh, data: AnimationData); - - root: Mesh; - data: AnimationData; - hierarchy: Bone[]; - currentTime: number; - timeScale: number; - isPlaying: boolean; - loop: boolean; - weight: number; - interpolationType: number; - - play(startTime?: number, weight?: number): void; - stop(): void; - reset(): void; - resetBlendWeights(): void; - update(delta: number): void; - getNextKeyWith(type: string, h: number, key: number): KeyFrame; - getPrevKeyWith(type: string, h: number, key: number): KeyFrame; - } - - export var AnimationHandler: { - LINEAR: number; - CATMULLROM: number; - CATMULLROM_FORWARD: number; - - animations: any[]; - - init(data: AnimationData): AnimationData; - parse(root: Mesh): Object3D[]; - play(animation: Animation): void; - stop(animation: Animation): void; - update(deltaTimeMS: number): void; + export var ShapeUtils: { + area( contour: number[] ): number; + triangulate( contour: number[], indices: boolean ): number[]; + triangulateShape( contour: number[], holes: any[] ): number[]; + isClockWise( pts: number[] ): boolean; + b2( t: number, p0: number, p1: number, p2: number ): number; + b3( t: number, p0: number, p1: number, p2: number, p3: number ): number; }; - export class KeyFrameAnimation { - constructor(data: any); - - root: Mesh; - data: AnimationData; - hierarchy: KeyFrames[]; - currentTime: number; - timeScale: number; - isPlaying: boolean; - isPaused: boolean; - loop: boolean; - - play(startTime?: number): void; - stop(): void; - update(delta: number): void; - getNextKeyWith(type: string, h: number, key: number): KeyFrame; - getPrevKeyWith(type: string, h: number, key: number): KeyFrame; - } - - export class MorphAnimation { - constructor(mesh: Mesh); - - mesh: Mesh; - frames: number; - currentTime: number; - duration: number; - loop: boolean; - lastFrame: number; - currentFrame: number; - isPlaying: boolean; - - play(): void; - pause(): void; - update(delta: number): void; - } - // Extras / Audio ///////////////////////////////////////////////////////////////////// export class Audio extends Object3D { @@ -5157,16 +5335,28 @@ declare module THREE { panner: PannerNode; autoplay: boolean; startTime: number; + playbackRate: number; isPlaying: boolean; load(file: string): Audio; play(): void; pause(): void; stop(): void; + connect(): void; + disconnect(): void; + setFilter(value: any): void; + getFilter(): any; + setPlaybackRate(value: number): void; + getPlaybackRate(): number; + setLoop(value: boolean): void; + getLoop(): boolean; setRefDistance(value: number): void; + getRefDistance(): number; setRolloffFactor(value: number): void; + getRolloffFactor(): number; setVolume(value: number): void; + getVolume(): number; updateMatrixWorld(force?: boolean): void; } @@ -5265,28 +5455,17 @@ declare module THREE { constructor(); curves: Curve[]; - bends: Path[]; autoClose: boolean; add(curve: Curve): void; checkConnection(): boolean; closePath(): void; + getPoint(t: number): T; getLength(): number; getCurveLengths(): number[]; - getBoundingBox(): BoundingBox; createPointsGeometry(divisions: number): Geometry; createSpacedPointsGeometry(divisions: number): Geometry; createGeometry(points: T[]): Geometry; - addWrapPath(bendpath: Path): void; - getTransformedPoints(segments: number, bends?: Path[]): T[]; - getTransformedSpacedPoints(segments: number, bends?: Path[]): T[]; - getWrapPoints(oldPts: T[], path: Path): T[]; - } - - export class Gyroscope extends Object3D { - constructor(); - - updateMatrixWorld(force?: boolean): void; } export enum PathActions { @@ -5338,28 +5517,21 @@ declare module THREE { extrude(options?: any): ExtrudeGeometry; makeGeometry(options?: any): ShapeGeometry; getPointsHoles(divisions: number): Vector2[][]; - getSpacedPointsHoles(divisions: number): Vector2[][]; extractAllPoints(divisions: number): { shape: Vector2[]; holes: Vector2[][]; }; extractPoints(divisions: number): Vector2[]; - extractAllSpacedPoints(divisions: Vector2): { - shape: Vector2[]; - holes: Vector2[][]; - }; } // Extras / Curves ///////////////////////////////////////////////////////////////////// export class ArcCurve extends EllipseCurve { - constructor(aX: number, aY: number, aRadius: number, aStartAngle: number, aEndAngle: number, aClockwise: boolean, aRotation: number); + constructor(aX: number, aY: number, aRadius: number, aStartAngle: number, aEndAngle: number, aClockwise: boolean ); } export class CatmullRomCurve3 extends Curve { - constructor(points?: Vector3[]); - - points: Vector3[]; + constructor(); } export class ClosedSplineCurve3 extends Curve { @@ -5457,9 +5629,11 @@ declare module THREE { heightSegments: number; depthSegments: number; }; + + clone(): BoxGeometry; } - export class CircleBufferGeometry extends BufferGeometry { + export class CircleBufferGeometry extends Geometry { constructor(radius?: number, segments?: number, thetaStart?: number, thetaLength?: number); parameters: { @@ -5468,6 +5642,8 @@ declare module THREE { thetaStart: number; thetaLength: number; }; + + clone(): CircleBufferGeometry; } export class CircleGeometry extends Geometry { @@ -5479,6 +5655,8 @@ declare module THREE { thetaStart: number; thetaLength: number; }; + + clone(): CircleGeometry; } // deprecated @@ -5506,6 +5684,8 @@ declare module THREE { thetaStart: number; thetaLength: number; }; + + clone(): CylinderGeometry; } export class DodecahedronGeometry extends Geometry { @@ -5515,10 +5695,14 @@ declare module THREE { radius: number; detail: number; }; + + clone(): DodecahedronGeometry; } export class EdgesGeometry extends BufferGeometry { - constructor(geometry: Geometry|BufferGeometry, thresholdAngle?: number); + constructor(geometry: BufferGeometry, thresholdAngle: number); + + clone(): EdgesGeometry; } export class ExtrudeGeometry extends Geometry { @@ -5536,6 +5720,8 @@ declare module THREE { export class IcosahedronGeometry extends PolyhedronGeometry { constructor(radius: number, detail: number); + + clone(): IcosahedronGeometry; } export class LatheGeometry extends Geometry { @@ -5551,6 +5737,8 @@ declare module THREE { export class OctahedronGeometry extends PolyhedronGeometry { constructor(radius: number, detail: number); + + clone(): OctahedronGeometry; } export class ParametricGeometry extends Geometry { @@ -5572,6 +5760,8 @@ declare module THREE { widthSegments: number; heightSegments: number; }; + + clone(): PlaneBufferGeometry; } export class PlaneGeometry extends Geometry { @@ -5583,6 +5773,8 @@ declare module THREE { widthSegments: number; heightSegments: number; }; + + clone(): PlaneGeometry; } export class PolyhedronGeometry extends Geometry { @@ -5594,6 +5786,8 @@ declare module THREE { radius: number; detail: number; }; + + clone(): PolyhedronGeometry; } export class RingGeometry extends Geometry { @@ -5607,6 +5801,8 @@ declare module THREE { thetaStart: number; thetaLength: number; }; + + clone(): RingGeometry; } export class ShapeGeometry extends Geometry { @@ -5618,21 +5814,21 @@ declare module THREE { addShape(shape: Shape, options?: any): void; } - interface SphereParameters { - radius: number; - widthSegments: number; - heightSegments: number; - phiStart: number; - phiLength: number; - thetaStart: number; - thetaLength: number; - } export class SphereBufferGeometry extends BufferGeometry { constructor(radius: number, widthSegments?: number, heightSegments?: number, phiStart?: number, phiLength?: number, thetaStart?: number, thetaLength?: number); - parameters: SphereParameters; + parameters: { + radius: number; + widthSegments: number; + heightSegments: number; + phiStart: number; + phiLength: number; + thetaStart: number; + thetaLength: number; + }; + clone(): SphereBufferGeometry; } /** @@ -5652,27 +5848,21 @@ declare module THREE { */ constructor(radius: number, widthSegments?: number, heightSegments?: number, phiStart?: number, phiLength?: number, thetaStart?: number, thetaLength?: number); - parameters: SphereParameters; + parameters: { + radius: number; + widthSegments: number; + heightSegments: number; + phiStart: number; + phiLength: number; + thetaStart: number; + thetaLength: number; + }; } export class TetrahedronGeometry extends PolyhedronGeometry { constructor(radius?: number, detail?: number); - } - export interface TextGeometryParameters { - size?: number; // size of the text - height?: number; // thickness to extrude text - curveSegments?: number; // number of points on the curves - font?: string; // font name - weight?: string; // font weight (normal, bold) - style?: string; // font style (normal, italics) - bevelEnabled?: boolean; // turn on bevel - bevelThickness?: number; // how deep into text bevel goes - bevelSize?: number; // how far from text outline is bevel - } - - export class TextGeometry extends ExtrudeGeometry { - constructor(text: string, TextGeometryParameters?: TextGeometryParameters); + clone(): TetrahedronGeometry; } export class TorusGeometry extends Geometry { @@ -5685,6 +5875,8 @@ declare module THREE { tubularSegments: number; arc: number; }; + + clone(): TorusGeometry; } export class TorusKnotGeometry extends Geometry { @@ -5699,6 +5891,8 @@ declare module THREE { q: number; heightScale: number; }; + + clone(): TorusKnotGeometry; } @@ -5719,10 +5913,13 @@ declare module THREE { static NoTaper(u?: number): number; static SinusoidalTaper(u: number): number; + static FrenetFrames(path: Path, segments: number, closed: boolean): void; + + clone(): TubeGeometry; } - export class WireframeGeometry extends BufferGeometry { - constructor(geometry: Geometry|BufferGeometry); + export class WireframeGeometry extends BufferGeometry{ + constructor(geometry: Geometry | BufferGeometry); } // Extras / Helpers ///////////////////////////////////////////////////////////////////// @@ -5738,7 +5935,7 @@ declare module THREE { setColor(hex: number): void; } - export class AxisHelper extends Line { + export class AxisHelper extends LineSegments { constructor(size?: number); } @@ -5751,13 +5948,13 @@ declare module THREE { update(): void; } - export class BoxHelper extends Line { + export class BoxHelper extends LineSegments { constructor(object?: Object3D); update(object?: Object3D): void; } - export class CameraHelper extends Line { + export class CameraHelper extends LineSegments { constructor(camera: Camera); camera: Camera; @@ -5777,22 +5974,21 @@ declare module THREE { update(): void; } - export class EdgesHelper extends Line { + export class EdgesHelper extends LineSegments { constructor(object: Object3D, hex?: number, thresholdAngle?: number); } - export class FaceNormalsHelper extends Line { + export class FaceNormalsHelper extends LineSegments { constructor(object: Object3D, size?: number, hex?: number, linewidth?: number); object: Object3D; size: number; - normalMatrix: Matrix3; update(object?: Object3D): void; } - export class GridHelper extends Line { + export class GridHelper extends LineSegments { constructor(size: number, step: number); color1: Color; @@ -5820,7 +6016,7 @@ declare module THREE { update(): void; } - export class SkeletonHelper extends Line { + export class SkeletonHelper extends LineSegments { constructor(bone: Object3D); bones: Bone[]; @@ -5840,17 +6036,7 @@ declare module THREE { update(): void; } - export class VertexNormalsHelper extends Line { - constructor(object: Object3D, size?: number, hex?: number, linewidth?: number); - - object: Object3D; - size: number; - normalMatrix: Matrix3; - - update(object?: Object3D): void; - } - - export class VertexTangentsHelper extends Line { + export class VertexNormalsHelper extends LineSegments { constructor(object: Object3D, size?: number, hex?: number, linewidth?: number); object: Object3D; @@ -5859,7 +6045,7 @@ declare module THREE { update(object?: Object3D): void; } - export class WireframeHelper extends Line { + export class WireframeHelper extends LineSegments { constructor(object: Object3D, hex?: number); } @@ -5870,13 +6056,12 @@ declare module THREE { constructor(material: Material); material: Material; - - render(renderCallback: Function): void; + render(renderCallback:Function): void; } export interface MorphBlendMeshAnimation { - startFrame: number; - endFrame: number; + start: number; + end: number; length: number; fps: number; duration: number; diff --git a/ui-grid/ui-grid-tests.ts b/ui-grid/ui-grid-tests.ts index fe88fec4f2..e89f180b92 100644 --- a/ui-grid/ui-grid-tests.ts +++ b/ui-grid/ui-grid-tests.ts @@ -130,3 +130,14 @@ anotherGridInstance.scrollTo(rowEntityToScrollTo, columnDefToScrollTo); var selectedRowEntities: Array = gridApi.selection.getSelectedRows(); var selectedGridRows: Array = gridApi.selection.getSelectedGridRows(); + +gridApi.expandable.on.rowExpandedStateChanged(null, (row) => { + if (row.isExpanded) { + console.log('expanded', row.entity); + } else { + gridApi.expandable.toggleRowExpansion(row.entity); + } +}); +gridApi.expandable.expandAllRows(); +gridApi.expandable.collapseAllRows(); +gridApi.expandable.toggleAllRows(); diff --git a/ui-grid/ui-grid.d.ts b/ui-grid/ui-grid.d.ts index cba3c69ac6..06d6314c03 100644 --- a/ui-grid/ui-grid.d.ts +++ b/ui-grid/ui-grid.d.ts @@ -1558,6 +1558,18 @@ declare module uiGrid { */ (row: IGridRowOf): void; } + + /** + * GridRow settings for expandable + */ + export interface IGridRow { + /** + * If set to true, the row is expanded and the expanded view is visible + * Defaults to false + * @default false + */ + isExpanded?: boolean; + } } export module exporter { @@ -3418,7 +3430,7 @@ declare module uiGrid { } export type IGridRow = IGridRowOf; export interface IGridRowOf extends cellNav.IGridRow, edit.IGridRow, exporter.IGridRow, - selection.IGridRow { + selection.IGridRow, expandable.IGridRow { /** A reference to an item in gridOptions.data[] */ entity: TEntity; /** A reference back to the grid */ @@ -3527,6 +3539,8 @@ declare module uiGrid { filter?: IFilterOptions; /** Filters for this column. Includes 'term' property bound to filter input elements */ filters?: Array; + /** Reference to grid containing the column */ + grid: IGridInstanceOf; name?: string; /** Sort on this column */ sort?: ISortInfo; diff --git a/underscore/underscore-tests.ts b/underscore/underscore-tests.ts index 13410c23b8..051e000d03 100644 --- a/underscore/underscore-tests.ts +++ b/underscore/underscore-tests.ts @@ -17,9 +17,135 @@ var list = [[0, 1], [2, 3], [4, 5]]; //var flat = _.reduceRight(list, (a, b) => a.concat(b), []); // https://typescript.codeplex.com/workitem/1960 var flat = _.reduceRight(list, (a, b) => a.concat(b), []); -var even = _.find([1, 2, 3, 4, 5, 6], (num) => num % 2 == 0); +module TestFind { + let array: {a: string}[] = [{a: 'a'}, {a: 'b'}]; + let list: _.List<{a: string}> = {0: {a: 'a'}, 1: {a: 'b'}, length: 2}; + let dict: _.Dictionary<{a: string}> = {a: {a: 'a'}, b: {a: 'b'}}; + let context = {}; -var firstCapitalLetter = _.find({ a: 'a', b: 'B', c: 'C', d: 'd' }, l => l === l.toUpperCase()); + { + let iterator = (value: {a: string}, index: number, list: _.List<{a: string}>) => value.a === 'b'; + let result: {a: string}; + + result = _.find<{a: string}>(array, iterator); + result = _.find<{a: string}>(array, iterator, context); + result = _.find<{a: string}, {a: string}>(array, {a: 'b'}); + result = _.find<{a: string}>(array, 'a'); + + result = _(array).find<{a: string}>(iterator); + result = _(array).find<{a: string}>(iterator, context); + result = _(array).find<{a: string}, {a: string}>({a: 'b'}); + result = _(array).find<{a: string}>('a'); + + result = _(array).chain().find<{a: string}>(iterator).value(); + result = _(array).chain().find<{a: string}>(iterator, context).value(); + result = _(array).chain().find<{a: string}, {a: string}>({a: 'b'}).value(); + result = _(array).chain().find<{a: string}>('a').value(); + + result = _.find<{a: string}>(list, iterator); + result = _.find<{a: string}>(list, iterator, context); + result = _.find<{a: string}, {a: string}>(list, {a: 'b'}); + result = _.find<{a: string}>(list, 'a'); + + result = _(list).find<{a: string}>(iterator); + result = _(list).find<{a: string}>(iterator, context); + result = _(list).find<{a: string}, {a: string}>({a: 'b'}); + result = _(list).find<{a: string}>('a'); + + result = _(list).chain().find<{a: string}>(iterator).value(); + result = _(list).chain().find<{a: string}>(iterator, context).value(); + result = _(list).chain().find<{a: string}, {a: string}>({a: 'b'}).value(); + result = _(list).chain().find<{a: string}>('a').value(); + + result = _.detect<{a: string}>(array, iterator); + result = _.detect<{a: string}>(array, iterator, context); + result = _.detect<{a: string}, {a: string}>(array, {a: 'b'}); + result = _.detect<{a: string}>(array, 'a'); + + result = _(array).detect<{a: string}>(iterator); + result = _(array).detect<{a: string}>(iterator, context); + result = _(array).detect<{a: string}, {a: string}>({a: 'b'}); + result = _(array).detect<{a: string}>('a'); + + result = _(array).chain().detect<{a: string}>(iterator).value(); + result = _(array).chain().detect<{a: string}>(iterator, context).value(); + result = _(array).chain().detect<{a: string}, {a: string}>({a: 'b'}).value(); + result = _(array).chain().detect<{a: string}>('a').value(); + + result = _.detect<{a: string}>(list, iterator); + result = _.detect<{a: string}>(list, iterator, context); + result = _.detect<{a: string}, {a: string}>(list, {a: 'b'}); + result = _.detect<{a: string}>(list, 'a'); + + result = _(list).detect<{a: string}>(iterator); + result = _(list).detect<{a: string}>(iterator, context); + result = _(list).detect<{a: string}, {a: string}>({a: 'b'}); + result = _(list).detect<{a: string}>('a'); + + result = _(list).chain().detect<{a: string}>(iterator).value(); + result = _(list).chain().detect<{a: string}>(iterator, context).value(); + result = _(list).chain().detect<{a: string}, {a: string}>({a: 'b'}).value(); + result = _(list).chain().detect<{a: string}>('a').value(); + } + + { + let iterator = (element: {a: string}, key: string, list: _.Dictionary<{a: string}>) => element.a === 'b'; + let result: {a: string}; + + result = _.find<{a: string}>(dict, iterator); + result = _.find<{a: string}>(dict, iterator, context); + result = _.find<{a: string}, {a: string}>(dict, {a: 'b'}); + result = _.find<{a: string}>(dict, 'a'); + + result = _(dict).find<{a: string}>(iterator); + result = _(dict).find<{a: string}>(iterator, context); + result = _(dict).find<{a: string}, {a: string}>({a: 'b'}); + result = _(dict).find<{a: string}>('a'); + + result = _(dict).chain().find<{a: string}>(iterator).value(); + result = _(dict).chain().find<{a: string}>(iterator, context).value(); + result = _(dict).chain().find<{a: string}, {a: string}>({a: 'b'}).value(); + result = _(dict).chain().find<{a: string}>('a').value(); + + result = _.detect<{a: string}>(dict, iterator); + result = _.detect<{a: string}>(dict, iterator, context); + result = _.detect<{a: string}, {a: string}>(dict, {a: 'b'}); + result = _.detect<{a: string}>(dict, 'a'); + + result = _(dict).detect<{a: string}>(iterator); + result = _(dict).detect<{a: string}>(iterator, context); + result = _(dict).detect<{a: string}, {a: string}>({a: 'b'}); + result = _(dict).detect<{a: string}>('a'); + + result = _(dict).chain().detect<{a: string}>(iterator).value(); + result = _(dict).chain().detect<{a: string}>(iterator, context).value(); + result = _(dict).chain().detect<{a: string}, {a: string}>({a: 'b'}).value(); + result = _(dict).chain().detect<{a: string}>('a').value(); + } + + { + let iterator = (value: string, index: number, list: _.List) => value === 'b'; + let result: string; + + result = _.find('abc', iterator); + result = _.find('abc', iterator, context); + + result = _('abc').find(iterator); + result = _('abc').find(iterator, context); + + result = _('abc').chain().find(iterator).value(); + result = _('abc').chain().find(iterator, context).value(); + + result = _.detect('abc', iterator); + result = _.detect('abc', iterator, context); + + result = _('abc').detect(iterator); + result = _('abc').detect(iterator, context); + + result = _('abc').chain().detect(iterator).value(); + result = _('abc').chain().detect(iterator, context).value(); + } +} var evens = _.filter([1, 2, 3, 4, 5, 6], (num) => num % 2 == 0); diff --git a/underscore/underscore.d.ts b/underscore/underscore.d.ts index 7dea66a84a..8cf98071b6 100644 --- a/underscore/underscore.d.ts +++ b/underscore/underscore.d.ts @@ -254,6 +254,20 @@ interface UnderscoreStatic { iterator: _.ObjectIterator, context?: any): T; + /** + * @see _.find + **/ + find( + object: _.List|_.Dictionary, + iterator: U): T; + + /** + * @see _.find + **/ + find( + object: _.List|_.Dictionary, + iterator: string): T; + /** * @see _.find **/ @@ -270,6 +284,20 @@ interface UnderscoreStatic { iterator: _.ObjectIterator, context?: any): T; + /** + * @see _.find + **/ + detect( + object: _.List|_.Dictionary, + iterator: U): T; + + /** + * @see _.find + **/ + detect( + object: _.List|_.Dictionary, + iterator: string): T; + /** * Looks through each value in the list, returning the index of the first one that passes a truth * test (iterator). The function returns as soon as it finds an acceptable element, @@ -1696,12 +1724,32 @@ interface Underscore { * Wrapped type `any[]`. * @see _.find **/ - find(iterator: _.ListIterator, context?: any): T; + find(iterator: _.ListIterator|_.ObjectIterator, context?: any): T; /** * @see _.find **/ - detect(iterator: _.ListIterator, context?: any): T; + find(interator: U): T; + + /** + * @see _.find + **/ + find(interator: string): T; + + /** + * @see _.find + **/ + detect(iterator: _.ListIterator|_.ObjectIterator, context?: any): T; + + /** + * @see _.find + **/ + detect(interator?: U): T; + + /** + * @see _.find + **/ + detect(interator?: string): T; /** * Wrapped type `any[]`. @@ -2554,12 +2602,32 @@ interface _Chain { * Wrapped type `any[]`. * @see _.find **/ - find(iterator: _.ListIterator, context?: any): _ChainSingle; + find(iterator: _.ListIterator|_.ObjectIterator, context?: any): _ChainSingle; /** * @see _.find **/ - detect(iterator: _.ListIterator, context?: any): _Chain; + find(interator: U): _ChainSingle; + + /** + * @see _.find + **/ + find(interator: string): _ChainSingle; + + /** + * @see _.find + **/ + detect(iterator: _.ListIterator|_.ObjectIterator, context?: any): _ChainSingle; + + /** + * @see _.find + **/ + detect(interator: U): _ChainSingle; + + /** + * @see _.find + **/ + detect(interator: string): _ChainSingle; /** * Wrapped type `any[]`. diff --git a/whatwg-fetch/whatwg-fetch-tests.ts b/whatwg-fetch/whatwg-fetch-tests.ts index b6bae3066e..75fead12df 100644 --- a/whatwg-fetch/whatwg-fetch-tests.ts +++ b/whatwg-fetch/whatwg-fetch-tests.ts @@ -39,6 +39,13 @@ function test_fetchUrlWithRequestObject() { handlePromise(window.fetch(request)); } +function test_globalFetchVar() { + fetch('http://test.com', {}) + .then(response => { + // for test only + }); +} + function handlePromise(promise: Promise) { promise.then((response) => { if (response.type === 'basic') { diff --git a/whatwg-fetch/whatwg-fetch.d.ts b/whatwg-fetch/whatwg-fetch.d.ts index c6d95e87a0..a1d82c55f8 100644 --- a/whatwg-fetch/whatwg-fetch.d.ts +++ b/whatwg-fetch/whatwg-fetch.d.ts @@ -83,3 +83,5 @@ declare type RequestInfo = Request|string; interface Window { fetch(url: string|Request, init?: RequestInit): Promise; } + +declare var fetch: typeof window.fetch; diff --git a/z-schema/z-schema-tests.ts b/z-schema/z-schema-tests.ts new file mode 100644 index 0000000000..90fdc4cd32 --- /dev/null +++ b/z-schema/z-schema-tests.ts @@ -0,0 +1,34 @@ +/// + +import ZSchema = require('z-schema'); + +var options: ZSchema.Options = { + noTypeless: true, + forceItems: true, +}; + +var validator: ZSchema.Validator = new ZSchema(options); +var json: any = { + foo: 'bar', +}; + +var schema: any = { + 'type': 'object', + properties: { + foo: { + 'type': 'string', + }, + }, +}; + +validator.validate(json, schema); +validator.validate(json, schema, function (err: any, valid: boolean) { + if (err) { + console.log(err); + } else { + console.log('valid = ' + valid); + } +}); + +var error: ZSchema.SchemaError = validator.getLastError(); +var errors: ZSchema.SchemaError[] = validator.getLastErrors(); diff --git a/z-schema/z-schema.d.ts b/z-schema/z-schema.d.ts new file mode 100644 index 0000000000..4e8d673c5d --- /dev/null +++ b/z-schema/z-schema.d.ts @@ -0,0 +1,62 @@ +// Type definitions for z-schema v3.16.0 +// Project: https://github.com/zaggino/z-schema +// Definitions by: Adam Meadows +// Definitions: https://github.com/DefinitelyTyped/DefinitelyTyped + +declare module ZSchema { + + export interface Options { + asyncTimeout?: number; + forceAdditional?: boolean; + assumeAdditional?: boolean; + forceItems?: boolean; + forceMinItems?: boolean; + forceMaxItems?: boolean; + forceMinLength?: boolean; + forceMaxLength?: boolean; + forceProperties?: boolean; + ignoreUnresolvableReferences?: boolean; + noExtraKeywords?: boolean; + noTypeless?: boolean; + noEmptyStrings?: boolean; + noEmptyArrays?: boolean; + strictUris?: boolean; + strictMode?: boolean; + reportPathAsArray?: boolean; + breakOnFirstError?: boolean; + pedanticCheck?: boolean; + ignoreUnknownFormats?: boolean; + } + + export interface SchemaError { + code: string; + description: string; + message: string; + params: string[]; + path: string; + } + + export class Validator { + constructor(options: Options); + + /** + * @param json - either a JSON string or a parsed JSON object + * @param schema - the JSON object representing the schema + * @returns true if json matches schema + */ + validate(json: any, schema: any): boolean; + + /** + * @param json - either a JSON string or a parsed JSON object + * @param schema - the JSON object representing the schema + */ + validate(json: any, schema: any, callback: (err: any, valid: boolean) => void): void; + + getLastError(): SchemaError; + getLastErrors(): SchemaError[]; + } +} + +declare module "z-schema" { + export = ZSchema.Validator; +}