diff --git a/.gitattributes b/.gitattributes index dfe0770424..ac1e451d56 100644 --- a/.gitattributes +++ b/.gitattributes @@ -1,2 +1,7 @@ # Auto detect text files and perform LF normalization * text=auto + +# Checkout NPM package files with forced LF lineendings +# to prevent git conflicts when running npm commands +package.json text eol=lf +package-lock.json text eol=lf diff --git a/.github/CODEOWNERS b/.github/CODEOWNERS index a769c20dfc..86b77f8c6b 100644 --- a/.github/CODEOWNERS +++ b/.github/CODEOWNERS @@ -1,3 +1,8 @@ +# This file is generated. +# Add yourself to the "Definitions by:" list instead. +# See https://github.com/DefinitelyTyped/DefinitelyTyped#edit-an-existing-package + +/types/a-big-triangle/ @MathiasPaumgarten /types/abbrev/ @BendingBender /types/abs/ @AyaMorisawa /types/absolute/ @AyaMorisawa @@ -6,17 +11,20 @@ /types/accepts/ @bomret @brikou /types/accounting/ @gerich-home @chrisleck /types/ace/ @Diullei +/types/ace-diff/ @innovation-team /types/acl/ @tkQubo /types/acorn/ @RReverser @e-cloud /types/actioncable/ @zhu1230 /types/actions-on-google/ @joelhegg /types/activex-access/ @zspitz /types/activex-adodb/ @zspitz +/types/activex-adox/ @zspitz /types/activex-dao/ @zspitz /types/activex-diskquota/ @zspitz /types/activex-excel/ @zspitz /types/activex-faxcomexlib/ @zspitz /types/activex-infopath/ @zspitz +/types/activex-interop/ @zspitz /types/activex-iwshruntimelibrary/ @zspitz /types/activex-libreoffice/ @zspitz /types/activex-msforms/ @zspitz @@ -32,28 +40,34 @@ /types/activex-vbide/ @zspitz /types/activex-wia/ @zspitz /types/activex-word/ @zspitz -/types/adal-angular/ @unindented +/types/adal-angular/ @unindented @aciccarello /types/add-zero/ @Roaders /types/adm-zip/ @jvilk @abner /types/adone/ @s0m3on3 @maxveres -/types/aframe/ @devpaul @bertoritger -/types/agenda/ @meirgottlieb +/types/aframe/ @devpaul @bertoritger @twastvedt +/types/agenda/ @meirgottlieb @princjef /types/aggregate-error/ @BendingBender /types/alertify/ @jjeffery /types/alexa-sdk/ @petebeegle @hoo29 @pascalwhoop @blforce @rk-7 @alexmalcoci /types/alexa-voice-service/ @dolanmiu /types/algebra.js/ @CaselIT -/types/algoliasearch/ @cbaptiste @haroenv @aherve +/types/algoliasearch/ @cbaptiste @haroenv @aherve @samouss +/types/allure-js-commons/ @zaqqaz /types/alt/ @Shearerbeard +/types/amazon-cognito-auth-js/ @scottescue /types/amazon-product-api/ @MattiLehtinen @alien35 /types/amcharts/ @ldrick +/types/amp/ @jewbre +/types/amp-message/ @jewbre +/types/amphtml-validator/ @kevincharm /types/amplify/ @joeriks /types/amplify-deferred/ @joeriks @laurentiustamate94 /types/amplitude-js/ @Asido /types/amqp/ @seikho @jonnysparkplugs /types/amqp-rpc/ @wokim -/types/amqplib/ @mnahkies @abreits @nfantone +/types/amqplib/ @mnahkies @abreits @nfantone @zelein /types/analytics-node/ @fongandrew @thomasthiebaud +/types/anchor-js/ @xt0rted /types/angular/ @diegovilar @thorn0 @calebstdenis @leonard-thieu /types/angular-agility/ @rolandzwaga /types/angular-animate/ @michelsalib @adidahiya @rasch @codyschaaf @@ -65,6 +79,7 @@ /types/angular-cookie/ @borislavjivkov /types/angular-cookies/ @diegovilar @aciccarello /types/angular-deferred-bootstrap/ @Ritzlgrmft +/types/angular-desktop-notification/ @Dona278 /types/angular-dialog-service/ @wcomartin /types/angular-dynamic-locale/ @stephenlautier /types/angular-environment/ @terrawheat @@ -110,8 +125,7 @@ /types/angular-toastr/ @nkovacic @trodi /types/angular-toasty/ @muenchdo /types/angular-tooltips/ @leonard-thieu -/types/angular-touchspin/ @nkovacic -/types/angular-translate/ @michelsalib +/types/angular-translate/ @michelsalib @GabrielGil /types/angular-ui-bootstrap/ @xt0rted @ry8806 /types/angular-ui-router/ @michelsalib @matiishyn @mikehaas763 /types/angular-ui-scroll/ @marknadig @@ -128,8 +142,9 @@ /types/animejs/ @A-Babin /types/annyang/ @hisham @theluk /types/ansi-colors/ @rogierschouten +/types/ansi-escapes/ @jacobbubu /types/ansi-regex/ @mvachhar -/types/ansi-styles/ @brynbellomy +/types/ansi-styles/ @brynbellomy @plylrnsdy /types/ansicolors/ @rogierschouten /types/any-db/ @rogierschouten /types/any-db-transaction/ @rogierschouten @@ -138,6 +153,7 @@ /types/apex.js/ @y13i /types/aphrodite/ @asvetliakov /types/api-error-handler/ @tkrotoff +/types/apicache/ @danielsogl /types/apigee-access/ @CasperSkydt /types/apollo-codegen/ @bradleyayers /types/app-root-dir/ @chenyang-biu @@ -148,9 +164,10 @@ /types/appletvjs/ @brainded /types/applicationinsights-js/ @kamilszostak /types/aqb/ @Athenkosi-Mase +/types/arangodb/ @pluma /types/arbiter/ @arash16 -/types/arcgis-js-api/v3/ @Esri -/types/arcgis-js-api/ @Esri +/types/arcgis-js-api/v3/ @Esri @bsvensson +/types/arcgis-js-api/ @Esri @bsvensson /types/arcgis-rest-api/ @JeffJacobson /types/arcgis-to-geojson-utils/ @JeffJacobson /types/archiver/ @dolanmiu @crevil @@ -164,6 +181,7 @@ /types/array-find-index/ @samverschueren /types/array-foreach/ @skysteve /types/array-uniq/ @DanielRosenwasser +/types/array-unique/ @CSLTech /types/arrify/ @wanganjun /types/artillery/ @kmccoan-allocadia /types/asana/ @tkqubo @@ -179,11 +197,16 @@ /types/async-cache/ @BendingBender /types/async-lock/ @elisee @afharo @rhymmor /types/async-polling/ @Goldsmith42 -/types/async-retry/ @albertywu +/types/async-retry/ @albertywu @MeLlamoPablo /types/async.nexttick/ @pyrho /types/asynciterator/ @rubensworks /types/atlaskit__button/ @dijimsta -/types/atmosphere.js/ @toedter @Mory1879 +/types/atlaskit__calendar/ @lstanden +/types/atlaskit__inline-edit/ @lstanden +/types/atlaskit__layer/ @lstanden +/types/atlaskit__single-select/ @lstanden +/types/atmosphere.js/ @toedter @Mory1879 @Scipion +/types/atob/ @johngeorgewright /types/atom/ @GlenCFL @smhxx @lierdakil /types/atom-keymap/ @GlenCFL /types/atom-mocha-test-runner/ @GlenCFL @@ -202,12 +225,13 @@ /types/autoprefixer/ @odnamrataizem /types/autosize/ @kingdango @keika299 @NeekSandhu /types/autosuggest-highlight/ @senukartur -/types/awesomplete/ @webbiesdk @bmdixon @tbekolay +/types/awesomplete/ @webbiesdk @bmdixon @tbekolay @chrislopresto /types/aws-iot-device-sdk/ @niik @mlamp -/types/aws-lambda/ @skarum @tobyhede @buggy @y13i @wwwy3y3 @OrthoDex @MichaelMarner @daniel-cottone @kostya-misura @coderbyheart @palmithor @daniloraisi @simonbuchan @Haydabase +/types/aws-lambda/ @skarum @tobyhede @buggy @y13i @wwwy3y3 @OrthoDex @MichaelMarner @daniel-cottone @kostya-misura @coderbyheart @palmithor @daniloraisi @simonbuchan @Haydabase @repl-chris @aneilbaboo /types/aws-serverless-express/ @threesquared @jcaffey @mattmeye @albertovasquez /types/aws4/ @ajcrites /types/axel/ @ruslan-molodyko +/types/axon/ @jewbre /types/azure/ @AndrewGaspar @antiveeranna @SomaticIT /types/azure-mobile-services-client/ @dmorosinotto /types/azure-sb/ @Azure @@ -221,6 +245,7 @@ /types/babel-traverse/ @yortus @marvinhagemeister /types/babel-types/ @yortus @baxtersa @marvinhagemeister @bcherny /types/babel-webpack-plugin/ @j-f1 +/types/babel__code-frame/ @mohsen1 @ForbesLindesay /types/babelify/ @TeamworkGuy2 @marvinhagemeister /types/babylon/ @yortus @marvinhagemeister /types/babylon-walk/ @czbuchi @@ -231,7 +256,7 @@ /types/backbone-relational/ @eirikhm /types/backbone.layoutmanager/ @hejiang2000 /types/backbone.localstorage/ @lgrignon -/types/backbone.marionette/ @zhamid @nvivo @sventschui +/types/backbone.marionette/ @zhamid @nvivo @sventschui @razorness /types/backbone.paginator/ @Nyamazing /types/backbone.radio/ @alphaleonis /types/backgrid/ @jlujan @@ -244,23 +269,28 @@ /types/base-64/ @dolanmiu /types/base-x/ @chrootsu /types/base16/ @alechill +/types/base64-arraybuffer/ @jbencook /types/base64-js/ @pe8ter +/types/base64-url/ @urish /types/base64topdf/ @lucasriondel /types/bases/ @harikv /types/bash-glob/ @mrmlnc /types/basic-auth/ @moonpyk @vesse /types/batch-stream/ @drudge /types/bazinga-translator/ @alexndlm -/types/bcrypt/ @codeanimal @IOAyman +/types/bcrypt/ @codeanimal @IOAyman @dstapleton92 /types/bcryptjs/ @RafaelKr /types/beats/ @urish /types/bech32/ @micksatana +/types/behavior3/ @carrrywu +/types/bell/ @SimonSchick /types/bem-cn/ @selkinvitaly /types/better-curry/ @pocesar /types/better-sqlite3/ @Morfent @matrumz /types/bezier-easing/ @ptlis /types/bezier-js/ @danmarshall /types/bgiframe/ @sumegizoltan +/types/bidirectional-map/ @helenanderson /types/big.js/ @nycdotnet @googol /types/bigi/ @mhegazy /types/bigint/ @Evgenus @@ -269,13 +299,12 @@ /types/binary-parser/ @riggs @dolanmiu /types/bind-ponyfill/ @skysteve /types/bindings/ @unindented -/types/bingmaps/ @rbrundritt /types/bintrees/ @CjS77 /types/bip21/ @stefanhuber /types/bip38/ @micksatana /types/bip39/ @micksatana /types/bit-array/ @mudkipme -/types/bitcoinjs-lib/ @mhegazy @dlebrecht @rbuckton @micksatana @youssefgh +/types/bitcoinjs-lib/ @mhegazy @dlebrecht @rbuckton @micksatana @youssefgh @kento1218 /types/bitcore-lib/ @lautarodragan /types/bittorrent-protocol/ @feross @tlaziuk /types/bitwise-xor/ @rogierschouten @@ -287,6 +316,8 @@ /types/blob-stream/ @erichillah /types/blob-to-buffer/ @nrlquaker /types/blob-util/ @WorldMaker +/types/blocked/ @l-jonas +/types/blockies/ @LogvinovLeon /types/blocks/ @ksmigiel /types/bloomfilter/ @slawiko /types/blue-tape/ @sodatea @@ -296,15 +327,18 @@ /types/bluebird-global/ @d-ph /types/bluebird-retry/ @pvomhoff /types/blueimp-md5/ @rmartone @mkohlmyr -/types/body-parser/ @santialbo @vilic @dreampulse @blendsdk @tlaziuk +/types/bn.js/ @LogvinovLeon +/types/body-parser/ @santialbo @vilic @dreampulse @blendsdk @tlaziuk @jwalton +/types/body-parser-xml/ @tbounsiar /types/bonjour/ @quentin-ol @octo-sniffle /types/bookshelf/ @arcticwaters @vesse /types/boom/v3/ @rogatty -/types/boom/v4/ @rogatty @AJamesPhillips @jineshshah36 -/types/boom/ @rogatty @AJamesPhillips @jineshshah36 @TimonVS +/types/boom/v4/ @rogatty @AJamesPhillips @jineshshah36 @danielmachado +/types/boom/ @rogatty @AJamesPhillips @jineshshah36 @TimonVS @danielmachado /types/bootbox/ @vbortone @konpikwastaken @kanup @icereed @trodi @stannynuytkens @renjfk /types/bootpag/ @rdeneau -/types/bootstrap/ @borisyankov +/types/bootstrap/v3/ @borisyankov +/types/bootstrap/ @denisname /types/bootstrap-3-typeahead/ @AndersonFriaca /types/bootstrap-datepicker/ @borisyankov /types/bootstrap-fileinput/ @CheCoxshall @@ -322,6 +356,7 @@ /types/bootstrap.timepicker/ @derikwhittaker @heatherbooker /types/bootstrap.v3.datetimepicker/v3/ @bayitajesi /types/bootstrap.v3.datetimepicker/ @katonap +/types/bootstrap3-dialog/ @nakupanda @cnboland /types/bounce.js/ @cherrry /types/box2d/ @jbaldwin /types/brace-expansion/ @BendingBender @@ -337,10 +372,11 @@ /types/browser-pack/ @TeamworkGuy2 /types/browser-report/ @JTOne123 /types/browser-resolve/ @marionebl -/types/browser-sync/ @joeskeen +/types/browser-sync/ @joeskeen @aznnomness /types/browserify/ @AndrewGaspar @jvilk @leonard-thieu /types/bs58/ @chrootsu /types/bson/ @horiuchi @CaselIT +/types/btoa/ @johngeorgewright /types/bucks/ @zaneli /types/buffer-compare/ @chrootsu /types/buffer-equal/ @Bartvds @@ -348,7 +384,7 @@ /types/bufferstream/ @Bartvds /types/builtin-modules/ @ajafff /types/bull/v2/ @bgrieder @JProgrammer -/types/bull/ @bgrieder @JProgrammer @marshall007 @weeco @blaugold +/types/bull/ @bgrieder @JProgrammer @marshall007 @weeco @blaugold @iamolegga /types/bump-regex/ @silkentrance /types/bunnymq/ @cyrilschumacher /types/bunyan/ @amikhalev @@ -363,8 +399,8 @@ /types/bwip-js/ @MugeSo /types/byline/ @reppners /types/bytebuffer/ @cappellin -/types/bytes/ @danny8002 -/types/c3/ @mcliment @gerinjacob @denyo @dmitryshindin +/types/bytes/ @danny8002 @believer +/types/c3/ @mcliment @gerinjacob @denyo @dmitryshindin @timn /types/cache-manager/ @GausSim /types/cal-heatmap/ @RetroChrisB /types/callsite/ @newclear @@ -385,14 +421,13 @@ /types/caseless/ @downace @mastermatt /types/cash/ @akvlko /types/casperjs/ @jedmao @urielch -/types/cassandra-driver/ @Svjard -/types/catalog/ @grossbart @wereHamster +/types/cassandra-driver/ @Svjard @pc-jedi /types/catbox/v7/ @jasonswearingen @AJamesPhillips /types/catbox/ @jasonswearingen @AJamesPhillips @saboya /types/cbor/ @pushplay /types/ccap/ @taoqf /types/chai/v2/ @Bartvds @AGBrown -/types/chai/ @jedmao @Bartvds @AGBrown @olivr70 @mwistrand @joshuakgoldberg @shaunluttin @Naktibalda @micksatana +/types/chai/ @jedmao @Bartvds @AGBrown @olivr70 @mwistrand @joshuakgoldberg @shaunluttin @Naktibalda @micksatana @ErikSchierboom /types/chai-arrays/ @clementprevot /types/chai-as-promised/ @jt000 @Kuniwak @leonard-thieu @lazerwalker @mattbishop /types/chai-datetime/ @cliffburger @@ -407,14 +442,16 @@ /types/chai-spies/ @kuzn-ilya /types/chai-string/ @nmalaguti /types/chai-subset/ @delta62 @AGBrown +/types/chai-uuid/ @harm-less /types/chai-webdriverio/ @sherlock1982 /types/chai-xml/ @jedigo -/types/chance/ @cbowdon @brikou +/types/chance/ @cbowdon @brikou @cafesanu /types/change-emitter/ @iskandersierra +/types/chardet/ @Gebatzens /types/charm/ @Xananax /types/charset/ @cspotcode -/types/chart.js/ @anuti @FabienLavocat @KentarouTakeda @larrybahr @mernen @josefpaij @danmana @guillaume-ro-fr @chicoxyzzy -/types/chartist/ @mtgibbs @psimonski @clottman +/types/chart.js/ @anuti @FabienLavocat @KentarouTakeda @larrybahr @mernen @josefpaij @danmana @guillaume-ro-fr @chicoxyzzy @archy-bold @braincore +/types/chartist/ @mtgibbs @psimonski @clottman @affilnost /types/chayns/ @HenningKuehl /types/check-sum/ @BendingBender /types/check-types/ @idchlife @@ -429,8 +466,11 @@ /types/chroma-js/v0/ @invliD /types/chroma-js/ @invliD @mpacholec /types/chrome/ @matthewkimber @otiai10 @couven92 @rreverser @sreimer15 +/types/chromedriver/ @pe8ter +/types/circuit-breaker-js/ @DeTeam /types/circular-json/ @jpevarnek -/types/ckeditor/ @wittwert +/types/ckeditor/v2/ @wittwert +/types/ckeditor/ @wittwert @stuartlong /types/clamp-js/ @Hikariii /types/clamp-js-main/ @sinziananicolae /types/classnames/ @adidahiya @JKillian @seansfkelley @mradamczyk @marvinhagemeister @@ -439,18 +479,27 @@ /types/clean-stack/ @BendingBender /types/clean-webpack-plugin/ @j-f1 /types/clear-require/ @dan-j +/types/clearbladejs-client/ @ClearBlade +/types/clearbladejs-node/ @ClearBlade +/types/clearbladejs-server/ @ClearBlade /types/cleave.js/ @clentfort @jasongi-at-sportsbet @sashashakun /types/cli/ @kayahr /types/cli-color/ @ChaosinaCan +/types/cli-progress/ @mhegazy /types/cli-spinner/ @janslow +/types/cli-table/ @arylo /types/cli-table2/ @mgroenhoff /types/client-sessions/ @netroy +/types/clientjs/ @icopp /types/cliff/ @brynbellomy /types/clipboard/ @impworks /types/clipboard-js/ @markwongsk /types/clipboardy/ @BendingBender +/types/clmtrackr/ @hellochar /types/clndr/ @jasperjn /types/clockpicker/ @jfcere +/types/cloneable-readable/ @qlonik +/types/cloner/ @matrumz /types/closure-compiler/ @mprobst /types/cloud-env/ @Morfent /types/cloudflare-apps/ @MartynasZilinskas @@ -475,24 +524,27 @@ /types/color-namer/ @in19farkt /types/color-string/ @BendingBender @danmarshall /types/colorbrewer/ @mtraynham -/types/colors/ @Bartvds @staeke /types/com.darktalker.cordova.screenshot/ @akarienta /types/combine-source-map/ @TeamworkGuy2 /types/combined-stream/ @felixge @tlaziuk /types/combokeys/ @iclanton /types/cometd/ @derekcicerone -/types/command-line-args/ @CzBuCHi +/types/command-line-args/v4/ @CzBuCHi @75lb +/types/command-line-args/ @75lb /types/command-line-commands/ @CzBuCHi +/types/command-line-usage/ @matrumz @Dvorsky /types/commangular/ @hiraash /types/comment-json/ @Jason3S +/types/common-errors/ @icopp /types/common-tags/ @zuzusik @tzupengwang /types/commonmark/ @nicojs @leonard-thieu /types/compare-version/ @jpevarnek +/types/compare-versions/ @LogvinovLeon /types/complex/ @AyaMorisawa /types/component-emitter/ @psnider /types/compose-function/ @denis-sokolov /types/compressible/ @BendingBender -/types/compression/ @santialbo +/types/compression/ @santialbo @rburgt /types/compression-webpack-plugin/ @dublicator /types/compute-stdev/ @mrmlnc /types/concat-stream/ @jmarianer @@ -502,8 +554,9 @@ /types/confidence/ @jppellerin /types/config/ @RWander @forrestbice @jndonald3 @albertovasquez /types/configstore/ @ArcticLight +/types/configurable/ @jewbre /types/confit/ @ethanresnick -/types/connect/ @SomaticIT +/types/connect/ @SomaticIT @EvanHahn /types/connect-busboy/ @pinguet62 /types/connect-ensure-login/ @0x6368656174 /types/connect-flash/ @AndreasGassmann @@ -526,7 +579,7 @@ /types/convert-hrtime/ @BendingBender /types/convert-layout/ @xeningem /types/convert-source-map/ @AndrewGaspar @mgroenhoff @TeamworkGuy2 -/types/convict/ @Nemo157 @vesse @elyscape +/types/convict/ @Nemo157 @vesse @elyscape @vanthiyathevan /types/cookie/ @pine613 /types/cookie-parser/ @santialbo @BendingBender /types/cookie-session/ @borislavjivkov @@ -559,6 +612,10 @@ /types/cordova_app_version_plugin/ @larrybahr /types/cordovarduino/ @hendrikmaus /types/core-js/ @rbuckton @mfdeveloper +/types/correlation-id/ @natemara +/types/cors/ @pluma +/types/cosmiconfig/v4/ @ozum +/types/cosmiconfig/ @ozum @szeck87 @saadq /types/cote/ @makepost /types/couchbase/ @maouida /types/countdown/ @gjuchault @@ -575,13 +632,14 @@ /types/crc/ @YuJianrong /types/create-error/ @tkrotoff /types/create-react-class/ @jgoz +/types/create-subscription/ @Asana @vsiao /types/createjs/ @evilangelist @gyohk /types/createjs-lib/ @evilangelist @gyohk /types/credential/ @phuvo /types/credit-card-type/ @LKay -/types/cron/ @horiuchi +/types/cron/ @horiuchi @winup /types/cropperjs/ @stepancar -/types/croppie/ @connor4312 @dklmuc @sarunint +/types/croppie/ @connor4312 @dklmuc @sarunint @knuthelgesen /types/cross-spawn/ @Alorel /types/crossfilter/ @schmuli @iebaker @nordfjord /types/crossroads/ @diullei @@ -598,6 +656,7 @@ /types/csurf/ @horiuchi /types/csv-parse/ @davidm77 @obi-jan-kenobi /types/csv-stringify/ @rogierschouten @arjenvanderende +/types/csv2json/ @dex4er /types/csvrow/ @codeanimal /types/csvtojson/ @EricByers @wcarson /types/cucumber/v1/ @abraaoalves @jan-molak @isoung @BendingBender @@ -609,29 +668,29 @@ /types/cwise-compiler/ @taoqf /types/cwise-parser/ @taoqf /types/cybozulabs-md5/ @pine613 -/types/cytoscape/ @phreed @wy193777 @ypconstante @janniclas +/types/cytoscape/ @phreed @wy193777 @ypconstante @janniclas @cerberuser /types/d3/v3/ @gustavderdrache @borisyankov @MatthiasJobst /types/d3/v4/ @tomwanzek @gustavderdrache @borisyankov /types/d3/ @tomwanzek @gustavderdrache @borisyankov /types/d3-array/ @gustavderdrache @borisyankov @tomwanzek -/types/d3-axis/ @tomwanzek @gustavderdrache @borisyankov +/types/d3-axis/ @tomwanzek @gustavderdrache @borisyankov @denisname /types/d3-box/ @lk-chen /types/d3-brush/ @tomwanzek @gustavderdrache @borisyankov /types/d3-chord/ @tomwanzek @gustavderdrache @borisyankov /types/d3-collection/ @tomwanzek @gustavderdrache @borisyankov -/types/d3-color/ @tomwanzek @gustavderdrache @borisyankov +/types/d3-color/ @tomwanzek @gustavderdrache @borisyankov @denisname @ledragon /types/d3-contour/ @tomwanzek @Ledragon -/types/d3-dispatch/ @tomwanzek @gustavderdrache @borisyankov +/types/d3-dispatch/ @tomwanzek @gustavderdrache @borisyankov @denisname /types/d3-drag/ @tomwanzek @gustavderdrache @borisyankov /types/d3-dsv/ @tomwanzek @gustavderdrache @borisyankov /types/d3-ease/ @tomwanzek @gustavderdrache @borisyankov /types/d3-fetch/ @ledragon /types/d3-force/ @tomwanzek @gustavderdrache @borisyankov -/types/d3-format/ @tomwanzek @gustavderdrache @borisyankov -/types/d3-geo/ @Ledragon @tomwanzek @gustavderdrache @borisyankov +/types/d3-format/ @tomwanzek @gustavderdrache @borisyankov @denisname +/types/d3-geo/ @ledragon @tomwanzek @gustavderdrache @borisyankov /types/d3-hexbin/ @uncovertruth @tomwanzek /types/d3-hierarchy/ @tomwanzek @gustavderdrache @borisyankov -/types/d3-hsv/ @arrayjam +/types/d3-hsv/ @arrayjam @denisname /types/d3-interpolate/ @tomwanzek @gustavderdrache @borisyankov /types/d3-path/ @tomwanzek @gustavderdrache @borisyankov /types/d3-polygon/ @tomwanzek @gustavderdrache @borisyankov @@ -665,8 +724,11 @@ /types/dat.gui/ @gyohk @sonic3d @rroylance /types/data-driven/ @mrhen /types/datadog-metrics/ @pushplay +/types/datadog-tracer/ @dineshsaravanan /types/datatables.net/ @Silver-Connection @omidkrad @pragmatrix @CNBoland +/types/datatables.net-autofill/ @andy-maca /types/datatables.net-buttons/ @Silver-Connection @SammyG4Free @jimhartford +/types/datatables.net-colreorder/ @andy-maca /types/datatables.net-fixedheader/ @szechyjs @Silver-Connection /types/datatables.net-rowgroup/ @maixiu /types/datatables.net-rowreorder/ @baywet @@ -680,6 +742,7 @@ /types/db-migrate-pg/ @nickiannone /types/db.js/ @cgwrench /types/dc/ @hansrwindhoff @mtraynham @MatthiasJobst +/types/dd-trace/ @ColinBradley /types/deasync/ @Sicilica /types/debessmann/ @vkorehov /types/debounce/ @denis-sokolov @@ -697,21 +760,25 @@ /types/deep-freeze/ @Bartvds @aluanhaddad /types/deep-freeze-es6/ @mattbishop /types/deep-freeze-strict/ @mhegazy -/types/deepmerge/ @marvinscharle @syy1125 +/types/deepmerge/ @marvinscharle @syy1125 @AppLover69 /types/defaults/ @IbtihelCHNAB /types/defer-promise/ @niklasf /types/define-lazy-prop/ @BendingBender /types/defined/ @BendingBender +/types/deglob/ @saadq /types/deku/ @pocka /types/del/v2/ @AyaMorisawa -/types/del/ @AyaMorisawa @BendingBender +/types/del/ @AyaMorisawa @BendingBender @bitjson /types/delaunator/ @DenisCarriere /types/delay/ @BendingBender +/types/deline/ @iarroyo5 /types/denodeify/ @joaomoreno /types/deoxxa-content-type/ @pine613 /types/depcheck/ @ark120202 /types/depd/ @danny8002 @BendingBender +/types/dependency-tree/ @joscha /types/deployjava/ @cyrilschumacher +/types/derhuerst__cli-on-key/ @jacobbubu /types/destroy/ @BendingBender /types/destroy-on-hwm/ @BendingBender /types/detect-browser/ @rogierschouten @@ -724,25 +791,31 @@ /types/detect-pointer/ @thomastilkema /types/detect-port/ @lith-light-g /types/detect-touch-events/ @thomastilkema +/types/detox/ @TareqElMasri /types/df-visible/ @Litee /types/dhtmlxgantt/ @mkozhukh @chriscamicas /types/dhtmlxscheduler/ @mkozhukh /types/di-lite/ @dcrusader /types/diacritics/ @otociulis -/types/diff/ @vvakame +/types/diff/ @vvakame @szdc /types/diff2html/ @rtfpessoa /types/dir-resolve/ @andy-ms /types/discontinuous-range/ @OiCMudkips +/types/discourse-sso/ @championswimmer +/types/dispatchr/ @Ragg- /types/disposable-email-domains/ @geoffreak +/types/dnssd/ @angelmerino /types/doccookies/ @jonegerton /types/dockerode/ @seikho @nlaplante @isac322 @lazarusx @meisenzahl @thegecko /types/docopt/ @giggio /types/doctrine/ @rictic +/types/document-promises/ @NotWoods /types/documentdb/ @NoelAbrahams @brettferdosi @ctstone @yifanwu /types/documentdb-server/ @lith-light-g /types/documentdb-session/ @DanielRosenwasser /types/dojo/ @vansimke /types/dom-inputevent/ @diagramatics +/types/dom-to-image/ @JipSterk /types/dom4/ @adidahiya @giladgray /types/domo/ @Steve-Fenton /types/dompurify/ @bazuzi @@ -758,14 +831,15 @@ /types/dotenv/v2/ @jussikinnula @borekb @enaeseth /types/dotenv/ @jussikinnula @borekb @enaeseth /types/dotenv-safe/ @krenor +/types/dotenv-webpack/ @karol-majewski /types/dotfile-regex/ @mrmlnc /types/dottie/ @domarmstrong /types/double-ended-queue/ @dsagal /types/doublearray/ @mzsm -/types/doubleclick-gpt/ @johngeorgewright +/types/doubleclick-gpt/ @johngeorgewright @steven-joyce /types/download/ @nicojs /types/downloadjs/ @cwmoo740 -/types/draft-js/ @dmitryrogozhny @eelco @ghotiphud @schwers @michael-yx-wu @willisplummer @smvilar +/types/draft-js/ @dmitryrogozhny @eelco @ghotiphud @schwers @michael-yx-wu @willisplummer @smvilar @sulf /types/drag-timetable/ @chinkan /types/draggabilly/ @jaydubu /types/dragster/ @zskovacs @@ -784,11 +858,11 @@ /types/dvtng-jss/ @Ptival /types/dw-bxslider-4/ @namerci /types/dwt/v12/ @yushulx -/types/dwt/ @yushulx @jbh +/types/dwt/ @yushulx @jbh @lincoln2018 @Tom-Dynamsoft /types/dygraphs/ @danvk /types/dymo-label-framework/ @thijskuipers /types/dynatable/ @francoismassart -/types/dynogels/ @SpartanLabs +/types/dynogels/ @SpartanLabs @ramondeklein @stephentuso /types/each/ @misak113 /types/earcut/ @NaridaL /types/easeljs/ @evilangelist @@ -799,7 +873,7 @@ /types/easy-xapi/ @DeadAlready /types/easy-xapi-utils/ @DeadAlready /types/ebongarde-root/ @Ebongarde -/types/echarts/ @xieisabug @AntiMoron +/types/echarts/ @xieisabug @AntiMoron @liveangela /types/ecurve/ @mhegazy /types/ed25519/ @erikma /types/ed2curve/ @ffflorian @@ -811,10 +885,10 @@ /types/ejs/ @benliddicott /types/ejs-locals/ @jt000 /types/ejson/ @shantanubhadoria -/types/elasticsearch/ @CasperSkydt @bfsmith @ddunkin @pushplay @mlamp @ahmadferdous @SimonSchick +/types/elasticsearch/ @CasperSkydt @bfsmith @ddunkin @pushplay @mlamp @ahmadferdous @SimonSchick @brabster @deerawan /types/electron-config/ @mrfunkycold @unindented /types/electron-debug/ @unindented -/types/electron-devtools-installer/ @gamesmaxed +/types/electron-devtools-installer/ @gamesmaxed @mfatihmar /types/electron-is-dev/ @trodi /types/electron-json-storage/ @stpettersens @nrlquaker @jbw91 /types/electron-notifications/ @djpereira @@ -833,7 +907,7 @@ /types/elm/ @thSoft /types/email-templates/ @cyrilschumacher @gurisko @blankstar85 /types/ember/v1/ @jedmao -/types/ember/ @jedmao @bttf @dwickern @chriskrycho @theroncross @mfeckie +/types/ember/ @jedmao @bttf @dwickern @chriskrycho @theroncross @mfeckie @alexlafroscia /types/ember-data/ @dwickern @mike-north @chriskrycho /types/ember-feature-flags/ @tansongyang /types/ember-mocha/ @dwickern @@ -852,6 +926,7 @@ /types/engine.io-client/ @KentarouTakeda /types/enhanced-resolve/ @e-cloud @onigoetz /types/enigma.js/ @konne +/types/enquire.js/ @screendriver /types/ent/ @rogierschouten /types/entities/ @aliceklipper /types/env-to-object/ @MugeSo @@ -860,6 +935,7 @@ /types/enzyme-adapter-react-15/ @tkrotoff /types/enzyme-adapter-react-15.4/ @nali /types/enzyme-adapter-react-16/ @tkrotoff +/types/enzyme-redux/ @knegusen /types/enzyme-to-json/ @joscha /types/eonasdan-bootstrap-datetimepicker/ @ToastHawaii /types/epiceditor/ @borisyankov @@ -873,9 +949,10 @@ /types/es6-weak-map/ @pine /types/escape-html/ @elisee /types/escape-latex/ @olsio +/types/escape-regexp/ @jewbre /types/escape-string-regexp/ @kruncher @faergeek /types/escodegen/ @simondel -/types/eslint/ @pmdartus @j-f1 +/types/eslint/ @pmdartus @j-f1 @saadq /types/eslint-plugin-prettier/ @ikatyang /types/eslint-scope/ @mysticatea /types/eslint-visitor-keys/ @mysticatea @@ -888,46 +965,60 @@ /types/estraverse/ @sanex3339 /types/estree/ @RReverser /types/etag/ @BendingBender +/types/ethereumjs-abi/ @LogvinovLeon +/types/ethereumjs-tx/ @LogvinovLeon +/types/ethereumjs-util/ @cortopy /types/ethjs-signer/ @doppio /types/eureka-js-client/ @Schnillz -/types/evaporate/ @kookster @chrisrhoden +/types/evaporate/ @kookster @chrisrhoden @ailrun /types/event-emitter/ @LKay +/types/event-emitter-es6/ @ahstro +/types/event-hooks-webpack-plugin/ @pine /types/event-kit/ @GlenCFL /types/event-loop-lag/ @rogierschouten /types/event-stream/ @flcdrg /types/event-to-promise/ @flying-sheep /types/events/ @yasupeke +/types/eventsource/ @scottleedavis /types/evernote/ @corps +/types/excel-style-dataformatter/ @SanderDeWaal1992 /types/exceljs/ @rogierschouten @alitaheri /types/execa/ @douglasduteil @BendingBender @borekb @mickdekkers +/types/exenv/ @christianchown /types/exit/ @Bartvds /types/exit-hook/ @BendingBender /types/exorcist/ @TeamworkGuy2 /types/expect/ @jmreidy @merrywhether +/types/expect-puppeteer/ @JoshuaKGoldberg /types/expect.js/ @teppeis /types/expectations/ @vvakame /types/expo/v23/ @KonstantinKai /types/expo/v24/ @KonstantinKai @martynaskadisa @janaagaard75 @ssanchezmarc @fhelwanger -/types/expo/ @KonstantinKai @martynaskadisa @janaagaard75 @ssanchezmarc @fhelwanger +/types/expo/v25/ @KonstantinKai @martynaskadisa @janaagaard75 @ssanchezmarc @fhelwanger @umidbekkarimov +/types/expo/ @KonstantinKai @martynaskadisa @janaagaard75 @ssanchezmarc @fhelwanger @umidbekkarimov /types/expo__vector-icons/ @incleaf /types/express/ @borisyankov /types/express-brute/ @cyrilschumacher /types/express-brute-memcached/ @cyrilschumacher /types/express-brute-mongo/ @cyrilschumacher /types/express-brute-redis/ @scottharwell +/types/express-bunyan-logger/ @shreyjain1994 /types/express-busboy/ @pinguet62 /types/express-cluster/ @nenadalm +/types/express-correlation-id/ @natemara /types/express-debug/ @federicobond /types/express-domain-middleware/ @hookclaw /types/express-ejs-layouts/ @erikma /types/express-enforces-ssl/ @kevinstubbs /types/express-fileupload/ @Naktibalda +/types/express-flash/ @iMobs /types/express-flash-2/ @mathsalmi /types/express-flash-notification/ @Mister4Eyes /types/express-formidable/ @tdolsen @evanshortiss -/types/express-graphql/ @isman-usoh @nitintutlani @hubel @zya +/types/express-graphql/ @isman-usoh @nitintutlani @hubel @zya @mlamp @firede /types/express-handlebars/ @stpettersens @yhaskell -/types/express-jwt/ @wokim @kacepe @Sl1MBoy +/types/express-jsonschema/ @atd-schubert +/types/express-jwt/ @wokim @kacepe @Sl1MBoy @milan-mimra /types/express-less/ @xieyubo /types/express-minify/ @borislavjivkov /types/express-mongo-sanitize/ @ericbyers @@ -936,24 +1027,32 @@ /types/express-mysql-session/ @Akim95 /types/express-oauth-server/ @atd-schubert /types/express-openapi/ @mugeso +/types/express-paginate/ @AmirTugi /types/express-partials/ @jt000 /types/express-promise-router/ @wanganjun /types/express-rate-limit/ @cyrilschumacher @makepost /types/express-route-fs/ @kripod +/types/express-routemap/ @icopp /types/express-sanitized/ @cjbarth /types/express-serve-static-core/ @borisyankov @19majkel94 @kacepe @micksatana @samijaber /types/express-session/ @horiuchi @jacobbogers @builtinnya @ry7n +/types/express-socket.io-session/ @AylaJK /types/express-to-koa/ @xiaohanzhang /types/express-unless/ @wokim /types/express-winston/ @bricka +/types/express-ws/ @ajliv +/types/express-xml-bodyparser/ @noticeMaker /types/extend/ @reppners /types/extjs/ @brian428 +/types/extract-files/ @Slessi /types/extract-stack/ @BendingBender /types/extract-text-webpack-plugin/ @flying-sheep @katyo /types/extract-zip/ @mizunashi-mana /types/eyes/ @brynbellomy +/types/ez-plus/ @AndersonFriaca /types/f1/ @neolwc -/types/fabric/ @oklemencic @joewashear007 @mrand01 @NotWoods +/types/fabric/ @oklemencic @joewashear007 @mrand01 @NotWoods @bmartinson @RogerioTeixeira +/types/facebook-instant-games/ @menushka @oyvindjam /types/facebook-js-sdk/ @amritk /types/facebook-pixel/ @noctishsu /types/faker/v3/ @Kuniwak @@ -973,8 +1072,11 @@ /types/fast-stats/ @rogierschouten /types/fastclick/ @shinnn /types/favico.js/ @drowse314-dev-ymat +/types/favicons/ @mohsen1 /types/fb/ @JoshStrobl +/types/fb-watchman/ @whtsky /types/fbemitter/ @kmxz +/types/feather-icons/ @jineshshah36 /types/featherlight/ @xStrom /types/feathersjs__authentication/ @AbraaoAlves @j2L4e /types/feathersjs__authentication-client/ @AbraaoAlves @j2L4e @@ -984,7 +1086,7 @@ /types/feathersjs__authentication-oauth2/ @j2L4e /types/feathersjs__configuration/ @j2L4e /types/feathersjs__errors/ @j2L4e -/types/feathersjs__express/ @j2L4e +/types/feathersjs__express/ @j2L4e @DadUndead /types/feathersjs__feathers/ @j2L4e @AbraaoAlves /types/feathersjs__primus/ @j2L4e /types/feathersjs__primus-client/ @j2L4e @@ -995,11 +1097,12 @@ /types/feedme/ @codeanimal /types/feedparser/ @cortopy /types/fetch-jsonp/ @tkrotoff -/types/fetch-mock/ @asvetliakov @tamird @merrywhether @chrissinclair +/types/fetch-mock/ @asvetliakov @tamird @merrywhether @chrissinclair @matttennison @quentinbouygues /types/fetch.io/ @newraina /types/ffi/ @loyd /types/ffmpeg-static/ @iamstevetran /types/ffprobe-static/ @iamstevetran +/types/fhir-js-client/ @rmchndrng /types/fibers/ @soywiz /types/figures/ @BendingBender /types/file-exists/ @BendingBender @@ -1009,11 +1112,13 @@ /types/filenamify/ @rokt33r /types/filesize/ @GiedriusGrabauskas @renchap /types/fill-pdf/ @westy92 +/types/filter-invalid-dom-props/ @icopp /types/finalhandler/ @chrootsu /types/finch/ @DavidSichau /types/find/ @andypyrope /types/find-root/ @Alorel /types/find-up/ @BendingBender +/types/find-versions/ @LogvinovLeon /types/findup-sync/ @Bartvds @ngbrown /types/fingerprintjs/ @zaneli /types/fingerprintjs2/ @curtstate @@ -1032,17 +1137,23 @@ /types/flight/ @jonathanhedren /types/flightplan/ @borislavjivkov /types/flipsnap/ @kubosho @gsino @mayuki +/types/float-regex/ @wanganjun /types/flot/ @burlandm @Anticom @admiralsmaster /types/flowjs/ @ryan10132 /types/fluent-ffmpeg/ @tcaesvk @DingWeizhe /types/flux/ @stkb @GiedriusGrabauskas +/types/fluxible/ @xbim +/types/fluxible-router/ @xbim /types/fluxxor/ @mrk21 /types/fm-websync/ @markusmauch +/types/fnv-lite/ @marcind +/types/focus-within/ @eramdam /types/fontfaceobserver/ @RandScullard /types/fontoxml/ @rolandzwaga /types/forever-agent/ @yavanosta -/types/forever-monitor/ @shuntksh +/types/forever-monitor/ @shuntksh @wrboyce /types/forge-di/ @adamcarr +/types/fork-ts-checker-webpack-plugin/ @JounQin /types/form-data/ @soywiz @leonyu @BendingBender /types/form-serializer/ @flqw /types/form-urlencoded/ @alepee @@ -1059,8 +1170,10 @@ /types/freedom/ @jpevarnek /types/freeport/ @atd-schubert /types/fresh/ @BendingBender +/types/freshy/ @qlonik /types/friendly-errors-webpack-plugin/ @bahlo -/types/frisby/ @johnny4753 +/types/frisby/v0/ @johnny4753 +/types/frisby/ @cwoodland @johnny4753 /types/from/ @Bartvds /types/from2/ @BendingBender /types/fromjs/ @glenndierckx @@ -1068,7 +1181,7 @@ /types/fs-cson/ @dex4er /types/fs-ext/ @OguzhanE /types/fs-extra/v4/ @alan-agius4 @midknight41 @shiftkey @mees- -/types/fs-extra/ @alan-agius4 @midknight41 @shiftkey @mees- +/types/fs-extra/ @alan-agius4 @midknight41 @shiftkey @mees- @jrockwood /types/fs-extra-promise/ @midknight41 @jasonswearingen @HiromiShikata /types/fs-extra-promise-es6/ @midknight41 @jasonswearingen @geoffreak @HiromiShikata /types/fs-finder/ @misak113 @@ -1233,11 +1346,12 @@ /types/gaussian/ @scttcper /types/geetest/ @plantain-00 /types/gen-readlines/ @CodeAnimal +/types/generate-changelog/ @ffflorian /types/generic-functions/ @stpettersens -/types/generic-pool/ @jerray +/types/generic-pool/ @jerray @wrboyce /types/gently/ @bonnici /types/geodesy/ @DenisCarriere @HandyG52 @excelulous -/types/geojson/ @cobster @atd-schubert @JeffJacobson +/types/geojson/ @cobster @atd-schubert @JeffJacobson @icholy /types/geojson2osm/ @DenisCarriere /types/geokdbush/ @DenisCarriere /types/geometry-dom/ @nakakura @@ -1257,7 +1371,10 @@ /types/git-config/ @stpettersens /types/git-remote-origin-url/ @janslow /types/github-username-regex/ @BehindTheMath +/types/gitlab/ @yanqing6628780 @Arylo /types/gl-matrix/ @mattijskneppers @tatchx @nbabanov @auzmartist @surtr-isaz +/types/gl-shader/ @MathiasPaumgarten +/types/gl-texture2d/ @MathiasPaumgarten /types/gldatepicker/ @qcz /types/glidejs/ @milanjaros /types/glob/ @vvakame @voy @@ -1270,6 +1387,7 @@ /types/globalize-compiler/ @iclanton /types/globby/ @douglasduteil @ikatyang /types/globule/ @durad +/types/glue/ @garfty /types/gm/ @ChaosinaCan @maartenvanvliet /types/go/ @NorthwoodsSoftware /types/google-adwords-scripts/ @jafaircl @@ -1280,7 +1398,7 @@ /types/google-cloud__storage/ @blove @nbperry /types/google-earth/ @icholy /types/google-images/ @dolanmiu -/types/google-libphonenumber/ @leonyu +/types/google-libphonenumber/ @leonyu @winfinit /types/google-map-react/ @honzabrecka /types/google-maps/ @DeividasBakanas @GiedriusGrabauskas /types/google-protobuf/ @marcuslongmuir @@ -1292,14 +1410,18 @@ /types/google.visualization/ @danludwig @gmoore-sjcorg @danmana @mlcheng @IvanBisultanov @glebm /types/googlemaps/ @cgwrench @nertzy @xaolas @mrmcnerd @martincostello @svenkreiss /types/googlemaps.infobubble/ @Dashue -/types/got/ @BendingBender @LinusU +/types/googlepay/ @Fluccioni +/types/got/ @BendingBender @LinusU @ikokostya /types/graceful-fs/v2/ @Bartvds /types/graceful-fs/ @Bartvds @BendingBender /types/graham_scan/ @hberntsen /types/graphite-udp/ @EricByers -/types/graphql/ @TonyPythoneer @calebmer @intellix @firede @kepennar @freiksenet @IvanGoncharov @DxCx @rportugal @tgriesser @dyst5422 @adnsio +/types/graphql/ @TonyPythoneer @calebmer @intellix @firede @kepennar @freiksenet @IvanGoncharov @DxCx @rportugal @tgriesser @dyst5422 @adnsio @divyenduz @bradzacher /types/graphql-date/ @enaeseth +/types/graphql-deduplicator/ @lfades +/types/graphql-depth-limit/ @eritikass /types/graphql-iso-date/ @jwaldrip +/types/graphql-list-fields/ @filipows /types/graphql-relay/ @arvitaly @nitintutlani @Grelinfo /types/graphql-resolve-batch/ @nayni /types/graphql-type-json/ @schfkt @@ -1311,11 +1433,12 @@ /types/grecaptcha/v0/ @brentj73 /types/grecaptcha/ @DethAriel /types/gregorian-calendar/ @cwalv -/types/grid-styled/ @antonvasin +/types/grid-styled/ @antonvasin @vittorio @lhache /types/gridfs-stream/ @liorm /types/gridstack/ @PascalSenn @ZoolWay @Sl1MBoy /types/grunt/ @jeffmay @basarat /types/gsap/ @codebelt @ProbablePrime @philipbulley +/types/gtin/ @RafaelKr /types/guid/ @maroy1986 /types/gulp/ @GiedriusGrabauskas /types/gulp-angular-templatecache/ @amanmahajan7 @@ -1324,6 +1447,7 @@ /types/gulp-bump/ @silkentrance /types/gulp-cache/ @aravindarun /types/gulp-cached/ @tomc974 +/types/gulp-change/ @Aankhen /types/gulp-changed/ @tomc974 /types/gulp-cheerio/ @tkQubo /types/gulp-clean-dest/ @andypyrope @@ -1346,6 +1470,8 @@ /types/gulp-html-replace/ @peterjuras /types/gulp-htmlmin/ @tkrotoff /types/gulp-if/ @joeskeen +/types/gulp-image/ @Aankhen +/types/gulp-image-resize/ @Aankhen /types/gulp-inject/ @k-kagurazaka /types/gulp-insert/ @shantmarouti /types/gulp-install/ @peterjuras @@ -1367,6 +1493,7 @@ /types/gulp-protractor/ @tkrotoff /types/gulp-pug/ @remisery /types/gulp-remember/ @tomc974 +/types/gulp-responsive-images/ @aankhen /types/gulp-rev/ @tkrotoff /types/gulp-rev-replace/ @tkrotoff /types/gulp-ruby-sass/ @agnislav @@ -1375,6 +1502,7 @@ /types/gulp-sort/ @joeskeen /types/gulp-strip-debug/ @peterjuras /types/gulp-svg-sprite/ @tkqubo +/types/gulp-svgmin/ @Aankhen /types/gulp-task-listing/ @joeskeen /types/gulp-tsd/ @k-kagurazaka /types/gulp-uglify/ @ChristopherHaws @leonard-thieu @@ -1389,14 +1517,15 @@ /types/halfred/ @dherges /types/halogen/ @steller /types/hammerjs/ @milkisevil @codler -/types/handlebars/ @borisyankov +/types/handlebars/ @borisyankov @evil-shrike /types/hapi/v8/ @jasonswearingen /types/hapi/v12/ @jasonswearingen /types/hapi/v15/ @jasonswearingen /types/hapi/v16/ @jasonswearingen @AJamesPhillips -/types/hapi/ @BorntraegerMarc @rafaelsouzaf @jhsimms +/types/hapi/ @BorntraegerMarc @rafaelsouzaf @jhsimms @SimonSchick /types/hapi-auth-basic/ @AJamesPhillips @saboya -/types/hapi-auth-jwt2/ @warrenseymour +/types/hapi-auth-jwt2/v7/ @warrenseymour +/types/hapi-auth-jwt2/ @warrenseymour @SimonSchick /types/hapi-decorators/ @kenhowardpdx /types/har-format/ @micmro /types/hard-rejection/ @BendingBender @@ -1410,7 +1539,8 @@ /types/hashmap/ @outring /types/haversine/ @screendriver /types/hbs/ @davidm77 -/types/he/ @sedwards2009 +/types/hdkey/ @LogvinovLeon +/types/he/ @sedwards2009 @lokidokicoki /types/headroom/ @hakubo /types/heap/ @ryan10132 /types/heapdump/ @weekens @@ -1420,7 +1550,7 @@ /types/hellosign-embedded/ @xt0rted /types/helmet/ @cyrilschumacher @EvanHahn @bluehatbrit /types/heredatalens/ @denyo -/types/heremaps/ @Josh-ES @denyo +/types/heremaps/ @Josh-ES @denyo @fx88 /types/heroku-logger/ @kylevogt /types/hex-rgba/ @r3nya /types/hexo-bunyan/ @segayuu @@ -1435,6 +1565,7 @@ /types/history/v3/ @sergey-buturlakin @ngbrown @LKay /types/history/ @sergey-buturlakin @ngbrown @rokoroku /types/history.js/ @borisyankov @gjunge +/types/historykana/ @h-shiratsuki /types/hjson/ @crunchie84 /types/hls.js/ @jgainfort /types/hoek/ @prashaantt @@ -1447,10 +1578,12 @@ /types/html-minifier/v1/ @tkrotoff /types/html-minifier/ @tkrotoff @rikuayanokozy /types/html-pdf/ @westy92 +/types/html-tag-names/ @sandersn /types/html-to-text/ @erykwarren +/types/html-void-elements/ @rhysd /types/html-webpack-plugin/ @deevus @bumbleblym @tlaziuk /types/html-webpack-template/ @bumbleblym -/types/html2canvas/ @rwhepburn @tan9 +/types/html2canvas/ @rwhepburn @tan9 @sschocke /types/htmlbars-inline-precompile/ @chriskrycho /types/htmlparser2/ @staticfunction @LinusU /types/htmltojsx/ @basarat @@ -1459,14 +1592,14 @@ /types/http-codes/ @mhegazy /types/http-context/ @mtraynham /types/http-errors/ @tkrotoff @BendingBender -/types/http-proxy/ @SomaticIT @Raigen +/types/http-proxy/ @SomaticIT @Raigen @DanielMSchmidt /types/http-proxy-agent/ @mrmlnc /types/http-proxy-middleware/ @zebMcCorkle @BendingBender /types/http-server/ @plantain-00 /types/http-status/ @misak113 /types/http-string-parser/ @pine613 /types/httperr/ @yortus -/types/hubot/ @dirk +/types/hubot/ @dirk @KeesCBakker /types/hubspot-pace/ @borislavjivkov /types/humane/ @jmvrbanac /types/humanize-plus/ @DenisCarriere @@ -1494,7 +1627,11 @@ /types/icepick/ @ngbrown @tobico /types/icheck/ @qcz /types/iconv/ @delphinus35 -/types/ids/ @3fd +/types/idyll/ @iocat +/types/idyll-ast/ @iocat +/types/idyll-compiler/ @iocat +/types/idyll-document/ @iocat +/types/iferr/ @segayuu /types/iframe-resizer/ @arminbaljic /types/ignite-ui/ @IgniteUI /types/ignore-styles/ @tai2 @@ -1509,6 +1646,7 @@ /types/imap-simple/ @pushplay /types/imgur-rest-api/ @lukewestby /types/impress/ @borisyankov +/types/in-app-purchase/ @l-jonas /types/in-range/ @DanielRosenwasser /types/incremental-dom/ @basarat @lanthaler @vvakame /types/indent-string/ @mhegazy @@ -1521,12 +1659,13 @@ /types/iniparser/ @chrootsu /types/inline-css/ @philipisapain /types/inline-style-prefixer/ @ahz @dpetrezselyova -/types/inquirer/ @tkQubo @ppathan @jouderianjr +/types/inquirer/ @tkQubo @ppathan @jouderianjr @bang88 @bitjson @synarque @jrockwood /types/insert-module-globals/ @leonard-thieu /types/insight/ @vvakame /types/integer/ @Morfent /types/interact.js/ @dduugg @adidahiya @thasner -/types/intercom-web/ @fongandrew @salbahra +/types/intercom-client/ @jineshshah36 +/types/intercom-web/ @fongandrew @salbahra @onatm /types/intercomjs/ @spencerwi /types/internal-ip/ @BendingBender /types/intl/ @RagibHasin @@ -1551,11 +1690,15 @@ /types/is-archive/ @mhegazy /types/is-array/ @pine /types/is-binary-path/ @DanielRosenwasser +/types/is-ci/ @atd-schubert +/types/is-color/ @VitorLuizC /types/is-compressed/ @mhegazy +/types/is-empty/ @termosa /types/is-finite/ @mhegazy /types/is-glob/ @mrmlnc /types/is-hotkey/ @petester42 /types/is-ip/ @coderslagoon +/types/is-mobile/ @LogvinovLeon /types/is-my-json-valid/ @kruncher /types/is-negated-glob/ @ajafff /types/is-number/ @harryshipton @@ -1574,12 +1717,12 @@ /types/is-url-superb/ @kryops /types/is-windows/ @mizunashi-mana /types/isbn-utils/ @elhaard -/types/iscroll/ @csrakowski +/types/iscroll/ @csrakowski @devlato /types/ismobilejs/ @Ty3uK /types/iso-3166-2/ @sicilica /types/iso8601-localizer/ @avielfedida /types/isomorphic-fetch/ @toddlucas -/types/isotope-layout/ @avidenic +/types/isotope-layout/ @avidenic @malinushj /types/istanbul/ @tkrotoff /types/istanbul-lib-coverage/ @jason0x43 /types/istanbul-lib-hook/ @jason0x43 @@ -1590,6 +1733,7 @@ /types/istanbul-reports/ @jason0x43 /types/ityped/ @DanielRosenwasser /types/ix.js/ @Igorbek +/types/jackrabbit/ @elvisvoer /types/jade/ @panuhorsmalahti /types/jalaali-js/ @alitaheri /types/japanese-holidays/ @syamatoo @@ -1617,14 +1761,19 @@ /types/jdataview/ @RReverser /types/jdenticon/ @mtr /types/jest/v16/ @NoHomey @jwbay -/types/jest/ @NoHomey @jwbay @asvetliakov @alexjoverm @epicallan @ikatyang @wsmd @JamieMason @douglasduteil @AhnpGit +/types/jest/ @NoHomey @jwbay @asvetliakov @alexjoverm @epicallan @ikatyang @wsmd @JamieMason @douglasduteil @AhnpGit @joshuakgoldberg @bradleyayers +/types/jest-axe/ @JoshuaKGoldberg /types/jest-diff/ @myabc /types/jest-docblock/ @ikatyang +/types/jest-each/ @theutz +/types/jest-environment-puppeteer/ @joshuakgoldberg /types/jest-get-type/ @myabc +/types/jest-image-snapshot/ @dawnmist /types/jest-in-case/ @geovanisouza92 /types/jest-json-schema/ @deadNightTiger /types/jest-matcher-utils/ @myabc /types/jest-matchers/ @joscha +/types/jest-specific-snapshot/ @dawnmist /types/jest-validate/ @ikatyang /types/jfs/ @tlaziuk /types/jjv/ @Nemo157 @@ -1632,11 +1781,12 @@ /types/jmespath/ @pushplay /types/johnny-five/ @nakakura @ujvzolee @workshop2 /types/joi/v6/ @Bartvds @laurence-myers @cglantschnig @DavidBR-SW -/types/joi/v10/ @Bartvds @laurence-myers @cglantschnig @DavidBR-SW @GaelMagnan @ralekna @schfkt @rokoroku -/types/joi/ @Bartvds @laurence-myers @cglantschnig @DavidBR-SW @GaelMagnan @ralekna @schfkt @rokoroku @dankraus @wanganjun +/types/joi/v10/ @Bartvds @laurence-myers @cglantschnig @DavidBR-SW @GaelMagnan @ralekna @schfkt @rokoroku @aconanlai +/types/joi/ @Bartvds @laurence-myers @cglantschnig @DavidBR-SW @GaelMagnan @ralekna @schfkt @rokoroku @dankraus @wanganjun @rafaelkallis @aconanlai /types/joigoose/ @boothwhack /types/josa/ @vichyssoise /types/jpeg-js/ @DanielRosenwasser +/types/jpegtran-bin/ @hikoma /types/jpm/ @github-account-because-they-want-it /types/jqgrid/ @lokeshpeta /types/jqrangeslider/ @qcz @@ -1648,10 +1798,14 @@ /types/jquery-awesome-cursor/ @zskovacs /types/jquery-backstretch/ @dkulyk /types/jquery-countdown/ @AndersonFriaca +/types/jquery-countto/ @AndersonFriaca /types/jquery-cropbox/ @PerKastman /types/jquery-deparam/ @patsissons +/types/jquery-drawer/ @pine /types/jquery-easy-loading/ @delphinus35 /types/jquery-editable-select/ @baywet +/types/jquery-focus-exit/ @AndersonFriaca +/types/jquery-focusable/ @AndersonFriaca /types/jquery-fullscreen/ @bgrieder /types/jquery-galleria/ @rimig /types/jquery-handsontable/ @intelorca @@ -1659,13 +1813,16 @@ /types/jquery-jsonrpcclient/ @Ty3uK /types/jquery-knob/ @iain8 /types/jquery-lazyload/ @AndersonFriaca +/types/jquery-loading-overlay/ @AndersonFriaca /types/jquery-mask-plugin/ @avidenic @AndersonFriaca /types/jquery-maskmoney/ @AndersonFriaca /types/jquery-match-height/ @kbytesys /types/jquery-mockjax/ @laszlojakab @vladeck /types/jquery-mousewheel/ @xt0rted +/types/jquery-next-id/ @AndersonFriaca /types/jquery-notifier/ @allipierre /types/jquery-param/ @patsissons +/types/jquery-slugify/ @AndersonFriaca /types/jquery-sortable/ @Seltzer /types/jquery-steps/ @jblank @nickwph /types/jquery-sticky/ @maixiu @@ -1676,10 +1833,12 @@ /types/jquery-urlparam/ @stpettersens /types/jquery-validation-unobtrusive/ @EnableSoftware /types/jquery.address/ @martinduparc @mardaneus86 +/types/jquery.appear/ @AndersonFriaca /types/jquery.are-you-sure/ @jonegerton /types/jquery.autosize/ @kingdango /types/jquery.bbq/ @sunetos /types/jquery.bootstrap.wizard/ @niemyjski @dennisahlin +/types/jquery.browser/ @AndersonFriaca /types/jquery.cleditor/ @pushplay /types/jquery.clientsidelogging/ @diullei /types/jquery.color/ @derekcicerone @@ -1709,6 +1868,7 @@ /types/jquery.notifybar/ @zaneli /types/jquery.noty/ @kingdango @thelfensdrfer /types/jquery.payment/ @ejsmith @johnrutherford +/types/jquery.pin/ @AndersonFriaca /types/jquery.pjax/ @lijunle /types/jquery.placeholder/ @majorsilence @EnableSoftware /types/jquery.pnotify/ @DavidSichau @FUNExtreme @@ -1752,10 +1912,13 @@ /types/js-fixtures/ @kazimanzurrashid /types/js-git/ @Bartvds /types/js-md5/ @mwmccarthy +/types/js-money/ @kanatkubash +/types/js-nacl/ @ethanfrey /types/js-quantities/ @wrummler /types/js-schema/ @marcinporebski @roblabat /types/js-search/ @guoyunhe /types/js-sha512/ @nicojs +/types/js-string-escape/ @viralpickaxe /types/js-to-java/ @skyitachi /types/js-url/ @pine613 /types/js-yaml/ @Bartvds @sclausen @@ -1769,7 +1932,7 @@ /types/jsend/ @CaselIT /types/jsesc/ @Bartvds /types/jsfl/ @soywiz -/types/jsforce/ @dolanmiu @netes +/types/jsforce/ @dolanmiu @netes @amphro @tnoonan-salesforce /types/jshamcrest/ @dharkness /types/jsmockito/ @shiver-me-timbers /types/jsnox/ @stkb @DovydasNavickas @@ -1780,15 +1943,19 @@ /types/json-pointer/ @Bartvds /types/json-query/ @mtraynham /types/json-rpc-ws/ @npenin @mlamp -/types/json-schema/ @bcherny @cyrilletuzi +/types/json-schema/ @bcherny @cyrilletuzi @lucianbuzzo /types/json-socket/ @svi3c /types/json-stable-stringify/ @mhfrantz /types/json-stringify-safe/ @BendingBender +/types/json2csv/ @juanjoDiaz /types/json2md/ @MartynasZilinskas +/types/json3/ @NN--- /types/jsonata/ @nick121212 /types/jsoneditor/ @alejo90 +/types/jsoneditor-for-react/ @joshuakgoldberg /types/jsoneditoronline/ @vbortone /types/jsonfile/ @dbowring +/types/jsonic/ @jacobbubu /types/jsonminify/ @no23reason /types/jsonnet/ @hookclaw /types/jsonp/ @surenkov @@ -1796,18 +1963,23 @@ /types/jsonrpc-serializer/ @Akim95 @many20 /types/jsonstream/ @Bartvds /types/jsontoxml/ @benstevens48 -/types/jsonwebtoken/ @SomaticIT @danielheim @brikou +/types/jsonwebtoken/ @SomaticIT @danielheim @brikou @vpk +/types/jsonwebtoken-promisified/ @SomaticIT @danielheim @brikou @aneilbaboo /types/jspdf/ @amberjs /types/jsqrcode/ @lordazzi /types/jsrender/ @zakki /types/jsreport-core/ @taoqf +/types/jsreport-html-to-xlsx/ @me +/types/jsreport-jsrender/ @taoqf +/types/jsreport-phantom-pdf/ @taoqf +/types/jsreport-xlsx/ @taoqf /types/jsrp/ @harryshipton -/types/jss/ @appsforartists @kof +/types/jss/ @appsforartists @kof @pelotom /types/jssha/ @randombk @SrTobi /types/jstimezonedetect/ @olamothe /types/jstorage/ @dflor003 /types/jstree/ @adaskothebeast -/types/jsts/ @StephaneAlie +/types/jsts/ @StephaneAlie @jrocha /types/jsuite/ @darrenhillconsulting /types/jsuri/ @coldacid @flqw /types/jsurl/ @agorshkov23 @@ -1817,12 +1989,14 @@ /types/jui/ @easylogic /types/jui-core/ @easylogic /types/jui-grid/ @easylogic +/types/just-extend/ @pe8ter /types/jweixin/ @taoqf @gomydodo -/types/jwplayer/ @martinduparc @kutomer @philippguertler +/types/jwplayer/ @martinduparc @kutomer @philippguertler @danielmcgraw @bpdsw /types/jws/ @JustinBeckwith /types/jwt-client/ @timoteoponce /types/jwt-decode/v1/ @QuatroDevOfficial /types/jwt-decode/ @GiedriusGrabauskas @madsmadsen +/types/jwt-express/ @nickp10 /types/jwt-simple/ @kenfdev @GaelMagnan /types/kafka-node/ @dansitu @bkim54 @sfrooster @amiram /types/karma/ @tkrotoff @43081j @@ -1831,6 +2005,7 @@ /types/karma-coverage/ @tkrotoff /types/karma-fixture/ @evictor /types/karma-jasmine/ @michelsalib +/types/karma-viewport/ @karak /types/karma-webpack/ @mtraynham /types/katex/ @mrand01 /types/kcors/ @Xstoudi @izayoiko @@ -1844,12 +2019,13 @@ /types/keypress.js/ @rcchen /types/keysym/ @harryshipton /types/keytar/ @miniak @shiftkey @juturu +/types/keyv/ @Arylo /types/kik-browser/ @joelday /types/klaw/v1/ @mceachen /types/klaw/ @mceachen /types/klaw-sync/ @shiftkey /types/kms-json/ @sunnyone -/types/knex/ @tkQubo @baronfel @MeLlamoPablo @mastermatt @micksatana +/types/knex/ @tkQubo @baronfel @MeLlamoPablo @mastermatt @micksatana @shreyjain1994 /types/knex-postgis/ @vesse /types/knockback/ @borisyankov /types/knockout/ @borisyankov @Igorbek @moonpyk @EnableSoftware @BenjaminEckardt @ffMathy @@ -1896,6 +2072,7 @@ /types/koa-pug/ @Xstoudi /types/koa-range/ @strax /types/koa-redis/ @nsimmons +/types/koa-response-time/ @thorsedeke /types/koa-route/ @migstopheles /types/koa-router/ @hellopao @schfkt /types/koa-send/ @pe8ter @tlaziuk @@ -1906,6 +2083,7 @@ /types/koa-views/ @brooklyndev /types/koa-webpack/ @malj /types/koa-websocket/ @me +/types/koa-xml-body/ @uwinkelvos /types/koa2-cors/ @xialeistudio /types/koa__cors/ @Xstoudi @izayoiko @stevehipwell /types/kolite/ @borisyankov @@ -1913,8 +2091,8 @@ /types/kraken-js/ @darkwebdev /types/kramed/ @tonicblue /types/kss/ @giladgray -/types/kue/ @drudge @amiram @pc-jedi -/types/kurento-utils/ @nenadalm +/types/kue/ @drudge @amiram @pc-jedi @deerawan +/types/kurento-utils/ @nenadalm @riggs /types/kuromoji/ @mzsm @kgtkr /types/lab/ @prashaantt /types/ladda/ @dflor003 @leemicw @@ -1923,25 +2101,27 @@ /types/latinize/ @GiedriusGrabauskas /types/latlon-geohash/ @rimig /types/launchpad/ @rictic +/types/lazy-value/ @ikatyang /types/lazy.js/ @Bartvds /types/lazypipe/ @tomc974 /types/ldapjs/ @cvillemure @peterkooijmans /types/leadfoot/ @theintern /types/leaflet/v0/ @rgripper -/types/leaflet/ @alejo90 @atd-schubert +/types/leaflet/ @alejo90 @atd-schubert @mcauer /types/leaflet-areaselect/ @awallat /types/leaflet-curve/ @onikiienko -/types/leaflet-draw/ @matt-guest @reblace @YunS-Stacy +/types/leaflet-draw/ @matt-guest @reblace @YunS-Stacy @beschoenen /types/leaflet-editable/ @dalie /types/leaflet-fullscreen/ @DenisCarriere /types/leaflet-geocoder-mapzen/ @leezu -/types/leaflet-gpx/ @soucekv +/types/leaflet-gpx/ @soucekv @molnarm /types/leaflet-imageoverlay-rotated/ @tkleinke /types/leaflet-label/ @Nemo157 /types/leaflet-mouse-position/ @Hanyon /types/leaflet-polylinedecorator/ @soucekv /types/leaflet-providers/ @BendingBender /types/leaflet-rotatedmarker/ @robert-prib-polestar +/types/leaflet-routing-machine/ @chanakadrathnayaka /types/leaflet.awesome-markers/v0/ @Odrin @sebek64 /types/leaflet.awesome-markers/ @sebek64 /types/leaflet.fullscreen/ @wcomartin @@ -1955,6 +2135,7 @@ /types/leaflet.polylinemeasure/ @RiON69 /types/leapmotionts/ @logotype /types/legal-eagle/ @j-f1 +/types/lerna-get-packages/ @LogvinovLeon /types/less/ @thasner @pranaygp /types/less-middleware/ @federicobond /types/less2sass/ @gatimus @@ -1973,10 +2154,12 @@ /types/line-by-line/ @etomsen /types/line-reader/ @stpettersens /types/linkify-it/ @praxxis +/types/listr/ @durad /types/lls/ @borislavjivkov /types/load-json-file/ @SamVerschueren /types/loader-runner/ @e-cloud /types/loader-utils/ @Perlmint @TotooriaHyperion +/types/loadjs/ @screendriver /types/loadware/ @ALyman /types/lobibox/ @itboy87 /types/local-dynamo/ @Sicilica @@ -2286,7 +2469,7 @@ /types/lokijs/ @TeamworkGuy2 @thomasconner /types/lolex/ @Nemo157 @joshuakgoldberg @rogierschouten /types/long/ @peterkooijmans -/types/loopback/ @kattsushi @enko @sequoia @drmikecrowe +/types/loopback/ @kattsushi @enko @sequoia @drmikecrowe @karimsa /types/loopback-boot/ @kattsushi /types/lorem-ipsum/ @durad /types/lory.js/ @kubosho @milkisevil @@ -2311,6 +2494,7 @@ /types/mailcheck/ @pocesar /types/maildev/ @cyrilschumacher @zbarbuto /types/mailgen/ @vothanhkiet @jordanfarrer +/types/mailgun-js/ @sampsonjoliver /types/mailparser/ @psnider /types/main-bower-files/ @k-kagurazaka /types/make-dir/ @ikatyang @BendingBender @@ -2319,11 +2503,13 @@ /types/map-obj/ @BendingBender /types/mapbox/ @anahkiasen /types/mapbox-gl/ @dobrud @patrickr +/types/mapbox-gl-leaflet/ @agorshkov23 +/types/mapbox__geojson-area/ @n0nick /types/mapbox__shelf-pack/ @Perlmint /types/mapnik/ @ipv4sec /types/mapsjs/ @davismj /types/mariasql/ @bennett000 -/types/mark.js/ @renjfk +/types/mark.js/ @renjfk @RomanGotsiy /types/markdown-it/ @rapropos /types/markdown-it-anchor/ @seryl /types/markdown-it-container/ @hronex @@ -2337,35 +2523,41 @@ /types/massive/v3/ @swissspidy @clarenceh /types/massive/ @swissspidy @clarenceh @AmazingTurtle /types/match-media-mock/ @asvetliakov -/types/material-components-web/ @BrentDouglas +/types/material-components-web/ @BrentDouglas @ckosti /types/material-design-lite/ @bradzacher -/types/material-ui/ @ngbrown @theigor @alitaheri @herrmanno @DaIgeb @allienna @schlesingermatthias @InsidersByte @artyomsv @dan-j @minodisk +/types/material-ui/ @ngbrown @theigor @alitaheri @herrmanno @DaIgeb @allienna @schlesingermatthias @InsidersByte @artyomsv @dan-j @minodisk @samwalshnz /types/material-ui-datatables/ @coding2012 -/types/material__animation/ @BrentDouglas -/types/material__auto-init/ @BrentDouglas -/types/material__base/ @BrentDouglas -/types/material__checkbox/ @BrentDouglas -/types/material__dialog/ @BrentDouglas -/types/material__drawer/ @BrentDouglas -/types/material__form-field/ @BrentDouglas -/types/material__grid-list/ @BrentDouglas -/types/material__icon-toggle/ @BrentDouglas -/types/material__linear-progress/ @BrentDouglas -/types/material__menu/ @BrentDouglas -/types/material__radio/ @BrentDouglas -/types/material__ripple/ @BrentDouglas -/types/material__select/ @BrentDouglas -/types/material__selection-control/ @BrentDouglas -/types/material__slider/ @BrentDouglas -/types/material__snackbar/ @BrentDouglas -/types/material__tabs/ @BrentDouglas -/types/material__textfield/ @BrentDouglas -/types/material__toolbar/ @BrentDouglas +/types/material__animation/ @BrentDouglas @ckosti +/types/material__auto-init/ @BrentDouglas @ckosti +/types/material__base/ @BrentDouglas @ckosti +/types/material__checkbox/ @BrentDouglas @ckosti +/types/material__chips/ @BrentDouglas @ckosti +/types/material__dialog/ @BrentDouglas @ckosti +/types/material__drawer/ @BrentDouglas @ckosti +/types/material__floating-label/ @BrentDouglas @ckosti +/types/material__form-field/ @BrentDouglas @ckosti +/types/material__grid-list/ @BrentDouglas @ckosti +/types/material__icon-toggle/ @BrentDouglas @ckosti +/types/material__line-ripple/ @BrentDouglas @ckosti +/types/material__linear-progress/ @BrentDouglas @ckosti +/types/material__menu/ @BrentDouglas @ckosti +/types/material__notched-outline/ @BrentDouglas @ckosti +/types/material__radio/ @BrentDouglas @ckosti +/types/material__ripple/ @BrentDouglas @ckosti +/types/material__select/ @BrentDouglas @ckosti +/types/material__selection-control/ @BrentDouglas @ckosti +/types/material__slider/ @BrentDouglas @ckosti +/types/material__snackbar/ @BrentDouglas @ckosti +/types/material__tab/ @BrentDouglas @ckosti +/types/material__tabs/ @BrentDouglas @ckosti +/types/material__textfield/ @BrentDouglas @ckosti +/types/material__toolbar/ @BrentDouglas @ckosti +/types/material__top-app-bar/ @BrentDouglas @ckosti /types/materialize-css/v0/ @eriklieben @leonyu @SinghSukhdeep @jfcere @scote @LiadIdan -/types/materialize-css/ @huww98 +/types/materialize-css/ @huww98 @MaximBalaganskiy @MonizDave @broccoliarchy /types/math3d/ @laszlojakab @jimsmart /types/mathjax/ @rolandzwaga -/types/mathjs/ @siavol +/types/mathjs/ @siavol @andnp /types/matter-js/ @piranha771 @hasparus /types/maxmind/ @geoffreak /types/mcustomscrollbar/ @flurg @@ -2373,14 +2565,17 @@ /types/mdns/ @reppners /types/mdurl/ @rokt33r /types/media-typer/ @BendingBender -/types/medium-editor/ @keika299 +/types/medium-editor/ @keika299 @pascaliske /types/mem/ @SamVerschueren +/types/mem-fs/ @MyFoodBag +/types/mem-fs-editor/ @MyFoodBag /types/memcached/ @KentarouTakeda +/types/memoize-one/ @karol-majewski /types/memoizee/ @juanpicado /types/memory-cache/ @jedigo @thieman /types/memory-fs/ @e-cloud /types/memwatch-next/ @cyrilschumacher -/types/meow/ @KnisterPeter @praxxis +/types/meow/ @KnisterPeter @praxxis @bitjson /types/merge-descriptors/ @danny8002 /types/merge-stream/ @k-kagurazaka @daniel-zazula /types/merge2/ @tkrotoff @smac89 @@ -2389,14 +2584,15 @@ /types/meshblu/ @fnipo /types/mess/ @Nemo157 /types/messenger/ @derekcicerone -/types/meteor/ @barbatus @fullflavedave @orefalo @dagatsoin @birkskyum @ardatan @stefanholzapfel +/types/meteor/ @barbatus @fullflavedave @orefalo @dagatsoin @birkskyum @ardatan @stefanholzapfel @andrei-markeev /types/meteor-accounts-phone/ @DAB0mB /types/meteor-collection-hooks/ @twastvedt /types/meteor-jboulhous-dev/ @vangorra /types/meteor-persistent-session/ @vangorra /types/meteor-prime8consulting-oauth2/ @vangorra /types/meteor-publish-composite/ @vangorra -/types/meteor-roles/ @vangorra +/types/meteor-roles/ @vangorra @mattmm3d +/types/meteor-univserse-i18n/ @mathewmeconry /types/method-override/ @santialbo /types/methods/ @cprecioso /types/metric-suffix/ @davidm77 @@ -2416,10 +2612,11 @@ /types/mime-types/ @Perlmint /types/mimos/ @AJamesPhillips /types/mina/ @lhk @mattanja @kant2002 +/types/mini-css-extract-plugin/ @JounQin /types/minimatch/ @vvakame @shantmarouti /types/minimist/ @Bartvds @Necroskillz @kamranayub /types/minimist-options/ @ikatyang -/types/minio/ @barinbritva +/types/minio/ @barinbritva @castorw /types/minipass/ @BendingBender /types/mirrorx/ @aaronphy /types/mithril/ @spacejack @andraaspar @isiahmeadows @@ -2427,10 +2624,13 @@ /types/mitm/ @alejo90 /types/mixpanel/ @hjellek @Manduro /types/mixto/ @vvakame +/types/mjml/ @aahoughton /types/mkdirp/ @Bartvds @mrmlnc +/types/mkdirp-promise/ @pluma /types/mkpath/ @optical /types/mobx-apollo/ @pselden -/types/mocha/ @kazimanzurrashid @otiai10 @jt000 @enlight +/types/mobx-devtools-mst/ @pluma +/types/mocha/ @kazimanzurrashid @otiai10 @jt000 @enlight @cspotcode /types/mocha-each/ @magnostherobot /types/mocha-phantomjs/ @ErikSchierboom /types/mocha-steps/ @Arylo @@ -2444,6 +2644,7 @@ /types/mockery/ @jt000 /types/modernizr/ @borisyankov @theodorejb @leonyu @lucax88x @nhardy /types/modesl/ @neeschit +/types/module-alias/ @KevinRamharak /types/moji/ @yasupeke /types/moment-business/ @wonbyte /types/moment-business-time/ @swist @@ -2456,9 +2657,9 @@ /types/moment-timezone/ @michelsalib @alanblins /types/mongo-sanitize/ @CedricCazin /types/mongodb/v2/ @CaselIT @alanmarcell @kikar @bitjson @dante-101 @mcortesi -/types/mongodb/ @CaselIT @alanmarcell @kikar @bitjson @dante-101 @mcortesi +/types/mongodb/ @CaselIT @alanmarcell @kikar @bitjson @dante-101 @mcortesi @EnricoPicci @AJCStriker @julien-c @daprahamian /types/mongoose/v4/ @simonxca @horiuchi @sindrenm @lukasz-zak -/types/mongoose/ @simonxca @horiuchi @sindrenm @lukasz-zak @Alorel @jendrikw @ethanresnick +/types/mongoose/ @horiuchi @sindrenm @lukasz-zak @Alorel @jendrikw @ethanresnick @vologab /types/mongoose-auto-increment/ @AyaMorisawa /types/mongoose-deep-populate/ @AyaMorisawa /types/mongoose-geojson-schema/ @bondz @@ -2469,15 +2670,18 @@ /types/mongoose-sequence/ @linusbrolin /types/mongoose-simple-random/ @rsxdalv /types/mongoose-unique-validator/ @stevehipwell +/types/mongorito/ @pinguet62 /types/moo/ @deltaidea @MofX /types/moonjs/ @DanielRosenwasser /types/morgan/ @staticfunction @pscanf +/types/morphdom/ @arvitaly /types/morris.js/ @mareek @sindilevich /types/mousetrap/ @qcz /types/move-concurrently/ @mgroenhoff /types/moviedb/ @basarat @0x6368656174 /types/moxios/ @itoasuka /types/mozilla-readability/ @charlesvdv +/types/mozjpeg/ @hikoma /types/mpromise/ @sgkim126 /types/mri/ @shiftkey @j-f1 /types/ms/ @danny8002 @@ -2487,24 +2691,28 @@ /types/msportalfx-test/ @julioct /types/mssql/ @jaminfarr @buzinas @mrrichar @elhaard @pkeuter /types/mu2/ @jedigo +/types/muicss/ @samuelneff /types/multer/ @jt000 @DavidBR-SW @mxl @hyunseob /types/multer-gridfs-storage/v1/ @devconcept /types/multer-gridfs-storage/ @devconcept -/types/multer-s3/ @tcaesvk @galtalmor +/types/multer-s3/ @tcaesvk @galtalmor @terski /types/multi-typeof/ @mhegazy /types/multimatch/ @stephenlautier /types/multiparty/ @kenfdev /types/multiplexjs/ @KamyarNazeri /types/multisort/ @CzBuCHi /types/multistream/ @mrmlnc @kenzierocks +/types/muri/ @jloveridge +/types/murmurhash/ @atd-schubert /types/murmurhash-js/ @cvle /types/murmurhash3js/ @dlee-nvisia /types/musicmetadata/ @Xstoudi /types/mustache/ @markashleybell /types/mv/ @nenadalm -/types/mysql/ @wjohnsto @kacepe @kpping +/types/mysql/ @wjohnsto @kacepe @kpping @jdmunro /types/mz/ @ThomasHickman /types/n3/ @phreed +/types/named-regexp-groups/ @jewbre /types/nano/ @timjacobi @vincekovacs /types/nanoajax/ @nathancahill /types/nanoid/ @bash @@ -2514,10 +2722,11 @@ /types/nats-hemera/ @vforv /types/natsort/ @mgroenhoff /types/natural/ @dmoonfire -/types/natural-sort/ @a-morales +/types/natural-sort/ @a-morales @fluggo +/types/navermaps/ @ckboyjiy /types/navigation/ @grahammendick /types/navigation-react/ @grahammendick -/types/navigo/ @aersamkull @dancespiele +/types/navigo/ @aersamkull @dancespiele @deini /types/nblas/ @erikgerrits /types/nconf/ @jedigo @jmthibault /types/ncp/ @bartvds @@ -2533,6 +2742,7 @@ /types/nes/ @NoHomey @saboya /types/net-keepalive/ @hertzg /types/netmask/ @mhfrantz +/types/network-interfaces/ @anderswestberg /types/new-relic-browser/ @renehamburger @piotrkubisa /types/newline-remove/ @OpenByteDev /types/newrelic/ @mastermatt @@ -2549,6 +2759,7 @@ /types/ng-i18next/ @cyrilschumacher /types/ng-notify/ @nzamosenchuk /types/ng-stomp/ @lpotapczuk +/types/ng-tags-input/ @GiorgosPap /types/ngbootbox/ @stpettersens /types/ngeohash/ @erkie /types/ngkookies/ @martinmcwhorter @@ -2556,36 +2767,38 @@ /types/ngprogress/ @martinmcwhorter /types/ngprogress-lite/ @LukeForder /types/ngreact/ @velveret +/types/ngsijs/ @guillermofr /types/ngstorage/ @kubiq /types/ngtoaster/ @btesser /types/ngwysiwyg/ @patrick-mackay -/types/nightmare/ @horiuchi @samyang-au +/types/nightmare/ @horiuchi @samyang-au @Bleser92 /types/nightwatch/ @rkavalap @schlesiger -/types/noble/ @swook @wind-rider @shantanubhadoria @lukel99 @bioball @keton +/types/nivo-slider/ @AndersonFriaca +/types/noble/ @swook @shantanubhadoria @lukel99 @bioball @keton @thegecko /types/nock/ @bonnici @horiuchi @afharo @mastermatt @damour /types/nodal/ @charrondev /types/node/v4/ @eps1lon -/types/node/v6/ @WilcoBakker @inlined @eps1lon @Alorel -/types/node/v7/ @parambirs @tellnes @WilcoBakker @eps1lon -/types/node/v8/ @parambirs @tellnes @WilcoBakker @octo-sniffle @smac89 @Flarna @mwiktorczyk @wwwy3y3 @DeividasBakanas @kjin @alvis @OliverJAsh @eps1lon @Hannes-Magnusson-CK @jkomyno @hoo29 -/types/node/ @parambirs @tellnes @WilcoBakker @octo-sniffle @smac89 @Flarna @mwiktorczyk @wwwy3y3 @DeividasBakanas @kjin @alvis @OliverJAsh @eps1lon @Hannes-Magnusson-CK @jkomyno @ajafff @hoo29 +/types/node/v6/ @WilcoBakker @inlined @eps1lon @Alorel @KSXGitHub +/types/node/v7/ @parambirs @tellnes @WilcoBakker @eps1lon @KSXGitHub +/types/node/v8/ @parambirs @tellnes @WilcoBakker @octo-sniffle @smac89 @Flarna @mwiktorczyk @wwwy3y3 @DeividasBakanas @kjin @alvis @eps1lon @Hannes-Magnusson-CK @jkomyno @hoo29 @n-e @brunoscheufler @KSXGitHub @islishude +/types/node/v9/ @parambirs @tellnes @WilcoBakker @octo-sniffle @smac89 @Flarna @mwiktorczyk @wwwy3y3 @DeividasBakanas @kjin @alvis @eps1lon @Hannes-Magnusson-CK @jkomyno @ajafff @hoo29 @n-e @brunoscheufler @mohsen1 @KSXGitHub @a-tarasyuk @islishude +/types/node/ @parambirs @tellnes @WilcoBakker @octo-sniffle @smac89 @Flarna @mwiktorczyk @wwwy3y3 @DeividasBakanas @kjin @alvis @eps1lon @Hannes-Magnusson-CK @jkomyno @ajafff @hoo29 @n-e @brunoscheufler @mohsen1 @KSXGitHub @a-tarasyuk @islishude /types/node-7z/ @erkie /types/node-array-ext/ @Beng89 /types/node-cache/ @chrootsu @dthunell @useltmann /types/node-calendar/ @luzianz /types/node-cleanup/ @agadar -/types/node-common-errors/ @icopp /types/node-cron/ @maximelkin /types/node-dir/ @panuhorsmalahti /types/node-dogstatsd/ @chrisbobo /types/node-emoji/ @jonestristand @styu -/types/node-fetch/ @torstenwerner +/types/node-fetch/ @torstenwerner @nikcorg /types/node-fibers/ @caryhaynie /types/node-forge/ @westy92 @flynetworks @a-k-g @rafal2228 /types/node-gcm/ @horiuchi /types/node-geocoder/ @rosek86 /types/node-getopt/ @kcauchy -/types/node-hid/ @mhegazy @ert78gb +/types/node-hid/ @mhegazy @ert78gb @thegecko /types/node-horseman/ @apratheek /types/node-hue-api/ @fjmorel /types/node-int64/ @x3cion @kevin-greene-ck @@ -2596,16 +2809,17 @@ /types/node-notifier/ @tkQubo /types/node-polyglot/ @timjk /types/node-powershell/ @rodrigoff +/types/node-pushnotifications/ @menushka /types/node-ral/ @ssddi456 -/types/node-red/ @andersea -/types/node-rsa/ @alitaheri +/types/node-red/ @andersea @tbowmo +/types/node-rsa/ @alitaheri @xm /types/node-schedule/ @cyrilschumacher @flowpl /types/node-slack/ @tkQubo /types/node-snap7/ @heilingbrunner /types/node-sprite-generator/ @Perlmint /types/node-static/ @Morfent /types/node-statsd/ @alexturek @convoyinc -/types/node-telegram-bot-api/ @ammuench @agadar @Dabolus +/types/node-telegram-bot-api/ @ammuench @agadar @Dabolus @Kallu609 /types/node-uuid/ @jeffmay /types/node-validator/ @kengorab /types/node-vault/ @YuJianrong @@ -2614,6 +2828,7 @@ /types/node-xmpp-core/ @PJakcson /types/node-zookeeper-client/ @plantain-00 @jessezhang91 /types/node_redis/ @borisyankov +/types/nodecredstash/ @migstopheles /types/nodegit/ @dolanmiu /types/nodemailer/v3/ @rogierschouten /types/nodemailer/ @rogierschouten @dex4er @@ -2632,7 +2847,7 @@ /types/normalize-url/ @odin3 @BendingBender /types/notie/ @mateusdemboski /types/notify/ @hellochar -/types/notifyjs/ @soundTricker +/types/notifyjs/ @soundTricker @NateScarlet /types/notifyjs-browser/ @bahman616 /types/notyf/ @gurov /types/nouislider/v7/ @acoreyj @@ -2642,6 +2857,7 @@ /types/npm/ @SomaticIT /types/npm-package-arg/ @mgroenhoff /types/npm-packlist/ @ajafff +/types/npmlog/ @DanielMSchmidt /types/ns-api/ @Archcry /types/nslog/ @unindented /types/nsqjs/ @cezaryrk @@ -2655,6 +2871,7 @@ /types/nw.gui/ @xperiments /types/nw.js/ @alirdn /types/o.js/ @IceOnFire @bradzacher @janhommes @jcchalte +/types/oauth/ @nonAlgebraic /types/oauth.js/ @nobuoka /types/oauth2-server/ @vangorra @cirick /types/oauth2orize/ @wokim @heycalmdown @stevehipwell @@ -2677,6 +2894,7 @@ /types/offline-js/ @cgwrench /types/oibackoff/ @geoffreak /types/oidc-token-manager/ @rosieks +/types/okta__okta-vue/ @innovation-team /types/ol/ @yairtawil /types/on-finished/ @czechboy0 @BendingBender /types/on-headers/ @jjeffery @BendingBender @@ -2687,11 +2905,12 @@ /types/onoff/ @marcel-ernst /types/open/ @Bartvds /types/opener/ @tikurahul -/types/openfin/ @chrisbarker +/types/openfin/v17/ @chrisbarker +/types/openfin/ @chrisbarker @rdepena /types/openjscad/ @danmarshall /types/openlayers/v2/ @bolhovsky /types/openlayers/v3/ @osechet @matthiasdailey-ccri -/types/openlayers/ @osechet @wb14123 @ailrun @mylen @iamthechad @danmana @yairtawil @pierremarc +/types/openlayers/ @osechet @wb14123 @ailrun @mylen @iamthechad @danmana @yairtawil @pierremarc @hauke96 /types/openstack-wrapper/ @sanjaymadane /types/opentok/ @westy92 @CatGuardian /types/opentype.js/ @danmarshall @edzis @@ -2733,6 +2952,7 @@ /types/p-log/ @BendingBender /types/p-map/ @BendingBender /types/p-map-series/ @BendingBender +/types/p-memoize/ @forabi /types/p-one/ @BendingBender /types/p-props/ @BendingBender /types/p-queue/ @BendingBender @evanshortiss @@ -2758,12 +2978,13 @@ /types/papaparse/ @torpedro @rainshen49 @jfloff @johnnyreilly /types/paper/ @clark-stevenson @Xakaloz /types/paralleljs/ @jbaldwin +/types/parcel-env/ @fathyb /types/parent-package-json/ @sgmccli /types/parity-pmd/ @leovujanic @jewbre /types/parity-pmr/ @leovujanic /types/parity-poe/ @leovujanic -/types/parse/ @dpoetzsch @jaeggerr @flavionegrao @wesleygrimes -/types/parse-git-config/ @leonard-thieu +/types/parse/ @dpoetzsch @jaeggerr @flavionegrao @wesleygrimes @owsas +/types/parse-git-config/ @leonard-thieu @deltaidea /types/parse-glob/ @glen-84 /types/parse-json/ @mrmlnc /types/parse-link-header/ @zelein @@ -2791,8 +3012,9 @@ /types/passport-local/ @SomaticIT /types/passport-local-mongoose/ @linusbrolin /types/passport-naver/ @Park9eon -/types/passport-oauth2/ @pasieronen +/types/passport-oauth2/ @pasieronen @WangZishi /types/passport-oauth2-client-password/ @akaNightmare +/types/passport-remember-me-extended/ @AylaJK /types/passport-saml/ @cjbarth /types/passport-steam/ @kzay /types/passport-strategy/ @liorm @@ -2803,6 +3025,7 @@ /types/path-exists/v1/ @shiwano /types/path-exists/ @shiwano @BendingBender /types/path-is-absolute/ @mhegazy +/types/path-is-inside/ @aomarks /types/pathfinding/ @BNedry /types/pathjs/ @lokeshpeta /types/pathwatcher/ @GlenCFL @@ -2813,6 +3036,7 @@ /types/pbf/ @cschwarz /types/pdfjs-dist/ @jbaldwin /types/pdfkit/ @erichillah +/types/pdfmake/ @m1llen1um @radziksh /types/pdfobject/ @nielsboogaard /types/pebblekitjs/ @makotokw /types/peer-dial/ @RealTYPICAL @@ -2825,6 +3049,7 @@ /types/pg/ @pspeter3 /types/pg-ears/ @bradleyayers /types/pg-escape/ @khell +/types/pg-format/ @zopf /types/pg-pool/ @aleung /types/pg-query-stream/ @asmarques /types/pg-types/ @waratuman @@ -2847,13 +3072,13 @@ /types/pickadate/ @theodorejb @leonard-thieu /types/picturefill/ @alaz /types/pidusage/ @cyrilschumacher -/types/pify/ @samverschueren @mad-mike +/types/pify/ @samverschueren @mad-mike @c7hm4r /types/pigpio/ @manerfan /types/pikaday/ @MidnightDesign @wake42 /types/pikaday-time/ @Sayan751 /types/pinkyswear/ @chances /types/pino/v3/ @psnider -/types/pino/ @psnider @BendingBender +/types/pino/ @psnider @BendingBender @screendriver /types/pino-multi-stream/ @JakeGinnivan /types/pinterest-sdk/ @adamburmister /types/pinyin/ @wanganjun @@ -2864,14 +3089,16 @@ /types/platform/ @JakeH /types/playcanvas/ @Neoflash1979 /types/playerframework/ @ricardosabino +/types/playmusic/ @nickp10 /types/pleasejs/ @nakakura -/types/plotly.js/ @chrisgervang @martinduparc @frederikaalund @taoqf @Dadstart +/types/plotly.js/ @chrisgervang @martinduparc @frederikaalund @taoqf @Dadstart @szechyjs @MercifulCode @soorajpudiyadath /types/plugapi/ @BNedry /types/plugin-error/ @rogierschouten /types/plupload/ @patrickbussmann /types/pluralize/ @ukyo /types/png-async/ @kanreisa /types/pngjs/ @jason0x43 +/types/pngquant-bin/ @hikoma /types/podcast/ @nikeee /types/podium/ @AJamesPhillips /types/point-in-polygon/ @dyst5422 @kogai @@ -2882,6 +3109,7 @@ /types/popcorn/ @grapswiz /types/portscanner/ @douglasduteil /types/postal/ @lokeshpeta @myitcv +/types/postman-collection/ @kbuzby /types/postmark/ @benbayard /types/pouch-redux-middleware/ @charrondev /types/pouchdb/ @AGBrown @geppy @fredgalvao @@ -2894,15 +3122,16 @@ /types/pouchdb-adapter-node-websql/ @spaulg @geppy @fredgalvao /types/pouchdb-adapter-websql/ @spaulg @geppy @fredgalvao /types/pouchdb-browser/ @spaulg @geppy @fredgalvao -/types/pouchdb-core/ @spaulg @trubit @geppy @fredgalvao @TobiasBales +/types/pouchdb-core/ @spaulg @trubit @geppy @fredgalvao @TobiasBales @tiangolo /types/pouchdb-find/ @trubit /types/pouchdb-http/ @spaulg @geppy @fredgalvao /types/pouchdb-mapreduce/ @spaulg @geppy @fredgalvao /types/pouchdb-node/ @spaulg @geppy @fredgalvao -/types/pouchdb-replication/ @trubit +/types/pouchdb-replication/ @trubit @tiangolo /types/pouchdb-upsert/ @keithdmoore @hotforfeature @apolkingg8 /types/power-assert/ @vvakame /types/power-assert-formatter/ @vvakame +/types/powerbi-visuals-tools/ @zBritva @Microsoft /types/precise/ @codeanimal /types/precond/ @olsio /types/preloadjs/ @endel @@ -2913,6 +3142,7 @@ /types/pretty-ms/ @BendingBender /types/printf/ @AluisioASG /types/priorityqueuejs/ @geoffreak +/types/prismic-dom/ @nickw444 /types/prismjs/ @eriklieben @andrewiggins @mmiszy /types/private-ip/ @coderslagoon /types/procfs-stats/ @cyrilschumacher @@ -2923,11 +3153,13 @@ /types/proj4leaflet/ @BendingBender /types/project-oxford/ @scsouthw /types/promise-dag/ @OSjoerdWie +/types/promise-map-limit/ @kohlmannj /types/promise-pg/ @coldacid /types/promise-polyfill/ @skysteve /types/promise-pool/ @vilic /types/promise-queue/ @LachlanStuart /types/promise-retry/ @shirakaba +/types/promise-timeout/ @Aankhen /types/promise.prototype.finally/ @slavik57 @BendingBender /types/promised-temp/ @rokadias /types/promisify-node/ @borekb @@ -2936,28 +3168,34 @@ /types/prompt-sync-history/ @MugeSo /types/promptly/ @danrspencer /types/prop-types/ @DovydasNavickas +/types/proper-lockfile/ @qlonik /types/properties-reader/ @Goldsmith42 -/types/prosemirror-collab/ @bradleyayers @davidka @timjb -/types/prosemirror-commands/ @bradleyayers @davidka @timjb -/types/prosemirror-gapcursor/ @bradleyayers @davidka @timjb -/types/prosemirror-history/ @bradleyayers @davidka @timjb -/types/prosemirror-inputrules/ @bradleyayers @davidka @timjb -/types/prosemirror-keymap/ @bradleyayers @davidka @timjb -/types/prosemirror-markdown/ @bradleyayers @davidka @timjb -/types/prosemirror-menu/ @bradleyayers @davidka @timjb -/types/prosemirror-model/ @bradleyayers @davidka @timjb @neknalb -/types/prosemirror-schema-basic/ @bradleyayers @davidka @timjb -/types/prosemirror-schema-list/ @bradleyayers @davidka @timjb -/types/prosemirror-state/ @bradleyayers @davidka @timjb -/types/prosemirror-tables/ @superchu @eshvedai -/types/prosemirror-transform/ @bradleyayers @davidka @timjb -/types/prosemirror-view/ @bradleyayers @davidka @timjb +/types/prosemirror-collab/ @bradleyayers @davidka @timjb @patsimm +/types/prosemirror-commands/ @bradleyayers @davidka @timjb @patsimm +/types/prosemirror-gapcursor/ @bradleyayers @davidka @timjb @patsimm +/types/prosemirror-history/ @bradleyayers @davidka @timjb @patsimm +/types/prosemirror-inputrules/ @bradleyayers @davidka @timjb @patsimm +/types/prosemirror-keymap/ @bradleyayers @davidka @timjb @patsimm +/types/prosemirror-markdown/ @bradleyayers @davidka @timjb @patsimm +/types/prosemirror-menu/ @bradleyayers @davidka @timjb @patsimm +/types/prosemirror-model/ @bradleyayers @davidka @timjb @neknalb @patsimm +/types/prosemirror-schema-basic/ @bradleyayers @davidka @timjb @patsimm +/types/prosemirror-schema-list/ @bradleyayers @davidka @timjb @patsimm +/types/prosemirror-state/ @bradleyayers @davidka @timjb @patsimm +/types/prosemirror-tables/ @superchu @eshvedai @patsimm +/types/prosemirror-transform/ @bradleyayers @davidka @timjb @patsimm +/types/prosemirror-view/ @bradleyayers @davidka @timjb @patsimm +/types/proton-native/ @khanhas /types/protractor-browser-logs/ @rokadias /types/protractor-helpers/ @johncant /types/protractor-http-mock/ @Crevil /types/provinces/ @gatimus /types/proxy-addr/ @BendingBender +/types/proxy-lists/ @BehindTheMath +/types/proxy-verifier/ @BehindTheMath /types/proxyquire/ @jt000 +/types/ps-tree/ @alessiopcc +/types/ptomasroos__react-native-multi-slider/ @Slessi /types/pty.js/ @enlight /types/public-ip/ @BendingBender /types/pubnub/ @bitbankinc @rollymaduk @vitosamson @@ -2965,16 +3203,17 @@ /types/pug/ @TonyPythoneer @19majkel94 /types/pulltorefreshjs/ @DanielRosenwasser @humpedli /types/pump/ @tlaziuk +/types/pumpify/ @JustinBeckwith @aoberoi /types/pupa/ @nju33 /types/puppeteer/v0/ @marvinhagemeister @cdeutsch /types/puppeteer/ @marvinhagemeister @cdeutsch @jwbay /types/pure-render-decorator/ @seansfkelley /types/purl/ @danfma -/types/pusher-js/ @tkqubo +/types/pusher-js/ @tkqubo @cainlevy /types/pvutils/ @microshine /types/python-shell/ @dolanmiu @WORMSS /types/q/v0/ @bnemetchek @johnnyreilly -/types/q/ @bnemetchek @AndrewGaspar @johnnyreilly @mboudreau +/types/q/ @bnemetchek @AndrewGaspar @johnnyreilly @mboudreau @TeamworkGuy2 /types/q-io/ @Bartvds /types/q-retry/ @vilic /types/qhistory/ @Kovensky @@ -2991,13 +3230,14 @@ /types/quixote/ @greybax /types/qunit/v1/ @diullei /types/qunit/ @waratuman +/types/qunit-dom/ @happycollision /types/quoted-printable/ @pushplay /types/qwest/ @lindsayevans /types/r-script/ @NaridaL /types/rabbit.js/ @wokim /types/radium/ @alexgorbatchev @nupplaphil @asvetliakov @mihe /types/radius/ @codeanimal -/types/ramda/ @donnut @mdekrey @mrdziuban @sbking @afharo @teves-castro @1M0reBug @hojberg @charlespwd @samsonkeung @angeloocana @raynerd @googol @moshensky @ethanresnick +/types/ramda/ @donnut @tycho01 @mdekrey @mrdziuban @sbking @afharo @teves-castro @1M0reBug @hojberg @charlespwd @samsonkeung @angeloocana @raynerd @googol @moshensky @ethanresnick @leighman @CaptJakk @deftomat @deptno @blimusiek @biern /types/random-js/ @pistacchio /types/random-number/ @OpenByteDev /types/random-seed/ @endel @@ -3019,28 +3259,31 @@ /types/raspi-soft-pwm/ @nebrius /types/ratelimiter/ @AyaMorisawa /types/raty/ @terrawheat -/types/raven/ @scttcper @1999 +/types/raven/ @scttcper @1999 @shreyjain1994 /types/raven-for-redux/ @chiubaka /types/raygun4js/ @xt0rted @BenjaminHarding /types/rbac-a/ @tlaziuk /types/rc/ @DanielRosenwasser /types/rc-select/ @DenisTirilis /types/rc-slider/ @mantasmarcinkus @mattoni @paustint @j-fro -/types/rc-tree/ @johnnyreilly +/types/rc-tree/ @johnnyreilly @Methuselah96 /types/rcloader/ @panuhorsmalahti /types/rdf-data-model/ @rubensworks /types/rdf-js/ @rubensworks /types/react/v15/ @bbenezech @pzavolinsky @digiguru @ericanderson @morcerf @tkrotoff @DovydasNavickas @onigoetz -/types/react/ @johnnyreilly @bbenezech @pzavolinsky @digiguru @ericanderson @morcerf @tkrotoff @DovydasNavickas @onigoetz @richseviora @theruther4d +/types/react/ @johnnyreilly @bbenezech @pzavolinsky @digiguru @ericanderson @morcerf @tkrotoff @DovydasNavickas @onigoetz @theruther4d @guilhermehubner @ferdaber @jrakotoharisoa /types/react-alert/ @ssyrell /types/react-alice-carousel/ @endigo +/types/react-animate-on-scroll/ @ralbuque /types/react-app/ @prakarshpandey /types/react-aria-menubutton/ @forabi @crohlfs +/types/react-autocomplete/ @lstanden /types/react-autosuggest/ @nicolas-schmitt @pjo256 @robessog @tbayne @cdeutsch @rosskevin -/types/react-beautiful-dnd/ @varHarrie @bradleyayers +/types/react-avatar-editor/ @diogocorrea @gabsprates +/types/react-beautiful-dnd/ @varHarrie @bradleyayers @paustint /types/react-big-calendar/ @piotrwitek @paustint @pikpok /types/react-body-classname/ @mhegazy -/types/react-bootstrap/ @walkerburgin @vsiao @danilojrr @Batbold-Gansukh @octatone @chengsieuly @mretolaza @katbusch @vitosamson @LKay @aaronbeall +/types/react-bootstrap/ @walkerburgin @vsiao @danilojrr @Batbold-Gansukh @octatone @chengsieuly @mretolaza @katbusch @vitosamson @LKay @aaronbeall @jrakotoharisoa /types/react-bootstrap-date-picker/ @LKay @ssi-hu-antal-bodnar /types/react-bootstrap-daterangepicker/ @ianks /types/react-bootstrap-table/v2/ @flaub @alelode @UJosue10 @@ -3053,13 +3296,16 @@ /types/react-calendar-heatmap/ @9renpoto /types/react-calendar-timeline/ @radziksh /types/react-cartographer/ @trevonmckay +/types/react-circular-progressbar/ @lstanden /types/react-click-outside/ @screendriver /types/react-codemirror/ @velveret @rudi-c /types/react-collapse/ @Kimahriman +/types/react-collapsible/ @knegusen /types/react-color/ @LKay @markspolakovs @mntdn /types/react-confirm/ @santiagodoldan -/types/react-content-loader/ @alaatm +/types/react-content-loader/ @alaatm @samwalshnz /types/react-copy-to-clipboard/ @mabels @BernabeFelix +/types/react-credit-cards/ @vstrimaitis /types/react-cropper/ @stepancar /types/react-css-modules/ @KostyaEsmukov @skirsdeda /types/react-css-transition-replace/ @LKay @@ -3089,7 +3335,7 @@ /types/react-event-listener/ @asvetliakov /types/react-fa/ @flaub @patsissons @LKay /types/react-facebook-login/ @apare @jankarres -/types/react-faux-dom/ @alitaheri @cleverguy25 @deviousm +/types/react-faux-dom/ @alitaheri @cleverguy25 @deviousm @hanai /types/react-file-input/ @dmitryrogozhny /types/react-file-reader-input/ @dmitryrogozhny @alitaheri /types/react-flags-select/ @senukartur @@ -3098,9 +3344,11 @@ /types/react-flexr/ @pushplay /types/react-fontawesome/ @timurrustamov @dublicator @vincaslt @gavingregory /types/react-form/v1/ @cameron-mcateer -/types/react-form/ @cameron-mcateer +/types/react-form/ @cameron-mcateer @TiuSh /types/react-foundation/ @danielearwicker /types/react-geosuggest/ @brmenchl +/types/react-google-maps-loader/ @vasilysn +/types/react-google-places-suggest/ @vasilysn /types/react-google-recaptcha/ @KoalaHuman /types/react-gravatar/ @invliD /types/react-grid-layout/ @abirkholz @alitaheri @ZheyangSong @andrewhathaway @@ -3111,22 +3359,25 @@ /types/react-highlight-words/ @mhegazy /types/react-highlighter/ @oizie /types/react-holder/ @isman-usoh -/types/react-hot-loader/ @jacekjagiello +/types/react-hot-loader/ @jacekjagiello @MartynasZilinskas @DovydasNavickas /types/react-hyperscript/ @tock203 /types/react-i18next/v1/ @KostyaEsmukov /types/react-i18next/v4/ @GiedriusGrabauskas /types/react-i18next/ @GiedriusGrabauskas @chnoch /types/react-icon-base/ @apare @LKay /types/react-icons/ @apare @johnnyreilly @LKay +/types/react-image-crop/ @danielasy /types/react-image-gallery/ @adamwpc /types/react-imageloader/ @stephenjelfs /types/react-infinite/ @rhysd +/types/react-infinite-calendar/ @christianchown /types/react-infinite-scroller/ @Lapanti @psrebniak /types/react-input-calendar/ @stepancar /types/react-input-mask/ @apare /types/react-intl/v1/ @bgrieder /types/react-intl/ @bgrieder @cdroulers @gyzerok @tillwolff @LKay @bhouser @kristerkari @formatlos /types/react-intl-redux/ @LKay +/types/react-is/ @AviVahl /types/react-is-deprecated/ @seansfkelley /types/react-joyride/ @DanielRosenwasser @bendxn /types/react-json/ @spielc @@ -3136,57 +3387,75 @@ /types/react-lazyload/ @m0a /types/react-leaflet/ @danzel @davschne @yuit /types/react-list/ @buptyyf @tomshen -/types/react-loadable/ @Kovensky @odensc @ianks @tlaziuk +/types/react-loadable/ @Kovensky @odensc @ianks @tlaziuk @iMobs /types/react-loader/ @artfuldev +/types/react-mailchimp-subscribe/ @osdiab +/types/react-map-gl/ @rimig /types/react-maskedinput/ @LKay @lavoaster @CarlosBonetti /types/react-mce/ @morphologue /types/react-mdl/ @bradzacher /types/react-measure/ @asvetliakov @marcfallows /types/react-mixin/ @tkqubo /types/react-modal/ @radziksh @drewnoakes @homburg @ttamminen @hallowatcher @peterblazejewicz -/types/react-monaco-editor/ @jnetterf /types/react-motion/ @stepancar @asvetliakov @dimitarnestorov /types/react-motion-slider/ @asvetliakov -/types/react-native/ @alloy @huhuanming @iRoachie @timwangdev @kamal @nelyousfi -/types/react-native-collapsible/ @iRoachie +/types/react-native/ @alloy @huhuanming @iRoachie @timwangdev @kamal @nelyousfi @alexdunne @swissmanu @bm-software @tkrotoff +/types/react-native-android-taskdescription/ @christianchown +/types/react-native-auth0/ @ascariandrea +/types/react-native-autocomplete-input/ @ifiokjr +/types/react-native-bluetooth-serial/ @RodrigoAWeber /types/react-native-communications/ @huhuanming @PaitoAnderson /types/react-native-datepicker/ @jacobbaskin /types/react-native-doc-viewer/ @iRoachie /types/react-native-document-picker/ @plantain-00 -/types/react-native-drawer/ @jnbt +/types/react-native-drawer/ @jnbt @suniahk /types/react-native-drawer-layout/ @jmfirth +/types/react-native-elevated-view/ @fhelwanger /types/react-native-fabric/ @josephroque /types/react-native-fbsdk/ @ifiokjr /types/react-native-fetch-blob/ @MNBuyskih /types/react-native-fs/ @pocesar @josephroque /types/react-native-google-signin/ @j-fro +/types/react-native-htmlview/ @ifiokjr +/types/react-native-i18n/ @VincentLanglet +/types/react-native-indicators/ @ifiokjr /types/react-native-keep-awake/ @huhuanming -/types/react-native-linear-gradient/ @j-fro +/types/react-native-keyboard-spacer/ @VincentLanglet +/types/react-native-keychain/ @DavidFarinha /types/react-native-loading-spinner-overlay/ @fhelwanger /types/react-native-material-design-searchbar/ @iRoachie /types/react-native-material-kit/ @iRoachie @timwangdev +/types/react-native-material-textfield/ @mindhivefi /types/react-native-material-ui/ @iRoachie /types/react-native-mixpanel/ @r3nya /types/react-native-modalbox/ @iRoachie +/types/react-native-multi-slider/ @Slessi /types/react-native-navigation/ @egorshulga /types/react-native-orientation/ @MoLow +/types/react-native-permissions/ @vincentlanglet +/types/react-native-photo-view/ @christianchown /types/react-native-popup-dialog/ @PaitoAnderson @connectdotz /types/react-native-push-notification/ @PaitoAnderson @tomSawkins /types/react-native-qrcode/ @plantain-00 /types/react-native-safari-view/ @mrand01 /types/react-native-scrollable-tab-view/ @CaiHuan @egorshulga /types/react-native-sensor-manager/ @SahinVardar -/types/react-native-snap-carousel/ @jnbt @j-fro +/types/react-native-snap-carousel/ @jnbt @j-fro @gazaret /types/react-native-sortable-grid/ @j-fro -/types/react-native-sortable-list/ @sivolobov +/types/react-native-sortable-list/ @sivolobov @RookY2K +/types/react-native-sqlite-storage/ @dryganets +/types/react-native-star-rating/ @iRoachie /types/react-native-svg-uri/ @iRoachie /types/react-native-swiper/ @CaiHuan @huhuanming @mhcgrq /types/react-native-tab-navigator/ @iRoachie /types/react-native-tab-view/ @kaoDev -/types/react-native-touch-id/ @huhuanming +/types/react-native-text-input-mask/ @RodrigoAWeber +/types/react-native-touch-id/ @huhuanming @gazaret /types/react-native-vector-icons/ @iRoachie @timwangdev -/types/react-native-video/ @huhuanming @abrahambotros -/types/react-navigation/ @huhuanming @mhcgrq @fangpenlin @abrahambotros @petejkim @iRoachie @phanalpha @charlesfamu @timwangdev @bang88 @svbutko @levito @robertohuertasm @YourGamesBeOver +/types/react-native-version-number/ @VincentLanglet +/types/react-native-video/ @huhuanming +/types/react-navigation/v1/ @huhuanming @mhcgrq @fangpenlin @petejkim @iRoachie @phanalpha @charlesfamu @timwangdev @bang88 @svbutko @levito @robertohuertasm @YourGamesBeOver @ArmandoAssuncao @cliedeman @Slessi +/types/react-navigation/ @huhuanming @mhcgrq @fangpenlin @petejkim @iRoachie @phanalpha @charlesfamu @timwangdev @bang88 @svbutko @levito @robertohuertasm @YourGamesBeOver @ArmandoAssuncao @cliedeman @Slessi @magrinj /types/react-notification-system/ @GiedriusGrabauskas @DeividasBakanas @LKay @sztobar /types/react-notification-system-redux/ @LKay /types/react-numeric-input/ @heatherbooker @@ -3194,35 +3463,44 @@ /types/react-onclickoutside/ @LKay /types/react-onsenui/ @salim7 @jemmyw /types/react-overlays/ @aaronbeall @vitosamson +/types/react-owl-carousel/ @tbounsiar @igorissen @KennethanCeyer /types/react-paginate/ @deevus @wouterhardeman @pegel03 @archy-bold +/types/react-places-autocomplete/ @guilhermehubner /types/react-pointable/ @istefo @mdibyo +/types/react-popover/ @jacoporicare /types/react-portal/ @shuntksh /types/react-props-decorators/ @tkqubo +/types/react-radio-group/ @jsonunger /types/react-recaptcha/ @mhegazy @zzanol -/types/react-redux/ @tkqubo @thasner @kenzierocks @clayne11 @tansongyang @nicholasboll @mdibyo @pdeva +/types/react-redux/v5/ @tkqubo @thasner @kenzierocks @clayne11 @tansongyang @nicholasboll @mdibyo @pdeva +/types/react-redux/ @tkqubo @thasner @kenzierocks @clayne11 @tansongyang @nicholasboll @mdibyo @pdeva @kallikrein @val1984 @jrakotoharisoa /types/react-redux-epic/ @forabi /types/react-redux-i18n/ @clementdevos /types/react-redux-toastr/ @Smiche @artyomsv @kulmajaba -/types/react-relay/ @graphcool @voxmatt @alloy @npirotte +/types/react-relay/ @graphcool @voxmatt @alloy @npirotte @ckknight +/types/react-resize-detector/ @matthew-matvei @aMoniker /types/react-resolver/ @forabi /types/react-responsive/v1/ @asvetliakov /types/react-responsive/ @asvetliakov @alechill @xaviergonz +/types/react-rnd/ @Ragg- /types/react-router/v2/ @sergey-buturlakin @mrk21 @vasek17 @ngbrown @awendland @KostyaEsmukov /types/react-router/v3/ @sergey-buturlakin @mrk21 @vasek17 @ngbrown @awendland @KostyaEsmukov @johnnyreilly @LKay @DovydasNavickas @ssorallen -/types/react-router/ @sergey-buturlakin @mrk21 @vasek17 @ngbrown @awendland @KostyaEsmukov @johnnyreilly @LKay @DovydasNavickas @tkrotoff @huy-nguyen @grmiade @DaIgeb @egorshulga @neuoy +/types/react-router/ @sergey-buturlakin @mrk21 @vasek17 @ngbrown @awendland @KostyaEsmukov @johnnyreilly @LKay @DovydasNavickas @tkrotoff @huy-nguyen @grmiade @DaIgeb @egorshulga @neuoy @rraina @pret-a-porter /types/react-router-bootstrap/ @vlesierse @LKay @olmobrutall /types/react-router-config/ @lith-light-g -/types/react-router-dom/ @tkrotoff @huy-nguyen -/types/react-router-native/ @ezintz +/types/react-router-dom/ @tkrotoff @huy-nguyen @p-jackson +/types/react-router-native/ @ezintz @fhelwanger /types/react-router-navigation/ @kaoDev /types/react-router-navigation-core/ @kaoDev +/types/react-router-param-link/ @mtsg /types/react-router-redux/v3/ @isman-usoh @noah79 @rosendi /types/react-router-redux/v4/ @isman-usoh @noah79 @rosendi @LKay @DovydasNavickas -/types/react-router-redux/ @huy-nguyen @8398a7 +/types/react-router-redux/ @huy-nguyen @8398a7 @mykolas /types/react-s-alert/ @mitsuruog /types/react-scroll/ @sudoplz @GiedriusGrabauskas /types/react-scrollbar/ @stephenjelfs -/types/react-select/ @Hesquibet @giladgray @iebaker @skirsdeda @vujevits @devrelm @MartynasZilinskas @onatm @ninjaferret @tehbi4 @misantronic +/types/react-select/ @Hesquibet @giladgray @iebaker @skirsdeda @vujevits @devrelm @MartynasZilinskas @onatm @ninjaferret @tehbi4 @misantronic @darkartur +/types/react-share/ @icopp /types/react-side-effect/ @remojansen /types/react-sidebar/ @jeroenvervaeke /types/react-sketchapp/ @ricokahler @DomiR @@ -3230,11 +3508,13 @@ /types/react-smooth-scrollbar/ @asvetliakov /types/react-sortable-hoc/ @NoHomey @charlesrey /types/react-sortable-pane/ @rhysd -/types/react-sortable-tree/ @wouterhardeman @jzoric +/types/react-sortable-tree/ @wouterhardeman @jzoric @kevinsperrine /types/react-spinkit/v1/ @tkqubo @mleko @pelotom /types/react-spinkit/ @tkqubo @mleko @pelotom @zzanol /types/react-sticky/ @curtisw0 -/types/react-stripe-elements/ @dan-j @santiagodoldan @sonnysangha +/types/react-stickynode/ @tstirrat +/types/react-stripe-elements/ @dan-j @santiagodoldan @sonnysangha @9y5 @thchia +/types/react-svg/ @viccrubs @chrisgarber /types/react-svg-pan-zoom/ @huy-nguyen /types/react-swf/ @stepancar /types/react-swipe/ @DeividasBakanas @@ -3250,9 +3530,11 @@ /types/react-test-renderer/v15/ @arvitaly @lochbrunner @lochbrunner @johnnyreilly /types/react-test-renderer/ @arvitaly @lochbrunner @johnnyreilly @jgoz /types/react-tether/ @ryprice -/types/react-text-mask/ @guilhermehubner +/types/react-text-mask/ @guilhermehubner @cavarzan /types/react-textarea-autosize/ @asvetliakov @zry656565 -/types/react-toastr/ @shssoichiro +/types/react-timeout/ @kerwynrg +/types/react-toastify/ @icopp +/types/react-toastr/ @shssoichiro @DanRegazzi /types/react-toggle/v2/ @LKay /types/react-toggle/ @LKay /types/react-tooltip/ @DeividasBakanas @@ -3265,16 +3547,18 @@ /types/react-twitter-auth/ @paulfasola /types/react-user-tour/ @ccancellieri /types/react-virtual-keyboard/ @bsurai -/types/react-virtualized/ @kaoDev @guntherjh @wasd171 @szabolcsx @kraenhansen +/types/react-virtualized/ @kaoDev @guntherjh @wasd171 @szabolcsx @kraenhansen @Stevearzh @mgoszcz2 /types/react-virtualized-select/ @seansfkelley +/types/react-webcam/ @squat /types/react-weui/ @tairan /types/react-widgets/ @rogierschouten @sanyatuning @frodehansen2 @r3nya /types/react-widgets-moment/ @dawnmist /types/react-youtube/ @kgtkr +/types/react-youtube-embed/ @charles-salmon /types/reactable/ @spielc /types/reactcss/ @chrisgervang @LKay /types/reactstrap/v4/ @alihammad @mfal @danilobjr @fabiopaiva -/types/reactstrap/ @alihammad @mfal @danilobjr @fabiopaiva @FaithForHumans @KurtPreston @kraenhansen @timc13 +/types/reactstrap/ @alihammad @mfal @danilobjr @FaithForHumans @KurtPreston @timc13 @patrickrgaffney /types/read/ @timjk /types/read-chunk/ @crispybee /types/read-package-tree/ @mgroenhoff @@ -3285,13 +3569,15 @@ /types/readline-sync/ @jonestristand /types/readline-transform/ @dex4er /types/reapop/ @Barrokgl +/types/recaptcha2/ @l-jonas /types/recase/ @18steps -/types/recharts/ @mthmulders @rapmue @royxue @ZheyangSong @richbai90 -/types/recompose/ @iskandersierra @mrapogee @clayne11 +/types/recharts/ @mthmulders @rapmue @royxue @ZheyangSong @richbai90 @caspeco-dan +/types/recluster/ @dex4er +/types/recompose/ @iskandersierra @mrapogee @clayne11 @Pajn @lucasterra /types/reconnectingwebsocket/ @nguarracino /types/recursive-readdir/v1/ @elisee /types/recursive-readdir/ @elisee @MicahZoltu -/types/redis/ @soywiz @CodeAnimal @MugeSo @UppaJung @Rokt33r @43081j +/types/redis/ @soywiz @CodeAnimal @MugeSo @UppaJung @Rokt33r @43081j @barnski /types/redis-errors/ @43081j /types/redis-mock/ @BendingBender /types/redis-rate-limiter/ @westy92 @@ -3302,7 +3588,7 @@ /types/reduce-reducers/ @huy-nguyen /types/redux-action/ @newraina /types/redux-action-utils/ @tkqubo -/types/redux-actions/ @jaysoo @alexgorbatchev @alechill +/types/redux-actions/ @jaysoo @alexgorbatchev @alechill @alexey-pelykh /types/redux-auth-wrapper/v1/ @LKay /types/redux-auth-wrapper/ @LKay /types/redux-batched-subscribe/ @mDibyo @@ -3313,9 +3599,10 @@ /types/redux-doghouse/ @BendingBender /types/redux-first-router/ @Valbrand @viggyfresh @janb87 @corydeppen /types/redux-first-router-link/ @janb87 +/types/redux-first-router-restore-scroll/ @icopp /types/redux-form/v4/ @aikoven /types/redux-form/v6/ @carsonf @aikoven @LKay @bancek -/types/redux-form/ @carsonf @aikoven @LKay @bancek @alsiola @tehbi4 +/types/redux-form/ @carsonf @aikoven @LKay @bancek @alsiola @tehbi4 @huwmartin /types/redux-immutable/ @oizie @sebald @gavingregory /types/redux-immutable-state-invariant/ @remojansen @highflying /types/redux-infinite-scroll/ @silkyfray @@ -3327,17 +3614,19 @@ /types/redux-logger/ @arusakov @kgroat /types/redux-mock-store/ @MarianPalkus /types/redux-optimistic-ui/ @asvetliakov -/types/redux-pack/ @tansongyang -/types/redux-persist-transform-encrypt/ @LKay +/types/redux-pack/ @tansongyang @quicksnap @no-stack-dub-sack +/types/redux-persist-transform-encrypt/ @LKay @dante-101 /types/redux-persist-transform-filter/ @LKay /types/redux-promise/ @molekilla @xStrom /types/redux-promise-middleware/ @ianks /types/redux-recycle/ @LKay /types/redux-router/ @stepancar +/types/redux-shortcuts/ @tstirrat /types/redux-socket.io/ @snakeego /types/redux-storage/ @asvetliakov /types/redux-storage-engine-jsurl/ @screendriver /types/redux-storage-engine-localstorage/ @screendriver +/types/redux-test-utils/ @huwmartin /types/redux-ui/ @andyshuxin /types/ref/ @loyd /types/ref-array/ @loyd @@ -3350,8 +3639,10 @@ /types/remarkable/ @makepost /types/remote-redux-devtools/ @ColinEberhardt @unindented /types/remove-markdown/ @RagibHasin +/types/rename/ @Aankhen /types/replace-ext/ @DeividasBakanas /types/request/ @soywiz @bonnici @Bartvds @joeskeen @ccurrens @lookfirst @mastermatt +/types/request-as-curl/ @atd-schubert /types/request-ip/ @mrhen /types/request-promise/ @cglantschnig @joeskeen @AyaMorisawa @mastermatt /types/request-promise-native/ @gustavohenke @mastermatt @@ -3372,7 +3663,7 @@ /types/restangular/ @borisyankov /types/restful.js/ @tkqubo /types/restify/v4/ @blittle @stevehipwell -/types/restify/ @blittle @stevehipwell +/types/restify/ @blittle @stevehipwell @leanazulyoro /types/restify-cookies/ @weekens /types/restify-cors-middleware/ @dthunell /types/restify-errors/ @stevehipwell @@ -3380,7 +3671,7 @@ /types/restler/ @cyrilschumacher /types/restling/ @loghorn /types/resumablejs/ @DanielMcAssey -/types/rethinkdb/ @alexgorbatchev +/types/rethinkdb/ @alexgorbatchev @AdrianFarmadin @kondi @hoishin /types/retry/ @krenor /types/retry-as-promised/ @Raigen /types/rev-hash/ @ikatyang @@ -3396,14 +3687,18 @@ /types/riot/ @Stubb0rn /types/riot-api-nodejs/ @zafixlrp /types/riot-games-api/ @xstoudi +/types/riot-route/ @karak /types/riotcontrol/ @chrootsu /types/riotjs/ @vvakame /types/rison/ @impworks /types/rivets/ @TrevorDev @matjanos +/types/rmfr/ @pluma /types/roads/ @dancespiele +/types/roads-server/ @dancespiele +/types/roll/ @icopp /types/rollup-plugin-json/ @asmockler /types/ronomon__crypto-async/ @BendingBender -/types/rosie/ @abner @subvertallchris +/types/rosie/ @abner @subvertallchris @abukurov /types/roslib/ @Pro @skycoop @dgorobopec /types/rot-js/ @atiaxi /types/route-parser/ @ianks @bobbuehler @@ -3411,14 +3706,15 @@ /types/royalslider/ @csrakowski /types/rpio/ @DominikPalo @Pencl /types/rrc/ @DeividasBakanas -/types/rrule/ @waratuman /types/rsmq/ @MugeSo /types/rsmq-worker/ @MugeSo /types/rss/ @secondwtq /types/rsvp/ @chriskrycho /types/rsync/ @philippstucki /types/rtree/ @oefirouz +/types/run-parallel/ @mrmlnc /types/run-sequence/ @k-kagurazaka +/types/rword/ @icopp /types/rx/ @Igorbek /types/rx-angular/ @mickdelaney /types/rx-core/ @Igorbek @mizunashi-mana @@ -3448,7 +3744,7 @@ /types/saml20/ @HackerUndKoch /types/samlp/ @horiuchi /types/sammy/ @borisyankov @oising -/types/sanctuary/ @davidchambers @cortopy +/types/sanctuary/ @davidchambers @cortopy @piq9117 /types/sandboxed-module/ @svi3c /types/sane/ @BendingBender /types/sanitize-filename/ @Nemo157 @@ -3460,6 +3756,8 @@ /types/satnav/ @DotNetNerd /types/saywhen/ @SeanSobey /types/scalike/ @ryoppy +/types/schema-registry/ @bonzzy +/types/schwifty/ @ozum /types/screenfull/ @icholy @lionelb @joelshepherd /types/screeps/ @MarkoSulamagi @NhanHo @bryanbecker @resir014 @Arcath @apemanzilla /types/screeps-profiler/ @ramblurr @@ -3472,9 +3770,13 @@ /types/scryptsy/ @micksatana /types/seamless/ @danmana /types/seamless-immutable/ @alex3165 @xsburg @geirsagberg +/types/secp256k1/ @anler +/types/seed-random/ @l-jonas +/types/seededshuffle/ @urish /types/seedrandom/ @kernhanda /types/segment-analytics/ @fongandrew -/types/select2/ @borisyankov +/types/select2/v3/ @borisyankov +/types/select2/ @borisyankov @denisname /types/selectables/ @renjfk /types/selectize/ @adidahiya @naBausch /types/selenium-webdriver/v2/ @BillArmstrong @Kuniwak @cnishina @@ -3504,11 +3806,12 @@ /types/semver/ @Bartvds @BendingBender @LucianBuzzo /types/semver-compare/ @vincekovacs /types/semver-diff/ @chrismbarr +/types/semver-sort/ @LogvinovLeon /types/sencha_touch/ @brian428 /types/send/ @MikeJerred -/types/seneca/ @psnider +/types/seneca/ @psnider @kevynb /types/sequelize/v3/ @samuelneff @codeanimal @drinchev @morpheusxaut @torhal -/types/sequelize/ @samuelneff @codeanimal @drinchev @babolivier @kukoo1 @oktapodia @morpheusxaut @TitaneBoy @zjy01 @nidzov @Raigen @todd +/types/sequelize/ @samuelneff @codeanimal @drinchev @babolivier @kukoo1 @oktapodia @morpheusxaut @TitaneBoy @zjy01 @nidzov @Raigen @todd @nrschultz /types/sequelize-fixtures/ @cschwarz /types/sequencify/ @npenin /types/sequester/ @Strate @@ -3522,16 +3825,18 @@ /types/session-file-store/ @blendsdk @rokt33r /types/set-cookie-parser/ @nickp10 /types/set-value/ @DanielRosenwasser +/types/settings/ @shreyjain1994 /types/sha1/ @arcdev1 /types/shallowequal/ @seansfkelley /types/shapefile/ @DenisCarriere /types/sharedworker/ @nakakura /types/sharepoint/ @gandjustas @andrei-markeev @baywet @teroarvola @dennispg -/types/sharp/ @lith-light-g +/types/sharp/ @lith-light-g @wooseopkim /types/sheetify/ @toddself /types/shell-escape/ @nenadalm /types/shell-quote/ @jason0x43 -/types/shelljs/ @nikeee @voy +/types/shelljs/ @nikeee @voy @gkalpak @pheromonez +/types/shelljs-exec-proxy/ @qlonik /types/shimmer/ @kjin /types/shipit/ @cyrilschumacher /types/shipit-utils/ @cyrilschumacher @@ -3539,7 +3844,7 @@ /types/shortid/ @stpettersens @despairblue /types/shot/ @AJamesPhillips /types/should-sinon/ @Arylo -/types/showdown/ @cbowdon @tan9 +/types/showdown/ @cbowdon @tan9 @arielsaldana /types/shrink-ray/ @forabi /types/siema/ @Irmiz @0x6368656174 @samnau /types/siesta/ @bquarmby @@ -3553,9 +3858,10 @@ /types/simple-cw-node/ @vvakame /types/simple-lru/ @NN--- /types/simple-mock/ @leonyu -/types/simple-oauth2/ @mad-mike +/types/simple-oauth2/ @mad-mike @troy-lamerton /types/simple-peer/ @tlaziuk /types/simple-url-cache/ @a-lucas +/types/simple-websocket/ @dex4er /types/simple-xml/ @notVitaliy /types/simplebar/v1/ @gregonnet @leonard-thieu /types/simplebar/ @gregonnet @leonard-thieu @@ -3563,10 +3869,10 @@ /types/simplesmtp/ @rogierschouten /types/simplestorage.js/ @axelcostaspena @mxl /types/single-line-log/ @ffflorian -/types/sinon/ @mrbigdog2u @rationull @lumaxis @nicojs @43081j +/types/sinon/ @mrbigdog2u @rationull @lumaxis @nicojs @43081j @joshuakgoldberg /types/sinon-as-promised/ @igrayson /types/sinon-chai/ @kazimanzurrashid @jedmao -/types/sinon-chrome/ @pimterry @crimx +/types/sinon-chrome/ @pimterry @crimx @kobanyan /types/sinon-express-mock/ @jpchip @tlaziuk /types/sinon-mongoose/ @stevehipwell /types/sinon-stub-promise/ @vintem @tstackhouse @@ -3597,8 +3903,8 @@ /types/smtpapi/ @a-morales /types/snapsvg/ @lhk @mattanja @kant2002 /types/snazzy-info-window/ @milosd92 -/types/snekfetch/ @DarkerTV -/types/snoowrap/ @vitosamson +/types/snekfetch/ @DarkerTV @ShayBox @Dev-Yukine +/types/snoowrap/ @vitosamson @TheAppleFreak /types/snowboy/ @dolanmiu /types/socket.io/ @progre @divillysausages @florentpoujol @KentarouTakeda @gigi /types/socket.io-client/ @progre @divillysausages @florentpoujol @@ -3610,17 +3916,20 @@ /types/socketty/ @Nax /types/sockjs/ @pmccloghrylaing /types/sockjs-client/ @vladev @arusakov @BendingBender @renjfk +/types/solidity-parser-antlr/ @LogvinovLeon +/types/solr-client/ @liul85 /types/solution-center-communicator/ @dami-gg /types/sort-array/ @mrmlnc /types/sortablejs/ @Maw-Fox /types/soundmanager2/ @elton2048 +/types/soupbintcp/ @jewbre /types/source-list-map/ @e-cloud /types/source-map-support/ @Bartvds @jason0x43 /types/space-pen/ @vvakame /types/spark-md5/ @bastienmoulia /types/sparkly/ @BendingBender /types/sparkpost/v1/ @geoffreak -/types/sparkpost/ @geoffreak @bondz +/types/sparkpost/ @geoffreak @bondz @vvu /types/sparqljs/ @AlexeyMz /types/spatialite/ @atd-schubert /types/spdx-correct/ @jinwoo @@ -3637,8 +3946,9 @@ /types/spotify-web-playback-sdk/ @Festify @mraerino @NeoLegends /types/sprintf/ @soywiz @BendingBender /types/sprintf-js/ @jasonswearingen @BendingBender +/types/sql-bricks/ @adn05 @paleo /types/sql.js/ @Hozuki -/types/sqlite3/ @nmalaguti @dpyro +/types/sqlite3/ @nmalaguti @dpyro @BehindTheMath /types/sqlstring/ @marvinhagemeister /types/squirejs/ @bradleyayers /types/srp/ @Patman64 @@ -3652,6 +3962,7 @@ /types/stack-utils/ @BendingBender /types/stacktrace-js/ @exceptionless @pilagod /types/stale-lru-cache/ @cxcorp +/types/stampit/v2/ @koresar /types/stampit/ @koresar /types/stamplay-js-sdk/ @ridermansb /types/stat-mode/ @BendingBender @@ -3660,7 +3971,11 @@ /types/statuses/ @tkrotoff @BendingBender /types/std-mocks/ @jdxcode /types/steam/ @kant2002 +/types/steam-client/ @Slessi +/types/steam-totp/ @phenomax +/types/steamid/ @Slessi /types/steed/ @Paul-Isache +/types/stellar-sdk/ @carl-foster @tristonj /types/stemmer/ @will-ockmore /types/sticky-cluster/ @paustint /types/stompjs/ @jimic @Dr4k4n @@ -3673,7 +3988,8 @@ /types/storybook__addon-knobs/ @joscha @martynaskadisa /types/storybook__addon-links/ @joscha @jessepinho /types/storybook__addon-notes/ @joscha -/types/storybook__addon-options/ @joscha +/types/storybook__addon-options/ @joscha @simonhn +/types/storybook__addon-storyshots/ @bradleyayers /types/storybook__react/ @joscha @wapgear /types/storybook__vue/ @pntgupta /types/stream-buffers/ @Jason3S @@ -3681,9 +3997,11 @@ /types/stream-series/ @k-kagurazaka /types/stream-to-array/v0/ @Bartvds /types/stream-to-array/ @Bartvds @BendingBender +/types/stream-to-promise/ @Alorel /types/streaming-json-stringify/ @BendingBender /types/streamjs/ @erosb /types/strftime/ @cyrilschumacher +/types/strict-uri-encode/ @hoishin /types/string/ @basp /types/string-hash/ @ethanrubio /types/string-similarity/ @ragtime @@ -3693,11 +4011,12 @@ /types/strip-ansi/ @mhegazy /types/strip-bom/ @mhegazy /types/strip-json-comments/ @dmoonfire -/types/stripe/ @wjohnsto @codeanimal @sampsonjoliver @LinusU @brannon @kkamperschroer @starhoshi +/types/stripe/ @wjohnsto @codeanimal @sampsonjoliver @LinusU @brannon @kkamperschroer @starhoshi @bruun /types/stripe-checkout/ @cgwrench /types/stripe-v2/ @ejsmith @amritk @adamcmiel @jleider @galuszkak /types/stripe-v3/ @ejsmith @amritk @adamcmiel @jleider @galuszkak /types/strong-cluster-control/ @shuntksh +/types/strong-error-handler/ @blankstar85 /types/strong-log-transformer/ @azasypkin /types/strophe/ @DavidKDeutsch /types/structured-source/ @azu @@ -3705,30 +4024,36 @@ /types/stylelint/ @alan-agius4 /types/stylelint-webpack-plugin/ @bahlo /types/stylus/ @SomaticIT +/types/subscribe-ui-event/ @wangcheng678 /types/subsume/ @BendingBender /types/succinct/ @EnableSoftware /types/sudo-block/ @BendingBender /types/suitescript/ @darrenhillconsulting -/types/sumo-logger/ @forabi +/types/sumo-logger/ @forabi @clementallen /types/superagent/v2/ @varju @NicoZelaya @mxl -/types/superagent/ @NicoZelaya @mxl @paplorinc @shreyjain1994 +/types/superagent/ @NicoZelaya @mxl @paplorinc @shreyjain1994 @zopf /types/superagent-no-cache/ @mxl /types/superagent-prefix/ @mxl /types/supercluster/ @DenisCarriere /types/supertest/ @varju /types/supertest-as-promised/ @tkrotoff -/types/supports-color/ @mgroenhoff +/types/supports-color/v3/ @mgroenhoff +/types/supports-color/ @mgroenhoff @mtraynham /types/svg-injector/ @poke /types/svg-parser/ @mrmlnc +/types/svg-path-bounding-box/ @NotWoods /types/svg-sprite/ @tkqubo /types/svg2png/ @hansrwindhoff @sccgithub /types/svg4everybody/ @BendingBender /types/svgjs.draggable/ @LiFeleSs /types/svgjs.resize/ @jkevingutierrez -/types/svgo/ @bradleyayers @giladgray +/types/svgo/ @bradleyayers @giladgray @Aankhen +/types/sw-precache/ @JounQin +/types/sw-precache-webpack-plugin/ @JounQin /types/swag/ @shiwano /types/swagger-express-middleware/ @alexandreroba /types/swagger-express-mw/ @micmro +/types/swagger-express-validator/ @pinguet62 /types/swagger-hapi/ @micmro /types/swagger-jsdoc/ @drGrove /types/swagger-node-runner/ @micmro @@ -3738,12 +4063,14 @@ /types/swagger-schema-official/ @mohsen1 @bsouthga @nimerritt /types/swagger-tools/ @bricka /types/swaggerize-express/ @mugeso @nickmorton +/types/swe-validation/ @hjalmers /types/swfobject/ @rou /types/swiftclick/ @Laurence-C /types/swig/ @CodeAnimal @soywiz /types/swig-email-templates/ @mrhen @micksatana /types/swipe/ @kant2002 -/types/swiper/ @sgaliano @lucax88x +/types/swiper/v3/ @sgaliano @lucax88x +/types/swiper/ @sgaliano @lucax88x @ematseruk /types/swipeview/ @borisyankov /types/switchery/ @bgrieder @claylaut /types/swiz/ @jedigo @@ -3752,13 +4079,17 @@ /types/systeminformation/ @PixelcrabAT /types/systemjs/ @ludohenin @NathanWalker @GiedriusGrabauskas @aluanhaddad /types/table/ @evanshortiss @mrmlnc +/types/tableau/ @protip /types/tabris-plugin-firebase/ @eclipsesource /types/tabtab/ @vojtechhabarta /types/tabulator/ @euginio +/types/tail/ @spacejack +/types/tapable/v0/ @e-cloud /types/tapable/ @e-cloud /types/tape/ @Bartvds @sodatea @DennisSchwartz @mikehenrty /types/tar/ @SomaticIT @connor4312 /types/tar-fs/ @Umoxfo +/types/tar-stream/ @glicht /types/tcp-ping/ @stegano /types/tedious/ @rogierschouten @cjthompson /types/tedious-connection-pool/ @sandorfr @@ -3775,7 +4106,9 @@ /types/text-buffer/ @GlenCFL /types/text-encoding/ @pine613 /types/text-encoding-utf-8/ @trxcllnt -/types/three/ @gyohk @florentpoujol @SereznoKot @omni360 @ivoisbelongtous @piranha771 @qszhusightp @nakakura @s093294 @Pro @efokschaner @PsychoSTS @dhritzkiv @apurvaojas +/types/text-table/ @saadq +/types/textarea-caret/ @shiftkey +/types/three/ @gyohk @florentpoujol @SereznoKot @omni360 @ivoisbelongtous @piranha771 @qszhusightp @nakakura @s093294 @Pro @efokschaner @PsychoSTS @dhritzkiv @apurvaojas @NotWoods @sethk /types/thrift/ @kamek-pf @kevin-greene-ck @jessezhang91 /types/throng/ @cyrilschumacher @tatethurston /types/throttle/ @BendingBender @@ -3792,10 +4125,11 @@ /types/timer-machine/ @dolanmiu /types/timezone-js/ @bonnici /types/tinder/ @pingec +/types/tiny-slider-react/ @screendriver /types/tinycolor2/ @M-Zuber @geertjansen @nvh /types/tinycopy/ @vvatanabe /types/tinymce/ @martinduparc @ipoul @nicohartto -/types/titanium/ @cyounkins +/types/titanium/ @appcelerator @janvennemann /types/title/ @fa7ad /types/tldjs/ @geoffreak /types/tmp/ @optical @Perlmint @@ -3805,29 +4139,37 @@ /types/to-title-case-gouch/ @stpettersens /types/toastr/ @borisyankov /types/tocktimer/ @evanshortiss +/types/tokgen/ @l-jonas +/types/toobusy-js/ @atd-schubert /types/tooltipster/ @stephenlautier @pjmagee @VorobeY1326 @leonard-thieu @janhi @joeskeen -/types/topojson/ @ricardo-mello @chenzhutian +/types/topojson/ @ricardo-mello @chenzhutian @denisname +/types/topojson-client/ @denisname @ricardo-mello +/types/topojson-simplify/ @denisname @ricardo-mello +/types/topojson-specification/ @denisname /types/torrent-stream/ @xstoudi /types/touch/ @mizunashi-mana @BendingBender /types/touch-events/ @kevinb7 -/types/tough-cookie/ @leonard-thieu @LiJinyao +/types/tough-cookie/ @leonard-thieu @LiJinyao @no2chem /types/traceback/ @misak113 /types/tracking/ @pimterry /types/transducers-js/ @colinkahn @dphilipson @NaridaL /types/transducers.js/ @dphilipson -/types/trash/ @matthew-matvei +/types/transliteration/ @tony19 +/types/trash/ @matthew-matvei @hoishin /types/traverse/ @newclear /types/traverson/ @marcinporebski +/types/travis-fold/ @andy-ms /types/trayballoon/ @korve /types/tress/ @sindilevich /types/trim/ @skysteve /types/trunk8/ @niemyjski +/types/tryer/ @bengry /types/tspromise/ @soywiz /types/tunnel/ @BendingBender /types/tus-js-client/ @kevhiggins /types/tv4/ @Bartvds @psnider /types/tween.js/ @Amos47 @sunetos @jzarnikov @alexburner -/types/tweenjs/ @evilangelist +/types/tweenjs/ @evilangelist @jcyuan /types/tweezer.js/ @praxxis /types/twig/ @soywiz @enko /types/twilio/ @nickiannone @ashleybrener @@ -3842,14 +4184,17 @@ /types/type-is/ @BendingBender /types/type-name/ @armorik83 /types/typeahead/ @igochkov @gjunge +/types/typed.js/ @Dona278 /types/typedarray-pool/ @pawsong /types/typeof/ @OpenByteDev /types/typescript-deferred/ @DirtyHairy /types/tz-format/ @samverschueren /types/ua-parser-js/ @superduper @legendecas @MeLlamoPablo -/types/uglify-js/ @tkrotoff +/types/uglify-js/v2/ @tkrotoff +/types/uglify-js/ @alan-agius4 @tkrotoff /types/uglifycss/ @blendsdk -/types/ui-grid/ @btesser @joeskeen +/types/uglifyjs-webpack-plugin/ @vajkayrene +/types/ui-grid/ @btesser @joeskeen @pbojanczyk /types/ui-router-extras/ @mputters @marcel-k @LaserUnicorns /types/ui-select/ @nkovacic /types/uid-safe/ @geoffreak @@ -3858,7 +4203,7 @@ /types/ultra-strftime/ @dex4er /types/umbraco/ @DeCareSystemsIreland /types/umd/ @TeamworkGuy2 -/types/umzug/ @drinchev @mlamp +/types/umzug/ @drinchev @mlamp @trodi /types/underscore/ @borisyankov @jbaldwin @ccurrens @clottman /types/underscore-ko/ @MagicMau /types/underscore.string/ @rygine @@ -3876,9 +4221,9 @@ /types/untildify/ @BendingBender /types/unused-filename/ @BendingBender /types/unzip/ @coding2012 -/types/unzipper/ @s73obrien +/types/unzipper/ @s73obrien @natemara /types/update-notifier/v1/ @vvakame @nchen63 -/types/update-notifier/ @vvakame @nchen63 +/types/update-notifier/ @vvakame @nchen63 @bitjson /types/upng-js/ @plantain-00 /types/uppercamelcase/ @plantain-00 /types/urbanairship-cordova/ @Justin-Credible @@ -3888,8 +4233,10 @@ /types/url-assembler/ @wolfgang42 /types/url-join/ @rogierschouten @devrelm /types/url-metadata/ @mrkmg +/types/url-params/ @danielsogl /types/url-parse/ @ChernenkoPaul /types/url-regex/ @unindented +/types/url-safe-base64/ @johngeorgewright /types/url-search-params/ @nick121212 @nrathi /types/url-template/ @marcinporebski /types/urllib/ @sorayama @@ -3909,13 +4256,13 @@ /types/uuid-1345/ @mugeso /types/uuid-js/ @mhegazy /types/uuid-validate/ @HiromiShikata -/types/uws/ @plantain-00 +/types/uws/ @plantain-00 @orblazer /types/valdr/ @ilbertz /types/valdr-message/ @ilbertz /types/valerie/ @conficient /types/vali-date/ @SamVerschueren /types/valid-url/ @stevehipwell -/types/validator/ @tgfjt @chrootsu @IOAyman @louy @kacepe @deptno +/types/validator/ @tgfjt @chrootsu @IOAyman @louy @kacepe @deptno @builtinnya @qqilihq /types/validatorjs/ @LKay @danmana /types/vanilla-modal/ @samnau /types/vanilla-tilt/ @BrunnerLivio @@ -3932,7 +4279,7 @@ /types/vfile/ @bizen241 @rokt33r /types/vfile-location/ @ikatyang /types/victory/ @asvetliakov @snerks @Havret -/types/video.js/ @vbortone @scleriot @SWBennett06 @IgelCampus +/types/video.js/ @vbortone @scleriot @SWBennett06 @IgelCampus @giofreitas /types/viewability-helper/ @lironzluf /types/viewerjs/ @lrh3321 /types/viewporter/ @borisyankov @@ -3957,12 +4304,14 @@ /types/voronoi-diagram/ @michaelneu /types/vortex-web-client/ @Pro /types/voximplant-websdk/ @aylarov +/types/vue-markdown/ @neodon /types/vue-resource/ @kaorun343 /types/vue-scrollto/ @vincekovacs /types/vuex-i18n/ @jaeggerr /types/w2ui/ @Ptival /types/w3c-generic-sensor/ @kenchris /types/w3c-image-capture/ @cosium +/types/w3c-permissions/ @jberube /types/w3c-screen-orientation/ @kenchris /types/w3c-web-usb/ @larsgk /types/waitme/ @totpero @@ -3987,12 +4336,14 @@ /types/webcl/ @NCARalph /types/webcomponents.js/ @adidahiya /types/webcrypto/ @iislucas -/types/webdriverio/ @nmalaguti @timbru31 @fsmedberg-tc @tanvirislam06 +/types/webdriverio/ @nmalaguti @timbru31 @fsmedberg-tc @tanvirislam06 @phil-lgr /types/webfontloader/ @doskallemaskin /types/webgl-ext/ @zenmumbler -/types/webgl2/ @nkemnitz +/types/webgl2/ @nkemnitz @karhu +/types/webidl2/ @saschanaz /types/webmidi/ @lostfictions -/types/webpack/ @tkqubo @bumbleblym @bcherny @tommytroylin @mohsen1 @jcreamer898 @ahmed-taj @alan-agius4 @elliottsj @jason0x43 +/types/webpack/v3/ @tkqubo @bumbleblym @bcherny @tommytroylin @mohsen1 @jcreamer898 @ahmed-taj @alan-agius4 @elliottsj @jason0x43 @christophehurpeau +/types/webpack/ @tkqubo @bumbleblym @bcherny @tommytroylin @mohsen1 @jcreamer898 @ahmed-taj @alan-agius4 @elliottsj @jason0x43 @dennispg @christophehurpeau /types/webpack-bundle-analyzer/ @kryops /types/webpack-chain/ @eirikurn @psachs21 /types/webpack-chunk-hash/ @mtraynham @@ -4017,12 +4368,14 @@ /types/webspeechapi/ @saschanaz /types/websql/ @TeamworkGuy2 /types/webtorrent/ @niieani @tlaziuk -/types/webvr-api/ @lostfictions +/types/webvr-api/ @efokschaner /types/week/ @sindrenm /types/weighted/ @ccitro -/types/weixin-app/ @taoqf +/types/weixin-app/ @taoqf @AlexStacker /types/wellknown/ @yairtawil -/types/whatwg-streams/ @saschanaz +/types/whatwg-mimetype/ @petejohanson +/types/whatwg-streams/ @saschanaz @ksm2 +/types/whatwg-url/ @aomarks /types/wheel/ @BTOdell /types/when/ @derekcicerone @Nemo157 /types/which/ @vvakame @cspotcode @@ -4031,6 +4384,7 @@ /types/window-or-global/ @vvakame /types/window-size/ @pmkary /types/windows-1251/ @RomanGolovanov +/types/windows-script-host/ @zspitz /types/windows-service/ @rogierschouten /types/winjs/v1/ @adamhewitt627 @craigktreasure @xirzec /types/winjs/v2/ @adamhewitt627 @craigktreasure @xirzec @@ -4039,19 +4393,24 @@ /types/winrt-uwp/ @saschanaz @taylor224 /types/winston/ @bonnici @codeanimal @DABH /types/winston-dynamodb/ @nickiannone +/types/winston-syslog/ @cjbarth /types/wiring-pi/ @NoHomey /types/wnumb/ @acoreyj /types/wonder.js/ @yyc-git /types/word-list-json/ @dovidm /types/wordcloud/ @joeskeen /types/words-to-numbers/ @James-Frowen +/types/wpapi/ @guoyunhe +/types/wrap-ansi/v2/ @kayahr /types/wrap-ansi/ @kayahr -/types/wreck/ @marcinporebski +/types/wreck/v7/ @marcinporebski +/types/wreck/ @marcinporebski @saboya /types/wrench/ @soywiz /types/write-file-atomic/ @BendingBender +/types/write-file-atomically/ @Aankhen /types/write-json-file/ @DenisCarriere /types/write-pkg/ @azasypkin -/types/ws/ @loyd @elithrar @mlamp @TitaneBoy +/types/ws/ @loyd @elithrar @mlamp @TitaneBoy @orblazer /types/wtfnode/ @dex4er /types/wu/ @phiresky /types/wx-js-sdk-dt/ @agasbzj @@ -4086,6 +4445,7 @@ /types/yargs/ @poelstra @mizunashi-mana @pushplay @jeffkenney @JimiC /types/yauzl/ @ffflorian /types/yayson/ @Codesleuth +/types/yazl/ @taoqf /types/ydn-db/ @yathit @gabrielmaldi /types/yeoman-generator/ @armorik83 @janslow @ikatyang /types/yeoman-test/ @ikatyang @@ -4096,9 +4456,10 @@ /types/youtube/ @DazWilkin @JoshuaKGoldberg @eliotfallon213 /types/youtube-dl/ @bsurai /types/yui/ @giabao -/types/yup/ @dhardtke @vtserman @MoretonBayRC +/types/yup/ @dhardtke @vtserman @MoretonBayRC @sseppola /types/z-schema/ @pgonzal /types/zapier-platform-core/ @bradleyayers +/types/zeit__next-typescript/ @icopp /types/zen-observable/ @aicest /types/zen-push/ @daprahamian /types/zenscroll/ @HamedFathi @@ -4114,5 +4475,6 @@ /types/zipkin-transport-http/ @plantain-00 /types/zmq/ @davemckeown /types/zookeeper/ @xialeistudio +/types/zopflipng-bin/ @hikoma /types/zui/ @yuanxu /types/zxcvbn/ @mtraynham diff --git a/.github/PULL_REQUEST_TEMPLATE.md b/.github/PULL_REQUEST_TEMPLATE.md index 79793c16c1..b1a1039f82 100644 --- a/.github/PULL_REQUEST_TEMPLATE.md +++ b/.github/PULL_REQUEST_TEMPLATE.md @@ -10,7 +10,7 @@ Please fill in this template. Select one of these and delete the others: If adding a new definition: -- [ ] The package does not provide its own types, and you can not add them. +- [ ] The package does not already provide its own types, or cannot have its `.d.ts` files generated via `--declaration` - [ ] If this is for an NPM package, match the name. If not, do not conflict with the name of an NPM package. - [ ] Create it with `dts-gen --dt`, not by basing it on an existing project. - [ ] `tslint.json` should be present, and `tsconfig.json` should have `noImplicitAny`, `noImplicitThis`, `strictNullChecks`, and `strictFunctionTypes` set to `true`. diff --git a/.gitignore b/.gitignore index c8e25cec8d..ac63b6f6b5 100644 --- a/.gitignore +++ b/.gitignore @@ -49,3 +49,6 @@ npm-debug.log # yarn yarn.lock + +# pnpm +shrinkwrap.yaml diff --git a/README.es.md b/README.es.md index ce94bb0298..c3cff967db 100644 --- a/README.es.md +++ b/README.es.md @@ -87,6 +87,7 @@ Primero, haz un [fork](https://guides.github.com/activities/forking/) en este re * `cd types/my-package-to-edit` * Haz cambios. Recuerda editar las pruebas. + Si realiza cambios importantes, no olvide [actualizar una versión principal](#quiero-actualizar-un-paquete-a-una-nueva-versión-principal). * También puede que quieras añadirte la sección "Definitions by" en el encabezado del paquete. - Esto hará que seas notificado (a través de tu nombre de usuario en GitHub) cada vez que alguien haga un pull request o issue sobre el paquete. - Haz esto añadiendo tu nombre al final de la línea, así como en `// Definitions by: Alice , Bob `. diff --git a/README.md b/README.md index cc59284394..8e582f05b4 100644 --- a/README.md +++ b/README.md @@ -87,6 +87,7 @@ First, [fork](https://guides.github.com/activities/forking/) this repository, in * `cd types/my-package-to-edit` * Make changes. Remember to edit tests. + If you make breaking changes, do not forget to [update a major version](#i-want-to-update-a-package-to-a-new-major-version). * You may also want to add yourself to "Definitions by" section of the package header. - This will cause you to be notified (via your GitHub username) whenever someone makes a pull request or issue about the package. - Do this by adding your name to the end of the line, as in `// Definitions by: Alice , Bob `. @@ -105,7 +106,7 @@ If it doesn't, you can do so yourself in the comment associated with the PR. #### Create a new package -If you are the library author, or can make a pull request to the library, [bundle types](http://www.typescriptlang.org/docs/handbook/declaration-files/publishing.html) instead of publishing to DefinitelyTyped. +If you are the library author and your package is written in TypeScript, [bundle the autogenerated declaration files](http://www.typescriptlang.org/docs/handbook/declaration-files/publishing.html) in your package instead of publishing to DefinitelyTyped. If you are adding typings for an NPM package, create a directory with the same name. If the package you are adding typings for is not on NPM, make sure the name you choose for it does not conflict with the name of a package on NPM. @@ -120,7 +121,7 @@ Your package should have this structure: | tsconfig.json | This allows you to run `tsc` within the package. | | tslint.json | Enables linting. | -Generate these by running `npm install -g dts-gen` and `dts-gen --dt --name my-package-name --template module`. +Generate these by running `npx dts-gen --dt --name my-package-name --template module` if you have npm ≥ 5.2.0, `npm install -g dts-gen` and `dts-gen --dt --name my-package-name --template module` otherwise. See all options at [dts-gen](https://github.com/Microsoft/dts-gen). You may edit the `tsconfig.json` to add new files, to add `"target": "es6"` (needed for async functions), to add to `"lib"`, or to add the `"jsx"` compiler option. @@ -239,7 +240,8 @@ If types are part of a web standard, they should be contributed to [TSJS-lib-gen #### A package uses `export =`, but I prefer to use default imports. Can I change `export =` to `export default`? -If default imports work in your environment, consider turning on the [`--allowSyntheticDefaultImports`](http://www.typescriptlang.org/docs/handbook/compiler-options.html) compiler option. +If you are using TypeScript 2.7 or later, use `--esModuleInterop` in your project. +Otherwise, if default imports work in your environment (e.g. Webpack, SystemJS, esm), consider turning on the [`--allowSyntheticDefaultImports`](http://www.typescriptlang.org/docs/handbook/compiler-options.html) compiler option. Do not change the type definition if it is accurate. For an NPM package, `export =` is accurate if `node -p 'require("foo")'` is the export, and `export default` is accurate if `node -p 'require("foo").default'` is the export. diff --git a/glue/index.d.ts b/glue/index.d.ts deleted file mode 100644 index 5f40ba924b..0000000000 --- a/glue/index.d.ts +++ /dev/null @@ -1,35 +0,0 @@ -// Type definitions for glue -// Project: https://github.com/hapijs/glue -// Definitions by: Gareth Parker -// Definitions: https://github.com/DefinitelyTyped/DefinitelyTyped -// TypeScript Version: 2.7 - -declare module "glue" { - - import { Server, ServerOptions } from "hapi"; - - export interface Options { - relativeTo: string; - preConnections?: (Server:Server, next:(err:any)=>void ) => void; - preRegister?: (Server:Server, next:(err:any)=>void ) => void; - } - - interface Plugin { - plugin: string | { - register:string; - options?:any; - }; - options?: any; - routes?: any - } - - interface Manifest { - server: ServerOptions; - register?: { - plugins: Array - } - } - - export function compose(manifest: Manifest, options?: Options): Server; - -} diff --git a/notNeededPackages.json b/notNeededPackages.json index 8c587f7c43..f3dc9ef37f 100644 --- a/notNeededPackages.json +++ b/notNeededPackages.json @@ -124,7 +124,7 @@ "libraryName": "axe-core", "typingsPackageName": "axe-core", "sourceRepoURL": "https://github.com/dequelabs/axe-core", - "asOfVersion": "2.0.7" + "asOfVersion": "3.0.3" }, { "libraryName": "axios", @@ -174,7 +174,7 @@ "sourceRepoURL": "https://github.com/MikeMcl/bignumber.js/", "asOfVersion": "5.0.0" }, - { + { "libraryName": "bingmaps", "typingsPackageName": "bingmaps", "sourceRepoURL": "https://github.com/Microsoft/Bing-Maps-V8-TypeScript-Definitions", @@ -210,6 +210,12 @@ "sourceRepoURL": "https://github.com/blakeembrey/camel-case", "asOfVersion": "1.2.1" }, + { + "libraryName": "catalog", + "typingsPackageName": "catalog", + "sourceRepoURL": "https://github.com/interactivethings/catalog", + "asOfVersion": "3.5.0" + }, { "libraryName": "chalk", "typingsPackageName": "chalk", @@ -234,6 +240,12 @@ "sourceRepoURL": "https://github.com/saltyrtc/chunked-dc-js", "asOfVersion": "0.2.2" }, + { + "libraryName": "colors.js (colors)", + "typingsPackageName": "colors", + "sourceRepoURL": "https://github.com/Marak/colors.js", + "asOfVersion": "1.2.1" + }, { "libraryName": "commander", "typingsPackageName": "commander", @@ -648,6 +660,12 @@ "sourceRepoURL": "https://github.com/ashtuchkin/iconv-lite", "asOfVersion": "0.4.14" }, + { + "libraryName": "ids", + "typingsPackageName": "ids", + "sourceRepoURL": "https://github.com/bpmn-io/ids", + "asOfVersion": "0.2.2" + }, { "libraryName": "immutability-helper", "typingsPackageName": "immutability-helper", @@ -990,12 +1008,6 @@ "sourceRepoURL": "https://github.com/blakeembrey/param-case", "asOfVersion": "1.1.2" }, - { - "libraryName": "parse5", - "typingsPackageName": "parse5", - "sourceRepoURL": "https://github.com/inikulin/parse5", - "asOfVersion": "3.0.0" - }, { "libraryName": "pascal-case", "typingsPackageName": "pascal-case", @@ -1140,6 +1152,18 @@ "sourceRepoURL": "https://github.com/react-ga/react-ga", "asOfVersion": "2.3.0" }, + { + "libraryName": "react-monaco-editor", + "typingsPackageName": "react-monaco-editor", + "sourceRepoURL": "https://github.com/superRaytin/react-monaco-editor", + "asOfVersion": "0.16.0" + }, + { + "libraryName": "react-native-collapsible", + "typingsPackageName": "react-native-collapsible", + "sourceRepoURL": "https://github.com/oblador/react-native-collapsible", + "asOfVersion": "0.11.0" + }, { "libraryName": "react-native-elements", "typingsPackageName": "react-native-elements", @@ -1158,6 +1182,12 @@ "sourceRepoURL": "https://github.com/idehub/react-native-google-analytics-bridge", "asOfVersion": "5.3.3" }, + { + "libraryName": "react-native-linear-gradient", + "typingsPackageName": "react-native-linear-gradient", + "sourceRepoURL": "https://github.com/react-native-community/react-native-linear-gradient", + "asOfVersion": "2.4.0" + }, { "libraryName": "react-native-modal", "typingsPackageName": "react-native-modal", @@ -1266,6 +1296,12 @@ "sourceRepoURL": "https://github.com/router5/router5", "asOfVersion": "5.0.0" }, + { + "libraryName": "rrule", + "typingsPackageName": "rrule", + "sourceRepoURL": "https://github.com/jakubroztocil/rrule", + "asOfVersion": "2.2.9" + }, { "libraryName": "rvo2", "typingsPackageName": "rvo2", diff --git a/package.json b/package.json index db67595b77..c5b1b03057 100644 --- a/package.json +++ b/package.json @@ -1,27 +1,27 @@ { - "private": true, - "name": "definitely-typed", - "version": "0.0.1", - "homepage": "https://github.com/DefinitelyTyped/DefinitelyTyped", - "repository": { - "type": "git", - "url": "git+https://github.com/DefinitelyTyped/DefinitelyTyped.git" - }, - "license": "MIT", - "bugs": { - "url": "https://github.com/DefinitelyTyped/DefinitelyTyped/issues" - }, - "engines": { - "node": ">=7.8.0" - }, - "scripts": { - "compile-scripts": "tsc -p scripts", - "not-needed": "node scripts/not-needed.js", - "test": "node node_modules/types-publisher/bin/tester/test.js --run-from-definitely-typed", - "lint": "dtslint types" - }, - "devDependencies": { - "dtslint": "github:Microsoft/dtslint#production", - "types-publisher": "Microsoft/types-publisher#production" - } + "private": true, + "name": "definitely-typed", + "version": "0.0.2", + "homepage": "https://github.com/DefinitelyTyped/DefinitelyTyped", + "repository": { + "type": "git", + "url": "git+https://github.com/DefinitelyTyped/DefinitelyTyped.git" + }, + "license": "MIT", + "bugs": { + "url": "https://github.com/DefinitelyTyped/DefinitelyTyped/issues" + }, + "engines": { + "node": ">=7.8.0" + }, + "scripts": { + "compile-scripts": "tsc -p scripts", + "not-needed": "node scripts/not-needed.js", + "test": "node node_modules/types-publisher/bin/tester/test.js --run-from-definitely-typed", + "lint": "dtslint types" + }, + "devDependencies": { + "dtslint": "github:Microsoft/dtslint#production", + "types-publisher": "Microsoft/types-publisher#production" + } } diff --git a/types/a-big-triangle/a-big-triangle-tests.ts b/types/a-big-triangle/a-big-triangle-tests.ts new file mode 100644 index 0000000000..75198e8690 --- /dev/null +++ b/types/a-big-triangle/a-big-triangle-tests.ts @@ -0,0 +1,5 @@ +import drawTriangle = require("a-big-triangle"); + +const gl = new WebGLRenderingContext(); + +drawTriangle(gl); // $ExpectType void diff --git a/types/a-big-triangle/index.d.ts b/types/a-big-triangle/index.d.ts new file mode 100644 index 0000000000..6e397cfa7e --- /dev/null +++ b/types/a-big-triangle/index.d.ts @@ -0,0 +1,8 @@ +// Type definitions for a-big-triangle 1.0 +// Project: https://github.com/mikolalysenko/a-big-triangle +// Definitions by: Mathias Paumgarten +// Definitions: https://github.com/DefinitelyTyped/DefinitelyTyped + +declare function createABigTriangle(gl: WebGLRenderingContext): void; + +export = createABigTriangle; diff --git a/types/a-big-triangle/tsconfig.json b/types/a-big-triangle/tsconfig.json new file mode 100644 index 0000000000..c85f12fe20 --- /dev/null +++ b/types/a-big-triangle/tsconfig.json @@ -0,0 +1,24 @@ +{ + "files": [ + "index.d.ts", + "a-big-triangle-tests.ts" + ], + "compilerOptions": { + "module": "commonjs", + "lib": [ + "es6", + "dom" + ], + "noImplicitAny": true, + "noImplicitThis": true, + "strictNullChecks": true, + "strictFunctionTypes": true, + "baseUrl": "../", + "typeRoots": [ + "../" + ], + "types": [], + "noEmit": true, + "forceConsistentCasingInFileNames": true + } +} diff --git a/types/a-big-triangle/tslint.json b/types/a-big-triangle/tslint.json new file mode 100644 index 0000000000..f93cf8562a --- /dev/null +++ b/types/a-big-triangle/tslint.json @@ -0,0 +1,3 @@ +{ + "extends": "dtslint/dt.json" +} diff --git a/types/accept-language-parser/accept-language-parser-tests.ts b/types/accept-language-parser/accept-language-parser-tests.ts index b137df02e4..586a31cb93 100644 --- a/types/accept-language-parser/accept-language-parser-tests.ts +++ b/types/accept-language-parser/accept-language-parser-tests.ts @@ -1,4 +1,4 @@ -// https://github.com/opentable/accept-language-parser/blob/v1.4.1/index.js +// https://github.com/opentable/accept-language-parser/blob/v1.5.0/index.js import * as AcceptLanguageParser from 'accept-language-parser'; @@ -23,3 +23,9 @@ const l3: AcceptLanguageParser.Language = { const parsed1: AcceptLanguageParser.Language[] = AcceptLanguageParser.parse(''); const pick1: string | null = AcceptLanguageParser.pick([''], ''); const pick2: string | null = AcceptLanguageParser.pick([''], [l1, l2, l3]); +const pick3: string | null = AcceptLanguageParser.pick([''], '', {}); +const pick4: string | null = AcceptLanguageParser.pick([''], '', { loose: true }); + +const pickOptions: AcceptLanguageParser.PickOptions = { + loose: true +}; diff --git a/types/accept-language-parser/index.d.ts b/types/accept-language-parser/index.d.ts index 16d003648c..c47969c940 100644 --- a/types/accept-language-parser/index.d.ts +++ b/types/accept-language-parser/index.d.ts @@ -1,4 +1,4 @@ -// Type definitions for accept-language-parser 1.4 +// Type definitions for accept-language-parser 1.5 // Project: https://github.com/opentable/accept-language-parser // Definitions by: Niklas Wulf // Definitions: https://github.com/DefinitelyTyped/DefinitelyTyped @@ -7,7 +7,11 @@ // https://github.com/opentable/accept-language-parser/blob/v1.4.1/index.js export function parse(acceptLanguage: string): Language[]; -export function pick(supportedLanguages: string[], acceptLanguage: string | Language[]): string | null; +export function pick( + supportedLanguages: string[], + acceptLanguage: string | Language[], + options?: PickOptions +): string | null; export interface Language { code: string; @@ -15,3 +19,7 @@ export interface Language { region?: string; quality: number; } + +export interface PickOptions { + loose?: boolean; +} diff --git a/types/ace-diff/ace-diff-tests.ts b/types/ace-diff/ace-diff-tests.ts new file mode 100644 index 0000000000..52e64589a3 --- /dev/null +++ b/types/ace-diff/ace-diff-tests.ts @@ -0,0 +1,22 @@ +import AceDiff = require('ace-diff'); + +new AceDiff(); // $ExpectError + +const aceDiffConstructorOpts = { + element: '.acediff', + left: { content: 'left content' }, + right: { content: 'right content' }, +}; +new AceDiff(aceDiffConstructorOpts); // $ExpectType AceDiff + +const differ = new AceDiff(aceDiffConstructorOpts); + +differ.getEditors(); // $ExpectType { left: any; right: any; } +differ.setOptions(); // $ExpectError +const aceDiffOpts = { + diffGranularity: 'broad' as 'broad', // workaround: cast to avoid https://github.com/Microsoft/TypeScript/issues/11465#issuecomment-252453037 +}; +differ.setOptions(aceDiffOpts); // $ExpectType void +differ.getNumDiffs(); // $ExpectType number +differ.diff(); // $ExpectType void +differ.destroy(); // $ExpectType void diff --git a/types/ace-diff/index.d.ts b/types/ace-diff/index.d.ts new file mode 100644 index 0000000000..b59b3d25e2 --- /dev/null +++ b/types/ace-diff/index.d.ts @@ -0,0 +1,52 @@ +// Type definitions for ace-diff 2.1 +// Project: https://ace-diff.github.io/ace-diff/ +// Definitions by: Mike Dodge +// Definitions: https://github.com/DefinitelyTyped/DefinitelyTyped + +export as namespace AceDiff; + +export = AceDiff; + +declare class AceDiff { + constructor(opts: AceDiff.AceDiffConstructorOpts); + getEditors(): { + left: any; + right: any; + }; + setOptions(options: AceDiff.AceDiffOpts): void; + getNumDiffs(): number; + diff(): void; + destroy(): void; +} +declare namespace AceDiff { + interface AceDiffLROpts { + content?: string | null; + mode?: string; + theme?: string; + editable?: boolean; + copyLinkEnabled?: boolean; + } + + interface AceDiffConstructorOpts extends AceDiffOpts { + element: string | HTMLElement; + left: AceDiffLROpts; + right: AceDiffLROpts; + } + + interface AceDiffOpts { + mode?: string; + theme?: string; + diffGranularity?: 'specific' | 'broad'; + showDiffs?: boolean; + showConnectors?: boolean; + maxDiffs?: number; + left?: AceDiffLROpts; + right?: AceDiffLROpts; + classes?: { + diff: string; + connector: string; + newCodeConnectorLinkContent: string; + deletedCodeConnectorLinkContent: string; + }; + } +} diff --git a/types/ace-diff/tsconfig.json b/types/ace-diff/tsconfig.json new file mode 100644 index 0000000000..00fb70bbcd --- /dev/null +++ b/types/ace-diff/tsconfig.json @@ -0,0 +1,24 @@ +{ + "compilerOptions": { + "module": "commonjs", + "lib": [ + "es6", + "dom" + ], + "noImplicitAny": true, + "noImplicitThis": true, + "strictNullChecks": true, + "strictFunctionTypes": true, + "baseUrl": "../", + "typeRoots": [ + "../" + ], + "types": [], + "noEmit": true, + "forceConsistentCasingInFileNames": true + }, + "files": [ + "index.d.ts", + "ace-diff-tests.ts" + ] +} diff --git a/types/colors/tslint.json b/types/ace-diff/tslint.json similarity index 100% rename from types/colors/tslint.json rename to types/ace-diff/tslint.json diff --git a/types/ace/index.d.ts b/types/ace/index.d.ts index 1f7dd9752b..828aab87c2 100644 --- a/types/ace/index.d.ts +++ b/types/ace/index.d.ts @@ -101,6 +101,29 @@ declare namespace AceAjax { transformAction(state: any, action: any, editor: any, session: any, param: any): any; } + export interface OptionProvider { + + /** + * Sets a Configuration Option + **/ + setOption(optionName: string, optionValue: any): void; + + /** + * Sets Configuration Options + **/ + setOptions(keyValueTuples: any): void; + + /** + * Get a Configuration Option + **/ + getOption(name: string):any; + + /** + * Get Configuration Options + **/ + getOptions():any; + } + //////////////// /// Ace //////////////// @@ -495,7 +518,7 @@ declare namespace AceAjax { * Stores all the data about [[Editor `Editor`]] state providing easy way to change editors state. * `EditSession` can be attached to only one [[Document `Document`]]. Same `Document` can be attached to several `EditSession`s. **/ - export interface IEditSession { + export interface IEditSession extends OptionProvider { selection: Selection; @@ -1074,7 +1097,7 @@ declare namespace AceAjax { * The `Editor` manages the [[EditSession]] (which manages [[Document]]s), as well as the [[VirtualRenderer]], which draws everything to the screen. * Event sessions dealing with the mouse and keyboard are bubbled up from `Document` to the `Editor`, which decides what to do with them. **/ - export interface Editor { + export interface Editor extends OptionProvider { on(ev: string, callback: (e: any) => any): void; @@ -1113,26 +1136,6 @@ declare namespace AceAjax { execCommand(command:string, args?: any): void; - /** - * Sets a Configuration Option - **/ - setOption(optionName: any, optionValue: any): void; - - /** - * Sets Configuration Options - **/ - setOptions(keyValueTuples: any): void; - - /** - * Get a Configuration Option - **/ - getOption(name: any):any; - - /** - * Get Configuration Options - **/ - getOptions():any; - /** * Get rid of console warning by setting this to Infinity **/ @@ -2692,7 +2695,7 @@ declare namespace AceAjax { /** * The class that is responsible for drawing everything you see on the screen! **/ - export interface VirtualRenderer { + export interface VirtualRenderer extends OptionProvider { scroller: any; @@ -3036,6 +3039,37 @@ declare namespace AceAjax { **/ new(container: HTMLElement, theme?: string): VirtualRenderer; } + + export interface Completer { + /** + * Provides possible completion results asynchronously using the given callback. + * @param editor The editor to associate with + * @param session The `EditSession` to refer to + * @param pos An object containing the row and column + * @param prefix The prefixing string before the current position + * @param callback Function to provide the results or error + */ + getCompletions: (editor: Editor, session: IEditSession, pos: Position, prefix: string, callback: CompletionCallback) => void; + + /** + * Provides tooltip information about a completion result. + * @param item The completion result + */ + getDocTooltip?: (item: Completion) => void; + } + + export interface Completion { + value: string; + meta: string; + type?: string; + caption?: string; + snippet?: any; + score?: number; + exactMatch?: number; + docHTML?: string; + } + + export type CompletionCallback = (error: Error, results: Completion[]) => void; } declare var ace: AceAjax.Ace; diff --git a/types/actions-on-google/assistant-app.d.ts b/types/actions-on-google/assistant-app.d.ts index d835915259..76a206122c 100644 --- a/types/actions-on-google/assistant-app.d.ts +++ b/types/actions-on-google/assistant-app.d.ts @@ -1,6 +1,7 @@ import * as express from 'express'; -import { BasicCard, Carousel, ImageDisplays, List, OptionItem, RichResponse } from './response-builder'; +import { BasicCard, BrowseCarousel, BrowseItem, Carousel, ImageDisplays, List, MediaObject, + MediaResponse, MediaValues, OptionItem, RichResponse, SimpleResponse } from './response-builder'; import { ActionPaymentTransactionConfig, Cart, GooglePaymentTransactionConfig, LineItem, Location, Order, OrderUpdate, TransactionDecision, TransactionValues } from './transactions'; @@ -30,6 +31,8 @@ export enum StandardIntents { DELIVERY_ADDRESS, /** App fires TRANSACTION_DECISION intent when action asks for transaction decision. */ TRANSACTION_DECISION, + /** App fires PLACE intent when action asks for place. */ + PLACE, /** App fires CONFIRMATION intent when requesting affirmation from user. */ CONFIRMATION, /** App fires DATETIME intent when requesting date/time from user. */ @@ -45,7 +48,11 @@ export enum StandardIntents { /** App fires REGISTER_UPDATE intent when requesting user to register for proactive updates. */ REGISTER_UPDATE, /** App receives CONFIGURE_UPDATES intent to indicate a REGISTER_UPDATE intent should be sent. */ - CONFIGURE_UPDATES + CONFIGURE_UPDATES, + /** App fires LINK intent to request user to open to link. */ + LINK, + /** App receives MEDIA_STATUS intent when the MediaResponse status is updated from user. */ + MEDIA_STATUS } /** @@ -101,6 +108,10 @@ export enum BuiltInArgNames { * Transactions decision argument. */ TRANSACTION_DECISION_VALUE, + /** + * Place value argument. + */ + PLACE, /** * Confirmation argument. */ @@ -126,7 +137,11 @@ export enum BuiltInArgNames { */ NEW_SURFACE, /** Update registration value argument. */ - REGISTER_UPDATE + REGISTER_UPDATE, + /** Link request result argument. */ + LINK, + /** MediaStatus value argument. */ + MEDIA_STATUS } /** @@ -173,6 +188,14 @@ export enum SurfaceCapabilities { * The ability to output on a screen */ SCREEN_OUTPUT, + /** + * The ability to output a MediaResponse + */ + MEDIA_RESPONSE_AUDIO, + /** + * The ability to open a web URL + */ + WEB_BROWSER } /** @@ -223,6 +246,18 @@ export enum SignInStatus { ERROR } +/** + * SKU (Stock Keeping Units) types for Play Package Entitlements. + */ +export enum EntitlementSkuTypes { + /** In app purchase */ + IN_APP, + /** In app subscription */ + SUBSCRIPTION, + /** Paid app. */ + APP +} + /** * Possible update trigger time context frequencies. */ @@ -259,10 +294,15 @@ export interface UserName { familyName: string; } +export interface LocationCoordinates { + latitude: number; + longitude: number; +} + /** - * User's permissioned device location. + * Location information. */ -export interface DeviceLocation { +export interface Location { /** Coordinates: {latitude, longitude}. Requested with SupportedPermissions.DEVICE_PRECISE_LOCATION. */ coordinates: Coordinates; /** Full, formatted street address. Requested with SupportedPermissions.DEVICE_PRECISE_LOCATION. */ @@ -273,6 +313,22 @@ export interface DeviceLocation { city: string; } +/** + * User's permissioned device location. + */ +export type DeviceLocation = Location; + +/** + * Place information. + */ +export interface Place extends Location { + /** + * Used with Places API to fetch details of a place. + * See {@link https://developers.google.com/places/web-service/place-id} + */ + placeId: string; +} + /** * Coordinates containing latitude and longitude */ @@ -309,6 +365,33 @@ export interface User { userStorage: string; } +/** + * Google Play Android App Package Entitlements. + */ +export interface PackageEntitlement { + /** Name of the Android app package. */ + packageName: string; + /** List of entitlements for a given app. */ + entitlements: Entitlement[]; +} + +/** + * A user's digital entitlement. + */ +export interface Entitlement { + /** Product SKU. Matches getSku() in Google Play InApp Billing API. */ + sku: string; + /** The type of SKU. One of EntitlementSkuType. */ + skuType: string; + /** For in app purchases/subscriptions, relevant details. */ + inAppDetails: { + /** JSON data of the in app purchase. */ + inAppPurchaseData: object; + /** Matches IN_APP_DATA_SIGNATURE from getPurchases() method in Play InApp Billing API. */ + inAppDataSignature: object; + }; +} + /** * Actions on Google Surface. */ @@ -437,6 +520,16 @@ export class AssistantApp { */ readonly Transactions: typeof TransactionValues; + /** + * Values related to supporting {@link Media}. + */ + readonly Media: typeof MediaValues; + + /** + * SKU (Stock Keeping Units) types for Play Package Entitlements. + */ + readonly EntitlementSkuTypes: typeof EntitlementSkuTypes; + /** * Possible update trigger time context frequencies. */ @@ -923,6 +1016,80 @@ export class AssistantApp { */ askForDeliveryAddress(reason: string, dialogState?: object): express.Response | null; + /** + * Asks user to provide a geo-located place, possibly using contextual information, + * like a store near the user's location or a contact's address. + * + * Developer provides custom text prompts to tailor the request handled by Google. + * + * @example + * // For DialogflowApp: + * + * // Dialogflow Actions + * const Actions = { + * WELCOME: 'input.welcome', + * PLACE: 'get.place' // Create Dialogflow Action with actions_intent_PLACE event + * }; + * + * const app = new DialogflowApp({request, response}); + * + * function handleWelcome (app) { + * const requestPrompt = 'Where do you want to get picked up?'; + * const permissionContext = 'To find a place to pick you up'; + * app.askForPlace(requestPrompt, permissionContext); + * } + * + * function handlePlace (app) { + * const place = app.getPlace(); + * if (place) { + * app.tell(`Ah, I see. You want to get picked up at ${place.address}`); + * } else { + * app.tell(`Sorry, I couldn't find where you want to get picked up`); + * } + * } + * + * const actionMap = new Map(); + * actionMap.set(Actions.WELCOME, handleWelcome); + * actionMap.set(Actions.PLACE, handlePlace); + * app.handleRequest(actionMap); + * + * // For ActionsSdkApp: + * const app = new ActionsSdkApp({ request, response }); + * + * function handleWelcome (app) { + * const requestPrompt = 'Where do you want to get picked up?'; + * const permissionContext = 'To find a place to pick you up'; + * app.askForPlace(requestPrompt, permissionContext); + * } + * + * function handlePlace (app) { + * const place = app.getPlace(); + * if (place) { + * app.tell(`Ah, I see. You want to get picked up at ${place.address}`); + * } else { + * app.tell(`Sorry, I couldn't find where you want to get picked up`); + * } + * } + * + * const actionsMap = new Map(); + * actionsMap.set(app.StandardIntents.MAIN, handleWelcome); + * actionsMap.set(app.StandardIntents.PLACE, handlePlace); + * app.handleRequest(actionsMap); + * + * @param requestPrompt This is the initial response by location sub-dialog. + * For example: "Where do you want to get picked up?" + * @param permissionContext This is the context for seeking permissions. + * For example: "To find a place to pick you up" + * Prompt to user: "*To find a place to pick you up*, I just need to check your location. + * Can I get that from Google?". + * @param dialogState JSON object the app uses to hold dialog state that + * will be circulated back by Assistant. + * @return HTTP response. + * @actionssdk + * @dialogflow + */ + askForPlace(requestPrompt: string, permissionContext: string, dialogState?: object): express.Response | null; + /** * Asks user for a confirmation. * @@ -1131,6 +1298,72 @@ export class AssistantApp { */ askToRegisterDailyUpdate(intent: string, intentArguments: IntentArgument[], dialogState?: object): express.Response | null; + /** + * Requests the user to transfer to a linked out Android app intent. Using this feature + * requires verifying the linked app in the (Actions console)[console.actions.google.com]. + * + * @example + * // For DialogflowApp: + * + * // Dialogflow Actions + * const WELCOME_ACTION = 'input.welcome'; + * const HANDLE_LINK = 'handle.link'; // Create Dialogflow Action with actions_intent_LINK event + * + * const app = new DialogflowApp({ request, response }); + * + * console.log('Request headers: ' + JSON.stringify(request.headers)); + * console.log('Request body: ' + JSON.stringify(request.body)); + * + * function requestLink (app) { + * app.askToDeepLink('Great! Looks like we can do that in the app.', 'Google', + * 'example://gizmos', 'com.example.gizmos', 'handle this for you'); + * } + * + * function handleLink (app) { + * const linkStatus = app.getLinkStatus(); + * app.tell('Okay maybe we can take care of that another time.'); + * } + * + * const actionMap = new Map(); + * actionMap.set(WELCOME_ACTION, requestLink); + * actionMap.set(HANDLE_LINK, handleLink); + * app.handleRequest(actionMap); + * + * // For ActionsSdkApp + * const app = new ActionsSdkApp({ request, response }); + * + * console.log('Request headers: ' + JSON.stringify(request.headers)); + * console.log('Request body: ' + JSON.stringify(request.body)); + * + * function requestLink (app) { + * app.askToDeepLink('Great! Looks like we can do that in the app.', 'Google', + * 'example://gizmos', 'com.example.gizmos', 'handle this for you.'); + * } + * + * function handleLink (app) { + * const linkStatus = app.getLinkStatus(); + * app.tell('Okay maybe we can take care of that another time.'); + * } + * + * const actionMap = new Map(); + * actionMap.set(app.StandardIntents.MAIN, requestLink); + * actionMap.set(app.StandardIntents.LINK, handleLink); + * app.handleRequest(actionMap); + * + * @param prompt A simple response to prepend to the link request. + * @param destinationName The name of the link destination. + * @param url URL of Android deep link. + * @param packageName Android app package name to which to link. + * @param reason The reason to transfer the user. This may be appended to a + * Google-specified prompt. + * @param dialogState JSON object the app uses to hold dialog state that + * will be circulated back by Assistant. Used in {@link ActionsSdkApp}. + * @return HTTP response. + * @dialogflow + * @actionssdk + */ + askToDeepLink(prompt: string | SimpleResponse | null, destinationName: string, url: string, packageName: string, reason?: string | null, dialogState?: object): express.Response | null; + /** * Gets the {@link User} object. * The user object contains information about the user, including @@ -1209,6 +1442,20 @@ export class AssistantApp { */ getLastSeen(): Date | null; + /** + * Get the the list of all digital goods that your user purchased from + * your published Android apps. To enable this feature, see the instructions + * in the (documentation)[https://developers.google.com/actions/identity/digital-goods]. + * + * @example + * const app = new DialogflowApp({request, response}); + * const packageEntitlements = app.getPackageEntitlements(); + * + * @return The list of digital goods purchased by the user in + * any verified Android app package. Null if no Package Entitlements present in the request. + */ + getPackageEntitlements(): PackageEntitlement[] | null; + /** * If granted permission to device's location in previous intent, returns device's * location (see {@link AssistantApp#askForPermissions|askForPermissions}). @@ -1273,6 +1520,15 @@ export class AssistantApp { */ getTransactionDecision(): TransactionDecision; + /** + * Gets the user provided place. Use after askForPlace. + * + * @return Place information given by the user. Null if no place given. + * @dialogflow + * @actionssdk + */ + getPlace(): Place | null; + /** * Gets confirmation decision. Use after askForConfirmation. * @@ -1304,6 +1560,31 @@ export class AssistantApp { */ getSignInStatus(): string; + /** + * Get status of MEDIA_STATUS intent. + * + * @example + * const app = new DialogflowApp({request: request, response: response}); + * + * function mediaStatusIntent (app) { + * const status = app.getMediaStatus(); + * if (status === app.Media.Status.FINISHED) { + * app.tell('Oh, I see you are done playing the media!'); + * } else { + * app.tell(`I don't understand the current media status: ${status}`); + * } + * } + * + * const actionMap = new Map(); + * actionMap.set(app.StandardIntents.MEDIA_STATUS, mediaStatusIntent); + * app.handleRequest(actionMap); + * + * @return Result of media status intent. + * @dialogflow + * @actionssdk + */ + getMediaStatus(): MediaValues.Status | null; + /** * Returns true if user device has a given surface capability. * @@ -1464,6 +1745,16 @@ export class AssistantApp { */ isUpdateRegistered(): boolean; + /** + * Returns the status of a link request. Used with + * {@link AssistantApp#askToDeepLink} + * + * @return The status code of the request to link. + * @dialogflow + * @actionssdk + */ + getLinkStatus(): number; + // --------------------------------------------------------------------------- // Response Builders // --------------------------------------------------------------------------- @@ -1500,6 +1791,13 @@ export class AssistantApp { */ buildCarousel(): Carousel; + /** + * Constructs a Browse Carousel with chainable property setters. + * + * @return Constructed Browse Carousel. + */ + buildBrowseCarousel(): BrowseCarousel; + /** * Constructs OptionItem with chainable property setters. * @@ -1512,6 +1810,15 @@ export class AssistantApp { */ buildOptionItem(key?: string, synonyms?: string | string[]): OptionItem; + /** + * Constructs BrowseItem for the Browse Carousel with chainable property setters. + * + * @param title The displayed title of the Browse Carousel card. + * @param url The URL linked to by clicking the card. + * @return Constructed BrowseItem. + */ + buildBrowseItem(title?: string, url?: string): BrowseItem; + // --------------------------------------------------------------------------- // Transaction Builders // --------------------------------------------------------------------------- @@ -1552,4 +1859,24 @@ export class AssistantApp { * @return Constructed OrderUpdate. */ buildOrderUpdate(orderId: string, isGoogleOrderId: boolean): OrderUpdate; + + // --------------------------------------------------------------------------- + // Media Builders + // --------------------------------------------------------------------------- + + /** + * Constructs Media Response with chainable property setters. + * + * @return Constructed Media Response. + */ + buildMediaResponse(): MediaResponse; + + /** + * Constructs MediaObject with chainable property setters. + * + * @param name Name of media file. + * @param contentUrl Location of media file. + * @return Constructed MediaObject. + */ + buildMediaObject(name: string, contentUrl: string): MediaObject; } diff --git a/types/actions-on-google/index.d.ts b/types/actions-on-google/index.d.ts index 937943e1f0..943554586f 100644 --- a/types/actions-on-google/index.d.ts +++ b/types/actions-on-google/index.d.ts @@ -1,4 +1,4 @@ -// Type definitions for actions-on-google 1.8 +// Type definitions for actions-on-google 1.10 // Project: https://github.com/actions-on-google/actions-on-google-nodejs // Definitions by: Joel Hegg // Definitions: https://github.com/DefinitelyTyped/DefinitelyTyped diff --git a/types/actions-on-google/response-builder.d.ts b/types/actions-on-google/response-builder.d.ts index 227d102958..9844fe45c1 100644 --- a/types/actions-on-google/response-builder.d.ts +++ b/types/actions-on-google/response-builder.d.ts @@ -27,6 +27,53 @@ export enum ImageDisplays { CROPPED } +/** + * Values related to supporting media. + */ +export namespace MediaValues { + /** + * Type of the media within a MediaResponse. + */ + enum Type { + /** + * Unspecified. + */ + MEDIA_TYPE_UNSPECIFIED, + /** + * Audio stream. + */ + AUDIO + } + + /** + * List of media control status' returned. + */ + enum Status { + /** + * Unspecified. + */ + UNSPECIFIED, + /** + * Finished. + */ + FINISHED + } + + /** + * List of possible item types. + */ + enum ImageType { + /** + * Icon. + */ + ICON, + /** + * Large image. + */ + LARGE + } +} + /** * Simple Response type. */ @@ -155,6 +202,22 @@ export class RichResponse { */ addBasicCard(basicCard: BasicCard): RichResponse; + /** + * Adds media to this response. + * + * @param mediaResponse MediaResponse to include in response. + * @return Returns current constructed RichResponse. + */ + addMediaResponse(mediaResponse: MediaResponse): RichResponse; + + /** + * Adds a Browse Carousel to list of items. + * + * @param browseCarousel Browse Carousel to present to user + * @return Returns current constructed RichResponse. + */ + addBrowseCarousel(browseCarousel: string | BrowseCarousel): RichResponse; + /** * Adds a single suggestion or list of suggestions to list of items. * @@ -325,6 +388,43 @@ export class List { addItems(optionItems: OptionItem | OptionItem[]): List; } +/** + * Class for initializing and constructing BrowseCarousel with chainable interface. + */ +export class BrowseCarousel { + /** + * Constructor for BrowseCarousel. Accepts optional BrowseCarousel to + * clone or list of items to copy. + * + * @param carousel Either a carousel to clone + * or an array of BrowseItem to initialize a new carousel + */ + constructor(carousel?: BrowseCarousel | BrowseItem[]); + + /** + * List of 2-20 items to show in this carousel. Required. + */ + items: BrowseItem[]; + + /** + * Adds a single item or list of items to the carousel. + * + * @param browseItems BrowseItems to add. + * @return Returns current constructed BrowseCarousel. + */ + addItems(browseItems: BrowseItem | BrowseItem[]): BrowseCarousel; + + /** + * Sets the display options for the images in this carousel. + * Use one of the image display constants. If none is chosen, + * ImageDisplays.DEFAULT will be enforced. + * + * @param option The option for displaying the image. + * @return Returns current constructed BrowseCarousel. + */ + setImageDisplay(option: ImageDisplays): BrowseCarousel; +} + /** * Class for initializing and constructing Carousel with chainable interface. */ @@ -350,6 +450,120 @@ export class Carousel { * @return Returns current constructed Carousel. */ addItems(optionItems: OptionItem | OptionItem[]): Carousel; + + /** + * Sets the display options for the images in this carousel. + * Use one of the image display constants. If none is chosen, + * ImageDisplays.DEFAULT will be enforced. + * + * @param option The option for displaying the image. + * @return Returns current constructed Carousel. + */ + setImageDisplay(option: ImageDisplays): Carousel; +} + +/** + * Class for initializing and constructing Option Items with chainable interface. + */ +export class BrowseItem { + /** + * Constructor for BrowseItem. Accepts a title and URL for the Browse Item + * card. + * + * @param title The title of the Browse Item card. + * @param url The URL of the link opened by clicking the Browse Item card. + */ + constructor(title?: string, url?: string); + + /** + * Title of the browse item. Required. + */ + title: string; + + /** + * Description text of the item. Optional. + */ + description?: string; + + /** + * Footer text of the item. Optional. + */ + footer?: string; + + /** + * Image to show on item. Optional. + */ + image?: Image; + + /** + * Url to that clicking the card opens. Optional. + */ + openUrlAction?: object; + + /** + * @return Returns the possible valid values for URL type hints + */ + urlTypeHints(): object; + + /** + * Sets the title for this Browse Item. + * + * @param title Title to show on item. + * @return Returns current constructed BrowseItem. + */ + setTitle(title: string): BrowseItem; + + /** + * Sets the description for this Browse Item. + * + * @param description Description to show on item. + * @return Returns current constructed BrowseItem. + */ + setDescription(description: string): BrowseItem; + + /** + * Sets the footer for this Browse Item. + * + * @param footerText text to show on item. + * @return Returns current constructed BrowseItem. + */ + setFooter(footerText: string): BrowseItem; + + /** + * Sets the image for this Browse Item. + * + * @param url Image source URL. + * @param accessibilityText Text to replace for image for accessibility. + * @param width Width of the image. + * @param height Height of the image. + * @return Returns current constructed BrowseItem. + */ + setImage(url: string, accessibilityText: string, width?: number, height?: number): BrowseItem; + + /** + * Sets the Open URL action - which includes the url and possibly the typeHint + * + * @param url Image source URL. + * @param urlTypeHint One of the typeHints enumerated by this.urlTypeHints() + * @return Returns the current constructed BrowseItem + */ + setOpenUrlAction(url: string, urlTypeHint?: string): BrowseItem; + + /** + * Sets the URL target of the BrowseItem card + * + * @param url Image source URL. + * @return Returns the current constructed BrowseItem + */ + setUrl(url: string): BrowseItem; + + /** + * Sets the URL type hint for the BrowseItem card + * + * @param urlTypeHint One of the typeHints enumerated by this.urlTypeHints() + * @return Returns the current constructed BrowseItem + */ + setUrlTypeHint(urlTypeHint: string): BrowseItem; } /** @@ -430,6 +644,90 @@ export class OptionItem { addSynonyms(synonyms: string | string[]): OptionItem; } +/** + * Class for initializing and constructing MediaResponse with chainable interface. + */ +export class MediaResponse { + /** + * Constructor for MediaResponse. + * @param mediaType Type of the media which defaults to MediaValues.Type.AUDIO + */ + constructor(mediaType: MediaValues.Type); + + /** + * Array of MediaObject held in the MediaResponse. + */ + mediaObjects: MediaObject[]; + + /** + * Type of the media within this MediaResponse + */ + mediaType: MediaValues.Type; + + /** + * Adds a single media file or list of media files to the cart. + * + * @param items Single or Array of MediaObject to add. + * @return Returns current constructed MediaResponse. + */ + addMediaObjects(items: MediaObject | MediaObject[]): MediaResponse; +} + +/** + * Class for initializing and constructing MediaObject with chainable interface. + */ +export class MediaObject { + /** + * Constructor for MediaObject. + * + * @param name Name of the MediaObject. + * @param contentUrl URL of the MediaObject. + */ + constructor(name: string, contentUrl: string); + + /** + * Name of the MediaObject. + */ + name: string; + + /** + * MediaObject URL. + */ + contentUrl: string; + + /** + * Description of the MediaObject. + */ + description?: string; + + /** + * Large image. + */ + largeImage?: Image; + + /** + * Icon image. + */ + icon?: Image; + + /** + * Set the description of the item. + * + * @param description Description of the item. + * @return Returns current constructed MediaObject. + */ + setDescription(description: string): MediaObject; + + /** + * Sets the image for this item. + * + * @param url Image source URL. + * @param type Type of image (LARGE or ICON). + * @return Returns current constructed MediaObject. + */ + setImage(url: string, type: MediaValues.ImageType): MediaObject; +} + /** * Check if given text contains SSML. * @param text Text to check. diff --git a/types/activex-access/activex-access-tests.ts b/types/activex-access/activex-access-tests.ts index f224b92d70..3992ba34fd 100644 --- a/types/activex-access/activex-access-tests.ts +++ b/types/activex-access/activex-access-tests.ts @@ -1,3 +1,5 @@ +/// + let app = new ActiveXObject('Access.Application'); app.UserControl = true; @@ -6,7 +8,7 @@ app.DoCmd.OpenForm('MyForm', Access.AcFormView.acNormal, '', 'LastName="Smith"') // change the contents of a textbox // tslint:disable-next-line:no-unnecessary-type-assertion -let textbox = app.Forms.Item('MyForm').Controls.Item('MyTextBox') as Access.TextBox; +let textbox = app.Forms('MyForm').Controls('MyTextBox') as Access.TextBox; textbox.Text = 'Not Smith'; // save the current record on the active form diff --git a/types/activex-access/index.d.ts b/types/activex-access/index.d.ts index 0fd93502f8..d0bf798652 100644 --- a/types/activex-access/index.d.ts +++ b/types/activex-access/index.d.ts @@ -2,8 +2,9 @@ // Project: https://msdn.microsoft.com/en-us/library/dn142571.aspx // Definitions by: Zev Spitz // Definitions: https://github.com/DefinitelyTyped/DefinitelyTyped -// TypeScript Version: 2.4 +// TypeScript Version: 2.6 +/// /// /// /// @@ -929,6 +930,14 @@ declare namespace Access { acFormReadOnly = 2, } + const enum AcFormSection { + acDetail = 0, + acFooter = 2, + acHeader = 1, + acPageFooter = 4, + acPageHeader = 3, + } + const enum AcFormView { acDesign = 1, acFormDS = 3, @@ -987,6 +996,13 @@ declare namespace Access { acLayoutTabular = 1, } + const enum AcSetMenuItemState { + acMenuCheck = 3, + acMenuGray = 1, + acMenuUncheck = 2, + acMenuUngray = 0, + } + const enum AcModuleType { acClassModule = 1, acStandardModule = 0, @@ -1027,6 +1043,21 @@ declare namespace Access { acReadOnly = 2, } + const enum AcOutputFormat { + acFormatASP = 'Microsoft Active Server Pages (*.asp)', + acFormatDAP = 'Microsoft Access Data Access Page (*.htm; *.html)', + acFormatHTML = 'HTML (*.html)', + acFormatIIS = 'Microsoft IIS (*.htx; *.idc)', + acFormatPDF = 'PDF Format (*.pdf)', + acFormatRTF = 'Rich Text Format (*.rtf)', + acFormatSNP = 'Snapshot Format (*.snp)', + acFormatTXT = 'MS-DOS Text (*.txt)', + acFormatXLS = 'Microsoft Excel (*.xls)', + acFormatXLSB = 'Microsoft Excel Binary Workbook (*.xlsb)', + acFormatXLSX = 'Microsoft Excel Workbook (*.xlsx)', + acFormatXPS = 'XPS Format (*.xps)' + } + const enum AcOutputObjectType { acOutputDataAccessPage = 6, acOutputForm = 2, @@ -1185,18 +1216,7 @@ declare namespace Access { acPrevious = 0, } - const enum AcResourceType { - acResourceImage = 1, - acResourceTheme = 0, - } - - const enum AcSearchDirection { - acDown = 1, - acSearchAll = 2, - acUp = 0, - } - - const enum AcSection { + const enum AcReportSection { acDetail = 0, acFooter = 2, acGroupLevel1Footer = 6, @@ -1208,6 +1228,17 @@ declare namespace Access { acPageHeader = 3, } + const enum AcResourceType { + acResourceImage = 1, + acResourceTheme = 0, + } + + const enum AcSearchDirection { + acDown = 1, + acSearchAll = 2, + acUp = 0, + } + const enum AcSendObjectType { acSendDataAccessPage = 6, acSendForm = 2, @@ -1864,19 +1895,9 @@ declare namespace Access { TypeLib = 0, } - class _AccessProperty { - private 'Access._AccessProperty_typekey': _AccessProperty; - private constructor(); - readonly Application: Application; - readonly Category: number; - readonly Inherited: boolean; - IsMemberSafe(dispid: number): boolean; - Name: string; - readonly Parent: any; - readonly Properties: DAO.Properties; - Type: number; - Value: any; - } + type ByteArray = SafeArray; + + type DatabaseType = 'Microsoft Access (default)' | 'Jet 2.x' | 'Jet 3.x' | 'dBase III' | 'dBase IV' | 'dBase 5.0' | 'Paradox 3.x' | 'Paradox 4.x' | 'Paradox 5.x' | 'Paradox 7.x' | 'ODBC Database' | 'WSS'; class _CheckBoxInOption { private 'Access._CheckBoxInOption_typekey': _CheckBoxInOption; @@ -1957,7 +1978,7 @@ declare namespace Access { Left: number; LeftPadding: number; Locked: boolean; - Move(Left: any, Top?: any, Width?: any, Height?: any): void; + Move(Left: number, Top?: number, Width?: number, Height?: number): void; Name: string; OldBorderStyle: number; readonly OldValue: any; @@ -2094,7 +2115,7 @@ declare namespace Access { LeftMargin: number; LeftPadding: number; LineSpacing: number; - Move(Left: any, Top?: any, Width?: any, Height?: any): void; + Move(Left: number, Top?: number, Width?: number, Height?: number): void; Name: string; NumeralShapes: number; OldBorderStyle: number; @@ -2161,7 +2182,7 @@ declare namespace Access { readonly Layout: AcLayoutType; readonly LayoutID: number; LeftPadding: number; - Move(Left: any, Top?: any, Width?: any, Height?: any): void; + Move(Left: number, Top?: number, Width?: number, Height?: number): void; Name: string; readonly Object: any; ObjectVerbs(Index: number): string; @@ -2249,7 +2270,7 @@ declare namespace Access { LeftPadding: number; Locked: boolean; LpOleObject: number; - Move(Left: any, Top?: any, Width?: any, Height?: any): void; + Move(Left: number, Top?: number, Width?: number, Height?: number): void; Name: string; readonly Object: any; ObjectPalette: any; @@ -2290,12 +2311,11 @@ declare namespace Access { Width: number; } - class _ItemsSelected { - private 'Access._ItemsSelected_typekey': _ItemsSelected; - private constructor(); + interface _ItemsSelected { readonly Count: number; IsMemberSafe(dispid: number): boolean; Item(Index: any): number; + (Index: any): number; } class _OptionButtonInOption { @@ -2377,7 +2397,7 @@ declare namespace Access { Left: number; LeftPadding: number; Locked: boolean; - Move(Left: any, Top?: any, Width?: any, Height?: any): void; + Move(Left: number, Top?: number, Width?: number, Height?: number): void; Name: string; OldBorderStyle: number; readonly OldValue: any; @@ -2645,7 +2665,7 @@ declare namespace Access { Left: number; LeftPadding: number; Locked: boolean; - Move(Left: any, Top?: any, Width?: any, Height?: any): void; + Move(Left: number, Top?: number, Width?: number, Height?: number): void; Name: string; ObjectPalette: any; readonly OldValue: any; @@ -2745,16 +2765,15 @@ declare namespace Access { readonly Type: AcObjectType; } - class AccessObjectProperties { - private 'Access.AccessObjectProperties_typekey': AccessObjectProperties; - private constructor(); + interface AccessObjectProperties { Add(PropertyName: string, Value: any): void; readonly Application: Application; readonly Count: number; IsMemberSafe(dispid: number): boolean; - Item(Index: any): AccessObjectProperty; + Item(Index: number | string): AccessObjectProperty; readonly Parent: any; - Remove(Item: any): void; + Remove(Item: number | string): void; + (Index: number | string): AccessObjectProperty; } class AccessObjectProperty { @@ -2766,130 +2785,42 @@ declare namespace Access { Value: any; } - class AdditionalData { - private 'Access.AdditionalData_typekey': AdditionalData; + interface AccessObjects { + readonly Application: Application; + readonly Count: number; + IsMemberSafe(dispid: number): boolean; + Item(var_0: number | string): AccessObject; + readonly Parent: any; + (var_0: number | string): AccessObject; + } + + class AccessProperty { + private 'Access._AccessProperty_typekey': AccessProperty; private constructor(); + readonly Application: Application; + readonly Category: number; + readonly Inherited: boolean; + IsMemberSafe(dispid: number): boolean; + Name: string; + readonly Parent: any; + readonly Properties: DAO.Properties; + Type: number; + Value: any; + } + + interface AdditionalData { Add(var_0: string): AdditionalData; readonly Count: number; IsMemberSafe(dispid: number): boolean; - Item(Index: any): AdditionalData; + Item(Index: number | string): AdditionalData; Name: string; - } - - class AllDataAccessPages { - private 'Access.AllDataAccessPages_typekey': AllDataAccessPages; - private constructor(); - readonly Application: Application; - readonly Count: number; - IsMemberSafe(dispid: number): boolean; - Item(var_0: any): AccessObject; - readonly Parent: any; - } - - class AllDatabaseDiagrams { - private 'Access.AllDatabaseDiagrams_typekey': AllDatabaseDiagrams; - private constructor(); - readonly Application: Application; - readonly Count: number; - IsMemberSafe(dispid: number): boolean; - Item(var_0: any): AccessObject; - readonly Parent: any; - } - - class AllForms { - private 'Access.AllForms_typekey': AllForms; - private constructor(); - readonly Application: Application; - readonly Count: number; - IsMemberSafe(dispid: number): boolean; - Item(var_0: any): AccessObject; - readonly Parent: any; - } - - class AllFunctions { - private 'Access.AllFunctions_typekey': AllFunctions; - private constructor(); - readonly Application: Application; - readonly Count: number; - IsMemberSafe(dispid: number): boolean; - Item(var_0: any): AccessObject; - readonly Parent: any; - } - - class AllMacros { - private 'Access.AllMacros_typekey': AllMacros; - private constructor(); - readonly Application: Application; - readonly Count: number; - IsMemberSafe(dispid: number): boolean; - Item(var_0: any): AccessObject; - readonly Parent: any; - } - - class AllModules { - private 'Access.AllModules_typekey': AllModules; - private constructor(); - readonly Application: Application; - readonly Count: number; - IsMemberSafe(dispid: number): boolean; - Item(var_0: any): AccessObject; - readonly Parent: any; - } - - class AllQueries { - private 'Access.AllQueries_typekey': AllQueries; - private constructor(); - readonly Application: Application; - readonly Count: number; - IsMemberSafe(dispid: number): boolean; - Item(var_0: any): AccessObject; - readonly Parent: any; - } - - class AllReports { - private 'Access.AllReports_typekey': AllReports; - private constructor(); - readonly Application: Application; - readonly Count: number; - IsMemberSafe(dispid: number): boolean; - Item(var_0: any): AccessObject; - readonly Parent: any; - } - - class AllStoredProcedures { - private 'Access.AllStoredProcedures_typekey': AllStoredProcedures; - private constructor(); - readonly Application: Application; - readonly Count: number; - IsMemberSafe(dispid: number): boolean; - Item(var_0: any): AccessObject; - readonly Parent: any; - } - - class AllTables { - private 'Access.AllTables_typekey': AllTables; - private constructor(); - readonly Application: Application; - readonly Count: number; - IsMemberSafe(dispid: number): boolean; - Item(var_0: any): AccessObject; - readonly Parent: any; - } - - class AllViews { - private 'Access.AllViews_typekey': AllViews; - private constructor(); - readonly Application: Application; - readonly Count: number; - IsMemberSafe(dispid: number): boolean; - Item(var_0: any): AccessObject; - readonly Parent: any; + (Index: number | string): AdditionalData; } class Application { private 'Access.Application_typekey': Application; private constructor(); - AccessError(ErrorNumber: any): any; + AccessError(ErrorNumber: number): string; AddAutoCorrect(ChangeFrom: string, ChangeTo: string): void; AddToFavorites(): void; readonly ADOConnectString: string; @@ -2914,46 +2845,42 @@ declare namespace Access { readonly COMAddIns: Office.COMAddIns; readonly CommandBars: Office.CommandBars; - /** @param boolean [LogFile=false] */ + /** @param LogFile [LogFile=false] */ CompactRepair(SourceFile: string, DestinationFile: string, LogFile?: boolean): boolean; ConvertAccessProject(SourceFilename: string, DestinationFilename: string, DestinationFileFormat: AcFileFormat): void; - CreateAccessProject(filepath: string, Connect?: any): void; + CreateAccessProject(filepath: string, Connect?: string): void; CreateAdditionalData(): AdditionalData; - /** @param Access.AcSection [Section=0] */ - CreateControl(FormName: string, ControlType: AcControlType, Section?: AcSection, Parent?: any, ColumnName?: any, Left?: any, Top?: any, Width?: any, Height?: any): Control; - CreateControlEx( - FormName: string, ControlType: AcControlType, Section: AcSection, Parent: string, ControlSource: string, Left: number, Top: number, Width: number, Height: number): Control; - CreateControlExOld( - FormName: string, ControlType: AcControlType, Section: AcSection, Parent: string, ControlSource: string, Left: number, Top: number, Width: number, Height: number): Control; + /** @param Section [Section=0] */ + CreateControl(FormName: string, ControlType: AcControlType, Section?: AcFormSection, Parent?: string, ColumnName?: string, Left?: number, Top?: number, Width?: number, Height?: number): Control; + CreateControlEx(FormName: string, ControlType: AcControlType, Section: AcFormSection, Parent: string, ControlSource: string, Left: number, Top: number, Width: number, Height: number): Control; + CreateControlExOld(FormName: string, ControlType: AcControlType, Section: AcFormSection, Parent: string, ControlSource: string, Left: number, Top: number, Width: number, Height: number): Control; - /** @param Access.AcSection [Section=0] */ - CreateControlOld(FormName: string, ControlType: AcControlType, Section?: AcSection, Parent?: any, ColumnName?: any, Left?: any, Top?: any, Width?: any, Height?: any): Control; + /** @param Section [Section=0] */ + CreateControlOld(FormName: string, ControlType: AcControlType, Section?: AcFormSection, Parent?: string, ColumnName?: string, Left?: number, Top?: number, Width?: number, Height?: number): Control; - /** @param boolean [CreateNewFile=true] */ - CreateDataAccessPage(FileName: any, CreateNewFile?: boolean): DataAccessPage; - CreateForm(Database?: any, FormTemplate?: any): Form; + /** @param CreateNewFile [CreateNewFile=true] */ + CreateDataAccessPage(FileName: string, CreateNewFile?: boolean): DataAccessPage; + CreateForm(Database?: string, FormTemplate?: string): Form; CreateGroupLevel(ReportName: string, Expression: string, Header: number, Footer: number): number; /** - * @param string [Path=' '] - * @param string [Name=' '] - * @param string [Company=' '] - * @param string [WorkgroupID=' '] - * @param boolean [Replace=false] + * @param Path [Path=' '] + * @param Name [Name=' '] + * @param Company [Company=' '] + * @param WorkgroupID [WorkgroupID=' '] + * @param Replace [Replace=false] */ CreateNewWorkgroupFile(Path?: string, Name?: string, Company?: string, WorkgroupID?: string, Replace?: boolean): void; - CreateReport(Database?: any, ReportTemplate?: any): Report; + CreateReport(Database?: string, ReportTemplate?: string): Report; - /** @param Access.AcSection [Section=0] */ - CreateReportControl(ReportName: string, ControlType: AcControlType, Section?: AcSection, Parent?: any, ColumnName?: any, Left?: any, Top?: any, Width?: any, Height?: any): Control; - CreateReportControlEx( - ReportName: string, ControlType: AcControlType, Section: AcSection, Parent: string, ControlName: string, Left: number, Top: number, Width: number, Height: number): Control; - CreateReportControlExOld( - ReportName: string, ControlType: AcControlType, Section: AcSection, Parent: string, ControlName: string, Left: number, Top: number, Width: number, Height: number): Control; + /** @param Section [Section=0] */ + CreateReportControl(ReportName: string, ControlType: AcControlType, Section?: AcReportSection, Parent?: string, ColumnName?: string, Left?: number, Top?: number, Width?: number, Height?: number): Control; + CreateReportControlEx(ReportName: string, ControlType: AcControlType, Section: AcReportSection, Parent: string, ControlName: string, Left: number, Top: number, Width: number, Height: number): Control; + CreateReportControlExOld(ReportName: string, ControlType: AcControlType, Section: AcReportSection, Parent: string, ControlName: string, Left: number, Top: number, Width: number, Height: number): Control; - /** @param Access.AcSection [Section=0] */ - CreateReportControlOld(ReportName: string, ControlType: AcControlType, Section?: AcSection, Parent?: any, ColumnName?: any, Left?: any, Top?: any, Width?: any, Height?: any): Control; + /** @param Section [Section=0] */ + CreateReportControlOld(ReportName: string, ControlType: AcControlType, Section?: AcReportSection, Parent?: string, ColumnName?: string, Left?: number, Top?: number, Width?: number, Height?: number): Control; readonly CurrentData: CurrentData; CurrentDb(): DAO.Database; readonly CurrentObjectName: string; @@ -2963,97 +2890,99 @@ declare namespace Access { CurrentWebUser(DisplayOption: AcWebUserDisplay): any; CurrentWebUserGroups(DisplayOption: AcWebUserGroupsDisplay): any; readonly DataAccessPages: DataAccessPages; - DAvg(Expr: string, Domain: string, Criteria?: any): any; + DAvg(Expr: string, Domain: string, Criteria?: string): number | null; readonly DBEngine: DAO.DBEngine; - DCount(Expr: string, Domain: string, Criteria?: any): any; - DDEExecute(ChanNum: any, Command: string): void; - DDEInitiate(Application: string, Topic: string): any; - DDEPoke(ChanNum: any, Item: string, Data: string): void; - DDERequest(ChanNum: any, Item: string): string; - DDETerminate(ChanNum: any): void; + DCount(Expr: string, Domain: string, Criteria?: string): number | null; + DDEExecute(ChanNum: number, Command: string): void; + DDEInitiate(Application: string, Topic: string): number; + DDEPoke(ChanNum: number, Item: string, Data: string): void; + DDERequest(ChanNum: number, Item: string): string; + DDETerminate(ChanNum: number): void; DDETerminateAll(): void; readonly DefaultWebOptions: DefaultWebOptions; DefaultWorkspaceClone(): DAO.Workspace; DelAutoCorrect(ChangeFrom: string): void; DeleteControl(FormName: string, ControlName: string): void; DeleteReportControl(ReportName: string, ControlName: string): void; - DFirst(Expr: string, Domain: string, Criteria?: any): any; + DFirst(Expr: string, Domain: string, Criteria?: string): any; DirtyObject(ObjectType: AcObjectType, ObjectName: string): void; - DLast(Expr: string, Domain: string, Criteria?: any): any; - DLookup(Expr: string, Domain: string, Criteria?: any): any; - DMax(Expr: string, Domain: string, Criteria?: any): any; - DMin(Expr: string, Domain: string, Criteria?: any): any; + DLast(Expr: string, Domain: string, Criteria?: string): any; + DLookup(Expr: string, Domain: string, Criteria?: string): any; + DMax(Expr: string, Domain: string, Criteria?: string): any; + DMin(Expr: string, Domain: string, Criteria?: string): any; readonly DoCmd: DoCmd; - DStDev(Expr: string, Domain: string, Criteria?: any): any; - DStDevP(Expr: string, Domain: string, Criteria?: any): any; - DSum(Expr: string, Domain: string, Criteria?: any): any; - DVar(Expr: string, Domain: string, Criteria?: any): any; - DVarP(Expr: string, Domain: string, Criteria?: any): any; + DStDev(Expr: string, Domain: string, Criteria?: string): number | null; + DStDevP(Expr: string, Domain: string, Criteria?: string): number | null; + DSum(Expr: string, Domain: string, Criteria?: string): number | null; + DVar(Expr: string, Domain: string, Criteria?: string): number | null; + DVarP(Expr: string, Domain: string, Criteria?: string): number | null; - /** @param string [bstrStatusBarText=''] */ + /** @param bstrStatusBarText [bstrStatusBarText=''] */ Echo(EchoOn: number, bstrStatusBarText?: string): void; - EuroConvert(Number: number, SourceCurrency: string, TargetCurrency: string, FullPrecision?: any, TriangulationPrecision?: any): number; + EuroConvert(Number: number, SourceCurrency: string, TargetCurrency: string, FullPrecision?: boolean, TriangulationPrecision?: number): number; Eval(StringExpr: string): any; /** - * @param boolean [SelectedRecords=false] - * @param number [FromPage=1] - * @param number [ToPage=-1] + * @param SelectedRecords [SelectedRecords=false] + * @param FromPage [FromPage=1] + * @param ToPage [ToPage=-1] */ - ExportCustomFixedFormat( - ExternalExporter: any, OutputFileName: string, ObjectName: string, ObjectType: AcOutputObjectType, SelectedRecords?: boolean, FromPage?: number, ToPage?: number): void; + ExportCustomFixedFormat(ExternalExporter: any, OutputFileName: string, ObjectName: string, ObjectType: AcOutputObjectType, SelectedRecords?: boolean, FromPage?: number, ToPage?: number): void; ExportNavigationPane(Path: string): void; /** - * @param string [DataTarget=''] - * @param string [SchemaTarget=''] - * @param string [PresentationTarget=''] - * @param string [ImageTarget=''] - * @param Access.AcExportXMLEncoding [Encoding=0] - * @param Access.AcExportXMLOtherFlags [OtherFlags=0] - * @param string [WhereCondition=''] + * @param DataTarget [DataTarget=''] + * @param SchemaTarget [SchemaTarget=''] + * @param PresentationTarget [PresentationTarget=''] + * @param ImageTarget [ImageTarget=''] + * @param Encoding [Encoding=0] + * @param OtherFlags [OtherFlags=0] + * @param WhereCondition [WhereCondition=''] */ - ExportXML( - ObjectType: AcExportXMLObjectType, DataSource: string, DataTarget?: string, SchemaTarget?: string, PresentationTarget?: string, ImageTarget?: string, - Encoding?: AcExportXMLEncoding, OtherFlags?: AcExportXMLOtherFlags, WhereCondition?: string, AdditionalData?: any): void; + ExportXML(ObjectType: AcExportXMLObjectType, DataSource: string, DataTarget?: string, SchemaTarget?: string, PresentationTarget?: string, ImageTarget?: string, Encoding?: AcExportXMLEncoding, OtherFlags?: AcExportXMLOtherFlags, WhereCondition?: string, AdditionalData?: AdditionalData): void; /** - * @param string [DataTarget=''] - * @param string [SchemaTarget=''] - * @param string [PresentationTarget=''] - * @param string [ImageTarget=''] - * @param Access.AcExportXMLEncoding [Encoding=0] - * @param number [OtherFlags=0] + * @param DataTarget [DataTarget=''] + * @param SchemaTarget [SchemaTarget=''] + * @param PresentationTarget [PresentationTarget=''] + * @param ImageTarget [ImageTarget=''] + * @param Encoding [Encoding=0] + * @param OtherFlags [OtherFlags=0] */ - ExportXMLOld( - ObjectType: AcExportXMLObjectType, DataSource: string, DataTarget?: string, SchemaTarget?: string, PresentationTarget?: string, ImageTarget?: string, - Encoding?: AcExportXMLEncoding, OtherFlags?: number): void; + ExportXMLOld(ObjectType: AcExportXMLObjectType, DataSource: string, DataTarget?: string, SchemaTarget?: string, PresentationTarget?: string, ImageTarget?: string, Encoding?: AcExportXMLEncoding, OtherFlags?: number): void; FeatureInstall: Office.MsoFeatureInstall; FileDialog(dialogType: Office.MsoFileDialogType): Office.FileDialog; readonly FileSearch: Office.FileSearch; /** - * @param string [SubAddress=''] - * @param boolean [NewWindow=false] - * @param boolean [AddHistory=true] - * @param Office.MsoExtraInfoMethod [Method=0] - * @param string [HeaderInfo=''] + * @param SubAddress [SubAddress=''] + * @param NewWindow [NewWindow=false] + * @param AddHistory [AddHistory=true] + * @param Method [Method=0] + * @param HeaderInfo [HeaderInfo=''] */ - FollowHyperlink(Address: string, SubAddress?: string, NewWindow?: boolean, AddHistory?: boolean, ExtraInfo?: any, Method?: Office.MsoExtraInfoMethod, HeaderInfo?: string): void; + FollowHyperlink(Address: string, SubAddress?: string, NewWindow?: boolean, AddHistory?: boolean, ExtraInfo?: string | ByteArray, Method?: Office.MsoExtraInfoMethod, HeaderInfo?: string): void; readonly Forms: Forms; GetHiddenAttribute(ObjectType: AcObjectType, ObjectName: string): boolean; - GetOption(OptionName: string): any; - GUIDFromString(String: any): any; - HtmlEncode(PlainText: any, Length?: any): string; + + /** + * Returns different types of values based on how the options are set: + * * If by selecting / clearing a checkbox, returns `boolean` + * * If by typing a string or numeric value, returns `string` or `number` + * * If by choosing from a list, will return the 0-based index of the selected item + */ + GetOption(OptionName: string): boolean | string | number; + GUIDFromString(String: string): ByteArray; + HtmlEncode(PlainText: string, Length?: number): string; hWndAccessApp(): number; - /** @param Access.AcHyperlinkPart [Part=0] */ + /** @param Part [Part=0] */ HyperlinkPart(Hyperlink: any, Part?: AcHyperlinkPart): string; - /** @param boolean [fAppendOnly=false] */ + /** @param fAppendOnly [fAppendOnly=false] */ ImportNavigationPane(Path: string, fAppendOnly?: boolean): void; - /** @param Access.AcImportXMLOption [ImportOptions=1] */ + /** @param ImportOptions [ImportOptions=1] */ ImportXML(DataSource: string, ImportOptions?: AcImportXMLOption): void; InsertText(Text: string, ModuleName: string): void; InstantiateTemplate(Path: string): void; @@ -3072,36 +3001,36 @@ declare namespace Access { readonly Modules: Modules; readonly MsoDebugOptions: Office.MsoDebugOptions; readonly Name: string; - NewAccessProject(filepath: string, Connect?: any): void; + NewAccessProject(filepath: string, Connect?: string): void; /** - * @param Access.AcNewDatabaseFormat [FileFormat=0] - * @param string [SiteAddress=''] - * @param string [ListID=''] + * @param FileFormat [FileFormat=0] + * @param SiteAddress [SiteAddress=''] + * @param ListID [ListID=''] */ - NewCurrentDatabase(filepath: string, FileFormat?: AcNewDatabaseFormat, Template?: any, SiteAddress?: string, ListID?: string): void; + NewCurrentDatabase(filepath: string, FileFormat?: AcNewDatabaseFormat, Template?: string, SiteAddress?: string, ListID?: string): void; NewCurrentDatabaseOld(filepath: string): void; readonly NewFileTaskPane: Office.NewFile; Nz(Value: any, ValueIfNull?: any): any; - /** @param boolean [Exclusive=false] */ + /** @param Exclusive [Exclusive=false] */ OpenAccessProject(filepath: string, Exclusive?: boolean): void; /** - * @param boolean [Exclusive=false] - * @param string [bstrPassword=''] + * @param Exclusive [Exclusive=false] + * @param bstrPassword [bstrPassword=''] */ OpenCurrentDatabase(filepath: string, Exclusive?: boolean, bstrPassword?: string): void; - /** @param boolean [Exclusive=false] */ + /** @param Exclusive [Exclusive=false] */ OpenCurrentDatabaseOld(filepath: string, Exclusive?: boolean): void; readonly Parent: any; - PlainText(RichText: any, Length?: any): string; + PlainText(RichText: string, Length?: number): string; Printer: Printer; readonly Printers: Printers; readonly ProductCode: string; - /** @param Access.AcQuitOption [Option=1] */ + /** @param Option [Option=1] */ Quit(Option?: AcQuitOption): void; readonly References: References; RefreshDatabaseWindow(): void; @@ -3110,29 +3039,35 @@ declare namespace Access { ReplaceModule(objtyp: number, ModuleName: string, FileName: string, token: number): void; readonly Reports: Reports; readonly ReturnVars: ReturnVars; - Run( - Procedure: string, Arg1?: any, Arg2?: any, Arg3?: any, Arg4?: any, Arg5?: any, Arg6?: any, Arg7?: any, Arg8?: any, Arg9?: any, Arg10?: any, Arg11?: any, - Arg12?: any, Arg13?: any, Arg14?: any, Arg15?: any, Arg16?: any, Arg17?: any, Arg18?: any, Arg19?: any, Arg20?: any, Arg21?: any, Arg22?: any, Arg23?: any, - Arg24?: any, Arg25?: any, Arg26?: any, Arg27?: any, Arg28?: any, Arg29?: any, Arg30?: any): any; + Run(Procedure: string, Arg1?: any, Arg2?: any, Arg3?: any, Arg4?: any, Arg5?: any, Arg6?: any, Arg7?: any, Arg8?: any, Arg9?: any, Arg10?: any, Arg11?: any, Arg12?: any, Arg13?: any, Arg14?: any, Arg15?: any, Arg16?: any, Arg17?: any, Arg18?: any, Arg19?: any, Arg20?: any, Arg21?: any, Arg22?: any, Arg23?: any, Arg24?: any, Arg25?: any, Arg26?: any, Arg27?: any, Arg28?: any, Arg29?: any, Arg30?: any): any; RunCommand(Command: AcCommand): void; SaveAsAXL(ObjectType: AcObjectType, ObjectName: string, FileName: string): void; - SaveAsTemplate( - Path: string, Title: string, IconPath: string, CoreTable: string, Category: string, PreviewPath?: any, Description?: any, InstantiationForm?: any, - ApplicationPart?: any, IncludeData?: any, Variation?: any): void; + SaveAsTemplate(Path: string, Title: string, IconPath: string, CoreTable: string, Category: string, PreviewPath?: any, Description?: string, InstantiationForm?: string, ApplicationPart?: boolean, IncludeData?: boolean, Variation?: any): void; SaveAsText(ObjectType: AcObjectType, ObjectName: string, FileName: string): void; readonly Screen: Screen; SetDefaultWorkgroupFile(Path: string): void; SetHiddenAttribute(ObjectType: AcObjectType, ObjectName: string, fHidden: boolean): void; - SetOption(OptionName: string, Setting: any): void; + + /** + * Pass different types of values based on how the option is set in the UI + * * If by selecting / clearing a checkbox, pass a `boolean` + * * If by typing a string or numeric value, pass a `string` or `number` + * * If by choosing from a list, pass the 0-based index of the tiem to select + */ + SetOption(OptionName: string, Setting: boolean | string | number): void; SetUndoRecording(yesno: number): void; ShortcutMenuBar: string; - StringFromGUID(Guid: any): any; - SysCmd(Action: AcSysCmdAction, Argument2?: any, Argument3?: any): any; + StringFromGUID(Guid: ByteArray): string; + SysCmd(Action: AcSysCmdAction.acSysCmdInitMeter, StatusText: string, MaxValue: number): null; + SysCmd(Action: AcSysCmdAction.acSysCmdUpdateMeter, CurrentValue: number): null; + SysCmd(Action: AcSysCmdAction.acSysCmdSetStatus, StatusText: string): null; + SysCmd(Action: AcSysCmdAction.acSysCmdGetObjectState, Argument2: AcObjectType, Argument3: string): Constants.acObjStateDirty | Constants.acObjStateNew | Constants.acObjStateOpen; + SysCmd(Acton: AcSysCmdAction.acSysCmdAccessDir | AcSysCmdAction.acSysCmdAccessVer | AcSysCmdAction.acSysCmdClearHelpTopic | AcSysCmdAction.acSysCmdClearStatus | AcSysCmdAction.acSysCmdGetWorkgroupFile | AcSysCmdAction.acSysCmdIniFile | AcSysCmdAction.acSysCmdProfile | AcSysCmdAction.acSysCmdRemoveMeter | AcSysCmdAction.acSysCmdRuntime): null; readonly TempVars: TempVars; /** - * @param boolean [WellFormedXMLOutput=false] - * @param Access.AcTransformXMLScriptOption [ScriptOption=1] + * @param WellFormedXMLOutput [WellFormedXMLOutput=false] + * @param ScriptOption [ScriptOption=1] */ TransformXML(DataSource: string, TransformSource: string, OutputTarget: string, WellFormedXMLOutput?: boolean, ScriptOption?: AcTransformXMLScriptOption): void; UserControl: boolean; @@ -3206,9 +3141,9 @@ declare namespace Access { Enabled: boolean; EventProcPrefix: string; FileData(var_0?: any): any; - FileName(var_0?: any): string; - FileType(var_0?: any): string; - FileURL(var_0?: any): string; + FileName(var_0?: number | string): string; + FileType(var_0?: number | string): string; + FileURL(var_0?: number | string): string; Forward(): void; Goto(): void; GridlineColor: number; @@ -3238,7 +3173,7 @@ declare namespace Access { Left: number; LeftPadding: number; Locked: boolean; - Move(Left: any, Top?: any, Width?: any, Height?: any): void; + Move(Left: number, Top?: number, Width?: number, Height?: null): void; Name: string; OldBorderStyle: number; readonly OldValue: any; @@ -3390,7 +3325,7 @@ declare namespace Access { LeftPadding: number; Locked: boolean; LpOleObject: number; - Move(Left: any, Top?: any, Width?: any, Height?: any): void; + Move(Left: number, Top?: number, Width?: number, Height?: number): void; Name: string; readonly Object: any; ObjectPalette: any; @@ -3533,7 +3468,7 @@ declare namespace Access { Left: number; LeftPadding: number; Locked: boolean; - Move(Left: any, Top?: any, Width?: any, Height?: any): void; + Move(Left: number, Top?: number, Width?: number, Height?: number): void; Name: string; OldBorderStyle: number; readonly OldValue: any; @@ -3588,12 +3523,13 @@ declare namespace Access { Width: number; } - class Children { - private 'Access.Children_typekey': Children; - private constructor(); + interface Children { readonly Count: number; IsMemberSafe(dispid: number): boolean; - Item(Index: any): any; + // tslint:disable-next-line:no-unnecessary-generics + Item(Index: number | string): T; + // tslint:disable-next-line:no-unnecessary-generics + (Index: number | string): T; } class Class { @@ -3604,12 +3540,12 @@ declare namespace Access { class CodeData { private 'Access.CodeData_typekey': CodeData; private constructor(); - readonly AllDatabaseDiagrams: AllDatabaseDiagrams; - readonly AllFunctions: AllFunctions; - readonly AllQueries: AllQueries; - readonly AllStoredProcedures: AllStoredProcedures; - readonly AllTables: AllTables; - readonly AllViews: AllViews; + readonly AllDatabaseDiagrams: AccessObjects; + readonly AllFunctions: AccessObjects; + readonly AllQueries: AccessObjects; + readonly AllStoredProcedures: AccessObjects; + readonly AllTables: AccessObjects; + readonly AllViews: AccessObjects; IsMemberSafe(dispid: number): boolean; } @@ -3618,11 +3554,11 @@ declare namespace Access { private constructor(); readonly AccessConnection: ADODB.Connection; AddSharedImage(SharedImageName: string, FileName: string): void; - readonly AllDataAccessPages: AllDataAccessPages; - readonly AllForms: AllForms; - readonly AllMacros: AllMacros; - readonly AllModules: AllModules; - readonly AllReports: AllReports; + readonly AllDataAccessPages: AccessObjects; + readonly AllForms: AccessObjects; + readonly AllMacros: AccessObjects; + readonly AllModules: AccessObjects; + readonly AllReports: AccessObjects; readonly Application: Application; readonly BaseConnectionString: string; CloseConnection(): void; @@ -3635,7 +3571,7 @@ declare namespace Access { readonly IsTrusted: boolean; readonly IsWeb: boolean; readonly Name: string; - OpenConnection(BaseConnectionString?: any, UserID?: any, Password?: any): void; + OpenConnection(BaseConnectionString?: string, UserID?: string, Password?: string): void; readonly Parent: any; readonly Path: string; readonly ProjectType: AcProjectType; @@ -3671,7 +3607,7 @@ declare namespace Access { accState(varChild?: any): any; accValue(varChild?: any): string; AddColon: boolean; - AddItem(Item: string, Index?: any): void; + AddItem(Item: string, Index?: number): void; AfterUpdate: string; AfterUpdateMacro: string; AllowAutoCorrect: boolean; @@ -3700,7 +3636,7 @@ declare namespace Access { CanGrow: boolean; CanShrink: boolean; Coltyp: number; - Column(Index: number, Row?: any): any; + Column(Index: number, Row?: number): any; ColumnCount: number; ColumnHeads: boolean; ColumnHidden: boolean; @@ -3777,7 +3713,7 @@ declare namespace Access { ListRows: number; ListWidth: string; Locked: boolean; - Move(Left: any, Top?: any, Width?: any, Height?: any): void; + Move(Left: number, Top?: number, Width?: number, Height?: number): void; Name: string; NumeralShapes: number; OldBorderStyle: number; @@ -3815,8 +3751,8 @@ declare namespace Access { readonly Parent: any; readonly Properties: Properties; ReadingOrder: number; - Recordset: any; - RemoveItem(Index: any): void; + Recordset: DAO.Recordset | ADODB.Recordset; + RemoveItem(Index: number | string): void; Requery(): void; RightMargin: number; RightPadding: number; @@ -3961,7 +3897,7 @@ declare namespace Access { readonly LayoutID: number; Left: number; LeftPadding: number; - Move(Left: any, Top?: any, Width?: any, Height?: any): void; + Move(Left: number, Top?: number, Width?: number, Height?: number): void; Name: string; ObjectPalette: any; readonly OldValue: any; @@ -4039,7 +3975,7 @@ declare namespace Access { _Name: string; readonly Application: Application; BottomPadding: number; - Column(Index: number, Row?: any): any; + Column(Index: number, Row?: number): any; readonly Controls: Children; Dropdown(): void; readonly Form: Form; @@ -4061,7 +3997,7 @@ declare namespace Access { readonly Layout: AcLayoutType; readonly LayoutID: number; LeftPadding: number; - Move(Left: any, Top?: any, Width?: any, Height?: any): void; + Move(Left: number, Top?: number, Width?: number, Height?: number): void; Name: string; readonly Object: any; ObjectVerbs(Index: number): string; @@ -4081,27 +4017,26 @@ declare namespace Access { VerticalAnchor: AcVerticalAnchor; } - class Controls { - private 'Access.Controls_typekey': Controls; - private constructor(); + interface Controls { readonly Application: Application; readonly Count: number; IsMemberSafe(dispid: number): boolean; // tslint:disable-next-line:no-unnecessary-generics - Item(index: number | string): T; - Item(Index: number | string): Control; + Item(Index: number | string): T; readonly Parent: any; + // tslint:disable-next-line:no-unnecessary-generics + (Index: number | string): T; } class CurrentData { private 'Access.CurrentData_typekey': CurrentData; private constructor(); - readonly AllDatabaseDiagrams: AllDatabaseDiagrams; - readonly AllFunctions: AllFunctions; - readonly AllQueries: AllQueries; - readonly AllStoredProcedures: AllStoredProcedures; - readonly AllTables: AllTables; - readonly AllViews: AllViews; + readonly AllDatabaseDiagrams: AccessObjects; + readonly AllFunctions: AccessObjects; + readonly AllQueries: AccessObjects; + readonly AllStoredProcedures: AccessObjects; + readonly AllTables: AccessObjects; + readonly AllViews: AccessObjects; IsMemberSafe(dispid: number): boolean; } @@ -4110,11 +4045,11 @@ declare namespace Access { private constructor(); readonly AccessConnection: ADODB.Connection; AddSharedImage(SharedImageName: string, FileName: string): void; - readonly AllDataAccessPages: AllDataAccessPages; - readonly AllForms: AllForms; - readonly AllMacros: AllMacros; - readonly AllModules: AllModules; - readonly AllReports: AllReports; + readonly AllDataAccessPages: AccessObjects; + readonly AllForms: AccessObjects; + readonly AllMacros: AccessObjects; + readonly AllModules: AccessObjects; + readonly AllReports: AccessObjects; readonly Application: Application; readonly BaseConnectionString: string; CloseConnection(): void; @@ -4127,7 +4062,7 @@ declare namespace Access { readonly IsTrusted: boolean; readonly IsWeb: boolean; readonly Name: string; - OpenConnection(BaseConnectionString?: any, UserID?: any, Password?: any): void; + OpenConnection(BaseConnectionString?: string, UserID?: string, Password?: string): void; readonly Parent: any; readonly Path: string; readonly ProjectType: AcProjectType; @@ -4206,7 +4141,7 @@ declare namespace Access { LeftPadding: number; Locked: boolean; LpOleObject: number; - Move(Left: any, Top?: any, Width?: any, Height?: any): void; + Move(Left: number, Top?: number, Width?: number, Height?: number): void; Name: string; readonly Object: any; ObjectPalette: any; @@ -4271,14 +4206,13 @@ declare namespace Access { readonly WindowWidth: number; } - class DataAccessPages { - private 'Access.DataAccessPages_typekey': DataAccessPages; - private constructor(); + interface DataAccessPages { readonly Application: Application; readonly Count: number; IsMemberSafe(dispid: number): boolean; Item(var_0: any): DataAccessPage; readonly Parent: any; + (var_0: any): DataAccessPage; } class DefaultWebOptions { @@ -4313,192 +4247,231 @@ declare namespace Access { readonly UnsupportedObjects: DependencyObjects; } - class DependencyObjects { - private 'Access.DependencyObjects_typekey': DependencyObjects; - private constructor(); + interface DependencyObjects { readonly Application: Application; readonly Count: number; IsMemberSafe(dispid: number): boolean; - Item(Index: any): AccessObject; + Item(Index: number | string): AccessObject; readonly Parent: any; + (Index: number | string): AccessObject; } class DoCmd { private 'Access.DoCmd_typekey': DoCmd; private constructor(); - AddMenu(MenuName: any, MenuMacroName: any, StatusBarText?: any): void; - ApplyFilter(FilterName?: any, WhereCondition?: any, ControlName?: any): void; - ApplyFilterOld0(FilterName?: any, WhereCondition?: any): void; + AddMenu(MenuName: string, MenuMacroName: string, StatusBarText?: string): void; + ApplyFilter(FilterName?: string, WhereCondition?: string, ControlName?: any): void; + ApplyFilterOld0(FilterName?: string, WhereCondition?: string): void; Beep(): void; - /** @param Access.AcFormOpenDataMode [DataMode=1] */ - BrowseTo(ObjectType: AcBrowseToObjectType, ObjectName: any, PathtoSubformControl: any, WhereCondition: any, Page: any, DataMode?: AcFormOpenDataMode): void; + /** @param DataMode [DataMode=1] */ + BrowseTo(ObjectType: AcBrowseToObjectType, ObjectName: string, PathtoSubformControl?: string, WhereCondition?: string, Page?: string, DataMode?: AcFormOpenDataMode): void; CancelEvent(): void; ClearMacroError(): void; /** - * @param Access.AcObjectType [ObjectType=-1] - * @param Access.AcCloseSave [Save=0] + * @param ObjectType [ObjectType=-1] + * @param Save [Save=0] */ - Close(ObjectType: AcObjectType, ObjectName: any, Save?: AcCloseSave): void; + Close(ObjectType: AcObjectType, ObjectName: string, Save?: AcCloseSave): void; Close(): void; CloseDatabase(): void; - CopyDatabaseFile(DatabaseFileName: any, OverwriteExistingFile?: any, DisconnectAllUsers?: any): void; + CopyDatabaseFile(DatabaseFileName: string, OverwriteExistingFile?: boolean, DisconnectAllUsers?: boolean): void; - /** @param Access.AcObjectType [SourceObjectType=-1] */ - CopyObject(DestinationDatabase: any, NewName: any, SourceObjectType?: AcObjectType, SourceObjectName?: any): void; + /** @param SourceObjectType [SourceObjectType=-1] */ + CopyObject(DestinationDatabase: string, NewName: string, SourceObjectType?: AcObjectType, SourceObjectName?: string): void; - /** @param Access.AcObjectType [ObjectType=-1] */ - DeleteObject(ObjectType?: AcObjectType, ObjectName?: any): void; - DoMenuItem(MenuBar: any, MenuName: any, Command: any, Subcommand?: any, Version?: any): void; - Echo(EchoOn: any, StatusBarText?: any): void; + /** @param ObjectType [ObjectType=-1] */ + DeleteObject(ObjectType?: AcObjectType, ObjectName?: string): void; + + /** @deprecated Use the **RunCommand** method */ + DoMenuItem(MenuBar: Constants.acFormBar | number, MenuName: Constants.acFile | Constants.acEditMenu | Constants.acRecordsMenu | number, Command: Constants.acNew | Constants.acSaveForm | Constants.acSaveFormAs | Constants.acSaveRecord | Constants.acUndo | Constants.acCut | Constants.acCopy | Constants.acPaste | Constants.acDelete | Constants.acSelectRecord | Constants.acSelectAllRecords | Constants.acRefresh | number, Subcommand?: Constants.acObjectVerb | Constants.acObjectUpdate | number, Version?: Constants.acMenuVer70 | Constants.acMenuVer20 | Constants.acMenuVer1X): void; + Echo(EchoOn: boolean, StatusBarText?: string): void; FindNext(): void; /** - * @param Access.AcFindMatch [Match=1] - * @param Access.AcSearchDirection [Search=2] - * @param Access.AcFindField [OnlyCurrentField=-1] + * @param Match [Match=1] + * @param MatchCase [MatchCase=false] + * @param Search [Search=2] + * @param SearchAsFormatted [SearchAsFormatted=false] + * @param OnlyCurrentField [OnlyCurrentField=-1] */ - FindRecord(FindWhat: any, Match?: AcFindMatch, MatchCase?: any, Search?: AcSearchDirection, SearchAsFormatted?: any, OnlyCurrentField?: AcFindField, FindFirst?: any): void; - GoToControl(ControlName: any): void; - GoToPage(PageNumber: any, Right?: any, Down?: any): void; + FindRecord(FindWhat: string | number | VarDate, Match?: AcFindMatch, MatchCase?: boolean, Search?: AcSearchDirection, SearchAsFormatted?: boolean, OnlyCurrentField?: AcFindField, FindFirst?: boolean): void; + GoToControl(ControlName: string): void; + GoToPage(PageNumber: number, Right?: number, Down?: number): void; /** - * @param Access.AcDataObjectType [ObjectType=-1] - * @param Access.AcRecord [Record=1] + * @param ObjectType [ObjectType=-1] + * @param Record [Record=1] */ - GoToRecord(ObjectType?: AcDataObjectType, ObjectName?: any, Record?: AcRecord, Offset?: any): void; - Hourglass(HourglassOn: any): void; - LockNavigationPane(Lock: any): void; + GoToRecord(ObjectType?: AcDataObjectType, ObjectName?: string, Record?: AcRecord.acFirst | AcRecord.acLast | AcRecord.acNewRec): void; + + /** + * @param ObjectType [ObjectType=-1] + * @param Record [Record=1] + */ + GoToRecord(ObjectType?: AcDataObjectType, ObjectName?: string, Record?: AcRecord, Offset?: AcRecord.acNext | AcRecord.acPrevious | AcRecord.acGoTo): void; + Hourglass(HourglassOn: boolean): void; + LockNavigationPane(Lock: boolean): void; Maximize(): void; Minimize(): void; - MoveSize(Right?: any, Down?: any, Width?: any, Height?: any): void; + MoveSize(Right?: number, Down?: number, Width?: number, Height?: number): void; NavigateTo(Category?: any, Group?: any): void; - /** @param Access.AcDataAccessPageView [View=0] */ - OpenDataAccessPage(DataAccessPageName: any, View?: AcDataAccessPageView): void; - OpenDiagram(DiagramName: any): void; + /** @param View [View=0] */ + OpenDataAccessPage(DataAccessPageName: string, View?: AcDataAccessPageView): void; + OpenDiagram(DiagramName: string): void; /** - * @param Access.AcFormView [View=0] - * @param Access.AcFormOpenDataMode [DataMode=-1] - * @param Access.AcWindowMode [WindowMode=0] + * @param View [View=0] + * @param DataMode [DataMode=-1] + * @param WindowMode [WindowMode=0] */ - OpenForm(FormName: any, View?: AcFormView, FilterName?: string, WhereCondition?: string, DataMode?: AcFormOpenDataMode, WindowMode?: AcWindowMode, OpenArgs?: string): void; + OpenForm(FormName: string, View?: AcFormView, FilterName?: string, WhereCondition?: string, DataMode?: AcFormOpenDataMode, WindowMode?: AcWindowMode, OpenArgs?: string): void; /** - * @param Access.AcView [View=0] - * @param Access.AcOpenDataMode [DataMode=1] + * @param View [View=0] + * @param DataMode [DataMode=1] */ - OpenFunction(FunctionName: any, View?: AcView, DataMode?: AcOpenDataMode): void; - OpenModule(ModuleName?: any, ProcedureName?: any): void; + OpenFunction(FunctionName: string, View?: AcView, DataMode?: AcOpenDataMode): void; + OpenModule(ModuleName?: string, ProcedureName?: string): void; /** - * @param Access.AcView [View=0] - * @param Access.AcOpenDataMode [DataMode=1] + * @param View [View=0] + * @param DataMode [DataMode=1] */ - OpenQuery(QueryName: any, View?: AcView, DataMode?: AcOpenDataMode): void; + OpenQuery(QueryName: string, View?: AcView, DataMode?: AcOpenDataMode): void; /** - * @param Access.AcView [View=0] - * @param Access.AcWindowMode [WindowMode=0] + * @param View [View=0] + * @param WindowMode [WindowMode=0] */ - OpenReport(ReportName: any, View?: AcView, FilterName?: string, WhereCondition?: string, WindowMode?: AcWindowMode, OpenArgs?: string): void; + OpenReport(ReportName: string, View?: AcView, FilterName?: string, WhereCondition?: string, WindowMode?: AcWindowMode, OpenArgs?: string): void; - /** @param Access.AcView [View=0] */ + /** @param View [View=0] */ OpenReportOld0(ReportName: any, View?: AcView, FilterName?: any, WhereCondition?: any): void; /** - * @param Access.AcView [View=0] - * @param Access.AcOpenDataMode [DataMode=1] + * @param View [View=0] + * @param DataMode [DataMode=1] */ - OpenStoredProcedure(ProcedureName: any, View?: AcView, DataMode?: AcOpenDataMode): void; + OpenStoredProcedure(ProcedureName: string, View?: AcView, DataMode?: AcOpenDataMode): void; /** - * @param Access.AcView [View=0] - * @param Access.AcOpenDataMode [DataMode=1] + * @param View [View=0] + * @param DataMode [DataMode=1] */ - OpenTable(TableName: any, View?: AcView, DataMode?: AcOpenDataMode): void; + OpenTable(TableName: string, View?: AcView, DataMode?: AcOpenDataMode): void; /** - * @param Access.AcView [View=0] - * @param Access.AcOpenDataMode [DataMode=1] + * @param View [View=0] + * @param DataMode [DataMode=1] */ - OpenView(ViewName: any, View?: AcView, DataMode?: AcOpenDataMode): void; + OpenView(ViewName: string, View?: AcView, DataMode?: AcOpenDataMode): void; - /** @param Access.AcExportQuality [OutputQuality=0] */ - OutputTo(ObjectType: AcOutputObjectType, ObjectName: any, OutputFormat: any, OutputFile: any, AutoStart: any, TemplateFile: any, Encoding: any, OutputQuality?: AcExportQuality): void; + /** @param OutputQuality [OutputQuality=0] */ + OutputTo(ObjectType: AcOutputObjectType.acOutputModule, ObjectName: string, OutputFormat: AcOutputFormat.acFormatTXT, OutputFile: string, AutoStart: boolean, TemplateFile: string, Encoding: any, OutputQuality?: AcExportQuality): void; + + /** @param OutputQuality [OutputQuality=0] */ + OutputTo(ObjectType: AcOutputObjectType, ObjectName?: string, OutputFormat?: AcOutputFormat, OutputFile?: string, AutoStart?: boolean, TemplateFile?: string, Encoding?: any, OutputQuality?: AcExportQuality): void; OutputToOld0(ObjectType: AcOutputObjectType, ObjectName?: any, OutputFormat?: any, OutputFile?: any, AutoStart?: any, TemplateFile?: any): void; OutputToOld1(ObjectType: AcOutputObjectType, ObjectName?: any, OutputFormat?: any, OutputFile?: any, AutoStart?: any, TemplateFile?: any, Encoding?: any): void; /** - * @param Access.AcPrintRange [PrintRange=0] - * @param Access.AcPrintQuality [PrintQuality=0] + * @param PrintRange [PrintRange=0] + * @param PrintQuality [PrintQuality=0] + * @param Copies [Copies=1] + * @param CollateCopies [CollateCopies=true] */ - PrintOut(PrintRange?: AcPrintRange, PageFrom?: any, PageTo?: any, PrintQuality?: AcPrintQuality, Copies?: any, CollateCopies?: any): void; + PrintOut(PrintRange: AcPrintRange.acPages, PageFrom?: number, PageTo?: number, PrintQuality?: AcPrintQuality, Copies?: number, CollateCopies?: boolean): void; - /** @param Access.AcQuitOption [Options=1] */ + /** + * @param PrintRange [PrintRange=0] + * @param PrintQuality [PrintQuality=0] + * @param Copies [Copies=1] + * @param CollateCopies [CollateCopies=true] + */ + PrintOut(PrintRange?: AcPrintRange, PageFrom?: undefined, PageTo?: undefined, PrintQuality?: AcPrintQuality, Copies?: number, CollateCopies?: boolean): void; + + /** @param Options [Options=1] */ Quit(Options?: AcQuitOption): void; RefreshRecord(): void; - /** @param Access.AcObjectType [ObjectType=-1] */ - Rename(NewName: any, ObjectType?: AcObjectType, OldName?: any): void; + /** @param ObjectType [ObjectType=-1] */ + Rename(NewName: string, ObjectType: AcObjectType, OldName: string): void; + Rename(NewName: string): void; - /** @param Access.AcObjectType [ObjectType=-1] */ - RepaintObject(ObjectType?: AcObjectType, ObjectName?: any): void; - Requery(ControlName?: any): void; + /** @param ObjectType [ObjectType=-1] */ + RepaintObject(ObjectType: AcObjectType, ObjectName: string): void; + RepaintObject(): void; + + Requery(ControlName?: string): void; Restore(): void; RunCommand(Command: AcCommand): void; - RunDataMacro(MacroName: any): void; - RunMacro(MacroName: any, RepeatCount?: any, RepeatExpression?: any): void; - RunSavedImportExport(SavedImportExportName: any): void; - RunSQL(SQLStatement: any, UseTransaction?: any): void; + RunDataMacro(MacroName: string): void; + RunMacro(MacroName: string, RepeatCount?: number, RepeatExpression?: string): void; + RunSavedImportExport(SavedImportExportName: string): void; + RunSQL(SQLStatement: string, UseTransaction?: boolean): void; - /** @param Access.AcObjectType [ObjectType=-1] */ - Save(ObjectType?: AcObjectType, ObjectName?: any): void; + /** @param ObjectType [ObjectType=-1] */ + Save(ObjectType: AcObjectType | undefined, ObjectName: string): void; + Save(): void; /** - * @param Access.AcDataObjectType [ObjectType=-1] - * @param Access.AcRecord [Record=2] + * @param ObjectType [ObjectType=-1] + * @param Record [Record=2] */ - SearchForRecord(ObjectType?: AcDataObjectType, ObjectName?: any, Record?: AcRecord, WhereCondition?: any): void; - SelectObject(ObjectType: AcObjectType, ObjectName?: any, InDatabaseWindow?: any): void; + SearchForRecord(ObjectType?: AcDataObjectType, ObjectName?: string, Record?: AcRecord, WhereCondition?: string): void; + SelectObject(ObjectType: AcObjectType, ObjectName: string | undefined, InDatabaseWindow: true): void; + SelectObject(ObjectType: AcObjectType, ObjectName: string): void; - /** @param Access.AcSendObjectType [ObjectType=-1] */ - SendObject( - ObjectType?: AcSendObjectType, ObjectName?: any, OutputFormat?: any, To?: any, Cc?: any, Bcc?: any, Subject?: any, MessageText?: any, EditMessage?: any, TemplateFile?: any): void; - SetDisplayedCategories(Show: any, Category?: any): void; - SetFilter(FilterName?: any, WhereCondition?: any, ControlName?: any): void; - SetMenuItem(MenuIndex: any, CommandIndex?: any, SubcommandIndex?: any, Flag?: any): void; - SetOrderBy(OrderBy: any, ControlName?: any): void; - SetParameter(Name: any, Expression: any): void; + /** @param ObjectType [ObjectType=-1] */ + SendObject(ObjectType?: AcSendObjectType, ObjectName?: string, OutputFormat?: AcOutputFormat, To?: string, Cc?: string, Bcc?: string, Subject?: string, MessageText?: string, EditMessage?: boolean, TemplateFile?: string): void; + SetDisplayedCategories(Show: boolean, Category?: string): void; + SetFilter(FilterName?: string, WhereCondition?: string, ControlName?: string): void; + SetMenuItem(MenuIndex: number, CommandIndex?: number, SubcommandIndex?: number, Flag?: AcSetMenuItemState): void; + SetOrderBy(OrderBy: string, ControlName?: string): void; + SetParameter(Name: string, Expression: any): void; - /** @param Access.AcProperty [Property=0] */ - SetProperty(ControlName: any, Property?: AcProperty, Value?: any): void; - SetWarnings(WarningsOn: any): void; + /** @param Property [Property=0] */ + SetProperty(ControlName: string, Property?: AcProperty, Value?: any): void; + SetWarnings(WarningsOn: boolean): void; ShowAllRecords(): void; - /** @param Access.AcShowToolbar [Show=0] */ - ShowToolbar(ToolbarName: any, Show?: AcShowToolbar): void; + /** @param Show [Show=0] */ + ShowToolbar(ToolbarName: string, Show?: AcShowToolbar): void; SingleStep(): void; /** - * @param Access.AcDataTransferType [TransferType=0] - * @param Access.AcObjectType [ObjectType=0] + * @param TransferType [TransferType=0] + * @param ObjectType [ObjectType=0] + * @param StructureOnly [StructureOnly=false\] + * @param StoreLogin [StoreLogin=false] */ - TransferDatabase( - TransferType?: AcDataTransferType, DatabaseType?: any, DatabaseName?: any, ObjectType?: AcObjectType, Source?: any, Destination?: any, StructureOnly?: any, StoreLogin?: any): void; - TransferSharePointList(TransferType: AcSharePointListTransferType, SiteAddress: any, ListID: any, ViewID?: any, TableName?: any, GetLookupDisplayValues?: any): void; + TransferDatabase(TransferType?: AcDataTransferType, DatabaseType?: DatabaseType, DatabaseName?: string, ObjectType?: AcObjectType, Source?: string, Destination?: string, StructureOnly?: boolean, StoreLogin?: boolean): void; + TransferSharePointList(TransferType: AcSharePointListTransferType, SiteAddress: string, ListID: string, ViewID?: string, TableName?: string, GetLookupDisplayValues?: boolean): void; /** - * @param Access.AcDataTransferType [TransferType=0] - * @param Access.AcSpreadSheetType [SpreadsheetType=10] + * @param TransferType [TransferType=0] + * @param SpreadsheetType [SpreadsheetType=10] + * @param HasFieldNames [HasFieldNames=false] */ - TransferSpreadsheet(TransferType?: AcDataTransferType, SpreadsheetType?: AcSpreadSheetType, TableName?: any, FileName?: any, HasFieldNames?: any, Range?: any, UseOA?: any): void; - TransferSQLDatabase(Server: any, Database: any, UseTrustedConnection?: any, Login?: any, Password?: any, TransferCopyData?: any): void; + TransferSpreadsheet(TransferType: AcDataTransferType.acImport, SpreadsheetType?: AcSpreadSheetType, TableName?: string, FileName?: string, HasFieldNames?: boolean, Range?: any): void; - /** @param Access.AcTextTransferType [TransferType=0] */ - TransferText(TransferType?: AcTextTransferType, SpecificationName?: any, TableName?: any, FileName?: any, HasFieldNames?: any, HTMLTableName?: any, CodePage?: any): void; + /** + * @param TransferType [TransferType=0] + * @param SpreadsheetType [SpreadsheetType=10] + * @param HasFieldNames [HasFieldNames=false] + */ + TransferSpreadsheet(TransferType?: AcDataTransferType, SpreadsheetType?: AcSpreadSheetType, TableName?: string, FileName?: string, HasFieldNames?: boolean): void; + TransferSQLDatabase(Server: string, Database: string, UseTrustedConnection?: boolean, Login?: string, Password?: string, TransferCopyData?: boolean): void; + + /** + * @param TransferType [TransferType=0] + * @param Encoding For valid values see https://msdn.microsoft.com/en-us/library/windows/desktop/dd317756(v=vs.85).aspx + */ + TransferText(TransferType?: AcTextTransferType.acExportHTML | AcTextTransferType.acImportHTML, SpecificationName?: string, TableName?: string, FileName?: string, HasFieldNames?: boolean, HTMLTableName?: string, CodePage?: number): void; + TransferText(TransferType?: AcTextTransferType, SpecificationName?: string, TableName?: string, FileName?: string, HasFieldNames?: boolean, HTMLTableName?: undefined, CodePage?: number): void; } class EmptyCell { @@ -4559,7 +4532,7 @@ declare namespace Access { readonly LayoutID: number; Left: number; LeftPadding: number; - Move(Left: any, Top?: any, Width?: any, Height?: any): void; + Move(Left: number, Top?: number, Width?: number, Height?: number): void; Name: string; readonly Parent: any; readonly Properties: Properties; @@ -4577,13 +4550,12 @@ declare namespace Access { Width: number; } - class Entities { - private 'Access.Entities_typekey': Entities; - private constructor(); + interface Entities { readonly Count: number; IsMemberSafe(dispid: number): boolean; Item(Index: any): Entity; readonly Parent: any; + (Index: any): Entity; } class Entity { @@ -4671,7 +4643,7 @@ declare namespace Access { BeforeUpdateMacro: string; BeginBatchEdit: string; BeginBatchEditMacro: string; - Bookmark: any; + Bookmark: ADODB.Bookmark | DAO.Bookmark; BorderStyle: number; Caption: string; readonly ChartSpace: any; @@ -4732,8 +4704,8 @@ declare namespace Access { FrozenColumns: number; /** - * @param number [Right=0] - * @param number [Down=0] + * @param Right [Right=0] + * @param Down [Down=0] */ GoToPage(PageNumber: number, Right?: number, Down?: number): void; GridX: number; @@ -4760,7 +4732,7 @@ declare namespace Access { readonly Module: Module; MouseWheel: string; MouseWheelMacro: string; - Move(Left: any, Top?: any, Width?: any, Height?: any): void; + Move(Left: number, Top?: number, Width?: number, Height?: number): void; Moveable: boolean; Name: string; NavigationButtons: boolean; @@ -4824,7 +4796,7 @@ declare namespace Access { OnUndoMacro: string; OnUnload: string; OnUnloadMacro: string; - OpenArgs: any; + OpenArgs: string; OrderBy: string; OrderByOn: boolean; OrderByOnLoad: boolean; @@ -4856,8 +4828,8 @@ declare namespace Access { Recalc(): void; RecordLocks: number; RecordSelectors: boolean; - Recordset: any; - readonly RecordsetClone: any; + Recordset: DAO.Recordset | ADODB.Recordset | null; + readonly RecordsetClone: DAO.Recordset | ADODB.Recordset; RecordsetType: number; RecordSource: string; RecordSourceQualifier: string; @@ -4870,7 +4842,7 @@ declare namespace Access { RollbackTransactionMacro: string; RowHeight: number; ScrollBars: number; - Section(Index: any): Section; + Section(Index: AcFormSection | string): Section; SectionOld(Index: any): Section; SelectionChange: string; SelectionChangeMacro: string; @@ -4932,8 +4904,15 @@ declare namespace Access { LongestBarLimit: AcFormatBarLimits; LongestBarValue: string; - /** @param Access.AcFormatConditionOperator [Operator=0] */ - Modify(Type: AcFormatConditionType, Operator?: AcFormatConditionOperator, Expression1?: any, Expression2?: any): void; + /** @param Operator [Operator=0] */ + Modify(Type: AcFormatConditionType.acExpression, Operator: undefined, Expression1: string | number | boolean): void; + + /** @param Operator [Operator=0] */ + Modify(Type: AcFormatConditionType, Operator: AcFormatConditionOperator.acBetween | AcFormatConditionOperator.acNotBetween, Expression1: string | number | boolean, Expression2: string | number | boolean): void; + + /** @param Operator [Operator=0] */ + Modify(Type: AcFormatConditionType, Operator?: AcFormatConditionOperator, Expression1?: string | number | boolean): void; + readonly Operator: AcFormatConditionOperator; ShortestBarLimit: AcFormatBarLimits; ShortestBarValue: string; @@ -4941,475 +4920,32 @@ declare namespace Access { readonly Type: AcFormatConditionType; } - class FormatConditions { - private 'Access.FormatConditions_typekey': FormatConditions; - private constructor(); + interface FormatConditions { + /** @param Operator [Operator=0] */ + Add(Type: AcFormatConditionType.acExpression, Operator: undefined, Expression1: string | number | boolean): FormatCondition; + + /** @param Operator [Operator=0] */ + Add(Type: AcFormatConditionType, Operator: AcFormatConditionOperator.acBetween | AcFormatConditionOperator.acNotBetween, Expression1: string | number | boolean, Expression2: string | number | boolean): FormatCondition; + + /** @param Operator [Operator=0] */ + Add(Type: AcFormatConditionType, Operator?: AcFormatConditionOperator, Expression1?: string | number | boolean): FormatCondition; - /** @param Access.AcFormatConditionOperator [Operator=0] */ - Add(Type: AcFormatConditionType, Operator?: AcFormatConditionOperator, Expression1?: any, Expression2?: any): FormatCondition; readonly Application: Application; readonly Count: number; Delete(): void; IsMemberSafe(dispid: number): boolean; - Item(Index: any): FormatCondition; + Item(Index: number): FormatCondition; readonly Parent: any; + (Index: number): FormatCondition; } - class FormOld { - private 'Access.FormOld_typekey': FormOld; - private constructor(); - _Evaluate(bstrExpr: string, ...ppsa: any[]): any; - _Name: string; - accChild(varChild: any): any; - readonly accChildCount: number; - accDefaultAction(varChild?: any): string; - accDescription(varChild?: any): string; - accDoDefaultAction(varChild?: any): void; - readonly accFocus: any; - accHelp(varChild?: any): string; - accHelpTopic(pszHelpFile: string, varChild?: any): number; - accHitTest(xLeft: number, yTop: number): any; - accKeyboardShortcut(varChild?: any): string; - accLocation(pxLeft: number, pyTop: number, pcxWidth: number, pcyHeight: number, varChild?: any): void; - accName(varChild?: any): string; - accNavigate(navDir: number, varStart?: any): any; - readonly accParent: any; - accRole(varChild?: any): any; - accSelect(flagsSelect: number, varChild?: any): void; - readonly accSelection: any; - accState(varChild?: any): any; - accValue(varChild?: any): string; - acHiddenCurrentPage: number; - readonly ActiveControl: Control; - AfterDelConfirm: string; - AfterInsert: string; - AfterUpdate: string; - AllowAdditions: boolean; - AllowDeletions: boolean; - AllowDesignChanges: boolean; - AllowEditing: boolean; - AllowEdits: boolean; - AllowFilters: boolean; - AllowUpdating: number; - readonly Application: Application; - AutoCenter: boolean; - AutoResize: boolean; - BeforeDelConfirm: string; - BeforeInsert: string; - BeforeUpdate: string; - Bookmark: any; - BorderStyle: number; - Caption: string; - CloseButton: boolean; - readonly ConnectControl: Control; - ConnectSynch: number; - ControlBox: boolean; - readonly Controls: Controls; - Count: number; - CurrentRecord: number; - CurrentSectionLeft: number; - CurrentSectionTop: number; - CurrentView: number; - Cycle: number; - DataEntry: boolean; - DatasheetBackColor: number; - DatasheetCellsEffect: number; - DatasheetFontHeight: number; - DatasheetFontItalic: boolean; - DatasheetFontName: string; - DatasheetFontUnderline: boolean; - DatasheetFontWeight: number; - DatasheetForeColor: number; - DatasheetGridlinesBehavior: number; - DatasheetGridlinesColor: number; - DefaultControl(ControlType: number): Control; - DefaultEditing: number; - DefaultView: number; - Dirty: boolean; - DividingLines: boolean; - readonly Dynaset: any; - FastLaserPrinting: boolean; - Filter: string; - FilterOn: boolean; - readonly Form: Form; - FormName: string; - FrozenColumns: number; - - /** - * @param number [Right=0] - * @param number [Down=0] - */ - GoToPage(PageNumber: number, Right?: number, Down?: number): void; - GridX: number; - GridY: number; - HasModule: boolean; - HelpContextId: number; - HelpFile: string; - Hwnd: number; - InputParameters: string; - InsideHeight: number; - InsideWidth: number; - KeyPreview: boolean; - LayoutForPrint: boolean; - LogicalPageHeight: number; - LogicalPageWidth: number; - MaxButton: boolean; - MaxRecButton: boolean; - MaxRecords: number; - MenuBar: string; - MinButton: boolean; - MinMaxButtons: number; - Modal: boolean; - readonly Module: Module; - Name: string; - NavigationButtons: boolean; - readonly NewRecord: number; - OnActivate: string; - OnApplyFilter: string; - OnClick: string; - OnClose: string; - OnCurrent: string; - OnDblClick: string; - OnDeactivate: string; - OnDelete: string; - OnDirty: string; - OnError: string; - OnFilter: string; - OnGotFocus: string; - OnInsert: string; - OnKeyDown: string; - OnKeyPress: string; - OnKeyUp: string; - OnLoad: string; - OnLostFocus: string; - OnMenu: string; - OnMouseDown: string; - OnMouseMove: string; - OnMouseUp: string; - OnOpen: string; - OnResize: string; - OnTimer: string; - OnUnload: string; - OpenArgs: any; - OrderBy: string; - OrderByOn: boolean; - Orientation: number; - Page: number; - Pages: number; - Painting: boolean; - PaintPalette: any; - PaletteSource: string; - readonly Parent: any; - Picture: string; - PictureAlignment: number; - PictureData: any; - PicturePalette: any; - PictureSizeMode: number; - PictureTiling: boolean; - PictureType: number; - PopUp: boolean; - readonly Properties: Properties; - PrtDevMode: any; - PrtDevNames: any; - PrtMip: any; - Recalc(): void; - RecordLocks: number; - RecordSelectors: boolean; - Recordset: any; - readonly RecordsetClone: any; - RecordsetType: number; - RecordSource: string; - Refresh(): void; - Repaint(): void; - Requery(): void; - ResyncCommand: string; - RowHeight: number; - ScrollBars: number; - Section(Index: any): Section; - SelHeight: number; - SelLeft: number; - SelTop: number; - SelWidth: number; - ServerFilter: string; - ServerFilterByForm: boolean; - SetFocus(): void; - ShortcutMenu: boolean; - ShortcutMenuBar: string; - ShowGrid: boolean; - SubdatasheetExpanded: boolean; - SubdatasheetHeight: number; - TabularCharSet: number; - TabularFamily: number; - Tag: string; - TimerInterval: number; - Toolbar: string; - Undo(): void; - UniqueTable: string; - ViewsAllowed: number; - Visible: boolean; - WhatsThisButton: boolean; - Width: number; - WindowHeight: number; - WindowWidth: number; - ZoomControl: number; - } - - class FormOldV10 { - private 'Access.FormOldV10_typekey': FormOldV10; - private constructor(); - _Evaluate(bstrExpr: string, ...ppsa: any[]): any; - _Name: string; - accChild(varChild: any): any; - readonly accChildCount: number; - accDefaultAction(varChild?: any): string; - accDescription(varChild?: any): string; - accDoDefaultAction(varChild?: any): void; - readonly accFocus: any; - accHelp(varChild?: any): string; - accHelpTopic(pszHelpFile: string, varChild?: any): number; - accHitTest(xLeft: number, yTop: number): any; - accKeyboardShortcut(varChild?: any): string; - accLocation(pxLeft: number, pyTop: number, pcxWidth: number, pcyHeight: number, varChild?: any): void; - accName(varChild?: any): string; - accNavigate(navDir: number, varStart?: any): any; - readonly accParent: any; - accRole(varChild?: any): any; - accSelect(flagsSelect: number, varChild?: any): void; - readonly accSelection: any; - accState(varChild?: any): any; - accValue(varChild?: any): string; - acHiddenCurrentPage: number; - readonly ActiveControl: Control; - AfterBeginTransaction: string; - AfterCommitTransaction: string; - AfterDelConfirm: string; - AfterFinalRender: string; - AfterInsert: string; - AfterLayout: string; - AfterRender: string; - AfterUpdate: string; - AllowAdditions: boolean; - AllowDatasheetView: boolean; - AllowDeletions: boolean; - AllowDesignChanges: boolean; - AllowEditing: boolean; - AllowEdits: boolean; - AllowFilters: boolean; - AllowFormView: boolean; - AllowPivotChartView: boolean; - AllowPivotTableView: boolean; - AllowUpdating: number; - readonly Application: Application; - AutoCenter: boolean; - AutoResize: boolean; - BatchUpdates: boolean; - BeforeBeginTransaction: string; - BeforeCommitTransaction: string; - BeforeDelConfirm: string; - BeforeInsert: string; - BeforeQuery: string; - BeforeRender: string; - BeforeScreenTip: string; - BeforeUpdate: string; - BeginBatchEdit: string; - Bookmark: any; - BorderStyle: number; - Caption: string; - readonly ChartSpace: any; - CloseButton: boolean; - CommandBeforeExecute: string; - CommandChecked: string; - CommandEnabled: string; - CommandExecute: string; - CommitOnClose: number; - CommitOnNavigation: boolean; - readonly ConnectControl: Control; - ConnectSynch: number; - ControlBox: boolean; - readonly Controls: Controls; - Count: number; - CurrentRecord: number; - CurrentSectionLeft: number; - CurrentSectionTop: number; - CurrentView: number; - Cycle: number; - DataChange: string; - DataEntry: boolean; - DataSetChange: string; - DatasheetBackColor: number; - DatasheetBorderLineStyle: number; - DatasheetCellsEffect: number; - DatasheetColumnHeaderUnderlineStyle: number; - DatasheetFontHeight: number; - DatasheetFontItalic: boolean; - DatasheetFontName: string; - DatasheetFontUnderline: boolean; - DatasheetFontWeight: number; - DatasheetForeColor: number; - DatasheetGridlinesBehavior: number; - DatasheetGridlinesColor: number; - DefaultControl(ControlType: number): Control; - DefaultEditing: number; - DefaultView: number; - Dirty: boolean; - DividingLines: boolean; - readonly Dynaset: any; - FastLaserPrinting: boolean; - FetchDefaults: boolean; - Filter: string; - FilterOn: boolean; - readonly Form: Form; - FormName: string; - FrozenColumns: number; - - /** - * @param number [Right=0] - * @param number [Down=0] - */ - GoToPage(PageNumber: number, Right?: number, Down?: number): void; - GridX: number; - GridY: number; - HasModule: boolean; - HelpContextId: number; - HelpFile: string; - HorizontalDatasheetGridlineStyle: number; - Hwnd: number; - InputParameters: string; - InsideHeight: number; - InsideWidth: number; - KeyPreview: boolean; - LayoutForPrint: boolean; - LogicalPageHeight: number; - LogicalPageWidth: number; - MaxButton: boolean; - MaxRecButton: boolean; - MaxRecords: number; - MenuBar: string; - MinButton: boolean; - MinMaxButtons: number; - Modal: boolean; - readonly Module: Module; - MouseWheel: string; - Move(Left: any, Top?: any, Width?: any, Height?: any): void; - Moveable: boolean; - Name: string; - NavigationButtons: boolean; - readonly NewRecord: number; - OnActivate: string; - OnApplyFilter: string; - OnClick: string; - OnClose: string; - OnConnect: string; - OnCurrent: string; - OnDblClick: string; - OnDeactivate: string; - OnDelete: string; - OnDirty: string; - OnDisconnect: string; - OnError: string; - OnFilter: string; - OnGotFocus: string; - OnInsert: string; - OnKeyDown: string; - OnKeyPress: string; - OnKeyUp: string; - OnLoad: string; - OnLostFocus: string; - OnMenu: string; - OnMouseDown: string; - OnMouseMove: string; - OnMouseUp: string; - OnOpen: string; - OnRecordExit: string; - OnResize: string; - OnTimer: string; - OnUndo: string; - OnUnload: string; - OpenArgs: any; - OrderBy: string; - OrderByOn: boolean; - Orientation: number; - Page: number; - Pages: number; - Painting: boolean; - PaintPalette: any; - PaletteSource: string; - readonly Parent: any; - Picture: string; - PictureAlignment: number; - PictureData: any; - PicturePalette: any; - PictureSizeMode: number; - PictureTiling: boolean; - PictureType: number; - readonly PivotTable: any; - PivotTableChange: string; - PopUp: boolean; - Printer: Printer; - readonly Properties: Properties; - PrtDevMode: any; - PrtDevNames: any; - PrtMip: any; - Query: string; - Recalc(): void; - RecordLocks: number; - RecordSelectors: boolean; - Recordset: any; - readonly RecordsetClone: any; - RecordsetType: number; - RecordSource: string; - RecordSourceQualifier: string; - Refresh(): void; - Repaint(): void; - Requery(): void; - ResyncCommand: string; - RollbackTransaction: string; - RowHeight: number; - ScrollBars: number; - Section(Index: any): Section; - SelectionChange: string; - SelHeight: number; - SelLeft: number; - SelTop: number; - SelWidth: number; - ServerFilter: string; - ServerFilterByForm: boolean; - SetFocus(): void; - ShortcutMenu: boolean; - ShortcutMenuBar: string; - ShowGrid: boolean; - SubdatasheetExpanded: boolean; - SubdatasheetHeight: number; - TabularCharSet: number; - TabularFamily: number; - Tag: string; - TimerInterval: number; - Toolbar: string; - Undo(): void; - UndoBatchEdit: string; - UniqueTable: string; - UseDefaultPrinter: boolean; - VerticalDatasheetGridlineStyle: number; - ViewChange: string; - ViewsAllowed: number; - Visible: boolean; - WhatsThisButton: boolean; - Width: number; - WindowHeight: number; - readonly WindowLeft: number; - readonly WindowTop: number; - WindowWidth: number; - ZoomControl: number; - } - - class Forms { - private 'Access.Forms_typekey': Forms; - private constructor(); + interface Forms { readonly Application: Application; readonly Count: number; IsMemberSafe(dispid: number): boolean; Item(Index: number | string): Form; readonly Parent: any; + (Index: number | string): Form; } class GroupLevel { @@ -5437,10 +4973,10 @@ declare namespace Access { EmailSubject: string; /** - * @param boolean [NewWindow=false] - * @param boolean [AddHistory=true] - * @param Office.MsoExtraInfoMethod [Method=0] - * @param string [HeaderInfo=''] + * @param NewWindow [NewWindow=false] + * @param AddHistory [AddHistory=true] + * @param Method [Method=0] + * @param HeaderInfo [HeaderInfo=''] */ Follow(NewWindow?: boolean, AddHistory?: boolean, ExtraInfo?: any, Method?: Office.MsoExtraInfoMethod, HeaderInfo?: string): void; IsMemberSafe(dispid: number): boolean; @@ -5502,7 +5038,7 @@ declare namespace Access { readonly LayoutID: number; Left: number; LeftPadding: number; - Move(Left: any, Top?: any, Width?: any, Height?: any): void; + Move(Left: number, Top?: number, Width?: number, Height?: number): void; Name: string; ObjectPalette: any; OldBorderStyle: number; @@ -5547,22 +5083,22 @@ declare namespace Access { readonly Application: Application; Delete(): void; Description: string; - Execute(Prompt?: any): void; + Execute(Prompt?: boolean): void; IsMemberSafe(dispid: number): boolean; Name: string; readonly Parent: any; XML: string; } - class ImportExportSpecifications { - private 'Access.ImportExportSpecifications_typekey': ImportExportSpecifications; - private constructor(); + // tslint:disable-next-line:interface-name + interface ImportExportSpecifications { Add(Name: string, SpecificationDefinition: string): ImportExportSpecification; readonly Application: Application; readonly Count: number; IsMemberSafe(dispid: number): boolean; - Item(Index: any): ImportExportSpecification; + Item(Index: number | string): ImportExportSpecification; readonly Parent: any; + (Index: number | string): ImportExportSpecification; } class Label { @@ -5647,7 +5183,7 @@ declare namespace Access { LeftMargin: number; LeftPadding: number; LineSpacing: number; - Move(Left: any, Top?: any, Width?: any, Height?: any): void; + Move(Left: number, Top?: number, Width?: number, Height?: number): void; Name: string; NumeralShapes: number; OldBorderStyle: number; @@ -5709,7 +5245,7 @@ declare namespace Access { IsVisible: boolean; Left: number; LineSlant: boolean; - Move(Left: any, Top?: any, Width?: any, Height?: any): void; + Move(Left: number, Top?: number, Width?: number, Height?: number): void; Name: string; OldBorderStyle: number; readonly Parent: any; @@ -5749,7 +5285,7 @@ declare namespace Access { accState(varChild?: any): any; accValue(varChild?: any): string; AddColon: boolean; - AddItem(Item: string, Index?: any): void; + AddItem(Item: string, Index?: number): void; AfterUpdate: string; AfterUpdateMacro: string; AllowValueListEdits: boolean; @@ -5770,7 +5306,7 @@ declare namespace Access { BorderWidth: number; BottomPadding: number; BoundColumn: number; - Column(Index: number, Row?: any): any; + Column(Index: number, Row?: number): any; ColumnCount: number; ColumnHeads: boolean; ColumnHidden: boolean; @@ -5834,7 +5370,7 @@ declare namespace Access { ListIndex: number; ListItemsEditForm: string; Locked: boolean; - Move(Left: any, Top?: any, Width?: any, Height?: any): void; + Move(Left: number, Top?: number, Width?: number, Height?: number): void; MultiSelect: number; Name: string; NumeralShapes: number; @@ -5867,8 +5403,8 @@ declare namespace Access { readonly Parent: any; readonly Properties: Properties; ReadingOrder: number; - Recordset: any; - RemoveItem(Index: any): void; + Recordset: DAO.Recordset | ADODB.Recordset; + RemoveItem(Index: number | string): void; Requery(): void; RightPadding: number; RowSource: string; @@ -5909,15 +5445,14 @@ declare namespace Access { Value: any; } - class LocalVars { - private 'Access.LocalVars_typekey': LocalVars; - private constructor(); + interface LocalVars { Add(Name: string, Value: any): void; readonly Application: Application; readonly Count: number; IsMemberSafe(dispid: number): boolean; Item(Index: any): LocalVar; readonly Parent: any; + (Index: any): LocalVar; } class MacroError { @@ -5944,9 +5479,9 @@ declare namespace Access { DeleteLines(StartLine: number, Count: number): void; /** - * @param boolean [WholeWord=false] - * @param boolean [MatchCase=false] - * @param boolean [PatternSearch=false] + * @param WholeWord [WholeWord=false] + * @param MatchCase [MatchCase=false] + * @param PatternSearch [PatternSearch=false] */ Find(Target: string, StartLine: number, StartColumn: number, EndLine: number, EndColumn: number, WholeWord?: boolean, MatchCase?: boolean, PatternSearch?: boolean): boolean; InsertLines(Line: number, String: string): void; @@ -5963,14 +5498,13 @@ declare namespace Access { readonly Type: AcModuleType; } - class Modules { - private 'Access.Modules_typekey': Modules; - private constructor(); + interface Modules { readonly Application: Application; readonly Count: number; IsMemberSafe(dispid: number): boolean; - Item(Index: any): Module; + Item(Index: number | string): Module; readonly Parent: any; + (Index: number | string): Module; } class NavigationButton { @@ -6075,7 +5609,7 @@ declare namespace Access { readonly LayoutID: number; readonly Left: number; LeftPadding: number; - Move(Left: any, Top?: any, Width?: any, Height?: any): void; + Move(Left: number, Top?: number, Width?: number, Height?: number): void; Name: string; NavigationTargetName: string; NavigationWhereClause: string; @@ -6223,7 +5757,7 @@ declare namespace Access { Left: number; LeftPadding: number; LineSpacing: number; - Move(Left: any, Top?: any, Width?: any, Height?: any): void; + Move(Left: number, Top?: number, Width?: number, Height?: number): void; Name: string; NumeralShapes: number; OldBorderStyle: number; @@ -6360,7 +5894,7 @@ declare namespace Access { LinkMasterFields: string; Locked: boolean; LpOleObject: number; - Move(Left: any, Top?: any, Width?: any, Height?: any): void; + Move(Left: number, Top?: number, Width?: number, Height?: number): void; Name: string; readonly Object: any; ObjectPalette: any; @@ -6426,7 +5960,7 @@ declare namespace Access { private 'Access.Operation_typekey': Operation; private constructor(); - /** @param string [bstrParameters=''] */ + /** @param bstrParameters [bstrParameters=''] */ Execute(bstrParameters?: string): any; IsMemberSafe(dispid: number): boolean; readonly Name: string; @@ -6434,13 +5968,12 @@ declare namespace Access { readonly WSParameters: WSParameters; } - class Operations { - private 'Access.Operations_typekey': Operations; - private constructor(); + interface Operations { readonly Count: number; IsMemberSafe(dispid: number): boolean; - Item(Index: any): Operation; + Item(Index: number | string): Operation; readonly Parent: any; + (Index: number | string): Operation; } class OptionButton { @@ -6522,7 +6055,7 @@ declare namespace Access { Left: number; LeftPadding: number; Locked: boolean; - Move(Left: any, Top?: any, Width?: any, Height?: any): void; + Move(Left: number, Top?: number, Width?: number, Height?: number): void; Name: string; OldBorderStyle: number; readonly OldValue: any; @@ -6644,7 +6177,7 @@ declare namespace Access { LabelY: number; Left: number; Locked: boolean; - Move(Left: any, Top?: any, Width?: any, Height?: any): void; + Move(Left: number, Top?: number, Width?: number, Height?: number): void; Name: string; OldBorderStyle: number; readonly OldValue: any; @@ -6723,7 +6256,7 @@ declare namespace Access { IsMemberSafe(dispid: number): boolean; IsVisible: boolean; Left: number; - Move(Left: any, Top?: any, Width?: any, Height?: any): void; + Move(Left: number, Top?: number, Width?: number, Height?: number): void; Name: string; OnClick: string; OnClickMacro: string; @@ -6767,7 +6300,7 @@ declare namespace Access { IsMemberSafe(dispid: number): boolean; IsVisible: boolean; Left: number; - Move(Left: any, Top?: any, Width?: any, Height?: any): void; + Move(Left: number, Top?: number, Width?: number, Height?: number): void; Name: string; readonly Parent: any; readonly Properties: Properties; @@ -6778,14 +6311,13 @@ declare namespace Access { Visible: boolean; } - class Pages { - private 'Access.Pages_typekey': Pages; - private constructor(); - Add(Before?: any): Page; + interface Pages { + Add(Before?: number): Page; readonly Count: number; IsMemberSafe(dispid: number): boolean; - Item(Index: any): Page; - Remove(Item?: any): void; + Item(Index: number | string): Page; + Remove(Item?: number): void; + (Index: number | string): Page; } class PaletteButton { @@ -6826,7 +6358,7 @@ declare namespace Access { LabelY: number; Left: number; Locked: boolean; - Move(Left: any, Top?: any, Width?: any, Height?: any): void; + Move(Left: number, Top?: number, Width?: number, Height?: number): void; Name: string; readonly OldValue: any; OnClick: string; @@ -6902,24 +6434,22 @@ declare namespace Access { TopMargin: number; } - class Printers { - private 'Access.Printers_typekey': Printers; - private constructor(); + interface Printers { readonly Application: Application; readonly Count: number; IsMemberSafe(dispid: number): boolean; - Item(Index: any): Printer; + Item(Index: number | string): Printer; readonly Parent: any; + (Index: number | string): Printer; } - class Properties { - private 'Access.Properties_typekey': Properties; - private constructor(); + interface Properties { readonly Application: Application; readonly Count: number; IsMemberSafe(dispid: number): boolean; - Item(Index: any): any; + Item(Index: number | string): AccessProperty; readonly Parent: any; + (Index: number | string): AccessProperty; } class Rectangle { @@ -6950,7 +6480,7 @@ declare namespace Access { IsMemberSafe(dispid: number): boolean; IsVisible: boolean; Left: number; - Move(Left: any, Top?: any, Width?: any, Height?: any): void; + Move(Left: number, Top?: number, Width?: number, Height?: number): void; Name: string; OldBorderStyle: number; OnClick: string; @@ -6990,16 +6520,15 @@ declare namespace Access { readonly Name: string; } - class References { - private 'Access.References_typekey': References; - private constructor(); + interface References { AddFromFile(FileName: string): Reference; AddFromGuid(Guid: string, Major: number, Minor: number): Reference; readonly Count: number; IsMemberSafe(dispid: number): boolean; - Item(var_0: any): Reference; + Item(var_0: number | string): Reference; readonly Parent: any; Remove(Reference: Reference): void; + (var_0: number | string): Reference; } class Report { @@ -7075,7 +6604,7 @@ declare namespace Access { readonly Module: Module; MouseWheel: string; MouseWheelMacro: string; - Move(Left: any, Top?: any, Width?: any, Height?: any): void; + Move(Left: number, Top?: number, Width?: number, Height?: number): void; Moveable: boolean; MoveLayout: boolean; Name: string; @@ -7129,7 +6658,7 @@ declare namespace Access { OnTimerMacro: string; OnUnload: string; OnUnloadMacro: string; - OpenArgs: any; + OpenArgs: string; OrderBy: string; OrderByOn: boolean; OrderByOnLoad: boolean; @@ -7161,7 +6690,7 @@ declare namespace Access { PrtMip: any; PSet(flags: number, X: number, Y: number, color: number): void; RecordLocks: number; - Recordset: any; + Recordset: DAO.Recordset | ADODB.Recordset | null; RecordSource: string; RecordSourceQualifier: string; readonly Report: Report; @@ -7174,7 +6703,7 @@ declare namespace Access { ScaleTop: number; ScaleWidth: number; ScrollBars: number; - Section(Index: any): Section; + Section(Index: AcReportSection | string): Section; SectionOld(Index: any): Section; ServerFilter: string; readonly Shape: string; @@ -7196,281 +6725,31 @@ declare namespace Access { ZoomControl: number; } - class ReportOld { - private 'Access.ReportOld_typekey': ReportOld; - private constructor(); - _Evaluate(bstrExpr: string, ...ppsa: any[]): any; - _Name: string; - acHiddenCurrentPage: number; - readonly ActiveControl: Control; - readonly Application: Application; - Caption: string; - Circle(flags: number, X: number, Y: number, radius: number, color: number, start: number, end: number, aspect: number): void; - readonly Controls: Controls; - Count: number; - CurrentRecord: number; - CurrentX: number; - CurrentY: number; - DateGrouping: number; - DefaultControl(ControlType: number): Control; - Dirty: boolean; - DrawMode: number; - DrawStyle: number; - DrawWidth: number; - FastLaserPrinting: boolean; - FillColor: number; - FillStyle: number; - Filter: string; - FilterOn: boolean; - FontBold: number; - FontItalic: number; - FontName: string; - FontSize: number; - FontUnderline: number; - ForeColor: number; - FormatCount: number; - FormName: string; - GridX: number; - GridY: number; - GroupLevel(Index: number): GroupLevel; - GrpKeepTogether: number; - HasData: number; - HasModule: boolean; - Height: number; - HelpContextId: number; - HelpFile: string; - Hwnd: number; - InputParameters: string; - LayoutForPrint: boolean; - Left: number; - Line(flags: number, x1: number, y1: number, x2: number, y2: number, color: number): void; - LogicalPageHeight: number; - LogicalPageWidth: number; - MaxButton: boolean; - MenuBar: string; - MinButton: boolean; - readonly Module: Module; - MoveLayout: boolean; - Name: string; - NextRecord: boolean; - OnActivate: string; - OnClose: string; - OnDeactivate: string; - OnError: string; - OnMenu: string; - OnNoData: string; - OnOpen: string; - OnPage: string; - OrderBy: string; - OrderByOn: boolean; - Orientation: number; - Page: number; - PageFooter: number; - PageHeader: number; - Pages: number; - Painting: boolean; - PaintPalette: any; - PaletteSource: string; - readonly Parent: any; - Picture: string; - PictureAlignment: number; - PictureData: any; - PicturePages: number; - PicturePalette: any; - PictureSizeMode: number; - PictureTiling: boolean; - PictureType: number; - Print(Expr: string): void; - PrintCount: number; - PrintSection: boolean; - readonly Properties: Properties; - PrtDevMode: any; - PrtDevNames: any; - PrtMip: any; - PSet(flags: number, X: number, Y: number, color: number): void; - RecordLocks: number; - RecordSource: string; - readonly Report: Report; - Scale(flags: number, x1: number, y1: number, x2: number, y2: number): void; - ScaleHeight: number; - ScaleLeft: number; - ScaleMode: number; - ScaleTop: number; - ScaleWidth: number; - Section(Index: any): Section; - ServerFilter: string; - ShortcutMenuBar: string; - Tag: string; - TextHeight(Expr: string): number; - TextWidth(Expr: string): number; - Toolbar: string; - Top: number; - Visible: boolean; - Width: number; - ZoomControl: number; - } - - class ReportOldV10 { - private 'Access.ReportOldV10_typekey': ReportOldV10; - private constructor(); - _Evaluate(bstrExpr: string, ...ppsa: any[]): any; - _Name: string; - acHiddenCurrentPage: number; - readonly ActiveControl: Control; - readonly Application: Application; - AutoCenter: boolean; - AutoResize: boolean; - BorderStyle: number; - Caption: string; - Circle(flags: number, X: number, Y: number, radius: number, color: number, start: number, end: number, aspect: number): void; - CloseButton: boolean; - ControlBox: boolean; - readonly Controls: Controls; - Count: number; - CurrentRecord: number; - CurrentX: number; - CurrentY: number; - DateGrouping: number; - DefaultControl(ControlType: number): Control; - Dirty: boolean; - DrawMode: number; - DrawStyle: number; - DrawWidth: number; - FastLaserPrinting: boolean; - FillColor: number; - FillStyle: number; - Filter: string; - FilterOn: boolean; - FontBold: number; - FontItalic: number; - FontName: string; - FontSize: number; - FontUnderline: number; - ForeColor: number; - FormatCount: number; - FormName: string; - GridX: number; - GridY: number; - GroupLevel(Index: number): GroupLevel; - GrpKeepTogether: number; - HasData: number; - HasModule: boolean; - Height: number; - HelpContextId: number; - HelpFile: string; - Hwnd: number; - InputParameters: string; - LayoutForPrint: boolean; - Left: number; - Line(flags: number, x1: number, y1: number, x2: number, y2: number, color: number): void; - LogicalPageHeight: number; - LogicalPageWidth: number; - MaxButton: boolean; - MenuBar: string; - MinButton: boolean; - MinMaxButtons: number; - Modal: boolean; - readonly Module: Module; - Move(Left: any, Top?: any, Width?: any, Height?: any): void; - Moveable: boolean; - MoveLayout: boolean; - Name: string; - NextRecord: boolean; - OnActivate: string; - OnClose: string; - OnDeactivate: string; - OnError: string; - OnMenu: string; - OnNoData: string; - OnOpen: string; - OnPage: string; - OpenArgs: any; - OrderBy: string; - OrderByOn: boolean; - Orientation: number; - Page: number; - PageFooter: number; - PageHeader: number; - Pages: number; - Painting: boolean; - PaintPalette: any; - PaletteSource: string; - readonly Parent: any; - Picture: string; - PictureAlignment: number; - PictureData: any; - PicturePages: number; - PicturePalette: any; - PictureSizeMode: number; - PictureTiling: boolean; - PictureType: number; - PopUp: boolean; - Print(Expr: string): void; - PrintCount: number; - Printer: Printer; - PrintSection: boolean; - readonly Properties: Properties; - PrtDevMode: any; - PrtDevNames: any; - PrtMip: any; - PSet(flags: number, X: number, Y: number, color: number): void; - RecordLocks: number; - Recordset: any; - RecordSource: string; - RecordSourceQualifier: string; - readonly Report: Report; - Scale(flags: number, x1: number, y1: number, x2: number, y2: number): void; - ScaleHeight: number; - ScaleLeft: number; - ScaleMode: number; - ScaleTop: number; - ScaleWidth: number; - Section(Index: any): Section; - ServerFilter: string; - readonly Shape: string; - ShortcutMenuBar: string; - Tag: string; - TextHeight(Expr: string): number; - TextWidth(Expr: string): number; - Toolbar: string; - Top: number; - UseDefaultPrinter: boolean; - Visible: boolean; - Width: number; - WindowHeight: number; - readonly WindowLeft: number; - readonly WindowTop: number; - WindowWidth: number; - ZoomControl: number; - } - - class Reports { - private 'Access.Reports_typekey': Reports; - private constructor(); + interface Reports { readonly Application: Application; readonly Count: number; IsMemberSafe(dispid: number): boolean; - Item(Index: any): Report; + Item(Index: string | number): Report; readonly Parent: any; + (Index: string | number): Report; } class ReturnVar { private 'Access.ReturnVar_typekey': ReturnVar; private constructor(); - readonly _Value: any; + readonly _Value: string | number; IsMemberSafe(dispid: number): boolean; readonly Name: string; - readonly Value: any; + readonly Value: string | number; } - class ReturnVars { - private 'Access.ReturnVars_typekey': ReturnVars; - private constructor(); + interface ReturnVars { readonly Application: Application; readonly Count: number; IsMemberSafe(dispid: number): boolean; - Item(Index: any): ReturnVar; + Item(Index: number | string): ReturnVar; readonly Parent: any; + (Index: string | number): ReturnVar; } class Screen { @@ -7553,14 +6832,13 @@ declare namespace Access { readonly Type: AcResourceType; } - class SharedResources { - private 'Access.SharedResources_typekey': SharedResources; - private constructor(); + interface SharedResources { readonly Application: Application; readonly Count: number; IsMemberSafe(dispid: number): boolean; Item(Index: number): SharedResource; readonly Parent: any; + (Index: number): SharedResource; } class SmartTag { @@ -7587,25 +6865,23 @@ declare namespace Access { readonly Parent: any; } - class SmartTagActions { - private 'Access.SmartTagActions_typekey': SmartTagActions; - private constructor(); + interface SmartTagActions { readonly Application: Application; readonly Count: number; IsMemberSafe(dispid: number): boolean; - Item(Index: any): SmartTagAction; + Item(Index: number | string): SmartTagAction; readonly Parent: any; + (Index: number | string): SmartTagAction; } - class SmartTagProperties { - private 'Access.SmartTagProperties_typekey': SmartTagProperties; - private constructor(); + interface SmartTagProperties { Add(Name: string, Value: any): SmartTagProperty; readonly Application: Application; readonly Count: number; IsMemberSafe(dispid: number): boolean; - Item(Index: any): SmartTagProperty; + Item(Index: number | string): SmartTagProperty; readonly Parent: any; + (Index: number | string): SmartTagProperty; } class SmartTagProperty { @@ -7617,15 +6893,14 @@ declare namespace Access { Value: string; } - class SmartTags { - private 'Access.SmartTags_typekey': SmartTags; - private constructor(); + interface SmartTags { Add(Name: string): SmartTag; readonly Application: Application; readonly Count: number; IsMemberSafe(dispid: number): boolean; - Item(Index: any): SmartTag; + Item(Index: number | string): SmartTag; readonly Parent: any; + (Index: number | string): SmartTag; } class SubForm { @@ -7701,7 +6976,7 @@ declare namespace Access { LinkChildFields: string; LinkMasterFields: string; Locked: boolean; - Move(Left: any, Top?: any, Width?: any, Height?: any): void; + Move(Left: number, Top?: number, Width?: number, Height?: number): void; Name: string; OldBorderStyle: number; OnEnter: string; @@ -7821,7 +7096,7 @@ declare namespace Access { readonly LayoutID: number; Left: number; LeftPadding: number; - Move(Left: any, Top?: any, Width?: any, Height?: any): void; + Move(Left: number, Top?: number, Width?: number, Height?: number): void; MultiRow: boolean; Name: string; readonly OldValue: any; @@ -7880,23 +7155,22 @@ declare namespace Access { class TempVar { private 'Access.TempVar_typekey': TempVar; private constructor(); - _Value: any; + _Value: number | string | boolean; IsMemberSafe(dispid: number): boolean; readonly Name: string; - Value: any; + Value: number | string | boolean; } - class TempVars { - private 'Access.TempVars_typekey': TempVars; - private constructor(); - Add(Name: string, Value: any): void; + interface TempVars { + Add(Name: string, Value: number | string | boolean): void; readonly Application: Application; readonly Count: number; IsMemberSafe(dispid: number): boolean; - Item(Index: any): TempVar; + Item(Index: number | string): TempVar; readonly Parent: any; - Remove(var_0: any): void; + Remove(Index: number | string): void; RemoveAll(): void; + (Index: number | string): TempVar; } class TextBox { @@ -8019,7 +7293,7 @@ declare namespace Access { LeftPadding: number; LineSpacing: number; Locked: boolean; - Move(Left: any, Top?: any, Width?: any, Height?: any): void; + Move(Left: number, Top?: number, Width?: number, Height?: number): void; Name: string; NumeralShapes: number; OldBorderStyle: number; @@ -8200,7 +7474,7 @@ declare namespace Access { Left: number; LeftPadding: number; Locked: boolean; - Move(Left: any, Top?: any, Width?: any, Height?: any): void; + Move(Left: number, Top?: number, Width?: number, Height?: number): void; Name: string; ObjectPalette: any; readonly OldValue: any; @@ -8336,7 +7610,7 @@ declare namespace Access { Left: number; LeftPadding: number; readonly LocationURL: string; - Move(Left: any, Top?: any, Width?: any, Height?: any): void; + Move(Left: number, Top?: number, Width?: number, Height?: number): void; Name: string; readonly Object: any; readonly OldValue: any; @@ -8416,14 +7690,13 @@ declare namespace Access { readonly Parent: any; } - class WebServices { - private 'Access.WebServices_typekey': WebServices; - private constructor(); + interface WebServices { readonly Application: Application; readonly Count: number; IsMemberSafe(dispid: number): boolean; - Item(Index: any): WebService; + Item(Index: number | string): WebService; readonly Parent: any; + (Index: number | string): WebService; } class WizHook { @@ -8459,12 +7732,8 @@ declare namespace Access { GetColumns(bstrBase: string): string; GetCurrentView(bstrTableName: string): number; GetDisabledExtensions(): string; - GetFileName( - hwndOwner: number, AppName: string, DlgTitle: string, OpenTitle: string, File: string, InitialDir: string, Filter: string, FilterIndex: number, View: number, - flags: number, fOpen: boolean): number; - GetFileName2( - hwndOwner: number, AppName: string, DlgTitle: string, OpenTitle: string, File: string, InitialDir: string, Filter: string, FilterIndex: number, View: number, - flags: number, fOpen: boolean, fFileSystem: any): number; + GetFileName(hwndOwner: number, AppName: string, DlgTitle: string, OpenTitle: string, File: string, InitialDir: string, Filter: string, FilterIndex: number, View: number, flags: number, fOpen: boolean): number; + GetFileName2(hwndOwner: number, AppName: string, DlgTitle: string, OpenTitle: string, File: string, InitialDir: string, Filter: string, FilterIndex: number, View: number, flags: number, fOpen: boolean, fFileSystem: any): number; GetFileOdso(bstrExt: string, bstrFilename: string): number; GetImexTblName(): string; GetInfoForColumns(bstrBase: string): string; @@ -8485,7 +7754,7 @@ declare namespace Access { NameFromActid(Actid: number): string; ObjTypOfRecordSource(RecordSource: string): number; OfficeAddInDir(): string; - OpenEmScript(pProperty: _AccessProperty, OpenMode: number, Extra: number, Version: number): number; + OpenEmScript(pProperty: AccessProperty, OpenMode: number, Extra: number, Version: number): number; OpenPictureFile(File: string, Cancelled: boolean): boolean; OpenScript(Script: string, Label: string, OpenMode: number, Extra: number, Version: number): number; ReportLeaksToFile(fRptToFile: boolean, bstrFileOut: string): void; @@ -8514,13 +7783,12 @@ declare namespace Access { readonly Type: number; } - class WSParameters { - private 'Access.WSParameters_typekey': WSParameters; - private constructor(); + interface WSParameters { readonly Count: number; IsMemberSafe(dispid: number): boolean; - Item(Index: any): WSParameter; + Item(Index: number | string): WSParameter; readonly Parent: any; + (Index: number | string): WSParameter; } namespace EventHelperTypes { @@ -8528,12 +7796,230 @@ declare namespace Access { interface WebBrowserControl_BeforeNavigate2_Parameter { Cancel: boolean; - readonly flags: any; + readonly flags: number; readonly Headers: any; readonly pDisp: any; readonly PostData: any; - readonly TargetFrameName: any; - readonly URL: any; + readonly TargetFrameName: string | null; + readonly URL: string; + } + } +} + +declare namespace AccWizObjects { + const enum WIZ_CSIDL_FLAGS { + WIZ_CSIDL_APPDATA = 26, + WIZ_CSIDL_BITBUCKET = 10, + WIZ_CSIDL_COMMON_DESKTOPDIRECTORY = 25, + WIZ_CSIDL_COMMON_PROGRAMS = 23, + WIZ_CSIDL_COMMON_STARTMENU = 22, + WIZ_CSIDL_COMMON_STARTUP = 24, + WIZ_CSIDL_CONTROLS = 3, + WIZ_CSIDL_DESKTOP = 0, + WIZ_CSIDL_DESKTOPDIRECTORY = 16, + WIZ_CSIDL_DRIVES = 17, + WIZ_CSIDL_FAVORITES = 6, + WIZ_CSIDL_FONTS = 20, + WIZ_CSIDL_NETHOOD = 19, + WIZ_CSIDL_NETWORK = 18, + WIZ_CSIDL_PERSONAL = 5, + WIZ_CSIDL_PRINTERS = 4, + WIZ_CSIDL_PRINTHOOD = 27, + WIZ_CSIDL_PROGRAMS = 2, + WIZ_CSIDL_RECENT = 8, + WIZ_CSIDL_SENDTO = 9, + WIZ_CSIDL_STARTMENU = 11, + WIZ_CSIDL_STARTUP = 7, + WIZ_CSIDL_TEMPLATES = 21, + } + + const enum WIZ_SLGP_FLAGS { + WIZ_SLGP_SHORTPATH = 1, + WIZ_SLGP_UNCPRIORITY = 2, + } + + const enum WIZ_SLR_FLAGS { + WIZ_SLR_ANY_MATCH = 2, + WIZ_SLR_NO_UI = 1, + WIZ_SLR_UPDATE = 4, + } + + const enum WIZ_SW_FLAGS { + WIZ_SW_MAXIMIZE = 3, + WIZ_SW_MINIMIZE = 7, + WIZ_SW_NORMAL = 5, + } + + /** Field List Control */ + class FieldList { + private 'AccWizObjects.FieldList_typekey': FieldList; + private constructor(); + AddFieldList(bstrCaption: string, nLeft: number, nTop: number, nWidth: number, nHeight: number, nMultiSelectType: number, cCols: number, fShowPictures: boolean): void; + AddJoinLine(IFieldList: number, iField: number, iForeignFieldList: number, iForeignField: number, lAttribs: number): void; + DeleteFieldList(IFieldList: number): void; + DeleteJoinLine(IJoinLine: number): void; + readonly FieldListCount: number; + FieldLists(IFieldList: number): any; + HScrollPos: number; + readonly JoinLineCount: number; + JoinLines(IJoinLine: number): any; + PersistentHighlight: boolean; + Picture: stdole.IPictureDisp; + PictureCols: number; + PictureRows: number; + ScrollBars: number; + SelectedFieldListIndex: number; + SetCursor(nCursorID: number): void; + VScrollPos: number; + } + + /** ImexGrid Control */ + class ImexGrid { + private 'AccWizObjects.ImexGrid_typekey': ImexGrid; + private constructor(); + AddColumn(ColumnCaption: string, ColumnWidth: number, Index: number): void; + AddRow(RowText: string, Index: number): void; + AllowColumnSizing: boolean; + BackColor: stdole.OLE_COLOR; + CalcBestColumns(): void; + Caption: string; + ClearColumns(): void; + ClearRows(): void; + ColumnClickBehavior: number; + readonly ColumnCount: number; + Columns(ColumnNumber: number): any; + ColumnState: any; + DeleteColumn(Index: number): void; + DeleteRow(Index: number): void; + Delimiters: string; + DrawTextLogicalOrder: boolean; + FirstRowNumber: number; + Font: stdole.IFontDisp; + GridBackColor: stdole.OLE_COLOR; + GridFont: stdole.IFontDisp; + GridHeader: number; + Painting: boolean; + Refresh(): void; + ResetHScrollPos(): void; + ResetVScrollPos(): void; + readonly RowCount: number; + RowText(RowNumber: number): string; + ShowColLines: boolean; + ShowRowHeaders: boolean; + StringDelimiters: string; + } + + interface WIZ_FILETIME { + readonly dwHighDateTime: number; + readonly dwLowDateTime: number; + } + + interface WIZ_WIN32_FIND_DATA { + readonly cAlternate: SafeArray; + readonly cFileName: SafeArray; + readonly dwFileAttributes: number; + readonly dwReserved0: number; + readonly dwReserved1: number; + readonly ftCreationTime: WIZ_FILETIME; + readonly ftLastAccessTime: WIZ_FILETIME; + readonly ftLastWriteTime: WIZ_FILETIME; + readonly nFileSizeHigh: number; + readonly nFileSizeLow: number; + } + + /** WizShellLinkA Class */ + class WizShellLinkA { + private 'AccWizObjects.WizShellLinkA_typekey': WizShellLinkA; + private constructor(); + + /** GetArguments */ + GetArguments(pszArgs: string, cchMaxPath: number): void; + + /** GetDescription */ + GetDescription(pszName: string, cchMaxName: number): void; + + /** GetHotkey */ + GetHotkey(pwHotkey: number): void; + + /** GetIconLocation */ + GetIconLocation(pszIconPath: string, cchIconPath: number, piIcon: number): void; + + /** GetIDList */ + GetIDList(ppidl: WIZ_CSIDL_FLAGS): void; + + /** GetPath */ + GetPath(pszFile: string, cchMaxPath: number, pfd: WIZ_WIN32_FIND_DATA, fflags: number): void; + + /** GetShowCmd */ + GetShowCmd(piShowCmd: WIZ_SW_FLAGS): void; + + /** GetWorkingDirectory */ + GetWorkingDirectory(pszDir: string, cchMaxPath: number): void; + + /** Resolve */ + Resolve(hWnd: number, fflags: number): void; + + /** SetArguments */ + SetArguments(pszArgs: string): void; + + /** SetDescription */ + SetDescription(pszName: string): void; + + /** SetHotkey */ + SetHotkey(wHotkey: number): void; + + /** SetIconLocation */ + SetIconLocation(pszIconPath: string, iIcon: number): void; + + /** SetIDList */ + SetIDList(pidl: WIZ_CSIDL_FLAGS): void; + + /** SetPath */ + SetPath(pszFile: string): void; + + /** SetRelativePath */ + SetRelativePath(pszPathRel: string, dwReserved: number): void; + + /** SetShowCmd */ + SetShowCmd(iShowCmd: WIZ_SW_FLAGS): void; + + /** SetWorkingDirectory */ + SetWorkingDirectory(pszDir: string): void; + } + + namespace EventHelperTypes { + type FieldList_DragOver_ArgNames = ['SourceCtlName', 'SourceFieldList', 'SourceRow', 'State', 'X', 'Y']; + + type FieldList_FldListDragDrop_ArgNames = ['SourceCtlName', 'SourceFieldList', 'SourceRow', 'TargetCtlName', 'TargetFieldList', 'TargetRow']; + + type FieldList_FldListDragOver_ArgNames = ['SourceCtlName', 'SourceFieldList', 'SourceRow', 'TargetCtlName', 'TargetFieldList', 'TargetRow', 'State']; + + interface FieldList_DragOver_Parameter { + readonly SourceCtlName: string; + readonly SourceFieldList: number; + readonly SourceRow: number; + readonly State: number; + readonly X: number; + readonly Y: number; + } + + interface FieldList_FldListDragDrop_Parameter { + readonly SourceCtlName: string; + readonly SourceFieldList: number; + readonly SourceRow: number; + readonly TargetCtlName: string; + readonly TargetFieldList: number; + readonly TargetRow: number; + } + + interface FieldList_FldListDragOver_Parameter { + readonly SourceCtlName: string; + readonly SourceFieldList: number; + readonly SourceRow: number; + readonly State: number; + readonly TargetCtlName: string; + readonly TargetFieldList: number; + readonly TargetRow: number; } } } @@ -8542,71 +8028,45 @@ interface ActiveXObject { on(obj: Access._CheckBoxInOption, event: 'BeforeUpdate' | 'DblClick' | 'Exit', argNames: ['Cancel'], handler: (this: Access._CheckBoxInOption, parameter: {Cancel: number}) => void): void; on(obj: Access._CheckBoxInOption, event: 'KeyDown' | 'KeyUp', argNames: ['KeyCode', 'Shift'], handler: (this: Access._CheckBoxInOption, parameter: {KeyCode: number, Shift: number}) => void): void; on(obj: Access._CheckBoxInOption, event: 'KeyPress', argNames: ['KeyAscii'], handler: (this: Access._CheckBoxInOption, parameter: {KeyAscii: number}) => void): void; - on( - obj: Access._CheckBoxInOption, event: 'MouseDown' | 'MouseMove' | 'MouseUp', argNames: ['Button', 'Shift', 'X', 'Y'], handler: ( - this: Access._CheckBoxInOption, parameter: {Button: number, Shift: number, X: number, Y: number}) => void): void; + on(obj: Access._CheckBoxInOption, event: 'MouseDown' | 'MouseMove' | 'MouseUp', argNames: ['Button', 'Shift', 'X', 'Y'], handler: (this: Access._CheckBoxInOption, parameter: {Button: number, Shift: number, X: number, Y: number}) => void): void; on(obj: Access._OptionButtonInOption, event: 'BeforeUpdate' | 'DblClick' | 'Exit', argNames: ['Cancel'], handler: (this: Access._OptionButtonInOption, parameter: {Cancel: number}) => void): void; - on( - obj: Access._OptionButtonInOption, event: 'KeyDown' | 'KeyUp', argNames: ['KeyCode', 'Shift'], handler: ( - this: Access._OptionButtonInOption, parameter: {KeyCode: number, Shift: number}) => void): void; + on(obj: Access._OptionButtonInOption, event: 'KeyDown' | 'KeyUp', argNames: ['KeyCode', 'Shift'], handler: (this: Access._OptionButtonInOption, parameter: {KeyCode: number, Shift: number}) => void): void; on(obj: Access._OptionButtonInOption, event: 'KeyPress', argNames: ['KeyAscii'], handler: (this: Access._OptionButtonInOption, parameter: {KeyAscii: number}) => void): void; - on( - obj: Access._OptionButtonInOption, event: 'MouseDown' | 'MouseMove' | 'MouseUp', argNames: ['Button', 'Shift', 'X', 'Y'], - handler: (this: Access._OptionButtonInOption, parameter: {Button: number, Shift: number, X: number, Y: number}) => void): void; + on(obj: Access._OptionButtonInOption, event: 'MouseDown' | 'MouseMove' | 'MouseUp', argNames: ['Button', 'Shift', 'X', 'Y'], handler: (this: Access._OptionButtonInOption, parameter: {Button: number, Shift: number, X: number, Y: number}) => void): void; on(obj: Access._PageHdrFtrInReport, event: 'DblClick', argNames: ['Cancel'], handler: (this: Access._PageHdrFtrInReport, parameter: {Cancel: number}) => void): void; - on( - obj: Access._PageHdrFtrInReport, event: 'Format', argNames: ['Cancel', 'FormatCount'], handler: ( - this: Access._PageHdrFtrInReport, parameter: {Cancel: number, FormatCount: number}) => void): void; - on( - obj: Access._PageHdrFtrInReport, event: 'MouseDown' | 'MouseMove' | 'MouseUp', argNames: ['Button', 'Shift', 'X', 'Y'], handler: ( - this: Access._PageHdrFtrInReport, parameter: {Button: number, Shift: number, X: number, Y: number}) => void): void; + on(obj: Access._PageHdrFtrInReport, event: 'Format', argNames: ['Cancel', 'FormatCount'], handler: (this: Access._PageHdrFtrInReport, parameter: {Cancel: number, FormatCount: number}) => void): void; + on(obj: Access._PageHdrFtrInReport, event: 'MouseDown' | 'MouseMove' | 'MouseUp', argNames: ['Button', 'Shift', 'X', 'Y'], handler: (this: Access._PageHdrFtrInReport, parameter: {Button: number, Shift: number, X: number, Y: number}) => void): void; on(obj: Access._PageHdrFtrInReport, event: 'Print', argNames: ['Cancel', 'PrintCount'], handler: (this: Access._PageHdrFtrInReport, parameter: {Cancel: number, PrintCount: number}) => void): void; on(obj: Access._SectionInReport, event: 'DblClick', argNames: ['Cancel'], handler: (this: Access._SectionInReport, parameter: {Cancel: number}) => void): void; on(obj: Access._SectionInReport, event: 'Format', argNames: ['Cancel', 'FormatCount'], handler: (this: Access._SectionInReport, parameter: {Cancel: number, FormatCount: number}) => void): void; - on( - obj: Access._SectionInReport, event: 'MouseDown' | 'MouseMove' | 'MouseUp', argNames: ['Button', 'Shift', 'X', 'Y'], handler: ( - this: Access._SectionInReport, parameter: {Button: number, Shift: number, X: number, Y: number}) => void): void; + on(obj: Access._SectionInReport, event: 'MouseDown' | 'MouseMove' | 'MouseUp', argNames: ['Button', 'Shift', 'X', 'Y'], handler: (this: Access._SectionInReport, parameter: {Button: number, Shift: number, X: number, Y: number}) => void): void; on(obj: Access._SectionInReport, event: 'Print', argNames: ['Cancel', 'PrintCount'], handler: (this: Access._SectionInReport, parameter: {Cancel: number, PrintCount: number}) => void): void; on(obj: Access._ToggleButtonInOption, event: 'BeforeUpdate' | 'DblClick' | 'Exit', argNames: ['Cancel'], handler: (this: Access._ToggleButtonInOption, parameter: {Cancel: number}) => void): void; - on( - obj: Access._ToggleButtonInOption, event: 'KeyDown' | 'KeyUp', argNames: ['KeyCode', 'Shift'], handler: ( - this: Access._ToggleButtonInOption, parameter: {KeyCode: number, Shift: number}) => void): void; + on(obj: Access._ToggleButtonInOption, event: 'KeyDown' | 'KeyUp', argNames: ['KeyCode', 'Shift'], handler: (this: Access._ToggleButtonInOption, parameter: {KeyCode: number, Shift: number}) => void): void; on(obj: Access._ToggleButtonInOption, event: 'KeyPress', argNames: ['KeyAscii'], handler: (this: Access._ToggleButtonInOption, parameter: {KeyAscii: number}) => void): void; - on( - obj: Access._ToggleButtonInOption, event: 'MouseDown' | 'MouseMove' | 'MouseUp', argNames: ['Button', 'Shift', 'X', 'Y'], - handler: (this: Access._ToggleButtonInOption, parameter: {Button: number, Shift: number, X: number, Y: number}) => void): void; + on(obj: Access._ToggleButtonInOption, event: 'MouseDown' | 'MouseMove' | 'MouseUp', argNames: ['Button', 'Shift', 'X', 'Y'], handler: (this: Access._ToggleButtonInOption, parameter: {Button: number, Shift: number, X: number, Y: number}) => void): void; on(obj: Access.Attachment, event: 'BeforeUpdate' | 'DblClick' | 'Dirty' | 'Exit', argNames: ['Cancel'], handler: (this: Access.Attachment, parameter: {Cancel: number}) => void): void; on(obj: Access.Attachment, event: 'KeyDown' | 'KeyUp', argNames: ['KeyCode', 'Shift'], handler: (this: Access.Attachment, parameter: {KeyCode: number, Shift: number}) => void): void; on(obj: Access.Attachment, event: 'KeyPress', argNames: ['KeyAscii'], handler: (this: Access.Attachment, parameter: {KeyAscii: number}) => void): void; - on( - obj: Access.Attachment, event: 'MouseDown' | 'MouseMove' | 'MouseUp', argNames: ['Button', 'Shift', 'X', 'Y'], handler: ( - this: Access.Attachment, parameter: {Button: number, Shift: number, X: number, Y: number}) => void): void; + on(obj: Access.Attachment, event: 'MouseDown' | 'MouseMove' | 'MouseUp', argNames: ['Button', 'Shift', 'X', 'Y'], handler: (this: Access.Attachment, parameter: {Button: number, Shift: number, X: number, Y: number}) => void): void; on(obj: Access.BoundObjectFrame, event: 'BeforeUpdate' | 'DblClick' | 'Exit', argNames: ['Cancel'], handler: (this: Access.BoundObjectFrame, parameter: {Cancel: number}) => void): void; on(obj: Access.BoundObjectFrame, event: 'KeyDown' | 'KeyUp', argNames: ['KeyCode', 'Shift'], handler: (this: Access.BoundObjectFrame, parameter: {KeyCode: number, Shift: number}) => void): void; on(obj: Access.BoundObjectFrame, event: 'KeyPress', argNames: ['KeyAscii'], handler: (this: Access.BoundObjectFrame, parameter: {KeyAscii: number}) => void): void; - on( - obj: Access.BoundObjectFrame, event: 'MouseDown' | 'MouseMove' | 'MouseUp', argNames: ['Button', 'Shift', 'X', 'Y'], handler: ( - this: Access.BoundObjectFrame, parameter: {Button: number, Shift: number, X: number, Y: number}) => void): void; + on(obj: Access.BoundObjectFrame, event: 'MouseDown' | 'MouseMove' | 'MouseUp', argNames: ['Button', 'Shift', 'X', 'Y'], handler: (this: Access.BoundObjectFrame, parameter: {Button: number, Shift: number, X: number, Y: number}) => void): void; on(obj: Access.BoundObjectFrame, event: 'Updated', argNames: ['Code'], handler: (this: Access.BoundObjectFrame, parameter: {Code: number}) => void): void; on(obj: Access.CheckBox, event: 'BeforeUpdate' | 'DblClick' | 'Exit', argNames: ['Cancel'], handler: (this: Access.CheckBox, parameter: {Cancel: number}) => void): void; on(obj: Access.CheckBox, event: 'KeyDown' | 'KeyUp', argNames: ['KeyCode', 'Shift'], handler: (this: Access.CheckBox, parameter: {KeyCode: number, Shift: number}) => void): void; on(obj: Access.CheckBox, event: 'KeyPress', argNames: ['KeyAscii'], handler: (this: Access.CheckBox, parameter: {KeyAscii: number}) => void): void; - on( - obj: Access.CheckBox, event: 'MouseDown' | 'MouseMove' | 'MouseUp', argNames: ['Button', 'Shift', 'X', 'Y'], handler: ( - this: Access.CheckBox, parameter: {Button: number, Shift: number, X: number, Y: number}) => void): void; + on(obj: Access.CheckBox, event: 'MouseDown' | 'MouseMove' | 'MouseUp', argNames: ['Button', 'Shift', 'X', 'Y'], handler: (this: Access.CheckBox, parameter: {Button: number, Shift: number, X: number, Y: number}) => void): void; on(obj: Access.ComboBox, event: 'BeforeUpdate' | 'DblClick' | 'Dirty' | 'Exit' | 'Undo', argNames: ['Cancel'], handler: (this: Access.ComboBox, parameter: {Cancel: number}) => void): void; on(obj: Access.ComboBox, event: 'KeyDown' | 'KeyUp', argNames: ['KeyCode', 'Shift'], handler: (this: Access.ComboBox, parameter: {KeyCode: number, Shift: number}) => void): void; on(obj: Access.ComboBox, event: 'KeyPress', argNames: ['KeyAscii'], handler: (this: Access.ComboBox, parameter: {KeyAscii: number}) => void): void; - on( - obj: Access.ComboBox, event: 'MouseDown' | 'MouseMove' | 'MouseUp', argNames: ['Button', 'Shift', 'X', 'Y'], handler: ( - this: Access.ComboBox, parameter: {Button: number, Shift: number, X: number, Y: number}) => void): void; + on(obj: Access.ComboBox, event: 'MouseDown' | 'MouseMove' | 'MouseUp', argNames: ['Button', 'Shift', 'X', 'Y'], handler: (this: Access.ComboBox, parameter: {Button: number, Shift: number, X: number, Y: number}) => void): void; on(obj: Access.ComboBox, event: 'NotInList', argNames: ['NewData', 'Response'], handler: (this: Access.ComboBox, parameter: {NewData: string, Response: number}) => void): void; on(obj: Access.CommandButton, event: 'DblClick' | 'Exit', argNames: ['Cancel'], handler: (this: Access.CommandButton, parameter: {Cancel: number}) => void): void; on(obj: Access.CommandButton, event: 'KeyDown' | 'KeyUp', argNames: ['KeyCode', 'Shift'], handler: (this: Access.CommandButton, parameter: {KeyCode: number, Shift: number}) => void): void; on(obj: Access.CommandButton, event: 'KeyPress', argNames: ['KeyAscii'], handler: (this: Access.CommandButton, parameter: {KeyAscii: number}) => void): void; - on( - obj: Access.CommandButton, event: 'MouseDown' | 'MouseMove' | 'MouseUp', argNames: ['Button', 'Shift', 'X', 'Y'], handler: ( - this: Access.CommandButton, parameter: {Button: number, Shift: number, X: number, Y: number}) => void): void; + on(obj: Access.CommandButton, event: 'MouseDown' | 'MouseMove' | 'MouseUp', argNames: ['Button', 'Shift', 'X', 'Y'], handler: (this: Access.CommandButton, parameter: {Button: number, Shift: number, X: number, Y: number}) => void): void; on(obj: Access.CustomControl, event: 'Exit', argNames: ['Cancel'], handler: (this: Access.CustomControl, parameter: {Cancel: number}) => void): void; on(obj: Access.CustomControl, event: 'Updated', argNames: ['Code'], handler: (this: Access.CustomControl, parameter: {Code: number}) => void): void; on(obj: Access.Form, event: 'AfterDelConfirm', argNames: ['Status'], handler: (this: Access.Form, parameter: {Status: number}) => void): void; @@ -8614,16 +8074,9 @@ interface ActiveXObject { on(obj: Access.Form, event: 'AfterRender', argNames: ['drawObject', 'chartObject'], handler: (this: Access.Form, parameter: {readonly drawObject: any, readonly chartObject: any}) => void): void; on(obj: Access.Form, event: 'ApplyFilter', argNames: ['Cancel', 'ApplyType'], handler: (this: Access.Form, parameter: {Cancel: number, ApplyType: number}) => void): void; on(obj: Access.Form, event: 'BeforeDelConfirm', argNames: ['Cancel', 'Response'], handler: (this: Access.Form, parameter: {Cancel: number, Response: number}) => void): void; - on( - obj: Access.Form, event: 'BeforeInsert' | 'BeforeUpdate' | 'BeginBatchEdit' | 'DblClick' | 'Delete' | 'Dirty' | 'Open' | 'RecordExit' | 'Undo' | 'UndoBatchEdit' | - 'Unload', - argNames: ['Cancel'], handler: (this: Access.Form, parameter: {Cancel: number}) => void): void; - on( - obj: Access.Form, event: 'BeforeRender', argNames: ['drawObject', 'chartObject', 'Cancel'], handler: ( - this: Access.Form, parameter: {readonly drawObject: any, readonly chartObject: any, readonly Cancel: any}) => void): void; - on( - obj: Access.Form, event: 'BeforeScreenTip', argNames: ['ScreenTipText', 'SourceObject'], handler: ( - this: Access.Form, parameter: {readonly ScreenTipText: any, readonly SourceObject: any}) => void): void; + on(obj: Access.Form, event: 'BeforeInsert' | 'BeforeUpdate' | 'BeginBatchEdit' | 'DblClick' | 'Delete' | 'Dirty' | 'Open' | 'RecordExit' | 'Undo' | 'UndoBatchEdit' | 'Unload', argNames: ['Cancel'], handler: (this: Access.Form, parameter: {Cancel: number}) => void): void; + on(obj: Access.Form, event: 'BeforeRender', argNames: ['drawObject', 'chartObject', 'Cancel'], handler: (this: Access.Form, parameter: {readonly drawObject: any, readonly chartObject: any, readonly Cancel: any}) => void): void; + on(obj: Access.Form, event: 'BeforeScreenTip', argNames: ['ScreenTipText', 'SourceObject'], handler: (this: Access.Form, parameter: {readonly ScreenTipText: any, readonly SourceObject: any}) => void): void; on(obj: Access.Form, event: 'CommandBeforeExecute', argNames: ['Command', 'Cancel'], handler: (this: Access.Form, parameter: {readonly Command: any, readonly Cancel: any}) => void): void; on(obj: Access.Form, event: 'CommandChecked', argNames: ['Command', 'Checked'], handler: (this: Access.Form, parameter: {readonly Command: any, readonly Checked: any}) => void): void; on(obj: Access.Form, event: 'CommandEnabled', argNames: ['Command', 'Enabled'], handler: (this: Access.Form, parameter: {readonly Command: any, readonly Enabled: any}) => void): void; @@ -8633,141 +8086,41 @@ interface ActiveXObject { on(obj: Access.Form, event: 'Filter', argNames: ['Cancel', 'FilterType'], handler: (this: Access.Form, parameter: {Cancel: number, FilterType: number}) => void): void; on(obj: Access.Form, event: 'KeyDown' | 'KeyUp', argNames: ['KeyCode', 'Shift'], handler: (this: Access.Form, parameter: {KeyCode: number, Shift: number}) => void): void; on(obj: Access.Form, event: 'KeyPress', argNames: ['KeyAscii'], handler: (this: Access.Form, parameter: {KeyAscii: number}) => void): void; - on( - obj: Access.Form, event: 'MouseDown' | 'MouseMove' | 'MouseUp', argNames: ['Button', 'Shift', 'X', 'Y'], handler: ( - this: Access.Form, parameter: {Button: number, Shift: number, X: number, Y: number}) => void): void; + on(obj: Access.Form, event: 'MouseDown' | 'MouseMove' | 'MouseUp', argNames: ['Button', 'Shift', 'X', 'Y'], handler: (this: Access.Form, parameter: {Button: number, Shift: number, X: number, Y: number}) => void): void; on(obj: Access.Form, event: 'MouseWheel', argNames: ['Page', 'Count'], handler: (this: Access.Form, parameter: {readonly Page: boolean, readonly Count: number}) => void): void; - on( - obj: Access.FormOld, event: 'AfterBeginTransaction' | 'AfterCommitTransaction' | 'RollbackTransaction', argNames: ['Connection'], handler: ( - this: Access.FormOld, parameter: {readonly Connection: ADODB.Connection}) => void): void; - on(obj: Access.FormOld, event: 'AfterDelConfirm', argNames: ['Status'], handler: (this: Access.FormOld, parameter: {Status: number}) => void): void; - on(obj: Access.FormOld, event: 'AfterFinalRender' | 'AfterLayout', argNames: ['drawObject'], handler: (this: Access.FormOld, parameter: {readonly drawObject: any}) => void): void; - on( - obj: Access.FormOld, event: 'AfterRender', argNames: ['drawObject', 'chartObject'], handler: ( - this: Access.FormOld, parameter: {readonly drawObject: any, readonly chartObject: any}) => void): void; - on(obj: Access.FormOld, event: 'ApplyFilter', argNames: ['Cancel', 'ApplyType'], handler: (this: Access.FormOld, parameter: {Cancel: number, ApplyType: number}) => void): void; - on( - obj: Access.FormOld, event: 'BeforeBeginTransaction' | 'BeforeCommitTransaction', argNames: ['Cancel', 'Connection'], handler: ( - this: Access.FormOld, parameter: {Cancel: number, readonly Connection: ADODB.Connection}) => void): void; - on(obj: Access.FormOld, event: 'BeforeDelConfirm', argNames: ['Cancel', 'Response'], handler: (this: Access.FormOld, parameter: {Cancel: number, Response: number}) => void): void; - on( - obj: Access.FormOld, event: 'BeforeInsert' | 'BeforeUpdate' | 'BeginBatchEdit' | 'DblClick' | 'Delete' | 'Dirty' | 'Open' | 'RecordExit' | 'Undo' | - 'UndoBatchEdit' | 'Unload', - argNames: ['Cancel'], handler: (this: Access.FormOld, parameter: {Cancel: number}) => void): void; - on( - obj: Access.FormOld, event: 'BeforeRender', argNames: ['drawObject', 'chartObject', 'Cancel'], handler: ( - this: Access.FormOld, parameter: {readonly drawObject: any, readonly chartObject: any, readonly Cancel: any}) => void): void; - on( - obj: Access.FormOld, event: 'BeforeScreenTip', argNames: ['ScreenTipText', 'SourceObject'], handler: ( - this: Access.FormOld, parameter: {readonly ScreenTipText: any, readonly SourceObject: any}) => void): void; - on(obj: Access.FormOld, event: 'CommandBeforeExecute', argNames: ['Command', 'Cancel'], handler: (this: Access.FormOld, parameter: {readonly Command: any, readonly Cancel: any}) => void): void; - on(obj: Access.FormOld, event: 'CommandChecked', argNames: ['Command', 'Checked'], handler: (this: Access.FormOld, parameter: {readonly Command: any, readonly Checked: any}) => void): void; - on(obj: Access.FormOld, event: 'CommandEnabled', argNames: ['Command', 'Enabled'], handler: (this: Access.FormOld, parameter: {readonly Command: any, readonly Enabled: any}) => void): void; - on(obj: Access.FormOld, event: 'CommandExecute', argNames: ['Command'], handler: (this: Access.FormOld, parameter: {readonly Command: any}) => void): void; - on(obj: Access.FormOld, event: 'DataChange' | 'PivotTableChange' | 'ViewChange', argNames: ['Reason'], handler: (this: Access.FormOld, parameter: {readonly Reason: number}) => void): void; - on(obj: Access.FormOld, event: 'Error', argNames: ['DataErr', 'Response'], handler: (this: Access.FormOld, parameter: {DataErr: number, Response: number}) => void): void; - on(obj: Access.FormOld, event: 'Filter', argNames: ['Cancel', 'FilterType'], handler: (this: Access.FormOld, parameter: {Cancel: number, FilterType: number}) => void): void; - on(obj: Access.FormOld, event: 'KeyDown' | 'KeyUp', argNames: ['KeyCode', 'Shift'], handler: (this: Access.FormOld, parameter: {KeyCode: number, Shift: number}) => void): void; - on(obj: Access.FormOld, event: 'KeyPress', argNames: ['KeyAscii'], handler: (this: Access.FormOld, parameter: {KeyAscii: number}) => void): void; - on( - obj: Access.FormOld, event: 'MouseDown' | 'MouseMove' | 'MouseUp', argNames: ['Button', 'Shift', 'X', 'Y'], handler: ( - this: Access.FormOld, parameter: {Button: number, Shift: number, X: number, Y: number}) => void): void; - on(obj: Access.FormOld, event: 'MouseWheel', argNames: ['Page', 'Count'], handler: (this: Access.FormOld, parameter: {readonly Page: boolean, readonly Count: number}) => void): void; - on( - obj: Access.FormOldV10, event: 'AfterBeginTransaction' | 'AfterCommitTransaction' | 'RollbackTransaction', argNames: ['Connection'], - handler: (this: Access.FormOldV10, parameter: {readonly Connection: ADODB.Connection}) => void): void; - on(obj: Access.FormOldV10, event: 'AfterDelConfirm', argNames: ['Status'], handler: (this: Access.FormOldV10, parameter: {Status: number}) => void): void; - on(obj: Access.FormOldV10, event: 'AfterFinalRender' | 'AfterLayout', argNames: ['drawObject'], handler: (this: Access.FormOldV10, parameter: {readonly drawObject: any}) => void): void; - on( - obj: Access.FormOldV10, event: 'AfterRender', argNames: ['drawObject', 'chartObject'], handler: ( - this: Access.FormOldV10, parameter: {readonly drawObject: any, readonly chartObject: any}) => void): void; - on(obj: Access.FormOldV10, event: 'ApplyFilter', argNames: ['Cancel', 'ApplyType'], handler: (this: Access.FormOldV10, parameter: {Cancel: number, ApplyType: number}) => void): void; - on( - obj: Access.FormOldV10, event: 'BeforeBeginTransaction' | 'BeforeCommitTransaction', argNames: ['Cancel', 'Connection'], handler: ( - this: Access.FormOldV10, parameter: {Cancel: number, readonly Connection: ADODB.Connection}) => void): void; - on(obj: Access.FormOldV10, event: 'BeforeDelConfirm', argNames: ['Cancel', 'Response'], handler: (this: Access.FormOldV10, parameter: {Cancel: number, Response: number}) => void): void; - on( - obj: Access.FormOldV10, event: 'BeforeInsert' | 'BeforeUpdate' | 'BeginBatchEdit' | 'DblClick' | 'Delete' | 'Dirty' | 'Open' | 'RecordExit' | 'Undo' | - 'UndoBatchEdit' | 'Unload', - argNames: ['Cancel'], handler: (this: Access.FormOldV10, parameter: {Cancel: number}) => void): void; - on( - obj: Access.FormOldV10, event: 'BeforeRender', argNames: ['drawObject', 'chartObject', 'Cancel'], handler: ( - this: Access.FormOldV10, parameter: {readonly drawObject: any, readonly chartObject: any, readonly Cancel: any}) => void): void; - on( - obj: Access.FormOldV10, event: 'BeforeScreenTip', argNames: ['ScreenTipText', 'SourceObject'], handler: ( - this: Access.FormOldV10, parameter: {readonly ScreenTipText: any, readonly SourceObject: any}) => void): void; - on( - obj: Access.FormOldV10, event: 'CommandBeforeExecute', argNames: ['Command', 'Cancel'], handler: ( - this: Access.FormOldV10, parameter: {readonly Command: any, readonly Cancel: any}) => void): void; - on(obj: Access.FormOldV10, event: 'CommandChecked', argNames: ['Command', 'Checked'], handler: (this: Access.FormOldV10, parameter: {readonly Command: any, readonly Checked: any}) => void): void; - on(obj: Access.FormOldV10, event: 'CommandEnabled', argNames: ['Command', 'Enabled'], handler: (this: Access.FormOldV10, parameter: {readonly Command: any, readonly Enabled: any}) => void): void; - on(obj: Access.FormOldV10, event: 'CommandExecute', argNames: ['Command'], handler: (this: Access.FormOldV10, parameter: {readonly Command: any}) => void): void; - on(obj: Access.FormOldV10, event: 'DataChange' | 'PivotTableChange' | 'ViewChange', argNames: ['Reason'], handler: (this: Access.FormOldV10, parameter: {readonly Reason: number}) => void): void; - on(obj: Access.FormOldV10, event: 'Error', argNames: ['DataErr', 'Response'], handler: (this: Access.FormOldV10, parameter: {DataErr: number, Response: number}) => void): void; - on(obj: Access.FormOldV10, event: 'Filter', argNames: ['Cancel', 'FilterType'], handler: (this: Access.FormOldV10, parameter: {Cancel: number, FilterType: number}) => void): void; - on(obj: Access.FormOldV10, event: 'KeyDown' | 'KeyUp', argNames: ['KeyCode', 'Shift'], handler: (this: Access.FormOldV10, parameter: {KeyCode: number, Shift: number}) => void): void; - on(obj: Access.FormOldV10, event: 'KeyPress', argNames: ['KeyAscii'], handler: (this: Access.FormOldV10, parameter: {KeyAscii: number}) => void): void; - on( - obj: Access.FormOldV10, event: 'MouseDown' | 'MouseMove' | 'MouseUp', argNames: ['Button', 'Shift', 'X', 'Y'], handler: ( - this: Access.FormOldV10, parameter: {Button: number, Shift: number, X: number, Y: number}) => void): void; - on(obj: Access.FormOldV10, event: 'MouseWheel', argNames: ['Page', 'Count'], handler: (this: Access.FormOldV10, parameter: {readonly Page: boolean, readonly Count: number}) => void): void; on(obj: Access.Image, event: 'DblClick', argNames: ['Cancel'], handler: (this: Access.Image, parameter: {Cancel: number}) => void): void; - on( - obj: Access.Image, event: 'MouseDown' | 'MouseMove' | 'MouseUp', argNames: ['Button', 'Shift', 'X', 'Y'], handler: ( - this: Access.Image, parameter: {Button: number, Shift: number, X: number, Y: number}) => void): void; + on(obj: Access.Image, event: 'MouseDown' | 'MouseMove' | 'MouseUp', argNames: ['Button', 'Shift', 'X', 'Y'], handler: (this: Access.Image, parameter: {Button: number, Shift: number, X: number, Y: number}) => void): void; on(obj: Access.Label, event: 'DblClick', argNames: ['Cancel'], handler: (this: Access.Label, parameter: {Cancel: number}) => void): void; - on( - obj: Access.Label, event: 'MouseDown' | 'MouseMove' | 'MouseUp', argNames: ['Button', 'Shift', 'X', 'Y'], handler: ( - this: Access.Label, parameter: {Button: number, Shift: number, X: number, Y: number}) => void): void; + on(obj: Access.Label, event: 'MouseDown' | 'MouseMove' | 'MouseUp', argNames: ['Button', 'Shift', 'X', 'Y'], handler: (this: Access.Label, parameter: {Button: number, Shift: number, X: number, Y: number}) => void): void; on(obj: Access.ListBox, event: 'BeforeUpdate' | 'DblClick' | 'Exit', argNames: ['Cancel'], handler: (this: Access.ListBox, parameter: {Cancel: number}) => void): void; on(obj: Access.ListBox, event: 'KeyDown' | 'KeyUp', argNames: ['KeyCode', 'Shift'], handler: (this: Access.ListBox, parameter: {KeyCode: number, Shift: number}) => void): void; on(obj: Access.ListBox, event: 'KeyPress', argNames: ['KeyAscii'], handler: (this: Access.ListBox, parameter: {KeyAscii: number}) => void): void; - on( - obj: Access.ListBox, event: 'MouseDown' | 'MouseMove' | 'MouseUp', argNames: ['Button', 'Shift', 'X', 'Y'], handler: ( - this: Access.ListBox, parameter: {Button: number, Shift: number, X: number, Y: number}) => void): void; + on(obj: Access.ListBox, event: 'MouseDown' | 'MouseMove' | 'MouseUp', argNames: ['Button', 'Shift', 'X', 'Y'], handler: (this: Access.ListBox, parameter: {Button: number, Shift: number, X: number, Y: number}) => void): void; on(obj: Access.NavigationButton, event: 'DblClick' | 'Exit', argNames: ['Cancel'], handler: (this: Access.NavigationButton, parameter: {Cancel: number}) => void): void; on(obj: Access.NavigationButton, event: 'KeyDown' | 'KeyUp', argNames: ['KeyCode', 'Shift'], handler: (this: Access.NavigationButton, parameter: {KeyCode: number, Shift: number}) => void): void; on(obj: Access.NavigationButton, event: 'KeyPress', argNames: ['KeyAscii'], handler: (this: Access.NavigationButton, parameter: {KeyAscii: number}) => void): void; - on( - obj: Access.NavigationButton, event: 'MouseDown' | 'MouseMove' | 'MouseUp', argNames: ['Button', 'Shift', 'X', 'Y'], handler: ( - this: Access.NavigationButton, parameter: {Button: number, Shift: number, X: number, Y: number}) => void): void; - on( - obj: Access.NavigationControl, event: 'BeforeUpdate' | 'DblClick' | 'Dirty' | 'Exit' | 'Undo', argNames: ['Cancel'], handler: ( - this: Access.NavigationControl, parameter: {Cancel: number}) => void): void; + on(obj: Access.NavigationButton, event: 'MouseDown' | 'MouseMove' | 'MouseUp', argNames: ['Button', 'Shift', 'X', 'Y'], handler: (this: Access.NavigationButton, parameter: {Button: number, Shift: number, X: number, Y: number}) => void): void; + on(obj: Access.NavigationControl, event: 'BeforeUpdate' | 'DblClick' | 'Dirty' | 'Exit' | 'Undo', argNames: ['Cancel'], handler: (this: Access.NavigationControl, parameter: {Cancel: number}) => void): void; on(obj: Access.NavigationControl, event: 'KeyDown' | 'KeyUp', argNames: ['KeyCode', 'Shift'], handler: (this: Access.NavigationControl, parameter: {KeyCode: number, Shift: number}) => void): void; on(obj: Access.NavigationControl, event: 'KeyPress', argNames: ['KeyAscii'], handler: (this: Access.NavigationControl, parameter: {KeyAscii: number}) => void): void; - on( - obj: Access.NavigationControl, event: 'MouseDown' | 'MouseMove' | 'MouseUp', argNames: ['Button', 'Shift', 'X', 'Y'], handler: ( - this: Access.NavigationControl, parameter: {Button: number, Shift: number, X: number, Y: number}) => void): void; + on(obj: Access.NavigationControl, event: 'MouseDown' | 'MouseMove' | 'MouseUp', argNames: ['Button', 'Shift', 'X', 'Y'], handler: (this: Access.NavigationControl, parameter: {Button: number, Shift: number, X: number, Y: number}) => void): void; on(obj: Access.ObjectFrame, event: 'DblClick' | 'Exit', argNames: ['Cancel'], handler: (this: Access.ObjectFrame, parameter: {Cancel: number}) => void): void; - on( - obj: Access.ObjectFrame, event: 'MouseDown' | 'MouseMove' | 'MouseUp', argNames: ['Button', 'Shift', 'X', 'Y'], handler: ( - this: Access.ObjectFrame, parameter: {Button: number, Shift: number, X: number, Y: number}) => void): void; + on(obj: Access.ObjectFrame, event: 'MouseDown' | 'MouseMove' | 'MouseUp', argNames: ['Button', 'Shift', 'X', 'Y'], handler: (this: Access.ObjectFrame, parameter: {Button: number, Shift: number, X: number, Y: number}) => void): void; on(obj: Access.ObjectFrame, event: 'Updated', argNames: ['Code'], handler: (this: Access.ObjectFrame, parameter: {Code: number}) => void): void; on(obj: Access.OptionButton, event: 'BeforeUpdate' | 'DblClick' | 'Exit', argNames: ['Cancel'], handler: (this: Access.OptionButton, parameter: {Cancel: number}) => void): void; on(obj: Access.OptionButton, event: 'KeyDown' | 'KeyUp', argNames: ['KeyCode', 'Shift'], handler: (this: Access.OptionButton, parameter: {KeyCode: number, Shift: number}) => void): void; on(obj: Access.OptionButton, event: 'KeyPress', argNames: ['KeyAscii'], handler: (this: Access.OptionButton, parameter: {KeyAscii: number}) => void): void; - on( - obj: Access.OptionButton, event: 'MouseDown' | 'MouseMove' | 'MouseUp', argNames: ['Button', 'Shift', 'X', 'Y'], handler: ( - this: Access.OptionButton, parameter: {Button: number, Shift: number, X: number, Y: number}) => void): void; + on(obj: Access.OptionButton, event: 'MouseDown' | 'MouseMove' | 'MouseUp', argNames: ['Button', 'Shift', 'X', 'Y'], handler: (this: Access.OptionButton, parameter: {Button: number, Shift: number, X: number, Y: number}) => void): void; on(obj: Access.OptionGroup, event: 'BeforeUpdate' | 'DblClick' | 'Exit', argNames: ['Cancel'], handler: (this: Access.OptionGroup, parameter: {Cancel: number}) => void): void; - on( - obj: Access.OptionGroup, event: 'MouseDown' | 'MouseMove' | 'MouseUp', argNames: ['Button', 'Shift', 'X', 'Y'], handler: ( - this: Access.OptionGroup, parameter: {Button: number, Shift: number, X: number, Y: number}) => void): void; + on(obj: Access.OptionGroup, event: 'MouseDown' | 'MouseMove' | 'MouseUp', argNames: ['Button', 'Shift', 'X', 'Y'], handler: (this: Access.OptionGroup, parameter: {Button: number, Shift: number, X: number, Y: number}) => void): void; on(obj: Access.Page, event: 'DblClick', argNames: ['Cancel'], handler: (this: Access.Page, parameter: {Cancel: number}) => void): void; - on( - obj: Access.Page, event: 'MouseDown' | 'MouseMove' | 'MouseUp', argNames: ['Button', 'Shift', 'X', 'Y'], handler: ( - this: Access.Page, parameter: {Button: number, Shift: number, X: number, Y: number}) => void): void; + on(obj: Access.Page, event: 'MouseDown' | 'MouseMove' | 'MouseUp', argNames: ['Button', 'Shift', 'X', 'Y'], handler: (this: Access.Page, parameter: {Button: number, Shift: number, X: number, Y: number}) => void): void; on(obj: Access.PaletteButton, event: 'BeforeUpdate' | 'DblClick' | 'Exit', argNames: ['Cancel'], handler: (this: Access.PaletteButton, parameter: {Cancel: number}) => void): void; on(obj: Access.PaletteButton, event: 'KeyDown' | 'KeyUp', argNames: ['KeyCode', 'Shift'], handler: (this: Access.PaletteButton, parameter: {KeyCode: number, Shift: number}) => void): void; on(obj: Access.PaletteButton, event: 'KeyPress', argNames: ['KeyAscii'], handler: (this: Access.PaletteButton, parameter: {KeyAscii: number}) => void): void; - on( - obj: Access.PaletteButton, event: 'MouseDown' | 'MouseMove' | 'MouseUp', argNames: ['Button', 'Shift', 'X', 'Y'], handler: ( - this: Access.PaletteButton, parameter: {Button: number, Shift: number, X: number, Y: number}) => void): void; + on(obj: Access.PaletteButton, event: 'MouseDown' | 'MouseMove' | 'MouseUp', argNames: ['Button', 'Shift', 'X', 'Y'], handler: (this: Access.PaletteButton, parameter: {Button: number, Shift: number, X: number, Y: number}) => void): void; on(obj: Access.Rectangle, event: 'DblClick', argNames: ['Cancel'], handler: (this: Access.Rectangle, parameter: {Cancel: number}) => void): void; - on( - obj: Access.Rectangle, event: 'MouseDown' | 'MouseMove' | 'MouseUp', argNames: ['Button', 'Shift', 'X', 'Y'], handler: ( - this: Access.Rectangle, parameter: {Button: number, Shift: number, X: number, Y: number}) => void): void; + on(obj: Access.Rectangle, event: 'MouseDown' | 'MouseMove' | 'MouseUp', argNames: ['Button', 'Shift', 'X', 'Y'], handler: (this: Access.Rectangle, parameter: {Button: number, Shift: number, X: number, Y: number}) => void): void; on(obj: Access.References, event: 'ItemAdded' | 'ItemRemoved', argNames: ['Reference'], handler: (this: Access.References, parameter: {readonly Reference: Access.Reference}) => void): void; on(obj: Access.Report, event: 'ApplyFilter', argNames: ['Cancel', 'ApplyType'], handler: (this: Access.Report, parameter: {Cancel: number, ApplyType: number}) => void): void; on(obj: Access.Report, event: 'DblClick' | 'NoData' | 'Open' | 'Unload', argNames: ['Cancel'], handler: (this: Access.Report, parameter: {Cancel: number}) => void): void; @@ -8775,58 +8128,32 @@ interface ActiveXObject { on(obj: Access.Report, event: 'Filter', argNames: ['Cancel', 'FilterType'], handler: (this: Access.Report, parameter: {Cancel: number, FilterType: number}) => void): void; on(obj: Access.Report, event: 'KeyDown' | 'KeyUp', argNames: ['KeyCode', 'Shift'], handler: (this: Access.Report, parameter: {KeyCode: number, Shift: number}) => void): void; on(obj: Access.Report, event: 'KeyPress', argNames: ['KeyAscii'], handler: (this: Access.Report, parameter: {KeyAscii: number}) => void): void; - on( - obj: Access.Report, event: 'MouseDown' | 'MouseMove' | 'MouseUp', argNames: ['Button', 'Shift', 'X', 'Y'], handler: ( - this: Access.Report, parameter: {Button: number, Shift: number, X: number, Y: number}) => void): void; + on(obj: Access.Report, event: 'MouseDown' | 'MouseMove' | 'MouseUp', argNames: ['Button', 'Shift', 'X', 'Y'], handler: (this: Access.Report, parameter: {Button: number, Shift: number, X: number, Y: number}) => void): void; on(obj: Access.Report, event: 'MouseWheel', argNames: ['Page', 'Count'], handler: (this: Access.Report, parameter: {readonly Page: boolean, readonly Count: number}) => void): void; - on(obj: Access.ReportOld, event: 'Error', argNames: ['DataErr', 'Response'], handler: (this: Access.ReportOld, parameter: {DataErr: number, Response: number}) => void): void; - on(obj: Access.ReportOld, event: 'NoData' | 'Open', argNames: ['Cancel'], handler: (this: Access.ReportOld, parameter: {Cancel: number}) => void): void; - on(obj: Access.ReportOldV10, event: 'Error', argNames: ['DataErr', 'Response'], handler: (this: Access.ReportOldV10, parameter: {DataErr: number, Response: number}) => void): void; - on(obj: Access.ReportOldV10, event: 'NoData' | 'Open', argNames: ['Cancel'], handler: (this: Access.ReportOldV10, parameter: {Cancel: number}) => void): void; on(obj: Access.Section, event: 'DblClick', argNames: ['Cancel'], handler: (this: Access.Section, parameter: {Cancel: number}) => void): void; - on( - obj: Access.Section, event: 'MouseDown' | 'MouseMove' | 'MouseUp', argNames: ['Button', 'Shift', 'X', 'Y'], handler: ( - this: Access.Section, parameter: {Button: number, Shift: number, X: number, Y: number}) => void): void; + on(obj: Access.Section, event: 'MouseDown' | 'MouseMove' | 'MouseUp', argNames: ['Button', 'Shift', 'X', 'Y'], handler: (this: Access.Section, parameter: {Button: number, Shift: number, X: number, Y: number}) => void): void; on(obj: Access.SubForm, event: 'Exit', argNames: ['Cancel'], handler: (this: Access.SubForm, parameter: {Cancel: number}) => void): void; on(obj: Access.SubReport, event: 'Exit', argNames: ['Cancel'], handler: (this: Access.SubReport, parameter: {Cancel: number}) => void): void; on(obj: Access.TabControl, event: 'DblClick', argNames: ['Cancel'], handler: (this: Access.TabControl, parameter: {Cancel: number}) => void): void; on(obj: Access.TabControl, event: 'KeyDown' | 'KeyUp', argNames: ['KeyCode', 'Shift'], handler: (this: Access.TabControl, parameter: {KeyCode: number, Shift: number}) => void): void; on(obj: Access.TabControl, event: 'KeyPress', argNames: ['KeyAscii'], handler: (this: Access.TabControl, parameter: {KeyAscii: number}) => void): void; - on( - obj: Access.TabControl, event: 'MouseDown' | 'MouseMove' | 'MouseUp', argNames: ['Button', 'Shift', 'X', 'Y'], handler: ( - this: Access.TabControl, parameter: {Button: number, Shift: number, X: number, Y: number}) => void): void; + on(obj: Access.TabControl, event: 'MouseDown' | 'MouseMove' | 'MouseUp', argNames: ['Button', 'Shift', 'X', 'Y'], handler: (this: Access.TabControl, parameter: {Button: number, Shift: number, X: number, Y: number}) => void): void; on(obj: Access.TextBox, event: 'BeforeUpdate' | 'DblClick' | 'Dirty' | 'Exit' | 'Undo', argNames: ['Cancel'], handler: (this: Access.TextBox, parameter: {Cancel: number}) => void): void; on(obj: Access.TextBox, event: 'KeyDown' | 'KeyUp', argNames: ['KeyCode', 'Shift'], handler: (this: Access.TextBox, parameter: {KeyCode: number, Shift: number}) => void): void; on(obj: Access.TextBox, event: 'KeyPress', argNames: ['KeyAscii'], handler: (this: Access.TextBox, parameter: {KeyAscii: number}) => void): void; - on( - obj: Access.TextBox, event: 'MouseDown' | 'MouseMove' | 'MouseUp', argNames: ['Button', 'Shift', 'X', 'Y'], handler: ( - this: Access.TextBox, parameter: {Button: number, Shift: number, X: number, Y: number}) => void): void; + on(obj: Access.TextBox, event: 'MouseDown' | 'MouseMove' | 'MouseUp', argNames: ['Button', 'Shift', 'X', 'Y'], handler: (this: Access.TextBox, parameter: {Button: number, Shift: number, X: number, Y: number}) => void): void; on(obj: Access.ToggleButton, event: 'BeforeUpdate' | 'DblClick' | 'Exit', argNames: ['Cancel'], handler: (this: Access.ToggleButton, parameter: {Cancel: number}) => void): void; on(obj: Access.ToggleButton, event: 'KeyDown' | 'KeyUp', argNames: ['KeyCode', 'Shift'], handler: (this: Access.ToggleButton, parameter: {KeyCode: number, Shift: number}) => void): void; on(obj: Access.ToggleButton, event: 'KeyPress', argNames: ['KeyAscii'], handler: (this: Access.ToggleButton, parameter: {KeyAscii: number}) => void): void; - on( - obj: Access.ToggleButton, event: 'MouseDown' | 'MouseMove' | 'MouseUp', argNames: ['Button', 'Shift', 'X', 'Y'], handler: ( - this: Access.ToggleButton, parameter: {Button: number, Shift: number, X: number, Y: number}) => void): void; - on( - obj: Access.WebBrowserControl, event: 'BeforeNavigate2', argNames: Access.EventHelperTypes.WebBrowserControl_BeforeNavigate2_ArgNames, - handler: (this: Access.WebBrowserControl, parameter: Access.EventHelperTypes.WebBrowserControl_BeforeNavigate2_Parameter) => void): void; - on( - obj: Access.WebBrowserControl, event: 'BeforeUpdate' | 'DblClick' | 'Dirty' | 'Exit', argNames: ['Cancel'], handler: ( - this: Access.WebBrowserControl, parameter: {Cancel: number}) => void): void; - on( - obj: Access.WebBrowserControl, event: 'DocumentComplete', argNames: ['pDisp', 'URL'], handler: ( - this: Access.WebBrowserControl, parameter: {readonly pDisp: any, readonly URL: any}) => void): void; + on(obj: Access.ToggleButton, event: 'MouseDown' | 'MouseMove' | 'MouseUp', argNames: ['Button', 'Shift', 'X', 'Y'], handler: (this: Access.ToggleButton, parameter: {Button: number, Shift: number, X: number, Y: number}) => void): void; + on(obj: Access.WebBrowserControl, event: 'BeforeNavigate2', argNames: Access.EventHelperTypes.WebBrowserControl_BeforeNavigate2_ArgNames, handler: (this: Access.WebBrowserControl, parameter: Access.EventHelperTypes.WebBrowserControl_BeforeNavigate2_Parameter) => void): void; + on(obj: Access.WebBrowserControl, event: 'BeforeUpdate' | 'DblClick' | 'Dirty' | 'Exit', argNames: ['Cancel'], handler: (this: Access.WebBrowserControl, parameter: {Cancel: number}) => void): void; + on(obj: Access.WebBrowserControl, event: 'DocumentComplete', argNames: ['pDisp', 'URL'], handler: (this: Access.WebBrowserControl, parameter: {readonly pDisp: any, readonly URL: any}) => void): void; on(obj: Access.WebBrowserControl, event: 'KeyDown' | 'KeyUp', argNames: ['KeyCode', 'Shift'], handler: (this: Access.WebBrowserControl, parameter: {KeyCode: number, Shift: number}) => void): void; on(obj: Access.WebBrowserControl, event: 'KeyPress', argNames: ['KeyAscii'], handler: (this: Access.WebBrowserControl, parameter: {KeyAscii: number}) => void): void; - on( - obj: Access.WebBrowserControl, event: 'MouseDown' | 'MouseMove' | 'MouseUp', argNames: ['Button', 'Shift', 'X', 'Y'], handler: ( - this: Access.WebBrowserControl, parameter: {Button: number, Shift: number, X: number, Y: number}) => void): void; - on( - obj: Access.WebBrowserControl, event: 'NavigateError', argNames: ['pDisp', 'URL', 'TargetFrameName', 'StatusCode', 'Cancel'], - handler: (this: Access.WebBrowserControl, parameter: {readonly pDisp: any, readonly URL: any, readonly TargetFrameName: any, readonly StatusCode: any, Cancel: boolean}) => void): void; - on( - obj: Access.WebBrowserControl, event: 'ProgressChange', argNames: ['Progress', 'ProgressMax'], handler: ( - this: Access.WebBrowserControl, parameter: {readonly Progress: number, readonly ProgressMax: number}) => void): void; + on(obj: Access.WebBrowserControl, event: 'MouseDown' | 'MouseMove' | 'MouseUp', argNames: ['Button', 'Shift', 'X', 'Y'], handler: (this: Access.WebBrowserControl, parameter: {Button: number, Shift: number, X: number, Y: number}) => void): void; + on(obj: Access.WebBrowserControl, event: 'NavigateError', argNames: ['pDisp', 'URL', 'TargetFrameName', 'StatusCode', 'Cancel'], handler: (this: Access.WebBrowserControl, parameter: {readonly pDisp: any, readonly URL: string, readonly TargetFrameName: string | null, readonly StatusCode: any, Cancel: boolean}) => void): void; + on(obj: Access.WebBrowserControl, event: 'ProgressChange', argNames: ['Progress', 'ProgressMax'], handler: (this: Access.WebBrowserControl, parameter: {readonly Progress: number, readonly ProgressMax: number}) => void): void; on(obj: Access.WebBrowserControl, event: 'Updated', argNames: ['Code'], handler: (this: Access.WebBrowserControl, parameter: {Code: number}) => void): void; on(obj: Access._CheckBoxInOption, event: 'AfterUpdate' | 'Click' | 'Enter' | 'GotFocus' | 'LostFocus', handler: (this: Access._CheckBoxInOption, parameter: {}) => void): void; on(obj: Access._OptionButtonInOption, event: 'AfterUpdate' | 'Click' | 'Enter' | 'GotFocus' | 'LostFocus', handler: (this: Access._OptionButtonInOption, parameter: {}) => void): void; @@ -8840,18 +8167,7 @@ interface ActiveXObject { on(obj: Access.ComboBox, event: 'AfterUpdate' | 'Change' | 'Click' | 'Enter' | 'GotFocus' | 'LostFocus', handler: (this: Access.ComboBox, parameter: {}) => void): void; on(obj: Access.CommandButton, event: 'Click' | 'Enter' | 'GotFocus' | 'LostFocus', handler: (this: Access.CommandButton, parameter: {}) => void): void; on(obj: Access.CustomControl, event: 'Enter' | 'GotFocus' | 'LostFocus', handler: (this: Access.CustomControl, parameter: {}) => void): void; - on( - obj: Access.Form, event: 'Activate' | 'AfterInsert' | 'AfterUpdate' | 'BeforeQuery' | 'Click' | 'Close' | 'Current' | 'DataSetChange' | 'Deactivate' | 'GotFocus' | - 'Load' | 'LostFocus' | 'OnConnect' | 'OnDisconnect' | 'Query' | 'Resize' | 'SelectionChange' | 'Timer', - handler: (this: Access.Form, parameter: {}) => void): void; - on( - obj: Access.FormOld, event: 'Activate' | 'AfterInsert' | 'AfterUpdate' | 'BeforeQuery' | 'Click' | 'Close' | 'Current' | 'DataSetChange' | 'Deactivate' | - 'GotFocus' | 'Load' | 'LostFocus' | 'OnConnect' | 'OnDisconnect' | 'Query' | 'Resize' | 'SelectionChange' | 'Timer', - handler: (this: Access.FormOld, parameter: {}) => void): void; - on( - obj: Access.FormOldV10, event: 'Activate' | 'AfterInsert' | 'AfterUpdate' | 'BeforeQuery' | 'Click' | 'Close' | 'Current' | 'DataSetChange' | 'Deactivate' | - 'GotFocus' | 'Load' | 'LostFocus' | 'OnConnect' | 'OnDisconnect' | 'Query' | 'Resize' | 'SelectionChange' | 'Timer', - handler: (this: Access.FormOldV10, parameter: {}) => void): void; + on(obj: Access.Form, event: 'Activate' | 'AfterInsert' | 'AfterUpdate' | 'BeforeQuery' | 'Click' | 'Close' | 'Current' | 'DataSetChange' | 'Deactivate' | 'GotFocus' | 'Load' | 'LostFocus' | 'OnConnect' | 'OnDisconnect' | 'Query' | 'Resize' | 'SelectionChange' | 'Timer', handler: (this: Access.Form, parameter: {}) => void): void; on(obj: Access.Image, event: 'Click', handler: (this: Access.Image, parameter: {}) => void): void; on(obj: Access.Label, event: 'Click', handler: (this: Access.Label, parameter: {}) => void): void; on(obj: Access.ListBox, event: 'AfterUpdate' | 'Click' | 'Enter' | 'GotFocus' | 'LostFocus', handler: (this: Access.ListBox, parameter: {}) => void): void; @@ -8863,11 +8179,7 @@ interface ActiveXObject { on(obj: Access.Page, event: 'Click', handler: (this: Access.Page, parameter: {}) => void): void; on(obj: Access.PaletteButton, event: 'AfterUpdate' | 'Click' | 'Enter' | 'GotFocus' | 'LostFocus', handler: (this: Access.PaletteButton, parameter: {}) => void): void; on(obj: Access.Rectangle, event: 'Click', handler: (this: Access.Rectangle, parameter: {}) => void): void; - on( - obj: Access.Report, event: 'Activate' | 'Click' | 'Close' | 'Current' | 'Deactivate' | 'GotFocus' | 'Load' | 'LostFocus' | 'Page' | 'Resize' | 'Timer', - handler: (this: Access.Report, parameter: {}) => void): void; - on(obj: Access.ReportOld, event: 'Activate' | 'Close' | 'Deactivate' | 'Page', handler: (this: Access.ReportOld, parameter: {}) => void): void; - on(obj: Access.ReportOldV10, event: 'Activate' | 'Close' | 'Deactivate' | 'Page', handler: (this: Access.ReportOldV10, parameter: {}) => void): void; + on(obj: Access.Report, event: 'Activate' | 'Click' | 'Close' | 'Current' | 'Deactivate' | 'GotFocus' | 'Load' | 'LostFocus' | 'Page' | 'Resize' | 'Timer', handler: (this: Access.Report, parameter: {}) => void): void; on(obj: Access.Section, event: 'Click' | 'Paint', handler: (this: Access.Section, parameter: {}) => void): void; on(obj: Access.SubForm, event: 'Enter', handler: (this: Access.SubForm, parameter: {}) => void): void; on(obj: Access.SubReport, event: 'Enter', handler: (this: Access.SubReport, parameter: {}) => void): void; @@ -8875,51 +8187,26 @@ interface ActiveXObject { on(obj: Access.TextBox, event: 'AfterUpdate' | 'Change' | 'Click' | 'Enter' | 'GotFocus' | 'LostFocus', handler: (this: Access.TextBox, parameter: {}) => void): void; on(obj: Access.ToggleButton, event: 'AfterUpdate' | 'Click' | 'Enter' | 'GotFocus' | 'LostFocus', handler: (this: Access.ToggleButton, parameter: {}) => void): void; on(obj: Access.WebBrowserControl, event: 'AfterUpdate' | 'Change' | 'Click' | 'Enter' | 'GotFocus' | 'LostFocus', handler: (this: Access.WebBrowserControl, parameter: {}) => void): void; - set( - obj: Access._CheckBoxInOption | Access._ChildLabel | Access._CustomControlInReport | Access._OptionButtonInOption | Access._ToggleButtonInOption | - Access.Attachment | Access.BoundObjectFrame | Access.CheckBox | Access.ComboBox | Access.CommandButton | Access.CustomControl | Access.EmptyCell | Access.Form | - Access.FormOld | Access.FormOldV10 | Access.Label | Access.ListBox | Access.NavigationButton | Access.NavigationControl | Access.ObjectFrame | - Access.OptionButton | Access.OptionGroup | Access.Page | Access.SubForm | Access.TabControl | Access.TextBox | Access.ToggleButton | Access.WebBrowserControl, - propertyName: 'accName' | 'accValue', parameterTypes: [any], newValue: string): void; + on(obj: AccWizObjects.FieldList, event: 'DragDrop', argNames: ['SourceCtlName', 'SourceFieldList', 'SourceRow', 'X', 'Y'], handler: (this: AccWizObjects.FieldList, parameter: { readonly SourceCtlName: string, readonly SourceFieldList: number, readonly SourceRow: number, readonly X: number, readonly Y: number }) => void): void; + on(obj: AccWizObjects.FieldList, event: 'DragOver', argNames: AccWizObjects.EventHelperTypes.FieldList_DragOver_ArgNames, handler: (this: AccWizObjects.FieldList, parameter: AccWizObjects.EventHelperTypes.FieldList_DragOver_Parameter) => void): void; + on(obj: AccWizObjects.FieldList, event: 'FldListCheckItem' | 'FldListClick' | 'FldListDblClick' | 'FldListHdrDblClick', argNames: ['FieldList'], handler: (this: AccWizObjects.FieldList, parameter: { readonly FieldList: number }) => void): void; + on(obj: AccWizObjects.FieldList, event: 'FldListDragDrop', argNames: AccWizObjects.EventHelperTypes.FieldList_FldListDragDrop_ArgNames, handler: (this: AccWizObjects.FieldList, parameter: AccWizObjects.EventHelperTypes.FieldList_FldListDragDrop_Parameter) => void): void; + on(obj: AccWizObjects.FieldList, event: 'FldListDragOver', argNames: AccWizObjects.EventHelperTypes.FieldList_FldListDragOver_ArgNames, handler: (this: AccWizObjects.FieldList, parameter: AccWizObjects.EventHelperTypes.FieldList_FldListDragOver_Parameter) => void): void; + on(obj: AccWizObjects.FieldList, event: 'FldListGotFocus' | 'FldListLostFocus', argNames: ['FieldListIndex'], handler: (this: AccWizObjects.FieldList, parameter: { readonly FieldListIndex: number }) => void): void; + on(obj: AccWizObjects.FieldList, event: 'FldListKeyDown' | 'FldListKeyUp', argNames: ['FieldList', 'KeyCode', 'Shift'], handler: (this: AccWizObjects.FieldList, parameter: { readonly FieldList: number, KeyCode: number, readonly Shift: number }) => void): void; + on(obj: AccWizObjects.FieldList, event: 'FldListKeyPress', argNames: ['FieldList', 'KeyAscii'], handler: (this: AccWizObjects.FieldList, parameter: { readonly FieldList: number, KeyAscii: number }) => void): void; + on(obj: AccWizObjects.FieldList, event: 'FldListMouseDown' | 'FldListMouseMove' | 'FldListMouseUp', argNames: ['FieldList', 'Button', 'Shift', 'X', 'Y'], handler: (this: AccWizObjects.FieldList, parameter: { readonly FieldList: number, readonly Button: number, readonly Shift: number, readonly X: stdole.OLE_XPOS_PIXELS, readonly Y: stdole.OLE_YPOS_PIXELS }) => void): void; + on(obj: AccWizObjects.ImexGrid, event: 'ColumnCreated' | 'ColumnDeleted' | 'ColumnSelected' | 'ColumnSized', argNames: ['Column'], handler: (this: AccWizObjects.ImexGrid, parameter: { readonly Column: number }) => void): void; + on(obj: AccWizObjects.FieldList, event: 'AfterStartup', handler: (this: AccWizObjects.FieldList, parameter: {}) => void): void; + set(obj: Access._CheckBoxInOption | Access._ChildLabel | Access._CustomControlInReport | Access._OptionButtonInOption | Access._ToggleButtonInOption | Access.Attachment | Access.BoundObjectFrame | Access.CheckBox | Access.ComboBox | Access.CommandButton | Access.CustomControl | Access.EmptyCell | Access.Form | Access.Label | Access.ListBox | Access.NavigationButton | Access.NavigationControl | Access.ObjectFrame | Access.OptionButton | Access.OptionGroup | Access.Page | Access.SubForm | Access.TabControl | Access.TextBox | Access.ToggleButton | Access.WebBrowserControl, propertyName: 'accName' | 'accValue', parameterTypes: [any], newValue: string): void; set(obj: Access._ControlInReportEvents | Access.ComboBox | Access.Control | Access.ListBox, propertyName: 'Selected', parameterTypes: [number], newValue: number): void; - new(progid: K): ActiveXObjectNameMap[K]; + set(obj: AccWizObjects.ImexGrid, propertyName: 'Columns', parameterTypes: [number], newValue: any): void; + set(obj: AccWizObjects.ImexGrid, propertyName: 'RowText', parameterTypes: [number], newValue: string): void; } interface ActiveXObjectNameMap { 'Access.Application': Access.Application; -} - -interface EnumeratorConstructor { - new(col: Access._ItemsSelected): Enumerator; - new(col: Access.AccessObjectProperties): Enumerator; - new(col: Access.AdditionalData): Enumerator; - new( - col: Access.AllDataAccessPages | Access.AllDatabaseDiagrams | Access.AllForms | Access.AllFunctions | Access.AllMacros | Access.AllModules | Access.AllQueries | - Access.AllReports | Access.AllStoredProcedures | Access.AllTables | Access.AllViews | Access.DependencyObjects): Enumerator; - new(col: Access.Controls): Enumerator; - new(col: Access.Children | Access.Properties): Enumerator; // tslint:disable-line:use-default-type-parameter - new(col: Access.DataAccessPages): Enumerator; - new(col: Access.Entities): Enumerator; - new(col: Access.FormatConditions): Enumerator; - new(col: Access.Forms): Enumerator; - new(col: Access.ImportExportSpecifications): Enumerator; - new(col: Access.LocalVars): Enumerator; - new(col: Access.Modules): Enumerator; - new(col: Access.Operations): Enumerator; - new(col: Access.Pages): Enumerator; - new(col: Access.Printers): Enumerator; - new(col: Access.References): Enumerator; - new(col: Access.Reports): Enumerator; - new(col: Access.ReturnVars): Enumerator; - new(col: Access.SharedResources): Enumerator; - new(col: Access.SmartTagActions): Enumerator; - new(col: Access.SmartTagProperties): Enumerator; - new(col: Access.SmartTags): Enumerator; - new(col: Access.TempVars): Enumerator; - new(col: Access.WebServices): Enumerator; - new(col: Access.WSParameters): Enumerator; -} - -interface SafeArray { - _brand: SafeArray; + 'ACCWIZ.FieldListCtrl': AccWizObjects.FieldList; + 'ACCWIZ.ImexGridCtrl': AccWizObjects.ImexGrid; + lnkfile: AccWizObjects.WizShellLinkA; } diff --git a/types/activex-access/tsconfig.json b/types/activex-access/tsconfig.json index a376fcb722..867c1e2970 100644 --- a/types/activex-access/tsconfig.json +++ b/types/activex-access/tsconfig.json @@ -2,8 +2,7 @@ "compilerOptions": { "module": "commonjs", "lib": [ - "es5", - "scripthost" + "es5" ], "noImplicitAny": true, "noImplicitThis": true, diff --git a/types/activex-access/tslint.json b/types/activex-access/tslint.json index 3224b40b8b..7b89accc6d 100644 --- a/types/activex-access/tslint.json +++ b/types/activex-access/tslint.json @@ -1,6 +1,7 @@ { "extends": "dtslint/dt.json", "rules": { - "no-const-enum": false + "no-const-enum": false, + "max-line-length": false } } diff --git a/types/activex-adodb/activex-adodb-tests.ts b/types/activex-adodb/activex-adodb-tests.ts index f409b888d3..eecc7e9bdc 100644 --- a/types/activex-adodb/activex-adodb-tests.ts +++ b/types/activex-adodb/activex-adodb-tests.ts @@ -1,57 +1,429 @@ -let obj0 = new ActiveXObject('ADODB.Command'); +// Note -- running these tests under cscript requires some ES5 polyfills -let obj1 = new ActiveXObject('ADODB.Connection'); +/// +/// -let obj2 = new ActiveXObject('ADODB.Parameter'); +const collectionToArray = (col: { Item(key: any): T }): T[] => { + const results: T[] = []; + const enumerator = new Enumerator(col); + enumerator.moveFirst(); + while (!enumerator.atEnd()) { + results.push(enumerator.item()); + enumerator.moveNext(); + } + return results; +}; -let obj3 = new ActiveXObject('ADODB.Record'); +const toSafeArray = (...items: T[]): SafeArray => { + const dict: Scripting.Dictionary = new ActiveXObject('Scripting.Dictionary'); + items.forEach((x, index) => dict.Add(index, x)); + return dict.Items(); +}; -let obj4 = new ActiveXObject('ADODB.Recordset'); +const toConnectionString = (o: { [index: string]: any }) => { + o.Provider = o.Provider || 'sqloledb'; + o['Data Source'] = o['Data Source'] || 'Server'; + o['Integrated Security'] = o['Integrated Security'] || 'SSPI'; -let obj5 = new ActiveXObject('ADODB.Stream'); + const parts: string[] = []; + for (const key in o) { + let val = o[key]; + if (typeof val === 'string') { val = `'${val}'`; } + parts.push(`${key}=${val}`); + } + return parts.join(';'); +}; -// open connection to an Excel file -let pathToExcelFile = 'C:\\path\\to\\excel\\file.xlsx'; -let conn = new ActiveXObject('ADODB.Connection'); -conn.Provider = 'Microsoft.ACE.OLEDB.12.0'; -conn.ConnectionString = `Data Source="${pathToExcelFile}";Extended Properties="Excel 12.0;HDR=Yes"`; -conn.Open(); +const printLine = () => WScript.Echo(new Array(26).join('-')); -// create a Command to access the data -let cmd = new ActiveXObject('ADODB.Command'); -cmd.ActiveConnection = conn; -cmd.CommandText = 'SELECT DISTINCT LastName, CityName FROM [Sheet1$]'; -// get a Recordset -let rs = cmd.Execute(); -// build a string from the Recordset -let s = rs.GetString(ADODB.StringFormatEnum.adClipString, -1, '\t', '\n', '(NULL)'); -rs.Close(); -WScript.Echo(s); +{ + // open connection to an Excel file + const pathToExcelFile = 'C:\\path\\to\\excel\\file.xlsx'; + const conn = new ActiveXObject('ADODB.Connection'); + conn.ConnectionString = toConnectionString({ + Provider: 'Microsoft.ACE.OLEDB.12.0', + 'Data Source': pathToExcelFile, + 'Extended Properties': "Excel 12.0;HDR=Yes" + }); + conn.Open(); + + // create a Command to access the data + const cmd = new ActiveXObject('ADODB.Command'); + cmd.ActiveConnection = conn; + cmd.CommandText = 'SELECT DISTINCT LastName, CityName FROM [Sheet1$]'; + // get a Recordset + const rs = cmd.Execute() as ADODB.Recordset; + // build a string from the Recordset + const s = rs.GetString(ADODB.StringFormatEnum.adClipString, -1, '\t', '\n', '(NULL)'); + rs.Close(); + WScript.Echo(s); +} // create a disconnected recordset -- https://support.microsoft.com/en-us/help/184397/how-to-create-ado-disconnected-recordsets-in-vba-c-java -(() => { - conn = new ActiveXObject('ADODB.Connection'); +{ + const conn = new ActiveXObject('ADODB.Connection'); conn.Open(); // pass connection details here - rs = new ActiveXObject('ADODB.Recordset'); + const rs = new ActiveXObject('ADODB.Recordset'); rs.CursorLocation = ADODB.CursorLocationEnum.adUseClient; rs.Open('SELECT * FROM Table1', conn, ADODB.CursorTypeEnum.adOpenForwardOnly, ADODB.LockTypeEnum.adLockBatchOptimistic); rs.ActiveConnection = null; - const v = rs.Fields.Item(0).Value; + const v = rs(0).Value; conn.Close(); -})(); - -// helper function -const toSafeArray = (...items: T[]): SafeArray => { - const dict = new ActiveXObject('Scripting.Dictionary'); - items.forEach((x, index) => dict.Add(index, x)); - return dict.Items() as SafeArray; -}; +} // update with SafeArray -(() => { +{ + const rs = new ActiveXObject('ADODB.Recordset'); + rs.Open(); // missing connection details here const fields = toSafeArray('FirstName', 'LastName', 'DOB'); const values = toSafeArray('Plony', 'Almony', new Date(1980, 1, 1).getVarDate()); rs.Update(fields, values); -})(); + rs.Close(); +} + +const withConnection = (initialCatalog: string, fn: (conn: ADODB.Connection) => void) => { + let conn: ADODB.Connection | null = new ActiveXObject('ADODB.Connection'); + const connectionString = toConnectionString({ + 'Initial Catalog': initialCatalog + }); + try { + conn.Open(connectionString); + fn(conn); + } catch (e) { + WScript.Echo(e.message); + } finally { + if (conn.State === ADODB.ObjectStateEnum.adStateOpen) { + conn.Close(); + } + conn = null; + } +}; + +const withRs = (catalogOrConnection: string | ADODB.Connection, tableOrCommand: string | ADODB.Command, fn: (rs: ADODB.Recordset) => void, + type: ADODB.CursorTypeEnum = ADODB.CursorTypeEnum.adOpenUnspecified, + location: ADODB.CursorLocationEnum = ADODB.CursorLocationEnum.adUseNone, + lockType: ADODB.LockTypeEnum = ADODB.LockTypeEnum.adLockOptimistic +) => { + let connection = catalogOrConnection; + if (typeof connection === 'string') { + // expand catalog to full connection string + connection = toConnectionString({ + 'Initial Catalog': connection + }); + } + + let rs: ADODB.Recordset | null = null; + try { + if (typeof tableOrCommand === 'string') { + rs = new ActiveXObject('ADODB.Recordset'); + rs.CursorLocation = location; + rs.LockType = lockType; + rs.Open(tableOrCommand, connection, type, lockType, ADODB.CommandTypeEnum.adCmdTable); + } else { + tableOrCommand.ActiveConnection = connection; + rs = tableOrCommand.Execute() as ADODB.Recordset; + } + fn(rs); + } catch (e) { + WScript.Echo(e.message); + } finally { + if (rs && rs.State === ADODB.ObjectStateEnum.adStateOpen) { + rs.Close(); + } + rs = null; + } +}; + +const withEmployees = (fn: (rs: ADODB.Recordset) => void, type: ADODB.CursorTypeEnum) => + withRs('Northwind', 'Employees', fn, type, ADODB.CursorLocationEnum.adUseClient); + +// https://msdn.microsoft.com/en-us/library/jj249882.aspx +{ + withConnection('Northwind', conn => { + withEmployees(rs => { + const FName = 'first name'; + const LName = 'last name'; + + rs.AddNew(); + rs('FirstName').Value = FName; + rs('LastName').Value = LName; + rs.Update(); + WScript.Echo('New record added.'); + }, ADODB.CursorTypeEnum.adOpenKeyset); + }); +} + +// https://msdn.microsoft.com/en-us/library/jj249434.aspx +{ + withConnection('Northwind', conn => { + withEmployees(rs => { + // Set PageSize to five to display names and hire dates of five employees at a time + rs.PageSize = 5; + const pageCount = rs.PageCount; + + WScript.Echo(`There are ${pageCount} pages, each containing ${rs.PageSize} or fewer records`.trim()); + + for (let i = 1; i <= pageCount; i++) { + rs.AbsolutePage = i; + + for (let iRecord = 1; iRecord <= rs.PageSize; iRecord++) { + // First column in row contains page number on + // first record of each page. Otherwise, the column + // contains a non-breaking space. + const page = iRecord === 1 ? `Page ${i} of ${rs.PageCount}` : ''; + + // First and last name are in first column. + const name = `${rs('FirstName')} ${rs('LastName')}`; + + // Hire date in second column. + const hireDate = new Date(rs('HireDate').Value as VarDate).toString(); + + // Write the row + WScript.Echo([page, name, hireDate].join('\t')); + + // Get next record. + rs.MoveNext(); + + if (rs.EOF) { break; } + } + } + }, ADODB.CursorTypeEnum.adOpenStatic); + }); +} + +// https://msdn.microsoft.com/en-us/library/jj250117.aspx +{ + withConnection('Northwind', conn => { + withEmployees(rs => { + WScript.Echo(['AbsolutePosition', 'Name', 'Hire Date'].join('\t')); + + while (!rs.EOF) { + // First column in row contains AbsolutePosition value. + const recordCount = `${rs.AbsolutePosition} of ${rs.RecordCount}`; + + // First and last name are in first column. + const name = `${rs('FirstName')} ${rs('LastName')}`; + + // Hire date in second column. + const hireDate = new Date(rs('HireDate').Value as VarDate).toString(); + + WScript.Echo([recordCount, name, hireDate].join('\t')); + } + }, ADODB.CursorTypeEnum.adOpenStatic); + }); +} + +// https://msdn.microsoft.com/en-us/library/jj249824.aspx +{ + withConnection('Northwind', conn => { + WScript.Echo('Enter city name, and press ENTER:'); + const cityName = WScript.StdIn.ReadLine(); + + const cmdContact = new ActiveXObject('ADODB.Command'); + cmdContact.CommandText = 'SELECT ContactName FROM Customers WHERE City = ?'; + cmdContact.ActiveConnection = conn; + + // create parameter and insert variable value + const param = cmdContact.CreateParameter('CityName', ADODB.DataTypeEnum.adChar, ADODB.ParameterDirectionEnum.adParamInput, 30, cityName); + cmdContact.Parameters.Append(param); + + let rsContact: ADODB.Recordset | null = null; + try { + // Open a recordset using the command object + rsContact = cmdContact.Execute() as ADODB.Recordset; + + while (!rsContact.EOF) { + WScript.Echo(rsContact('ContactName')); + rsContact.MoveNext(); + } + } catch (e) { + WScript.Echo(e.message); + } finally { + if (rsContact && rsContact.State === ADODB.ObjectStateEnum.adStateOpen) { + rsContact.Close(); + } + } + }); +} + +// https://msdn.microsoft.com/en-us/library/jj249056.aspx +// https://msdn.microsoft.com/en-us/library/jj249494.aspx +{ + WScript.Echo('Enter royalty value, and press ENTER:'); + const iRoyalty = parseInt(WScript.StdIn.ReadLine(), 10); + if (iRoyalty > -1) { + withConnection('pubs', conn => { + const cmdByRoyalty = new ActiveXObject('ADODB.Command'); + cmdByRoyalty.CommandText = 'byroyalty'; + cmdByRoyalty.CommandType = ADODB.CommandTypeEnum.adCmdStoredProc; + cmdByRoyalty.CommandTimeout = 15; + + // The stored procedure called above is as follows: + /* + CREATE PROCEDURE byroyalty + @percentage int + AS + SELECT au_id from titleauthor + WHERE titleauthor.royaltyper = @percentage + GO + */ + + const prmByRoyalty = new ActiveXObject('ADODB.Parameter'); + prmByRoyalty.Type = ADODB.DataTypeEnum.adInteger; + prmByRoyalty.Size = 3; + prmByRoyalty.Direction = ADODB.ParameterDirectionEnum.adParamInput; + prmByRoyalty.Value = iRoyalty; + cmdByRoyalty.Parameters.Append(prmByRoyalty); + + // open byRoyalty recordset via Command + withRs(conn, cmdByRoyalty, rsByRoyalty => { + // open authors recordset directly + withRs(conn, 'Authors', rsAuthor => { + while (!rsByRoyalty.EOF) { + // set filter + rsAuthor.Filter = `au_id='${rsByRoyalty('au_id')}'`; + + // write author name + WScript.Echo(`${rsAuthor('au_fname')} ${rsAuthor('au_lname')}`); + } + + // get next record + rsByRoyalty.MoveNext(); + }); + }); + }); + } +} + +// https://msdn.microsoft.com/en-us/library/jj250032.aspx +{ + withRs('Northwind', 'Suppliers', rsSuppliers => { + WScript.Echo(['Field Value', 'Defined Size', 'Actual Size'].join('\t')); + while (!rsSuppliers.EOF) { + const fld = rsSuppliers('CompanyName'); + WScript.Echo([fld.Value, fld.DefinedSize, fld.ActualSize].join('\t')); + } + rsSuppliers.MoveNext(); + }); +} + +// https://msdn.microsoft.com/en-us/library/jj249928.aspx +{ + withRs('Northwind', 'Customers', rs => { + const loop20 = () => { + const start = new Date().getTime(); + + // loop through the recordset 20 times + for (let i = 0; i < 20; i++) { + rs.MoveFirst(); + while (!rs.EOF) { + // do something with the record + const strTemp = rs('CompanyName').Value as string; + rs.MoveNext(); + } + } + + const end = new Date().getTime(); + return end - start; + }; + + const noCache = loop20(); + + // cache records in groups of 30 + rs.MoveFirst(); + rs.CacheSize = 30; + + const cache = loop20(); + + WScript.Echo(`No cache: ${noCache}; with cache: ${cache}`); + }, ADODB.CursorTypeEnum.adOpenUnspecified, ADODB.CursorLocationEnum.adUseClient); +} + +// https://msdn.microsoft.com/en-us/library/jj249157.aspx +{ + const printAuthorRecordset = (caption: string, rs: ADODB.Recordset) => { + printLine(); + WScript.Echo(`**${caption}**`); + while (!rs.EOF) { + // write current row's data + const name = `${rs('au_fname')} ${rs('au_lname')}`; + WScript.Echo(name); + + // get next record + rs.MoveNext; + } + }; + + WScript.Echo('Enter last name of author to find (e.g., Ringer) and then press ENTER:'); + const lastName = WScript.StdIn.ReadLine() || ''; + if (lastName.length > 0) { + withConnection('pubs', conn => { + // command object parameters + const cmdAuthor = new ActiveXObject('ADODB.Command'); + cmdAuthor.CommandText = 'SELECT * FROM Authors WHERE au_name = ?'; + const lastNameParameter = cmdAuthor.CreateParameter('Last Name', ADODB.DataTypeEnum.adChar, ADODB.ParameterDirectionEnum.adParamInput, 20, lastName); + cmdAuthor.Parameters.Append(lastNameParameter); + cmdAuthor.ActiveConnection = conn; + + // recordset from command.execute + const rsAuthor = cmdAuthor.Execute() as ADODB.Recordset; + + // recordset from connection.execute + const rsAuthor2 = conn.Execute('SELECT * FROM Authors') as ADODB.Recordset; + + const errs = collectionToArray(conn.Errors); + if (errs.length > 0) { + for (const err of errs) { + WScript.Echo(err); + } + } + conn.Errors.Clear(); + + printAuthorRecordset('Command.Execute results', rsAuthor); + printAuthorRecordset('Connection.Execute results', rsAuthor2); + }); + } +} + +// https://msdn.microsoft.com/en-us/library/jj249466.aspx +{ + withConnection('Northwind', conn => { + const sql = 'SELECT * FROM Customers'; + withRs(conn, sql, rs => { + rs.MoveFirst(); + if (rs.RecordCount === 0) { + WScript.Echo(`No records matched for '${sql}'`); + return; + } + + // print headings for each field name + WScript.Echo(collectionToArray(rs.Fields).map(fld => fld.Name).join('\t')); + + // JScript doesn't support multi-dimensional arrays + // so we'll convert the returned array to a single + // dimensional JScript array and then display the data. + const safeArray = rs.GetRows(); + const data = new VBArray(safeArray).toArray(); + + const fieldCount = rs.Fields.Count; + + data.forEach((cellValue, index) => { + const currentField = index % fieldCount; + + // don't print tab character for first and last columns + if (currentField > 0 && currentField < fieldCount - 1) { + WScript.StdOut.Write('\t'); + } + + const displayValue = cellValue === null ? '-null-' : cellValue; + if (currentField === fieldCount - 1) { + WScript.StdOut.WriteLine(displayValue); + } else { + WScript.StdOut.Write(displayValue); + } + }); + }, ADODB.CursorTypeEnum.adOpenKeyset, ADODB.CursorLocationEnum.adUseClient, ADODB.LockTypeEnum.adLockOptimistic); + }); +} diff --git a/types/activex-adodb/index.d.ts b/types/activex-adodb/index.d.ts index 43f43f5bd5..580042cfa6 100644 --- a/types/activex-adodb/index.d.ts +++ b/types/activex-adodb/index.d.ts @@ -2,7 +2,9 @@ // Project: https://msdn.microsoft.com/en-us/library/jj249010.aspx // Definitions by: Zev Spitz // Definitions: https://github.com/DefinitelyTyped/DefinitelyTyped -// TypeScript Version: 2.3 +// TypeScript Version: 2.6 + +/// declare namespace ADODB { const enum ADCPROP_ASYNCTHREADPRIORITY_ENUM { @@ -594,10 +596,19 @@ declare namespace ADODB { adXactSyncPhaseOne = 1048576, } + class Bookmark { + private 'ADODB.Bookmark_typekey': Bookmark; + private constructor(); + } + class Command { private 'ADODB.Command_typekey': Command; private constructor(); - ActiveConnection: Connection; + + /** + * Sets or returns a String value that contains a definition for a connection if the connection is closed, or a Variant containing the current Connection object if the connection is open. Default is a null object reference. + */ + ActiveConnection: string | Connection | null; Cancel(): void; CommandStream: any; CommandText: string; @@ -605,28 +616,40 @@ declare namespace ADODB { CommandType: CommandTypeEnum; /** - * @param string [Name=''] - * @param ADODB.DataTypeEnum [Type=0] - * @param ADODB.ParameterDirectionEnum [Direction=1] - * @param number [Size=0] + * @param Name [Name=''] + * @param Type [Type=0] + * @param Direction [Direction=1] + * @param Size [Size=0] */ CreateParameter(Name?: string, Type?: DataTypeEnum, Direction?: ParameterDirectionEnum, Size?: number, Value?: any): Parameter; Dialect: string; - /** @param number [Options=-1] */ - Execute(RecordsAffected?: number, Parameters?: SafeArray, Options?: number): Recordset; + /** + * @param Options [Options=-1] + * + * The **RecordsAffected** parameter is meant to take a variable to be modified by reference, which is not supported by Javascript + * + * The return value is as follows: + * + * * If the **adExecuteNoRecords** option is passed in, the method will return `null`. Otherwise: + * * If the command specifies a row-returning query, then the method will return a new read-only, forward-only **Recordset** object with the results. + * * If the command isn't intended to return results (e.g. an `UPDATE` statement), a closed empty **Recordset** will be returned. + */ + Execute(RecordsAffected?: undefined, Parameters?: SafeArray, Options?: number): Recordset | null; Name: string; NamedParameters: boolean; readonly Parameters: Parameters; Prepared: boolean; readonly Properties: Properties; - readonly State: number; + readonly State: ObjectStateEnum; } class Connection { private 'ADODB.Connection_typekey': Connection; private constructor(); - Attributes: number; + + /** Sum of one or more of the values in the **XactAttributeEnum** enum */ + Attributes: XactAttributeEnum; BeginTrans(): number; Cancel(): void; Close(): void; @@ -638,23 +661,45 @@ declare namespace ADODB { DefaultDatabase: string; readonly Errors: Errors; - /** @param number [Options=-1] */ - Execute(CommandText: string, RecordsAffected: any, Options?: number): Recordset; + /** + * @param Options [Options=-1] + * + * The **RecordsAffected** parameter is meant to take a variable to be modified by reference, which is not supported by Javascript + * + * The return value is as follows: + * + * * If the **adExecuteNoRecords** option is passed in, the method will return `null`. Otherwise: + * * If **CommandText** specifies a row-returning query, then the method will return a new read-only, forward-only **Recordset** object with the results + * * If **CommandText** isn't intended to return results (e.g. an `UPDATE` statement), a closed empty **Recordset** will be returned. + */ + Execute(CommandText: string, RecordsAffected?: undefined, Options?: CommandTypeEnum | ExecuteOptionEnum): Recordset | null; IsolationLevel: IsolationLevelEnum; Mode: ConnectModeEnum; /** - * @param string [ConnectionString=''] - * @param string [UserID=''] - * @param string [Password=''] - * @param number [Options=-1] + * @param ConnectionString [ConnectionString=''] + * @param UserID [UserID=''] + * @param Password [Password=''] + * @param Options [Options=-1] */ Open(ConnectionString?: string, UserID?: string, Password?: string, Options?: number): void; - OpenSchema(Schema: SchemaEnum, Restrictions?: any, SchemaID?: any): Recordset; + + /** + * Returns a Recordset object that contains schema information + * @param Schema Type of schema query to run + * @param Restrictions A SafeArray of query constraints; depends on the [type of the schema query](https://msdn.microsoft.com/en-us/library/jj249359.aspx) + */ + OpenSchema(Schema: SchemaEnum, Restrictions?: SafeArray): Recordset; + + /** + * Returns a Recordset object that contains schema information, for a provider-specific schema query type + * @param SchemaID The GUID for a provider-schema query not defined by the OLE DB specification. + */ + OpenSchema(Schema: SchemaEnum.adSchemaProviderSpecific, Restrictions: SafeArray, SchemaID: string): Recordset; readonly Properties: Properties; Provider: string; RollbackTrans(): void; - readonly State: number; + readonly State: ObjectStateEnum; readonly Version: string; } @@ -670,13 +715,12 @@ declare namespace ADODB { readonly SQLState: string; } - class Errors { - private 'ADODB.Errors_typekey': Errors; - private constructor(); + interface Errors { Clear(): void; readonly Count: number; Item(Index: any): Error; Refresh(): void; + (Index: any): Error; } class Field { @@ -684,7 +728,9 @@ declare namespace ADODB { private constructor(); readonly ActualSize: number; AppendChunk(Data: any): void; - Attributes: number; + + /** Sum of one or more of the values in the **FieldAttributeEnum** enum */ + Attributes: FieldAttributeEnum; DataFormat: any; DefinedSize: number; GetChunk(Length: number): any; @@ -699,37 +745,37 @@ declare namespace ADODB { Value: any; } - class Fields { - private 'ADODB.Fields_typekey': Fields; - private constructor(); - + interface Fields { /** - * @param number [DefinedSize=0] - * @param ADODB.FieldAttributeEnum [Attrib=-1] + * @param DefinedSize [DefinedSize=0] + * @param Attrib [Attrib=-1] */ _Append(Name: string, Type: DataTypeEnum, DefinedSize?: number, Attrib?: FieldAttributeEnum): void; /** - * @param number [DefinedSize=0] - * @param ADODB.FieldAttributeEnum [Attrib=-1] + * @param DefinedSize [DefinedSize=0] + * @param Attrib [Attrib=-1] */ Append(Name: string, Type: DataTypeEnum, DefinedSize?: number, Attrib?: FieldAttributeEnum, FieldValue?: any): void; CancelUpdate(): void; readonly Count: number; - Delete(Index: any): void; - Item(Index: any): Field; + Delete(Index: string | number): void; + Item(Index: string | number): Field; Refresh(): void; - /** @param ADODB.ResyncEnum [ResyncValues=2] */ + /** @param ResyncValues [ResyncValues=2] */ Resync(ResyncValues?: ResyncEnum): void; Update(): void; + (Index: string | number): Field; } class Parameter { private 'ADODB.Parameter_typekey': Parameter; private constructor(); AppendChunk(Val: any): void; - Attributes: number; + + /** Sum of one or more of the values in the **ParameterAttributesEnum** enum */ + Attributes: ParameterAttributesEnum; Direction: ParameterDirectionEnum; Name: string; NumericScale: number; @@ -740,28 +786,28 @@ declare namespace ADODB { Value: any; } - class Parameters { - private 'ADODB.Parameters_typekey': Parameters; - private constructor(); + interface Parameters { Append(Object: any): void; readonly Count: number; - Delete(Index: any): void; - Item(Index: any): Parameter; + Delete(Index: string | number): void; + Item(Index: string | number): Parameter; Refresh(): void; + (Index: string | number): Parameter; } - class Properties { - private 'ADODB.Properties_typekey': Properties; - private constructor(); + interface Properties { readonly Count: number; - Item(Index: any): Property; + Item(Index: string | number): Property; Refresh(): void; + (Index: string | number): Property; } class Property { private 'ADODB.Property_typekey': Property; private constructor(); - Attributes: number; + + /** Sum of one or more of the values in the **PropertyAttributesEnum** enum */ + Attributes: PropertyAttributesEnum; readonly Name: string; readonly Type: DataTypeEnum; Value: any; @@ -770,23 +816,27 @@ declare namespace ADODB { class Record { private 'ADODB.Record_typekey': Record; private constructor(); - ActiveConnection: any; + + /** + * Sets or returns a String value that contains a definition for a connection if the connection is closed, or a Variant containing the current Connection object if the connection is open. Default is a null object reference. + */ + ActiveConnection: string | Connection | null; Cancel(): void; Close(): void; /** - * @param string [Source=''] - * @param string [Destination=''] - * @param string [UserName=''] - * @param string [Password=''] - * @param ADODB.CopyRecordOptionsEnum [Options=-1] - * @param boolean [Async=false] + * @param Source [Source=''] + * @param Destination [Destination=''] + * @param UserName [UserName=''] + * @param Password [Password=''] + * @param Options [Options=-1] + * @param Async [Async=false] */ CopyRecord(Source?: string, Destination?: string, UserName?: string, Password?: string, Options?: CopyRecordOptionsEnum, Async?: boolean): string; /** - * @param string [Source=''] - * @param boolean [Async=false] + * @param Source [Source=''] + * @param Async [Async=false] */ DeleteRecord(Source?: string, Async?: boolean): void; readonly Fields: Fields; @@ -794,137 +844,174 @@ declare namespace ADODB { Mode: ConnectModeEnum; /** - * @param string [Source=''] - * @param string [Destination=''] - * @param string [UserName=''] - * @param string [Password=''] - * @param ADODB.MoveRecordOptionsEnum [Options=-1] - * @param boolean [Async=false] + * @param Source [Source=''] + * @param Destination [Destination=''] + * @param UserName [UserName=''] + * @param Password [Password=''] + * @param Options [Options=-1] + * @param Async [Async=false] */ MoveRecord(Source?: string, Destination?: string, UserName?: string, Password?: string, Options?: MoveRecordOptionsEnum, Async?: boolean): string; /** - * @param ADODB.ConnectModeEnum [Mode=0] - * @param ADODB.RecordCreateOptionsEnum [CreateOptions=-1] - * @param ADODB.RecordOpenOptionsEnum [Options=-1] - * @param string [UserName=''] - * @param string [Password=''] + * Source may be: + * * A URL. If the protocol for the URL is http, then the Internet Provider will be invoked by default. If the URL points to a node that contains an executable script (such as an .ASP page), then a Record containing the source rather than the executed contents is opened by default. Use the Options argument to modify this behavior. + * * A Record object. A Record object opened from another Record will clone the original Record object. + * * A Command object. The opened Record object represents the single row returned by executing the Command. If the results contain more than a single row, the contents of the first row are placed in the record and an error may be added to the Errors collection. + * * A SQL SELECT statement. The opened Record object represents the single row returned by executing the contents of the string. If the results contain more than a single row, the contents of the first row are placed in the record and an error may be added to the Errors collection. + * * A table name. + * + * @param Mode [Mode=0] + * @param CreateOptions [CreateOptions=-1] + * @param Options [Options=-1] + * @param UserName [UserName=''] + * @param Password [Password=''] */ - Open(Source: any, ActiveConnection: any, Mode?: ConnectModeEnum, CreateOptions?: RecordCreateOptionsEnum, Options?: RecordOpenOptionsEnum, UserName?: string, Password?: string): void; + Open(Source?: string | Record | Recordset | Command, ActiveConnection?: string | Connection, Mode?: ConnectModeEnum, CreateOptions?: RecordCreateOptionsEnum, Options?: RecordOpenOptionsEnum, UserName?: string, Password?: string): void; readonly ParentURL: string; readonly Properties: Properties; readonly RecordType: RecordTypeEnum; - Source: any; + Source: string | Recordset | Command; readonly State: ObjectStateEnum; } - class Recordset { - private 'ADODB.Recordset_typekey': Recordset; - private constructor(); + interface Recordset { _xClone(): Recordset; - /** @param ADODB.AffectEnum [AffectRecords=3] */ + /** @param AffectRecords [AffectRecords=3] */ _xResync(AffectRecords?: AffectEnum): void; /** - * @param string [FileName=''] - * @param ADODB.PersistFormatEnum [PersistFormat=0] + * @param FileName [FileName=''] + * @param PersistFormat [PersistFormat=0] */ _xSave(FileName?: string, PersistFormat?: PersistFormatEnum): void; AbsolutePage: PositionEnum; AbsolutePosition: PositionEnum; - readonly ActiveCommand: any; - ActiveConnection: any; - AddNew(FieldList?: any, Values?: any): void; + readonly ActiveCommand?: Command; + + /** + * Sets or returns a String value that contains a definition for a connection if the connection is closed, or a Variant containing the current Connection object if the connection is open. Default is a null object reference. + */ + ActiveConnection: string | Connection | null; + AddNew(): void; + AddNew(Fields: SafeArray, Values: SafeArray): void; + AddNew(Field: string, Value: any): void; readonly BOF: boolean; - Bookmark: any; + Bookmark: Bookmark; CacheSize: number; Cancel(): void; - /** @param ADODB.AffectEnum [AffectRecords=3] */ + /** @param AffectRecords [AffectRecords=3] */ CancelBatch(AffectRecords?: AffectEnum): void; CancelUpdate(): void; - /** @param ADODB.LockTypeEnum [LockType=-1] */ + /** @param LockType [LockType=-1] */ Clone(LockType?: LockTypeEnum): Recordset; Close(): void; Collect(Index: any): any; - CompareBookmarks(Bookmark1: any, Bookmark2: any): CompareEnum; + CompareBookmarks(Bookmark1: Bookmark, Bookmark2: Bookmark): CompareEnum; CursorLocation: CursorLocationEnum; CursorType: CursorTypeEnum; DataMember: string; DataSource: any; - /** @param ADODB.AffectEnum [AffectRecords=1] */ + /** @param AffectRecords [AffectRecords=1] */ Delete(AffectRecords?: AffectEnum): void; readonly EditMode: EditModeEnum; readonly EOF: boolean; readonly Fields: Fields; - Filter: any; /** - * @param number [SkipRecords=0] - * @param ADODB.SearchDirectionEnum [SearchDirection=1] + * Sets or returns one of the following: + * * Criteria string — a string made up of one or more individual clauses concatenated with AND or OR operators. + * * Array of bookmarks — an array of unique bookmark values that point to records in the Recordset object. + * * A FilterGroupEnum value */ - Find(Criteria: string, SkipRecords?: number, SearchDirection?: SearchDirectionEnum, Start?: any): void; - - /** @param number [Rows=-1] */ - GetRows(Rows?: number, Start?: any, Fields?: any): any; + Filter: string | SafeArray | FilterGroupEnum; /** - * @param ADODB.StringFormatEnum [StringFormat=2] - * @param number [NumRows=-1] - * @param string [ColumnDelimeter=''] - * @param string [RowDelimeter=''] - * @param string [NullExpr=''] + * @param SkipRecords [SkipRecords=0] + * @param SearchDirection [SearchDirection=1] + */ + Find(Criteria: string, SkipRecords?: number, SearchDirection?: SearchDirectionEnum, Start?: Bookmark): void; + + /** @param Rows [Rows=-1] */ + GetRows(Rows?: number, Start?: string | Bookmark | BookmarkEnum, Fields?: string | SafeArray): SafeArray; + + /** + * @param StringFormat [StringFormat=2] + * @param NumRows [NumRows=-1] + * @param ColumnDelimeter [ColumnDelimeter=''] + * @param RowDelimeter [RowDelimeter=''] + * @param NullExpr [NullExpr=''] */ GetString(StringFormat?: StringFormatEnum, NumRows?: number, ColumnDelimeter?: string, RowDelimeter?: string, NullExpr?: string): string; Index: string; LockType: LockTypeEnum; MarshalOptions: MarshalOptionsEnum; MaxRecords: number; - Move(NumRecords: number, Start?: any): void; + Move(NumRecords: number, Start?: string | Bookmark | BookmarkEnum): void; MoveFirst(): void; MoveLast(): void; MoveNext(): void; MovePrevious(): void; - NextRecordset(RecordsAffected?: any): Recordset; + + /** Since Javascript doesn't support byref parameters, the RecordsAffected parameter cannot be used */ + NextRecordset(): Recordset; /** - * @param ADODB.CursorTypeEnum [CursorType=-1] - * @param ADODB.LockTypeEnum [LockType=-1] - * @param number [Options=-1] + * @param CursorType [CursorType=-1] + * @param LockType [LockType=-1] + * @param Options [Options=-1] */ - Open(Source: any, ActiveConnection: any, CursorType?: CursorTypeEnum, LockType?: LockTypeEnum, Options?: number): void; + Open(Source: Command, ActiveConnection: null, CursorType?: CursorTypeEnum, LockType?: LockTypeEnum, Options?: CommandTypeEnum | ExecuteOptionEnum): void; + Open(Source?: Stream): void; + + /** + * @param CursorType [CursorType=-1] + * @param LockType [LockType=-1] + * @param Options [Options=-1] + */ + Open(Source: string, ActiveConnection: string | Connection, CursorType?: CursorTypeEnum, LockType?: LockTypeEnum, Options?: CommandTypeEnum | ExecuteOptionEnum): void; readonly PageCount: number; PageSize: number; readonly Properties: Properties; readonly RecordCount: number; - /** @param number [Options=-1] */ + /** @param Options [Options=-1] */ Requery(Options?: number): void; /** - * @param ADODB.AffectEnum [AffectRecords=3] - * @param ADODB.ResyncEnum [ResyncValues=2] + * @param AffectRecords [AffectRecords=3] + * @param ResyncValues [ResyncValues=2] */ Resync(AffectRecords?: AffectEnum, ResyncValues?: ResyncEnum): void; - /** @param ADODB.PersistFormatEnum [PersistFormat=0] */ - Save(Destination: any, PersistFormat?: PersistFormatEnum): void; + /** @param PersistFormat [PersistFormat=0] */ + Save(Destination: string | Stream, PersistFormat?: PersistFormatEnum): void; - /** @param ADODB.SeekEnum [SeekOption=1] */ + /** + * @param SeekOption [SeekOption=1] + * + * For a single-column index, pass in a single value to seek in the column of the index + * + * For a multi-column index, pass in a SafeArray containing the multiple values to seek in the columns of the index. + */ Seek(KeyValues: any, SeekOption?: SeekEnum): void; Sort: string; - Source: any; - readonly State: number; + Source: string | Command; + readonly State: ObjectStateEnum; readonly Status: number; StayInSync: boolean; Supports(CursorOptions: CursorOptionEnum): boolean; - Update(Fields?: string | SafeArray, Values?: any): void; + Update(): void; + Update(Fields: SafeArray, Values: SafeArray): void; + Update(Field: string, Value: any): void; - /** @param ADODB.AffectEnum [AffectRecords=3] */ + /** @param AffectRecords [AffectRecords=3] */ UpdateBatch(AffectRecords?: AffectEnum): void; + (FieldIndex: string | number): Field; } class Stream { @@ -934,7 +1021,7 @@ declare namespace ADODB { Charset: string; Close(): void; - /** @param number [CharNumber=-1] */ + /** @param CharNumber [CharNumber=-1] */ CopyTo(DestStream: Stream, CharNumber?: number): void; readonly EOS: boolean; Flush(): void; @@ -943,21 +1030,21 @@ declare namespace ADODB { Mode: ConnectModeEnum; /** - * @param ADODB.ConnectModeEnum [Mode=0] - * @param ADODB.StreamOpenOptionsEnum [Options=-1] - * @param string [UserName=''] - * @param string [Password=''] + * @param Mode [Mode=0] + * @param Options [Options=-1] + * @param UserName [UserName=''] + * @param Password [Password=''] */ - Open(Source: any, Mode?: ConnectModeEnum, Options?: StreamOpenOptionsEnum, UserName?: string, Password?: string): void; + Open(Source?: string | Record, Mode?: ConnectModeEnum, Options?: StreamOpenOptionsEnum, UserName?: string, Password?: string): void; Position: number; - /** @param number [NumBytes=-1] */ + /** @param NumBytes [NumBytes=-1] */ Read(NumBytes?: number): any; - /** @param number [NumChars=-1] */ + /** @param NumChars [NumChars=-1] */ ReadText(NumChars?: number): string; - /** @param ADODB.SaveOptionsEnum [Options=1] */ + /** @param Options [Options=1] */ SaveToFile(FileName: string, Options?: SaveOptionsEnum): void; SetEOS(): void; readonly Size: number; @@ -966,7 +1053,7 @@ declare namespace ADODB { Type: StreamTypeEnum; Write(Buffer: any): void; - /** @param ADODB.StreamWriteEnum [Options=0] */ + /** @param Options [Options=0] */ WriteText(Data: string, Options?: StreamWriteEnum): void; } @@ -1009,60 +1096,22 @@ declare namespace ADODB { } interface ActiveXObject { - on( - obj: ADODB.Connection, event: 'BeginTransComplete', argNames: ['TransactionLevel', 'pError', 'adStatus', 'pConnection'], handler: ( - this: ADODB.Connection, parameter: { - readonly TransactionLevel: number, readonly pError: ADODB.Error, adStatus: ADODB.EventStatusEnum, readonly pConnection: ADODB.Connection}) => void): void; - on( - obj: ADODB.Connection, event: 'CommitTransComplete' | 'ConnectComplete' | 'InfoMessage' | 'RollbackTransComplete', argNames: ['pError', 'adStatus', 'pConnection'], - handler: (this: ADODB.Connection, parameter: {readonly pError: ADODB.Error, adStatus: ADODB.EventStatusEnum, readonly pConnection: ADODB.Connection}) => void): void; - on( - obj: ADODB.Connection, event: 'Disconnect', argNames: ['adStatus', 'pConnection'], handler: ( - this: ADODB.Connection, parameter: {adStatus: ADODB.EventStatusEnum, readonly pConnection: ADODB.Connection}) => void): void; - on( - obj: ADODB.Connection, event: 'ExecuteComplete', argNames: ADODB.EventHelperTypes.Connection_ExecuteComplete_ArgNames, handler: ( - this: ADODB.Connection, parameter: ADODB.EventHelperTypes.Connection_ExecuteComplete_Parameter) => void): void; - on( - obj: ADODB.Connection, event: 'WillConnect', argNames: ADODB.EventHelperTypes.Connection_WillConnect_ArgNames, handler: ( - this: ADODB.Connection, parameter: ADODB.EventHelperTypes.Connection_WillConnect_Parameter) => void): void; - on( - obj: ADODB.Connection, event: 'WillExecute', argNames: ADODB.EventHelperTypes.Connection_WillExecute_ArgNames, handler: ( - this: ADODB.Connection, parameter: ADODB.EventHelperTypes.Connection_WillExecute_Parameter) => void): void; - on( - obj: ADODB.Recordset, event: 'EndOfRecordset', argNames: ['fMoreData', 'adStatus', 'pRecordset'], handler: ( - this: ADODB.Recordset, parameter: {fMoreData: boolean, adStatus: ADODB.EventStatusEnum, readonly pRecordset: ADODB.Recordset}) => void): void; - on( - obj: ADODB.Recordset, event: 'FetchComplete', argNames: ['pError', 'adStatus', 'pRecordset'], handler: ( - this: ADODB.Recordset, parameter: {readonly pError: ADODB.Error, adStatus: ADODB.EventStatusEnum, readonly pRecordset: ADODB.Recordset}) => void): void; - on( - obj: ADODB.Recordset, event: 'FetchProgress', argNames: ['Progress', 'MaxProgress', 'adStatus', 'pRecordset'], handler: ( - this: ADODB.Recordset, parameter: {readonly Progress: number, readonly MaxProgress: number, adStatus: ADODB.EventStatusEnum, readonly pRecordset: ADODB.Recordset}) => void): void; - on( - obj: ADODB.Recordset, event: 'FieldChangeComplete', argNames: ['cFields', 'Fields', 'pError', 'adStatus', 'pRecordset'], handler: ( - this: ADODB.Recordset, parameter: { - readonly cFields: number, readonly Fields: any, readonly pError: ADODB.Error, adStatus: ADODB.EventStatusEnum, readonly pRecordset: ADODB.Recordset}) => void): void; - on( - obj: ADODB.Recordset, event: 'MoveComplete' | 'RecordsetChangeComplete', argNames: ['adReason', 'pError', 'adStatus', 'pRecordset'], - handler: ( - this: ADODB.Recordset, parameter: { - readonly adReason: ADODB.EventReasonEnum, readonly pError: ADODB.Error, adStatus: ADODB.EventStatusEnum, readonly pRecordset: ADODB.Recordset}) => void): void; - on( - obj: ADODB.Recordset, event: 'RecordChangeComplete', argNames: ['adReason', 'cRecords', 'pError', 'adStatus', 'pRecordset'], handler: ( - this: ADODB.Recordset, parameter: { - readonly adReason: ADODB.EventReasonEnum, readonly cRecords: number, readonly pError: ADODB.Error, - adStatus: ADODB.EventStatusEnum, readonly pRecordset: ADODB.Recordset}) => void): void; - on( - obj: ADODB.Recordset, event: 'WillChangeField', argNames: ['cFields', 'Fields', 'adStatus', 'pRecordset'], handler: ( - this: ADODB.Recordset, parameter: {readonly cFields: number, readonly Fields: any, adStatus: ADODB.EventStatusEnum, readonly pRecordset: ADODB.Recordset}) => void): void; - on( - obj: ADODB.Recordset, event: 'WillChangeRecord', argNames: ['adReason', 'cRecords', 'adStatus', 'pRecordset'], handler: ( - this: ADODB.Recordset, parameter: { - readonly adReason: ADODB.EventReasonEnum, readonly cRecords: number, adStatus: ADODB.EventStatusEnum, readonly pRecordset: ADODB.Recordset}) => void): void; - on( - obj: ADODB.Recordset, event: 'WillChangeRecordset' | 'WillMove', argNames: ['adReason', 'adStatus', 'pRecordset'], handler: ( - this: ADODB.Recordset, parameter: {readonly adReason: ADODB.EventReasonEnum, adStatus: ADODB.EventStatusEnum, readonly pRecordset: ADODB.Recordset}) => void): void; + on(obj: ADODB.Connection, event: 'BeginTransComplete', argNames: ['TransactionLevel', 'pError', 'adStatus', 'pConnection'], handler: (this: ADODB.Connection, parameter: {readonly TransactionLevel: number, readonly pError: ADODB.Error, adStatus: ADODB.EventStatusEnum, readonly pConnection: ADODB.Connection}) => void): void; + on(obj: ADODB.Connection, event: 'CommitTransComplete' | 'ConnectComplete' | 'InfoMessage' | 'RollbackTransComplete', argNames: ['pError', 'adStatus', 'pConnection'], handler: (this: ADODB.Connection, parameter: {readonly pError: ADODB.Error, adStatus: ADODB.EventStatusEnum, readonly pConnection: ADODB.Connection}) => void): void; + on(obj: ADODB.Connection, event: 'Disconnect', argNames: ['adStatus', 'pConnection'], handler: (this: ADODB.Connection, parameter: {adStatus: ADODB.EventStatusEnum, readonly pConnection: ADODB.Connection}) => void): void; + on(obj: ADODB.Connection, event: 'ExecuteComplete', argNames: ADODB.EventHelperTypes.Connection_ExecuteComplete_ArgNames, handler: (this: ADODB.Connection, parameter: ADODB.EventHelperTypes.Connection_ExecuteComplete_Parameter) => void): void; + on(obj: ADODB.Connection, event: 'WillConnect', argNames: ADODB.EventHelperTypes.Connection_WillConnect_ArgNames, handler: (this: ADODB.Connection, parameter: ADODB.EventHelperTypes.Connection_WillConnect_Parameter) => void): void; + on(obj: ADODB.Connection, event: 'WillExecute', argNames: ADODB.EventHelperTypes.Connection_WillExecute_ArgNames, handler: (this: ADODB.Connection, parameter: ADODB.EventHelperTypes.Connection_WillExecute_Parameter) => void): void; + on(obj: ADODB.Recordset, event: 'EndOfRecordset', argNames: ['fMoreData', 'adStatus', 'pRecordset'], handler: (this: ADODB.Recordset, parameter: {fMoreData: boolean, adStatus: ADODB.EventStatusEnum, readonly pRecordset: ADODB.Recordset}) => void): void; + on(obj: ADODB.Recordset, event: 'FetchComplete', argNames: ['pError', 'adStatus', 'pRecordset'], handler: (this: ADODB.Recordset, parameter: {readonly pError: ADODB.Error, adStatus: ADODB.EventStatusEnum, readonly pRecordset: ADODB.Recordset}) => void): void; + on(obj: ADODB.Recordset, event: 'FetchProgress', argNames: ['Progress', 'MaxProgress', 'adStatus', 'pRecordset'], handler: (this: ADODB.Recordset, parameter: {readonly Progress: number, readonly MaxProgress: number, adStatus: ADODB.EventStatusEnum, readonly pRecordset: ADODB.Recordset}) => void): void; + on(obj: ADODB.Recordset, event: 'FieldChangeComplete', argNames: ['cFields', 'Fields', 'pError', 'adStatus', 'pRecordset'], handler: (this: ADODB.Recordset, parameter: {readonly cFields: number, readonly Fields: any, readonly pError: ADODB.Error, adStatus: ADODB.EventStatusEnum, readonly pRecordset: ADODB.Recordset}) => void): void; + on(obj: ADODB.Recordset, event: 'MoveComplete' | 'RecordsetChangeComplete', argNames: ['adReason', 'pError', 'adStatus', 'pRecordset'], handler: (this: ADODB.Recordset, parameter: {readonly adReason: ADODB.EventReasonEnum, readonly pError: ADODB.Error, adStatus: ADODB.EventStatusEnum, readonly pRecordset: ADODB.Recordset}) => void): void; + on(obj: ADODB.Recordset, event: 'RecordChangeComplete', argNames: ['adReason', 'cRecords', 'pError', 'adStatus', 'pRecordset'], handler: (this: ADODB.Recordset, parameter: {readonly adReason: ADODB.EventReasonEnum, readonly cRecords: number, readonly pError: ADODB.Error, adStatus: ADODB.EventStatusEnum, readonly pRecordset: ADODB.Recordset}) => void): void; + on(obj: ADODB.Recordset, event: 'WillChangeField', argNames: ['cFields', 'Fields', 'adStatus', 'pRecordset'], handler: (this: ADODB.Recordset, parameter: {readonly cFields: number, readonly Fields: any, adStatus: ADODB.EventStatusEnum, readonly pRecordset: ADODB.Recordset}) => void): void; + on(obj: ADODB.Recordset, event: 'WillChangeRecord', argNames: ['adReason', 'cRecords', 'adStatus', 'pRecordset'], handler: (this: ADODB.Recordset, parameter: {readonly adReason: ADODB.EventReasonEnum, readonly cRecords: number, adStatus: ADODB.EventStatusEnum, readonly pRecordset: ADODB.Recordset}) => void): void; + on(obj: ADODB.Recordset, event: 'WillChangeRecordset' | 'WillMove', argNames: ['adReason', 'adStatus', 'pRecordset'], handler: (this: ADODB.Recordset, parameter: {readonly adReason: ADODB.EventReasonEnum, adStatus: ADODB.EventStatusEnum, readonly pRecordset: ADODB.Recordset}) => void): void; set(obj: ADODB.Recordset, propertyName: 'Collect', parameterTypes: [any], newValue: any): void; - new(progid: K): ActiveXObjectNameMap[K]; } interface ActiveXObjectNameMap { @@ -1073,14 +1122,3 @@ interface ActiveXObjectNameMap { 'ADODB.Recordset': ADODB.Recordset; 'ADODB.Stream': ADODB.Stream; } - -interface EnumeratorConstructor { - new(col: ADODB.Errors): Enumerator; - new(col: ADODB.Fields): Enumerator; - new(col: ADODB.Parameters): Enumerator; - new(col: ADODB.Properties): Enumerator; -} - -interface SafeArray { - _brand: SafeArray; -} diff --git a/types/activex-adodb/tsconfig.json b/types/activex-adodb/tsconfig.json index 5cb32f94c9..abf5b79a00 100644 --- a/types/activex-adodb/tsconfig.json +++ b/types/activex-adodb/tsconfig.json @@ -2,8 +2,7 @@ "compilerOptions": { "module": "commonjs", "lib": [ - "es5", - "scripthost" + "es5" ], "noImplicitAny": true, "noImplicitThis": true, diff --git a/types/activex-adodb/tslint.json b/types/activex-adodb/tslint.json index 3224b40b8b..7b89accc6d 100644 --- a/types/activex-adodb/tslint.json +++ b/types/activex-adodb/tslint.json @@ -1,6 +1,7 @@ { "extends": "dtslint/dt.json", "rules": { - "no-const-enum": false + "no-const-enum": false, + "max-line-length": false } } diff --git a/types/activex-adox/activex-adox-tests.ts b/types/activex-adox/activex-adox-tests.ts new file mode 100644 index 0000000000..df5c75ef12 --- /dev/null +++ b/types/activex-adox/activex-adox-tests.ts @@ -0,0 +1,1206 @@ +/// + +const collectionToArray = (col: { Item(key: any): T }): T[] => { + const results: T[] = []; + const enumerator = new Enumerator(col); + enumerator.moveFirst(); + while (!enumerator.atEnd()) { + results.push(enumerator.item()); + enumerator.moveNext(); + } + return results; +}; + +const toConnectionString = (o: { [index: string]: any }) => { + o.Provider = o.Provider || 'sqloledb'; + o['Data Source'] = o['Data Source'] || 'Server'; + o['Integrated Security'] = o['Integrated Security'] || 'SSPI'; + + const parts: string[] = []; + for (const key in o) { + let val = o[key]; + if (typeof val === 'string') { val = `'${val}'`; } + parts.push(`${key}=${val}`); + } + return parts.join(';'); +}; + +const connectionString = toConnectionString({ + Provider: 'Microsoft.Jet.OLEDB.4.0', + 'Data Source': 'c:\\Program Files\\Microsoft Office\\Office\\Samples\\Northwind.mdb' +}); +const connectionStringWithSys = toConnectionString({ + Provider: 'Microsoft.Jet.OLEDB.4.0', + 'Data Source': 'c:\\Program Files\\Microsoft Office\\Office\\Samples\\Northwind.mdb', + 'jet oledb:system database': 'c:\\Program Files\\Microsoft Office\\Office\\system.mdw' +}); + +const adPermObjTable = ADOX.ObjectTypeEnum.adPermObjTable; +const adRightFull = ADOX.RightsEnum.adRightFull; + +const adInteger = ADODB.DataTypeEnum.adInteger; +const adVarWChar = ADODB.DataTypeEnum.adVarWChar; +const adVarChar = ADODB.DataTypeEnum.adVarChar; + +const adOpenKeyset = ADODB.CursorTypeEnum.adOpenKeyset; +const adLockOptimistic = ADODB.LockTypeEnum.adLockOptimistic; + +const tryClose = (obj: { State: ADODB.ObjectStateEnum, Close(): void } | null) => { + // TODO State could also be a combination of multiple values in this enum + if (obj && obj.State === ADODB.ObjectStateEnum.adStateOpen) { + obj.Close(); + } + return null; +}; + +// https://docs.microsoft.com/en-us/sql/ado/reference/adox-api/columns-and-tables-append-methods-name-property-example-vb +{ + let cat: ADOX.Catalog | null = null; + let tbl: ADOX.Table | null = null; + try { + cat = new ActiveXObject('ADOX.Catalog'); + cat.ActiveConnection = connectionString; + + tbl = new ActiveXObject('ADOX.Table'); + tbl.Name = 'MyTable'; + tbl.Columns.Append('Column1', adInteger); + tbl.Columns.Append('Column2', adInteger); + tbl.Columns.Append('Column3', adVarChar, 50); + cat.Tables.Append(tbl); + WScript.Echo('Table "MyTables" is added.'); + + cat.Tables.Delete(tbl.Name); + WScript.Echo('Table "MyTable" is deleted'); + + cat.ActiveConnection = null; + } catch (error) { + WScript.Echo(error); + } finally { + if (cat) { + cat.ActiveConnection = null; + } + cat = null; + tbl = null; + } +} + +// https://docs.microsoft.com/en-us/sql/ado/reference/adox-api/connection-close-method-table-type-property-example-vb +{ + let conn: ADODB.Connection | null = null; + let cat: ADOX.Catalog | null = null; + try { + conn = new ActiveXObject('ADODB.Connection'); + conn.Open(connectionString); + cat = new ActiveXObject('ADOX.Catalog'); + cat.ActiveConnection = conn; + const tbl = cat.Tables(0); + WScript.Echo(tbl.Type); // Cache tbl.Type info + cat.ActiveConnection = null; // tbl is orphaned + + // The following two lines will succeed only if the information was cached + WScript.Echo(tbl.Type); + WScript.Echo(tbl.Columns(0).DefinedSize); + } catch (error) { + WScript.Echo(error); + } finally { + // Clean up + if (cat) { cat.ActiveConnection = null; } + cat = null; + conn = tryClose(conn); + } +} + +// https://docs.microsoft.com/en-us/sql/ado/reference/adox-api/create-method-example-vb +{ + let cat: ADOX.Catalog | null = null; + try { + cat = new ActiveXObject('ADOX.Catalog'); + cat.Create("Provider='Microsoft.Jet.OLEDB.4.0';Data Source='new.mdb'"); + } catch (error) { + WScript.Echo(error); + } finally { + cat = null; + } +} + +// https://docs.microsoft.com/en-us/sql/ado/reference/adox-api/getobjectowner-and-setobjectowner-methods-example-vb +{ + const cat = new ActiveXObject('ADOX.Catalog'); + cat.ActiveConnection = connectionStringWithSys; + + // Print the original owner of Categories + const strOwner = cat.GetObjectOwner('Categories', adPermObjTable); + WScript.Echo(`Ower of Categories: ${strOwner}`); + + // Set the owner of Categories to Accounting + cat.SetObjectOwner('Categories', adPermObjTable, 'Accounting'); + + for (const tblLoop of collectionToArray(cat.Tables)) { + WScript.Echo(` +Table: ${tblLoop.Name} +Owner: ${cat.GetObjectOwner(tblLoop.Name, adPermObjTable)} + `.trim()); + } + + // Restore the original owner of Categories + cat.SetObjectOwner('Categories', adPermObjTable, strOwner); +} + +// https://docs.microsoft.com/en-us/sql/ado/reference/adox-api/getpermissions-and-setpermissions-methods-example-vb +{ + let cnn: ADODB.Connection | null = null; + let cat: ADOX.Catalog | null = null; + try { + cnn = new ActiveXObject('ADODB.Connection'); + cnn.Provider = 'Microsoft.Jet.OLEDB.4.0'; + cnn.Open("Data Source='Northwind.mdb';jet oledb:system database='system.mdw'"); + + cat = new ActiveXObject('ADOX.Catalog'); + cat.ActiveConnection = cnn; + + const displayPermissions = (title: string) => + WScript.Echo(`${title}: ${cat!.Users('admin').GetPermissions('Orders', adPermObjTable)}`); + + // Retrieve original permissions + const perm = cat.Users('admin').GetPermissions('Orders', adPermObjTable); + WScript.Echo(`Permissions: ${perm}`); + + // Revoke all permissions + cat.Users('admin').SetPermissions('Orders', adPermObjTable, ADOX.ActionEnum.adAccessRevoke, adRightFull); + displayPermissions('Revoked permissions'); + + // Give the Admin user full rights on the orders object + cat.Users('admin').SetPermissions('Orders', adPermObjTable, ADOX.ActionEnum.adAccessSet, adRightFull); + displayPermissions('Full permissions'); + + // Restore original permissions + cat.Users('admin').SetPermissions('Orders', adPermObjTable, ADOX.ActionEnum.adAccessSet, perm); + displayPermissions('Final permissions'); + } catch (error) { + WScript.Echo(error); + } finally { + cat = null; + cnn = tryClose(cnn); + } +} + +// https://docs.microsoft.com/en-us/sql/ado/reference/adox-api/groups-and-users-append-changepassword-methods-example-vb +{ + let cat: ADOX.Catalog | null = null; + let usrNew: ADOX.User | null = null; + let usrLoop: ADOX.User | null; + let grpLoop: ADOX.Group | null; + let user: ADOX.User | null; + let group: ADOX.Group | null; + try { + cat = new ActiveXObject('ADOX.Catalog'); + cat.ActiveConnection = connectionStringWithSys; + + // Create and append a new group with a string + cat.Groups.Append('Accounting'); + + // Create and append a new user with an object + usrNew = new ActiveXObject('ADOX.User'); + usrNew.Name = 'Pat Smith'; + usrNew.ChangePassword('', 'Password1'); + cat.Users.Append(usrNew); + + // Make the user Pat Smith a member of the + // Accounting group by creating and adding the + // appropriate Group object to the user's Groups + // collection. The same is accomplished if a User + // object representing Pat Smith is created and + // appended to the Accounting group Users collection + usrNew.Groups.Append('Accounting'); + + // Enumerate all User objects in the catalog's Users collection. + for (usrLoop of collectionToArray(cat.Users)) { + WScript.Echo(`${usrLoop.Name} belongs to the following groups:`); + + // Enumerate all Group objects in each User object's Groups collection + const groups = collectionToArray(usrLoop.Groups); + if (groups.length !== 0) { + for (group of groups) { + WScript.Echo(`\t\t${group.Name}`); + } + } else { + WScript.Echo('\t[None]'); + } + } + + // Enumerate all Group objects in the default workspace's Groups collection + for (grpLoop of collectionToArray(cat.Groups)) { + WScript.Echo(`${grpLoop.Name} has as its members:`); + + // Enumerate all User objects in each Group object's User collection + const users = collectionToArray(grpLoop.Users); + if (users.length !== 0) { + for (user of users) { + WScript.Echo(`\t\t${user.Name}`); + } + } else { + WScript.Echo('\t[None]'); + } + } + + // Delete new User and Group objects because this is only a demonstration + cat.Users.Delete('Pat Smith'); + cat.Groups.Delete('Accounting'); + } catch (error) { + WScript.Echo(error); + } finally { + if (cat) { cat.ActiveConnection = null; } + cat = null; + usrNew = null; + usrLoop = null; + grpLoop = null; + user = null; + group = null; + } +} + +// https://docs.microsoft.com/en-us/sql/ado/reference/adox-api/indexes-append-method-example-vb +{ + let cat: ADOX.Catalog | null = null; + let tbl: ADOX.Table | null = null; + let idx: ADOX.Index | null = null; + try { + // Open the catalog + cat = new ActiveXObject('ADOX.Catalog'); + cat.ActiveConnection = connectionString; + + // Define the table and append it to the catalog + tbl = new ActiveXObject('ADOX.Table'); + tbl.Name = 'MyTable'; + tbl.Columns.Append('Column1', adInteger); + tbl.Columns.Append('Column2', adInteger); + tbl.Columns.Append('Column3', adVarChar, 50); + cat.Tables.Append(tbl); + WScript.Echo('Table "MyTables" is added.'); + + // Define a multi-column index + idx = new ActiveXObject('ADOX.Index'); + idx.Name = 'multicolidx'; + idx.Columns.Append('Column1'); + idx.Columns.Append('Column2'); + + // Append the index to the table + tbl.Indexes.Append(idx); + WScript.Echo('The index is appended to table "MyTable".'); + + // Delete the table as this is a demonstration + cat.Tables.Delete(tbl.Name); + WScript.Echo('Table "MyTable" is deleeted.'); + } catch (error) { + WScript.Echo(error); + } finally { + if (cat) { cat.ActiveConnection = null; } + cat = null; + tbl = null; + idx = null; + } +} + +// https://docs.microsoft.com/en-us/sql/ado/reference/adox-api/keys-append-method-key-type-relatedcolumn-relatedtable-example-vb +{ + let cat: ADOX.Catalog | null = null; + let kyForeign: ADOX.Key | null = null; + try { + // Connect to the catalog + cat = new ActiveXObject('ADOX.Catalog'); + cat.ActiveConnection = connectionString; + + // Define the foreign key + kyForeign = new ActiveXObject('ADOX.Key'); + kyForeign.Name = 'CustOrder'; + kyForeign.Type = ADOX.KeyTypeEnum.adKeyForeign; + kyForeign.RelatedTable = 'Customers'; + kyForeign.Columns.Append('CustomerId'); + kyForeign.Columns('CustomerId').RelatedColumn = 'CustomerID'; + kyForeign.UpdateRule = ADOX.RuleEnum.adRICascade; + + // Append the foreign key to the keys collection + cat.Tables('Orders').Keys.Append(kyForeign); + + // Delete the key to demonstrate the Detele method + cat.Tables('Orders').Keys.Delete(kyForeign.Name); + } catch (error) { + WScript.Echo(error); + } finally { + if (cat) { cat.ActiveConnection = null; } + cat = null; + kyForeign = null; + } +} + +// https://docs.microsoft.com/en-us/sql/ado/reference/adox-api/procedures-append-method-example-vb +{ + let cnn: ADODB.Connection | null = null; + let cmd: ADODB.Command | null = null; + let cat: ADOX.Catalog | null = null; + try { + // Open the Connection + cnn = new ActiveXObject('ADODB.Connection'); + cnn.Open(connectionString); + + // Create the parameterized command (Microsoft Jet specific) + cmd = new ActiveXObject('ADODB.Command'); + cmd.ActiveConnection = cnn; + cmd.CommandText = ` + PARAMETERS [CustId] TEXT; + SELECT * FROM Customers WHERE CustomerId = [CustId] + `; + + // Open the Catalog + cat = new ActiveXObject('ADOX.Catalog'); + cat.ActiveConnection = cnn; + + // Create the new Procedure + cat.Procedures.Append('CustomerById', cmd); + } catch (error) { + WScript.Echo(error); + } finally { + cat = null; + cmd = null; + cnn = tryClose(cnn); + } +} + +// https://docs.microsoft.com/en-us/sql/ado/reference/adox-api/procedures-delete-method-example-vb +{ + let cat: ADOX.Catalog | null = null; + try { + // Open the catalog + cat = new ActiveXObject('ADOX.Catalog'); + cat.ActiveConnection = connectionString; + + // Delete the procedure + cat.Procedures.Delete('CustomerById'); + } catch (error) { + WScript.Echo(error); + } finally { + if (cat) { cat.ActiveConnection = null; } + cat = null; + } +} + +// https://docs.microsoft.com/en-us/sql/ado/reference/adox-api/procedures-refresh-method-example-vb +{ + let cat: ADOX.Catalog | null = null; + try { + // Open the catalog + cat = new ActiveXObject('ADOX.Catalog'); + cat.ActiveConnection = connectionString; + + // Refresh the Procedures collection + cat.Procedures.Refresh(); + } catch (error) { + WScript.Echo(error); + } finally { + if (cat) { cat.ActiveConnection = null; } + cat = null; + } +} + +// https://docs.microsoft.com/en-us/sql/ado/reference/adox-api/views-append-method-example-vb +{ + let cat: ADOX.Catalog | null = null; + let cmd: ADODB.Command | null = null; + try { + // Open the catalog + cat = new ActiveXObject('ADOX.Catalog'); + cat.ActiveConnection = connectionString; + + // Create the command representing the view. + cmd = new ActiveXObject('ADODB.Command'); + cmd.CommandText = 'SELECT * FROM Customers'; + + // Create the new View + cat.Views.Append('All Customers', cmd); + } catch (error) { + WScript.Echo(error); + } finally { + if (cat) { cat.ActiveConnection = null; } + cat = null; + cmd = null; + } +} + +// https://docs.microsoft.com/en-us/sql/ado/reference/adox-api/views-delete-method-example-vb +{ + let cat: ADOX.Catalog | null = null; + try { + // Open the catalog + cat = new ActiveXObject('ADOX.Catalog'); + cat.ActiveConnection = connectionString; + + // Delete the View + cat.Views.Delete('All Customers'); + } catch (error) { + WScript.Echo(error); + } finally { + if (cat) { cat.ActiveConnection = null; } + cat = null; + } +} + +// https://docs.microsoft.com/en-us/sql/ado/reference/adox-api/views-refresh-method-example-vb +{ + let cat: ADOX.Catalog | null = null; + try { + // Open the catalog + cat = new ActiveXObject('ADOX.Catalog'); + cat.ActiveConnection = connectionString; + + // Refresh the Views collection + cat.Views.Refresh(); + } catch (error) { + WScript.Echo(error); + } finally { + cat = null; + } +} + +// https://docs.microsoft.com/en-us/sql/ado/reference/adox-api/attributes-property-example-vb +{ + let cnn: ADODB.Connection | null = null; + let cat: ADOX.Catalog | null = null; + let tblEmp: ADOX.Table | null = null; + let colTemp: ADOX.Column | null = null; + let rstEmployees: ADODB.Recordset | null = null; + try { + // Connect the catalog + cnn = new ActiveXObject('ADODB.Connection'); + cnn.Open(connectionString); + cat = new ActiveXObject('ADOX.Catalog'); + cat.ActiveConnection = cnn; + + tblEmp = cat.Tables('Employees'); + + // Create a new Field object and append it to the Field collection of the Employees table + colTemp = new ActiveXObject('ADOX.Column'); + colTemp.Name = 'FaxPhone'; + colTemp.Type = adVarWChar; + colTemp.DefinedSize = 24; + colTemp.Attributes = ADOX.ColumnAttributesEnum.adColNullable; + tblEmp.Columns.Append(colTemp.Name, ADODB.DataTypeEnum.adWChar, 24); + + // Open the Employees table for updating as a Recordset + rstEmployees = new ActiveXObject('ADODB.Recordset'); + rstEmployees.Open('Employees', cnn, adOpenKeyset, adLockOptimistic, ADODB.CommandTypeEnum.adCmdTable); + + // Get user input + WScript.Echo(` +Enter fax number for ${rstEmployees('FirstName')} ${rstEmployees('LastName')}. +[? - unknown, X - has no fax] + `.trim()); + const strInput = WScript.StdIn.ReadLine().toUpperCase().trim(); + if (strInput) { + let newValue: string | null; + if (strInput === '?') { + newValue = null; + } else if (strInput === 'X') { + newValue = ''; + } else { + newValue = strInput; + } + rstEmployees('FaxPhone').Value = newValue; + rstEmployees.Update(); + + // Print report + const faxValue = rstEmployees('FaxPhone').Value; + let faxDisplayString: string; + if (faxValue === null) { + faxDisplayString = '[Unkown]'; + } else if (faxValue === '') { + faxDisplayString = '[Has no fax]'; + } else { + faxDisplayString = faxValue; + } + WScript.Echo(` +Name\t\tFax number +${rstEmployees('FirstName')} ${rstEmployees('LastName')}\t\t${faxDisplayString} + `.trim()); + } + } catch (error) { + WScript.Echo(error); + } finally { + rstEmployees = tryClose(rstEmployees); + if (tblEmp) { + tblEmp.Columns.Delete(colTemp!.Name); + } + cnn = tryClose(cnn); + cat = null; + colTemp = null; + } +} + +// https://docs.microsoft.com/en-us/sql/ado/reference/adox-api/catalog-activeconnection-property-example-vb +{ + let cnn: ADODB.Connection | null = null; + let cat: ADOX.Catalog | null = null; + try { + cnn = new ActiveXObject('ADODB.Connection'); + cnn.Open(connectionString); + cat = new ActiveXObject('ADOX.Catalog'); + cat.ActiveConnection = cnn; + WScript.Echo(cat.Tables(0).Type); + } catch (error) { + WScript.Echo(error); + } finally { + cat = null; + cnn = tryClose(cnn); + } +} + +// https://docs.microsoft.com/en-us/sql/ado/reference/adox-api/clustered-property-example-vb +{ + let cnn: ADODB.Connection | null = null; + let cat: ADOX.Catalog | null = null; + let tblLoop: ADOX.Table | null; + let idxLoop: ADOX.Index | null; + try { + // Connect to the catalog + cnn = new ActiveXObject('ADODB.Connection'); + cnn.Open(connectionString); + cat = new ActiveXObject('ADOX.Catalog'); + cat.ActiveConnection = cnn; + + // Enumerate the tables + for (tblLoop of collectionToArray(cat.Tables)) { + // Enumerate the indexes + for (idxLoop of collectionToArray(tblLoop.Indexes)) { + WScript.Echo(`${tblLoop.Name} ${idxLoop.Name} ${idxLoop.Clustered}`); + } + } + } catch (error) { + WScript.Echo(error); + } finally { + cat = null; + cnn = tryClose(cnn); + tblLoop = null; + idxLoop = null; + } +} + +// https://docs.microsoft.com/en-us/sql/ado/reference/adox-api/command-and-commandtext-properties-example-vb +{ + let cnn: ADODB.Connection | null = null; + let cat: ADOX.Catalog | null = null; + let cmd: ADODB.Command | null = null; + try { + // Open the connection + cnn = new ActiveXObject('ADODB.Connection'); + cnn.Open(connectionString); + + // Open the catalog + cat = new ActiveXObject('ADOX.Catalog'); + cat.ActiveConnection = cnn; + + // Get the command + cmd = new ActiveXObject('ADODB.Command'); + cmd = cat.Procedures('CustomerById').Command; + + // Update the CommandText + cmd.CommandText = ` + SELECT CustomerID, CompanyName ContactName + FROM Customers + WHERE CustomerId = [CustId] + `.trim(); + + // Update the procedure + cat.Procedures('CustomerById').Command = cmd; + } catch (error) { + WScript.Echo(error); + } finally { + cnn = tryClose(cnn); + cat = null; + cmd = null; + } +} + +// https://docs.microsoft.com/en-us/sql/ado/reference/adox-api/parameters-collection-command-property-example-vb +{ + let cnn: ADODB.Connection | null = null; + let cat: ADOX.Catalog | null = null; + let cmd: ADODB.Command | null = null; + let prm: ADODB.Parameter | null; + try { + // Open the connection + cnn = new ActiveXObject('ADODB.Connection'); + cnn.Open(connectionString); + + // Open the catalog + cat = new ActiveXObject('ADOX.Catalog'); + cat.ActiveConnection = cnn; + + // Get the command + cmd = cat.Procedures('CustomerById').Command; + + // Retreive Parameter information + cmd.Parameters.Refresh(); + for (prm of collectionToArray(cmd.Parameters)) { + WScript.Echo(`${prm.Name}: ${prm.Type}`); + } + } catch (error) { + WScript.Echo(error); + } finally { + cat = null; + cmd = null; + cnn = tryClose(cnn); + prm = null; + } +} + +// https://docs.microsoft.com/en-us/sql/ado/reference/adox-api/views-collection-commandtext-property-example-vb +{ + let cnn: ADODB.Connection | null = null; + let cat: ADOX.Catalog | null = null; + let cmd: ADODB.Command | null = null; + try { + // Open the connection + cnn = new ActiveXObject('ADODB.Connection'); + cnn.Open(connectionString); + + // Open the catalog + cat = new ActiveXObject('ADOX.Catalog'); + cat.ActiveConnection = cnn; + + // Get the command + cmd = cat.Views('AllCustomers').Command; + + // Update the CommandText of the command + cmd.CommandText = 'SELECT CustomerId, CompanyName, ContactName FROM Customers'; + + // Update the view + cat.Views('AllCustomers').Command = cmd; + } catch (error) { + WScript.Echo(error); + } finally { + cat = null; + cmd = null; + cnn = tryClose(cnn); + } +} + +// https://docs.microsoft.com/en-us/sql/ado/reference/adox-api/datecreated-and-datemodified-properties-example-vb +{ + const dateOutput = (caption: string, tbl: ADOX.Table) => { + // Print DateCreated and DateModified information about specified Table object + WScript.Echo(caption); + WScript.Echo(`\tTable: ${tbl.Name}`); + WScript.Echo(`\t\t${new Date(tbl.DateCreated).toString()}`); + WScript.Echo(`\t\t${new Date(tbl.DateModified).toString()}`); + WScript.Echo(''); + }; + + let cat: ADOX.Catalog | null = null; + try { + // Connect to the catalog. + cat = new ActiveXObject('ADOX.Catalog'); + cat.ActiveConnection = connectionString; + const tblEmployees = cat.Tables('Employees'); + + // Print current information about the Employees table + dateOutput('Current properties', tblEmployees); + + // Create and append column to the Employees table. + tblEmployees.Columns.Append('NewColumn', adInteger); + cat.Tables.Refresh(); + + // Print new information about the Employees table. + dateOutput('After creating a new column', tblEmployees); + + // Delete new column because this is a demonstration + tblEmployees.Columns.Delete('NewColumn'); + + // Create and append new Table object to the Northwind database + const tblNewTable = new ActiveXObject('ADOX.Table'); + tblNewTable.Name = 'NewTable'; + tblNewTable.Columns.Append('NewColumn', adInteger); + cat.Tables.Append(tblNewTable); + cat.Tables.Refresh(); + + // Print information about the new Table object + dateOutput('After creating a new table', cat.Tables('NewTable')); + + // Delete new Table object because this is a demonstration + cat.Tables.Delete(tblNewTable.Name); + } catch (error) { + WScript.Echo(error); + } finally { + if (cat) { cat.ActiveConnection = null; } + cat = null; + } +} + +// https://docs.microsoft.com/en-us/sql/ado/reference/adox-api/definedsize-property-example-vb +{ + let rstEmployees: ADODB.Recordset | null = null; + let catNorthwind: ADOX.Catalog | null; + let colFirstname: ADOX.Column | null; + let colNewFirstName: ADOX.Column | null; + try { + // Open a Recordset for the Employees table. + rstEmployees = new ActiveXObject('ADODB.Recordset'); + rstEmployees.Open('Employees', connectionString, adOpenKeyset, undefined, ADODB.CommandTypeEnum.adCmdTable); + + // Open a Catalog for the Northwind database, using same connection as rstEmployees + catNorthwind = new ActiveXObject('ADOX.Catalog'); + catNorthwind.ActiveConnection = rstEmployees.ActiveConnection; + + // Loop through the recordset displaying the contents of the FirstName field, the field's defined size, + // and its actual size. Also store FirstName values in aryFirstName array. + rstEmployees.MoveFirst(); + WScript.Echo(''); + WScript.Echo('Original Defined Size and Actual Size'); + const firstnames: string[] = []; + for (let i = 0; !rstEmployees.EOF; i++) { + const firstField = rstEmployees('FirstName'); + const [firstname, lastname] = [firstField.Value as string, rstEmployees('LastName').Value as string]; + WScript.Echo(`Employee name: ${firstname} ${lastname}`); + WScript.Echo(`\tFirstName Defined size: ${firstField.DefinedSize}`); + WScript.Echo(`\tFirstName Actual size: ${firstField.ActualSize}`); + firstnames[i] = firstname; // we don't check for null, because null is better than undefined when putting the first names back + rstEmployees.MoveNext(); + } + rstEmployees.Close(); + + // Redefine the DefinedSize of FirstName in the catalog + colFirstname = catNorthwind.Tables('Employees').Columns('FirstName'); + colNewFirstName = new ActiveXObject('ADOX.Column'); + colNewFirstName.Name = colFirstname.Name; + colNewFirstName.Type = colFirstname.Type; + colNewFirstName.DefinedSize = colFirstname.DefinedSize + 1; + + // Append new FirstName column to catalog + catNorthwind.Tables('Employees').Columns.Delete(colFirstname.Name); + catNorthwind.Tables('Employees').Columns.Append(colNewFirstName); + + // Open Employee table in Recordset for updating + rstEmployees.Open('Employees', catNorthwind.ActiveConnection!, adOpenKeyset, adLockOptimistic, ADODB.CommandTypeEnum.adCmdTable); + + // Loop through the recordset displaying the contents of the FirstName field, the field's defined size, + // and its actual size. Also restore FirstName values from aryFirstName. + rstEmployees.MoveFirst(); + WScript.Echo(''); + WScript.Echo('Original Defined Size and Actual Size'); + for (let i = 0; !rstEmployees.EOF; i++) { + const firstField = rstEmployees('FirstName'); + firstField.Value = firstnames[i]; + WScript.Echo(`Employee name: ${firstField.Value} ${rstEmployees('LastName').Value}`); + WScript.Echo(`\tFirstName Defined size: ${firstField.DefinedSize}`); + WScript.Echo(`\tFirstName Actual size: ${firstField.ActualSize}`); + rstEmployees.MoveNext(); + } + rstEmployees.Close(); + + // Restore original FirstName column to catalog + catNorthwind.Tables('Employees').Columns.Delete(colNewFirstName.Name); + catNorthwind.Tables('Employees').Columns.Append(colFirstname); + + // Restore original FirstName values to Employees table + rstEmployees.Open('Employees', catNorthwind.ActiveConnection!, adOpenKeyset, adLockOptimistic, ADODB.CommandTypeEnum.adCmdTable); + rstEmployees.MoveFirst(); + for (let i = 0; !rstEmployees.EOF; i++) { + rstEmployees('FirstName').Value = firstnames[i]; + rstEmployees.MoveNext(); + } + rstEmployees.Close(); + } catch (error) { + WScript.Echo(error); + } finally { + catNorthwind = null; + colNewFirstName = null; + colFirstname = null; + rstEmployees = tryClose(rstEmployees); + } +} + +// https://docs.microsoft.com/en-us/sql/ado/reference/adox-api/deleterule-property-example-vb +{ + let cat: ADOX.Catalog | null = null; + let tblNew: ADOX.Table | null; + let kyPrimary: ADOX.Key | null; + try { + // Connect the catalog + cat = new ActiveXObject('ADOX.Catalog'); + cat.ActiveConnection = connectionString; + + // Name new table + tblNew = new ActiveXObject('ADOX.Table'); + tblNew.Name = 'NewTable'; + + // Append a numeric and a text field to new table. + tblNew.Columns.Append('NumField', adInteger, 20); + tblNew.Columns.Append('TextField', adVarChar, 20); + + // Append the new table + cat.Tables.Append(tblNew); + + // Define the Primary key + kyPrimary = new ActiveXObject('ADOX.Key'); + kyPrimary.Name = 'NumField'; + kyPrimary.Type = ADOX.KeyTypeEnum.adKeyPrimary; + kyPrimary.RelatedTable = 'Customers'; + kyPrimary.Columns.Append('NumField'); + kyPrimary.Columns('NumField').RelatedColumn = 'CustomerId'; + kyPrimary.DeleteRule = ADOX.RuleEnum.adRICascade; + + // Append the primary key + cat.Tables('NewTable').Keys.Append(kyPrimary); + WScript.Echo('The primary key is appended.'); + + // Delete the table as this is a demonstration. + cat.Tables.Delete(tblNew.Name); + WScript.Echo('The primary key is deleted.'); + } catch (error) { + WScript.Echo(error); + } finally { + if (cat) { cat.ActiveConnection = null; } + cat = null; + kyPrimary = null; + tblNew = null; + } +} + +// https://docs.microsoft.com/en-us/sql/ado/reference/adox-api/indexnulls-property-example-vb +{ + // Connect the catalog. + const cnn = new ActiveXObject('ADODB.Connection'); + cnn.Open(connectionString); + + let catNorthwind: ADOX.Catalog | null = new ActiveXObject('ADOX.Catalog'); + catNorthwind.ActiveConnection = cnn; + + // Append Country column to new index + const idxNew = new ActiveXObject('ADOX.Index'); + idxNew.Columns.Append('Country'); + idxNew.Name = 'NewIndex'; + + // Set IndexNulls based on user selection + WScript.Echo('Allow nulls Y/N (Y to allow, N to ignore)?'); + const input = WScript.StdIn.ReadLine().toUpperCase(); + switch (input) { + case 'Y': + idxNew.IndexNulls = ADOX.AllowNullsEnum.adIndexNullsAllow; + break; + case 'N': + idxNew.IndexNulls = ADOX.AllowNullsEnum.adIndexNullsIgnore; + break; + } + + // Append new index to Employees table + catNorthwind.Tables('Employees').Indexes.Append(idxNew); + + const rstEmployees = new ActiveXObject('ADODB.Recordset'); + rstEmployees.Index = idxNew.Name; + rstEmployees.Open('Employees', cnn, adOpenKeyset, adLockOptimistic, ADODB.CommandTypeEnum.adCmdTableDirect); + + // Add a new record to the Employees table. + rstEmployees.AddNew(); + rstEmployees('FirstName').Value = 'Gary'; + rstEmployees('LastName').Value = 'Haarsager'; + rstEmployees.Update(); + + // Bookmark the newly added record + const bookmark = rstEmployees.Bookmark; + + // Use the new index to set the order of the records. + rstEmployees.MoveFirst(); + + WScript.Echo(`Index = ${rstEmployees.Index}, IndexNulls = ${idxNew.IndexNulls}`); + WScript.Echo('\tCountry - Name'); + + // Enumerate the Recordset. The value of the IndexNulls property will determine if the newly added record appears in the output. + while (!rstEmployees.EOF) { + const country = rstEmployees('Country').Value as string | null || '[NULL]'; + WScript.Echo(`\t${country} - ${rstEmployees('FirstName').Value} ${rstEmployees('LastName').Value}`); + rstEmployees.MoveNext(); + } + + // Delete new record because this is a demonstration. + rstEmployees.Bookmark = bookmark; + rstEmployees.Delete(); + + rstEmployees.Close(); + + catNorthwind.Tables('Employees').Indexes.Delete(idxNew.Name); + catNorthwind = null; +} + +// https://docs.microsoft.com/en-us/sql/ado/reference/adox-api/adox-code-example-numericscale-and-precision-properties-example-vb +{ + let cnn: ADODB.Connection | null = null; + let cat: ADOX.Catalog | null; + let colLoop: ADOX.Column | null; + try { + // Connect the catalog. + cnn = new ActiveXObject('ADODB.Connection'); + cnn.Open(connectionString); + cat = new ActiveXObject('ADOX.Catalog'); + cat.ActiveConnection = cnn; + + // Retrieve the Order Details table + const tblOD = cat.Tables('Order Details'); + + // Display numeric scale and precision of small integer fields. + for (colLoop of collectionToArray(tblOD.Columns)) { + if (colLoop.Type === ADODB.DataTypeEnum.adSmallInt) { + WScript.Echo(` +Column: ${colLoop.Name} +Numeric scale: ${colLoop.NumericScale} +Precision: ${colLoop.Precision} + `.trim()); + } + } + } catch (error) { + WScript.Echo(error); + } finally { + cat = null; + cnn = tryClose(cnn); + colLoop = null; + } +} + +// https://docs.microsoft.com/en-us/sql/ado/reference/adox-api/parentcatalog-property-example-vb +{ + let cnn: ADODB.Connection | null = null; + let cat: ADOX.Catalog | null; + let tbl: ADOX.Table | null; + try { + cnn = new ActiveXObject('ADODB.Connection'); + cnn.Open(connectionString); + cat = new ActiveXObject('ADOX.Catalog'); + cat.ActiveConnection = cnn; + + tbl = new ActiveXObject('ADOX.Table'); + tbl.Name = 'MyContacts'; + tbl.ParentCatalog = cat; + + // Create fields and append them to the new Table object. + tbl.Columns.Append('ContactId', adInteger); + tbl.Columns.Append('CustomerID', adVarWChar); + tbl.Columns.Append('FirstName', adVarWChar); + tbl.Columns.Append('LastName', adVarWChar); + tbl.Columns.Append('Phone', adVarWChar, 20); + tbl.Columns.Append('Notes', ADODB.DataTypeEnum.adLongVarWChar); + + // Make the ContactId column an auto incrementing column + tbl.Columns('ContactId').Properties('AutoIncrement').Value = true; + + cat.Tables.Append(tbl); + WScript.Echo(`Table 'MyContacts' is added.`); + + // Delete the table as this is a demonstration. + cat.Tables.Delete(tbl.Name); + WScript.Echo(`Table 'MyContacts' is deleted.`); + } catch (error) { + WScript.Echo(error); + } finally { + cnn = tryClose(cnn); + cat = null; + tbl = null; + } +} + +// https://docs.microsoft.com/en-us/sql/ado/reference/adox-api/primarykey-and-unique-properties-example-vb +{ + let catNorthwind: ADOX.Catalog | null = null; + let tblNew: ADOX.Table | null; + let idxNew: ADOX.Index | null; + let idxLoop: ADOX.Index | null; + try { + // Connect the catalog + catNorthwind = new ActiveXObject('ADOX.Catalog'); + catNorthwind.ActiveConnection = connectionString; + + // Name new table + tblNew = new ActiveXObject('ADOX.Table'); + tblNew.Name = 'NewTable'; + + // Append a numeric and a text field to new table. + tblNew.Columns.Append('NumField', adInteger, 20); + tblNew.Columns.Append('TextField', adVarWChar, 20); + + // Append new Primary Key index on NumField column to new table + idxNew = new ActiveXObject('ADOX.Index'); + idxNew.Name = 'NumIndex'; + idxNew.Columns.Append('NumField'); + idxNew.PrimaryKey = true; + idxNew.Unique = true; + tblNew.Indexes.Append(idxNew); + + // Append an index on Textfield to new table.. + // Note the different technique: Specifying index and column name as parameters of the Append method + tblNew.Indexes.Append('TextIndex', 'TextField'); + + // Append the new table + catNorthwind.Tables.Append(tblNew); + + WScript.Echo(`${tblNew.Indexes.Count} indexes in '${tblNew.Name}' table`); + + // Enumerate Indexes collection. + for (idxLoop of collectionToArray(tblNew.Indexes)) { + WScript.Echo(` +Index ${idxLoop.Name} + Primary key = ${idxLoop.PrimaryKey} + Unique = ${idxLoop.Unique} + Columns = ${collectionToArray(idxLoop.Columns).map(colLoop => colLoop.Name).join(', ')} + `.trim()); + } + + // Delete new table as this is a demonstration. + catNorthwind.Tables.Delete(tblNew.Name); + } catch (error) { + WScript.Echo(error); + } finally { + if (catNorthwind) { catNorthwind.ActiveConnection = null; } + catNorthwind = null; + tblNew = null; + idxNew = null; + idxLoop = null; + } +} + +// https://docs.microsoft.com/en-us/sql/ado/reference/adox-api/sortorder-property-example-vb +{ + let cnn: ADODB.Connection | null = null; + let catNorthwind: ADOX.Catalog | null; + let idxAscending: ADOX.Index | null; + let rstEmployees: ADODB.Recordset | null = null; + let idxDescending: ADOX.Index | null; + + try { + // Connect to the catalog. + cnn = new ActiveXObject('ADODB.Connection'); + cnn.Open(connectionString); + catNorthwind = new ActiveXObject('ADOX.Catalog'); + catNorthwind.ActiveConnection = cnn; + + const enumerateRecordset = (indexName: string) => { + rstEmployees = new ActiveXObject('ADODB.Recordset'); + rstEmployees.Index = indexName; + rstEmployees.Open('Employees', cnn!, adOpenKeyset, adLockOptimistic, ADODB.CommandTypeEnum.adCmdTableDirect); + + rstEmployees.MoveFirst(); + WScript.Echo(`Index = ${rstEmployees.Index}`); + WScript.Echo('\tCountry - Name'); + + // Enumerate the Recordset. The value of the IndexNulls property will determine if the newly added record appears in the output. + while (!rstEmployees.EOF) { + WScript.Echo(`\t${rstEmployees('Country').Value} - ${rstEmployees('FirstName').Value} ${rstEmployees('LastName').Value}`); + rstEmployees.MoveNext(); + } + + rstEmployees.Close(); + }; + + // Append Country column to new index. + idxAscending = new ActiveXObject('ADOX.Index'); + idxAscending.Columns.Append('Country'); + idxAscending.Columns('Country').SortOrder = ADOX.SortOrderEnum.adSortAscending; + idxAscending.Name = 'Ascending'; + idxAscending.IndexNulls = ADOX.AllowNullsEnum.adIndexNullsAllow; + + // Append new index to Employees table. + catNorthwind.Tables('Employees').Indexes.Append(idxAscending); + + enumerateRecordset(idxAscending.Name); + + // Append Country column to new index. + idxDescending = new ActiveXObject('ADOX.Index'); + idxDescending.Columns.Append('Country'); + idxDescending.Columns('Country').SortOrder = ADOX.SortOrderEnum.adSortDescending; + idxDescending.Name = 'Descending'; + idxDescending.IndexNulls = ADOX.AllowNullsEnum.adIndexNullsAllow; + + // Append descending index to Employees table. + catNorthwind.Tables('Employees').Indexes.Append(idxDescending); + + enumerateRecordset(idxDescending.Name); + + // Delete new indexes because this is a demonstration. + catNorthwind.Tables('Employees').Indexes.Delete(idxAscending.Name); + catNorthwind.Tables('Employees').Indexes.Delete(idxDescending.Name); + } catch (error) { + WScript.Echo(error); + } finally { + cnn = tryClose(cnn); + catNorthwind = null; + idxAscending = null; + idxDescending = null; + rstEmployees = tryClose(rstEmployees); + } +} + +// https://docs.microsoft.com/en-us/sql/ado/reference/adox-api/views-and-fields-collections-example-vb +{ + let cnn: ADODB.Connection | null = null; + let cat: ADOX.Catalog | null; + let rst: ADODB.Recordset | null = null; + let fld: ADODB.Field | null; + try { + // Open the Connection + cnn = new ActiveXObject('ADODB.Connection'); + cnn.Open(connectionString); + + // Open the catalog + cat = new ActiveXObject('ADOX.Catalog'); + cat.ActiveConnection = cnn; + + // Set the Source for the Recordset + rst = new ActiveXObject('ADODB.Recordset'); + rst.Source = cat.Views('AllCustomers').Command; + + // Retrieve Field information + rst.Fields.Refresh(); + + for (fld of collectionToArray(rst.Fields)) { + WScript.Echo(`${fld.Name}.${fld.Type}`); + } + } catch (error) { + WScript.Echo(error); + } finally { + cnn = tryClose(cnn); + cat = null; + rst = tryClose(rst); + fld = null; + } +} + +const flatten = (arr: T[][], result: T[] = []) => { + for (let i = 0, length = arr.length; i < length; i++) { + const value: T | any[] = arr[i]; // any in this context is because the array might have an arbitrary depth + if (Array.isArray(value)) { + flatten(value, result); + } else { + result.push(value); + } + } + return result; +}; + +// List indexes with multiple columns +{ + interface TableIndex { + tbl: ADOX.Table; + idx: ADOX.Index; + } + + const cat = new ActiveXObject('ADOX.Catalog'); + cat.ActiveConnection = connectionString; + + let multicolumnIndexes = flatten( + collectionToArray(cat.Tables).map(tbl => + collectionToArray(tbl.Indexes).map(idx => + ({ tbl, idx }) + ) + ) + ).filter(x => x.idx.Columns.Count > 1); + for (const x of multicolumnIndexes) { + const columns = collectionToArray(x.idx.Columns).map(col => col.Name).join(', '); + WScript.Echo(`${x.tbl.Name}.${x.idx.Name} -- ${columns}`); + } + multicolumnIndexes = []; +} diff --git a/types/activex-adox/index.d.ts b/types/activex-adox/index.d.ts new file mode 100644 index 0000000000..fd502684e4 --- /dev/null +++ b/types/activex-adox/index.d.ts @@ -0,0 +1,332 @@ +// Type definitions for Microsoft ADO Extensions 6.0 for DDL and Security - ADOX 6.0 +// Project: https://docs.microsoft.com/en-us/sql/ado/reference/adox-api/adox-object-model +// Definitions by: Zev Spitz +// Definitions: https://github.com/DefinitelyTyped/DefinitelyTyped +// TypeScript Version: 2.6 + +/// +/// + +declare namespace ADOX { + const enum ActionEnum { + adAccessDeny = 3, + adAccessGrant = 1, + adAccessRevoke = 4, + adAccessSet = 2, + } + + const enum AllowNullsEnum { + adIndexNullsAllow = 0, + adIndexNullsDisallow = 1, + adIndexNullsIgnore = 2, + adIndexNullsIgnoreAny = 4, + } + + const enum ColumnAttributesEnum { + adColFixed = 1, + adColNullable = 2, + } + + const enum InheritTypeEnum { + adInheritBoth = 3, + adInheritContainers = 2, + adInheritNone = 0, + adInheritNoPropogate = 4, + adInheritObjects = 1, + } + + const enum KeyTypeEnum { + adKeyForeign = 2, + adKeyPrimary = 1, + adKeyUnique = 3, + } + + const enum ObjectTypeEnum { + adPermObjColumn = 2, + adPermObjDatabase = 3, + adPermObjProcedure = 4, + adPermObjProviderSpecific = -1, + adPermObjTable = 1, + adPermObjView = 5, + } + + const enum RightsEnum { + adRightCreate = 16384, + adRightDelete = 65536, + adRightDrop = 256, + adRightExclusive = 512, + adRightExecute = 536870912, + adRightFull = 268435456, + adRightInsert = 32768, + adRightMaximumAllowed = 33554432, + adRightNone = 0, + adRightRead = -2147483648, + adRightReadDesign = 1024, + adRightReadPermissions = 131072, + adRightReference = 8192, + adRightUpdate = 1073741824, + adRightWithGrant = 4096, + adRightWriteDesign = 2048, + adRightWriteOwner = 524288, + adRightWritePermissions = 262144, + } + + const enum RuleEnum { + adRICascade = 1, + adRINone = 0, + adRISetDefault = 3, + adRISetNull = 2, + } + + const enum SortOrderEnum { + adSortAscending = 1, + adSortDescending = 2, + } + + class Catalog { + private constructor(); + private 'ADOX.Catalog_typekey': Catalog; + + /** Can be set to a Connection object or a string. Returns the active Connection object, or `null` */ + ActiveConnection: string | ADODB.Connection | null; + + /** + * The **Create** method creates and opens a new ADO Connection to the data source specified in _ConnectString_. If successful, the new **Connection** object is assigned to the **ActiveConnection** property. + * + * An error will occur if the provider does not support creating new catalogs. + * + * @param ConnectString Connection string + */ + Create(ConnectString: string): void; + + /** + * @param ObjectTypeId Specifies the GUID for a provider object type not defined by the OLE DB specification + */ + GetObjectOwner(ObjectName: string, ObjectType: ObjectTypeEnum.adPermObjProviderSpecific, ObjectTypeId: any): string; + GetObjectOwner(ObjectName: string, ObjectType: ObjectTypeEnum): string; + readonly Groups: Groups; + readonly Procedures: Procedures; + + /** + * @param UserName Specifies the name of the **User** or **Group** to own the object + * @param ObjectTypeId Specifies the GUID for a provider object type that is not defined by the OLE DB specification + */ + SetObjectOwner(ObjectName: string, ObjectType: ObjectTypeEnum.adPermObjProviderSpecific, UserName: string, ObjectTypeId: any): void; + SetObjectOwner(ObjectName: string, ObjectType: ObjectTypeEnum, UserName: string): void; + readonly Tables: Tables; + readonly Users: Users; + readonly Views: Views; + } + + class Column { + private constructor(); + private 'ADOX.Column_typekey': Column; + Attributes: ColumnAttributesEnum; + DefinedSize: number; + Name: string; + NumericScale: number; + ParentCatalog: Catalog; + Precision: number; + readonly Properties: ADODB.Properties; + RelatedColumn: string; + SortOrder: SortOrderEnum; + Type: ADODB.DataTypeEnum; + } + + interface Columns { + /** + * @param Type [Type=202] + * @param DefinedSize [DefinedSize=0] + */ + Append(Item: Column | string, Type?: ADODB.DataTypeEnum, DefinedSize?: number): void; + readonly Count: number; + Delete(Item: string | number): void; + Item(Item: string | number): Column; + Refresh(): void; + (Item: string | number): Column; + } + + class Group { + private constructor(); + private 'ADOX.Group_typekey': Group; + + /** + * @param Name Specifies the name of the object for which to set permissions. Pass `null` if you want to get the permissions for the object container. + * @param ObjectTypeId Specifies the GUID for a provider object type not defined by the OLE DB specification. + */ + GetPermissions(Name: string | null, ObjectType: ObjectTypeEnum.adPermObjProviderSpecific, ObjectTypeId: any): RightsEnum; + GetPermissions(Name: string | null, ObjectType: ObjectTypeEnum): RightsEnum; + Name: string; + ParentCatalog: Catalog; + readonly Properties: ADODB.Properties; + + /** + * @param Rights A bitmask of one or more of the **RightsEnum** constants, that indicates the rights to set. + * @param Inherit [Inherit=0] + * @param ObjectTypeId Specifies the GUID for a provider object type not defined by the OLE DB specification. + */ + SetPermissions(Name: string, ObjectType: ObjectTypeEnum.adPermObjProviderSpecific, Action: ActionEnum, Rights: RightsEnum, Inherit: InheritTypeEnum, ObjectTypeId: any): void; + SetPermissions(Name: string, ObjectType: ObjectTypeEnum, Action: ActionEnum, Rights: RightsEnum, Inherit?: InheritTypeEnum): void; + readonly Users: Users; + } + + interface Groups { + Append(Item: Group | string): void; + readonly Count: number; + Delete(Item: string | number): void; + Item(Item: string | number): Group; + Refresh(): void; + (Item: string | number): Group; + } + + class Index { + private constructor(); + private 'ADOX.Index_typekey': Index; + Clustered: boolean; + readonly Columns: Columns; + IndexNulls: AllowNullsEnum; + Name: string; + PrimaryKey: boolean; + readonly Properties: ADODB.Properties; + Unique: boolean; + } + + // tslint:disable-next-line:interface-name + interface Indexes { + Append(Item: Index | string, Columns?: string | SafeArray): void; // is this actually two overloads, one with [Index] and one with [string,string | SafeArray]? + readonly Count: number; + Delete(Item: string | number): void; + Item(Item: string | number): Index; + Refresh(): void; + (Item: string | number): Index; + } + + class Key { + private constructor(); + private 'ADOX.Key_typekey': Key; + readonly Columns: Columns; + DeleteRule: RuleEnum; + Name: string; + RelatedTable: string; + Type: KeyTypeEnum; + UpdateRule: RuleEnum; + } + + interface Keys { + /** + * @param Type [Type=1] + * @param RelatedTable [RelatedTable=''] + * @param RelatedColumn [RelatedColumn=''] + */ + Append(Item: Key | string, Type?: KeyTypeEnum, Column?: string | SafeArray, RelatedTable?: string, RelatedColumn?: string): void; + readonly Count: number; + Delete(Item: string | number): void; + Item(Item: string | number): Key; + Refresh(): void; + (Item: string | number): Key; + } + + class Procedure { + private constructor(); + private 'ADOX.Procedure_typekey': Procedure; + Command: ADODB.Command; + readonly DateCreated: VarDate | null; + readonly DateModified: VarDate | null; + readonly Name: string; + } + + interface Procedures { + Append(Name: string, Command: ADODB.Command): void; + readonly Count: number; + Delete(Item: string | number): void; + Item(Item: string | number): Procedure; + Refresh(): void; + (Item: string | number): Procedure; + } + + class Table { + private constructor(); + private 'ADOX.Table_typekey': Table; + readonly Columns: Columns; + readonly DateCreated: VarDate; + readonly DateModified: VarDate; + readonly Indexes: Indexes; + readonly Keys: Keys; + Name: string; + ParentCatalog: Catalog; + readonly Properties: ADODB.Properties; + readonly Type: string; + } + + interface Tables { + Append(Item: Table | string): void; + readonly Count: number; + Delete(Item: string | number): void; + Item(Item: string | number): Table; + Refresh(): void; + (Item: string | number): Table; + } + + class User { + private constructor(); + private 'ADOX.User_typekey': User; + ChangePassword(OldPassword: string, NewPassword: string): void; + + /** + * @param Name Specifies the name of the object for which to set permissions. Pass `null` if you want to get the permissions for the object container. + * @param ObjectTypeId Specifies the GUID for a provider object type not defined by the OLE DB specification. + */ + GetPermissions(Name: string | null, ObjectType: ObjectTypeEnum.adPermObjProviderSpecific, ObjectTypeId: any): RightsEnum; + GetPermissions(Name: string | null, ObjectType: ObjectTypeEnum): RightsEnum; + readonly Groups: Groups; + Name: string; + ParentCatalog: Catalog; + readonly Properties: ADODB.Properties; + + /** + * @param Rights A bitmask of one or more of the **RightsEnum** constants, that indicates the rights to set. + * @param Inherit [Inherit=0] + * @param ObjectTypeId Specifies the GUID for a provider object type not defined by the OLE DB specification. + */ + SetPermissions(Name: string, ObjectType: ObjectTypeEnum.adPermObjProviderSpecific, Action: ActionEnum, Rights: RightsEnum, Inherit: InheritTypeEnum, ObjectTypeId: any): void; + SetPermissions(Name: string, ObjectType: ObjectTypeEnum, Action: ActionEnum, Rights: RightsEnum, Inherit?: InheritTypeEnum): void; + } + + interface Users { + /** @param Password [Password=''] */ + Append(Item: User | string, Password?: string): void; + readonly Count: number; + Delete(Item: string | number): void; + Item(Item: string | number): User; + Refresh(): void; + (Item: string | number): User; + } + + class View { + private constructor(); + private 'ADOX.View_typekey': View; + Command: ADODB.Command; + readonly DateCreated: VarDate; + readonly DateModified: VarDate; + readonly Name: string; + } + + interface Views { + Append(Name: string, Command: ADODB.Command): void; + readonly Count: number; + Delete(Item: string | number): void; + Item(Item: string | number): View; + Refresh(): void; + (Item: string | number): View; + } +} + +interface ActiveXObjectNameMap { + 'ADOX.Catalog': ADOX.Catalog; + 'ADOX.Column': ADOX.Column; + 'ADOX.Group': ADOX.Group; + 'ADOX.Index': ADOX.Index; + 'ADOX.Key': ADOX.Key; + 'ADOX.Table': ADOX.Table; + 'ADOX.User': ADOX.User; +} diff --git a/types/activex-iwshruntimelibrary/package.json b/types/activex-adox/package.json similarity index 100% rename from types/activex-iwshruntimelibrary/package.json rename to types/activex-adox/package.json diff --git a/types/colors/tsconfig.json b/types/activex-adox/tsconfig.json similarity index 90% rename from types/colors/tsconfig.json rename to types/activex-adox/tsconfig.json index 99d78ad72d..30b6288e6a 100644 --- a/types/colors/tsconfig.json +++ b/types/activex-adox/tsconfig.json @@ -18,7 +18,6 @@ }, "files": [ "index.d.ts", - "colors-tests.ts", - "safe.d.ts" + "activex-adox-tests.ts" ] } \ No newline at end of file diff --git a/types/activex-adox/tslint.json b/types/activex-adox/tslint.json new file mode 100644 index 0000000000..b06c06beef --- /dev/null +++ b/types/activex-adox/tslint.json @@ -0,0 +1,7 @@ +{ + "extends": "dtslint/dt.json", + "rules": { + "no-const-enum": false, + "max-line-length": false + } +} \ No newline at end of file diff --git a/types/activex-dao/activex-dao-tests.ts b/types/activex-dao/activex-dao-tests.ts index 412bea60b5..6eea19f8e6 100644 --- a/types/activex-dao/activex-dao-tests.ts +++ b/types/activex-dao/activex-dao-tests.ts @@ -1,27 +1,50 @@ -let engine = new ActiveXObject('DAO.DBEngine.120'); +/// + +const collectionToArray = (col: { Item(key: any): T }): T[] => { + const results: T[] = []; + const enumerator = new Enumerator(col); + enumerator.moveFirst(); + while (!enumerator.atEnd()) { + results.push(enumerator.item()); + enumerator.moveNext(); + } + return results; +}; + +const dbOpenSnapshot = DAO.RecordsetTypeEnum.dbOpenSnapshot; + +let engine = new ActiveXObject('DAO.DBEngine'); let dbsNorthwind = engine.OpenDatabase('c:\\path\\to\\northwind.mdb'); -// adding a record to a recordset -- https://msdn.microsoft.com/VBA/Access-VBA/articles/add-a-record-to-a-dao-recordset -let rstShippers = dbsNorthwind.OpenRecordset('Shippers'); -rstShippers.AddNew(); -rstShippers.Fields.Item('CompanyName').Value = 'Global Parcel Service'; -// Set remaining fields -rstShippers.Update(); -rstShippers.Close(); +// https://msdn.microsoft.com/VBA/Access-VBA/articles/add-a-record-to-a-dao-recordset +{ + // adding a record to a recordset + const rstShippers = dbsNorthwind.OpenRecordset('Shippers'); + rstShippers.AddNew(); + rstShippers('CompanyName').Value = 'Global Parcel Service'; + // Set remaining fields + rstShippers.Update(); + rstShippers.Close(); +} -// create a QueryDef with the given SQL -- https://msdn.microsoft.com/VBA/Access-VBA/articles/build-sql-statements-that-include-variables-and-controls -let sql = 'SELECT * FROM Orders WHERE OrderDate > #3-31-2006#'; -let qdf = dbsNorthwind.CreateQueryDef('Second quarter', sql); -// using parameters -sql = ` - PARAMETERS QuarterStart DATETIME - SELECT * - FROM Orders - WHERE OrderDate > QuarterStart -`; -qdf = dbsNorthwind.CreateQueryDef('Second quarter (parameters)', sql); +// https://msdn.microsoft.com/VBA/Access-VBA/articles/build-sql-statements-that-include-variables-and-controls +{ + // create a QueryDef with the given SQL + let sql = 'SELECT * FROM Orders WHERE OrderDate > #3-31-2006#'; + let qdf = dbsNorthwind.CreateQueryDef('Second quarter', sql); + // using parameters + sql = ` + PARAMETERS QuarterStart DATETIME + SELECT * + FROM Orders + WHERE OrderDate > QuarterStart + `; + qdf = dbsNorthwind.CreateQueryDef('Second quarter (parameters)', sql); + WScript.Echo(`Field names: ${collectionToArray(qdf.Fields).map(fld => fld.Name).join(', ')}`); +} -// count the number of records in a Recordset -- https://msdn.microsoft.com/VBA/Access-VBA/articles/count-the-number-of-records-in-a-dao-recordset +// https://msdn.microsoft.com/VBA/Access-VBA/articles/count-the-number-of-records-in-a-dao-recordset +/** Count the number of records in a Recordset */ const findRecordCount = (dbs: DAO.Database, sql: string) => { let count = 0; const rstRecords = dbs.OpenRecordset(sql); @@ -33,113 +56,119 @@ const findRecordCount = (dbs: DAO.Database, sql: string) => { return count; }; -// delete records from a Recordset -- https://msdn.microsoft.com/VBA/Access-VBA/articles/delete-a-record-from-a-dao-recordset -rstShippers = dbsNorthwind.OpenRecordset('SELECT * FROM Shippers ORDER BY CompanyName, ShipperID', DAO.RecordsetTypeEnum.dbOpenDynaset); -if (!rstShippers.EOF) { - let name = rstShippers.Fields.Item('CompanyName').Value; - rstShippers.MoveNext(); - while (!rstShippers.EOF) { - const recordName: string = rstShippers.Fields.Item('CompanyName').Value; - if (recordName === name) { - rstShippers.Delete(); - } else { - name = recordName; - } +// https://msdn.microsoft.com/VBA/Access-VBA/articles/delete-a-record-from-a-dao-recordset +{ + // delete records from a Recordset + const rstShippers = dbsNorthwind.OpenRecordset('SELECT * FROM Shippers ORDER BY CompanyName, ShipperID', DAO.RecordsetTypeEnum.dbOpenDynaset); + if (!rstShippers.EOF) { + let name = rstShippers('CompanyName').Value; rstShippers.MoveNext(); + while (!rstShippers.EOF) { + const recordName: string = rstShippers('CompanyName').Value; + if (recordName === name) { + rstShippers.Delete(); + } else { + name = recordName; + } + rstShippers.MoveNext(); + } } + rstShippers.Close(); } -rstShippers.Close(); -// copy entire records to an array -- https://msdn.microsoft.com/VBA/Access-VBA/articles/extract-data-from-a-record-in-a-dao-recordset -let rstEmployees = dbsNorthwind.OpenRecordset('SELECT FirstName, LastName, Title FROM Employees', DAO.RecordsetTypeEnum.dbOpenSnapshot); -let records = new VBArray(rstEmployees.GetRows(3)); -let recordCount = records.ubound(2) + 1; -let columnCount = records.ubound(1) + 1; -for (let row = 0; row < recordCount; row += 1) { - for (let column = 0; column < columnCount; column += 1) { - WScript.Echo(records.getItem(column, row)); +// https://msdn.microsoft.com/VBA/Access-VBA/articles/extract-data-from-a-record-in-a-dao-recordset +{ + // copy entire records to an array + const rstEmployees = dbsNorthwind.OpenRecordset('SELECT FirstName, LastName, Title FROM Employees', dbOpenSnapshot); + const records = new VBArray(rstEmployees.GetRows(3)); + const recordCount = records.ubound(2) + 1; + const columnCount = records.ubound(1) + 1; + for (let row = 0; row < recordCount; row += 1) { + for (let column = 0; column < columnCount; column += 1) { + WScript.Echo(records.getItem(column, row)); + } } + if (rstEmployees.EOF) { WScript.Echo('At end of recordset'); } + rstEmployees.Close(); } -if (rstEmployees.EOF) { WScript.Echo('At end of recordset'); } -rstEmployees.Close(); // find a record in a dynaset-type or snapshot-type DAO Recordset -- https://msdn.microsoft.com/en-us/vba/access-vba/articles/find-a-record-in-a-dynaset-type-or-snapshot-type-dao-recordset -const findOrdersWithoutDetails = () => { +{ const orders: number[] = []; - const rstOrders = dbsNorthwind.OpenRecordset('SELECT * FROM Orders ORDER BY OrderID', DAO.RecordsetTypeEnum.dbOpenSnapshot); - const rstOrderDetails = dbsNorthwind.OpenRecordset('SELECT * FROM [Order Details] ORDER BY OrderID', DAO.RecordsetTypeEnum.dbOpenSnapshot); + const rstOrders = dbsNorthwind.OpenRecordset('SELECT * FROM Orders ORDER BY OrderID', dbOpenSnapshot); + const rstOrderDetails = dbsNorthwind.OpenRecordset('SELECT * FROM [Order Details] ORDER BY OrderID', dbOpenSnapshot); - const closeRecordsets = () => { - rstOrders.Close(); - rstOrderDetails.Close(); - }; - if (rstOrders.EOF || rstOrderDetails.EOF) { - closeRecordsets(); - return; - } - - while (!rstOrders.EOF) { - const orderID = rstOrders.Fields.Item('OrderID').Value; - rstOrderDetails.FindFirst(`OrderID=${orderID}`); - if (rstOrderDetails.NoMatch) { - orders.push(orderID); + if (!rstOrders.EOF && !rstOrderDetails.EOF) { + while (!rstOrders.EOF) { + const orderID = rstOrders('OrderID').Value; + rstOrderDetails.FindFirst(`OrderID=${orderID}`); + if (rstOrderDetails.NoMatch) { + orders.push(orderID); + } + rstOrders.MoveNext(); } - rstOrders.MoveNext(); } - closeRecordsets(); - return orders; -}; -// find a record in a table-type DAO Recordset -- https://msdn.microsoft.com/VBA/Access-VBA/articles/find-a-record-in-a-table-type-dao-recordset + rstOrders.Close(); + rstOrderDetails.Close(); + + WScript.Echo(orders.join('\n')); +} + +// https://msdn.microsoft.com/VBA/Access-VBA/articles/find-a-record-in-a-table-type-dao-recordset +/** Find a record in a table-type DAO Recordset */ const getHireDate = (employeeID: number) => { let hireDate: Date | undefined; const rstEmployees = dbsNorthwind.OpenRecordset('Employees'); rstEmployees.Index = 'PrimaryKey'; rstEmployees.Seek('=', employeeID); if (!rstEmployees.NoMatch) { - hireDate = new Date(rstEmployees.Fields.Item('HireDate').Value as VarDate); + hireDate = new Date(rstEmployees('HireDate').Value as VarDate); } return hireDate; }; -// manipulate multiple fields with DAO -- https://msdn.microsoft.com/VBA/Access-VBA/articles/manipulate-multivalued-fields-with-dao -const browseMultiValueField = () => { +// https://msdn.microsoft.com/VBA/Access-VBA/articles/manipulate-multivalued-fields-with-dao +{ + // manipulate multiple fields with DAO const rs = dbsNorthwind.OpenRecordset('Tasks'); rs.MoveFirst(); while (!rs.EOF) { - WScript.Echo(rs.Fields.Item('TaskName').Value); - const childRs = rs.Fields.Item('AssignedTo').Value as DAO.Recordset; + WScript.Echo(rs('TaskName').Value); + const childRs = rs('AssignedTo').Value as DAO.Recordset; if (childRs.EOF) { continue; } childRs.MoveFirst(); while (!childRs.EOF) { - WScript.Echo('\t' + childRs.Fields.Item('Value').Value); + WScript.Echo('\t' + childRs('Value').Value); } } -}; +} -// modifying an existing record in a DAO Recordset -- https://msdn.microsoft.com/VBA/Access-VBA/articles/modify-an-existing-record-in-a-dao-recordset -const changeTitleWithoutTransaction = () => { - rstEmployees = dbsNorthwind.OpenRecordset('Employees'); +// https://msdn.microsoft.com/VBA/Access-VBA/articles/modify-an-existing-record-in-a-dao-recordset +{ + // modifying an existing record in a DAO Recordset + const rstEmployees = dbsNorthwind.OpenRecordset('Employees'); while (!rstEmployees.EOF) { - if (rstEmployees.Fields.Item('Title').Value === 'Sales Representative') { + if (rstEmployees('Title').Value === 'Sales Representative') { rstEmployees.Edit(); - rstEmployees.Fields.Item('Title').Value = 'Account Executive'; + rstEmployees('Title').Value = 'Account Executive'; rstEmployees.Update(); } rstEmployees.MoveNext(); } rstEmployees.Close(); -}; +} -// using transactions in a DAO Recordset -- https://msdn.microsoft.com/VBA/Access-VBA/articles/use-transactions-in-a-dao-recordset +// https://msdn.microsoft.com/VBA/Access-VBA/articles/use-transactions-in-a-dao-recordset +/** using transactions in a DAO Recordset */ const changeTitleWithTransaction = (commitTransaction: boolean) => { - const currentWorkspace = engine.Workspaces.Item(0); - rstEmployees = dbsNorthwind.OpenRecordset('Employees'); + const currentWorkspace = engine.Workspaces(0); + const rstEmployees = dbsNorthwind.OpenRecordset('Employees'); currentWorkspace.BeginTrans(); while (!rstEmployees.EOF) { - if (rstEmployees.Fields.Item('Title').Value === 'Sales Representative') { + if (rstEmployees('Title').Value === 'Sales Representative') { rstEmployees.Edit(); - rstEmployees.Fields.Item('Title').Value = 'Account Executive'; + rstEmployees('Title').Value = 'Account Executive'; rstEmployees.Update(); } rstEmployees.MoveNext(); diff --git a/types/activex-dao/index.d.ts b/types/activex-dao/index.d.ts index 6db3e0bd0d..0a13747514 100644 --- a/types/activex-dao/index.d.ts +++ b/types/activex-dao/index.d.ts @@ -1,8 +1,10 @@ -// Type definitions for Microsoft Office 14.0 Access Database Engine Object Library - DAO 14.0 +// Type definitions for Microsoft Office 16.0 Access Database Engine Object Library - DAO 16.0 // Project: https://msdn.microsoft.com/en-us/library/dn124645.aspx // Definitions by: Zev Spitz // Definitions: https://github.com/DefinitelyTyped/DefinitelyTyped -// TypeScript Version: 2.4 +// TypeScript Version: 2.6 + +/// declare namespace DAO { const enum _DAOSuppHelp { @@ -56,12 +58,15 @@ declare namespace DAO { } const enum DatabaseTypeEnum { + /** @deprecated */ dbDecrypt = 4, + /** @deprecated */ dbEncrypt = 2, dbVersion10 = 1, dbVersion11 = 8, dbVersion120 = 128, dbVersion140 = 256, + dbVersion150 = 512, dbVersion20 = 16, dbVersion30 = 32, dbVersion40 = 64, @@ -128,6 +133,15 @@ declare namespace DAO { dbRefreshCache = 8, } + const enum ISAMStatsEnum { + DiskReads = 0, + DiskWrites = 1, + LocksPlaced = 4, + LocksReleased = 5, + ReadsFromCache = 2, + ReadsFromReadAheadCache = 3, + } + const enum LanguageConstants { dbLangArabic = ';LANGID=0x0401;CP=1256;COUNTRY=0', dbLangChineseSimplified = ';LANGID=0x0804;CP=936;COUNTRY=0', @@ -308,18 +322,26 @@ declare namespace DAO { dbUseODBC = 1, } + type Bookmark = SafeArray; + + class ComplexType { + private 'DAO.ComplexType_typekey': ComplexType; + private constructor(); + readonly Fields: Fields; + } + class Connection { private 'DAO.Connection_typekey': Connection; private constructor(); Cancel(): void; Close(): void; readonly Connect: string; - CreateQueryDef(Name?: any, SQLText?: any): QueryDef; + CreateQueryDef(Name?: string, SQLText?: string): QueryDef; readonly Database: Database; - Execute(Query: string, Options?: any): void; + Execute(Query: string, Options?: RecordsetOptionEnum): void; readonly hDbc: number; readonly Name: string; - OpenRecordset(Name: string, Type?: any, Options?: any, LockEdit?: any): Recordset; + OpenRecordset(Name: string, Type?: RecordsetTypeEnum, Options?: RecordsetOptionEnum, LockEdit?: LockTypeEnum): Recordset; readonly QueryDefs: QueryDefs; QueryTimeout: number; readonly RecordsAffected: number; @@ -329,12 +351,11 @@ declare namespace DAO { readonly Updatable: boolean; } - class Connections { - private 'DAO.Connections_typekey': Connections; - private constructor(); + interface Connections { readonly Count: number; - Item(Item: any): Connection; + Item(Item: number | string): Connection; Refresh(): void; + (Item: number | string): Connection; } class Container { @@ -350,12 +371,11 @@ declare namespace DAO { UserName: string; } - class Containers { - private 'DAO.Containers_typekey': Containers; - private constructor(); + interface Containers { readonly Count: number; - Item(Item: any): Container; + Item(Item: number | string): Container; Refresh(): void; + (Item: number | string): Container; } class Database { @@ -366,16 +386,16 @@ declare namespace DAO { Connect: string; readonly Connection: Connection; readonly Containers: Containers; - CreateProperty(Name?: any, Type?: any, Value?: any, DDL?: any): Property; - CreateQueryDef(Name?: any, SQLText?: any): QueryDef; - CreateRelation(Name?: any, Table?: any, ForeignTable?: any, Attributes?: any): Relation; - CreateTableDef(Name?: any, Attributes?: any, SourceTableName?: any, Connect?: any): TableDef; + CreateProperty(Name?: string, Type?: DataTypeEnum, Value?: any, DDL?: boolean): Property; + CreateQueryDef(Name?: string, SQLText?: string): QueryDef; + CreateRelation(Name?: string, Table?: string, ForeignTable?: string, Attributes?: RelationAttributeEnum): Relation; + CreateTableDef(Name?: string, Attributes?: TableDefAttributeEnum, SourceTableName?: string, Connect?: string): TableDef; DesignMasterID: string; - Execute(Query: string, Options?: any): void; - MakeReplica(PathName: string, Description: string, Options?: any): void; + Execute(Query: string, Options?: RecordsetOptionEnum): void; + MakeReplica(PathName: string, Description: string, Options?: ReplicaTypeEnum): void; readonly Name: string; NewPassword(bstrOld: string, bstrNew: string): void; - OpenRecordset(Name: string, Type?: any, Options?: any, LockEdit?: any): Recordset; + OpenRecordset(Name: string, Type?: RecordsetTypeEnum, Options?: RecordsetOptionEnum, LockEdit?: LockTypeEnum): Recordset; PopulatePartial(DbPathName: string): void; readonly Properties: Properties; readonly QueryDefs: QueryDefs; @@ -384,19 +404,18 @@ declare namespace DAO { readonly Recordsets: Recordsets; readonly Relations: Relations; readonly ReplicaID: string; - Synchronize(DbPathName: string, ExchangeType?: any): void; + Synchronize(DbPathName: string, ExchangeType?: SynchronizeTypeEnum): void; readonly TableDefs: TableDefs; readonly Transactions: boolean; readonly Updatable: boolean; readonly Version: string; } - class Databases { - private 'DAO.Databases_typekey': Databases; - private constructor(); + interface Databases { readonly Count: number; - Item(Item: any): Database; + Item(Item: number | string): Database; Refresh(): void; + (Item: number | string): Database; } class DBEngine { @@ -404,26 +423,51 @@ declare namespace DAO { private constructor(); BeginTrans(): void; - /** @param number [Option=0] */ + /** @param Option [Option=0] */ CommitTrans(Option?: number): void; - CompactDatabase(SrcName: string, DstName: string, DstLocale?: any, Options?: any, SrcLocale?: any): void; - CreateDatabase(Name: string, Locale: string, Option?: any): Database; - CreateWorkspace(Name: string, UserName: string, Password: string, UseType?: any): Workspace; + + /** + * Compact a closed database + * + * @param DstLocale Specify one of the following: + * * the locale, using one of the language constants + * * the password, in the form `;pwd=MyNewPassword'` + * * both the constant and a password, e.g. `dbLangGreek + ';pwd=MyNewPassword'` + * + * @param Options `dbEncrypt` and `dbDecrypt` are deprecated, and unsupported for ACCDB + * @param password Deprecated, and unsupported for ACCDB + */ + CompactDatabase(SrcName: string, DstName: string, DstLocale?: LanguageConstants | string, Options?: DatabaseTypeEnum, password?: string): void; + + /** + * @param Locale Specify one of the following: + * * the locale, using one of the language constants + * * the password, in the form `;pwd=MyNewPassword'` + * * both the constant and a password, e.g. `dbLangGreek + ';pwd=MyNewPassword'` + */ + CreateDatabase(Name: string, Locale: LanguageConstants | string, Option?: DatabaseTypeEnum): Database; + CreateWorkspace(Name: string, UserName: string, Password: string, UseType?: WorkspaceTypeEnum): Workspace; readonly DefaultPassword: string; DefaultType: number; readonly DefaultUser: string; readonly Errors: Errors; - Idle(Action?: any): void; + Idle(Action?: IdleEnum): void; IniPath: string; - ISAMStats(StatNum: number, Reset?: any): number; + + /** Returns various statistics from the Jet engine */ + ISAMStats(StatNum: ISAMStatsEnum, Reset?: boolean): number; LoginTimeout: number; - OpenConnection(Name: string, Options?: any, ReadOnly?: any, Connect?: any): Connection; - OpenDatabase(Name: string, Options?: any, ReadOnly?: any, Connect?: any): Database; + + /** + * @param Connect ODBC connection string; prepend with `ODBC;` + */ + OpenConnection(Name: string, Options?: DriverPromptEnum | RecordsetOptionEnum.dbRunAsync, ReadOnly?: boolean, Connect?: string): Connection; + OpenDatabase(Name: string, Exclusive?: boolean, ReadOnly?: boolean, Connect?: string): Database; readonly Properties: Properties; RegisterDatabase(Dsn: string, Driver: string, Silent: boolean, Attributes: string): void; RepairDatabase(Name: string): void; Rollback(): void; - SetOption(Option: number, Value: any): void; + SetOption(Option: SetOptionEnum, Value: any): void; SystemDB: string; readonly Version: string; readonly Workspaces: Workspaces; @@ -434,9 +478,9 @@ declare namespace DAO { private constructor(); readonly AllPermissions: number; readonly Container: string; - CreateProperty(Name?: any, Type?: any, Value?: any, DDL?: any): Property; - readonly DateCreated: any; - readonly LastUpdated: any; + CreateProperty(Name?: string, Type?: DataTypeEnum, Value?: any, DDL?: boolean): Property; + readonly DateCreated: VarDate; + readonly LastUpdated: VarDate; readonly Name: string; Owner: string; Permissions: number; @@ -444,12 +488,11 @@ declare namespace DAO { UserName: string; } - class Documents { - private 'DAO.Documents_typekey': Documents; - private constructor(); + interface Documents { readonly Count: number; - Item(Item: any): Document; + Item(Item: number | string): Document; Refresh(): void; + (Item: number | string): Document; } class Error { @@ -462,33 +505,38 @@ declare namespace DAO { readonly Source: string; } - class Errors { - private 'DAO.Errors_typekey': Errors; - private constructor(); + interface Errors { readonly Count: number; Item(Item: any): Error; Refresh(): void; + (Item: any): Error; } class Field { - private 'DAO.Field_typekey': Field; private constructor(); + private 'DAO.Field2_typekey': Field; AllowZeroLength: boolean; AppendChunk(Val: any): void; + AppendOnly: boolean; Attributes: number; readonly CollatingOrder: number; readonly CollectionIndex: number; - CreateProperty(Name?: any, Type?: any, Value?: any, DDL?: any): Property; + readonly ComplexType: ComplexType; + CreateProperty(Name?: string, Type?: DataTypeEnum, Value?: any, DDL?: boolean): Property; readonly DataUpdatable: boolean; DefaultValue: any; + Expression: string; readonly FieldSize: number; ForeignName: string; GetChunk(Offset: number, Bytes: number): any; + readonly IsComplex: boolean; + LoadFromFile(FileName: string): void; Name: string; OrdinalPosition: number; readonly OriginalValue: any; readonly Properties: Properties; Required: boolean; + SaveToFile(FileName: string): void; Size: number; readonly SourceField: string; readonly SourceTable: string; @@ -500,44 +548,42 @@ declare namespace DAO { readonly VisibleValue: any; } - class Fields { - private 'DAO.Fields_typekey': Fields; - private constructor(); - Append(Object: any): void; + interface Fields { + Append(Field: Field): void; readonly Count: number; Delete(Name: string): void; - Item(Item: any): Field; + Item(Item: number | string): Field; Refresh(): void; + (Item: number | string): Field; } class Group { private 'DAO.Group_typekey': Group; private constructor(); - CreateUser(Name?: any, PID?: any, Password?: any): User; + CreateUser(Name?: string, PID?: string, Password?: string): User; Name: string; readonly PID: string; readonly Properties: Properties; readonly Users: Users; } - class Groups { - private 'DAO.Groups_typekey': Groups; - private constructor(); - Append(Object: any): void; + interface Groups { + Append(Group: Group): void; readonly Count: number; Delete(Name: string): void; - Item(Item: any): Group; + Item(Item: number | string): Group; Refresh(): void; + (Item: number | string): Group; } class Index { private 'DAO.Index_typekey': Index; private constructor(); Clustered: boolean; - CreateField(Name?: any, Type?: any, Size?: any): Field; - CreateProperty(Name?: any, Type?: any, Value?: any, DDL?: any): Property; + CreateField(Name?: string): Field; + CreateProperty(Name?: string, Type?: DataTypeEnum, Value?: any, DDL?: boolean): Property; readonly DistinctCount: number; - Fields: any; + Fields: Fields; readonly Foreign: boolean; IgnoreNulls: boolean; Name: string; @@ -547,14 +593,14 @@ declare namespace DAO { Unique: boolean; } - class Indexes { - private 'DAO.Indexes_typekey': Indexes; - private constructor(); - Append(Object: any): void; + // tslint:disable-next-line:interface-name + interface Indexes { + Append(Index: Index): void; readonly Count: number; Delete(Name: string): void; - Item(Item: any): Index; + Item(Item: number | string): Index; Refresh(): void; + (Item: number | string): Index; } class Parameter { @@ -567,53 +613,20 @@ declare namespace DAO { Value: any; } - class Parameters { - private 'DAO.Parameters_typekey': Parameters; - private constructor(); + interface Parameters { readonly Count: number; - Item(Item: any): Parameter; + Item(Item: number | string): Parameter; Refresh(): void; + (Item: number | string): Parameter; } - /** DAO 3.0 DBEngine (private) */ - class PrivDBEngine { - private 'DAO.PrivDBEngine_typekey': PrivDBEngine; - private constructor(); - BeginTrans(): void; - - /** @param number [Option=0] */ - CommitTrans(Option?: number): void; - CompactDatabase(SrcName: string, DstName: string, DstLocale?: any, Options?: any, SrcLocale?: any): void; - CreateDatabase(Name: string, Locale: string, Option?: any): Database; - CreateWorkspace(Name: string, UserName: string, Password: string, UseType?: any): Workspace; - readonly DefaultPassword: string; - DefaultType: number; - readonly DefaultUser: string; - readonly Errors: Errors; - Idle(Action?: any): void; - IniPath: string; - ISAMStats(StatNum: number, Reset?: any): number; - LoginTimeout: number; - OpenConnection(Name: string, Options?: any, ReadOnly?: any, Connect?: any): Connection; - OpenDatabase(Name: string, Options?: any, ReadOnly?: any, Connect?: any): Database; - readonly Properties: Properties; - RegisterDatabase(Dsn: string, Driver: string, Silent: boolean, Attributes: string): void; - RepairDatabase(Name: string): void; - Rollback(): void; - SetOption(Option: number, Value: any): void; - SystemDB: string; - readonly Version: string; - readonly Workspaces: Workspaces; - } - - class Properties { - private 'DAO.Properties_typekey': Properties; - private constructor(); - Append(Object: any): void; + interface Properties { + Append(Property: Property): void; readonly Count: number; Delete(Name: string): void; - Item(Item: any): Property; + Item(Item: number | string): Property; Refresh(): void; + (Item: number | string): Property; } class Property { @@ -633,81 +646,78 @@ declare namespace DAO { Cancel(): void; Close(): void; Connect: string; - CreateProperty(Name?: any, Type?: any, Value?: any, DDL?: any): Property; - readonly DateCreated: any; - Execute(Options?: any): void; + CreateProperty(Name?: string, Type?: DataTypeEnum, Value?: any, DDL?: boolean): Property; + readonly DateCreated: VarDate; + Execute(Options?: RecordsetOptionEnum): void; readonly Fields: Fields; readonly hStmt: number; - readonly LastUpdated: any; + readonly LastUpdated: VarDate; MaxRecords: number; Name: string; ODBCTimeout: number; - OpenRecordset(Type?: any, Options?: any, LockEdit?: any): Recordset; + OpenRecordset(Type?: RecordsetTypeEnum, Options?: RecordsetOptionEnum, LockEdit?: LockTypeEnum): Recordset; readonly Parameters: Parameters; - Prepare: any; + Prepare: QueryDefStateEnum; readonly Properties: Properties; readonly RecordsAffected: number; ReturnsRecords: boolean; SQL: string; readonly StillExecuting: boolean; - readonly Type: number; + readonly Type: QueryDefTypeEnum; readonly Updatable: boolean; } - class QueryDefs { - private 'DAO.QueryDefs_typekey': QueryDefs; - private constructor(); - Append(Object: any): void; + interface QueryDefs { + Append(QueryDef: QueryDef): void; readonly Count: number; Delete(Name: string): void; - Item(Item: any): QueryDef; + Item(Item: number | string): QueryDef; Refresh(): void; + (Item: number | string): QueryDef; } - class Recordset { - private 'DAO.Recordset_typekey': Recordset; - private constructor(); + interface Recordset { AbsolutePosition: number; AddNew(): void; readonly BatchCollisionCount: number; - readonly BatchCollisions: any; + readonly BatchCollisions: SafeArray; BatchSize: number; readonly BOF: boolean; - Bookmark: SafeArray; + Bookmark: Bookmark; readonly Bookmarkable: boolean; CacheSize: number; - CacheStart: SafeArray; + CacheStart: Bookmark; Cancel(): void; - /** @param number [UpdateType=1] */ + /** @param UpdateType [UpdateType=1] */ CancelUpdate(UpdateType?: number): void; Clone(): Recordset; Close(): void; Collect(Item: any): any; Connection: Connection; CopyQueryDef(): QueryDef; - readonly DateCreated: any; + readonly DateCreated: VarDate; Delete(): void; Edit(): void; - readonly EditMode: number; + readonly EditMode: EditModeEnum; readonly EOF: boolean; readonly Fields: Fields; - FillCache(Rows?: any, StartBookmark?: any): void; + FillCache(Rows?: number, StartBookmark?: string): void; Filter: string; FindFirst(Criteria: string): void; FindLast(Criteria: string): void; FindNext(Criteria: string): void; FindPrevious(Criteria: string): void; - GetRows(NumRows?: any): any; + GetRows(NumRows?: number): any; readonly hStmt: number; Index: string; - readonly LastModified: SafeArray; - readonly LastUpdated: any; + readonly LastModified: Bookmark; + readonly LastUpdated: VarDate; LockEdits: boolean; - Move(Rows: number, StartBookmark?: any): void; + Move(Rows: number, StartBookmark?: Bookmark): void; MoveFirst(): void; - /** @param number [Options=0] */ + /** @param Options [Options=0] */ MoveLast(Options?: number): void; MoveNext(): void; MovePrevious(): void; @@ -716,45 +726,44 @@ declare namespace DAO { readonly NoMatch: boolean; readonly ODBCFetchCount: number; readonly ODBCFetchDelay: number; - OpenRecordset(Type?: any, Options?: any): Recordset; + OpenRecordset(Type?: RecordsetTypeEnum, Options?: RecordsetOptionEnum): Recordset; readonly Parent: Database; PercentPosition: number; readonly Properties: Properties; readonly RecordCount: number; readonly RecordStatus: number; - Requery(NewQueryDef?: any): void; + Requery(NewQueryDef?: QueryDef): void; readonly Restartable: boolean; - Seek( - Comparison: string, Key1: any, Key2?: any, Key3?: any, Key4?: any, Key5?: any, Key6?: any, Key7?: any, Key8?: any, Key9?: any, Key10?: any, Key11?: any, Key12?: any, Key13?: any): void; + Seek(Comparison: string, Key1: any, Key2?: any, Key3?: any, Key4?: any, Key5?: any, Key6?: any, Key7?: any, Key8?: any, Key9?: any, Key10?: any, Key11?: any, Key12?: any, Key13?: any): void; Sort: string; readonly StillExecuting: boolean; readonly Transactions: boolean; - readonly Type: number; + readonly Type: RecordsetTypeEnum; readonly Updatable: boolean; /** - * @param number [UpdateType=1] - * @param boolean [Force=false] + * @param UpdateType [UpdateType=1] + * @param Force [Force=false] */ - Update(UpdateType?: number, Force?: boolean): void; - UpdateOptions: number; + Update(UpdateType?: UpdateTypeEnum, Force?: boolean): void; + UpdateOptions: UpdateCriteriaEnum; readonly ValidationRule: string; readonly ValidationText: string; + (FieldIndex: number | string): Field; } - class Recordsets { - private 'DAO.Recordsets_typekey': Recordsets; - private constructor(); + interface Recordsets { readonly Count: number; - Item(Item: any): Recordset; + Item(Item: number | string): Recordset; Refresh(): void; + (Item: number | string): Recordset; } class Relation { private 'DAO.Relation_typekey': Relation; private constructor(); - Attributes: number; - CreateField(Name?: any, Type?: any, Size?: any): Field; + Attributes: RelationAttributeEnum; + CreateField(Name?: string): Field; readonly Fields: Fields; ForeignTable: string; Name: string; @@ -763,55 +772,53 @@ declare namespace DAO { Table: string; } - class Relations { - private 'DAO.Relations_typekey': Relations; - private constructor(); - Append(Object: any): void; + interface Relations { + Append(Relation: Relation): void; readonly Count: number; Delete(Name: string): void; - Item(Item: any): Relation; + Item(Item: number | string): Relation; Refresh(): void; + (Item: number | string): Relation; } class TableDef { private 'DAO.TableDef_typekey': TableDef; private constructor(); - Attributes: number; + Attributes: TableDefAttributeEnum; readonly ConflictTable: string; Connect: string; - CreateField(Name?: any, Type?: any, Size?: any): Field; - CreateIndex(Name?: any): Index; - CreateProperty(Name?: any, Type?: any, Value?: any, DDL?: any): Property; - readonly DateCreated: any; + CreateField(Name?: string, Type?: DataTypeEnum, Size?: number): Field; + CreateIndex(Name?: string): Index; + CreateProperty(Name?: string, Type?: DataTypeEnum, Value?: any, DDL?: boolean): Property; + readonly DateCreated: VarDate; readonly Fields: Fields; readonly Indexes: Indexes; - readonly LastUpdated: any; + readonly LastUpdated: VarDate; Name: string; - OpenRecordset(Type?: any, Options?: any): Recordset; + OpenRecordset(Type?: RecordsetTypeEnum, Options?: RecordsetOptionEnum): Recordset; readonly Properties: Properties; readonly RecordCount: number; RefreshLink(): void; - ReplicaFilter: any; + ReplicaFilter: string | boolean; SourceTableName: string; readonly Updatable: boolean; ValidationRule: string; ValidationText: string; } - class TableDefs { - private 'DAO.TableDefs_typekey': TableDefs; - private constructor(); - Append(Object: any): void; + interface TableDefs { + Append(TableDef: TableDef): void; readonly Count: number; Delete(Name: string): void; - Item(Item: any): TableDef; + Item(Item: number | string): TableDef; Refresh(): void; + (Item: number | string): TableDef; } class User { private 'DAO.User_typekey': User; private constructor(); - CreateGroup(Name?: any, PID?: any): Group; + CreateGroup(Name?: string, PID?: string): Group; readonly Groups: Groups; Name: string; NewPassword(bstrOld: string, bstrNew: string): void; @@ -820,14 +827,13 @@ declare namespace DAO { readonly Properties: Properties; } - class Users { - private 'DAO.Users_typekey': Users; - private constructor(); - Append(Object: any): void; + interface Users { + Append(User: User): void; readonly Count: number; Delete(Name: string): void; - Item(Item: any): User; + Item(Item: number | string): User; Refresh(): void; + (Item: number | string): User; } class Workspace { @@ -836,12 +842,19 @@ declare namespace DAO { BeginTrans(): void; Close(): void; - /** @param number [Options=0] */ + /** @param Options [Options=0] */ CommitTrans(Options?: number): void; readonly Connections: Connections; - CreateDatabase(Name: string, Connect: string, Option?: any): Database; - CreateGroup(Name?: any, PID?: any): Group; - CreateUser(Name?: any, PID?: any, Password?: any): User; + + /** + * @param Connect Specify one of the following: + * * the locale, using one of the language constants + * * the password, in the form `;pwd=MyNewPassword'` + * * both the constant and a password, e.g. `dbLangGreek + ';pwd=MyNewPassword'` + */ + CreateDatabase(Name: string, Connect: string, Option?: DatabaseTypeEnum): Database; + CreateGroup(Name?: string, PID?: string): Group; + CreateUser(Name?: string, PID?: string, Password?: string): User; readonly Databases: Databases; DefaultCursorDriver: number; readonly Groups: Groups; @@ -849,8 +862,12 @@ declare namespace DAO { IsolateODBCTrans: number; LoginTimeout: number; Name: string; - OpenConnection(Name: string, Options?: any, ReadOnly?: any, Connect?: any): Connection; - OpenDatabase(Name: string, Options?: any, ReadOnly?: any, Connect?: any): Database; + + /** + * @param Connect ODBC connection string; prepend with `ODBC;` + */ + OpenConnection(Name: string, Options?: DriverPromptEnum | RecordsetOptionEnum.dbRunAsync, ReadOnly?: boolean, Connect?: string): Connection; + OpenDatabase(Name: string, Exclusive?: boolean, ReadOnly?: boolean, Connect?: string): Database; readonly Properties: Properties; Rollback(): void; readonly Type: number; @@ -858,53 +875,24 @@ declare namespace DAO { readonly Users: Users; } - class Workspaces { - private 'DAO.Workspaces_typekey': Workspaces; - private constructor(); - Append(Object: any): void; + interface Workspaces { + Append(Workspace: Workspace): void; readonly Count: number; Delete(Name: string): void; - Item(Item: any): Workspace; + Item(Item: number | string): Workspace; Refresh(): void; + (Item: number | string): Workspace; } } -interface ActiveXObject { - new(progid: K): ActiveXObjectNameMap[K]; -} - interface ActiveXObjectNameMap { 'DAO.DBEngine': DAO.DBEngine; - 'DAO.DBEngine.120': DAO.DBEngine; 'DAO.Field': DAO.Field; 'DAO.Group': DAO.Group; 'DAO.Index': DAO.Index; - 'DAO.PrivateDBEngine': DAO.PrivDBEngine; + 'DAO.PrivateDBEngine': DAO.DBEngine; 'DAO.QueryDef': DAO.QueryDef; 'DAO.Relation': DAO.Relation; 'DAO.TableDef': DAO.TableDef; 'DAO.User': DAO.User; } - -interface EnumeratorConstructor { - new(col: DAO.Connections): Enumerator; - new(col: DAO.Containers): Enumerator; - new(col: DAO.Databases): Enumerator; - new(col: DAO.Documents): Enumerator; - new(col: DAO.Errors): Enumerator; - new(col: DAO.Fields): Enumerator; - new(col: DAO.Groups): Enumerator; - new(col: DAO.Indexes): Enumerator; - new(col: DAO.Parameters): Enumerator; - new(col: DAO.Properties): Enumerator; - new(col: DAO.QueryDefs): Enumerator; - new(col: DAO.Recordsets): Enumerator; - new(col: DAO.Relations): Enumerator; - new(col: DAO.TableDefs): Enumerator; - new(col: DAO.Users): Enumerator; - new(col: DAO.Workspaces): Enumerator; -} - -interface SafeArray { - _brand: SafeArray; -} diff --git a/types/activex-dao/tsconfig.json b/types/activex-dao/tsconfig.json index 2ddea247b9..e9d00e61e1 100644 --- a/types/activex-dao/tsconfig.json +++ b/types/activex-dao/tsconfig.json @@ -2,8 +2,7 @@ "compilerOptions": { "module": "commonjs", "lib": [ - "es5", - "scripthost" + "es5" ], "noImplicitAny": true, "noImplicitThis": true, diff --git a/types/activex-diskquota/index.d.ts b/types/activex-diskquota/index.d.ts index d27863de3c..71b534ee0c 100644 --- a/types/activex-diskquota/index.d.ts +++ b/types/activex-diskquota/index.d.ts @@ -2,7 +2,9 @@ // Project: https://msdn.microsoft.com/en-us/library/windows/desktop/bb773938(v=vs.85).aspx // Definitions by: Zev Spitz // Definitions: https://github.com/DefinitelyTyped/DefinitelyTyped -// TypeScript Version: 2.5 +// TypeScript Version: 2.6 + +/// declare namespace DiskQuotaTypeLibrary { // tslint:disable-next-line no-const-enum @@ -136,7 +138,6 @@ interface ActiveXObject { on( obj: DiskQuotaTypeLibrary.DiskQuotaControl, event: 'OnUserNameChanged', argNames: ['pUser'], handler: ( this: DiskQuotaTypeLibrary.DiskQuotaControl, parameter: {readonly pUser: DiskQuotaTypeLibrary.DIDiskQuotaUser}) => void): void; - new(progid: K): ActiveXObjectNameMap[K]; } interface ActiveXObjectNameMap { @@ -146,7 +147,3 @@ interface ActiveXObjectNameMap { interface EnumeratorConstructor { new(col: DiskQuotaTypeLibrary.DiskQuotaControl): Enumerator; } - -interface SafeArray { - _brand: SafeArray; -} diff --git a/types/activex-diskquota/tsconfig.json b/types/activex-diskquota/tsconfig.json index 597d998a96..ce9b55800d 100644 --- a/types/activex-diskquota/tsconfig.json +++ b/types/activex-diskquota/tsconfig.json @@ -2,8 +2,7 @@ "compilerOptions": { "module": "commonjs", "lib": [ - "es5", - "scripthost" + "es5" ], "noImplicitAny": true, "noImplicitThis": true, diff --git a/types/activex-excel/activex-excel-tests.ts b/types/activex-excel/activex-excel-tests.ts index b93a924263..4f6fab3aa1 100644 --- a/types/activex-excel/activex-excel-tests.ts +++ b/types/activex-excel/activex-excel-tests.ts @@ -1,11 +1,12 @@ +/// /// /// // some helpers const toSafeArray = (...items: T[]): SafeArray => { - const dict = new ActiveXObject('Scripting.Dictionary'); + const dict: Scripting.Dictionary = new ActiveXObject('Scripting.Dictionary'); items.forEach((x, index) => dict.Add(index, x)); - return dict.Items() as SafeArray; + return dict.Items(); }; const inCollection = (collection: { Item(index: any): T }, index: string | number): T | undefined => { let item: T | undefined; @@ -279,7 +280,7 @@ const setColumnVisibility = (visible: boolean) => { const data = sheet.Range("L2", sheet.Range('L100').End(Excel.XlDirection.xlUp)).Value() as SafeArray; sheet.Range('L1', sheet.Range('L100').End(Excel.XlDirection.xlUp)).ClearContents(); - const combobox = sheet.OLEObjects('ComboBox1').Object as MSForms.ComboBox2; + const combobox = sheet.OLEObjects('ComboBox1').Object as MSForms.ComboBox; combobox.Clear(); ActiveXObject.set(combobox, 'List', [], data); combobox.ListIndex = -1; @@ -293,13 +294,19 @@ const setColumnVisibility = (visible: boolean) => { const dict = new ActiveXObject('Scripting.Dictionary'); arr.forEach(x => ActiveXObject.set(dict, 'Item', [x], true)); - const combobox = sheet.OLEObjects('ComboBox1').Object as MSForms.ComboBox2; + const combobox = sheet.OLEObjects('ComboBox1').Object as MSForms.ComboBox; combobox.Clear(); - const enumerator = new Enumerator(dict.Items()); + + // iterate over keys using Enumerator + const enumerator = new Enumerator(dict); enumerator.moveFirst(); while (!enumerator.atEnd()) { combobox.AddItem(enumerator.item()); + enumerator.moveNext(); } + + // alternatively, make a JS array out of the keys, and iterate using forEach + // new VBArray(dict.Keys()).toArray().forEach(x => combobox.AddItem(x)); })(); })(); diff --git a/types/activex-excel/index.d.ts b/types/activex-excel/index.d.ts index cdf2a79551..c55bfe1c42 100644 --- a/types/activex-excel/index.d.ts +++ b/types/activex-excel/index.d.ts @@ -9723,7 +9723,6 @@ interface ActiveXObject { set(obj: Excel.Workbook, propertyName: 'Colors', parameterTypes: [any], newValue: any): void; set(obj: Excel.Range, propertyName: 'Value', parameterTypes: [Excel.XlRangeValueDataType], newValue: any): void; set(obj: Excel.Range, propertyName: 'Value', newValue: any): void; // because Value is defined on the type as a method, not a property - new (progid: K): ActiveXObjectNameMap[K]; } interface ActiveXObjectNameMap { diff --git a/types/activex-excel/tsconfig.json b/types/activex-excel/tsconfig.json index 244ab1d0ef..0b346a4a25 100644 --- a/types/activex-excel/tsconfig.json +++ b/types/activex-excel/tsconfig.json @@ -2,8 +2,7 @@ "compilerOptions": { "module": "commonjs", "lib": [ - "es5", - "scripthost" + "es5" ], "noImplicitAny": true, "noImplicitThis": true, diff --git a/types/activex-faxcomexlib/activex-faxcomexlib-tests.ts b/types/activex-faxcomexlib/activex-faxcomexlib-tests.ts index ef3e403998..ae9edbe8c9 100644 --- a/types/activex-faxcomexlib/activex-faxcomexlib-tests.ts +++ b/types/activex-faxcomexlib/activex-faxcomexlib-tests.ts @@ -1,6 +1,7 @@ -/// +/// +/// -const collectionToArray = (col: { Item(index: any): T } | SafeArray) => { +const collectionToArray = (col: { Item(index: any): T }): T[] => { const results: T[] = []; const enumerator = new Enumerator(col); enumerator.moveFirst(); @@ -12,9 +13,9 @@ const collectionToArray = (col: { Item(index: any): T } | SafeArray) => { }; const toSafeArray = (...items: T[]): SafeArray => { - const dict = new ActiveXObject('Scripting.Dictionary'); + const dict: Scripting.Dictionary = new ActiveXObject('Scripting.Dictionary'); items.forEach((x, index) => dict.Add(index, x)); - return dict.Items() as SafeArray; + return dict.Items(); }; const VB = { @@ -422,7 +423,7 @@ the job? document.GroupBroadcastReceipts = true; const jobIDs = document.Submit(''); - collectionToArray(jobIDs).forEach(jobID => WScript.Echo(`The job ID is ${jobID}`)); + new VBArray(jobIDs).toArray().forEach(jobID => WScript.Echo(`The job ID is ${jobID}`)); while (recipients.Count > 0) { recipients.Remove(1); diff --git a/types/activex-faxcomexlib/index.d.ts b/types/activex-faxcomexlib/index.d.ts index d4078061f7..ffd2412ef3 100644 --- a/types/activex-faxcomexlib/index.d.ts +++ b/types/activex-faxcomexlib/index.d.ts @@ -2011,7 +2011,6 @@ interface ActiveXObject { this: FAXCOMEXLib.FaxServer, parameter: {readonly riid: stdole.GUID, ppvObj: undefined}) => void): void; on(obj: FAXCOMEXLib.FaxAccount, event: 'AddRef' | 'Release', handler: (this: FAXCOMEXLib.FaxAccount, parameter: {}) => void): void; on(obj: FAXCOMEXLib.FaxServer, event: 'AddRef' | 'Release', handler: (this: FAXCOMEXLib.FaxServer, parameter: {}) => void): void; - new(progid: K): ActiveXObjectNameMap[K]; } interface ActiveXObjectNameMap { diff --git a/types/activex-faxcomexlib/tsconfig.json b/types/activex-faxcomexlib/tsconfig.json index 6509ab4701..8443d46f26 100644 --- a/types/activex-faxcomexlib/tsconfig.json +++ b/types/activex-faxcomexlib/tsconfig.json @@ -2,8 +2,7 @@ "compilerOptions": { "module": "commonjs", "lib": [ - "es5", - "scripthost" + "es5" ], "noImplicitAny": true, "noImplicitThis": true, diff --git a/types/activex-infopath/index.d.ts b/types/activex-infopath/index.d.ts index 1aa8cba2f9..9cace4ec2e 100644 --- a/types/activex-infopath/index.d.ts +++ b/types/activex-infopath/index.d.ts @@ -2,7 +2,7 @@ // Project: https://msdn.microsoft.com/en-us/library/jj602751.aspx // Definitions by: Zev Spitz // Definitions: https://github.com/DefinitelyTyped/DefinitelyTyped -// TypeScript Version: 2.3 +// TypeScript Version: 2.6 /// /// @@ -1168,7 +1168,6 @@ interface ActiveXObject { on(obj: InfoPath.Button, event: 'AddRef' | 'Release', handler: (this: InfoPath.Button, parameter: {}) => void): void; on(obj: InfoPath.DataDOM, event: 'AddRef' | 'Release', handler: (this: InfoPath.DataDOM, parameter: {}) => void): void; on(obj: InfoPath.XDocument, event: 'AddRef' | 'Release', handler: (this: InfoPath.XDocument, parameter: {}) => void): void; - new(progid: K): ActiveXObjectNameMap[K]; } interface ActiveXObjectNameMap { diff --git a/types/activex-infopath/tsconfig.json b/types/activex-infopath/tsconfig.json index 6feef8496c..db2712e264 100644 --- a/types/activex-infopath/tsconfig.json +++ b/types/activex-infopath/tsconfig.json @@ -2,8 +2,7 @@ "compilerOptions": { "module": "commonjs", "lib": [ - "es5", - "scripthost" + "es5" ], "noImplicitAny": true, "noImplicitThis": true, diff --git a/types/activex-interop/activex-interop-tests.ts b/types/activex-interop/activex-interop-tests.ts new file mode 100644 index 0000000000..06c73aa952 --- /dev/null +++ b/types/activex-interop/activex-interop-tests.ts @@ -0,0 +1,20 @@ +/// + +const dict: Scripting.Dictionary = new ActiveXObject('Scripting.Dictionary'); +dict.Add('one', 1); +dict.Add('two', 2); +dict.Add('three', 3); + +const keyEnumerator = new Enumerator(dict); +keyEnumerator.moveFirst(); +while (!keyEnumerator.atEnd()) { + const item = dict(keyEnumerator.item()); + const power = Math.pow(item, 2); +} + +const keysArray = new VBArray(dict.Keys()).toArray(); +const itemsArray = new VBArray(dict.Items()).toArray(); +for (let i = 0; i < keysArray.length; i++) { + const key = keysArray[i]; + const item = itemsArray[i]; +} diff --git a/types/activex-interop/index.d.ts b/types/activex-interop/index.d.ts new file mode 100644 index 0000000000..3bb13a5351 --- /dev/null +++ b/types/activex-interop/index.d.ts @@ -0,0 +1,111 @@ +// Type definitions for Javascript Automation interop 0.0 +// Project: https://msdn.microsoft.com/en-us/library/ff521046(v=vs.85).aspx +// Definitions by: Zev Spitz +// Definitions: https://github.com/DefinitelyTyped/DefinitelyTyped +// TypeScript Version: 2.6 + +// tslint:disable-next-line no-empty-interface +interface ActiveXObjectNameMap { } + +interface ActiveXObject { + new (progid: K): ActiveXObjectNameMap[K]; + new(s: string): any; +} +declare var ActiveXObject: ActiveXObject; + +/** + * Represents an Automation SAFEARRAY + */ +declare class SafeArray { + private constructor(); + private SafeArray_typekey: SafeArray; +} + +/** + * Allows enumerating over a COM collection, which may not have indexed item access. + */ +interface Enumerator { + /** + * Returns true if the current item is the last one in the collection, or the collection is empty, + * or the current item is undefined. + */ + atEnd(): boolean; + + /** + * Returns the current item in the collection + */ + item(): T; + + /** + * Resets the current item in the collection to the first item. If there are no items in the collection, + * the current item is set to undefined. + */ + moveFirst(): void; + + /** + * Moves the current item to the next item in the collection. If the enumerator is at the end of + * the collection or the collection is empty, the current item is set to undefined. + */ + moveNext(): void; +} + +interface EnumeratorConstructor { + new (collection: { Item(index: any): T }): Enumerator; + // new (collection: any): Enumerator; +} + +declare var Enumerator: EnumeratorConstructor; + +/** + * Enables reading from a COM safe array, which might have an alternate lower bound, or multiple dimensions. + */ +interface VBArray { + /** + * Returns the number of dimensions (1-based). + */ + dimensions(): number; + + /** + * Takes an index for each dimension in the array, and returns the item at the corresponding location. + */ + getItem(dimension1Index: number, ...dimensionNIndexes: number[]): T; + + /** + * Returns the smallest available index for a given dimension. + * @param dimension 1-based dimension (defaults to 1) + */ + lbound(dimension?: number): number; + + /** + * Returns the largest available index for a given dimension. + * @param dimension 1-based dimension (defaults to 1) + */ + ubound(dimension?: number): number; + + /** + * Returns a Javascript array with all the elements in the VBArray. If there are multiple dimensions, + * each successive dimension is appended to the end of the array. + * Example: [[1,2,3],[4,5,6]] becomes [1,2,3,4,5,6] + */ + toArray(): T[]; +} + +interface VBArrayConstructor { + new (safeArray: SafeArray): VBArray; +} + +declare var VBArray: VBArrayConstructor; + +/** Automation date (VT_DATE) */ +declare class VarDate { + private constructor(); + private VarDate_typekey: VarDate; +} + +interface DateConstructor { + new(vd: VarDate): Date; +} + +interface Date { + getVarDate: () => VarDate; +} diff --git a/types/activex-interop/tsconfig.json b/types/activex-interop/tsconfig.json new file mode 100644 index 0000000000..49c7698384 --- /dev/null +++ b/types/activex-interop/tsconfig.json @@ -0,0 +1,21 @@ +{ + "compilerOptions": { + "module": "commonjs", + "lib": [ + "es5" + ], + "noImplicitAny": true, + "noImplicitThis": true, + "strictNullChecks": true, + "strictFunctionTypes": true, + "baseUrl": "../", + "typeRoots": [ "../"], + "types": [], + "noEmit": true, + "forceConsistentCasingInFileNames": true + }, + "files": [ + "index.d.ts", + "activex-interop-tests.ts" + ] +} \ No newline at end of file diff --git a/types/activex-interop/tslint.json b/types/activex-interop/tslint.json new file mode 100644 index 0000000000..e60c15844f --- /dev/null +++ b/types/activex-interop/tslint.json @@ -0,0 +1,3 @@ +{ + "extends": "dtslint/dt.json" +} \ No newline at end of file diff --git a/types/activex-iwshruntimelibrary/activex-iwshruntimelibrary-tests.ts b/types/activex-iwshruntimelibrary/activex-iwshruntimelibrary-tests.ts index 14a90f9a8a..67efbd3eca 100644 --- a/types/activex-iwshruntimelibrary/activex-iwshruntimelibrary-tests.ts +++ b/types/activex-iwshruntimelibrary/activex-iwshruntimelibrary-tests.ts @@ -1,3 +1,16 @@ +/// + +const collectionToArray = (col: { Item(key: any): T }): T[] => { + const results: T[] = []; + const enumerator = new Enumerator(col); + enumerator.moveFirst(); + while (!enumerator.atEnd()) { + results.push(enumerator.item()); + enumerator.moveNext(); + } + return results; +}; + const wshn = new ActiveXObject('WScript.Network'); // https://msdn.microsoft.com/en-us/library/s6wt333f(v=vs.84).aspx diff --git a/types/activex-iwshruntimelibrary/index.d.ts b/types/activex-iwshruntimelibrary/index.d.ts index d5b052eaae..fad992e185 100644 --- a/types/activex-iwshruntimelibrary/index.d.ts +++ b/types/activex-iwshruntimelibrary/index.d.ts @@ -1,14 +1,15 @@ -// Type definitions for Windows Script Host Object Model - IWshRuntimeLibrary 1.0 -// Project: https://msdn.microsoft.com/en-us/library/9bbdkx3k(v=vs.84).aspx +// Type definitions for Windows Script Host Runtime Object Model 0.0 +// Project: https://msdn.microsoft.com/en-us/library/9bbdkx3k.aspx // Definitions by: Zev Spitz // Definitions: https://github.com/DefinitelyTyped/DefinitelyTyped // TypeScript Version: 2.6 +/// + declare namespace IWshRuntimeLibrary { type WindowStyle = 0 | 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 10; type ShortcutWindowStyle = 1 | 3 | 7; - // tslint:disable-next-line no-const-enum const enum ButtonType { OK, OKCancel, @@ -19,7 +20,6 @@ declare namespace IWshRuntimeLibrary { CancelTryagainContinue } - // tslint:disable-next-line no-const-enum const enum EventType { AuditFailure = 5, AuditSuccess = 4, @@ -29,7 +29,6 @@ declare namespace IWshRuntimeLibrary { Warning = 2 } - // tslint:disable-next-line no-const-enum const enum IconType { Stop = 16, QuestionMark = 32, @@ -37,7 +36,6 @@ declare namespace IWshRuntimeLibrary { InformationMark = 64, } - // tslint:disable-next-line no-const-enum const enum PopupType { SecondButtonDefault = 256, ThirdButtonDefault = 512, @@ -46,7 +44,6 @@ declare namespace IWshRuntimeLibrary { RTL = 1048576, } - // tslint:disable-next-line no-const-enum const enum PopupSelection { NoButton = -1, OK = 1, @@ -60,14 +57,12 @@ declare namespace IWshRuntimeLibrary { Continue = 11, } - // tslint:disable-next-line no-const-enum const enum WshExecStatus { WshFailed = 2, WshFinished = 1, WshRunning = 0, } - // tslint:disable-next-line no-const-enum const enum WshWindowStyle { WshHide = 0, WshMaximizedFocus = 3, @@ -77,24 +72,91 @@ declare namespace IWshRuntimeLibrary { WshNormalNoFocus = 4, } - class TextStream { - private 'IWshRuntimeLibrary.TextStream_typekey': TextStream; - private constructor(); - readonly AtEndOfLine: boolean; - readonly AtEndOfStream: boolean; - Close(): void; - readonly Column: number; - readonly Line: number; - Read(Characters: number): string; - ReadAll(): string; - ReadLine(): string; - Skip(Characters: number): void; - SkipLine(): void; - Write(Text: string): void; - WriteBlankLines(Lines: number): void; + class TextStreamBase { + /** + * The column number of the current character position in an input stream. + */ + Column: number; - /** @param string [Text=''] */ - WriteLine(Text?: string): void; + /** + * The current line number in an input stream. + */ + Line: number; + + /** + * Closes a text stream. + * It is not necessary to close standard streams; they close automatically when the process ends. If + * you close a standard stream, be aware that any other pointers to that standard stream become invalid. + */ + Close(): void; + } + + class TextStreamWriter extends TextStreamBase { + private 'IWshRuntimeLibrary.TextStreamWriter_typekey': TextStreamWriter; + private constructor(); + + /** + * Sends a string to an output stream. + */ + Write(s: string): void; + + /** + * Sends a specified number of blank lines (newline characters) to an output stream. + */ + WriteBlankLines(intLines: number): void; + + /** + * Sends a string followed by a newline character to an output stream. + */ + WriteLine(s: string): void; + } + + class TextStreamReader extends TextStreamBase { + private 'IWshRuntimeLibrary.TextStreamReader_typekey': TextStreamReader; + private constructor(); + + /** + * Returns a specified number of characters from an input stream, starting at the current pointer position. + * Does not return until the ENTER key is pressed. + * Can only be used on a stream in reading mode; causes an error in writing or appending mode. + */ + Read(characters: number): string; + + /** + * Returns all characters from an input stream. + * Can only be used on a stream in reading mode; causes an error in writing or appending mode. + */ + ReadAll(): string; + + /** + * Returns an entire line from an input stream. + * Although this method extracts the newline character, it does not add it to the returned string. + * Can only be used on a stream in reading mode; causes an error in writing or appending mode. + */ + ReadLine(): string; + + /** + * Skips a specified number of characters when reading from an input text stream. + * Can only be used on a stream in reading mode; causes an error in writing or appending mode. + * @param characters Positive number of characters to skip forward. (Backward skipping is not supported.) + */ + Skip(characters: number): void; + + /** + * Skips the next line when reading from an input text stream. + * Can only be used on a stream in reading mode, not writing or appending mode. + */ + SkipLine(): void; + + /** + * Indicates whether the stream pointer position is at the end of a line. + */ + AtEndOfLine: boolean; + + /** + * Indicates whether the stream pointer position is at the end of a stream. + */ + AtEndOfStream: boolean; } /** Generic Collection Object */ @@ -109,7 +171,7 @@ declare namespace IWshRuntimeLibrary { interface WshEnvironment { Count(): number; Item(Name: string): string; - readonly length: number; + readonly Length: number; Remove(Name: string): void; (Name: string): string; } @@ -121,9 +183,9 @@ declare namespace IWshRuntimeLibrary { readonly ExitCode: number; readonly ProcessID: number; readonly Status: WshExecStatus; - readonly StdErr: TextStream; - readonly StdIn: TextStream; - readonly StdOut: TextStream; + readonly StdErr: TextStreamWriter; + readonly StdIn: TextStreamReader; + readonly StdOut: TextStreamWriter; Terminate(): void; } @@ -336,13 +398,40 @@ declare namespace IWshRuntimeLibrary { TargetPath: string; } } +declare namespace WSHControllerLibrary { + class WSHController { + private 'WSHControllerLibrary.WSHController_typekey': WSHController; + private constructor(); + CreateScript(Command: string, Server?: any): any; + } +} -interface ActiveXObject { - set(obj: IWshRuntimeLibrary.WshEnvironment, propertyName: 'Item', parameterTypes: [string], newValue: string): void; - new (progid: K): ActiveXObjectNameMap[K]; +declare namespace ScriptSigner { + class Signer { + private 'ScriptSigner.Signer_typekey': Signer; + private constructor(); + + /** @param Store [Store='my'] */ + Sign(FileExtension: string, Text: string, Certificate: string, Store?: string): string; + + /** @param Store [Store='my'] */ + SignFile(FileName: string, Certificate: string, Store?: string): void; + + /** @param ShowUI [ShowUI=false] */ + Verify(FileExtension: string, Text: string, ShowUI?: boolean): boolean; + + /** @param ShowUI [ShowUI=false] */ + VerifyFile(FileName: string, ShowUI?: boolean): boolean; + } } interface ActiveXObjectNameMap { + 'WSHController': WSHControllerLibrary.WSHController; + 'Scripting.Signer': ScriptSigner.Signer; 'WScript.Network': IWshRuntimeLibrary.WshNetwork; 'WScript.Shell': IWshRuntimeLibrary.WshShell; } + +interface ActiveXObject { + set(obj: IWshRuntimeLibrary.WshEnvironment, propertyName: 'Item', parameterTypes: [string], newValue: string): void; +} diff --git a/types/activex-iwshruntimelibrary/tsconfig.json b/types/activex-iwshruntimelibrary/tsconfig.json index 1fa5abc39b..885ca81980 100644 --- a/types/activex-iwshruntimelibrary/tsconfig.json +++ b/types/activex-iwshruntimelibrary/tsconfig.json @@ -2,8 +2,7 @@ "compilerOptions": { "module": "commonjs", "lib": [ - "es5", - "scripthost" + "es5" ], "noImplicitAny": true, "noImplicitThis": true, @@ -21,4 +20,4 @@ "index.d.ts", "activex-iwshruntimelibrary-tests.ts" ] -} \ No newline at end of file +} diff --git a/types/activex-iwshruntimelibrary/tslint.json b/types/activex-iwshruntimelibrary/tslint.json index e60c15844f..ed91c31f9c 100644 --- a/types/activex-iwshruntimelibrary/tslint.json +++ b/types/activex-iwshruntimelibrary/tslint.json @@ -1,3 +1,6 @@ { - "extends": "dtslint/dt.json" + "extends": "dtslint/dt.json", + "rules": { + "no-const-enum": false + } } \ No newline at end of file diff --git a/types/activex-libreoffice/activex-libreoffice-tests.ts b/types/activex-libreoffice/activex-libreoffice-tests.ts index bafe014f59..87cf55eb8c 100644 --- a/types/activex-libreoffice/activex-libreoffice-tests.ts +++ b/types/activex-libreoffice/activex-libreoffice-tests.ts @@ -1,3 +1,5 @@ +/// + (() => { // https://wiki.openoffice.org/wiki/Documentation/DevGuide/ProUNO/Bridge/Automation_Bridge diff --git a/types/activex-libreoffice/index.d.ts b/types/activex-libreoffice/index.d.ts index 1698317e8f..7d8e109861 100644 --- a/types/activex-libreoffice/index.d.ts +++ b/types/activex-libreoffice/index.d.ts @@ -2,7 +2,9 @@ // Project: https://api.libreoffice.org/ // Definitions by: Zev Spitz // Definitions: https://github.com/DefinitelyTyped/DefinitelyTyped -// TypeScript Version: 2.3 +// TypeScript Version: 2.6 + +/// declare class type { private typekey: type; @@ -12,9 +14,6 @@ declare class sequence { private typekey: sequence; } -// tslint:disable-next-line no-empty-interface -interface SafeArray {} - declare namespace com.sun.star { namespace accessibility { /** diff --git a/types/activex-libreoffice/tsconfig.json b/types/activex-libreoffice/tsconfig.json index 712ea46ca1..b6e9a7be63 100644 --- a/types/activex-libreoffice/tsconfig.json +++ b/types/activex-libreoffice/tsconfig.json @@ -2,8 +2,7 @@ "compilerOptions": { "module": "commonjs", "lib": [ - "es5", - "scripthost" + "es5" ], "noImplicitAny": true, "noImplicitThis": true, diff --git a/types/activex-msforms/index.d.ts b/types/activex-msforms/index.d.ts index 45acebbdb3..a9b5e8f8ac 100644 --- a/types/activex-msforms/index.d.ts +++ b/types/activex-msforms/index.d.ts @@ -2,7 +2,7 @@ // Project: https://msdn.microsoft.com/VBA/Language-Reference-VBA/articles/reference-microsoft-forms // Definitions by: Zev Spitz // Definitions: https://github.com/DefinitelyTyped/DefinitelyTyped -// TypeScript Version: 2.3 +// TypeScript Version: 2.6 /// @@ -361,48 +361,11 @@ declare namespace MSForms { WordWrap: boolean; } - class CheckBox2 { - private 'MSForms.CheckBox2_typekey': CheckBox2; - private constructor(); - readonly _Font_Reserved: NewFont; - Accelerator: string; - Alignment: fmAlignment; - AutoSize: boolean; - BackColor: number; - BackStyle: fmBackStyle; - BordersSuppress: boolean; - Caption: string; - readonly DisplayStyle: fmDisplayStyle; - Enabled: boolean; - Font: NewFont; - FontBold: boolean; - FontItalic: boolean; - FontName: string; - FontSize: number; - FontStrikethru: boolean; - FontUnderline: boolean; - FontWeight: number; - ForeColor: number; - GroupName: string; - Locked: boolean; - MouseIcon: stdole.StdPicture; - MousePointer: fmMousePointer; - MultiSelect: fmMultiSelect; - Picture: stdole.StdPicture; - PicturePosition: fmPicturePosition; - SpecialEffect: fmButtonEffect; - TextAlign: fmTextAlign; - TripleState: boolean; - readonly Valid: boolean; - Value: any; - WordWrap: boolean; - } - class ComboBox { private 'MSForms.ComboBox_typekey': ComboBox; private constructor(); readonly _Font_Reserved: NewFont; - AddItem(pvargItem?: any, pvargIndex?: any): void; + AddItem(pvargItem?: number, pvargIndex?: number): void; AutoSize: boolean; AutoTab: boolean; AutoWordSelect: boolean; @@ -411,10 +374,11 @@ declare namespace MSForms { BorderColor: number; BordersSuppress: boolean; BorderStyle: fmBorderStyle; - BoundColumn: any; + BoundColumn: number; readonly CanPaste: boolean; Clear(): void; - Column(pvargColumn?: any, pvargIndex?: any): any; + Column(pvargColumn: number, pvargIndex?: number): any; + Column(): SafeArray; ColumnCount: number; ColumnHeads: boolean; ColumnWidths: string; @@ -441,13 +405,14 @@ declare namespace MSForms { HideSelection: boolean; IMEMode: fmIMEMode; readonly LineCount: number; - List(pvargIndex?: any, pvargColumn?: any): any; + List(pvargIndex: number, pvargColumn?: number): any; + List(): SafeArray; readonly ListCount: number; ListCursor: any; - ListIndex: any; + ListIndex: number; ListRows: number; ListStyle: fmListStyle; - ListWidth: any; + ListWidth: number; Locked: boolean; MatchEntry: fmMatchEntry; readonly MatchFound: boolean; @@ -456,7 +421,7 @@ declare namespace MSForms { MouseIcon: stdole.StdPicture; MousePointer: fmMousePointer; Paste(): void; - RemoveItem(pvargIndex: any): void; + RemoveItem(pvargIndex: number): boolean; SelectionMargin: boolean; SelLength: number; SelStart: number; @@ -466,84 +431,9 @@ declare namespace MSForms { Style: fmStyle; Text: string; TextAlign: fmTextAlign; - TextColumn: any; + TextColumn: number; readonly TextLength: number; - TopIndex: any; - readonly Valid: boolean; - Value: any; - } - - class ComboBox2 { - private 'MSForms.ComboBox2_typekey': ComboBox2; - private constructor(); - readonly _Font_Reserved: NewFont; - AddItem(pvargItem?: any, pvargIndex?: any): void; - AutoSize: boolean; - AutoTab: boolean; - AutoWordSelect: boolean; - BackColor: number; - BackStyle: fmBackStyle; - BorderColor: number; - BordersSuppress: boolean; - BorderStyle: fmBorderStyle; - BoundColumn: any; - readonly CanPaste: boolean; - Clear(): void; - Column(pvargColumn?: any, pvargIndex?: any): any; - ColumnCount: number; - ColumnHeads: boolean; - ColumnWidths: string; - Copy(): void; - readonly CurTargetX: number; - readonly CurTargetY: number; - CurX: number; - Cut(): void; - readonly DisplayStyle: fmDisplayStyle; - DragBehavior: fmDragBehavior; - DropButtonStyle: fmDropButtonStyle; - DropDown(): void; - Enabled: boolean; - EnterFieldBehavior: fmEnterFieldBehavior; - Font: NewFont; - FontBold: boolean; - FontItalic: boolean; - FontName: string; - FontSize: number; - FontStrikethru: boolean; - FontUnderline: boolean; - FontWeight: number; - ForeColor: number; - HideSelection: boolean; - IMEMode: fmIMEMode; - readonly LineCount: number; - List(pvargIndex?: any, pvargColumn?: any): any; - readonly ListCount: number; - ListCursor: any; - ListIndex: any; - ListRows: number; - ListStyle: fmListStyle; - ListWidth: any; - Locked: boolean; - MatchEntry: fmMatchEntry; - readonly MatchFound: boolean; - MatchRequired: boolean; - MaxLength: number; - MouseIcon: stdole.StdPicture; - MousePointer: fmMousePointer; - Paste(): void; - RemoveItem(pvargIndex: any): void; - SelectionMargin: boolean; - SelLength: number; - SelStart: number; - SelText: string; - ShowDropButtonWhen: fmShowDropButtonWhen; - SpecialEffect: fmSpecialEffect; - Style: fmStyle; - Text: string; - TextAlign: fmTextAlign; - TextColumn: any; - readonly TextLength: number; - TopIndex: any; + TopIndex: number; readonly Valid: boolean; Value: any; } @@ -577,35 +467,6 @@ declare namespace MSForms { WordWrap: boolean; } - class CommandButton2 { - private 'MSForms.CommandButton2_typekey': CommandButton2; - private constructor(); - readonly _Font_Reserved: NewFont; - Accelerator: string; - AutoSize: boolean; - BackColor: number; - BackStyle: fmBackStyle; - Caption: string; - Enabled: boolean; - Font: NewFont; - FontBold: boolean; - FontItalic: boolean; - FontName: string; - FontSize: number; - FontStrikethru: boolean; - FontUnderline: boolean; - FontWeight: number; - ForeColor: number; - Locked: boolean; - MouseIcon: stdole.StdPicture; - MousePointer: fmMousePointer; - Picture: stdole.StdPicture; - PicturePosition: fmPicturePosition; - TakeFocusOnClick: boolean; - Value: boolean; - WordWrap: boolean; - } - class Control { private 'MSForms.Control_typekey': Control; private constructor(); @@ -656,9 +517,7 @@ declare namespace MSForms { ZOrder(zPosition?: any): void; } - class Controls { - private 'MSForms.Controls_typekey': Controls; - private constructor(); + interface Controls { _AddByClass(clsid: number): Control; _GetItemByID(ID: number): Control; _GetItemByIndex(lIndex: number): Control; @@ -679,6 +538,7 @@ declare namespace MSForms { SelectAll(): void; SendBackward(): void; SendToBack(): void; + (varg: any): any; } class DataObject { @@ -693,18 +553,6 @@ declare namespace MSForms { StartDrag(OKEffect?: any): fmDropEffect; } - class DataObject2 { - private 'MSForms.DataObject2_typekey': DataObject2; - private constructor(); - Clear(): void; - GetFormat(Format: any): boolean; - GetFromClipboard(): void; - GetText(Format?: any): string; - PutInClipboard(): void; - SetText(Text: string, Format?: any): void; - StartDrag(OKEffect?: any): fmDropEffect; - } - class Frame { private 'MSForms.Frame_typekey': Frame; private constructor(); @@ -770,71 +618,6 @@ declare namespace MSForms { Zoom: number; } - class Frame2 { - private 'MSForms.Frame2_typekey': Frame2; - private constructor(); - readonly _Font_Reserved: NewFont; - _GetGridX(GridX: number): void; - _GetGridY(GridY: number): void; - _GetInsideHeight(InsideHeight: number): void; - _GetInsideWidth(InsideWidth: number): void; - _GetScrollHeight(ScrollHeight: number): void; - _GetScrollLeft(ScrollLeft: number): void; - _GetScrollTop(ScrollTop: number): void; - _GetScrollWidth(ScrollWidth: number): void; - _SetGridX(GridX: number): void; - _SetGridY(GridY: number): void; - _SetScrollHeight(ScrollHeight: number): void; - _SetScrollLeft(ScrollLeft: number): void; - _SetScrollTop(ScrollTop: number): void; - _SetScrollWidth(ScrollWidth: number): void; - readonly ActiveControl: Control; - BackColor: number; - BorderColor: number; - BorderStyle: fmBorderStyle; - readonly CanPaste: boolean; - readonly CanRedo: boolean; - readonly CanUndo: boolean; - Caption: string; - readonly Controls: Controls; - Copy(): void; - Cut(): void; - Cycle: fmCycle; - DesignMode: fmMode; - Enabled: boolean; - Font: NewFont; - ForeColor: number; - GridX: number; - GridY: number; - readonly InsideHeight: number; - readonly InsideWidth: number; - KeepScrollBarsVisible: fmScrollBars; - MouseIcon: stdole.StdPicture; - MousePointer: fmMousePointer; - Paste(): void; - Picture: stdole.StdPicture; - PictureAlignment: fmPictureAlignment; - PictureSizeMode: fmPictureSizeMode; - PictureTiling: boolean; - RedoAction(): void; - Repaint(): void; - Scroll(xAction?: any, yAction?: any): void; - ScrollBars: fmScrollBars; - ScrollHeight: number; - ScrollLeft: number; - ScrollTop: number; - ScrollWidth: number; - readonly Selected: Controls; - SetDefaultTabOrder(): void; - ShowGridDots: fmMode; - ShowToolbox: fmMode; - SnapToGrid: fmMode; - SpecialEffect: fmSpecialEffect; - UndoAction(): void; - VerticalScrollBarSide: fmVerticalScrollBarSide; - Zoom: number; - } - class HTMLCheckbox { private 'MSForms.HTMLCheckbox_typekey': HTMLCheckbox; private constructor(); @@ -844,15 +627,6 @@ declare namespace MSForms { Value: string; } - class HTMLCheckbox2 { - private 'MSForms.HTMLCheckbox2_typekey': HTMLCheckbox2; - private constructor(); - Checked: boolean; - HTMLName: string; - HTMLType: string; - Value: string; - } - class HTMLHidden { private 'MSForms.HTMLHidden_typekey': HTMLHidden; private constructor(); @@ -861,14 +635,6 @@ declare namespace MSForms { Value: string; } - class HTMLHidden2 { - private 'MSForms.HTMLHidden2_typekey': HTMLHidden2; - private constructor(); - HTMLName: string; - HTMLType: string; - Value: string; - } - class HTMLImage { private 'MSForms.HTMLImage_typekey': HTMLImage; private constructor(); @@ -880,17 +646,6 @@ declare namespace MSForms { Source: string; } - class HTMLImage2 { - private 'MSForms.HTMLImage2_typekey': HTMLImage2; - private constructor(); - Action: string; - Encoding: string; - HTMLName: string; - HTMLType: string; - Method: string; - Source: string; - } - class HTMLOption { private 'MSForms.HTMLOption_typekey': HTMLOption; private constructor(); @@ -901,16 +656,6 @@ declare namespace MSForms { Value: string; } - class HTMLOption2 { - private 'MSForms.HTMLOption2_typekey': HTMLOption2; - private constructor(); - Checked: boolean; - readonly DisplayStyle: fmDisplayStyle; - HTMLName: string; - HTMLType: string; - Value: string; - } - class HTMLPassword { private 'MSForms.HTMLPassword_typekey': HTMLPassword; private constructor(); @@ -921,16 +666,6 @@ declare namespace MSForms { Width: number; } - class HTMLPassword2 { - private 'MSForms.HTMLPassword2_typekey': HTMLPassword2; - private constructor(); - HTMLName: string; - HTMLType: string; - MaxLength: number; - Value: string; - Width: number; - } - class HTMLReset { private 'MSForms.HTMLReset_typekey': HTMLReset; private constructor(); @@ -939,14 +674,6 @@ declare namespace MSForms { HTMLType: string; } - class HTMLReset2 { - private 'MSForms.HTMLReset2_typekey': HTMLReset2; - private constructor(); - Caption: string; - HTMLName: string; - HTMLType: string; - } - class HTMLSelect { private 'MSForms.HTMLSelect_typekey': HTMLSelect; private constructor(); @@ -958,17 +685,6 @@ declare namespace MSForms { Values: any; } - class HTMLSelect2 { - private 'MSForms.HTMLSelect2_typekey': HTMLSelect2; - private constructor(); - DisplayValues: any; - HTMLName: string; - MultiSelect: boolean; - Selected: string; - Size: number; - Values: any; - } - class HTMLSubmit { private 'MSForms.HTMLSubmit_typekey': HTMLSubmit; private constructor(); @@ -980,17 +696,6 @@ declare namespace MSForms { Method: string; } - class HTMLSubmit2 { - private 'MSForms.HTMLSubmit2_typekey': HTMLSubmit2; - private constructor(); - Action: string; - Caption: string; - Encoding: string; - HTMLName: string; - HTMLType: string; - Method: string; - } - class HTMLText { private 'MSForms.HTMLText_typekey': HTMLText; private constructor(); @@ -1001,16 +706,6 @@ declare namespace MSForms { Width: number; } - class HTMLText2 { - private 'MSForms.HTMLText2_typekey': HTMLText2; - private constructor(); - HTMLName: string; - HTMLType: string; - MaxLength: number; - Value: string; - Width: number; - } - class HTMLTextArea { private 'MSForms.HTMLTextArea_typekey': HTMLTextArea; private constructor(); @@ -1021,16 +716,6 @@ declare namespace MSForms { WordWrap: string; } - class HTMLTextArea2 { - private 'MSForms.HTMLTextArea2_typekey': HTMLTextArea2; - private constructor(); - Columns: number; - HTMLName: string; - Rows: number; - Value: string; - WordWrap: string; - } - class Image { private 'MSForms.Image_typekey': Image; private constructor(); @@ -1049,24 +734,6 @@ declare namespace MSForms { SpecialEffect: fmSpecialEffect; } - class Image2 { - private 'MSForms.Image2_typekey': Image2; - private constructor(); - AutoSize: boolean; - BackColor: number; - BackStyle: fmBackStyle; - BorderColor: number; - BorderStyle: fmBorderStyle; - Enabled: boolean; - MouseIcon: stdole.StdPicture; - MousePointer: fmMousePointer; - Picture: stdole.StdPicture; - PictureAlignment: fmPictureAlignment; - PictureSizeMode: fmPictureSizeMode; - PictureTiling: boolean; - SpecialEffect: fmSpecialEffect; - } - class Label { private 'MSForms.Label_typekey': Label; private constructor(); @@ -1098,37 +765,6 @@ declare namespace MSForms { WordWrap: boolean; } - class Label2 { - private 'MSForms.Label2_typekey': Label2; - private constructor(); - readonly _Font_Reserved: NewFont; - _Value: string; - Accelerator: string; - AutoSize: boolean; - BackColor: number; - BackStyle: fmBackStyle; - BorderColor: number; - BorderStyle: fmBorderStyle; - Caption: string; - Enabled: boolean; - Font: NewFont; - FontBold: boolean; - FontItalic: boolean; - FontName: string; - FontSize: number; - FontStrikethru: boolean; - FontUnderline: boolean; - FontWeight: number; - ForeColor: number; - MouseIcon: stdole.StdPicture; - MousePointer: fmMousePointer; - Picture: stdole.StdPicture; - PicturePosition: fmPicturePosition; - SpecialEffect: fmSpecialEffect; - TextAlign: fmTextAlign; - WordWrap: boolean; - } - class ListBox { private 'MSForms.ListBox_typekey': ListBox; private constructor(); @@ -1140,7 +776,8 @@ declare namespace MSForms { BorderStyle: fmBorderStyle; BoundColumn: any; Clear(): void; - Column(pvargColumn?: any, pvargIndex?: any): any; + Column(pvargColumn: number, pvargIndex?: number): any; + Column(): SafeArray; ColumnCount: number; ColumnHeads: boolean; ColumnWidths: string; @@ -1157,57 +794,8 @@ declare namespace MSForms { ForeColor: number; IMEMode: fmIMEMode; IntegralHeight: boolean; - List(pvargIndex?: any, pvargColumn?: any): any; - readonly ListCount: number; - ListCursor: any; - ListIndex: any; - ListStyle: fmListStyle; - ListWidth: any; - Locked: boolean; - MatchEntry: fmMatchEntry; - MouseIcon: stdole.StdPicture; - MousePointer: fmMousePointer; - MultiSelect: fmMultiSelect; - RemoveItem(pvargIndex: any): void; - Selected(pvargIndex: any): boolean; - SpecialEffect: fmSpecialEffect; - Text: string; - TextAlign: fmTextAlign; - TextColumn: any; - TopIndex: any; - readonly Valid: boolean; - Value: any; - } - - class ListBox2 { - private 'MSForms.ListBox2_typekey': ListBox2; - private constructor(); - readonly _Font_Reserved: NewFont; - AddItem(pvargItem?: any, pvargIndex?: any): void; - BackColor: number; - BorderColor: number; - BordersSuppress: boolean; - BorderStyle: fmBorderStyle; - BoundColumn: any; - Clear(): void; - Column(pvargColumn?: any, pvargIndex?: any): any; - ColumnCount: number; - ColumnHeads: boolean; - ColumnWidths: string; - readonly DisplayStyle: fmDisplayStyle; - Enabled: boolean; - Font: NewFont; - FontBold: boolean; - FontItalic: boolean; - FontName: string; - FontSize: number; - FontStrikethru: boolean; - FontUnderline: boolean; - FontWeight: number; - ForeColor: number; - IMEMode: fmIMEMode; - IntegralHeight: boolean; - List(pvargIndex?: any, pvargColumn?: any): any; + List(pvargIndex: number, pvargColumn?: number): any; + List(): SafeArray; readonly ListCount: number; ListCursor: any; ListIndex: any; @@ -1258,35 +846,6 @@ declare namespace MSForms { Value: number; } - class MultiPage2 { - private 'MSForms.MultiPage2_typekey': MultiPage2; - private constructor(); - readonly _Font_Reserved: NewFont; - _GetTabFixedHeight(Height: number): void; - _GetTabFixedWidth(Width: number): void; - _SetTabFixedHeight(Height: number): void; - _SetTabFixedWidth(Width: number): void; - BackColor: number; - Enabled: boolean; - Font: NewFont; - FontBold: boolean; - FontItalic: boolean; - FontName: string; - FontSize: number; - FontStrikethru: boolean; - FontUnderline: boolean; - FontWeight: number; - ForeColor: number; - MultiRow: boolean; - readonly Pages: Pages; - readonly SelectedItem: Page; - Style: fmTabStyle; - TabFixedHeight: number; - TabFixedWidth: number; - TabOrientation: fmTabOrientation; - Value: number; - } - class NewFont { private 'MSForms.NewFont_typekey': NewFont; private constructor(); @@ -1337,43 +896,6 @@ declare namespace MSForms { WordWrap: boolean; } - class OptionButton2 { - private 'MSForms.OptionButton2_typekey': OptionButton2; - private constructor(); - readonly _Font_Reserved: NewFont; - Accelerator: string; - Alignment: fmAlignment; - AutoSize: boolean; - BackColor: number; - BackStyle: fmBackStyle; - BordersSuppress: boolean; - Caption: string; - readonly DisplayStyle: fmDisplayStyle; - Enabled: boolean; - Font: NewFont; - FontBold: boolean; - FontItalic: boolean; - FontName: string; - FontSize: number; - FontStrikethru: boolean; - FontUnderline: boolean; - FontWeight: number; - ForeColor: number; - GroupName: string; - Locked: boolean; - MouseIcon: stdole.StdPicture; - MousePointer: fmMousePointer; - MultiSelect: fmMultiSelect; - Picture: stdole.StdPicture; - PicturePosition: fmPicturePosition; - SpecialEffect: fmButtonEffect; - TextAlign: fmTextAlign; - TripleState: boolean; - readonly Valid: boolean; - Value: any; - WordWrap: boolean; - } - class Page { private 'MSForms.Page_typekey': Page; private constructor(); @@ -1439,9 +961,7 @@ declare namespace MSForms { Zoom: number; } - class Pages { - private 'MSForms.Pages_typekey': Pages; - private constructor(); + interface Pages { _AddCtrl(clsid: number, bstrName: string, bstrCaption: string): Page; _GetItemByIndex(lIndex: number): Control; _GetItemByName(pstrName: string): Control; @@ -1452,6 +972,7 @@ declare namespace MSForms { Enum(): any; Item(varg: any): any; Remove(varg: any): void; + (varg: any): any; } class ReturnBoolean { @@ -1502,24 +1023,6 @@ declare namespace MSForms { Value: number; } - class ScrollBar2 { - private 'MSForms.ScrollBar2_typekey': ScrollBar2; - private constructor(); - BackColor: number; - Delay: number; - Enabled: boolean; - ForeColor: number; - LargeChange: number; - Max: number; - Min: number; - MouseIcon: stdole.StdPicture; - MousePointer: fmMousePointer; - Orientation: fmOrientation; - ProportionalThumb: boolean; - SmallChange: number; - Value: number; - } - class SpinButton { private 'MSForms.SpinButton_typekey': SpinButton; private constructor(); @@ -1536,22 +1039,6 @@ declare namespace MSForms { Value: number; } - class SpinButton2 { - private 'MSForms.SpinButton2_typekey': SpinButton2; - private constructor(); - BackColor: number; - Delay: number; - Enabled: boolean; - ForeColor: number; - Max: number; - Min: number; - MouseIcon: stdole.StdPicture; - MousePointer: fmMousePointer; - Orientation: fmOrientation; - SmallChange: number; - Value: number; - } - class Tab { private 'MSForms.Tab_typekey': Tab; private constructor(); @@ -1565,9 +1052,7 @@ declare namespace MSForms { Visible: boolean; } - class Tabs { - private 'MSForms.Tabs_typekey': Tabs; - private constructor(); + interface Tabs { _Add(bstrName: string, bstrCaption: string): Tab; _GetItemByIndex(lIndex: number): Tab; _GetItemByName(bstr: string): Tab; @@ -1578,6 +1063,7 @@ declare namespace MSForms { Enum(): any; Item(varg: any): any; Remove(varg: any): void; + (varg: any): any; } class TabStrip { @@ -1619,45 +1105,6 @@ declare namespace MSForms { Value: number; } - class TabStrip2 { - private 'MSForms.TabStrip2_typekey': TabStrip2; - private constructor(); - readonly _Font_Reserved: NewFont; - _GetClientHeight(ClientHeight: number): void; - _GetClientLeft(ClientLeft: number): void; - _GetClientTop(ClientTop: number): void; - _GetClientWidth(ClientWidth: number): void; - _GetTabFixedHeight(TabFixedHeight: number): void; - _GetTabFixedWidth(TabFixedWidth: number): void; - _SetTabFixedHeight(TabFixedHeight: number): void; - _SetTabFixedWidth(TabFixedWidth: number): void; - BackColor: number; - readonly ClientHeight: number; - readonly ClientLeft: number; - readonly ClientTop: number; - readonly ClientWidth: number; - Enabled: boolean; - Font: NewFont; - FontBold: boolean; - FontItalic: boolean; - FontName: string; - FontSize: number; - FontStrikethru: boolean; - FontUnderline: boolean; - FontWeight: number; - ForeColor: number; - MouseIcon: stdole.StdPicture; - MousePointer: fmMousePointer; - MultiRow: boolean; - readonly SelectedItem: Tab; - Style: fmTabStyle; - TabFixedHeight: number; - TabFixedWidth: number; - TabOrientation: fmTabOrientation; - readonly Tabs: Tabs; - Value: number; - } - class TextBox { private 'MSForms.TextBox_typekey': TextBox; private constructor(); @@ -1720,68 +1167,6 @@ declare namespace MSForms { WordWrap: boolean; } - class TextBox2 { - private 'MSForms.TextBox2_typekey': TextBox2; - private constructor(); - readonly _Font_Reserved: NewFont; - AutoSize: boolean; - AutoTab: boolean; - AutoWordSelect: boolean; - BackColor: number; - BackStyle: fmBackStyle; - BorderColor: number; - BordersSuppress: boolean; - BorderStyle: fmBorderStyle; - readonly CanPaste: boolean; - Copy(): void; - CurLine: number; - readonly CurTargetX: number; - readonly CurTargetY: number; - CurX: number; - CurY: number; - Cut(): void; - readonly DisplayStyle: fmDisplayStyle; - DragBehavior: fmDragBehavior; - DropButtonStyle: fmDropButtonStyle; - Enabled: boolean; - EnterFieldBehavior: fmEnterFieldBehavior; - EnterKeyBehavior: boolean; - Font: NewFont; - FontBold: boolean; - FontItalic: boolean; - FontName: string; - FontSize: number; - FontStrikethru: boolean; - FontUnderline: boolean; - FontWeight: number; - ForeColor: number; - HideSelection: boolean; - IMEMode: fmIMEMode; - IntegralHeight: boolean; - readonly LineCount: number; - Locked: boolean; - MaxLength: number; - MouseIcon: stdole.StdPicture; - MousePointer: fmMousePointer; - MultiLine: boolean; - PasswordChar: string; - Paste(): void; - ScrollBars: fmScrollBars; - SelectionMargin: boolean; - SelLength: number; - SelStart: number; - SelText: string; - ShowDropButtonWhen: fmShowDropButtonWhen; - SpecialEffect: fmSpecialEffect; - TabKeyBehavior: boolean; - Text: string; - TextAlign: fmTextAlign; - readonly TextLength: number; - readonly Valid: boolean; - Value: any; - WordWrap: boolean; - } - class ToggleButton { private 'MSForms.ToggleButton_typekey': ToggleButton; private constructor(); @@ -1819,43 +1204,6 @@ declare namespace MSForms { WordWrap: boolean; } - class ToggleButton2 { - private 'MSForms.ToggleButton2_typekey': ToggleButton2; - private constructor(); - readonly _Font_Reserved: NewFont; - Accelerator: string; - Alignment: fmAlignment; - AutoSize: boolean; - BackColor: number; - BackStyle: fmBackStyle; - BordersSuppress: boolean; - Caption: string; - readonly DisplayStyle: fmDisplayStyle; - Enabled: boolean; - Font: NewFont; - FontBold: boolean; - FontItalic: boolean; - FontName: string; - FontSize: number; - FontStrikethru: boolean; - FontUnderline: boolean; - FontWeight: number; - ForeColor: number; - GroupName: string; - Locked: boolean; - MouseIcon: stdole.StdPicture; - MousePointer: fmMousePointer; - MultiSelect: fmMultiSelect; - Picture: stdole.StdPicture; - PicturePosition: fmPicturePosition; - SpecialEffect: fmButtonEffect; - TextAlign: fmTextAlign; - TripleState: boolean; - readonly Valid: boolean; - Value: any; - WordWrap: boolean; - } - class UserForm { private 'MSForms.UserForm_typekey': UserForm; private constructor(); @@ -1922,160 +1270,18 @@ declare namespace MSForms { Zoom: number; } - class UserForm2 { - private 'MSForms.UserForm2_typekey': UserForm2; - private constructor(); - readonly _Font_Reserved: NewFont; - _GetGridX(GridX: number): void; - _GetGridY(GridY: number): void; - _GetInsideHeight(InsideHeight: number): void; - _GetInsideWidth(InsideWidth: number): void; - _GetScrollHeight(ScrollHeight: number): void; - _GetScrollLeft(ScrollLeft: number): void; - _GetScrollTop(ScrollTop: number): void; - _GetScrollWidth(ScrollWidth: number): void; - _SetGridX(GridX: number): void; - _SetGridY(GridY: number): void; - _SetScrollHeight(ScrollHeight: number): void; - _SetScrollLeft(ScrollLeft: number): void; - _SetScrollTop(ScrollTop: number): void; - _SetScrollWidth(ScrollWidth: number): void; - readonly ActiveControl: Control; - BackColor: number; - BorderColor: number; - BorderStyle: fmBorderStyle; - readonly CanPaste: boolean; - readonly CanRedo: boolean; - readonly CanUndo: boolean; - Caption: string; - readonly Controls: Controls; - Copy(): void; - Cut(): void; - Cycle: fmCycle; - DesignMode: fmMode; - DrawBuffer: number; - Enabled: boolean; - Font: NewFont; - ForeColor: number; - GridX: number; - GridY: number; - readonly InsideHeight: number; - readonly InsideWidth: number; - KeepScrollBarsVisible: fmScrollBars; - MouseIcon: stdole.StdPicture; - MousePointer: fmMousePointer; - Paste(): void; - Picture: stdole.StdPicture; - PictureAlignment: fmPictureAlignment; - PictureSizeMode: fmPictureSizeMode; - PictureTiling: boolean; - RedoAction(): void; - Repaint(): void; - Scroll(xAction?: any, yAction?: any): void; - ScrollBars: fmScrollBars; - ScrollHeight: number; - ScrollLeft: number; - ScrollTop: number; - ScrollWidth: number; - readonly Selected: Controls; - SetDefaultTabOrder(): void; - ShowGridDots: fmMode; - ShowToolbox: fmMode; - SnapToGrid: fmMode; - SpecialEffect: fmSpecialEffect; - UndoAction(): void; - VerticalScrollBarSide: fmVerticalScrollBarSide; - Zoom: number; - } - namespace EventHelperTypes { - type CheckBox_BeforeDragOver_ArgNames = ['Cancel', 'Data', 'X', 'Y', 'DragState', 'Effect', 'Shift']; + type Container_BeforeDragOver_ArgNames = ['Cancel', 'Control', 'Data', 'X', 'Y', 'State', 'Effect', 'Shift']; - type CheckBox_BeforeDropOrPaste_ArgNames = ['Cancel', 'Action', 'Data', 'X', 'Y', 'Effect', 'Shift']; + type Container_BeforeDropOrPaste_ArgNames = ['Cancel', 'Control', 'Action', 'Data', 'X', 'Y', 'Effect', 'Shift']; - type CheckBox_Error_ArgNames = ['Number', 'Description', 'SCode', 'Source', 'HelpFile', 'HelpContext', 'CancelDisplay']; + type Container_Scroll_ArgNames = ['ActionX', 'ActionY', 'RequestDx', 'RequestDy', 'ActualDx', 'ActualDy']; - type CheckBox2_BeforeDragOver_ArgNames = ['Cancel', 'Data', 'X', 'Y', 'DragState', 'Effect', 'Shift']; + type Control_BeforeDragOver_ArgNames = ['Cancel', 'Data', 'X', 'Y', 'DragState', 'Effect', 'Shift']; - type CheckBox2_BeforeDropOrPaste_ArgNames = ['Cancel', 'Action', 'Data', 'X', 'Y', 'Effect', 'Shift']; + type Control_BeforeDropOrPaste_ArgNames = ['Cancel', 'Action', 'Data', 'X', 'Y', 'Effect', 'Shift']; - type CheckBox2_Error_ArgNames = ['Number', 'Description', 'SCode', 'Source', 'HelpFile', 'HelpContext', 'CancelDisplay']; - - type ComboBox_BeforeDragOver_ArgNames = ['Cancel', 'Data', 'X', 'Y', 'DragState', 'Effect', 'Shift']; - - type ComboBox_BeforeDropOrPaste_ArgNames = ['Cancel', 'Action', 'Data', 'X', 'Y', 'Effect', 'Shift']; - - type ComboBox_Error_ArgNames = ['Number', 'Description', 'SCode', 'Source', 'HelpFile', 'HelpContext', 'CancelDisplay']; - - type ComboBox2_BeforeDragOver_ArgNames = ['Cancel', 'Data', 'X', 'Y', 'DragState', 'Effect', 'Shift']; - - type ComboBox2_BeforeDropOrPaste_ArgNames = ['Cancel', 'Action', 'Data', 'X', 'Y', 'Effect', 'Shift']; - - type ComboBox2_Error_ArgNames = ['Number', 'Description', 'SCode', 'Source', 'HelpFile', 'HelpContext', 'CancelDisplay']; - - type CommandButton_BeforeDragOver_ArgNames = ['Cancel', 'Data', 'X', 'Y', 'DragState', 'Effect', 'Shift']; - - type CommandButton_BeforeDropOrPaste_ArgNames = ['Cancel', 'Action', 'Data', 'X', 'Y', 'Effect', 'Shift']; - - type CommandButton_Error_ArgNames = ['Number', 'Description', 'SCode', 'Source', 'HelpFile', 'HelpContext', 'CancelDisplay']; - - type CommandButton2_BeforeDragOver_ArgNames = ['Cancel', 'Data', 'X', 'Y', 'DragState', 'Effect', 'Shift']; - - type CommandButton2_BeforeDropOrPaste_ArgNames = ['Cancel', 'Action', 'Data', 'X', 'Y', 'Effect', 'Shift']; - - type CommandButton2_Error_ArgNames = ['Number', 'Description', 'SCode', 'Source', 'HelpFile', 'HelpContext', 'CancelDisplay']; - - type Frame_BeforeDragOver_ArgNames = ['Cancel', 'Control', 'Data', 'X', 'Y', 'State', 'Effect', 'Shift']; - - type Frame_BeforeDropOrPaste_ArgNames = ['Cancel', 'Control', 'Action', 'Data', 'X', 'Y', 'Effect', 'Shift']; - - type Frame_Error_ArgNames = ['Number', 'Description', 'SCode', 'Source', 'HelpFile', 'HelpContext', 'CancelDisplay']; - - type Frame_Scroll_ArgNames = ['ActionX', 'ActionY', 'RequestDx', 'RequestDy', 'ActualDx', 'ActualDy']; - - type Frame2_BeforeDragOver_ArgNames = ['Cancel', 'Control', 'Data', 'X', 'Y', 'State', 'Effect', 'Shift']; - - type Frame2_BeforeDropOrPaste_ArgNames = ['Cancel', 'Control', 'Action', 'Data', 'X', 'Y', 'Effect', 'Shift']; - - type Frame2_Error_ArgNames = ['Number', 'Description', 'SCode', 'Source', 'HelpFile', 'HelpContext', 'CancelDisplay']; - - type Frame2_Scroll_ArgNames = ['ActionX', 'ActionY', 'RequestDx', 'RequestDy', 'ActualDx', 'ActualDy']; - - type Image_BeforeDragOver_ArgNames = ['Cancel', 'Data', 'X', 'Y', 'DragState', 'Effect', 'Shift']; - - type Image_BeforeDropOrPaste_ArgNames = ['Cancel', 'Action', 'Data', 'X', 'Y', 'Effect', 'Shift']; - - type Image_Error_ArgNames = ['Number', 'Description', 'SCode', 'Source', 'HelpFile', 'HelpContext', 'CancelDisplay']; - - type Image2_BeforeDragOver_ArgNames = ['Cancel', 'Data', 'X', 'Y', 'DragState', 'Effect', 'Shift']; - - type Image2_BeforeDropOrPaste_ArgNames = ['Cancel', 'Action', 'Data', 'X', 'Y', 'Effect', 'Shift']; - - type Image2_Error_ArgNames = ['Number', 'Description', 'SCode', 'Source', 'HelpFile', 'HelpContext', 'CancelDisplay']; - - type Label_BeforeDragOver_ArgNames = ['Cancel', 'Data', 'X', 'Y', 'DragState', 'Effect', 'Shift']; - - type Label_BeforeDropOrPaste_ArgNames = ['Cancel', 'Action', 'Data', 'X', 'Y', 'Effect', 'Shift']; - - type Label_Error_ArgNames = ['Number', 'Description', 'SCode', 'Source', 'HelpFile', 'HelpContext', 'CancelDisplay']; - - type Label2_BeforeDragOver_ArgNames = ['Cancel', 'Data', 'X', 'Y', 'DragState', 'Effect', 'Shift']; - - type Label2_BeforeDropOrPaste_ArgNames = ['Cancel', 'Action', 'Data', 'X', 'Y', 'Effect', 'Shift']; - - type Label2_Error_ArgNames = ['Number', 'Description', 'SCode', 'Source', 'HelpFile', 'HelpContext', 'CancelDisplay']; - - type ListBox_BeforeDragOver_ArgNames = ['Cancel', 'Data', 'X', 'Y', 'DragState', 'Effect', 'Shift']; - - type ListBox_BeforeDropOrPaste_ArgNames = ['Cancel', 'Action', 'Data', 'X', 'Y', 'Effect', 'Shift']; - - type ListBox_Error_ArgNames = ['Number', 'Description', 'SCode', 'Source', 'HelpFile', 'HelpContext', 'CancelDisplay']; - - type ListBox2_BeforeDragOver_ArgNames = ['Cancel', 'Data', 'X', 'Y', 'DragState', 'Effect', 'Shift']; - - type ListBox2_BeforeDropOrPaste_ArgNames = ['Cancel', 'Action', 'Data', 'X', 'Y', 'Effect', 'Shift']; - - type ListBox2_Error_ArgNames = ['Number', 'Description', 'SCode', 'Source', 'HelpFile', 'HelpContext', 'CancelDisplay']; + type Error_ArgNames = ['Number', 'Description', 'SCode', 'Source', 'HelpFile', 'HelpContext', 'CancelDisplay']; type MultiPage_BeforeDragOver_ArgNames = ['Index', 'Cancel', 'Control', 'Data', 'X', 'Y', 'State', 'Effect', 'Shift']; @@ -2085,283 +1291,11 @@ declare namespace MSForms { type MultiPage_Scroll_ArgNames = ['Index', 'ActionX', 'ActionY', 'RequestDx', 'RequestDy', 'ActualDx', 'ActualDy']; - type MultiPage2_BeforeDragOver_ArgNames = ['Index', 'Cancel', 'Control', 'Data', 'X', 'Y', 'State', 'Effect', 'Shift']; - - type MultiPage2_BeforeDropOrPaste_ArgNames = ['Index', 'Cancel', 'Control', 'Action', 'Data', 'X', 'Y', 'Effect', 'Shift']; - - type MultiPage2_Error_ArgNames = ['Index', 'Number', 'Description', 'SCode', 'Source', 'HelpFile', 'HelpContext', 'CancelDisplay']; - - type MultiPage2_Scroll_ArgNames = ['Index', 'ActionX', 'ActionY', 'RequestDx', 'RequestDy', 'ActualDx', 'ActualDy']; - - type OptionButton_BeforeDragOver_ArgNames = ['Cancel', 'Data', 'X', 'Y', 'DragState', 'Effect', 'Shift']; - - type OptionButton_BeforeDropOrPaste_ArgNames = ['Cancel', 'Action', 'Data', 'X', 'Y', 'Effect', 'Shift']; - - type OptionButton_Error_ArgNames = ['Number', 'Description', 'SCode', 'Source', 'HelpFile', 'HelpContext', 'CancelDisplay']; - - type OptionButton2_BeforeDragOver_ArgNames = ['Cancel', 'Data', 'X', 'Y', 'DragState', 'Effect', 'Shift']; - - type OptionButton2_BeforeDropOrPaste_ArgNames = ['Cancel', 'Action', 'Data', 'X', 'Y', 'Effect', 'Shift']; - - type OptionButton2_Error_ArgNames = ['Number', 'Description', 'SCode', 'Source', 'HelpFile', 'HelpContext', 'CancelDisplay']; - - type ScrollBar_BeforeDragOver_ArgNames = ['Cancel', 'Data', 'X', 'Y', 'DragState', 'Effect', 'Shift']; - - type ScrollBar_BeforeDropOrPaste_ArgNames = ['Cancel', 'Action', 'Data', 'X', 'Y', 'Effect', 'Shift']; - - type ScrollBar_Error_ArgNames = ['Number', 'Description', 'SCode', 'Source', 'HelpFile', 'HelpContext', 'CancelDisplay']; - - type ScrollBar2_BeforeDragOver_ArgNames = ['Cancel', 'Data', 'X', 'Y', 'DragState', 'Effect', 'Shift']; - - type ScrollBar2_BeforeDropOrPaste_ArgNames = ['Cancel', 'Action', 'Data', 'X', 'Y', 'Effect', 'Shift']; - - type ScrollBar2_Error_ArgNames = ['Number', 'Description', 'SCode', 'Source', 'HelpFile', 'HelpContext', 'CancelDisplay']; - - type SpinButton_BeforeDragOver_ArgNames = ['Cancel', 'Data', 'X', 'Y', 'DragState', 'Effect', 'Shift']; - - type SpinButton_BeforeDropOrPaste_ArgNames = ['Cancel', 'Action', 'Data', 'X', 'Y', 'Effect', 'Shift']; - - type SpinButton_Error_ArgNames = ['Number', 'Description', 'SCode', 'Source', 'HelpFile', 'HelpContext', 'CancelDisplay']; - - type SpinButton2_BeforeDragOver_ArgNames = ['Cancel', 'Data', 'X', 'Y', 'DragState', 'Effect', 'Shift']; - - type SpinButton2_BeforeDropOrPaste_ArgNames = ['Cancel', 'Action', 'Data', 'X', 'Y', 'Effect', 'Shift']; - - type SpinButton2_Error_ArgNames = ['Number', 'Description', 'SCode', 'Source', 'HelpFile', 'HelpContext', 'CancelDisplay']; - type TabStrip_BeforeDragOver_ArgNames = ['Index', 'Cancel', 'Data', 'X', 'Y', 'DragState', 'Effect', 'Shift']; type TabStrip_BeforeDropOrPaste_ArgNames = ['Index', 'Cancel', 'Action', 'Data', 'X', 'Y', 'Effect', 'Shift']; - type TabStrip_Error_ArgNames = ['Number', 'Description', 'SCode', 'Source', 'HelpFile', 'HelpContext', 'CancelDisplay']; - - type TabStrip2_BeforeDragOver_ArgNames = ['Index', 'Cancel', 'Data', 'X', 'Y', 'DragState', 'Effect', 'Shift']; - - type TabStrip2_BeforeDropOrPaste_ArgNames = ['Index', 'Cancel', 'Action', 'Data', 'X', 'Y', 'Effect', 'Shift']; - - type TabStrip2_Error_ArgNames = ['Number', 'Description', 'SCode', 'Source', 'HelpFile', 'HelpContext', 'CancelDisplay']; - - type TextBox_BeforeDragOver_ArgNames = ['Cancel', 'Data', 'X', 'Y', 'DragState', 'Effect', 'Shift']; - - type TextBox_BeforeDropOrPaste_ArgNames = ['Cancel', 'Action', 'Data', 'X', 'Y', 'Effect', 'Shift']; - - type TextBox_Error_ArgNames = ['Number', 'Description', 'SCode', 'Source', 'HelpFile', 'HelpContext', 'CancelDisplay']; - - type TextBox2_BeforeDragOver_ArgNames = ['Cancel', 'Data', 'X', 'Y', 'DragState', 'Effect', 'Shift']; - - type TextBox2_BeforeDropOrPaste_ArgNames = ['Cancel', 'Action', 'Data', 'X', 'Y', 'Effect', 'Shift']; - - type TextBox2_Error_ArgNames = ['Number', 'Description', 'SCode', 'Source', 'HelpFile', 'HelpContext', 'CancelDisplay']; - - type ToggleButton_BeforeDragOver_ArgNames = ['Cancel', 'Data', 'X', 'Y', 'DragState', 'Effect', 'Shift']; - - type ToggleButton_BeforeDropOrPaste_ArgNames = ['Cancel', 'Action', 'Data', 'X', 'Y', 'Effect', 'Shift']; - - type ToggleButton_Error_ArgNames = ['Number', 'Description', 'SCode', 'Source', 'HelpFile', 'HelpContext', 'CancelDisplay']; - - type ToggleButton2_BeforeDragOver_ArgNames = ['Cancel', 'Data', 'X', 'Y', 'DragState', 'Effect', 'Shift']; - - type ToggleButton2_BeforeDropOrPaste_ArgNames = ['Cancel', 'Action', 'Data', 'X', 'Y', 'Effect', 'Shift']; - - type ToggleButton2_Error_ArgNames = ['Number', 'Description', 'SCode', 'Source', 'HelpFile', 'HelpContext', 'CancelDisplay']; - - type UserForm_BeforeDragOver_ArgNames = ['Cancel', 'Control', 'Data', 'X', 'Y', 'State', 'Effect', 'Shift']; - - type UserForm_BeforeDropOrPaste_ArgNames = ['Cancel', 'Control', 'Action', 'Data', 'X', 'Y', 'Effect', 'Shift']; - - type UserForm_Error_ArgNames = ['Number', 'Description', 'SCode', 'Source', 'HelpFile', 'HelpContext', 'CancelDisplay']; - - type UserForm_Scroll_ArgNames = ['ActionX', 'ActionY', 'RequestDx', 'RequestDy', 'ActualDx', 'ActualDy']; - - type UserForm2_BeforeDragOver_ArgNames = ['Cancel', 'Control', 'Data', 'X', 'Y', 'State', 'Effect', 'Shift']; - - type UserForm2_BeforeDropOrPaste_ArgNames = ['Cancel', 'Control', 'Action', 'Data', 'X', 'Y', 'Effect', 'Shift']; - - type UserForm2_Error_ArgNames = ['Number', 'Description', 'SCode', 'Source', 'HelpFile', 'HelpContext', 'CancelDisplay']; - - type UserForm2_Scroll_ArgNames = ['ActionX', 'ActionY', 'RequestDx', 'RequestDy', 'ActualDx', 'ActualDy']; - - interface CheckBox_BeforeDragOver_Parameter { - readonly Cancel: ReturnBoolean; - readonly Data: DataObject; - readonly DragState: fmDragState; - readonly Effect: ReturnEffect; - readonly Shift: number; - readonly X: number; - readonly Y: number; - } - - interface CheckBox_BeforeDropOrPaste_Parameter { - readonly Action: fmAction; - readonly Cancel: ReturnBoolean; - readonly Data: DataObject; - readonly Effect: ReturnEffect; - readonly Shift: number; - readonly X: number; - readonly Y: number; - } - - interface CheckBox_Error_Parameter { - readonly CancelDisplay: ReturnBoolean; - readonly Description: ReturnString; - readonly HelpContext: number; - readonly HelpFile: string; - readonly Number: number; - readonly SCode: number; - readonly Source: string; - } - - interface CheckBox2_BeforeDragOver_Parameter { - readonly Cancel: ReturnBoolean; - readonly Data: DataObject; - readonly DragState: fmDragState; - readonly Effect: ReturnEffect; - readonly Shift: number; - readonly X: number; - readonly Y: number; - } - - interface CheckBox2_BeforeDropOrPaste_Parameter { - readonly Action: fmAction; - readonly Cancel: ReturnBoolean; - readonly Data: DataObject; - readonly Effect: ReturnEffect; - readonly Shift: number; - readonly X: number; - readonly Y: number; - } - - interface CheckBox2_Error_Parameter { - readonly CancelDisplay: ReturnBoolean; - readonly Description: ReturnString; - readonly HelpContext: number; - readonly HelpFile: string; - readonly Number: number; - readonly SCode: number; - readonly Source: string; - } - - interface ComboBox_BeforeDragOver_Parameter { - readonly Cancel: ReturnBoolean; - readonly Data: DataObject; - readonly DragState: fmDragState; - readonly Effect: ReturnEffect; - readonly Shift: number; - readonly X: number; - readonly Y: number; - } - - interface ComboBox_BeforeDropOrPaste_Parameter { - readonly Action: fmAction; - readonly Cancel: ReturnBoolean; - readonly Data: DataObject; - readonly Effect: ReturnEffect; - readonly Shift: number; - readonly X: number; - readonly Y: number; - } - - interface ComboBox_Error_Parameter { - readonly CancelDisplay: ReturnBoolean; - readonly Description: ReturnString; - readonly HelpContext: number; - readonly HelpFile: string; - readonly Number: number; - readonly SCode: number; - readonly Source: string; - } - - interface ComboBox2_BeforeDragOver_Parameter { - readonly Cancel: ReturnBoolean; - readonly Data: DataObject; - readonly DragState: fmDragState; - readonly Effect: ReturnEffect; - readonly Shift: number; - readonly X: number; - readonly Y: number; - } - - interface ComboBox2_BeforeDropOrPaste_Parameter { - readonly Action: fmAction; - readonly Cancel: ReturnBoolean; - readonly Data: DataObject; - readonly Effect: ReturnEffect; - readonly Shift: number; - readonly X: number; - readonly Y: number; - } - - interface ComboBox2_Error_Parameter { - readonly CancelDisplay: ReturnBoolean; - readonly Description: ReturnString; - readonly HelpContext: number; - readonly HelpFile: string; - readonly Number: number; - readonly SCode: number; - readonly Source: string; - } - - interface CommandButton_BeforeDragOver_Parameter { - readonly Cancel: ReturnBoolean; - readonly Data: DataObject; - readonly DragState: fmDragState; - readonly Effect: ReturnEffect; - readonly Shift: number; - readonly X: number; - readonly Y: number; - } - - interface CommandButton_BeforeDropOrPaste_Parameter { - readonly Action: fmAction; - readonly Cancel: ReturnBoolean; - readonly Data: DataObject; - readonly Effect: ReturnEffect; - readonly Shift: number; - readonly X: number; - readonly Y: number; - } - - interface CommandButton_Error_Parameter { - readonly CancelDisplay: ReturnBoolean; - readonly Description: ReturnString; - readonly HelpContext: number; - readonly HelpFile: string; - readonly Number: number; - readonly SCode: number; - readonly Source: string; - } - - interface CommandButton2_BeforeDragOver_Parameter { - readonly Cancel: ReturnBoolean; - readonly Data: DataObject; - readonly DragState: fmDragState; - readonly Effect: ReturnEffect; - readonly Shift: number; - readonly X: number; - readonly Y: number; - } - - interface CommandButton2_BeforeDropOrPaste_Parameter { - readonly Action: fmAction; - readonly Cancel: ReturnBoolean; - readonly Data: DataObject; - readonly Effect: ReturnEffect; - readonly Shift: number; - readonly X: number; - readonly Y: number; - } - - interface CommandButton2_Error_Parameter { - readonly CancelDisplay: ReturnBoolean; - readonly Description: ReturnString; - readonly HelpContext: number; - readonly HelpFile: string; - readonly Number: number; - readonly SCode: number; - readonly Source: string; - } - - interface Frame_BeforeDragOver_Parameter { + interface Container_BeforeDragOver_Parameter { readonly Cancel: ReturnBoolean; readonly Control: Control; readonly Data: DataObject; @@ -2372,7 +1306,7 @@ declare namespace MSForms { readonly Y: number; } - interface Frame_BeforeDropOrPaste_Parameter { + interface Container_BeforeDropOrPaste_Parameter { readonly Action: fmAction; readonly Cancel: ReturnBoolean; readonly Control: Control; @@ -2383,17 +1317,7 @@ declare namespace MSForms { readonly Y: number; } - interface Frame_Error_Parameter { - readonly CancelDisplay: ReturnBoolean; - readonly Description: ReturnString; - readonly HelpContext: number; - readonly HelpFile: string; - readonly Number: number; - readonly SCode: number; - readonly Source: string; - } - - interface Frame_Scroll_Parameter { + interface Container_Scroll_Parameter { readonly ActionX: fmScrollAction; readonly ActionY: fmScrollAction; readonly ActualDx: ReturnSingle; @@ -2402,48 +1326,7 @@ declare namespace MSForms { readonly RequestDy: number; } - interface Frame2_BeforeDragOver_Parameter { - readonly Cancel: ReturnBoolean; - readonly Control: Control; - readonly Data: DataObject; - readonly Effect: ReturnEffect; - readonly Shift: number; - readonly State: fmDragState; - readonly X: number; - readonly Y: number; - } - - interface Frame2_BeforeDropOrPaste_Parameter { - readonly Action: fmAction; - readonly Cancel: ReturnBoolean; - readonly Control: Control; - readonly Data: DataObject; - readonly Effect: ReturnEffect; - readonly Shift: number; - readonly X: number; - readonly Y: number; - } - - interface Frame2_Error_Parameter { - readonly CancelDisplay: ReturnBoolean; - readonly Description: ReturnString; - readonly HelpContext: number; - readonly HelpFile: string; - readonly Number: number; - readonly SCode: number; - readonly Source: string; - } - - interface Frame2_Scroll_Parameter { - readonly ActionX: fmScrollAction; - readonly ActionY: fmScrollAction; - readonly ActualDx: ReturnSingle; - readonly ActualDy: ReturnSingle; - readonly RequestDx: number; - readonly RequestDy: number; - } - - interface Image_BeforeDragOver_Parameter { + interface Control_BeforeDragOver_Parameter { readonly Cancel: ReturnBoolean; readonly Data: DataObject; readonly DragState: fmDragState; @@ -2453,7 +1336,7 @@ declare namespace MSForms { readonly Y: number; } - interface Image_BeforeDropOrPaste_Parameter { + interface Control_BeforeDropOrPaste_Parameter { readonly Action: fmAction; readonly Cancel: ReturnBoolean; readonly Data: DataObject; @@ -2463,157 +1346,7 @@ declare namespace MSForms { readonly Y: number; } - interface Image_Error_Parameter { - readonly CancelDisplay: ReturnBoolean; - readonly Description: ReturnString; - readonly HelpContext: number; - readonly HelpFile: string; - readonly Number: number; - readonly SCode: number; - readonly Source: string; - } - - interface Image2_BeforeDragOver_Parameter { - readonly Cancel: ReturnBoolean; - readonly Data: DataObject; - readonly DragState: fmDragState; - readonly Effect: ReturnEffect; - readonly Shift: number; - readonly X: number; - readonly Y: number; - } - - interface Image2_BeforeDropOrPaste_Parameter { - readonly Action: fmAction; - readonly Cancel: ReturnBoolean; - readonly Data: DataObject; - readonly Effect: ReturnEffect; - readonly Shift: number; - readonly X: number; - readonly Y: number; - } - - interface Image2_Error_Parameter { - readonly CancelDisplay: ReturnBoolean; - readonly Description: ReturnString; - readonly HelpContext: number; - readonly HelpFile: string; - readonly Number: number; - readonly SCode: number; - readonly Source: string; - } - - interface Label_BeforeDragOver_Parameter { - readonly Cancel: ReturnBoolean; - readonly Data: DataObject; - readonly DragState: fmDragState; - readonly Effect: ReturnEffect; - readonly Shift: number; - readonly X: number; - readonly Y: number; - } - - interface Label_BeforeDropOrPaste_Parameter { - readonly Action: fmAction; - readonly Cancel: ReturnBoolean; - readonly Data: DataObject; - readonly Effect: ReturnEffect; - readonly Shift: number; - readonly X: number; - readonly Y: number; - } - - interface Label_Error_Parameter { - readonly CancelDisplay: ReturnBoolean; - readonly Description: ReturnString; - readonly HelpContext: number; - readonly HelpFile: string; - readonly Number: number; - readonly SCode: number; - readonly Source: string; - } - - interface Label2_BeforeDragOver_Parameter { - readonly Cancel: ReturnBoolean; - readonly Data: DataObject; - readonly DragState: fmDragState; - readonly Effect: ReturnEffect; - readonly Shift: number; - readonly X: number; - readonly Y: number; - } - - interface Label2_BeforeDropOrPaste_Parameter { - readonly Action: fmAction; - readonly Cancel: ReturnBoolean; - readonly Data: DataObject; - readonly Effect: ReturnEffect; - readonly Shift: number; - readonly X: number; - readonly Y: number; - } - - interface Label2_Error_Parameter { - readonly CancelDisplay: ReturnBoolean; - readonly Description: ReturnString; - readonly HelpContext: number; - readonly HelpFile: string; - readonly Number: number; - readonly SCode: number; - readonly Source: string; - } - - interface ListBox_BeforeDragOver_Parameter { - readonly Cancel: ReturnBoolean; - readonly Data: DataObject; - readonly DragState: fmDragState; - readonly Effect: ReturnEffect; - readonly Shift: number; - readonly X: number; - readonly Y: number; - } - - interface ListBox_BeforeDropOrPaste_Parameter { - readonly Action: fmAction; - readonly Cancel: ReturnBoolean; - readonly Data: DataObject; - readonly Effect: ReturnEffect; - readonly Shift: number; - readonly X: number; - readonly Y: number; - } - - interface ListBox_Error_Parameter { - readonly CancelDisplay: ReturnBoolean; - readonly Description: ReturnString; - readonly HelpContext: number; - readonly HelpFile: string; - readonly Number: number; - readonly SCode: number; - readonly Source: string; - } - - interface ListBox2_BeforeDragOver_Parameter { - readonly Cancel: ReturnBoolean; - readonly Data: DataObject; - readonly DragState: fmDragState; - readonly Effect: ReturnEffect; - readonly Shift: number; - readonly X: number; - readonly Y: number; - } - - interface ListBox2_BeforeDropOrPaste_Parameter { - readonly Action: fmAction; - readonly Cancel: ReturnBoolean; - readonly Data: DataObject; - readonly Effect: ReturnEffect; - readonly Shift: number; - readonly X: number; - readonly Y: number; - } - - interface ListBox2_Error_Parameter { + interface Error_Parameter { readonly CancelDisplay: ReturnBoolean; readonly Description: ReturnString; readonly HelpContext: number; @@ -2668,231 +1401,6 @@ declare namespace MSForms { readonly RequestDy: number; } - interface MultiPage2_BeforeDragOver_Parameter { - readonly Cancel: ReturnBoolean; - readonly Control: Control; - readonly Data: DataObject; - readonly Effect: ReturnEffect; - readonly Index: number; - readonly Shift: number; - readonly State: fmDragState; - readonly X: number; - readonly Y: number; - } - - interface MultiPage2_BeforeDropOrPaste_Parameter { - readonly Action: fmAction; - readonly Cancel: ReturnBoolean; - readonly Control: Control; - readonly Data: DataObject; - readonly Effect: ReturnEffect; - readonly Index: number; - readonly Shift: number; - readonly X: number; - readonly Y: number; - } - - interface MultiPage2_Error_Parameter { - readonly CancelDisplay: ReturnBoolean; - readonly Description: ReturnString; - readonly HelpContext: number; - readonly HelpFile: string; - readonly Index: number; - readonly Number: number; - readonly SCode: number; - readonly Source: string; - } - - interface MultiPage2_Scroll_Parameter { - readonly ActionX: fmScrollAction; - readonly ActionY: fmScrollAction; - readonly ActualDx: ReturnSingle; - readonly ActualDy: ReturnSingle; - readonly Index: number; - readonly RequestDx: number; - readonly RequestDy: number; - } - - interface OptionButton_BeforeDragOver_Parameter { - readonly Cancel: ReturnBoolean; - readonly Data: DataObject; - readonly DragState: fmDragState; - readonly Effect: ReturnEffect; - readonly Shift: number; - readonly X: number; - readonly Y: number; - } - - interface OptionButton_BeforeDropOrPaste_Parameter { - readonly Action: fmAction; - readonly Cancel: ReturnBoolean; - readonly Data: DataObject; - readonly Effect: ReturnEffect; - readonly Shift: number; - readonly X: number; - readonly Y: number; - } - - interface OptionButton_Error_Parameter { - readonly CancelDisplay: ReturnBoolean; - readonly Description: ReturnString; - readonly HelpContext: number; - readonly HelpFile: string; - readonly Number: number; - readonly SCode: number; - readonly Source: string; - } - - interface OptionButton2_BeforeDragOver_Parameter { - readonly Cancel: ReturnBoolean; - readonly Data: DataObject; - readonly DragState: fmDragState; - readonly Effect: ReturnEffect; - readonly Shift: number; - readonly X: number; - readonly Y: number; - } - - interface OptionButton2_BeforeDropOrPaste_Parameter { - readonly Action: fmAction; - readonly Cancel: ReturnBoolean; - readonly Data: DataObject; - readonly Effect: ReturnEffect; - readonly Shift: number; - readonly X: number; - readonly Y: number; - } - - interface OptionButton2_Error_Parameter { - readonly CancelDisplay: ReturnBoolean; - readonly Description: ReturnString; - readonly HelpContext: number; - readonly HelpFile: string; - readonly Number: number; - readonly SCode: number; - readonly Source: string; - } - - interface ScrollBar_BeforeDragOver_Parameter { - readonly Cancel: ReturnBoolean; - readonly Data: DataObject; - readonly DragState: fmDragState; - readonly Effect: ReturnEffect; - readonly Shift: number; - readonly X: number; - readonly Y: number; - } - - interface ScrollBar_BeforeDropOrPaste_Parameter { - readonly Action: fmAction; - readonly Cancel: ReturnBoolean; - readonly Data: DataObject; - readonly Effect: ReturnEffect; - readonly Shift: number; - readonly X: number; - readonly Y: number; - } - - interface ScrollBar_Error_Parameter { - readonly CancelDisplay: ReturnBoolean; - readonly Description: ReturnString; - readonly HelpContext: number; - readonly HelpFile: string; - readonly Number: number; - readonly SCode: number; - readonly Source: string; - } - - interface ScrollBar2_BeforeDragOver_Parameter { - readonly Cancel: ReturnBoolean; - readonly Data: DataObject; - readonly DragState: fmDragState; - readonly Effect: ReturnEffect; - readonly Shift: number; - readonly X: number; - readonly Y: number; - } - - interface ScrollBar2_BeforeDropOrPaste_Parameter { - readonly Action: fmAction; - readonly Cancel: ReturnBoolean; - readonly Data: DataObject; - readonly Effect: ReturnEffect; - readonly Shift: number; - readonly X: number; - readonly Y: number; - } - - interface ScrollBar2_Error_Parameter { - readonly CancelDisplay: ReturnBoolean; - readonly Description: ReturnString; - readonly HelpContext: number; - readonly HelpFile: string; - readonly Number: number; - readonly SCode: number; - readonly Source: string; - } - - interface SpinButton_BeforeDragOver_Parameter { - readonly Cancel: ReturnBoolean; - readonly Data: DataObject; - readonly DragState: fmDragState; - readonly Effect: ReturnEffect; - readonly Shift: number; - readonly X: number; - readonly Y: number; - } - - interface SpinButton_BeforeDropOrPaste_Parameter { - readonly Action: fmAction; - readonly Cancel: ReturnBoolean; - readonly Data: DataObject; - readonly Effect: ReturnEffect; - readonly Shift: number; - readonly X: number; - readonly Y: number; - } - - interface SpinButton_Error_Parameter { - readonly CancelDisplay: ReturnBoolean; - readonly Description: ReturnString; - readonly HelpContext: number; - readonly HelpFile: string; - readonly Number: number; - readonly SCode: number; - readonly Source: string; - } - - interface SpinButton2_BeforeDragOver_Parameter { - readonly Cancel: ReturnBoolean; - readonly Data: DataObject; - readonly DragState: fmDragState; - readonly Effect: ReturnEffect; - readonly Shift: number; - readonly X: number; - readonly Y: number; - } - - interface SpinButton2_BeforeDropOrPaste_Parameter { - readonly Action: fmAction; - readonly Cancel: ReturnBoolean; - readonly Data: DataObject; - readonly Effect: ReturnEffect; - readonly Shift: number; - readonly X: number; - readonly Y: number; - } - - interface SpinButton2_Error_Parameter { - readonly CancelDisplay: ReturnBoolean; - readonly Description: ReturnString; - readonly HelpContext: number; - readonly HelpFile: string; - readonly Number: number; - readonly SCode: number; - readonly Source: string; - } - interface TabStrip_BeforeDragOver_Parameter { readonly Cancel: ReturnBoolean; readonly Data: DataObject; @@ -2914,844 +1422,150 @@ declare namespace MSForms { readonly X: number; readonly Y: number; } - - interface TabStrip_Error_Parameter { - readonly CancelDisplay: ReturnBoolean; - readonly Description: ReturnString; - readonly HelpContext: number; - readonly HelpFile: string; - readonly Number: number; - readonly SCode: number; - readonly Source: string; - } - - interface TabStrip2_BeforeDragOver_Parameter { - readonly Cancel: ReturnBoolean; - readonly Data: DataObject; - readonly DragState: fmDragState; - readonly Effect: ReturnEffect; - readonly Index: number; - readonly Shift: number; - readonly X: number; - readonly Y: number; - } - - interface TabStrip2_BeforeDropOrPaste_Parameter { - readonly Action: fmAction; - readonly Cancel: ReturnBoolean; - readonly Data: DataObject; - readonly Effect: ReturnEffect; - readonly Index: number; - readonly Shift: number; - readonly X: number; - readonly Y: number; - } - - interface TabStrip2_Error_Parameter { - readonly CancelDisplay: ReturnBoolean; - readonly Description: ReturnString; - readonly HelpContext: number; - readonly HelpFile: string; - readonly Number: number; - readonly SCode: number; - readonly Source: string; - } - - interface TextBox_BeforeDragOver_Parameter { - readonly Cancel: ReturnBoolean; - readonly Data: DataObject; - readonly DragState: fmDragState; - readonly Effect: ReturnEffect; - readonly Shift: number; - readonly X: number; - readonly Y: number; - } - - interface TextBox_BeforeDropOrPaste_Parameter { - readonly Action: fmAction; - readonly Cancel: ReturnBoolean; - readonly Data: DataObject; - readonly Effect: ReturnEffect; - readonly Shift: number; - readonly X: number; - readonly Y: number; - } - - interface TextBox_Error_Parameter { - readonly CancelDisplay: ReturnBoolean; - readonly Description: ReturnString; - readonly HelpContext: number; - readonly HelpFile: string; - readonly Number: number; - readonly SCode: number; - readonly Source: string; - } - - interface TextBox2_BeforeDragOver_Parameter { - readonly Cancel: ReturnBoolean; - readonly Data: DataObject; - readonly DragState: fmDragState; - readonly Effect: ReturnEffect; - readonly Shift: number; - readonly X: number; - readonly Y: number; - } - - interface TextBox2_BeforeDropOrPaste_Parameter { - readonly Action: fmAction; - readonly Cancel: ReturnBoolean; - readonly Data: DataObject; - readonly Effect: ReturnEffect; - readonly Shift: number; - readonly X: number; - readonly Y: number; - } - - interface TextBox2_Error_Parameter { - readonly CancelDisplay: ReturnBoolean; - readonly Description: ReturnString; - readonly HelpContext: number; - readonly HelpFile: string; - readonly Number: number; - readonly SCode: number; - readonly Source: string; - } - - interface ToggleButton_BeforeDragOver_Parameter { - readonly Cancel: ReturnBoolean; - readonly Data: DataObject; - readonly DragState: fmDragState; - readonly Effect: ReturnEffect; - readonly Shift: number; - readonly X: number; - readonly Y: number; - } - - interface ToggleButton_BeforeDropOrPaste_Parameter { - readonly Action: fmAction; - readonly Cancel: ReturnBoolean; - readonly Data: DataObject; - readonly Effect: ReturnEffect; - readonly Shift: number; - readonly X: number; - readonly Y: number; - } - - interface ToggleButton_Error_Parameter { - readonly CancelDisplay: ReturnBoolean; - readonly Description: ReturnString; - readonly HelpContext: number; - readonly HelpFile: string; - readonly Number: number; - readonly SCode: number; - readonly Source: string; - } - - interface ToggleButton2_BeforeDragOver_Parameter { - readonly Cancel: ReturnBoolean; - readonly Data: DataObject; - readonly DragState: fmDragState; - readonly Effect: ReturnEffect; - readonly Shift: number; - readonly X: number; - readonly Y: number; - } - - interface ToggleButton2_BeforeDropOrPaste_Parameter { - readonly Action: fmAction; - readonly Cancel: ReturnBoolean; - readonly Data: DataObject; - readonly Effect: ReturnEffect; - readonly Shift: number; - readonly X: number; - readonly Y: number; - } - - interface ToggleButton2_Error_Parameter { - readonly CancelDisplay: ReturnBoolean; - readonly Description: ReturnString; - readonly HelpContext: number; - readonly HelpFile: string; - readonly Number: number; - readonly SCode: number; - readonly Source: string; - } - - interface UserForm_BeforeDragOver_Parameter { - readonly Cancel: ReturnBoolean; - readonly Control: Control; - readonly Data: DataObject; - readonly Effect: ReturnEffect; - readonly Shift: number; - readonly State: fmDragState; - readonly X: number; - readonly Y: number; - } - - interface UserForm_BeforeDropOrPaste_Parameter { - readonly Action: fmAction; - readonly Cancel: ReturnBoolean; - readonly Control: Control; - readonly Data: DataObject; - readonly Effect: ReturnEffect; - readonly Shift: number; - readonly X: number; - readonly Y: number; - } - - interface UserForm_Error_Parameter { - readonly CancelDisplay: ReturnBoolean; - readonly Description: ReturnString; - readonly HelpContext: number; - readonly HelpFile: string; - readonly Number: number; - readonly SCode: number; - readonly Source: string; - } - - interface UserForm_Scroll_Parameter { - readonly ActionX: fmScrollAction; - readonly ActionY: fmScrollAction; - readonly ActualDx: ReturnSingle; - readonly ActualDy: ReturnSingle; - readonly RequestDx: number; - readonly RequestDy: number; - } - - interface UserForm2_BeforeDragOver_Parameter { - readonly Cancel: ReturnBoolean; - readonly Control: Control; - readonly Data: DataObject; - readonly Effect: ReturnEffect; - readonly Shift: number; - readonly State: fmDragState; - readonly X: number; - readonly Y: number; - } - - interface UserForm2_BeforeDropOrPaste_Parameter { - readonly Action: fmAction; - readonly Cancel: ReturnBoolean; - readonly Control: Control; - readonly Data: DataObject; - readonly Effect: ReturnEffect; - readonly Shift: number; - readonly X: number; - readonly Y: number; - } - - interface UserForm2_Error_Parameter { - readonly CancelDisplay: ReturnBoolean; - readonly Description: ReturnString; - readonly HelpContext: number; - readonly HelpFile: string; - readonly Number: number; - readonly SCode: number; - readonly Source: string; - } - - interface UserForm2_Scroll_Parameter { - readonly ActionX: fmScrollAction; - readonly ActionY: fmScrollAction; - readonly ActualDx: ReturnSingle; - readonly ActualDy: ReturnSingle; - readonly RequestDx: number; - readonly RequestDy: number; - } } } interface ActiveXObject { - on( - obj: MSForms.CheckBox, event: 'BeforeDragOver', argNames: MSForms.EventHelperTypes.CheckBox_BeforeDragOver_ArgNames, handler: ( - this: MSForms.CheckBox, parameter: MSForms.EventHelperTypes.CheckBox_BeforeDragOver_Parameter) => void): void; - on( - obj: MSForms.CheckBox, event: 'BeforeDropOrPaste', argNames: MSForms.EventHelperTypes.CheckBox_BeforeDropOrPaste_ArgNames, handler: ( - this: MSForms.CheckBox, parameter: MSForms.EventHelperTypes.CheckBox_BeforeDropOrPaste_Parameter) => void): void; + on(obj: MSForms.CheckBox, event: 'BeforeDragOver', argNames: MSForms.EventHelperTypes.Control_BeforeDragOver_ArgNames, handler: (this: MSForms.CheckBox, parameter: MSForms.EventHelperTypes.Control_BeforeDragOver_Parameter) => void): void; + on(obj: MSForms.CheckBox, event: 'BeforeDropOrPaste', argNames: MSForms.EventHelperTypes.Control_BeforeDropOrPaste_ArgNames, handler: (this: MSForms.CheckBox, parameter: MSForms.EventHelperTypes.Control_BeforeDropOrPaste_Parameter) => void): void; on(obj: MSForms.CheckBox, event: 'DblClick', argNames: ['Cancel'], handler: (this: MSForms.CheckBox, parameter: {readonly Cancel: MSForms.ReturnBoolean}) => void): void; - on( - obj: MSForms.CheckBox, event: 'Error', argNames: MSForms.EventHelperTypes.CheckBox_Error_ArgNames, handler: ( - this: MSForms.CheckBox, parameter: MSForms.EventHelperTypes.CheckBox_Error_Parameter) => void): void; - on( - obj: MSForms.CheckBox, event: 'KeyDown' | 'KeyUp', argNames: ['KeyCode', 'Shift'], handler: ( - this: MSForms.CheckBox, parameter: {readonly KeyCode: MSForms.ReturnInteger, readonly Shift: number}) => void): void; + on(obj: MSForms.CheckBox, event: 'Error', argNames: MSForms.EventHelperTypes.Error_ArgNames, handler: (this: MSForms.CheckBox, parameter: MSForms.EventHelperTypes.Error_Parameter) => void): void; + on(obj: MSForms.CheckBox, event: 'KeyDown' | 'KeyUp', argNames: ['KeyCode', 'Shift'], handler: (this: MSForms.CheckBox, parameter: {readonly KeyCode: MSForms.ReturnInteger, readonly Shift: number}) => void): void; on(obj: MSForms.CheckBox, event: 'KeyPress', argNames: ['KeyAscii'], handler: (this: MSForms.CheckBox, parameter: {readonly KeyAscii: MSForms.ReturnInteger}) => void): void; - on( - obj: MSForms.CheckBox, event: 'MouseDown' | 'MouseMove' | 'MouseUp', argNames: ['Button', 'Shift', 'X', 'Y'], handler: ( - this: MSForms.CheckBox, parameter: {readonly Button: number, readonly Shift: number, readonly X: number, readonly Y: number}) => void): void; - on( - obj: MSForms.CheckBox2, event: 'BeforeDragOver', argNames: MSForms.EventHelperTypes.CheckBox2_BeforeDragOver_ArgNames, handler: ( - this: MSForms.CheckBox2, parameter: MSForms.EventHelperTypes.CheckBox2_BeforeDragOver_Parameter) => void): void; - on( - obj: MSForms.CheckBox2, event: 'BeforeDropOrPaste', argNames: MSForms.EventHelperTypes.CheckBox2_BeforeDropOrPaste_ArgNames, handler: ( - this: MSForms.CheckBox2, parameter: MSForms.EventHelperTypes.CheckBox2_BeforeDropOrPaste_Parameter) => void): void; - on(obj: MSForms.CheckBox2, event: 'DblClick', argNames: ['Cancel'], handler: (this: MSForms.CheckBox2, parameter: {readonly Cancel: MSForms.ReturnBoolean}) => void): void; - on( - obj: MSForms.CheckBox2, event: 'Error', argNames: MSForms.EventHelperTypes.CheckBox2_Error_ArgNames, handler: ( - this: MSForms.CheckBox2, parameter: MSForms.EventHelperTypes.CheckBox2_Error_Parameter) => void): void; - on( - obj: MSForms.CheckBox2, event: 'KeyDown' | 'KeyUp', argNames: ['KeyCode', 'Shift'], handler: ( - this: MSForms.CheckBox2, parameter: {readonly KeyCode: MSForms.ReturnInteger, readonly Shift: number}) => void): void; - on(obj: MSForms.CheckBox2, event: 'KeyPress', argNames: ['KeyAscii'], handler: (this: MSForms.CheckBox2, parameter: {readonly KeyAscii: MSForms.ReturnInteger}) => void): void; - on( - obj: MSForms.CheckBox2, event: 'MouseDown' | 'MouseMove' | 'MouseUp', argNames: ['Button', 'Shift', 'X', 'Y'], handler: ( - this: MSForms.CheckBox2, parameter: {readonly Button: number, readonly Shift: number, readonly X: number, readonly Y: number}) => void): void; - on( - obj: MSForms.ComboBox, event: 'BeforeDragOver', argNames: MSForms.EventHelperTypes.ComboBox_BeforeDragOver_ArgNames, handler: ( - this: MSForms.ComboBox, parameter: MSForms.EventHelperTypes.ComboBox_BeforeDragOver_Parameter) => void): void; - on( - obj: MSForms.ComboBox, event: 'BeforeDropOrPaste', argNames: MSForms.EventHelperTypes.ComboBox_BeforeDropOrPaste_ArgNames, handler: ( - this: MSForms.ComboBox, parameter: MSForms.EventHelperTypes.ComboBox_BeforeDropOrPaste_Parameter) => void): void; + on(obj: MSForms.CheckBox, event: 'MouseDown' | 'MouseMove' | 'MouseUp', argNames: ['Button', 'Shift', 'X', 'Y'], handler: (this: MSForms.CheckBox, parameter: {readonly Button: number, readonly Shift: number, readonly X: number, readonly Y: number}) => void): void; + on(obj: MSForms.ComboBox, event: 'BeforeDragOver', argNames: MSForms.EventHelperTypes.Control_BeforeDragOver_ArgNames, handler: (this: MSForms.ComboBox, parameter: MSForms.EventHelperTypes.Control_BeforeDragOver_Parameter) => void): void; + on(obj: MSForms.ComboBox, event: 'BeforeDropOrPaste', argNames: MSForms.EventHelperTypes.Control_BeforeDropOrPaste_ArgNames, handler: (this: MSForms.ComboBox, parameter: MSForms.EventHelperTypes.Control_BeforeDropOrPaste_Parameter) => void): void; on(obj: MSForms.ComboBox, event: 'DblClick', argNames: ['Cancel'], handler: (this: MSForms.ComboBox, parameter: {readonly Cancel: MSForms.ReturnBoolean}) => void): void; - on( - obj: MSForms.ComboBox, event: 'Error', argNames: MSForms.EventHelperTypes.ComboBox_Error_ArgNames, handler: ( - this: MSForms.ComboBox, parameter: MSForms.EventHelperTypes.ComboBox_Error_Parameter) => void): void; - on( - obj: MSForms.ComboBox, event: 'KeyDown' | 'KeyUp', argNames: ['KeyCode', 'Shift'], handler: ( - this: MSForms.ComboBox, parameter: {readonly KeyCode: MSForms.ReturnInteger, readonly Shift: number}) => void): void; + on(obj: MSForms.ComboBox, event: 'Error', argNames: MSForms.EventHelperTypes.Error_ArgNames, handler: (this: MSForms.ComboBox, parameter: MSForms.EventHelperTypes.Error_Parameter) => void): void; + on(obj: MSForms.ComboBox, event: 'KeyDown' | 'KeyUp', argNames: ['KeyCode', 'Shift'], handler: (this: MSForms.ComboBox, parameter: {readonly KeyCode: MSForms.ReturnInteger, readonly Shift: number}) => void): void; on(obj: MSForms.ComboBox, event: 'KeyPress', argNames: ['KeyAscii'], handler: (this: MSForms.ComboBox, parameter: {readonly KeyAscii: MSForms.ReturnInteger}) => void): void; - on( - obj: MSForms.ComboBox, event: 'MouseDown' | 'MouseMove' | 'MouseUp', argNames: ['Button', 'Shift', 'X', 'Y'], handler: ( - this: MSForms.ComboBox, parameter: {readonly Button: number, readonly Shift: number, readonly X: number, readonly Y: number}) => void): void; - on( - obj: MSForms.ComboBox2, event: 'BeforeDragOver', argNames: MSForms.EventHelperTypes.ComboBox2_BeforeDragOver_ArgNames, handler: ( - this: MSForms.ComboBox2, parameter: MSForms.EventHelperTypes.ComboBox2_BeforeDragOver_Parameter) => void): void; - on( - obj: MSForms.ComboBox2, event: 'BeforeDropOrPaste', argNames: MSForms.EventHelperTypes.ComboBox2_BeforeDropOrPaste_ArgNames, handler: ( - this: MSForms.ComboBox2, parameter: MSForms.EventHelperTypes.ComboBox2_BeforeDropOrPaste_Parameter) => void): void; - on(obj: MSForms.ComboBox2, event: 'DblClick', argNames: ['Cancel'], handler: (this: MSForms.ComboBox2, parameter: {readonly Cancel: MSForms.ReturnBoolean}) => void): void; - on( - obj: MSForms.ComboBox2, event: 'Error', argNames: MSForms.EventHelperTypes.ComboBox2_Error_ArgNames, handler: ( - this: MSForms.ComboBox2, parameter: MSForms.EventHelperTypes.ComboBox2_Error_Parameter) => void): void; - on( - obj: MSForms.ComboBox2, event: 'KeyDown' | 'KeyUp', argNames: ['KeyCode', 'Shift'], handler: ( - this: MSForms.ComboBox2, parameter: {readonly KeyCode: MSForms.ReturnInteger, readonly Shift: number}) => void): void; - on(obj: MSForms.ComboBox2, event: 'KeyPress', argNames: ['KeyAscii'], handler: (this: MSForms.ComboBox2, parameter: {readonly KeyAscii: MSForms.ReturnInteger}) => void): void; - on( - obj: MSForms.ComboBox2, event: 'MouseDown' | 'MouseMove' | 'MouseUp', argNames: ['Button', 'Shift', 'X', 'Y'], handler: ( - this: MSForms.ComboBox2, parameter: {readonly Button: number, readonly Shift: number, readonly X: number, readonly Y: number}) => void): void; - on( - obj: MSForms.CommandButton, event: 'BeforeDragOver', argNames: MSForms.EventHelperTypes.CommandButton_BeforeDragOver_ArgNames, - handler: (this: MSForms.CommandButton, parameter: MSForms.EventHelperTypes.CommandButton_BeforeDragOver_Parameter) => void): void; - on( - obj: MSForms.CommandButton, event: 'BeforeDropOrPaste', argNames: MSForms.EventHelperTypes.CommandButton_BeforeDropOrPaste_ArgNames, - handler: (this: MSForms.CommandButton, parameter: MSForms.EventHelperTypes.CommandButton_BeforeDropOrPaste_Parameter) => void): void; + on(obj: MSForms.ComboBox, event: 'MouseDown' | 'MouseMove' | 'MouseUp', argNames: ['Button', 'Shift', 'X', 'Y'], handler: (this: MSForms.ComboBox, parameter: { readonly Button: number, readonly Shift: number, readonly X: number, readonly Y: number }) => void): void; + on(obj: MSForms.CommandButton, event: 'BeforeDragOver', argNames: MSForms.EventHelperTypes.Control_BeforeDragOver_ArgNames, handler: (this: MSForms.CommandButton, parameter: MSForms.EventHelperTypes.Control_BeforeDragOver_Parameter) => void): void; + on(obj: MSForms.CommandButton, event: 'BeforeDropOrPaste', argNames: MSForms.EventHelperTypes.Control_BeforeDropOrPaste_ArgNames, handler: (this: MSForms.CommandButton, parameter: MSForms.EventHelperTypes.Control_BeforeDropOrPaste_Parameter) => void): void; on(obj: MSForms.CommandButton, event: 'DblClick', argNames: ['Cancel'], handler: (this: MSForms.CommandButton, parameter: {readonly Cancel: MSForms.ReturnBoolean}) => void): void; - on( - obj: MSForms.CommandButton, event: 'Error', argNames: MSForms.EventHelperTypes.CommandButton_Error_ArgNames, handler: ( - this: MSForms.CommandButton, parameter: MSForms.EventHelperTypes.CommandButton_Error_Parameter) => void): void; - on( - obj: MSForms.CommandButton, event: 'KeyDown' | 'KeyUp', argNames: ['KeyCode', 'Shift'], handler: ( - this: MSForms.CommandButton, parameter: {readonly KeyCode: MSForms.ReturnInteger, readonly Shift: number}) => void): void; + on(obj: MSForms.CommandButton, event: 'Error', argNames: MSForms.EventHelperTypes.Error_ArgNames, handler: (this: MSForms.CommandButton, parameter: MSForms.EventHelperTypes.Error_Parameter) => void): void; + on(obj: MSForms.CommandButton, event: 'KeyDown' | 'KeyUp', argNames: ['KeyCode', 'Shift'], handler: (this: MSForms.CommandButton, parameter: {readonly KeyCode: MSForms.ReturnInteger, readonly Shift: number}) => void): void; on(obj: MSForms.CommandButton, event: 'KeyPress', argNames: ['KeyAscii'], handler: (this: MSForms.CommandButton, parameter: {readonly KeyAscii: MSForms.ReturnInteger}) => void): void; - on( - obj: MSForms.CommandButton, event: 'MouseDown' | 'MouseMove' | 'MouseUp', argNames: ['Button', 'Shift', 'X', 'Y'], handler: ( - this: MSForms.CommandButton, parameter: {readonly Button: number, readonly Shift: number, readonly X: number, readonly Y: number}) => void): void; - on( - obj: MSForms.CommandButton2, event: 'BeforeDragOver', argNames: MSForms.EventHelperTypes.CommandButton2_BeforeDragOver_ArgNames, - handler: (this: MSForms.CommandButton2, parameter: MSForms.EventHelperTypes.CommandButton2_BeforeDragOver_Parameter) => void): void; - on( - obj: MSForms.CommandButton2, event: 'BeforeDropOrPaste', argNames: MSForms.EventHelperTypes.CommandButton2_BeforeDropOrPaste_ArgNames, - handler: (this: MSForms.CommandButton2, parameter: MSForms.EventHelperTypes.CommandButton2_BeforeDropOrPaste_Parameter) => void): void; - on(obj: MSForms.CommandButton2, event: 'DblClick', argNames: ['Cancel'], handler: (this: MSForms.CommandButton2, parameter: {readonly Cancel: MSForms.ReturnBoolean}) => void): void; - on( - obj: MSForms.CommandButton2, event: 'Error', argNames: MSForms.EventHelperTypes.CommandButton2_Error_ArgNames, handler: ( - this: MSForms.CommandButton2, parameter: MSForms.EventHelperTypes.CommandButton2_Error_Parameter) => void): void; - on( - obj: MSForms.CommandButton2, event: 'KeyDown' | 'KeyUp', argNames: ['KeyCode', 'Shift'], handler: ( - this: MSForms.CommandButton2, parameter: {readonly KeyCode: MSForms.ReturnInteger, readonly Shift: number}) => void): void; - on(obj: MSForms.CommandButton2, event: 'KeyPress', argNames: ['KeyAscii'], handler: (this: MSForms.CommandButton2, parameter: {readonly KeyAscii: MSForms.ReturnInteger}) => void): void; - on( - obj: MSForms.CommandButton2, event: 'MouseDown' | 'MouseMove' | 'MouseUp', argNames: ['Button', 'Shift', 'X', 'Y'], handler: ( - this: MSForms.CommandButton2, parameter: {readonly Button: number, readonly Shift: number, readonly X: number, readonly Y: number}) => void): void; - on(obj: MSForms.Control, event: 'BeforeUpdate' | 'Exit', argNames: ['Cancel'], handler: (this: MSForms.Control, parameter: {readonly Cancel: MSForms.ReturnBoolean}) => void): void; + on(obj: MSForms.CommandButton, event: 'MouseDown' | 'MouseMove' | 'MouseUp', argNames: ['Button', 'Shift', 'X', 'Y'], handler: (this: MSForms.CommandButton, parameter: { readonly Button: number, readonly Shift: number, readonly X: number, readonly Y: number }) => void): void; + on(obj: MSForms.Control, event: 'BeforeUpdate' | 'Exit', argNames: ['Cancel'], handler: (this: MSForms.Control, parameter: { readonly Cancel: MSForms.ReturnBoolean }) => void): void; on(obj: MSForms.Frame, event: 'AddControl' | 'RemoveControl', argNames: ['Control'], handler: (this: MSForms.Frame, parameter: {readonly Control: MSForms.Control}) => void): void; - on( - obj: MSForms.Frame, event: 'BeforeDragOver', argNames: MSForms.EventHelperTypes.Frame_BeforeDragOver_ArgNames, handler: ( - this: MSForms.Frame, parameter: MSForms.EventHelperTypes.Frame_BeforeDragOver_Parameter) => void): void; - on( - obj: MSForms.Frame, event: 'BeforeDropOrPaste', argNames: MSForms.EventHelperTypes.Frame_BeforeDropOrPaste_ArgNames, handler: ( - this: MSForms.Frame, parameter: MSForms.EventHelperTypes.Frame_BeforeDropOrPaste_Parameter) => void): void; + on(obj: MSForms.Frame, event: 'BeforeDragOver', argNames: MSForms.EventHelperTypes.Container_BeforeDragOver_ArgNames, handler: (this: MSForms.Frame, parameter: MSForms.EventHelperTypes.Container_BeforeDragOver_Parameter) => void): void; + on(obj: MSForms.Frame, event: 'BeforeDropOrPaste', argNames: MSForms.EventHelperTypes.Container_BeforeDropOrPaste_ArgNames, handler: (this: MSForms.Frame, parameter: MSForms.EventHelperTypes.Container_BeforeDropOrPaste_Parameter) => void): void; on(obj: MSForms.Frame, event: 'DblClick', argNames: ['Cancel'], handler: (this: MSForms.Frame, parameter: {readonly Cancel: MSForms.ReturnBoolean}) => void): void; - on( - obj: MSForms.Frame, event: 'Error', argNames: MSForms.EventHelperTypes.Frame_Error_ArgNames, handler: ( - this: MSForms.Frame, parameter: MSForms.EventHelperTypes.Frame_Error_Parameter) => void): void; - on( - obj: MSForms.Frame, event: 'KeyDown' | 'KeyUp', argNames: ['KeyCode', 'Shift'], handler: ( - this: MSForms.Frame, parameter: {readonly KeyCode: MSForms.ReturnInteger, readonly Shift: number}) => void): void; + on(obj: MSForms.Frame, event: 'Error', argNames: MSForms.EventHelperTypes.Error_ArgNames, handler: (this: MSForms.Frame, parameter: MSForms.EventHelperTypes.Error_Parameter) => void): void; + on(obj: MSForms.Frame, event: 'KeyDown' | 'KeyUp', argNames: ['KeyCode', 'Shift'], handler: (this: MSForms.Frame, parameter: {readonly KeyCode: MSForms.ReturnInteger, readonly Shift: number}) => void): void; on(obj: MSForms.Frame, event: 'KeyPress', argNames: ['KeyAscii'], handler: (this: MSForms.Frame, parameter: {readonly KeyAscii: MSForms.ReturnInteger}) => void): void; - on( - obj: MSForms.Frame, event: 'MouseDown' | 'MouseMove' | 'MouseUp', argNames: ['Button', 'Shift', 'X', 'Y'], handler: ( - this: MSForms.Frame, parameter: {readonly Button: number, readonly Shift: number, readonly X: number, readonly Y: number}) => void): void; - on( - obj: MSForms.Frame, event: 'Scroll', argNames: MSForms.EventHelperTypes.Frame_Scroll_ArgNames, handler: ( - this: MSForms.Frame, parameter: MSForms.EventHelperTypes.Frame_Scroll_Parameter) => void): void; - on(obj: MSForms.Frame, event: 'Zoom', argNames: ['Percent'], handler: (this: MSForms.Frame, parameter: {Percent: number}) => void): void; - on(obj: MSForms.Frame2, event: 'AddControl' | 'RemoveControl', argNames: ['Control'], handler: (this: MSForms.Frame2, parameter: {readonly Control: MSForms.Control}) => void): void; - on( - obj: MSForms.Frame2, event: 'BeforeDragOver', argNames: MSForms.EventHelperTypes.Frame2_BeforeDragOver_ArgNames, handler: ( - this: MSForms.Frame2, parameter: MSForms.EventHelperTypes.Frame2_BeforeDragOver_Parameter) => void): void; - on( - obj: MSForms.Frame2, event: 'BeforeDropOrPaste', argNames: MSForms.EventHelperTypes.Frame2_BeforeDropOrPaste_ArgNames, handler: ( - this: MSForms.Frame2, parameter: MSForms.EventHelperTypes.Frame2_BeforeDropOrPaste_Parameter) => void): void; - on(obj: MSForms.Frame2, event: 'DblClick', argNames: ['Cancel'], handler: (this: MSForms.Frame2, parameter: {readonly Cancel: MSForms.ReturnBoolean}) => void): void; - on( - obj: MSForms.Frame2, event: 'Error', argNames: MSForms.EventHelperTypes.Frame2_Error_ArgNames, handler: ( - this: MSForms.Frame2, parameter: MSForms.EventHelperTypes.Frame2_Error_Parameter) => void): void; - on( - obj: MSForms.Frame2, event: 'KeyDown' | 'KeyUp', argNames: ['KeyCode', 'Shift'], handler: ( - this: MSForms.Frame2, parameter: {readonly KeyCode: MSForms.ReturnInteger, readonly Shift: number}) => void): void; - on(obj: MSForms.Frame2, event: 'KeyPress', argNames: ['KeyAscii'], handler: (this: MSForms.Frame2, parameter: {readonly KeyAscii: MSForms.ReturnInteger}) => void): void; - on( - obj: MSForms.Frame2, event: 'MouseDown' | 'MouseMove' | 'MouseUp', argNames: ['Button', 'Shift', 'X', 'Y'], handler: ( - this: MSForms.Frame2, parameter: {readonly Button: number, readonly Shift: number, readonly X: number, readonly Y: number}) => void): void; - on( - obj: MSForms.Frame2, event: 'Scroll', argNames: MSForms.EventHelperTypes.Frame2_Scroll_ArgNames, handler: ( - this: MSForms.Frame2, parameter: MSForms.EventHelperTypes.Frame2_Scroll_Parameter) => void): void; - on(obj: MSForms.Frame2, event: 'Zoom', argNames: ['Percent'], handler: (this: MSForms.Frame2, parameter: {Percent: number}) => void): void; - on( - obj: MSForms.Image, event: 'BeforeDragOver', argNames: MSForms.EventHelperTypes.Image_BeforeDragOver_ArgNames, handler: ( - this: MSForms.Image, parameter: MSForms.EventHelperTypes.Image_BeforeDragOver_Parameter) => void): void; - on( - obj: MSForms.Image, event: 'BeforeDropOrPaste', argNames: MSForms.EventHelperTypes.Image_BeforeDropOrPaste_ArgNames, handler: ( - this: MSForms.Image, parameter: MSForms.EventHelperTypes.Image_BeforeDropOrPaste_Parameter) => void): void; + on(obj: MSForms.Frame, event: 'MouseDown' | 'MouseMove' | 'MouseUp', argNames: ['Button', 'Shift', 'X', 'Y'], handler: (this: MSForms.Frame, parameter: {readonly Button: number, readonly Shift: number, readonly X: number, readonly Y: number}) => void): void; + on(obj: MSForms.Frame, event: 'Scroll', argNames: MSForms.EventHelperTypes.Container_Scroll_ArgNames, handler: (this: MSForms.Frame, parameter: MSForms.EventHelperTypes.Container_Scroll_Parameter) => void): void; + on(obj: MSForms.Frame, event: 'Zoom', argNames: ['Percent'], handler: (this: MSForms.Frame, parameter: { Percent: number }) => void): void; + on(obj: MSForms.Image, event: 'BeforeDragOver', argNames: MSForms.EventHelperTypes.Control_BeforeDragOver_ArgNames, handler: (this: MSForms.Image, parameter: MSForms.EventHelperTypes.Control_BeforeDragOver_Parameter) => void): void; + on(obj: MSForms.Image, event: 'BeforeDropOrPaste', argNames: MSForms.EventHelperTypes.Control_BeforeDropOrPaste_ArgNames, handler: (this: MSForms.Image, parameter: MSForms.EventHelperTypes.Control_BeforeDropOrPaste_Parameter) => void): void; on(obj: MSForms.Image, event: 'DblClick', argNames: ['Cancel'], handler: (this: MSForms.Image, parameter: {readonly Cancel: MSForms.ReturnBoolean}) => void): void; - on( - obj: MSForms.Image, event: 'Error', argNames: MSForms.EventHelperTypes.Image_Error_ArgNames, handler: ( - this: MSForms.Image, parameter: MSForms.EventHelperTypes.Image_Error_Parameter) => void): void; - on( - obj: MSForms.Image, event: 'MouseDown' | 'MouseMove' | 'MouseUp', argNames: ['Button', 'Shift', 'X', 'Y'], handler: ( - this: MSForms.Image, parameter: {readonly Button: number, readonly Shift: number, readonly X: number, readonly Y: number}) => void): void; - on( - obj: MSForms.Image2, event: 'BeforeDragOver', argNames: MSForms.EventHelperTypes.Image2_BeforeDragOver_ArgNames, handler: ( - this: MSForms.Image2, parameter: MSForms.EventHelperTypes.Image2_BeforeDragOver_Parameter) => void): void; - on( - obj: MSForms.Image2, event: 'BeforeDropOrPaste', argNames: MSForms.EventHelperTypes.Image2_BeforeDropOrPaste_ArgNames, handler: ( - this: MSForms.Image2, parameter: MSForms.EventHelperTypes.Image2_BeforeDropOrPaste_Parameter) => void): void; - on(obj: MSForms.Image2, event: 'DblClick', argNames: ['Cancel'], handler: (this: MSForms.Image2, parameter: {readonly Cancel: MSForms.ReturnBoolean}) => void): void; - on( - obj: MSForms.Image2, event: 'Error', argNames: MSForms.EventHelperTypes.Image2_Error_ArgNames, handler: ( - this: MSForms.Image2, parameter: MSForms.EventHelperTypes.Image2_Error_Parameter) => void): void; - on( - obj: MSForms.Image2, event: 'MouseDown' | 'MouseMove' | 'MouseUp', argNames: ['Button', 'Shift', 'X', 'Y'], handler: ( - this: MSForms.Image2, parameter: {readonly Button: number, readonly Shift: number, readonly X: number, readonly Y: number}) => void): void; - on( - obj: MSForms.Label, event: 'BeforeDragOver', argNames: MSForms.EventHelperTypes.Label_BeforeDragOver_ArgNames, handler: ( - this: MSForms.Label, parameter: MSForms.EventHelperTypes.Label_BeforeDragOver_Parameter) => void): void; - on( - obj: MSForms.Label, event: 'BeforeDropOrPaste', argNames: MSForms.EventHelperTypes.Label_BeforeDropOrPaste_ArgNames, handler: ( - this: MSForms.Label, parameter: MSForms.EventHelperTypes.Label_BeforeDropOrPaste_Parameter) => void): void; + on(obj: MSForms.Image, event: 'Error', argNames: MSForms.EventHelperTypes.Error_ArgNames, handler: (this: MSForms.Image, parameter: MSForms.EventHelperTypes.Error_Parameter) => void): void; + on(obj: MSForms.Image, event: 'MouseDown' | 'MouseMove' | 'MouseUp', argNames: ['Button', 'Shift', 'X', 'Y'], handler: (this: MSForms.Image, parameter: { readonly Button: number, readonly Shift: number, readonly X: number, readonly Y: number }) => void): void; + on(obj: MSForms.Label, event: 'BeforeDragOver', argNames: MSForms.EventHelperTypes.Control_BeforeDragOver_ArgNames, handler: (this: MSForms.Label, parameter: MSForms.EventHelperTypes.Control_BeforeDragOver_Parameter) => void): void; + on(obj: MSForms.Label, event: 'BeforeDropOrPaste', argNames: MSForms.EventHelperTypes.Control_BeforeDropOrPaste_ArgNames, handler: (this: MSForms.Label, parameter: MSForms.EventHelperTypes.Control_BeforeDropOrPaste_Parameter) => void): void; on(obj: MSForms.Label, event: 'DblClick', argNames: ['Cancel'], handler: (this: MSForms.Label, parameter: {readonly Cancel: MSForms.ReturnBoolean}) => void): void; - on( - obj: MSForms.Label, event: 'Error', argNames: MSForms.EventHelperTypes.Label_Error_ArgNames, handler: ( - this: MSForms.Label, parameter: MSForms.EventHelperTypes.Label_Error_Parameter) => void): void; - on( - obj: MSForms.Label, event: 'MouseDown' | 'MouseMove' | 'MouseUp', argNames: ['Button', 'Shift', 'X', 'Y'], handler: ( - this: MSForms.Label, parameter: {readonly Button: number, readonly Shift: number, readonly X: number, readonly Y: number}) => void): void; - on( - obj: MSForms.Label2, event: 'BeforeDragOver', argNames: MSForms.EventHelperTypes.Label2_BeforeDragOver_ArgNames, handler: ( - this: MSForms.Label2, parameter: MSForms.EventHelperTypes.Label2_BeforeDragOver_Parameter) => void): void; - on( - obj: MSForms.Label2, event: 'BeforeDropOrPaste', argNames: MSForms.EventHelperTypes.Label2_BeforeDropOrPaste_ArgNames, handler: ( - this: MSForms.Label2, parameter: MSForms.EventHelperTypes.Label2_BeforeDropOrPaste_Parameter) => void): void; - on(obj: MSForms.Label2, event: 'DblClick', argNames: ['Cancel'], handler: (this: MSForms.Label2, parameter: {readonly Cancel: MSForms.ReturnBoolean}) => void): void; - on( - obj: MSForms.Label2, event: 'Error', argNames: MSForms.EventHelperTypes.Label2_Error_ArgNames, handler: ( - this: MSForms.Label2, parameter: MSForms.EventHelperTypes.Label2_Error_Parameter) => void): void; - on( - obj: MSForms.Label2, event: 'MouseDown' | 'MouseMove' | 'MouseUp', argNames: ['Button', 'Shift', 'X', 'Y'], handler: ( - this: MSForms.Label2, parameter: {readonly Button: number, readonly Shift: number, readonly X: number, readonly Y: number}) => void): void; - on( - obj: MSForms.ListBox, event: 'BeforeDragOver', argNames: MSForms.EventHelperTypes.ListBox_BeforeDragOver_ArgNames, handler: ( - this: MSForms.ListBox, parameter: MSForms.EventHelperTypes.ListBox_BeforeDragOver_Parameter) => void): void; - on( - obj: MSForms.ListBox, event: 'BeforeDropOrPaste', argNames: MSForms.EventHelperTypes.ListBox_BeforeDropOrPaste_ArgNames, handler: ( - this: MSForms.ListBox, parameter: MSForms.EventHelperTypes.ListBox_BeforeDropOrPaste_Parameter) => void): void; + on(obj: MSForms.Label, event: 'Error', argNames: MSForms.EventHelperTypes.Error_ArgNames, handler: (this: MSForms.Label, parameter: MSForms.EventHelperTypes.Error_Parameter) => void): void; + on(obj: MSForms.Label, event: 'MouseDown' | 'MouseMove' | 'MouseUp', argNames: ['Button', 'Shift', 'X', 'Y'], handler: (this: MSForms.Label, parameter: { readonly Button: number, readonly Shift: number, readonly X: number, readonly Y: number }) => void): void; + on(obj: MSForms.ListBox, event: 'BeforeDragOver', argNames: MSForms.EventHelperTypes.Control_BeforeDragOver_ArgNames, handler: (this: MSForms.ListBox, parameter: MSForms.EventHelperTypes.Control_BeforeDragOver_Parameter) => void): void; + on(obj: MSForms.ListBox, event: 'BeforeDropOrPaste', argNames: MSForms.EventHelperTypes.Control_BeforeDropOrPaste_ArgNames, handler: (this: MSForms.ListBox, parameter: MSForms.EventHelperTypes.Control_BeforeDropOrPaste_Parameter) => void): void; on(obj: MSForms.ListBox, event: 'DblClick', argNames: ['Cancel'], handler: (this: MSForms.ListBox, parameter: {readonly Cancel: MSForms.ReturnBoolean}) => void): void; - on( - obj: MSForms.ListBox, event: 'Error', argNames: MSForms.EventHelperTypes.ListBox_Error_ArgNames, handler: ( - this: MSForms.ListBox, parameter: MSForms.EventHelperTypes.ListBox_Error_Parameter) => void): void; - on( - obj: MSForms.ListBox, event: 'KeyDown' | 'KeyUp', argNames: ['KeyCode', 'Shift'], handler: ( - this: MSForms.ListBox, parameter: {readonly KeyCode: MSForms.ReturnInteger, readonly Shift: number}) => void): void; + on(obj: MSForms.ListBox, event: 'Error', argNames: MSForms.EventHelperTypes.Error_ArgNames, handler: (this: MSForms.ListBox, parameter: MSForms.EventHelperTypes.Error_Parameter) => void): void; + on(obj: MSForms.ListBox, event: 'KeyDown' | 'KeyUp', argNames: ['KeyCode', 'Shift'], handler: (this: MSForms.ListBox, parameter: {readonly KeyCode: MSForms.ReturnInteger, readonly Shift: number}) => void): void; on(obj: MSForms.ListBox, event: 'KeyPress', argNames: ['KeyAscii'], handler: (this: MSForms.ListBox, parameter: {readonly KeyAscii: MSForms.ReturnInteger}) => void): void; - on( - obj: MSForms.ListBox, event: 'MouseDown' | 'MouseMove' | 'MouseUp', argNames: ['Button', 'Shift', 'X', 'Y'], handler: ( - this: MSForms.ListBox, parameter: {readonly Button: number, readonly Shift: number, readonly X: number, readonly Y: number}) => void): void; - on( - obj: MSForms.ListBox2, event: 'BeforeDragOver', argNames: MSForms.EventHelperTypes.ListBox2_BeforeDragOver_ArgNames, handler: ( - this: MSForms.ListBox2, parameter: MSForms.EventHelperTypes.ListBox2_BeforeDragOver_Parameter) => void): void; - on( - obj: MSForms.ListBox2, event: 'BeforeDropOrPaste', argNames: MSForms.EventHelperTypes.ListBox2_BeforeDropOrPaste_ArgNames, handler: ( - this: MSForms.ListBox2, parameter: MSForms.EventHelperTypes.ListBox2_BeforeDropOrPaste_Parameter) => void): void; - on(obj: MSForms.ListBox2, event: 'DblClick', argNames: ['Cancel'], handler: (this: MSForms.ListBox2, parameter: {readonly Cancel: MSForms.ReturnBoolean}) => void): void; - on( - obj: MSForms.ListBox2, event: 'Error', argNames: MSForms.EventHelperTypes.ListBox2_Error_ArgNames, handler: ( - this: MSForms.ListBox2, parameter: MSForms.EventHelperTypes.ListBox2_Error_Parameter) => void): void; - on( - obj: MSForms.ListBox2, event: 'KeyDown' | 'KeyUp', argNames: ['KeyCode', 'Shift'], handler: ( - this: MSForms.ListBox2, parameter: {readonly KeyCode: MSForms.ReturnInteger, readonly Shift: number}) => void): void; - on(obj: MSForms.ListBox2, event: 'KeyPress', argNames: ['KeyAscii'], handler: (this: MSForms.ListBox2, parameter: {readonly KeyAscii: MSForms.ReturnInteger}) => void): void; - on( - obj: MSForms.ListBox2, event: 'MouseDown' | 'MouseMove' | 'MouseUp', argNames: ['Button', 'Shift', 'X', 'Y'], handler: ( - this: MSForms.ListBox2, parameter: {readonly Button: number, readonly Shift: number, readonly X: number, readonly Y: number}) => void): void; - on( - obj: MSForms.MultiPage, event: 'AddControl' | 'RemoveControl', argNames: ['Index', 'Control'], handler: ( - this: MSForms.MultiPage, parameter: {readonly Index: number, readonly Control: MSForms.Control}) => void): void; - on( - obj: MSForms.MultiPage, event: 'BeforeDragOver', argNames: MSForms.EventHelperTypes.MultiPage_BeforeDragOver_ArgNames, handler: ( - this: MSForms.MultiPage, parameter: MSForms.EventHelperTypes.MultiPage_BeforeDragOver_Parameter) => void): void; - on( - obj: MSForms.MultiPage, event: 'BeforeDropOrPaste', argNames: MSForms.EventHelperTypes.MultiPage_BeforeDropOrPaste_ArgNames, handler: ( - this: MSForms.MultiPage, parameter: MSForms.EventHelperTypes.MultiPage_BeforeDropOrPaste_Parameter) => void): void; + on(obj: MSForms.ListBox, event: 'MouseDown' | 'MouseMove' | 'MouseUp', argNames: ['Button', 'Shift', 'X', 'Y'], handler: (this: MSForms.ListBox, parameter: { readonly Button: number, readonly Shift: number, readonly X: number, readonly Y: number }) => void): void; + on(obj: MSForms.MultiPage, event: 'AddControl' | 'RemoveControl', argNames: ['Index', 'Control'], handler: (this: MSForms.MultiPage, parameter: {readonly Index: number, readonly Control: MSForms.Control}) => void): void; + on(obj: MSForms.MultiPage, event: 'BeforeDragOver', argNames: MSForms.EventHelperTypes.MultiPage_BeforeDragOver_ArgNames, handler: (this: MSForms.MultiPage, parameter: MSForms.EventHelperTypes.MultiPage_BeforeDragOver_Parameter) => void): void; + on(obj: MSForms.MultiPage, event: 'BeforeDropOrPaste', argNames: MSForms.EventHelperTypes.MultiPage_BeforeDropOrPaste_ArgNames, handler: (this: MSForms.MultiPage, parameter: MSForms.EventHelperTypes.MultiPage_BeforeDropOrPaste_Parameter) => void): void; on(obj: MSForms.MultiPage, event: 'Click' | 'Layout', argNames: ['Index'], handler: (this: MSForms.MultiPage, parameter: {readonly Index: number}) => void): void; - on( - obj: MSForms.MultiPage, event: 'DblClick', argNames: ['Index', 'Cancel'], handler: ( - this: MSForms.MultiPage, parameter: {readonly Index: number, readonly Cancel: MSForms.ReturnBoolean}) => void): void; - on( - obj: MSForms.MultiPage, event: 'Error', argNames: MSForms.EventHelperTypes.MultiPage_Error_ArgNames, handler: ( - this: MSForms.MultiPage, parameter: MSForms.EventHelperTypes.MultiPage_Error_Parameter) => void): void; - on( - obj: MSForms.MultiPage, event: 'KeyDown' | 'KeyUp', argNames: ['KeyCode', 'Shift'], handler: ( - this: MSForms.MultiPage, parameter: {readonly KeyCode: MSForms.ReturnInteger, readonly Shift: number}) => void): void; + on(obj: MSForms.MultiPage, event: 'DblClick', argNames: ['Index', 'Cancel'], handler: (this: MSForms.MultiPage, parameter: {readonly Index: number, readonly Cancel: MSForms.ReturnBoolean}) => void): void; + on(obj: MSForms.MultiPage, event: 'Error', argNames: MSForms.EventHelperTypes.MultiPage_Error_ArgNames, handler: (this: MSForms.MultiPage, parameter: MSForms.EventHelperTypes.MultiPage_Error_Parameter) => void): void; + on(obj: MSForms.MultiPage, event: 'KeyDown' | 'KeyUp', argNames: ['KeyCode', 'Shift'], handler: (this: MSForms.MultiPage, parameter: {readonly KeyCode: MSForms.ReturnInteger, readonly Shift: number}) => void): void; on(obj: MSForms.MultiPage, event: 'KeyPress', argNames: ['KeyAscii'], handler: (this: MSForms.MultiPage, parameter: {readonly KeyAscii: MSForms.ReturnInteger}) => void): void; - on( - obj: MSForms.MultiPage, event: 'MouseDown' | 'MouseMove' | 'MouseUp', argNames: ['Index', 'Button', 'Shift', 'X', 'Y'], handler: ( - this: MSForms.MultiPage, parameter: {readonly Index: number, readonly Button: number, readonly Shift: number, readonly X: number, readonly Y: number}) => void): void; - on( - obj: MSForms.MultiPage, event: 'Scroll', argNames: MSForms.EventHelperTypes.MultiPage_Scroll_ArgNames, handler: ( - this: MSForms.MultiPage, parameter: MSForms.EventHelperTypes.MultiPage_Scroll_Parameter) => void): void; - on(obj: MSForms.MultiPage, event: 'Zoom', argNames: ['Index', 'Percent'], handler: (this: MSForms.MultiPage, parameter: {readonly Index: number, Percent: number}) => void): void; - on( - obj: MSForms.MultiPage2, event: 'AddControl' | 'RemoveControl', argNames: ['Index', 'Control'], handler: ( - this: MSForms.MultiPage2, parameter: {readonly Index: number, readonly Control: MSForms.Control}) => void): void; - on( - obj: MSForms.MultiPage2, event: 'BeforeDragOver', argNames: MSForms.EventHelperTypes.MultiPage2_BeforeDragOver_ArgNames, handler: ( - this: MSForms.MultiPage2, parameter: MSForms.EventHelperTypes.MultiPage2_BeforeDragOver_Parameter) => void): void; - on( - obj: MSForms.MultiPage2, event: 'BeforeDropOrPaste', argNames: MSForms.EventHelperTypes.MultiPage2_BeforeDropOrPaste_ArgNames, handler: ( - this: MSForms.MultiPage2, parameter: MSForms.EventHelperTypes.MultiPage2_BeforeDropOrPaste_Parameter) => void): void; - on(obj: MSForms.MultiPage2, event: 'Click' | 'Layout', argNames: ['Index'], handler: (this: MSForms.MultiPage2, parameter: {readonly Index: number}) => void): void; - on( - obj: MSForms.MultiPage2, event: 'DblClick', argNames: ['Index', 'Cancel'], handler: ( - this: MSForms.MultiPage2, parameter: {readonly Index: number, readonly Cancel: MSForms.ReturnBoolean}) => void): void; - on( - obj: MSForms.MultiPage2, event: 'Error', argNames: MSForms.EventHelperTypes.MultiPage2_Error_ArgNames, handler: ( - this: MSForms.MultiPage2, parameter: MSForms.EventHelperTypes.MultiPage2_Error_Parameter) => void): void; - on( - obj: MSForms.MultiPage2, event: 'KeyDown' | 'KeyUp', argNames: ['KeyCode', 'Shift'], handler: ( - this: MSForms.MultiPage2, parameter: {readonly KeyCode: MSForms.ReturnInteger, readonly Shift: number}) => void): void; - on(obj: MSForms.MultiPage2, event: 'KeyPress', argNames: ['KeyAscii'], handler: (this: MSForms.MultiPage2, parameter: {readonly KeyAscii: MSForms.ReturnInteger}) => void): void; - on( - obj: MSForms.MultiPage2, event: 'MouseDown' | 'MouseMove' | 'MouseUp', argNames: ['Index', 'Button', 'Shift', 'X', 'Y'], handler: ( - this: MSForms.MultiPage2, parameter: {readonly Index: number, readonly Button: number, readonly Shift: number, readonly X: number, readonly Y: number}) => void): void; - on( - obj: MSForms.MultiPage2, event: 'Scroll', argNames: MSForms.EventHelperTypes.MultiPage2_Scroll_ArgNames, handler: ( - this: MSForms.MultiPage2, parameter: MSForms.EventHelperTypes.MultiPage2_Scroll_Parameter) => void): void; - on(obj: MSForms.MultiPage2, event: 'Zoom', argNames: ['Index', 'Percent'], handler: (this: MSForms.MultiPage2, parameter: {readonly Index: number, Percent: number}) => void): void; - on( - obj: MSForms.OptionButton, event: 'BeforeDragOver', argNames: MSForms.EventHelperTypes.OptionButton_BeforeDragOver_ArgNames, handler: ( - this: MSForms.OptionButton, parameter: MSForms.EventHelperTypes.OptionButton_BeforeDragOver_Parameter) => void): void; - on( - obj: MSForms.OptionButton, event: 'BeforeDropOrPaste', argNames: MSForms.EventHelperTypes.OptionButton_BeforeDropOrPaste_ArgNames, - handler: (this: MSForms.OptionButton, parameter: MSForms.EventHelperTypes.OptionButton_BeforeDropOrPaste_Parameter) => void): void; + on(obj: MSForms.MultiPage, event: 'MouseDown' | 'MouseMove' | 'MouseUp', argNames: ['Index', 'Button', 'Shift', 'X', 'Y'], handler: (this: MSForms.MultiPage, parameter: {readonly Index: number, readonly Button: number, readonly Shift: number, readonly X: number, readonly Y: number}) => void): void; + on(obj: MSForms.MultiPage, event: 'Scroll', argNames: MSForms.EventHelperTypes.MultiPage_Scroll_ArgNames, handler: (this: MSForms.MultiPage, parameter: MSForms.EventHelperTypes.MultiPage_Scroll_Parameter) => void): void; + on(obj: MSForms.MultiPage, event: 'Zoom', argNames: ['Index', 'Percent'], handler: (this: MSForms.MultiPage, parameter: { readonly Index: number, Percent: number }) => void): void; + on(obj: MSForms.OptionButton, event: 'BeforeDragOver', argNames: MSForms.EventHelperTypes.Control_BeforeDragOver_ArgNames, handler: (this: MSForms.OptionButton, parameter: MSForms.EventHelperTypes.Control_BeforeDragOver_Parameter) => void): void; + on(obj: MSForms.OptionButton, event: 'BeforeDropOrPaste', argNames: MSForms.EventHelperTypes.Control_BeforeDropOrPaste_ArgNames, handler: (this: MSForms.OptionButton, parameter: MSForms.EventHelperTypes.Control_BeforeDropOrPaste_Parameter) => void): void; on(obj: MSForms.OptionButton, event: 'DblClick', argNames: ['Cancel'], handler: (this: MSForms.OptionButton, parameter: {readonly Cancel: MSForms.ReturnBoolean}) => void): void; - on( - obj: MSForms.OptionButton, event: 'Error', argNames: MSForms.EventHelperTypes.OptionButton_Error_ArgNames, handler: ( - this: MSForms.OptionButton, parameter: MSForms.EventHelperTypes.OptionButton_Error_Parameter) => void): void; - on( - obj: MSForms.OptionButton, event: 'KeyDown' | 'KeyUp', argNames: ['KeyCode', 'Shift'], handler: ( - this: MSForms.OptionButton, parameter: {readonly KeyCode: MSForms.ReturnInteger, readonly Shift: number}) => void): void; + on(obj: MSForms.OptionButton, event: 'Error', argNames: MSForms.EventHelperTypes.Error_ArgNames, handler: (this: MSForms.OptionButton, parameter: MSForms.EventHelperTypes.Error_Parameter) => void): void; + on(obj: MSForms.OptionButton, event: 'KeyDown' | 'KeyUp', argNames: ['KeyCode', 'Shift'], handler: (this: MSForms.OptionButton, parameter: {readonly KeyCode: MSForms.ReturnInteger, readonly Shift: number}) => void): void; on(obj: MSForms.OptionButton, event: 'KeyPress', argNames: ['KeyAscii'], handler: (this: MSForms.OptionButton, parameter: {readonly KeyAscii: MSForms.ReturnInteger}) => void): void; - on( - obj: MSForms.OptionButton, event: 'MouseDown' | 'MouseMove' | 'MouseUp', argNames: ['Button', 'Shift', 'X', 'Y'], handler: ( - this: MSForms.OptionButton, parameter: {readonly Button: number, readonly Shift: number, readonly X: number, readonly Y: number}) => void): void; - on( - obj: MSForms.OptionButton2, event: 'BeforeDragOver', argNames: MSForms.EventHelperTypes.OptionButton2_BeforeDragOver_ArgNames, - handler: (this: MSForms.OptionButton2, parameter: MSForms.EventHelperTypes.OptionButton2_BeforeDragOver_Parameter) => void): void; - on( - obj: MSForms.OptionButton2, event: 'BeforeDropOrPaste', argNames: MSForms.EventHelperTypes.OptionButton2_BeforeDropOrPaste_ArgNames, - handler: (this: MSForms.OptionButton2, parameter: MSForms.EventHelperTypes.OptionButton2_BeforeDropOrPaste_Parameter) => void): void; - on(obj: MSForms.OptionButton2, event: 'DblClick', argNames: ['Cancel'], handler: (this: MSForms.OptionButton2, parameter: {readonly Cancel: MSForms.ReturnBoolean}) => void): void; - on( - obj: MSForms.OptionButton2, event: 'Error', argNames: MSForms.EventHelperTypes.OptionButton2_Error_ArgNames, handler: ( - this: MSForms.OptionButton2, parameter: MSForms.EventHelperTypes.OptionButton2_Error_Parameter) => void): void; - on( - obj: MSForms.OptionButton2, event: 'KeyDown' | 'KeyUp', argNames: ['KeyCode', 'Shift'], handler: ( - this: MSForms.OptionButton2, parameter: {readonly KeyCode: MSForms.ReturnInteger, readonly Shift: number}) => void): void; - on(obj: MSForms.OptionButton2, event: 'KeyPress', argNames: ['KeyAscii'], handler: (this: MSForms.OptionButton2, parameter: {readonly KeyAscii: MSForms.ReturnInteger}) => void): void; - on( - obj: MSForms.OptionButton2, event: 'MouseDown' | 'MouseMove' | 'MouseUp', argNames: ['Button', 'Shift', 'X', 'Y'], handler: ( - this: MSForms.OptionButton2, parameter: {readonly Button: number, readonly Shift: number, readonly X: number, readonly Y: number}) => void): void; - on( - obj: MSForms.ScrollBar, event: 'BeforeDragOver', argNames: MSForms.EventHelperTypes.ScrollBar_BeforeDragOver_ArgNames, handler: ( - this: MSForms.ScrollBar, parameter: MSForms.EventHelperTypes.ScrollBar_BeforeDragOver_Parameter) => void): void; - on( - obj: MSForms.ScrollBar, event: 'BeforeDropOrPaste', argNames: MSForms.EventHelperTypes.ScrollBar_BeforeDropOrPaste_ArgNames, handler: ( - this: MSForms.ScrollBar, parameter: MSForms.EventHelperTypes.ScrollBar_BeforeDropOrPaste_Parameter) => void): void; - on( - obj: MSForms.ScrollBar, event: 'Error', argNames: MSForms.EventHelperTypes.ScrollBar_Error_ArgNames, handler: ( - this: MSForms.ScrollBar, parameter: MSForms.EventHelperTypes.ScrollBar_Error_Parameter) => void): void; - on( - obj: MSForms.ScrollBar, event: 'KeyDown' | 'KeyUp', argNames: ['KeyCode', 'Shift'], handler: ( - this: MSForms.ScrollBar, parameter: {readonly KeyCode: MSForms.ReturnInteger, readonly Shift: number}) => void): void; - on(obj: MSForms.ScrollBar, event: 'KeyPress', argNames: ['KeyAscii'], handler: (this: MSForms.ScrollBar, parameter: {readonly KeyAscii: MSForms.ReturnInteger}) => void): void; - on( - obj: MSForms.ScrollBar2, event: 'BeforeDragOver', argNames: MSForms.EventHelperTypes.ScrollBar2_BeforeDragOver_ArgNames, handler: ( - this: MSForms.ScrollBar2, parameter: MSForms.EventHelperTypes.ScrollBar2_BeforeDragOver_Parameter) => void): void; - on( - obj: MSForms.ScrollBar2, event: 'BeforeDropOrPaste', argNames: MSForms.EventHelperTypes.ScrollBar2_BeforeDropOrPaste_ArgNames, handler: ( - this: MSForms.ScrollBar2, parameter: MSForms.EventHelperTypes.ScrollBar2_BeforeDropOrPaste_Parameter) => void): void; - on( - obj: MSForms.ScrollBar2, event: 'Error', argNames: MSForms.EventHelperTypes.ScrollBar2_Error_ArgNames, handler: ( - this: MSForms.ScrollBar2, parameter: MSForms.EventHelperTypes.ScrollBar2_Error_Parameter) => void): void; - on( - obj: MSForms.ScrollBar2, event: 'KeyDown' | 'KeyUp', argNames: ['KeyCode', 'Shift'], handler: ( - this: MSForms.ScrollBar2, parameter: {readonly KeyCode: MSForms.ReturnInteger, readonly Shift: number}) => void): void; - on(obj: MSForms.ScrollBar2, event: 'KeyPress', argNames: ['KeyAscii'], handler: (this: MSForms.ScrollBar2, parameter: {readonly KeyAscii: MSForms.ReturnInteger}) => void): void; - on( - obj: MSForms.SpinButton, event: 'BeforeDragOver', argNames: MSForms.EventHelperTypes.SpinButton_BeforeDragOver_ArgNames, handler: ( - this: MSForms.SpinButton, parameter: MSForms.EventHelperTypes.SpinButton_BeforeDragOver_Parameter) => void): void; - on( - obj: MSForms.SpinButton, event: 'BeforeDropOrPaste', argNames: MSForms.EventHelperTypes.SpinButton_BeforeDropOrPaste_ArgNames, handler: ( - this: MSForms.SpinButton, parameter: MSForms.EventHelperTypes.SpinButton_BeforeDropOrPaste_Parameter) => void): void; - on( - obj: MSForms.SpinButton, event: 'Error', argNames: MSForms.EventHelperTypes.SpinButton_Error_ArgNames, handler: ( - this: MSForms.SpinButton, parameter: MSForms.EventHelperTypes.SpinButton_Error_Parameter) => void): void; - on( - obj: MSForms.SpinButton, event: 'KeyDown' | 'KeyUp', argNames: ['KeyCode', 'Shift'], handler: ( - this: MSForms.SpinButton, parameter: {readonly KeyCode: MSForms.ReturnInteger, readonly Shift: number}) => void): void; + on(obj: MSForms.OptionButton, event: 'MouseDown' | 'MouseMove' | 'MouseUp', argNames: ['Button', 'Shift', 'X', 'Y'], handler: (this: MSForms.OptionButton, parameter: { readonly Button: number, readonly Shift: number, readonly X: number, readonly Y: number }) => void): void; + on(obj: MSForms.ScrollBar, event: 'BeforeDragOver', argNames: MSForms.EventHelperTypes.Control_BeforeDragOver_ArgNames, handler: (this: MSForms.ScrollBar, parameter: MSForms.EventHelperTypes.Control_BeforeDragOver_Parameter) => void): void; + on(obj: MSForms.ScrollBar, event: 'BeforeDropOrPaste', argNames: MSForms.EventHelperTypes.Control_BeforeDropOrPaste_ArgNames, handler: (this: MSForms.ScrollBar, parameter: MSForms.EventHelperTypes.Control_BeforeDropOrPaste_Parameter) => void): void; + on(obj: MSForms.ScrollBar, event: 'Error', argNames: MSForms.EventHelperTypes.Error_ArgNames, handler: (this: MSForms.ScrollBar, parameter: MSForms.EventHelperTypes.Error_Parameter) => void): void; + on(obj: MSForms.ScrollBar, event: 'KeyDown' | 'KeyUp', argNames: ['KeyCode', 'Shift'], handler: (this: MSForms.ScrollBar, parameter: {readonly KeyCode: MSForms.ReturnInteger, readonly Shift: number}) => void): void; + on(obj: MSForms.ScrollBar, event: 'KeyPress', argNames: ['KeyAscii'], handler: (this: MSForms.ScrollBar, parameter: { readonly KeyAscii: MSForms.ReturnInteger }) => void): void; + on(obj: MSForms.SpinButton, event: 'BeforeDragOver', argNames: MSForms.EventHelperTypes.Control_BeforeDragOver_ArgNames, handler: (this: MSForms.SpinButton, parameter: MSForms.EventHelperTypes.Control_BeforeDragOver_Parameter) => void): void; + on(obj: MSForms.SpinButton, event: 'BeforeDropOrPaste', argNames: MSForms.EventHelperTypes.Control_BeforeDropOrPaste_ArgNames, handler: (this: MSForms.SpinButton, parameter: MSForms.EventHelperTypes.Control_BeforeDropOrPaste_Parameter) => void): void; + on(obj: MSForms.SpinButton, event: 'Error', argNames: MSForms.EventHelperTypes.Error_ArgNames, handler: (this: MSForms.SpinButton, parameter: MSForms.EventHelperTypes.Error_Parameter) => void): void; + on(obj: MSForms.SpinButton, event: 'KeyDown' | 'KeyUp', argNames: ['KeyCode', 'Shift'], handler: (this: MSForms.SpinButton, parameter: {readonly KeyCode: MSForms.ReturnInteger, readonly Shift: number}) => void): void; on(obj: MSForms.SpinButton, event: 'KeyPress', argNames: ['KeyAscii'], handler: (this: MSForms.SpinButton, parameter: {readonly KeyAscii: MSForms.ReturnInteger}) => void): void; - on( - obj: MSForms.SpinButton2, event: 'BeforeDragOver', argNames: MSForms.EventHelperTypes.SpinButton2_BeforeDragOver_ArgNames, handler: ( - this: MSForms.SpinButton2, parameter: MSForms.EventHelperTypes.SpinButton2_BeforeDragOver_Parameter) => void): void; - on( - obj: MSForms.SpinButton2, event: 'BeforeDropOrPaste', argNames: MSForms.EventHelperTypes.SpinButton2_BeforeDropOrPaste_ArgNames, - handler: (this: MSForms.SpinButton2, parameter: MSForms.EventHelperTypes.SpinButton2_BeforeDropOrPaste_Parameter) => void): void; - on( - obj: MSForms.SpinButton2, event: 'Error', argNames: MSForms.EventHelperTypes.SpinButton2_Error_ArgNames, handler: ( - this: MSForms.SpinButton2, parameter: MSForms.EventHelperTypes.SpinButton2_Error_Parameter) => void): void; - on( - obj: MSForms.SpinButton2, event: 'KeyDown' | 'KeyUp', argNames: ['KeyCode', 'Shift'], handler: ( - this: MSForms.SpinButton2, parameter: {readonly KeyCode: MSForms.ReturnInteger, readonly Shift: number}) => void): void; - on(obj: MSForms.SpinButton2, event: 'KeyPress', argNames: ['KeyAscii'], handler: (this: MSForms.SpinButton2, parameter: {readonly KeyAscii: MSForms.ReturnInteger}) => void): void; - on( - obj: MSForms.TabStrip, event: 'BeforeDragOver', argNames: MSForms.EventHelperTypes.TabStrip_BeforeDragOver_ArgNames, handler: ( - this: MSForms.TabStrip, parameter: MSForms.EventHelperTypes.TabStrip_BeforeDragOver_Parameter) => void): void; - on( - obj: MSForms.TabStrip, event: 'BeforeDropOrPaste', argNames: MSForms.EventHelperTypes.TabStrip_BeforeDropOrPaste_ArgNames, handler: ( - this: MSForms.TabStrip, parameter: MSForms.EventHelperTypes.TabStrip_BeforeDropOrPaste_Parameter) => void): void; + on(obj: MSForms.TabStrip, event: 'BeforeDragOver', argNames: MSForms.EventHelperTypes.TabStrip_BeforeDragOver_ArgNames, handler: (this: MSForms.TabStrip, parameter: MSForms.EventHelperTypes.TabStrip_BeforeDragOver_Parameter) => void): void; + on(obj: MSForms.TabStrip, event: 'BeforeDropOrPaste', argNames: MSForms.EventHelperTypes.TabStrip_BeforeDropOrPaste_ArgNames, handler: (this: MSForms.TabStrip, parameter: MSForms.EventHelperTypes.TabStrip_BeforeDropOrPaste_Parameter) => void): void; on(obj: MSForms.TabStrip, event: 'Click', argNames: ['Index'], handler: (this: MSForms.TabStrip, parameter: {readonly Index: number}) => void): void; - on( - obj: MSForms.TabStrip, event: 'DblClick', argNames: ['Index', 'Cancel'], handler: ( - this: MSForms.TabStrip, parameter: {readonly Index: number, readonly Cancel: MSForms.ReturnBoolean}) => void): void; - on( - obj: MSForms.TabStrip, event: 'Error', argNames: MSForms.EventHelperTypes.TabStrip_Error_ArgNames, handler: ( - this: MSForms.TabStrip, parameter: MSForms.EventHelperTypes.TabStrip_Error_Parameter) => void): void; - on( - obj: MSForms.TabStrip, event: 'KeyDown' | 'KeyUp', argNames: ['KeyCode', 'Shift'], handler: ( - this: MSForms.TabStrip, parameter: {readonly KeyCode: MSForms.ReturnInteger, readonly Shift: number}) => void): void; + on(obj: MSForms.TabStrip, event: 'DblClick', argNames: ['Index', 'Cancel'], handler: (this: MSForms.TabStrip, parameter: {readonly Index: number, readonly Cancel: MSForms.ReturnBoolean}) => void): void; + on(obj: MSForms.TabStrip, event: 'Error', argNames: MSForms.EventHelperTypes.Error_ArgNames, handler: (this: MSForms.TabStrip, parameter: MSForms.EventHelperTypes.Error_Parameter) => void): void; + on(obj: MSForms.TabStrip, event: 'KeyDown' | 'KeyUp', argNames: ['KeyCode', 'Shift'], handler: (this: MSForms.TabStrip, parameter: {readonly KeyCode: MSForms.ReturnInteger, readonly Shift: number}) => void): void; on(obj: MSForms.TabStrip, event: 'KeyPress', argNames: ['KeyAscii'], handler: (this: MSForms.TabStrip, parameter: {readonly KeyAscii: MSForms.ReturnInteger}) => void): void; - on( - obj: MSForms.TabStrip, event: 'MouseDown' | 'MouseMove' | 'MouseUp', argNames: ['Index', 'Button', 'Shift', 'X', 'Y'], handler: ( - this: MSForms.TabStrip, parameter: {readonly Index: number, readonly Button: number, readonly Shift: number, readonly X: number, readonly Y: number}) => void): void; - on( - obj: MSForms.TabStrip2, event: 'BeforeDragOver', argNames: MSForms.EventHelperTypes.TabStrip2_BeforeDragOver_ArgNames, handler: ( - this: MSForms.TabStrip2, parameter: MSForms.EventHelperTypes.TabStrip2_BeforeDragOver_Parameter) => void): void; - on( - obj: MSForms.TabStrip2, event: 'BeforeDropOrPaste', argNames: MSForms.EventHelperTypes.TabStrip2_BeforeDropOrPaste_ArgNames, handler: ( - this: MSForms.TabStrip2, parameter: MSForms.EventHelperTypes.TabStrip2_BeforeDropOrPaste_Parameter) => void): void; - on(obj: MSForms.TabStrip2, event: 'Click', argNames: ['Index'], handler: (this: MSForms.TabStrip2, parameter: {readonly Index: number}) => void): void; - on( - obj: MSForms.TabStrip2, event: 'DblClick', argNames: ['Index', 'Cancel'], handler: ( - this: MSForms.TabStrip2, parameter: {readonly Index: number, readonly Cancel: MSForms.ReturnBoolean}) => void): void; - on( - obj: MSForms.TabStrip2, event: 'Error', argNames: MSForms.EventHelperTypes.TabStrip2_Error_ArgNames, handler: ( - this: MSForms.TabStrip2, parameter: MSForms.EventHelperTypes.TabStrip2_Error_Parameter) => void): void; - on( - obj: MSForms.TabStrip2, event: 'KeyDown' | 'KeyUp', argNames: ['KeyCode', 'Shift'], handler: ( - this: MSForms.TabStrip2, parameter: {readonly KeyCode: MSForms.ReturnInteger, readonly Shift: number}) => void): void; - on(obj: MSForms.TabStrip2, event: 'KeyPress', argNames: ['KeyAscii'], handler: (this: MSForms.TabStrip2, parameter: {readonly KeyAscii: MSForms.ReturnInteger}) => void): void; - on( - obj: MSForms.TabStrip2, event: 'MouseDown' | 'MouseMove' | 'MouseUp', argNames: ['Index', 'Button', 'Shift', 'X', 'Y'], handler: ( - this: MSForms.TabStrip2, parameter: {readonly Index: number, readonly Button: number, readonly Shift: number, readonly X: number, readonly Y: number}) => void): void; - on( - obj: MSForms.TextBox, event: 'BeforeDragOver', argNames: MSForms.EventHelperTypes.TextBox_BeforeDragOver_ArgNames, handler: ( - this: MSForms.TextBox, parameter: MSForms.EventHelperTypes.TextBox_BeforeDragOver_Parameter) => void): void; - on( - obj: MSForms.TextBox, event: 'BeforeDropOrPaste', argNames: MSForms.EventHelperTypes.TextBox_BeforeDropOrPaste_ArgNames, handler: ( - this: MSForms.TextBox, parameter: MSForms.EventHelperTypes.TextBox_BeforeDropOrPaste_Parameter) => void): void; + on(obj: MSForms.TabStrip, event: 'MouseDown' | 'MouseMove' | 'MouseUp', argNames: ['Index', 'Button', 'Shift', 'X', 'Y'], handler: (this: MSForms.TabStrip, parameter: { readonly Index: number, readonly Button: number, readonly Shift: number, readonly X: number, readonly Y: number }) => void): void; + on(obj: MSForms.TextBox, event: 'BeforeDragOver', argNames: MSForms.EventHelperTypes.Control_BeforeDragOver_ArgNames, handler: (this: MSForms.TextBox, parameter: MSForms.EventHelperTypes.Control_BeforeDragOver_Parameter) => void): void; + on(obj: MSForms.TextBox, event: 'BeforeDropOrPaste', argNames: MSForms.EventHelperTypes.Control_BeforeDropOrPaste_ArgNames, handler: (this: MSForms.TextBox, parameter: MSForms.EventHelperTypes.Control_BeforeDropOrPaste_Parameter) => void): void; on(obj: MSForms.TextBox, event: 'DblClick', argNames: ['Cancel'], handler: (this: MSForms.TextBox, parameter: {readonly Cancel: MSForms.ReturnBoolean}) => void): void; - on( - obj: MSForms.TextBox, event: 'Error', argNames: MSForms.EventHelperTypes.TextBox_Error_ArgNames, handler: ( - this: MSForms.TextBox, parameter: MSForms.EventHelperTypes.TextBox_Error_Parameter) => void): void; - on( - obj: MSForms.TextBox, event: 'KeyDown' | 'KeyUp', argNames: ['KeyCode', 'Shift'], handler: ( - this: MSForms.TextBox, parameter: {readonly KeyCode: MSForms.ReturnInteger, readonly Shift: number}) => void): void; + on(obj: MSForms.TextBox, event: 'Error', argNames: MSForms.EventHelperTypes.Error_ArgNames, handler: (this: MSForms.TextBox, parameter: MSForms.EventHelperTypes.Error_Parameter) => void): void; + on(obj: MSForms.TextBox, event: 'KeyDown' | 'KeyUp', argNames: ['KeyCode', 'Shift'], handler: (this: MSForms.TextBox, parameter: {readonly KeyCode: MSForms.ReturnInteger, readonly Shift: number}) => void): void; on(obj: MSForms.TextBox, event: 'KeyPress', argNames: ['KeyAscii'], handler: (this: MSForms.TextBox, parameter: {readonly KeyAscii: MSForms.ReturnInteger}) => void): void; - on( - obj: MSForms.TextBox, event: 'MouseDown' | 'MouseMove' | 'MouseUp', argNames: ['Button', 'Shift', 'X', 'Y'], handler: ( - this: MSForms.TextBox, parameter: {readonly Button: number, readonly Shift: number, readonly X: number, readonly Y: number}) => void): void; - on( - obj: MSForms.TextBox2, event: 'BeforeDragOver', argNames: MSForms.EventHelperTypes.TextBox2_BeforeDragOver_ArgNames, handler: ( - this: MSForms.TextBox2, parameter: MSForms.EventHelperTypes.TextBox2_BeforeDragOver_Parameter) => void): void; - on( - obj: MSForms.TextBox2, event: 'BeforeDropOrPaste', argNames: MSForms.EventHelperTypes.TextBox2_BeforeDropOrPaste_ArgNames, handler: ( - this: MSForms.TextBox2, parameter: MSForms.EventHelperTypes.TextBox2_BeforeDropOrPaste_Parameter) => void): void; - on(obj: MSForms.TextBox2, event: 'DblClick', argNames: ['Cancel'], handler: (this: MSForms.TextBox2, parameter: {readonly Cancel: MSForms.ReturnBoolean}) => void): void; - on( - obj: MSForms.TextBox2, event: 'Error', argNames: MSForms.EventHelperTypes.TextBox2_Error_ArgNames, handler: ( - this: MSForms.TextBox2, parameter: MSForms.EventHelperTypes.TextBox2_Error_Parameter) => void): void; - on( - obj: MSForms.TextBox2, event: 'KeyDown' | 'KeyUp', argNames: ['KeyCode', 'Shift'], handler: ( - this: MSForms.TextBox2, parameter: {readonly KeyCode: MSForms.ReturnInteger, readonly Shift: number}) => void): void; - on(obj: MSForms.TextBox2, event: 'KeyPress', argNames: ['KeyAscii'], handler: (this: MSForms.TextBox2, parameter: {readonly KeyAscii: MSForms.ReturnInteger}) => void): void; - on( - obj: MSForms.TextBox2, event: 'MouseDown' | 'MouseMove' | 'MouseUp', argNames: ['Button', 'Shift', 'X', 'Y'], handler: ( - this: MSForms.TextBox2, parameter: {readonly Button: number, readonly Shift: number, readonly X: number, readonly Y: number}) => void): void; - on( - obj: MSForms.ToggleButton, event: 'BeforeDragOver', argNames: MSForms.EventHelperTypes.ToggleButton_BeforeDragOver_ArgNames, handler: ( - this: MSForms.ToggleButton, parameter: MSForms.EventHelperTypes.ToggleButton_BeforeDragOver_Parameter) => void): void; - on( - obj: MSForms.ToggleButton, event: 'BeforeDropOrPaste', argNames: MSForms.EventHelperTypes.ToggleButton_BeforeDropOrPaste_ArgNames, - handler: (this: MSForms.ToggleButton, parameter: MSForms.EventHelperTypes.ToggleButton_BeforeDropOrPaste_Parameter) => void): void; + on(obj: MSForms.TextBox, event: 'MouseDown' | 'MouseMove' | 'MouseUp', argNames: ['Button', 'Shift', 'X', 'Y'], handler: (this: MSForms.TextBox, parameter: { readonly Button: number, readonly Shift: number, readonly X: number, readonly Y: number }) => void): void; + on(obj: MSForms.ToggleButton, event: 'BeforeDragOver', argNames: MSForms.EventHelperTypes.Control_BeforeDragOver_ArgNames, handler: (this: MSForms.ToggleButton, parameter: MSForms.EventHelperTypes.Control_BeforeDragOver_Parameter) => void): void; + on(obj: MSForms.ToggleButton, event: 'BeforeDropOrPaste', argNames: MSForms.EventHelperTypes.Control_BeforeDropOrPaste_ArgNames, handler: (this: MSForms.ToggleButton, parameter: MSForms.EventHelperTypes.Control_BeforeDropOrPaste_Parameter) => void): void; on(obj: MSForms.ToggleButton, event: 'DblClick', argNames: ['Cancel'], handler: (this: MSForms.ToggleButton, parameter: {readonly Cancel: MSForms.ReturnBoolean}) => void): void; - on( - obj: MSForms.ToggleButton, event: 'Error', argNames: MSForms.EventHelperTypes.ToggleButton_Error_ArgNames, handler: ( - this: MSForms.ToggleButton, parameter: MSForms.EventHelperTypes.ToggleButton_Error_Parameter) => void): void; - on( - obj: MSForms.ToggleButton, event: 'KeyDown' | 'KeyUp', argNames: ['KeyCode', 'Shift'], handler: ( - this: MSForms.ToggleButton, parameter: {readonly KeyCode: MSForms.ReturnInteger, readonly Shift: number}) => void): void; + on(obj: MSForms.ToggleButton, event: 'Error', argNames: MSForms.EventHelperTypes.Error_ArgNames, handler: (this: MSForms.ToggleButton, parameter: MSForms.EventHelperTypes.Error_Parameter) => void): void; + on(obj: MSForms.ToggleButton, event: 'KeyDown' | 'KeyUp', argNames: ['KeyCode', 'Shift'], handler: (this: MSForms.ToggleButton, parameter: {readonly KeyCode: MSForms.ReturnInteger, readonly Shift: number}) => void): void; on(obj: MSForms.ToggleButton, event: 'KeyPress', argNames: ['KeyAscii'], handler: (this: MSForms.ToggleButton, parameter: {readonly KeyAscii: MSForms.ReturnInteger}) => void): void; - on( - obj: MSForms.ToggleButton, event: 'MouseDown' | 'MouseMove' | 'MouseUp', argNames: ['Button', 'Shift', 'X', 'Y'], handler: ( - this: MSForms.ToggleButton, parameter: {readonly Button: number, readonly Shift: number, readonly X: number, readonly Y: number}) => void): void; - on( - obj: MSForms.ToggleButton2, event: 'BeforeDragOver', argNames: MSForms.EventHelperTypes.ToggleButton2_BeforeDragOver_ArgNames, - handler: (this: MSForms.ToggleButton2, parameter: MSForms.EventHelperTypes.ToggleButton2_BeforeDragOver_Parameter) => void): void; - on( - obj: MSForms.ToggleButton2, event: 'BeforeDropOrPaste', argNames: MSForms.EventHelperTypes.ToggleButton2_BeforeDropOrPaste_ArgNames, - handler: (this: MSForms.ToggleButton2, parameter: MSForms.EventHelperTypes.ToggleButton2_BeforeDropOrPaste_Parameter) => void): void; - on(obj: MSForms.ToggleButton2, event: 'DblClick', argNames: ['Cancel'], handler: (this: MSForms.ToggleButton2, parameter: {readonly Cancel: MSForms.ReturnBoolean}) => void): void; - on( - obj: MSForms.ToggleButton2, event: 'Error', argNames: MSForms.EventHelperTypes.ToggleButton2_Error_ArgNames, handler: ( - this: MSForms.ToggleButton2, parameter: MSForms.EventHelperTypes.ToggleButton2_Error_Parameter) => void): void; - on( - obj: MSForms.ToggleButton2, event: 'KeyDown' | 'KeyUp', argNames: ['KeyCode', 'Shift'], handler: ( - this: MSForms.ToggleButton2, parameter: {readonly KeyCode: MSForms.ReturnInteger, readonly Shift: number}) => void): void; - on(obj: MSForms.ToggleButton2, event: 'KeyPress', argNames: ['KeyAscii'], handler: (this: MSForms.ToggleButton2, parameter: {readonly KeyAscii: MSForms.ReturnInteger}) => void): void; - on( - obj: MSForms.ToggleButton2, event: 'MouseDown' | 'MouseMove' | 'MouseUp', argNames: ['Button', 'Shift', 'X', 'Y'], handler: ( - this: MSForms.ToggleButton2, parameter: {readonly Button: number, readonly Shift: number, readonly X: number, readonly Y: number}) => void): void; + on(obj: MSForms.ToggleButton, event: 'MouseDown' | 'MouseMove' | 'MouseUp', argNames: ['Button', 'Shift', 'X', 'Y'], handler: (this: MSForms.ToggleButton, parameter: { readonly Button: number, readonly Shift: number, readonly X: number, readonly Y: number }) => void): void; on(obj: MSForms.UserForm, event: 'AddControl' | 'RemoveControl', argNames: ['Control'], handler: (this: MSForms.UserForm, parameter: {readonly Control: MSForms.Control}) => void): void; - on( - obj: MSForms.UserForm, event: 'BeforeDragOver', argNames: MSForms.EventHelperTypes.UserForm_BeforeDragOver_ArgNames, handler: ( - this: MSForms.UserForm, parameter: MSForms.EventHelperTypes.UserForm_BeforeDragOver_Parameter) => void): void; - on( - obj: MSForms.UserForm, event: 'BeforeDropOrPaste', argNames: MSForms.EventHelperTypes.UserForm_BeforeDropOrPaste_ArgNames, handler: ( - this: MSForms.UserForm, parameter: MSForms.EventHelperTypes.UserForm_BeforeDropOrPaste_Parameter) => void): void; + on(obj: MSForms.UserForm, event: 'BeforeDragOver', argNames: MSForms.EventHelperTypes.Container_BeforeDragOver_ArgNames, handler: (this: MSForms.UserForm, parameter: MSForms.EventHelperTypes.Container_BeforeDragOver_Parameter) => void): void; + on(obj: MSForms.UserForm, event: 'BeforeDropOrPaste', argNames: MSForms.EventHelperTypes.Container_BeforeDropOrPaste_ArgNames, handler: (this: MSForms.UserForm, parameter: MSForms.EventHelperTypes.Container_BeforeDropOrPaste_Parameter) => void): void; on(obj: MSForms.UserForm, event: 'DblClick', argNames: ['Cancel'], handler: (this: MSForms.UserForm, parameter: {readonly Cancel: MSForms.ReturnBoolean}) => void): void; - on( - obj: MSForms.UserForm, event: 'Error', argNames: MSForms.EventHelperTypes.UserForm_Error_ArgNames, handler: ( - this: MSForms.UserForm, parameter: MSForms.EventHelperTypes.UserForm_Error_Parameter) => void): void; - on( - obj: MSForms.UserForm, event: 'KeyDown' | 'KeyUp', argNames: ['KeyCode', 'Shift'], handler: ( - this: MSForms.UserForm, parameter: {readonly KeyCode: MSForms.ReturnInteger, readonly Shift: number}) => void): void; + on(obj: MSForms.UserForm, event: 'Error', argNames: MSForms.EventHelperTypes.Error_ArgNames, handler: (this: MSForms.UserForm, parameter: MSForms.EventHelperTypes.Error_Parameter) => void): void; + on(obj: MSForms.UserForm, event: 'KeyDown' | 'KeyUp', argNames: ['KeyCode', 'Shift'], handler: (this: MSForms.UserForm, parameter: {readonly KeyCode: MSForms.ReturnInteger, readonly Shift: number}) => void): void; on(obj: MSForms.UserForm, event: 'KeyPress', argNames: ['KeyAscii'], handler: (this: MSForms.UserForm, parameter: {readonly KeyAscii: MSForms.ReturnInteger}) => void): void; - on( - obj: MSForms.UserForm, event: 'MouseDown' | 'MouseMove' | 'MouseUp', argNames: ['Button', 'Shift', 'X', 'Y'], handler: ( - this: MSForms.UserForm, parameter: {readonly Button: number, readonly Shift: number, readonly X: number, readonly Y: number}) => void): void; - on( - obj: MSForms.UserForm, event: 'Scroll', argNames: MSForms.EventHelperTypes.UserForm_Scroll_ArgNames, handler: ( - this: MSForms.UserForm, parameter: MSForms.EventHelperTypes.UserForm_Scroll_Parameter) => void): void; - on(obj: MSForms.UserForm, event: 'Zoom', argNames: ['Percent'], handler: (this: MSForms.UserForm, parameter: {Percent: number}) => void): void; - on(obj: MSForms.UserForm2, event: 'AddControl' | 'RemoveControl', argNames: ['Control'], handler: (this: MSForms.UserForm2, parameter: {readonly Control: MSForms.Control}) => void): void; - on( - obj: MSForms.UserForm2, event: 'BeforeDragOver', argNames: MSForms.EventHelperTypes.UserForm2_BeforeDragOver_ArgNames, handler: ( - this: MSForms.UserForm2, parameter: MSForms.EventHelperTypes.UserForm2_BeforeDragOver_Parameter) => void): void; - on( - obj: MSForms.UserForm2, event: 'BeforeDropOrPaste', argNames: MSForms.EventHelperTypes.UserForm2_BeforeDropOrPaste_ArgNames, handler: ( - this: MSForms.UserForm2, parameter: MSForms.EventHelperTypes.UserForm2_BeforeDropOrPaste_Parameter) => void): void; - on(obj: MSForms.UserForm2, event: 'DblClick', argNames: ['Cancel'], handler: (this: MSForms.UserForm2, parameter: {readonly Cancel: MSForms.ReturnBoolean}) => void): void; - on( - obj: MSForms.UserForm2, event: 'Error', argNames: MSForms.EventHelperTypes.UserForm2_Error_ArgNames, handler: ( - this: MSForms.UserForm2, parameter: MSForms.EventHelperTypes.UserForm2_Error_Parameter) => void): void; - on( - obj: MSForms.UserForm2, event: 'KeyDown' | 'KeyUp', argNames: ['KeyCode', 'Shift'], handler: ( - this: MSForms.UserForm2, parameter: {readonly KeyCode: MSForms.ReturnInteger, readonly Shift: number}) => void): void; - on(obj: MSForms.UserForm2, event: 'KeyPress', argNames: ['KeyAscii'], handler: (this: MSForms.UserForm2, parameter: {readonly KeyAscii: MSForms.ReturnInteger}) => void): void; - on( - obj: MSForms.UserForm2, event: 'MouseDown' | 'MouseMove' | 'MouseUp', argNames: ['Button', 'Shift', 'X', 'Y'], handler: ( - this: MSForms.UserForm2, parameter: {readonly Button: number, readonly Shift: number, readonly X: number, readonly Y: number}) => void): void; - on( - obj: MSForms.UserForm2, event: 'Scroll', argNames: MSForms.EventHelperTypes.UserForm2_Scroll_ArgNames, handler: ( - this: MSForms.UserForm2, parameter: MSForms.EventHelperTypes.UserForm2_Scroll_Parameter) => void): void; - on(obj: MSForms.UserForm2, event: 'Zoom', argNames: ['Percent'], handler: (this: MSForms.UserForm2, parameter: {Percent: number}) => void): void; + on(obj: MSForms.UserForm, event: 'MouseDown' | 'MouseMove' | 'MouseUp', argNames: ['Button', 'Shift', 'X', 'Y'], handler: (this: MSForms.UserForm, parameter: {readonly Button: number, readonly Shift: number, readonly X: number, readonly Y: number}) => void): void; + on(obj: MSForms.UserForm, event: 'Scroll', argNames: MSForms.EventHelperTypes.Container_Scroll_ArgNames, handler: (this: MSForms.UserForm, parameter: MSForms.EventHelperTypes.Container_Scroll_Parameter) => void): void; + on(obj: MSForms.UserForm, event: 'Zoom', argNames: ['Percent'], handler: (this: MSForms.UserForm, parameter: { Percent: number }) => void): void; on(obj: MSForms.CheckBox, event: 'Change' | 'Click', handler: (this: MSForms.CheckBox, parameter: {}) => void): void; - on(obj: MSForms.CheckBox2, event: 'Change' | 'Click', handler: (this: MSForms.CheckBox2, parameter: {}) => void): void; on(obj: MSForms.ComboBox, event: 'Change' | 'Click' | 'DropButtonClick', handler: (this: MSForms.ComboBox, parameter: {}) => void): void; - on(obj: MSForms.ComboBox2, event: 'Change' | 'Click' | 'DropButtonClick', handler: (this: MSForms.ComboBox2, parameter: {}) => void): void; on(obj: MSForms.CommandButton, event: 'Click', handler: (this: MSForms.CommandButton, parameter: {}) => void): void; - on(obj: MSForms.CommandButton2, event: 'Click', handler: (this: MSForms.CommandButton2, parameter: {}) => void): void; on(obj: MSForms.Control, event: 'AfterUpdate' | 'Enter', handler: (this: MSForms.Control, parameter: {}) => void): void; on(obj: MSForms.Frame, event: 'Click' | 'Layout', handler: (this: MSForms.Frame, parameter: {}) => void): void; - on(obj: MSForms.Frame2, event: 'Click' | 'Layout', handler: (this: MSForms.Frame2, parameter: {}) => void): void; on(obj: MSForms.HTMLCheckbox, event: 'Click', handler: (this: MSForms.HTMLCheckbox, parameter: {}) => void): void; - on(obj: MSForms.HTMLCheckbox2, event: 'Click', handler: (this: MSForms.HTMLCheckbox2, parameter: {}) => void): void; on(obj: MSForms.HTMLHidden, event: 'Click', handler: (this: MSForms.HTMLHidden, parameter: {}) => void): void; - on(obj: MSForms.HTMLHidden2, event: 'Click', handler: (this: MSForms.HTMLHidden2, parameter: {}) => void): void; on(obj: MSForms.HTMLImage, event: 'Click', handler: (this: MSForms.HTMLImage, parameter: {}) => void): void; - on(obj: MSForms.HTMLImage2, event: 'Click', handler: (this: MSForms.HTMLImage2, parameter: {}) => void): void; on(obj: MSForms.HTMLOption, event: 'Click', handler: (this: MSForms.HTMLOption, parameter: {}) => void): void; - on(obj: MSForms.HTMLOption2, event: 'Click', handler: (this: MSForms.HTMLOption2, parameter: {}) => void): void; on(obj: MSForms.HTMLPassword, event: 'Click', handler: (this: MSForms.HTMLPassword, parameter: {}) => void): void; - on(obj: MSForms.HTMLPassword2, event: 'Click', handler: (this: MSForms.HTMLPassword2, parameter: {}) => void): void; on(obj: MSForms.HTMLReset, event: 'Click', handler: (this: MSForms.HTMLReset, parameter: {}) => void): void; - on(obj: MSForms.HTMLReset2, event: 'Click', handler: (this: MSForms.HTMLReset2, parameter: {}) => void): void; on(obj: MSForms.HTMLSelect, event: 'Click', handler: (this: MSForms.HTMLSelect, parameter: {}) => void): void; - on(obj: MSForms.HTMLSelect2, event: 'Click', handler: (this: MSForms.HTMLSelect2, parameter: {}) => void): void; on(obj: MSForms.HTMLSubmit, event: 'Click', handler: (this: MSForms.HTMLSubmit, parameter: {}) => void): void; - on(obj: MSForms.HTMLSubmit2, event: 'Click', handler: (this: MSForms.HTMLSubmit2, parameter: {}) => void): void; on(obj: MSForms.HTMLText, event: 'Click', handler: (this: MSForms.HTMLText, parameter: {}) => void): void; - on(obj: MSForms.HTMLText2, event: 'Click', handler: (this: MSForms.HTMLText2, parameter: {}) => void): void; on(obj: MSForms.HTMLTextArea, event: 'Click', handler: (this: MSForms.HTMLTextArea, parameter: {}) => void): void; - on(obj: MSForms.HTMLTextArea2, event: 'Click', handler: (this: MSForms.HTMLTextArea2, parameter: {}) => void): void; on(obj: MSForms.Image, event: 'Click', handler: (this: MSForms.Image, parameter: {}) => void): void; - on(obj: MSForms.Image2, event: 'Click', handler: (this: MSForms.Image2, parameter: {}) => void): void; on(obj: MSForms.Label, event: 'Click', handler: (this: MSForms.Label, parameter: {}) => void): void; - on(obj: MSForms.Label2, event: 'Click', handler: (this: MSForms.Label2, parameter: {}) => void): void; on(obj: MSForms.ListBox, event: 'Change' | 'Click', handler: (this: MSForms.ListBox, parameter: {}) => void): void; - on(obj: MSForms.ListBox2, event: 'Change' | 'Click', handler: (this: MSForms.ListBox2, parameter: {}) => void): void; on(obj: MSForms.MultiPage, event: 'Change', handler: (this: MSForms.MultiPage, parameter: {}) => void): void; - on(obj: MSForms.MultiPage2, event: 'Change', handler: (this: MSForms.MultiPage2, parameter: {}) => void): void; on(obj: MSForms.OptionButton, event: 'Change' | 'Click', handler: (this: MSForms.OptionButton, parameter: {}) => void): void; - on(obj: MSForms.OptionButton2, event: 'Change' | 'Click', handler: (this: MSForms.OptionButton2, parameter: {}) => void): void; on(obj: MSForms.ScrollBar, event: 'Change' | 'Scroll', handler: (this: MSForms.ScrollBar, parameter: {}) => void): void; - on(obj: MSForms.ScrollBar2, event: 'Change' | 'Scroll', handler: (this: MSForms.ScrollBar2, parameter: {}) => void): void; on(obj: MSForms.SpinButton, event: 'Change' | 'SpinDown' | 'SpinUp', handler: (this: MSForms.SpinButton, parameter: {}) => void): void; - on(obj: MSForms.SpinButton2, event: 'Change' | 'SpinDown' | 'SpinUp', handler: (this: MSForms.SpinButton2, parameter: {}) => void): void; on(obj: MSForms.TabStrip, event: 'Change', handler: (this: MSForms.TabStrip, parameter: {}) => void): void; - on(obj: MSForms.TabStrip2, event: 'Change', handler: (this: MSForms.TabStrip2, parameter: {}) => void): void; on(obj: MSForms.TextBox, event: 'Change' | 'DropButtonClick', handler: (this: MSForms.TextBox, parameter: {}) => void): void; - on(obj: MSForms.TextBox2, event: 'Change' | 'DropButtonClick', handler: (this: MSForms.TextBox2, parameter: {}) => void): void; on(obj: MSForms.ToggleButton, event: 'Change' | 'Click', handler: (this: MSForms.ToggleButton, parameter: {}) => void): void; - on(obj: MSForms.ToggleButton2, event: 'Change' | 'Click', handler: (this: MSForms.ToggleButton2, parameter: {}) => void): void; on(obj: MSForms.UserForm, event: 'Click' | 'Layout', handler: (this: MSForms.UserForm, parameter: {}) => void): void; - on(obj: MSForms.UserForm2, event: 'Click' | 'Layout', handler: (this: MSForms.UserForm2, parameter: {}) => void): void; - set(obj: MSForms.ComboBox | MSForms.ComboBox2 | MSForms.ListBox | MSForms.ListBox2, propertyName: 'Column' | 'List', parameterTypes: [number | undefined, number] | [number] | never[], - newValue: any): void; - set(obj: MSForms.ListBox | MSForms.ListBox2, propertyName: 'Selected', parameterTypes: [any], newValue: boolean): void; - new(progid: K): ActiveXObjectNameMap[K]; + set(obj: MSForms.ComboBox | MSForms.ListBox, propertyName: 'Column' | 'List', parameterTypes: [number, number] | [number], newValue: any): void; + set(obj: MSForms.ComboBox | MSForms.ListBox, propertyName: 'Column' | 'List', parameterTypes: number[], newValue: SafeArray): void; + set(obj: MSForms.ListBox, propertyName: 'Selected', parameterTypes: [any], newValue: boolean): void; } interface ActiveXObjectNameMap { 'Forms.Image': MSForms.Image; } - -interface EnumeratorConstructor { - new(col: MSForms.Controls | MSForms.Pages | MSForms.Tabs): Enumerator; // tslint:disable-line:use-default-type-parameter -} - -interface SafeArray { - _brand: SafeArray; -} diff --git a/types/activex-msforms/tsconfig.json b/types/activex-msforms/tsconfig.json index 38f907552d..074a493c66 100644 --- a/types/activex-msforms/tsconfig.json +++ b/types/activex-msforms/tsconfig.json @@ -2,8 +2,7 @@ "compilerOptions": { "module": "commonjs", "lib": [ - "es5", - "scripthost" + "es5" ], "noImplicitAny": true, "noImplicitThis": true, diff --git a/types/activex-msforms/tslint.json b/types/activex-msforms/tslint.json index 3224b40b8b..7b89accc6d 100644 --- a/types/activex-msforms/tslint.json +++ b/types/activex-msforms/tslint.json @@ -1,6 +1,7 @@ { "extends": "dtslint/dt.json", "rules": { - "no-const-enum": false + "no-const-enum": false, + "max-line-length": false } } diff --git a/types/activex-mshtml/activex-mshtml-tests.ts b/types/activex-mshtml/activex-mshtml-tests.ts index 324d3d09e2..bdf7f3dec3 100644 --- a/types/activex-mshtml/activex-mshtml-tests.ts +++ b/types/activex-mshtml/activex-mshtml-tests.ts @@ -1,3 +1,5 @@ +/// + let htmlfile = new ActiveXObject('htmlfile'); let htmldoc = htmlfile.createDocumentFromUrl('https://msdn.microsoft.com/en-us/library/aa741317(v=vs.85).aspx', 'null'); let length = htmldoc.all.length; diff --git a/types/activex-mshtml/index.d.ts b/types/activex-mshtml/index.d.ts index 01c6007620..93b307d3ba 100644 --- a/types/activex-mshtml/index.d.ts +++ b/types/activex-mshtml/index.d.ts @@ -2,7 +2,7 @@ // Project: https://msdn.microsoft.com/en-us/library/aa741317(v=vs.85).aspx // Definitions by: Zev Spitz // Definitions: https://github.com/DefinitelyTyped/DefinitelyTyped -// TypeScript Version: 2.3 +// TypeScript Version: 2.6 declare namespace MSHTML { const enum _BEHAVIOR_EVENT { @@ -2885,11 +2885,10 @@ declare namespace MSHTML { update(): void; } - class BlockFormats { - private 'MSHTML.BlockFormats_typekey': BlockFormats; - private constructor(); + interface BlockFormats { readonly Count: number; item(pvarIndex: any): string; + (pvarIndex: any): string; } class CanvasGradient { @@ -2975,7 +2974,7 @@ declare namespace MSHTML { private 'MSHTML.CClientCaps_typekey': CClientCaps; private constructor(); - /** @param string [bStrVer=''] */ + /** @param bStrVer [bStrVer=''] */ addComponentRequest(bstrName: string, bstrURL: string, bStrVer?: string): void; readonly availHeight: number; readonly availWidth: number; @@ -2991,7 +2990,7 @@ declare namespace MSHTML { getComponentVersion(bstrName: string, bstrURL: string): string; readonly height: number; - /** @param string [bStrVer=''] */ + /** @param bStrVer [bStrVer=''] */ isComponentInstalled(bstrName: string, bstrURL: string, bStrVer?: string): boolean; readonly javaEnabled: boolean; readonly onLine: boolean; @@ -3025,7 +3024,7 @@ declare namespace MSHTML { readonly dataTransfer: IHTMLDataTransfer; fromElement: IHTMLElement; - /** @param number [lFlags=0] */ + /** @param lFlags [lFlags=0] */ getAttribute(strAttributeName: string, lFlags?: number): any; keyCode: number; readonly nextPage: string; @@ -3037,14 +3036,14 @@ declare namespace MSHTML { reason: number; recordset: any; - /** @param number [lFlags=1] */ + /** @param lFlags [lFlags=1] */ removeAttribute(strAttributeName: string, lFlags?: number): boolean; repeat: boolean; returnValue: any; screenX: number; screenY: number; - /** @param number [lFlags=1] */ + /** @param lFlags [lFlags=1] */ setAttribute(strAttributeName: string, AttributeValue: any, lFlags?: number): void; shiftKey: boolean; shiftLeft: boolean; @@ -3086,7 +3085,7 @@ declare namespace MSHTML { readonly 'constructor': any; readonly length: number; - /** @param boolean [reload=false] */ + /** @param reload [reload=false] */ refresh(reload?: boolean): void; } @@ -3230,13 +3229,12 @@ declare namespace MSHTML { readonly type: string; } - class DOMChildrenCollection { - private 'MSHTML.DOMChildrenCollection_typekey': DOMChildrenCollection; - private constructor(); + interface DOMChildrenCollection { readonly 'constructor': any; ie9_item(index: number): any; item(index: number): any; readonly length: number; + (index: number): any; } class DOMCloseEvent { @@ -3348,7 +3346,7 @@ declare namespace MSHTML { readonly publicId: any; removeChild(oldChild: IHTMLDOMNode): IHTMLDOMNode; - /** @param boolean [fDeep=false] */ + /** @param fDeep [fDeep=false] */ removeNode(fDeep?: boolean): IHTMLDOMNode; replaceChild(newChild: IHTMLDOMNode, oldChild: IHTMLDOMNode): IHTMLDOMNode; replaceNode(replacement: IHTMLDOMNode): IHTMLDOMNode; @@ -3376,14 +3374,9 @@ declare namespace MSHTML { readonly eventPhase: number; readonly fromElement: IHTMLElement; getModifierState(keyArg: string): boolean; - initDragEvent( - eventType: string, canBubble: boolean, cancelable: boolean, viewArg: IHTMLWindow2, detailArg: number, screenXArg: number, screenYArg: number, - clientXArg: number, clientYArg: number, ctrlKeyArg: boolean, altKeyArg: boolean, shiftKeyArg: boolean, metaKeyArg: boolean, buttonArg: number, - relatedTargetArg: IEventTarget, dataTransferArg: IHTMLDataTransfer): void; + initDragEvent(eventType: string, canBubble: boolean, cancelable: boolean, viewArg: IHTMLWindow2, detailArg: number, screenXArg: number, screenYArg: number, clientXArg: number, clientYArg: number, ctrlKeyArg: boolean, altKeyArg: boolean, shiftKeyArg: boolean, metaKeyArg: boolean, buttonArg: number, relatedTargetArg: IEventTarget, dataTransferArg: IHTMLDataTransfer): void; initEvent(eventType: string, canBubble: boolean, cancelable: boolean): void; - initMouseEvent( - eventType: string, canBubble: boolean, cancelable: boolean, viewArg: IHTMLWindow2, detailArg: number, screenXArg: number, screenYArg: number, - clientXArg: number, clientYArg: number, ctrlKeyArg: boolean, altKeyArg: boolean, shiftKeyArg: boolean, metaKeyArg: boolean, buttonArg: number, relatedTargetArg: IEventTarget): void; + initMouseEvent(eventType: string, canBubble: boolean, cancelable: boolean, viewArg: IHTMLWindow2, detailArg: number, screenXArg: number, screenYArg: number, clientXArg: number, clientYArg: number, ctrlKeyArg: boolean, altKeyArg: boolean, shiftKeyArg: boolean, metaKeyArg: boolean, buttonArg: number, relatedTargetArg: IEventTarget): void; initUIEvent(eventType: string, canBubble: boolean, cancelable: boolean, view: IHTMLWindow2, detail: number): void; readonly isTrusted: boolean; readonly layerX: number; @@ -3479,8 +3472,7 @@ declare namespace MSHTML { getModifierState(keyArg: string): boolean; readonly ie9_char: any; initEvent(eventType: string, canBubble: boolean, cancelable: boolean): void; - initKeyboardEvent( - eventType: string, canBubble: boolean, cancelable: boolean, viewArg: IHTMLWindow2, keyArg: string, locationArg: number, modifiersListArg: string, repeat: boolean, locale: string): void; + initKeyboardEvent(eventType: string, canBubble: boolean, cancelable: boolean, viewArg: IHTMLWindow2, keyArg: string, locationArg: number, modifiersListArg: string, repeat: boolean, locale: string): void; initUIEvent(eventType: string, canBubble: boolean, cancelable: boolean, view: IHTMLWindow2, detail: number): void; readonly isTrusted: boolean; readonly key: string; @@ -3544,9 +3536,7 @@ declare namespace MSHTML { readonly fromElement: IHTMLElement; getModifierState(keyArg: string): boolean; initEvent(eventType: string, canBubble: boolean, cancelable: boolean): void; - initMouseEvent( - eventType: string, canBubble: boolean, cancelable: boolean, viewArg: IHTMLWindow2, detailArg: number, screenXArg: number, screenYArg: number, - clientXArg: number, clientYArg: number, ctrlKeyArg: boolean, altKeyArg: boolean, shiftKeyArg: boolean, metaKeyArg: boolean, buttonArg: number, relatedTargetArg: IEventTarget): void; + initMouseEvent(eventType: string, canBubble: boolean, cancelable: boolean, viewArg: IHTMLWindow2, detailArg: number, screenXArg: number, screenYArg: number, clientXArg: number, clientYArg: number, ctrlKeyArg: boolean, altKeyArg: boolean, shiftKeyArg: boolean, metaKeyArg: boolean, buttonArg: number, relatedTargetArg: IEventTarget): void; initUIEvent(eventType: string, canBubble: boolean, cancelable: boolean, view: IHTMLWindow2, detail: number): void; readonly isTrusted: boolean; readonly layerX: number; @@ -3593,12 +3583,8 @@ declare namespace MSHTML { readonly fromElement: IHTMLElement; getModifierState(keyArg: string): boolean; initEvent(eventType: string, canBubble: boolean, cancelable: boolean): void; - initMouseEvent( - eventType: string, canBubble: boolean, cancelable: boolean, viewArg: IHTMLWindow2, detailArg: number, screenXArg: number, screenYArg: number, - clientXArg: number, clientYArg: number, ctrlKeyArg: boolean, altKeyArg: boolean, shiftKeyArg: boolean, metaKeyArg: boolean, buttonArg: number, relatedTargetArg: IEventTarget): void; - initMouseWheelEvent( - eventType: string, canBubble: boolean, cancelable: boolean, viewArg: IHTMLWindow2, detailArg: number, screenXArg: number, screenYArg: number, - clientXArg: number, clientYArg: number, buttonArg: number, relatedTargetArg: IEventTarget, modifiersListArg: string, wheelDeltaArg: number): void; + initMouseEvent(eventType: string, canBubble: boolean, cancelable: boolean, viewArg: IHTMLWindow2, detailArg: number, screenXArg: number, screenYArg: number, clientXArg: number, clientYArg: number, ctrlKeyArg: boolean, altKeyArg: boolean, shiftKeyArg: boolean, metaKeyArg: boolean, buttonArg: number, relatedTargetArg: IEventTarget): void; + initMouseWheelEvent(eventType: string, canBubble: boolean, cancelable: boolean, viewArg: IHTMLWindow2, detailArg: number, screenXArg: number, screenYArg: number, clientXArg: number, clientYArg: number, buttonArg: number, relatedTargetArg: IEventTarget, modifiersListArg: string, wheelDeltaArg: number): void; initUIEvent(eventType: string, canBubble: boolean, cancelable: boolean, view: IHTMLWindow2, detail: number): void; readonly isTrusted: boolean; readonly layerX: number; @@ -3711,8 +3697,7 @@ declare namespace MSHTML { readonly defaultPrevented: boolean; readonly eventPhase: number; initEvent(eventType: string, canBubble: boolean, cancelable: boolean): void; - initMutationEvent( - eventType: string, canBubble: boolean, cancelable: boolean, relatedNodeArg: any, prevValueArg: string, newValueArg: string, attrNameArg: string, attrChangeArg: number): void; + initMutationEvent(eventType: string, canBubble: boolean, cancelable: boolean, relatedNodeArg: any, prevValueArg: string, newValueArg: string, attrNameArg: string, attrChangeArg: number): void; readonly isTrusted: boolean; readonly newValue: string; preventDefault(): void; @@ -3732,10 +3717,9 @@ declare namespace MSHTML { parseFromString(xmlSource: string, mimeType: string): IHTMLDocument2; } - class DOMParserFactory { - private 'MSHTML.DOMParserFactory_typekey': DOMParserFactory; - private constructor(); + interface DOMParserFactory { create(): IDOMParser; + (): IDOMParser; } class DOMProcessingInstruction { @@ -3773,7 +3757,7 @@ declare namespace MSHTML { readonly previousSibling: IHTMLDOMNode; removeChild(oldChild: IHTMLDOMNode): IHTMLDOMNode; - /** @param boolean [fDeep=false] */ + /** @param fDeep [fDeep=false] */ removeNode(fDeep?: boolean): IHTMLDOMNode; replaceChild(newChild: IHTMLDOMNode, oldChild: IHTMLDOMNode): IHTMLDOMNode; replaceNode(replacement: IHTMLDOMNode): IHTMLDOMNode; @@ -3838,8 +3822,7 @@ declare namespace MSHTML { readonly defaultPrevented: boolean; readonly eventPhase: number; initEvent(eventType: string, canBubble: boolean, cancelable: boolean): void; - initStorageEvent( - eventType: string, canBubble: boolean, cancelable: boolean, keyArg: string, oldValueArg: string, newValueArg: string, urlArg: string, storageAreaArg: IHTMLStorage): void; + initStorageEvent(eventType: string, canBubble: boolean, cancelable: boolean, keyArg: string, oldValueArg: string, newValueArg: string, urlArg: string, storageAreaArg: IHTMLStorage): void; readonly isTrusted: boolean; readonly key: string; readonly newValue: string; @@ -3928,14 +3911,9 @@ declare namespace MSHTML { readonly fromElement: IHTMLElement; getModifierState(keyArg: string): boolean; initEvent(eventType: string, canBubble: boolean, cancelable: boolean): void; - initMouseEvent( - eventType: string, canBubble: boolean, cancelable: boolean, viewArg: IHTMLWindow2, detailArg: number, screenXArg: number, screenYArg: number, - clientXArg: number, clientYArg: number, ctrlKeyArg: boolean, altKeyArg: boolean, shiftKeyArg: boolean, metaKeyArg: boolean, buttonArg: number, relatedTargetArg: IEventTarget): void; + initMouseEvent(eventType: string, canBubble: boolean, cancelable: boolean, viewArg: IHTMLWindow2, detailArg: number, screenXArg: number, screenYArg: number, clientXArg: number, clientYArg: number, ctrlKeyArg: boolean, altKeyArg: boolean, shiftKeyArg: boolean, metaKeyArg: boolean, buttonArg: number, relatedTargetArg: IEventTarget): void; initUIEvent(eventType: string, canBubble: boolean, cancelable: boolean, view: IHTMLWindow2, detail: number): void; - initWheelEvent( - eventType: string, canBubble: boolean, cancelable: boolean, viewArg: IHTMLWindow2, detailArg: number, screenXArg: number, screenYArg: number, - clientXArg: number, clientYArg: number, buttonArg: number, relatedTargetArg: IEventTarget, modifiersListArg: string, deltaX: number, deltaY: number, - deltaZ: number, deltaMode: number): void; + initWheelEvent(eventType: string, canBubble: boolean, cancelable: boolean, viewArg: IHTMLWindow2, detailArg: number, screenXArg: number, screenYArg: number, clientXArg: number, clientYArg: number, buttonArg: number, relatedTargetArg: IEventTarget, modifiersListArg: string, deltaX: number, deltaY: number, deltaZ: number, deltaMode: number): void; readonly isTrusted: boolean; readonly layerX: number; readonly layerY: number; @@ -3967,25 +3945,22 @@ declare namespace MSHTML { private constructor(); } - class FontNames { - private 'MSHTML.FontNames_typekey': FontNames; - private constructor(); + interface FontNames { readonly Count: number; item(pvarIndex: any): string; + (pvarIndex: any): string; } - class FramesCollection { - private 'MSHTML.FramesCollection_typekey': FramesCollection; - private constructor(); + interface FramesCollection { item(pvarIndex: any): any; readonly length: number; + (pvarIndex: any): any; } - class HTCAttachBehavior { - private 'MSHTML.HTCAttachBehavior_typekey': HTCAttachBehavior; - private constructor(); + interface HTCAttachBehavior { detachEvent(): void; FireEvent(evt: any): void; + (evt: any): void; } class HTCDefaultDispatch { @@ -4098,7 +4073,7 @@ declare namespace MSHTML { focus(): void; getAdjacentText(where: string): string; - /** @param number [lFlags=0] */ + /** @param lFlags [lFlags=0] */ getAttribute(strAttributeName: string, lFlags?: number): any; getAttributeNode(bstrName: string): IHTMLDOMAttribute; getAttributeNodeNS(pvarNS: any, bstrName: string): IHTMLDOMAttribute2; @@ -4317,7 +4292,7 @@ declare namespace MSHTML { rel: string; releaseCapture(): void; - /** @param number [lFlags=1] */ + /** @param lFlags [lFlags=1] */ removeAttribute(strAttributeName: string, lFlags?: number): boolean; removeAttributeNode(pattr: IHTMLDOMAttribute): IHTMLDOMAttribute; removeAttributeNS(pvarNS: any, strAttributeName: string): void; @@ -4326,7 +4301,7 @@ declare namespace MSHTML { removeExpression(propname: string): boolean; removeFilter(pUnk: any): void; - /** @param boolean [fDeep=false] */ + /** @param fDeep [fDeep=false] */ removeNode(fDeep?: boolean): IHTMLDOMNode; replaceAdjacentText(where: string, newText: string): string; replaceChild(newChild: IHTMLDOMNode, oldChild: IHTMLDOMNode): IHTMLDOMNode; @@ -4343,16 +4318,16 @@ declare namespace MSHTML { search: string; setActive(): void; - /** @param number [lFlags=1] */ + /** @param lFlags [lFlags=1] */ setAttribute(strAttributeName: string, AttributeValue: any, lFlags?: number): void; setAttributeNode(pattr: IHTMLDOMAttribute): IHTMLDOMAttribute; setAttributeNodeNS(pattr: IHTMLDOMAttribute2): IHTMLDOMAttribute2; setAttributeNS(pvarNS: any, strAttributeName: string, pvarAttributeValue: any): void; - /** @param boolean [containerCapture=true] */ + /** @param containerCapture [containerCapture=true] */ setCapture(containerCapture?: boolean): void; - /** @param string [language=''] */ + /** @param language [language=''] */ setExpression(propname: string, expression: string, language?: string): void; shape: string; readonly sourceIndex: number; @@ -4468,7 +4443,7 @@ declare namespace MSHTML { focus(): void; getAdjacentText(where: string): string; - /** @param number [lFlags=0] */ + /** @param lFlags [lFlags=0] */ getAttribute(strAttributeName: string, lFlags?: number): any; getAttributeNode(bstrName: string): IHTMLDOMAttribute; getAttributeNodeNS(pvarNS: any, bstrName: string): IHTMLDOMAttribute2; @@ -4666,7 +4641,7 @@ declare namespace MSHTML { readonly recordNumber: any; releaseCapture(): void; - /** @param number [lFlags=1] */ + /** @param lFlags [lFlags=1] */ removeAttribute(strAttributeName: string, lFlags?: number): boolean; removeAttributeNode(pattr: IHTMLDOMAttribute): IHTMLDOMAttribute; removeAttributeNS(pvarNS: any, strAttributeName: string): void; @@ -4675,7 +4650,7 @@ declare namespace MSHTML { removeExpression(propname: string): boolean; removeFilter(pUnk: any): void; - /** @param boolean [fDeep=false] */ + /** @param fDeep [fDeep=false] */ removeNode(fDeep?: boolean): IHTMLDOMNode; replaceAdjacentText(where: string, newText: string): string; replaceChild(newChild: IHTMLDOMNode, oldChild: IHTMLDOMNode): IHTMLDOMNode; @@ -4691,16 +4666,16 @@ declare namespace MSHTML { search: string; setActive(): void; - /** @param number [lFlags=1] */ + /** @param lFlags [lFlags=1] */ setAttribute(strAttributeName: string, AttributeValue: any, lFlags?: number): void; setAttributeNode(pattr: IHTMLDOMAttribute): IHTMLDOMAttribute; setAttributeNodeNS(pattr: IHTMLDOMAttribute2): IHTMLDOMAttribute2; setAttributeNS(pvarNS: any, strAttributeName: string, pvarAttributeValue: any): void; - /** @param boolean [containerCapture=true] */ + /** @param containerCapture [containerCapture=true] */ setCapture(containerCapture?: boolean): void; - /** @param string [language=''] */ + /** @param language [language=''] */ setExpression(propname: string, expression: string, language?: string): void; shape: string; readonly sourceIndex: number; @@ -4718,9 +4693,7 @@ declare namespace MSHTML { xmsAcceleratorKey: string; } - class HTMLAreasCollection { - private 'MSHTML.HTMLAreasCollection_typekey': HTMLAreasCollection; - private constructor(); + interface HTMLAreasCollection { add(element: IHTMLElement, before?: any): void; readonly 'constructor': any; ie8_item(index: number): IHTMLElement2; @@ -4730,15 +4703,14 @@ declare namespace MSHTML { length: number; namedItem(name: string): any; - /** @param number [index=-1] */ + /** @param index [index=-1] */ remove(index?: number): void; tags(tagName: any): any; urns(urn: any): any; + (name?: any, index?: any): any; } - class HTMLAttributeCollection { - private 'MSHTML.HTMLAttributeCollection_typekey': HTMLAttributeCollection; - private constructor(); + interface HTMLAttributeCollection { readonly 'constructor': any; getNamedItem(bstrName: string): IHTMLDOMAttribute; getNamedItemNS(pvarNS: any, bstrName: string): IHTMLDOMAttribute2; @@ -4758,6 +4730,7 @@ declare namespace MSHTML { removeNamedItemNS(pvarNS: any, bstrName: string): IHTMLDOMAttribute2; setNamedItem(ppNode: IHTMLDOMAttribute): IHTMLDOMAttribute; setNamedItemNS(pNodeIn: IHTMLDOMAttribute2): IHTMLDOMAttribute2; + (name?: any): any; } class HTMLAudioElement { @@ -4848,7 +4821,7 @@ declare namespace MSHTML { focus(): void; getAdjacentText(where: string): string; - /** @param number [lFlags=0] */ + /** @param lFlags [lFlags=0] */ getAttribute(strAttributeName: string, lFlags?: number): any; getAttributeNode(bstrName: string): IHTMLDOMAttribute; getAttributeNodeNS(pvarNS: any, bstrName: string): IHTMLDOMAttribute2; @@ -5065,7 +5038,7 @@ declare namespace MSHTML { readonly recordNumber: any; releaseCapture(): void; - /** @param number [lFlags=1] */ + /** @param lFlags [lFlags=1] */ removeAttribute(strAttributeName: string, lFlags?: number): boolean; removeAttributeNode(pattr: IHTMLDOMAttribute): IHTMLDOMAttribute; removeAttributeNS(pvarNS: any, strAttributeName: string): void; @@ -5074,7 +5047,7 @@ declare namespace MSHTML { removeExpression(propname: string): boolean; removeFilter(pUnk: any): void; - /** @param boolean [fDeep=false] */ + /** @param fDeep [fDeep=false] */ removeNode(fDeep?: boolean): IHTMLDOMNode; replaceAdjacentText(where: string, newText: string): string; replaceChild(newChild: IHTMLDOMNode, oldChild: IHTMLDOMNode): IHTMLDOMNode; @@ -5091,16 +5064,16 @@ declare namespace MSHTML { readonly seeking: boolean; setActive(): void; - /** @param number [lFlags=1] */ + /** @param lFlags [lFlags=1] */ setAttribute(strAttributeName: string, AttributeValue: any, lFlags?: number): void; setAttributeNode(pattr: IHTMLDOMAttribute): IHTMLDOMAttribute; setAttributeNodeNS(pattr: IHTMLDOMAttribute2): IHTMLDOMAttribute2; setAttributeNS(pvarNS: any, strAttributeName: string, pvarAttributeValue: any): void; - /** @param boolean [containerCapture=true] */ + /** @param containerCapture [containerCapture=true] */ setCapture(containerCapture?: boolean): void; - /** @param string [language=''] */ + /** @param language [language=''] */ setExpression(propname: string, expression: string, language?: string): void; readonly sourceIndex: number; spellcheck: any; @@ -5120,10 +5093,9 @@ declare namespace MSHTML { xmsAcceleratorKey: string; } - class HTMLAudioElementFactory { - private 'MSHTML.HTMLAudioElementFactory_typekey': HTMLAudioElementFactory; - private constructor(); + interface HTMLAudioElementFactory { create(src?: any): IHTMLAudioElement; + (src?: any): IHTMLAudioElement; } class HTMLBaseElement { @@ -5196,7 +5168,7 @@ declare namespace MSHTML { focus(): void; getAdjacentText(where: string): string; - /** @param number [lFlags=0] */ + /** @param lFlags [lFlags=0] */ getAttribute(strAttributeName: string, lFlags?: number): any; getAttributeNode(bstrName: string): IHTMLDOMAttribute; getAttributeNodeNS(pvarNS: any, bstrName: string): IHTMLDOMAttribute2; @@ -5385,7 +5357,7 @@ declare namespace MSHTML { readonly recordNumber: any; releaseCapture(): void; - /** @param number [lFlags=1] */ + /** @param lFlags [lFlags=1] */ removeAttribute(strAttributeName: string, lFlags?: number): boolean; removeAttributeNode(pattr: IHTMLDOMAttribute): IHTMLDOMAttribute; removeAttributeNS(pvarNS: any, strAttributeName: string): void; @@ -5394,7 +5366,7 @@ declare namespace MSHTML { removeExpression(propname: string): boolean; removeFilter(pUnk: any): void; - /** @param boolean [fDeep=false] */ + /** @param fDeep [fDeep=false] */ removeNode(fDeep?: boolean): IHTMLDOMNode; replaceAdjacentText(where: string, newText: string): string; replaceChild(newChild: IHTMLDOMNode, oldChild: IHTMLDOMNode): IHTMLDOMNode; @@ -5409,16 +5381,16 @@ declare namespace MSHTML { readonly scrollWidth: number; setActive(): void; - /** @param number [lFlags=1] */ + /** @param lFlags [lFlags=1] */ setAttribute(strAttributeName: string, AttributeValue: any, lFlags?: number): void; setAttributeNode(pattr: IHTMLDOMAttribute): IHTMLDOMAttribute; setAttributeNodeNS(pattr: IHTMLDOMAttribute2): IHTMLDOMAttribute2; setAttributeNS(pvarNS: any, strAttributeName: string, pvarAttributeValue: any): void; - /** @param boolean [containerCapture=true] */ + /** @param containerCapture [containerCapture=true] */ setCapture(containerCapture?: boolean): void; - /** @param string [language=''] */ + /** @param language [language=''] */ setExpression(propname: string, expression: string, language?: string): void; readonly sourceIndex: number; spellcheck: any; @@ -5507,7 +5479,7 @@ declare namespace MSHTML { focus(): void; getAdjacentText(where: string): string; - /** @param number [lFlags=0] */ + /** @param lFlags [lFlags=0] */ getAttribute(strAttributeName: string, lFlags?: number): any; getAttributeNode(bstrName: string): IHTMLDOMAttribute; getAttributeNodeNS(pvarNS: any, bstrName: string): IHTMLDOMAttribute2; @@ -5694,7 +5666,7 @@ declare namespace MSHTML { readonly recordNumber: any; releaseCapture(): void; - /** @param number [lFlags=1] */ + /** @param lFlags [lFlags=1] */ removeAttribute(strAttributeName: string, lFlags?: number): boolean; removeAttributeNode(pattr: IHTMLDOMAttribute): IHTMLDOMAttribute; removeAttributeNS(pvarNS: any, strAttributeName: string): void; @@ -5703,7 +5675,7 @@ declare namespace MSHTML { removeExpression(propname: string): boolean; removeFilter(pUnk: any): void; - /** @param boolean [fDeep=false] */ + /** @param fDeep [fDeep=false] */ removeNode(fDeep?: boolean): IHTMLDOMNode; replaceAdjacentText(where: string, newText: string): string; replaceChild(newChild: IHTMLDOMNode, oldChild: IHTMLDOMNode): IHTMLDOMNode; @@ -5718,16 +5690,16 @@ declare namespace MSHTML { readonly scrollWidth: number; setActive(): void; - /** @param number [lFlags=1] */ + /** @param lFlags [lFlags=1] */ setAttribute(strAttributeName: string, AttributeValue: any, lFlags?: number): void; setAttributeNode(pattr: IHTMLDOMAttribute): IHTMLDOMAttribute; setAttributeNodeNS(pattr: IHTMLDOMAttribute2): IHTMLDOMAttribute2; setAttributeNS(pvarNS: any, strAttributeName: string, pvarAttributeValue: any): void; - /** @param boolean [containerCapture=true] */ + /** @param containerCapture [containerCapture=true] */ setCapture(containerCapture?: boolean): void; - /** @param string [language=''] */ + /** @param language [language=''] */ setExpression(propname: string, expression: string, language?: string): void; size: number; readonly sourceIndex: number; @@ -5815,7 +5787,7 @@ declare namespace MSHTML { focus(): void; getAdjacentText(where: string): string; - /** @param number [lFlags=0] */ + /** @param lFlags [lFlags=0] */ getAttribute(strAttributeName: string, lFlags?: number): any; getAttributeNode(bstrName: string): IHTMLDOMAttribute; getAttributeNodeNS(pvarNS: any, bstrName: string): IHTMLDOMAttribute2; @@ -6003,7 +5975,7 @@ declare namespace MSHTML { readonly recordNumber: any; releaseCapture(): void; - /** @param number [lFlags=1] */ + /** @param lFlags [lFlags=1] */ removeAttribute(strAttributeName: string, lFlags?: number): boolean; removeAttributeNode(pattr: IHTMLDOMAttribute): IHTMLDOMAttribute; removeAttributeNS(pvarNS: any, strAttributeName: string): void; @@ -6012,7 +5984,7 @@ declare namespace MSHTML { removeExpression(propname: string): boolean; removeFilter(pUnk: any): void; - /** @param boolean [fDeep=false] */ + /** @param fDeep [fDeep=false] */ removeNode(fDeep?: boolean): IHTMLDOMNode; replaceAdjacentText(where: string, newText: string): string; replaceChild(newChild: IHTMLDOMNode, oldChild: IHTMLDOMNode): IHTMLDOMNode; @@ -6027,16 +5999,16 @@ declare namespace MSHTML { readonly scrollWidth: number; setActive(): void; - /** @param number [lFlags=1] */ + /** @param lFlags [lFlags=1] */ setAttribute(strAttributeName: string, AttributeValue: any, lFlags?: number): void; setAttributeNode(pattr: IHTMLDOMAttribute): IHTMLDOMAttribute; setAttributeNodeNS(pattr: IHTMLDOMAttribute2): IHTMLDOMAttribute2; setAttributeNS(pvarNS: any, strAttributeName: string, pvarAttributeValue: any): void; - /** @param boolean [containerCapture=true] */ + /** @param containerCapture [containerCapture=true] */ setCapture(containerCapture?: boolean): void; - /** @param string [language=''] */ + /** @param language [language=''] */ setExpression(propname: string, expression: string, language?: string): void; readonly sourceIndex: number; spellcheck: any; @@ -6126,7 +6098,7 @@ declare namespace MSHTML { focus(): void; getAdjacentText(where: string): string; - /** @param number [lFlags=0] */ + /** @param lFlags [lFlags=0] */ getAttribute(strAttributeName: string, lFlags?: number): any; getAttributeNode(bstrName: string): IHTMLDOMAttribute; getAttributeNodeNS(pvarNS: any, bstrName: string): IHTMLDOMAttribute2; @@ -6314,7 +6286,7 @@ declare namespace MSHTML { readonly recordNumber: any; releaseCapture(): void; - /** @param number [lFlags=1] */ + /** @param lFlags [lFlags=1] */ removeAttribute(strAttributeName: string, lFlags?: number): boolean; removeAttributeNode(pattr: IHTMLDOMAttribute): IHTMLDOMAttribute; removeAttributeNS(pvarNS: any, strAttributeName: string): void; @@ -6323,7 +6295,7 @@ declare namespace MSHTML { removeExpression(propname: string): boolean; removeFilter(pUnk: any): void; - /** @param boolean [fDeep=false] */ + /** @param fDeep [fDeep=false] */ removeNode(fDeep?: boolean): IHTMLDOMNode; replaceAdjacentText(where: string, newText: string): string; replaceChild(newChild: IHTMLDOMNode, oldChild: IHTMLDOMNode): IHTMLDOMNode; @@ -6338,16 +6310,16 @@ declare namespace MSHTML { readonly scrollWidth: number; setActive(): void; - /** @param number [lFlags=1] */ + /** @param lFlags [lFlags=1] */ setAttribute(strAttributeName: string, AttributeValue: any, lFlags?: number): void; setAttributeNode(pattr: IHTMLDOMAttribute): IHTMLDOMAttribute; setAttributeNodeNS(pattr: IHTMLDOMAttribute2): IHTMLDOMAttribute2; setAttributeNS(pvarNS: any, strAttributeName: string, pvarAttributeValue: any): void; - /** @param boolean [containerCapture=true] */ + /** @param containerCapture [containerCapture=true] */ setCapture(containerCapture?: boolean): void; - /** @param string [language=''] */ + /** @param language [language=''] */ setExpression(propname: string, expression: string, language?: string): void; readonly sourceIndex: number; spellcheck: any; @@ -6440,7 +6412,7 @@ declare namespace MSHTML { focus(): void; getAdjacentText(where: string): string; - /** @param number [lFlags=0] */ + /** @param lFlags [lFlags=0] */ getAttribute(strAttributeName: string, lFlags?: number): any; getAttributeNode(bstrName: string): IHTMLDOMAttribute; getAttributeNodeNS(pvarNS: any, bstrName: string): IHTMLDOMAttribute2; @@ -6641,7 +6613,7 @@ declare namespace MSHTML { readonly recordNumber: any; releaseCapture(): void; - /** @param number [lFlags=1] */ + /** @param lFlags [lFlags=1] */ removeAttribute(strAttributeName: string, lFlags?: number): boolean; removeAttributeNode(pattr: IHTMLDOMAttribute): IHTMLDOMAttribute; removeAttributeNS(pvarNS: any, strAttributeName: string): void; @@ -6650,7 +6622,7 @@ declare namespace MSHTML { removeExpression(propname: string): boolean; removeFilter(pUnk: any): void; - /** @param boolean [fDeep=false] */ + /** @param fDeep [fDeep=false] */ removeNode(fDeep?: boolean): IHTMLDOMNode; replaceAdjacentText(where: string, newText: string): string; replaceChild(newChild: IHTMLDOMNode, oldChild: IHTMLDOMNode): IHTMLDOMNode; @@ -6667,16 +6639,16 @@ declare namespace MSHTML { readonly scrollWidth: number; setActive(): void; - /** @param number [lFlags=1] */ + /** @param lFlags [lFlags=1] */ setAttribute(strAttributeName: string, AttributeValue: any, lFlags?: number): void; setAttributeNode(pattr: IHTMLDOMAttribute): IHTMLDOMAttribute; setAttributeNodeNS(pattr: IHTMLDOMAttribute2): IHTMLDOMAttribute2; setAttributeNS(pvarNS: any, strAttributeName: string, pvarAttributeValue: any): void; - /** @param boolean [containerCapture=true] */ + /** @param containerCapture [containerCapture=true] */ setCapture(containerCapture?: boolean): void; - /** @param string [language=''] */ + /** @param language [language=''] */ setExpression(propname: string, expression: string, language?: string): void; readonly sourceIndex: number; spellcheck: any; @@ -6766,7 +6738,7 @@ declare namespace MSHTML { focus(): void; getAdjacentText(where: string): string; - /** @param number [lFlags=0] */ + /** @param lFlags [lFlags=0] */ getAttribute(strAttributeName: string, lFlags?: number): any; getAttributeNode(bstrName: string): IHTMLDOMAttribute; getAttributeNodeNS(pvarNS: any, bstrName: string): IHTMLDOMAttribute2; @@ -6953,7 +6925,7 @@ declare namespace MSHTML { readonly recordNumber: any; releaseCapture(): void; - /** @param number [lFlags=1] */ + /** @param lFlags [lFlags=1] */ removeAttribute(strAttributeName: string, lFlags?: number): boolean; removeAttributeNode(pattr: IHTMLDOMAttribute): IHTMLDOMAttribute; removeAttributeNS(pvarNS: any, strAttributeName: string): void; @@ -6962,7 +6934,7 @@ declare namespace MSHTML { removeExpression(propname: string): boolean; removeFilter(pUnk: any): void; - /** @param boolean [fDeep=false] */ + /** @param fDeep [fDeep=false] */ removeNode(fDeep?: boolean): IHTMLDOMNode; replaceAdjacentText(where: string, newText: string): string; replaceChild(newChild: IHTMLDOMNode, oldChild: IHTMLDOMNode): IHTMLDOMNode; @@ -6977,16 +6949,16 @@ declare namespace MSHTML { readonly scrollWidth: number; setActive(): void; - /** @param number [lFlags=1] */ + /** @param lFlags [lFlags=1] */ setAttribute(strAttributeName: string, AttributeValue: any, lFlags?: number): void; setAttributeNode(pattr: IHTMLDOMAttribute): IHTMLDOMAttribute; setAttributeNodeNS(pattr: IHTMLDOMAttribute2): IHTMLDOMAttribute2; setAttributeNS(pvarNS: any, strAttributeName: string, pvarAttributeValue: any): void; - /** @param boolean [containerCapture=true] */ + /** @param containerCapture [containerCapture=true] */ setCapture(containerCapture?: boolean): void; - /** @param string [language=''] */ + /** @param language [language=''] */ setExpression(propname: string, expression: string, language?: string): void; readonly sourceIndex: number; spellcheck: any; @@ -7078,7 +7050,7 @@ declare namespace MSHTML { readonly form: IHTMLFormElement; getAdjacentText(where: string): string; - /** @param number [lFlags=0] */ + /** @param lFlags [lFlags=0] */ getAttribute(strAttributeName: string, lFlags?: number): any; getAttributeNode(bstrName: string): IHTMLDOMAttribute; getAttributeNodeNS(pvarNS: any, bstrName: string): IHTMLDOMAttribute2; @@ -7282,7 +7254,7 @@ declare namespace MSHTML { readonly recordNumber: any; releaseCapture(): void; - /** @param number [lFlags=1] */ + /** @param lFlags [lFlags=1] */ removeAttribute(strAttributeName: string, lFlags?: number): boolean; removeAttributeNode(pattr: IHTMLDOMAttribute): IHTMLDOMAttribute; removeAttributeNS(pvarNS: any, strAttributeName: string): void; @@ -7291,7 +7263,7 @@ declare namespace MSHTML { removeExpression(propname: string): boolean; removeFilter(pUnk: any): void; - /** @param boolean [fDeep=false] */ + /** @param fDeep [fDeep=false] */ removeNode(fDeep?: boolean): IHTMLDOMNode; replaceAdjacentText(where: string, newText: string): string; replaceChild(newChild: IHTMLDOMNode, oldChild: IHTMLDOMNode): IHTMLDOMNode; @@ -7306,16 +7278,16 @@ declare namespace MSHTML { readonly scrollWidth: number; setActive(): void; - /** @param number [lFlags=1] */ + /** @param lFlags [lFlags=1] */ setAttribute(strAttributeName: string, AttributeValue: any, lFlags?: number): void; setAttributeNode(pattr: IHTMLDOMAttribute): IHTMLDOMAttribute; setAttributeNodeNS(pattr: IHTMLDOMAttribute2): IHTMLDOMAttribute2; setAttributeNS(pvarNS: any, strAttributeName: string, pvarAttributeValue: any): void; - /** @param boolean [containerCapture=true] */ + /** @param containerCapture [containerCapture=true] */ setCapture(containerCapture?: boolean): void; - /** @param string [language=''] */ + /** @param language [language=''] */ setExpression(propname: string, expression: string, language?: string): void; readonly sourceIndex: number; spellcheck: any; @@ -7405,7 +7377,7 @@ declare namespace MSHTML { focus(): void; getAdjacentText(where: string): string; - /** @param number [lFlags=0] */ + /** @param lFlags [lFlags=0] */ getAttribute(strAttributeName: string, lFlags?: number): any; getAttributeNode(bstrName: string): IHTMLDOMAttribute; getAttributeNodeNS(pvarNS: any, bstrName: string): IHTMLDOMAttribute2; @@ -7594,7 +7566,7 @@ declare namespace MSHTML { readonly recordNumber: any; releaseCapture(): void; - /** @param number [lFlags=1] */ + /** @param lFlags [lFlags=1] */ removeAttribute(strAttributeName: string, lFlags?: number): boolean; removeAttributeNode(pattr: IHTMLDOMAttribute): IHTMLDOMAttribute; removeAttributeNS(pvarNS: any, strAttributeName: string): void; @@ -7603,7 +7575,7 @@ declare namespace MSHTML { removeExpression(propname: string): boolean; removeFilter(pUnk: any): void; - /** @param boolean [fDeep=false] */ + /** @param fDeep [fDeep=false] */ removeNode(fDeep?: boolean): IHTMLDOMNode; replaceAdjacentText(where: string, newText: string): string; replaceChild(newChild: IHTMLDOMNode, oldChild: IHTMLDOMNode): IHTMLDOMNode; @@ -7618,16 +7590,16 @@ declare namespace MSHTML { readonly scrollWidth: number; setActive(): void; - /** @param number [lFlags=1] */ + /** @param lFlags [lFlags=1] */ setAttribute(strAttributeName: string, AttributeValue: any, lFlags?: number): void; setAttributeNode(pattr: IHTMLDOMAttribute): IHTMLDOMAttribute; setAttributeNodeNS(pattr: IHTMLDOMAttribute2): IHTMLDOMAttribute2; setAttributeNS(pvarNS: any, strAttributeName: string, pvarAttributeValue: any): void; - /** @param boolean [containerCapture=true] */ + /** @param containerCapture [containerCapture=true] */ setCapture(containerCapture?: boolean): void; - /** @param string [language=''] */ + /** @param language [language=''] */ setExpression(propname: string, expression: string, language?: string): void; readonly sourceIndex: number; spellcheck: any; @@ -7719,7 +7691,7 @@ declare namespace MSHTML { focus(): void; getAdjacentText(where: string): string; - /** @param number [lFlags=0] */ + /** @param lFlags [lFlags=0] */ getAttribute(strAttributeName: string, lFlags?: number): any; getAttributeNode(bstrName: string): IHTMLDOMAttribute; getAttributeNodeNS(pvarNS: any, bstrName: string): IHTMLDOMAttribute2; @@ -7912,7 +7884,7 @@ declare namespace MSHTML { readonly recordNumber: any; releaseCapture(): void; - /** @param number [lFlags=1] */ + /** @param lFlags [lFlags=1] */ removeAttribute(strAttributeName: string, lFlags?: number): boolean; removeAttributeNode(pattr: IHTMLDOMAttribute): IHTMLDOMAttribute; removeAttributeNS(pvarNS: any, strAttributeName: string): void; @@ -7921,7 +7893,7 @@ declare namespace MSHTML { removeExpression(propname: string): boolean; removeFilter(pUnk: any): void; - /** @param boolean [fDeep=false] */ + /** @param fDeep [fDeep=false] */ removeNode(fDeep?: boolean): IHTMLDOMNode; replaceAdjacentText(where: string, newText: string): string; replaceChild(newChild: IHTMLDOMNode, oldChild: IHTMLDOMNode): IHTMLDOMNode; @@ -7937,16 +7909,16 @@ declare namespace MSHTML { readonly scrollWidth: number; setActive(): void; - /** @param number [lFlags=1] */ + /** @param lFlags [lFlags=1] */ setAttribute(strAttributeName: string, AttributeValue: any, lFlags?: number): void; setAttributeNode(pattr: IHTMLDOMAttribute): IHTMLDOMAttribute; setAttributeNodeNS(pattr: IHTMLDOMAttribute2): IHTMLDOMAttribute2; setAttributeNS(pvarNS: any, strAttributeName: string, pvarAttributeValue: any): void; - /** @param boolean [containerCapture=true] */ + /** @param containerCapture [containerCapture=true] */ setCapture(containerCapture?: boolean): void; - /** @param string [language=''] */ + /** @param language [language=''] */ setExpression(propname: string, expression: string, language?: string): void; readonly sourceIndex: number; spellcheck: any; @@ -7992,10 +7964,10 @@ declare namespace MSHTML { readonly cssRules: IHTMLStyleSheetRulesCollection; cssText: string; - /** @param number [lIndex=-1] */ + /** @param lIndex [lIndex=-1] */ deleteRule(lIndex?: number): void; - /** @param number [lIndex=-1] */ + /** @param lIndex [lIndex=-1] */ insertRule(bstrRule: string, lIndex?: number): number; media: any; readonly parentRule: IHTMLCSSRule; @@ -8023,9 +7995,7 @@ declare namespace MSHTML { readonly type: number; } - class HTMLCSSStyleDeclaration { - private 'MSHTML.HTMLCSSStyleDeclaration_typekey': HTMLCSSStyleDeclaration; - private constructor(); + interface HTMLCSSStyleDeclaration { accelerator: string; alignContent: string; alignItems: string; @@ -8306,7 +8276,7 @@ declare namespace MSHTML { scrollbarShadowColor: any; scrollbarTrackColor: any; - /** @param any [pvarPropertyPriority=''] */ + /** @param pvarPropertyPriority [pvarPropertyPriority=''] */ setProperty(bstrPropertyName: string, pvarPropertyValue: any, pvarPropertyPriority?: any): void; stopColor: any; stopOpacity: any; @@ -8400,11 +8370,10 @@ declare namespace MSHTML { writingMode: string; zIndex: any; zoom: any; + (index: number): string; } - class HTMLCurrentStyle { - private 'MSHTML.HTMLCurrentStyle_typekey': HTMLCurrentStyle; - private constructor(); + interface HTMLCurrentStyle { readonly accelerator: string; alignContent: string; alignItems: string; @@ -8496,7 +8465,7 @@ declare namespace MSHTML { readonly fontVariant: string; readonly fontWeight: any; - /** @param number [lFlags=0] */ + /** @param lFlags [lFlags=0] */ getAttribute(strAttributeName: string, lFlags?: number): any; getPropertyPriority(bstrPropertyName: string): string; getPropertyValue(bstrPropertyName: string): string; @@ -8642,7 +8611,7 @@ declare namespace MSHTML { readonly scrollbarShadowColor: any; readonly scrollbarTrackColor: any; - /** @param any [pvarPropertyPriority=''] */ + /** @param pvarPropertyPriority [pvarPropertyPriority=''] */ setProperty(bstrPropertyName: string, pvarPropertyValue: any, pvarPropertyPriority?: any): void; readonly styleFloat: string; readonly tableLayout: string; @@ -8725,6 +8694,7 @@ declare namespace MSHTML { readonly writingMode: string; readonly zIndex: any; readonly zoom: any; + (index: number): string; } class HTMLDDElement { @@ -8797,7 +8767,7 @@ declare namespace MSHTML { focus(): void; getAdjacentText(where: string): string; - /** @param number [lFlags=0] */ + /** @param lFlags [lFlags=0] */ getAttribute(strAttributeName: string, lFlags?: number): any; getAttributeNode(bstrName: string): IHTMLDOMAttribute; getAttributeNodeNS(pvarNS: any, bstrName: string): IHTMLDOMAttribute2; @@ -8985,7 +8955,7 @@ declare namespace MSHTML { readonly recordNumber: any; releaseCapture(): void; - /** @param number [lFlags=1] */ + /** @param lFlags [lFlags=1] */ removeAttribute(strAttributeName: string, lFlags?: number): boolean; removeAttributeNode(pattr: IHTMLDOMAttribute): IHTMLDOMAttribute; removeAttributeNS(pvarNS: any, strAttributeName: string): void; @@ -8994,7 +8964,7 @@ declare namespace MSHTML { removeExpression(propname: string): boolean; removeFilter(pUnk: any): void; - /** @param boolean [fDeep=false] */ + /** @param fDeep [fDeep=false] */ removeNode(fDeep?: boolean): IHTMLDOMNode; replaceAdjacentText(where: string, newText: string): string; replaceChild(newChild: IHTMLDOMNode, oldChild: IHTMLDOMNode): IHTMLDOMNode; @@ -9009,16 +8979,16 @@ declare namespace MSHTML { readonly scrollWidth: number; setActive(): void; - /** @param number [lFlags=1] */ + /** @param lFlags [lFlags=1] */ setAttribute(strAttributeName: string, AttributeValue: any, lFlags?: number): void; setAttributeNode(pattr: IHTMLDOMAttribute): IHTMLDOMAttribute; setAttributeNodeNS(pattr: IHTMLDOMAttribute2): IHTMLDOMAttribute2; setAttributeNS(pvarNS: any, strAttributeName: string, pvarAttributeValue: any): void; - /** @param boolean [containerCapture=true] */ + /** @param containerCapture [containerCapture=true] */ setCapture(containerCapture?: boolean): void; - /** @param string [language=''] */ + /** @param language [language=''] */ setExpression(propname: string, expression: string, language?: string): void; readonly sourceIndex: number; spellcheck: any; @@ -9140,7 +9110,7 @@ declare namespace MSHTML { focus(): void; getAdjacentText(where: string): string; - /** @param number [lFlags=0] */ + /** @param lFlags [lFlags=0] */ getAttribute(strAttributeName: string, lFlags?: number): any; getAttributeNode(bstrName: string): IHTMLDOMAttribute; getAttributeNodeNS(pvarNS: any, bstrName: string): IHTMLDOMAttribute2; @@ -9343,7 +9313,7 @@ declare namespace MSHTML { readonly recordNumber: any; releaseCapture(): void; - /** @param number [lFlags=1] */ + /** @param lFlags [lFlags=1] */ removeAttribute(strAttributeName: string, lFlags?: number): boolean; removeAttributeNode(pattr: IHTMLDOMAttribute): IHTMLDOMAttribute; removeAttributeNS(pvarNS: any, strAttributeName: string): void; @@ -9352,7 +9322,7 @@ declare namespace MSHTML { removeExpression(propname: string): boolean; removeFilter(pUnk: any): void; - /** @param boolean [fDeep=false] */ + /** @param fDeep [fDeep=false] */ removeNode(fDeep?: boolean): IHTMLDOMNode; replaceAdjacentText(where: string, newText: string): string; replaceChild(newChild: IHTMLDOMNode, oldChild: IHTMLDOMNode): IHTMLDOMNode; @@ -9367,16 +9337,16 @@ declare namespace MSHTML { readonly scrollWidth: number; setActive(): void; - /** @param number [lFlags=1] */ + /** @param lFlags [lFlags=1] */ setAttribute(strAttributeName: string, AttributeValue: any, lFlags?: number): void; setAttributeNode(pattr: IHTMLDOMAttribute): IHTMLDOMAttribute; setAttributeNodeNS(pattr: IHTMLDOMAttribute2): IHTMLDOMAttribute2; setAttributeNS(pvarNS: any, strAttributeName: string, pvarAttributeValue: any): void; - /** @param boolean [containerCapture=true] */ + /** @param containerCapture [containerCapture=true] */ setCapture(containerCapture?: boolean): void; - /** @param string [language=''] */ + /** @param language [language=''] */ setExpression(propname: string, expression: string, language?: string): void; readonly sourceIndex: number; spellcheck: any; @@ -9468,7 +9438,7 @@ declare namespace MSHTML { focus(): void; getAdjacentText(where: string): string; - /** @param number [lFlags=0] */ + /** @param lFlags [lFlags=0] */ getAttribute(strAttributeName: string, lFlags?: number): any; getAttributeNode(bstrName: string): IHTMLDOMAttribute; getAttributeNodeNS(pvarNS: any, bstrName: string): IHTMLDOMAttribute2; @@ -9670,7 +9640,7 @@ declare namespace MSHTML { readonly recordNumber: any; releaseCapture(): void; - /** @param number [lFlags=1] */ + /** @param lFlags [lFlags=1] */ removeAttribute(strAttributeName: string, lFlags?: number): boolean; removeAttributeNode(pattr: IHTMLDOMAttribute): IHTMLDOMAttribute; removeAttributeNS(pvarNS: any, strAttributeName: string): void; @@ -9679,7 +9649,7 @@ declare namespace MSHTML { removeExpression(propname: string): boolean; removeFilter(pUnk: any): void; - /** @param boolean [fDeep=false] */ + /** @param fDeep [fDeep=false] */ removeNode(fDeep?: boolean): IHTMLDOMNode; replaceAdjacentText(where: string, newText: string): string; replaceChild(newChild: IHTMLDOMNode, oldChild: IHTMLDOMNode): IHTMLDOMNode; @@ -9694,16 +9664,16 @@ declare namespace MSHTML { readonly scrollWidth: number; setActive(): void; - /** @param number [lFlags=1] */ + /** @param lFlags [lFlags=1] */ setAttribute(strAttributeName: string, AttributeValue: any, lFlags?: number): void; setAttributeNode(pattr: IHTMLDOMAttribute): IHTMLDOMAttribute; setAttributeNodeNS(pattr: IHTMLDOMAttribute2): IHTMLDOMAttribute2; setAttributeNS(pvarNS: any, strAttributeName: string, pvarAttributeValue: any): void; - /** @param boolean [containerCapture=true] */ + /** @param containerCapture [containerCapture=true] */ setCapture(containerCapture?: boolean): void; - /** @param string [language=''] */ + /** @param language [language=''] */ setExpression(propname: string, expression: string, language?: string): void; readonly sourceIndex: number; spellcheck: any; @@ -9800,7 +9770,7 @@ declare namespace MSHTML { focus(): void; getAdjacentText(where: string): string; - /** @param number [lFlags=0] */ + /** @param lFlags [lFlags=0] */ getAttribute(strAttributeName: string, lFlags?: number): any; getAttributeNode(bstrName: string): IHTMLDOMAttribute; getAttributeNodeNS(pvarNS: any, bstrName: string): IHTMLDOMAttribute2; @@ -9987,7 +9957,7 @@ declare namespace MSHTML { readonly recordNumber: any; releaseCapture(): void; - /** @param number [lFlags=1] */ + /** @param lFlags [lFlags=1] */ removeAttribute(strAttributeName: string, lFlags?: number): boolean; removeAttributeNode(pattr: IHTMLDOMAttribute): IHTMLDOMAttribute; removeAttributeNS(pvarNS: any, strAttributeName: string): void; @@ -9996,7 +9966,7 @@ declare namespace MSHTML { removeExpression(propname: string): boolean; removeFilter(pUnk: any): void; - /** @param boolean [fDeep=false] */ + /** @param fDeep [fDeep=false] */ removeNode(fDeep?: boolean): IHTMLDOMNode; replaceAdjacentText(where: string, newText: string): string; replaceChild(newChild: IHTMLDOMNode, oldChild: IHTMLDOMNode): IHTMLDOMNode; @@ -10011,16 +9981,16 @@ declare namespace MSHTML { readonly scrollWidth: number; setActive(): void; - /** @param number [lFlags=1] */ + /** @param lFlags [lFlags=1] */ setAttribute(strAttributeName: string, AttributeValue: any, lFlags?: number): void; setAttributeNode(pattr: IHTMLDOMAttribute): IHTMLDOMAttribute; setAttributeNodeNS(pattr: IHTMLDOMAttribute2): IHTMLDOMAttribute2; setAttributeNS(pvarNS: any, strAttributeName: string, pvarAttributeValue: any): void; - /** @param boolean [containerCapture=true] */ + /** @param containerCapture [containerCapture=true] */ setCapture(containerCapture?: boolean): void; - /** @param string [language=''] */ + /** @param language [language=''] */ setExpression(propname: string, expression: string, language?: string): void; readonly sourceIndex: number; spellcheck: any; @@ -10078,8 +10048,8 @@ declare namespace MSHTML { createRenderStyle(v: string): IHTMLRenderStyle; /** - * @param string [bstrHref=''] - * @param number [lIndex=-1] + * @param bstrHref [bstrHref=''] + * @param lIndex [lIndex=-1] */ createStyleSheet(bstrHref?: string, lIndex?: number): IHTMLStyleSheet; createTextNode(text: string): IHTMLDOMNode; @@ -10099,7 +10069,7 @@ declare namespace MSHTML { elementsFromRect(left: number, top: number, width: number, height: number): IHTMLDOMChildrenCollection; readonly embeds: IHTMLElementCollection; - /** @param boolean [showUI=false] */ + /** @param showUI [showUI=false] */ execCommand(cmdID: string, showUI?: boolean, value?: any): boolean; execCommandShowHelp(cmdID: string): boolean; expando: boolean; @@ -10257,7 +10227,7 @@ declare namespace MSHTML { onvolumechange: any; onwaiting: any; - /** @param string [url='text/html'] */ + /** @param url [url='text/html'] */ open(url?: string, name?: any, features?: any, replace?: any): any; readonly ownerDocument: any; readonly parentNode: IHTMLDOMNode; @@ -10276,14 +10246,14 @@ declare namespace MSHTML { querySelectorAll(v: string): IHTMLDOMChildrenCollection; readonly readyState: string; - /** @param boolean [fForce=false] */ + /** @param fForce [fForce=false] */ recalc(fForce?: boolean): void; readonly referrer: string; releaseCapture(): void; removeChild(oldChild: IHTMLDOMNode): IHTMLDOMNode; removeEventListener(type: string, listener: any, useCapture: boolean): void; - /** @param boolean [fDeep=false] */ + /** @param fDeep [fDeep=false] */ removeNode(fDeep?: boolean): IHTMLDOMNode; replaceChild(newChild: IHTMLDOMNode, oldChild: IHTMLDOMNode): IHTMLDOMNode; replaceNode(replacement: IHTMLDOMNode): IHTMLDOMNode; @@ -10470,7 +10440,7 @@ declare namespace MSHTML { removeChild(oldChild: IHTMLDOMNode): IHTMLDOMNode; removeEventListener(type: string, listener: any, useCapture: boolean): void; - /** @param boolean [fDeep=false] */ + /** @param fDeep [fDeep=false] */ removeNode(fDeep?: boolean): IHTMLDOMNode; replaceChild(newChild: IHTMLDOMNode, oldChild: IHTMLDOMNode): IHTMLDOMNode; replaceData(offset: number, Count: number, bstrstring: string): void; @@ -10484,10 +10454,9 @@ declare namespace MSHTML { readonly wholeText: string; } - class HTMLDOMXmlSerializerFactory { - private 'MSHTML.HTMLDOMXmlSerializerFactory_typekey': HTMLDOMXmlSerializerFactory; - private constructor(); + interface HTMLDOMXmlSerializerFactory { create(): IDOMXmlSerializer; + (): IDOMXmlSerializer; } class HTMLDTElement { @@ -10560,7 +10529,7 @@ declare namespace MSHTML { focus(): void; getAdjacentText(where: string): string; - /** @param number [lFlags=0] */ + /** @param lFlags [lFlags=0] */ getAttribute(strAttributeName: string, lFlags?: number): any; getAttributeNode(bstrName: string): IHTMLDOMAttribute; getAttributeNodeNS(pvarNS: any, bstrName: string): IHTMLDOMAttribute2; @@ -10748,7 +10717,7 @@ declare namespace MSHTML { readonly recordNumber: any; releaseCapture(): void; - /** @param number [lFlags=1] */ + /** @param lFlags [lFlags=1] */ removeAttribute(strAttributeName: string, lFlags?: number): boolean; removeAttributeNode(pattr: IHTMLDOMAttribute): IHTMLDOMAttribute; removeAttributeNS(pvarNS: any, strAttributeName: string): void; @@ -10757,7 +10726,7 @@ declare namespace MSHTML { removeExpression(propname: string): boolean; removeFilter(pUnk: any): void; - /** @param boolean [fDeep=false] */ + /** @param fDeep [fDeep=false] */ removeNode(fDeep?: boolean): IHTMLDOMNode; replaceAdjacentText(where: string, newText: string): string; replaceChild(newChild: IHTMLDOMNode, oldChild: IHTMLDOMNode): IHTMLDOMNode; @@ -10772,16 +10741,16 @@ declare namespace MSHTML { readonly scrollWidth: number; setActive(): void; - /** @param number [lFlags=1] */ + /** @param lFlags [lFlags=1] */ setAttribute(strAttributeName: string, AttributeValue: any, lFlags?: number): void; setAttributeNode(pattr: IHTMLDOMAttribute): IHTMLDOMAttribute; setAttributeNodeNS(pattr: IHTMLDOMAttribute2): IHTMLDOMAttribute2; setAttributeNS(pvarNS: any, strAttributeName: string, pvarAttributeValue: any): void; - /** @param boolean [containerCapture=true] */ + /** @param containerCapture [containerCapture=true] */ setCapture(containerCapture?: boolean): void; - /** @param string [language=''] */ + /** @param language [language=''] */ setExpression(propname: string, expression: string, language?: string): void; readonly sourceIndex: number; spellcheck: any; @@ -10797,9 +10766,7 @@ declare namespace MSHTML { xmsAcceleratorKey: string; } - class HTMLElementCollection { - private 'MSHTML.HTMLElementCollection_typekey': HTMLElementCollection; - private constructor(); + interface HTMLElementCollection { readonly 'constructor': any; ie8_item(index: number): IHTMLElement2; readonly ie8_length: number; @@ -10810,6 +10777,7 @@ declare namespace MSHTML { tags(tagName: any): any; toString(): string; urns(urn: any): any; + (name?: any, index?: any): any; } class HTMLEmbed { @@ -10882,7 +10850,7 @@ declare namespace MSHTML { focus(): void; getAdjacentText(where: string): string; - /** @param number [lFlags=0] */ + /** @param lFlags [lFlags=0] */ getAttribute(strAttributeName: string, lFlags?: number): any; getAttributeNode(bstrName: string): IHTMLDOMAttribute; getAttributeNodeNS(pvarNS: any, bstrName: string): IHTMLDOMAttribute2; @@ -11077,7 +11045,7 @@ declare namespace MSHTML { readonly recordNumber: any; releaseCapture(): void; - /** @param number [lFlags=1] */ + /** @param lFlags [lFlags=1] */ removeAttribute(strAttributeName: string, lFlags?: number): boolean; removeAttributeNode(pattr: IHTMLDOMAttribute): IHTMLDOMAttribute; removeAttributeNS(pvarNS: any, strAttributeName: string): void; @@ -11086,7 +11054,7 @@ declare namespace MSHTML { removeExpression(propname: string): boolean; removeFilter(pUnk: any): void; - /** @param boolean [fDeep=false] */ + /** @param fDeep [fDeep=false] */ removeNode(fDeep?: boolean): IHTMLDOMNode; replaceAdjacentText(where: string, newText: string): string; replaceChild(newChild: IHTMLDOMNode, oldChild: IHTMLDOMNode): IHTMLDOMNode; @@ -11101,16 +11069,16 @@ declare namespace MSHTML { readonly scrollWidth: number; setActive(): void; - /** @param number [lFlags=1] */ + /** @param lFlags [lFlags=1] */ setAttribute(strAttributeName: string, AttributeValue: any, lFlags?: number): void; setAttributeNode(pattr: IHTMLDOMAttribute): IHTMLDOMAttribute; setAttributeNodeNS(pattr: IHTMLDOMAttribute2): IHTMLDOMAttribute2; setAttributeNS(pvarNS: any, strAttributeName: string, pvarAttributeValue: any): void; - /** @param boolean [containerCapture=true] */ + /** @param containerCapture [containerCapture=true] */ setCapture(containerCapture?: boolean): void; - /** @param string [language=''] */ + /** @param language [language=''] */ setExpression(propname: string, expression: string, language?: string): void; readonly sourceIndex: number; spellcheck: any; @@ -11201,7 +11169,7 @@ declare namespace MSHTML { readonly form: IHTMLFormElement; getAdjacentText(where: string): string; - /** @param number [lFlags=0] */ + /** @param lFlags [lFlags=0] */ getAttribute(strAttributeName: string, lFlags?: number): any; getAttributeNode(bstrName: string): IHTMLDOMAttribute; getAttributeNodeNS(pvarNS: any, bstrName: string): IHTMLDOMAttribute2; @@ -11388,7 +11356,7 @@ declare namespace MSHTML { readonly recordNumber: any; releaseCapture(): void; - /** @param number [lFlags=1] */ + /** @param lFlags [lFlags=1] */ removeAttribute(strAttributeName: string, lFlags?: number): boolean; removeAttributeNode(pattr: IHTMLDOMAttribute): IHTMLDOMAttribute; removeAttributeNS(pvarNS: any, strAttributeName: string): void; @@ -11397,7 +11365,7 @@ declare namespace MSHTML { removeExpression(propname: string): boolean; removeFilter(pUnk: any): void; - /** @param boolean [fDeep=false] */ + /** @param fDeep [fDeep=false] */ removeNode(fDeep?: boolean): IHTMLDOMNode; replaceAdjacentText(where: string, newText: string): string; replaceChild(newChild: IHTMLDOMNode, oldChild: IHTMLDOMNode): IHTMLDOMNode; @@ -11412,16 +11380,16 @@ declare namespace MSHTML { readonly scrollWidth: number; setActive(): void; - /** @param number [lFlags=1] */ + /** @param lFlags [lFlags=1] */ setAttribute(strAttributeName: string, AttributeValue: any, lFlags?: number): void; setAttributeNode(pattr: IHTMLDOMAttribute): IHTMLDOMAttribute; setAttributeNodeNS(pattr: IHTMLDOMAttribute2): IHTMLDOMAttribute2; setAttributeNS(pvarNS: any, strAttributeName: string, pvarAttributeValue: any): void; - /** @param boolean [containerCapture=true] */ + /** @param containerCapture [containerCapture=true] */ setCapture(containerCapture?: boolean): void; - /** @param string [language=''] */ + /** @param language [language=''] */ setExpression(propname: string, expression: string, language?: string): void; readonly sourceIndex: number; spellcheck: any; @@ -11509,7 +11477,7 @@ declare namespace MSHTML { focus(): void; getAdjacentText(where: string): string; - /** @param number [lFlags=0] */ + /** @param lFlags [lFlags=0] */ getAttribute(strAttributeName: string, lFlags?: number): any; getAttributeNode(bstrName: string): IHTMLDOMAttribute; getAttributeNodeNS(pvarNS: any, bstrName: string): IHTMLDOMAttribute2; @@ -11696,7 +11664,7 @@ declare namespace MSHTML { readonly recordNumber: any; releaseCapture(): void; - /** @param number [lFlags=1] */ + /** @param lFlags [lFlags=1] */ removeAttribute(strAttributeName: string, lFlags?: number): boolean; removeAttributeNode(pattr: IHTMLDOMAttribute): IHTMLDOMAttribute; removeAttributeNS(pvarNS: any, strAttributeName: string): void; @@ -11705,7 +11673,7 @@ declare namespace MSHTML { removeExpression(propname: string): boolean; removeFilter(pUnk: any): void; - /** @param boolean [fDeep=false] */ + /** @param fDeep [fDeep=false] */ removeNode(fDeep?: boolean): IHTMLDOMNode; replaceAdjacentText(where: string, newText: string): string; replaceChild(newChild: IHTMLDOMNode, oldChild: IHTMLDOMNode): IHTMLDOMNode; @@ -11720,16 +11688,16 @@ declare namespace MSHTML { readonly scrollWidth: number; setActive(): void; - /** @param number [lFlags=1] */ + /** @param lFlags [lFlags=1] */ setAttribute(strAttributeName: string, AttributeValue: any, lFlags?: number): void; setAttributeNode(pattr: IHTMLDOMAttribute): IHTMLDOMAttribute; setAttributeNodeNS(pattr: IHTMLDOMAttribute2): IHTMLDOMAttribute2; setAttributeNS(pvarNS: any, strAttributeName: string, pvarAttributeValue: any): void; - /** @param boolean [containerCapture=true] */ + /** @param containerCapture [containerCapture=true] */ setCapture(containerCapture?: boolean): void; - /** @param string [language=''] */ + /** @param language [language=''] */ setExpression(propname: string, expression: string, language?: string): void; size: any; readonly sourceIndex: number; @@ -11746,9 +11714,7 @@ declare namespace MSHTML { xmsAcceleratorKey: string; } - class HTMLFormElement { - private 'MSHTML.HTMLFormElement_typekey': HTMLFormElement; - private constructor(); + interface HTMLFormElement { acceptCharset: string; accessKey: string; action: string; @@ -11759,14 +11725,14 @@ declare namespace MSHTML { appendItemSeparator(): void; /** - * @param string [name=''] - * @param string [filename=''] + * @param name [name=''] + * @param filename [filename=''] */ appendNameFilePair(name?: string, filename?: string): void; /** - * @param string [name=''] - * @param string [value=''] + * @param name [name=''] + * @param value [value=''] */ appendNameValuePair(name?: string, value?: string): void; applyElement(apply: IHTMLElement, where: string): IHTMLElement; @@ -11833,7 +11799,7 @@ declare namespace MSHTML { focus(): void; getAdjacentText(where: string): string; - /** @param number [lFlags=0] */ + /** @param lFlags [lFlags=0] */ getAttribute(strAttributeName: string, lFlags?: number): any; getAttributeNode(bstrName: string): IHTMLDOMAttribute; getAttributeNodeNS(pvarNS: any, bstrName: string): IHTMLDOMAttribute2; @@ -12026,7 +11992,7 @@ declare namespace MSHTML { readonly recordNumber: any; releaseCapture(): void; - /** @param number [lFlags=1] */ + /** @param lFlags [lFlags=1] */ removeAttribute(strAttributeName: string, lFlags?: number): boolean; removeAttributeNode(pattr: IHTMLDOMAttribute): IHTMLDOMAttribute; removeAttributeNS(pvarNS: any, strAttributeName: string): void; @@ -12035,7 +12001,7 @@ declare namespace MSHTML { removeExpression(propname: string): boolean; removeFilter(pUnk: any): void; - /** @param boolean [fDeep=false] */ + /** @param fDeep [fDeep=false] */ removeNode(fDeep?: boolean): IHTMLDOMNode; replaceAdjacentText(where: string, newText: string): string; replaceChild(newChild: IHTMLDOMNode, oldChild: IHTMLDOMNode): IHTMLDOMNode; @@ -12051,16 +12017,16 @@ declare namespace MSHTML { readonly scrollWidth: number; setActive(): void; - /** @param number [lFlags=1] */ + /** @param lFlags [lFlags=1] */ setAttribute(strAttributeName: string, AttributeValue: any, lFlags?: number): void; setAttributeNode(pattr: IHTMLDOMAttribute): IHTMLDOMAttribute; setAttributeNodeNS(pattr: IHTMLDOMAttribute2): IHTMLDOMAttribute2; setAttributeNS(pvarNS: any, strAttributeName: string, pvarAttributeValue: any): void; - /** @param boolean [containerCapture=true] */ + /** @param containerCapture [containerCapture=true] */ setCapture(containerCapture?: boolean): void; - /** @param string [language=''] */ + /** @param language [language=''] */ setExpression(propname: string, expression: string, language?: string): void; readonly sourceIndex: number; spellcheck: any; @@ -12078,6 +12044,7 @@ declare namespace MSHTML { readonly uniqueNumber: number; urns(urn: any): any; xmsAcceleratorKey: string; + (name?: any, index?: any): any; } class HTMLFrameBase { @@ -12155,7 +12122,7 @@ declare namespace MSHTML { frameSpacing: any; getAdjacentText(where: string): string; - /** @param number [lFlags=0] */ + /** @param lFlags [lFlags=0] */ getAttribute(strAttributeName: string, lFlags?: number): any; getAttributeNode(bstrName: string): IHTMLDOMAttribute; getAttributeNodeNS(pvarNS: any, bstrName: string): IHTMLDOMAttribute2; @@ -12347,7 +12314,7 @@ declare namespace MSHTML { readonly recordNumber: any; releaseCapture(): void; - /** @param number [lFlags=1] */ + /** @param lFlags [lFlags=1] */ removeAttribute(strAttributeName: string, lFlags?: number): boolean; removeAttributeNode(pattr: IHTMLDOMAttribute): IHTMLDOMAttribute; removeAttributeNS(pvarNS: any, strAttributeName: string): void; @@ -12356,7 +12323,7 @@ declare namespace MSHTML { removeExpression(propname: string): boolean; removeFilter(pUnk: any): void; - /** @param boolean [fDeep=false] */ + /** @param fDeep [fDeep=false] */ removeNode(fDeep?: boolean): IHTMLDOMNode; replaceAdjacentText(where: string, newText: string): string; replaceChild(newChild: IHTMLDOMNode, oldChild: IHTMLDOMNode): IHTMLDOMNode; @@ -12372,16 +12339,16 @@ declare namespace MSHTML { readonly scrollWidth: number; setActive(): void; - /** @param number [lFlags=1] */ + /** @param lFlags [lFlags=1] */ setAttribute(strAttributeName: string, AttributeValue: any, lFlags?: number): void; setAttributeNode(pattr: IHTMLDOMAttribute): IHTMLDOMAttribute; setAttributeNodeNS(pattr: IHTMLDOMAttribute2): IHTMLDOMAttribute2; setAttributeNS(pvarNS: any, strAttributeName: string, pvarAttributeValue: any): void; - /** @param boolean [containerCapture=true] */ + /** @param containerCapture [containerCapture=true] */ setCapture(containerCapture?: boolean): void; - /** @param string [language=''] */ + /** @param language [language=''] */ setExpression(propname: string, expression: string, language?: string): void; readonly sourceIndex: number; spellcheck: any; @@ -12479,7 +12446,7 @@ declare namespace MSHTML { frameSpacing: any; getAdjacentText(where: string): string; - /** @param number [lFlags=0] */ + /** @param lFlags [lFlags=0] */ getAttribute(strAttributeName: string, lFlags?: number): any; getAttributeNode(bstrName: string): IHTMLDOMAttribute; getAttributeNodeNS(pvarNS: any, bstrName: string): IHTMLDOMAttribute2; @@ -12691,7 +12658,7 @@ declare namespace MSHTML { readonly recordNumber: any; releaseCapture(): void; - /** @param number [lFlags=1] */ + /** @param lFlags [lFlags=1] */ removeAttribute(strAttributeName: string, lFlags?: number): boolean; removeAttributeNode(pattr: IHTMLDOMAttribute): IHTMLDOMAttribute; removeAttributeNS(pvarNS: any, strAttributeName: string): void; @@ -12700,7 +12667,7 @@ declare namespace MSHTML { removeExpression(propname: string): boolean; removeFilter(pUnk: any): void; - /** @param boolean [fDeep=false] */ + /** @param fDeep [fDeep=false] */ removeNode(fDeep?: boolean): IHTMLDOMNode; replaceAdjacentText(where: string, newText: string): string; replaceChild(newChild: IHTMLDOMNode, oldChild: IHTMLDOMNode): IHTMLDOMNode; @@ -12716,16 +12683,16 @@ declare namespace MSHTML { readonly scrollWidth: number; setActive(): void; - /** @param number [lFlags=1] */ + /** @param lFlags [lFlags=1] */ setAttribute(strAttributeName: string, AttributeValue: any, lFlags?: number): void; setAttributeNode(pattr: IHTMLDOMAttribute): IHTMLDOMAttribute; setAttributeNodeNS(pattr: IHTMLDOMAttribute2): IHTMLDOMAttribute2; setAttributeNS(pvarNS: any, strAttributeName: string, pvarAttributeValue: any): void; - /** @param boolean [containerCapture=true] */ + /** @param containerCapture [containerCapture=true] */ setCapture(containerCapture?: boolean): void; - /** @param string [language=''] */ + /** @param language [language=''] */ setExpression(propname: string, expression: string, language?: string): void; readonly sourceIndex: number; spellcheck: any; @@ -12819,7 +12786,7 @@ declare namespace MSHTML { frameSpacing: any; getAdjacentText(where: string): string; - /** @param number [lFlags=0] */ + /** @param lFlags [lFlags=0] */ getAttribute(strAttributeName: string, lFlags?: number): any; getAttributeNode(bstrName: string): IHTMLDOMAttribute; getAttributeNodeNS(pvarNS: any, bstrName: string): IHTMLDOMAttribute2; @@ -13016,7 +12983,7 @@ declare namespace MSHTML { readonly recordNumber: any; releaseCapture(): void; - /** @param number [lFlags=1] */ + /** @param lFlags [lFlags=1] */ removeAttribute(strAttributeName: string, lFlags?: number): boolean; removeAttributeNode(pattr: IHTMLDOMAttribute): IHTMLDOMAttribute; removeAttributeNS(pvarNS: any, strAttributeName: string): void; @@ -13025,7 +12992,7 @@ declare namespace MSHTML { removeExpression(propname: string): boolean; removeFilter(pUnk: any): void; - /** @param boolean [fDeep=false] */ + /** @param fDeep [fDeep=false] */ removeNode(fDeep?: boolean): IHTMLDOMNode; replaceAdjacentText(where: string, newText: string): string; replaceChild(newChild: IHTMLDOMNode, oldChild: IHTMLDOMNode): IHTMLDOMNode; @@ -13041,16 +13008,16 @@ declare namespace MSHTML { readonly scrollWidth: number; setActive(): void; - /** @param number [lFlags=1] */ + /** @param lFlags [lFlags=1] */ setAttribute(strAttributeName: string, AttributeValue: any, lFlags?: number): void; setAttributeNode(pattr: IHTMLDOMAttribute): IHTMLDOMAttribute; setAttributeNodeNS(pattr: IHTMLDOMAttribute2): IHTMLDOMAttribute2; setAttributeNS(pvarNS: any, strAttributeName: string, pvarAttributeValue: any): void; - /** @param boolean [containerCapture=true] */ + /** @param containerCapture [containerCapture=true] */ setCapture(containerCapture?: boolean): void; - /** @param string [language=''] */ + /** @param language [language=''] */ setExpression(propname: string, expression: string, language?: string): void; readonly sourceIndex: number; spellcheck: any; @@ -13136,7 +13103,7 @@ declare namespace MSHTML { focus(): void; getAdjacentText(where: string): string; - /** @param number [lFlags=0] */ + /** @param lFlags [lFlags=0] */ getAttribute(strAttributeName: string, lFlags?: number): any; getAttributeNode(bstrName: string): IHTMLDOMAttribute; getAttributeNodeNS(pvarNS: any, bstrName: string): IHTMLDOMAttribute2; @@ -13325,7 +13292,7 @@ declare namespace MSHTML { readonly recordset: any; releaseCapture(): void; - /** @param number [lFlags=1] */ + /** @param lFlags [lFlags=1] */ removeAttribute(strAttributeName: string, lFlags?: number): boolean; removeAttributeNode(pattr: IHTMLDOMAttribute): IHTMLDOMAttribute; removeAttributeNS(pvarNS: any, strAttributeName: string): void; @@ -13334,7 +13301,7 @@ declare namespace MSHTML { removeExpression(propname: string): boolean; removeFilter(pUnk: any): void; - /** @param boolean [fDeep=false] */ + /** @param fDeep [fDeep=false] */ removeNode(fDeep?: boolean): IHTMLDOMNode; replaceAdjacentText(where: string, newText: string): string; replaceChild(newChild: IHTMLDOMNode, oldChild: IHTMLDOMNode): IHTMLDOMNode; @@ -13349,16 +13316,16 @@ declare namespace MSHTML { readonly scrollWidth: number; setActive(): void; - /** @param number [lFlags=1] */ + /** @param lFlags [lFlags=1] */ setAttribute(strAttributeName: string, AttributeValue: any, lFlags?: number): void; setAttributeNode(pattr: IHTMLDOMAttribute): IHTMLDOMAttribute; setAttributeNodeNS(pattr: IHTMLDOMAttribute2): IHTMLDOMAttribute2; setAttributeNS(pvarNS: any, strAttributeName: string, pvarAttributeValue: any): void; - /** @param boolean [containerCapture=true] */ + /** @param containerCapture [containerCapture=true] */ setCapture(containerCapture?: boolean): void; - /** @param string [language=''] */ + /** @param language [language=''] */ setExpression(propname: string, expression: string, language?: string): void; readonly sourceIndex: number; spellcheck: any; @@ -13444,7 +13411,7 @@ declare namespace MSHTML { focus(): void; getAdjacentText(where: string): string; - /** @param number [lFlags=0] */ + /** @param lFlags [lFlags=0] */ getAttribute(strAttributeName: string, lFlags?: number): any; getAttributeNode(bstrName: string): IHTMLDOMAttribute; getAttributeNodeNS(pvarNS: any, bstrName: string): IHTMLDOMAttribute2; @@ -13633,7 +13600,7 @@ declare namespace MSHTML { readonly recordNumber: any; releaseCapture(): void; - /** @param number [lFlags=1] */ + /** @param lFlags [lFlags=1] */ removeAttribute(strAttributeName: string, lFlags?: number): boolean; removeAttributeNode(pattr: IHTMLDOMAttribute): IHTMLDOMAttribute; removeAttributeNS(pvarNS: any, strAttributeName: string): void; @@ -13642,7 +13609,7 @@ declare namespace MSHTML { removeExpression(propname: string): boolean; removeFilter(pUnk: any): void; - /** @param boolean [fDeep=false] */ + /** @param fDeep [fDeep=false] */ removeNode(fDeep?: boolean): IHTMLDOMNode; replaceAdjacentText(where: string, newText: string): string; replaceChild(newChild: IHTMLDOMNode, oldChild: IHTMLDOMNode): IHTMLDOMNode; @@ -13657,16 +13624,16 @@ declare namespace MSHTML { readonly scrollWidth: number; setActive(): void; - /** @param number [lFlags=1] */ + /** @param lFlags [lFlags=1] */ setAttribute(strAttributeName: string, AttributeValue: any, lFlags?: number): void; setAttributeNode(pattr: IHTMLDOMAttribute): IHTMLDOMAttribute; setAttributeNodeNS(pattr: IHTMLDOMAttribute2): IHTMLDOMAttribute2; setAttributeNS(pvarNS: any, strAttributeName: string, pvarAttributeValue: any): void; - /** @param boolean [containerCapture=true] */ + /** @param containerCapture [containerCapture=true] */ setCapture(containerCapture?: boolean): void; - /** @param string [language=''] */ + /** @param language [language=''] */ setExpression(propname: string, expression: string, language?: string): void; readonly sourceIndex: number; spellcheck: any; @@ -13754,7 +13721,7 @@ declare namespace MSHTML { focus(): void; getAdjacentText(where: string): string; - /** @param number [lFlags=0] */ + /** @param lFlags [lFlags=0] */ getAttribute(strAttributeName: string, lFlags?: number): any; getAttributeNode(bstrName: string): IHTMLDOMAttribute; getAttributeNodeNS(pvarNS: any, bstrName: string): IHTMLDOMAttribute2; @@ -13941,7 +13908,7 @@ declare namespace MSHTML { readonly recordNumber: any; releaseCapture(): void; - /** @param number [lFlags=1] */ + /** @param lFlags [lFlags=1] */ removeAttribute(strAttributeName: string, lFlags?: number): boolean; removeAttributeNode(pattr: IHTMLDOMAttribute): IHTMLDOMAttribute; removeAttributeNS(pvarNS: any, strAttributeName: string): void; @@ -13950,7 +13917,7 @@ declare namespace MSHTML { removeExpression(propname: string): boolean; removeFilter(pUnk: any): void; - /** @param boolean [fDeep=false] */ + /** @param fDeep [fDeep=false] */ removeNode(fDeep?: boolean): IHTMLDOMNode; replaceAdjacentText(where: string, newText: string): string; replaceChild(newChild: IHTMLDOMNode, oldChild: IHTMLDOMNode): IHTMLDOMNode; @@ -13965,16 +13932,16 @@ declare namespace MSHTML { readonly scrollWidth: number; setActive(): void; - /** @param number [lFlags=1] */ + /** @param lFlags [lFlags=1] */ setAttribute(strAttributeName: string, AttributeValue: any, lFlags?: number): void; setAttributeNode(pattr: IHTMLDOMAttribute): IHTMLDOMAttribute; setAttributeNodeNS(pattr: IHTMLDOMAttribute2): IHTMLDOMAttribute2; setAttributeNS(pvarNS: any, strAttributeName: string, pvarAttributeValue: any): void; - /** @param boolean [containerCapture=true] */ + /** @param containerCapture [containerCapture=true] */ setCapture(containerCapture?: boolean): void; - /** @param string [language=''] */ + /** @param language [language=''] */ setExpression(propname: string, expression: string, language?: string): void; readonly sourceIndex: number; spellcheck: any; @@ -14072,7 +14039,7 @@ declare namespace MSHTML { focus(): void; getAdjacentText(where: string): string; - /** @param number [lFlags=0] */ + /** @param lFlags [lFlags=0] */ getAttribute(strAttributeName: string, lFlags?: number): any; getAttributeNode(bstrName: string): IHTMLDOMAttribute; getAttributeNodeNS(pvarNS: any, bstrName: string): IHTMLDOMAttribute2; @@ -14260,7 +14227,7 @@ declare namespace MSHTML { readonly recordNumber: any; releaseCapture(): void; - /** @param number [lFlags=1] */ + /** @param lFlags [lFlags=1] */ removeAttribute(strAttributeName: string, lFlags?: number): boolean; removeAttributeNode(pattr: IHTMLDOMAttribute): IHTMLDOMAttribute; removeAttributeNS(pvarNS: any, strAttributeName: string): void; @@ -14269,7 +14236,7 @@ declare namespace MSHTML { removeExpression(propname: string): boolean; removeFilter(pUnk: any): void; - /** @param boolean [fDeep=false] */ + /** @param fDeep [fDeep=false] */ removeNode(fDeep?: boolean): IHTMLDOMNode; replaceAdjacentText(where: string, newText: string): string; replaceChild(newChild: IHTMLDOMNode, oldChild: IHTMLDOMNode): IHTMLDOMNode; @@ -14284,16 +14251,16 @@ declare namespace MSHTML { readonly scrollWidth: number; setActive(): void; - /** @param number [lFlags=1] */ + /** @param lFlags [lFlags=1] */ setAttribute(strAttributeName: string, AttributeValue: any, lFlags?: number): void; setAttributeNode(pattr: IHTMLDOMAttribute): IHTMLDOMAttribute; setAttributeNodeNS(pattr: IHTMLDOMAttribute2): IHTMLDOMAttribute2; setAttributeNS(pvarNS: any, strAttributeName: string, pvarAttributeValue: any): void; - /** @param boolean [containerCapture=true] */ + /** @param containerCapture [containerCapture=true] */ setCapture(containerCapture?: boolean): void; - /** @param string [language=''] */ + /** @param language [language=''] */ setExpression(propname: string, expression: string, language?: string): void; size: any; readonly sourceIndex: number; @@ -14381,7 +14348,7 @@ declare namespace MSHTML { focus(): void; getAdjacentText(where: string): string; - /** @param number [lFlags=0] */ + /** @param lFlags [lFlags=0] */ getAttribute(strAttributeName: string, lFlags?: number): any; getAttributeNode(bstrName: string): IHTMLDOMAttribute; getAttributeNodeNS(pvarNS: any, bstrName: string): IHTMLDOMAttribute2; @@ -14568,7 +14535,7 @@ declare namespace MSHTML { readonly recordNumber: any; releaseCapture(): void; - /** @param number [lFlags=1] */ + /** @param lFlags [lFlags=1] */ removeAttribute(strAttributeName: string, lFlags?: number): boolean; removeAttributeNode(pattr: IHTMLDOMAttribute): IHTMLDOMAttribute; removeAttributeNS(pvarNS: any, strAttributeName: string): void; @@ -14577,7 +14544,7 @@ declare namespace MSHTML { removeExpression(propname: string): boolean; removeFilter(pUnk: any): void; - /** @param boolean [fDeep=false] */ + /** @param fDeep [fDeep=false] */ removeNode(fDeep?: boolean): IHTMLDOMNode; replaceAdjacentText(where: string, newText: string): string; replaceChild(newChild: IHTMLDOMNode, oldChild: IHTMLDOMNode): IHTMLDOMNode; @@ -14592,16 +14559,16 @@ declare namespace MSHTML { readonly scrollWidth: number; setActive(): void; - /** @param number [lFlags=1] */ + /** @param lFlags [lFlags=1] */ setAttribute(strAttributeName: string, AttributeValue: any, lFlags?: number): void; setAttributeNode(pattr: IHTMLDOMAttribute): IHTMLDOMAttribute; setAttributeNodeNS(pattr: IHTMLDOMAttribute2): IHTMLDOMAttribute2; setAttributeNS(pvarNS: any, strAttributeName: string, pvarAttributeValue: any): void; - /** @param boolean [containerCapture=true] */ + /** @param containerCapture [containerCapture=true] */ setCapture(containerCapture?: boolean): void; - /** @param string [language=''] */ + /** @param language [language=''] */ setExpression(propname: string, expression: string, language?: string): void; readonly sourceIndex: number; spellcheck: any; @@ -14699,7 +14666,7 @@ declare namespace MSHTML { frameSpacing: any; getAdjacentText(where: string): string; - /** @param number [lFlags=0] */ + /** @param lFlags [lFlags=0] */ getAttribute(strAttributeName: string, lFlags?: number): any; getAttributeNode(bstrName: string): IHTMLDOMAttribute; getAttributeNodeNS(pvarNS: any, bstrName: string): IHTMLDOMAttribute2; @@ -14912,7 +14879,7 @@ declare namespace MSHTML { readonly recordNumber: any; releaseCapture(): void; - /** @param number [lFlags=1] */ + /** @param lFlags [lFlags=1] */ removeAttribute(strAttributeName: string, lFlags?: number): boolean; removeAttributeNode(pattr: IHTMLDOMAttribute): IHTMLDOMAttribute; removeAttributeNS(pvarNS: any, strAttributeName: string): void; @@ -14921,7 +14888,7 @@ declare namespace MSHTML { removeExpression(propname: string): boolean; removeFilter(pUnk: any): void; - /** @param boolean [fDeep=false] */ + /** @param fDeep [fDeep=false] */ removeNode(fDeep?: boolean): IHTMLDOMNode; replaceAdjacentText(where: string, newText: string): string; replaceChild(newChild: IHTMLDOMNode, oldChild: IHTMLDOMNode): IHTMLDOMNode; @@ -14937,16 +14904,16 @@ declare namespace MSHTML { readonly scrollWidth: number; setActive(): void; - /** @param number [lFlags=1] */ + /** @param lFlags [lFlags=1] */ setAttribute(strAttributeName: string, AttributeValue: any, lFlags?: number): void; setAttributeNode(pattr: IHTMLDOMAttribute): IHTMLDOMAttribute; setAttributeNodeNS(pattr: IHTMLDOMAttribute2): IHTMLDOMAttribute2; setAttributeNS(pvarNS: any, strAttributeName: string, pvarAttributeValue: any): void; - /** @param boolean [containerCapture=true] */ + /** @param containerCapture [containerCapture=true] */ setCapture(containerCapture?: boolean): void; - /** @param string [language=''] */ + /** @param language [language=''] */ setExpression(propname: string, expression: string, language?: string): void; readonly sourceIndex: number; spellcheck: any; @@ -14966,10 +14933,9 @@ declare namespace MSHTML { xmsAcceleratorKey: string; } - class HTMLImageElementFactory { - private 'MSHTML.HTMLImageElementFactory_typekey': HTMLImageElementFactory; - private constructor(); + interface HTMLImageElementFactory { create(width?: any, height?: any): IHTMLImgElement; + (width?: any, height?: any): IHTMLImgElement; } class HTMLImg { @@ -15055,7 +15021,7 @@ declare namespace MSHTML { focus(): void; getAdjacentText(where: string): string; - /** @param number [lFlags=0] */ + /** @param lFlags [lFlags=0] */ getAttribute(strAttributeName: string, lFlags?: number): any; getAttributeNode(bstrName: string): IHTMLDOMAttribute; getAttributeNodeNS(pvarNS: any, bstrName: string): IHTMLDOMAttribute2; @@ -15276,7 +15242,7 @@ declare namespace MSHTML { readonly recordNumber: any; releaseCapture(): void; - /** @param number [lFlags=1] */ + /** @param lFlags [lFlags=1] */ removeAttribute(strAttributeName: string, lFlags?: number): boolean; removeAttributeNode(pattr: IHTMLDOMAttribute): IHTMLDOMAttribute; removeAttributeNS(pvarNS: any, strAttributeName: string): void; @@ -15285,7 +15251,7 @@ declare namespace MSHTML { removeExpression(propname: string): boolean; removeFilter(pUnk: any): void; - /** @param boolean [fDeep=false] */ + /** @param fDeep [fDeep=false] */ removeNode(fDeep?: boolean): IHTMLDOMNode; replaceAdjacentText(where: string, newText: string): string; replaceChild(newChild: IHTMLDOMNode, oldChild: IHTMLDOMNode): IHTMLDOMNode; @@ -15300,16 +15266,16 @@ declare namespace MSHTML { readonly scrollWidth: number; setActive(): void; - /** @param number [lFlags=1] */ + /** @param lFlags [lFlags=1] */ setAttribute(strAttributeName: string, AttributeValue: any, lFlags?: number): void; setAttributeNode(pattr: IHTMLDOMAttribute): IHTMLDOMAttribute; setAttributeNodeNS(pattr: IHTMLDOMAttribute2): IHTMLDOMAttribute2; setAttributeNS(pvarNS: any, strAttributeName: string, pvarAttributeValue: any): void; - /** @param boolean [containerCapture=true] */ + /** @param containerCapture [containerCapture=true] */ setCapture(containerCapture?: boolean): void; - /** @param string [language=''] */ + /** @param language [language=''] */ setExpression(propname: string, expression: string, language?: string): void; readonly sourceIndex: number; spellcheck: any; @@ -15354,7 +15320,7 @@ declare namespace MSHTML { focus(): void; readonly form: IHTMLFormElement; - /** @param number [lFlags=0] */ + /** @param lFlags [lFlags=0] */ getAttribute(strAttributeName: string, lFlags?: number): any; id: string; innerHTML: string; @@ -15401,12 +15367,12 @@ declare namespace MSHTML { readonly parentTextEdit: IHTMLElement; readonly recordNumber: any; - /** @param number [lFlags=1] */ + /** @param lFlags [lFlags=1] */ removeAttribute(strAttributeName: string, lFlags?: number): boolean; removeFilter(pUnk: any): void; scrollIntoView(varargStart?: any): void; - /** @param number [lFlags=1] */ + /** @param lFlags [lFlags=1] */ setAttribute(strAttributeName: string, AttributeValue: any, lFlags?: number): void; readonly sourceIndex: number; status: any; @@ -15504,7 +15470,7 @@ declare namespace MSHTML { readonly form: IHTMLFormElement; getAdjacentText(where: string): string; - /** @param number [lFlags=0] */ + /** @param lFlags [lFlags=0] */ getAttribute(strAttributeName: string, lFlags?: number): any; getAttributeNode(bstrName: string): IHTMLDOMAttribute; getAttributeNodeNS(pvarNS: any, bstrName: string): IHTMLDOMAttribute2; @@ -15720,7 +15686,7 @@ declare namespace MSHTML { readonly recordNumber: any; releaseCapture(): void; - /** @param number [lFlags=1] */ + /** @param lFlags [lFlags=1] */ removeAttribute(strAttributeName: string, lFlags?: number): boolean; removeAttributeNode(pattr: IHTMLDOMAttribute): IHTMLDOMAttribute; removeAttributeNS(pvarNS: any, strAttributeName: string): void; @@ -15729,7 +15695,7 @@ declare namespace MSHTML { removeExpression(propname: string): boolean; removeFilter(pUnk: any): void; - /** @param boolean [fDeep=false] */ + /** @param fDeep [fDeep=false] */ removeNode(fDeep?: boolean): IHTMLDOMNode; replaceAdjacentText(where: string, newText: string): string; replaceChild(newChild: IHTMLDOMNode, oldChild: IHTMLDOMNode): IHTMLDOMNode; @@ -15747,16 +15713,16 @@ declare namespace MSHTML { selectionStart: number; setActive(): void; - /** @param number [lFlags=1] */ + /** @param lFlags [lFlags=1] */ setAttribute(strAttributeName: string, AttributeValue: any, lFlags?: number): void; setAttributeNode(pattr: IHTMLDOMAttribute): IHTMLDOMAttribute; setAttributeNodeNS(pattr: IHTMLDOMAttribute2): IHTMLDOMAttribute2; setAttributeNS(pvarNS: any, strAttributeName: string, pvarAttributeValue: any): void; - /** @param boolean [containerCapture=true] */ + /** @param containerCapture [containerCapture=true] */ setCapture(containerCapture?: boolean): void; - /** @param string [language=''] */ + /** @param language [language=''] */ setExpression(propname: string, expression: string, language?: string): void; setSelectionRange(start: number, end: number): void; size: number; @@ -15767,10 +15733,10 @@ declare namespace MSHTML { status: boolean; step: string; - /** @param number [n=1] */ + /** @param n [n=1] */ stepDown(n?: number): void; - /** @param number [n=1] */ + /** @param n [n=1] */ stepUp(n?: number): void; readonly style: IHTMLStyle; swapNode(otherNode: IHTMLDOMNode): IHTMLDOMNode; @@ -15813,7 +15779,7 @@ declare namespace MSHTML { focus(): void; readonly form: IHTMLFormElement; - /** @param number [lFlags=0] */ + /** @param lFlags [lFlags=0] */ getAttribute(strAttributeName: string, lFlags?: number): any; id: string; innerHTML: string; @@ -15863,13 +15829,13 @@ declare namespace MSHTML { readonly parentTextEdit: IHTMLElement; readonly recordNumber: any; - /** @param number [lFlags=1] */ + /** @param lFlags [lFlags=1] */ removeAttribute(strAttributeName: string, lFlags?: number): boolean; removeFilter(pUnk: any): void; scrollIntoView(varargStart?: any): void; select(): void; - /** @param number [lFlags=1] */ + /** @param lFlags [lFlags=1] */ setAttribute(strAttributeName: string, AttributeValue: any, lFlags?: number): void; size: number; readonly sourceIndex: number; @@ -15908,7 +15874,7 @@ declare namespace MSHTML { readonly filters: IHTMLFiltersCollection; focus(): void; - /** @param number [lFlags=0] */ + /** @param lFlags [lFlags=0] */ getAttribute(strAttributeName: string, lFlags?: number): any; height: number; hspace: number; @@ -15963,12 +15929,12 @@ declare namespace MSHTML { readonly readyState: string; readonly recordNumber: any; - /** @param number [lFlags=1] */ + /** @param lFlags [lFlags=1] */ removeAttribute(strAttributeName: string, lFlags?: number): boolean; removeFilter(pUnk: any): void; scrollIntoView(varargStart?: any): void; - /** @param number [lFlags=1] */ + /** @param lFlags [lFlags=1] */ setAttribute(strAttributeName: string, AttributeValue: any, lFlags?: number): void; readonly sourceIndex: number; src: string; @@ -16010,7 +15976,7 @@ declare namespace MSHTML { focus(): void; readonly form: IHTMLFormElement; - /** @param number [lFlags=0] */ + /** @param lFlags [lFlags=0] */ getAttribute(strAttributeName: string, lFlags?: number): any; id: string; innerHTML: string; @@ -16061,13 +16027,13 @@ declare namespace MSHTML { readOnly: boolean; readonly recordNumber: any; - /** @param number [lFlags=1] */ + /** @param lFlags [lFlags=1] */ removeAttribute(strAttributeName: string, lFlags?: number): boolean; removeFilter(pUnk: any): void; scrollIntoView(varargStart?: any): void; select(): void; - /** @param number [lFlags=1] */ + /** @param lFlags [lFlags=1] */ setAttribute(strAttributeName: string, AttributeValue: any, lFlags?: number): void; size: number; readonly sourceIndex: number; @@ -16153,7 +16119,7 @@ declare namespace MSHTML { readonly form: IHTMLFormElement; getAdjacentText(where: string): string; - /** @param number [lFlags=0] */ + /** @param lFlags [lFlags=0] */ getAttribute(strAttributeName: string, lFlags?: number): any; getAttributeNode(bstrName: string): IHTMLDOMAttribute; getAttributeNodeNS(pvarNS: any, bstrName: string): IHTMLDOMAttribute2; @@ -16341,7 +16307,7 @@ declare namespace MSHTML { readonly recordNumber: any; releaseCapture(): void; - /** @param number [lFlags=1] */ + /** @param lFlags [lFlags=1] */ removeAttribute(strAttributeName: string, lFlags?: number): boolean; removeAttributeNode(pattr: IHTMLDOMAttribute): IHTMLDOMAttribute; removeAttributeNS(pvarNS: any, strAttributeName: string): void; @@ -16350,7 +16316,7 @@ declare namespace MSHTML { removeExpression(propname: string): boolean; removeFilter(pUnk: any): void; - /** @param boolean [fDeep=false] */ + /** @param fDeep [fDeep=false] */ removeNode(fDeep?: boolean): IHTMLDOMNode; replaceAdjacentText(where: string, newText: string): string; replaceChild(newChild: IHTMLDOMNode, oldChild: IHTMLDOMNode): IHTMLDOMNode; @@ -16365,16 +16331,16 @@ declare namespace MSHTML { readonly scrollWidth: number; setActive(): void; - /** @param number [lFlags=1] */ + /** @param lFlags [lFlags=1] */ setAttribute(strAttributeName: string, AttributeValue: any, lFlags?: number): void; setAttributeNode(pattr: IHTMLDOMAttribute): IHTMLDOMAttribute; setAttributeNodeNS(pattr: IHTMLDOMAttribute2): IHTMLDOMAttribute2; setAttributeNS(pvarNS: any, strAttributeName: string, pvarAttributeValue: any): void; - /** @param boolean [containerCapture=true] */ + /** @param containerCapture [containerCapture=true] */ setCapture(containerCapture?: boolean): void; - /** @param string [language=''] */ + /** @param language [language=''] */ setExpression(propname: string, expression: string, language?: string): void; readonly sourceIndex: number; spellcheck: any; @@ -16465,7 +16431,7 @@ declare namespace MSHTML { readonly form: IHTMLFormElement; getAdjacentText(where: string): string; - /** @param number [lFlags=0] */ + /** @param lFlags [lFlags=0] */ getAttribute(strAttributeName: string, lFlags?: number): any; getAttributeNode(bstrName: string): IHTMLDOMAttribute; getAttributeNodeNS(pvarNS: any, bstrName: string): IHTMLDOMAttribute2; @@ -16668,7 +16634,7 @@ declare namespace MSHTML { readonly recordNumber: any; releaseCapture(): void; - /** @param number [lFlags=1] */ + /** @param lFlags [lFlags=1] */ removeAttribute(strAttributeName: string, lFlags?: number): boolean; removeAttributeNode(pattr: IHTMLDOMAttribute): IHTMLDOMAttribute; removeAttributeNS(pvarNS: any, strAttributeName: string): void; @@ -16677,7 +16643,7 @@ declare namespace MSHTML { removeExpression(propname: string): boolean; removeFilter(pUnk: any): void; - /** @param boolean [fDeep=false] */ + /** @param fDeep [fDeep=false] */ removeNode(fDeep?: boolean): IHTMLDOMNode; replaceAdjacentText(where: string, newText: string): string; replaceChild(newChild: IHTMLDOMNode, oldChild: IHTMLDOMNode): IHTMLDOMNode; @@ -16692,16 +16658,16 @@ declare namespace MSHTML { readonly scrollWidth: number; setActive(): void; - /** @param number [lFlags=1] */ + /** @param lFlags [lFlags=1] */ setAttribute(strAttributeName: string, AttributeValue: any, lFlags?: number): void; setAttributeNode(pattr: IHTMLDOMAttribute): IHTMLDOMAttribute; setAttributeNodeNS(pattr: IHTMLDOMAttribute2): IHTMLDOMAttribute2; setAttributeNS(pvarNS: any, strAttributeName: string, pvarAttributeValue: any): void; - /** @param boolean [containerCapture=true] */ + /** @param containerCapture [containerCapture=true] */ setCapture(containerCapture?: boolean): void; - /** @param string [language=''] */ + /** @param language [language=''] */ setExpression(propname: string, expression: string, language?: string): void; readonly sourceIndex: number; spellcheck: any; @@ -16794,7 +16760,7 @@ declare namespace MSHTML { readonly form: IHTMLFormElement; getAdjacentText(where: string): string; - /** @param number [lFlags=0] */ + /** @param lFlags [lFlags=0] */ getAttribute(strAttributeName: string, lFlags?: number): any; getAttributeNode(bstrName: string): IHTMLDOMAttribute; getAttributeNodeNS(pvarNS: any, bstrName: string): IHTMLDOMAttribute2; @@ -16996,7 +16962,7 @@ declare namespace MSHTML { readonly recordNumber: any; releaseCapture(): void; - /** @param number [lFlags=1] */ + /** @param lFlags [lFlags=1] */ removeAttribute(strAttributeName: string, lFlags?: number): boolean; removeAttributeNode(pattr: IHTMLDOMAttribute): IHTMLDOMAttribute; removeAttributeNS(pvarNS: any, strAttributeName: string): void; @@ -17005,7 +16971,7 @@ declare namespace MSHTML { removeExpression(propname: string): boolean; removeFilter(pUnk: any): void; - /** @param boolean [fDeep=false] */ + /** @param fDeep [fDeep=false] */ removeNode(fDeep?: boolean): IHTMLDOMNode; replaceAdjacentText(where: string, newText: string): string; replaceChild(newChild: IHTMLDOMNode, oldChild: IHTMLDOMNode): IHTMLDOMNode; @@ -17020,16 +16986,16 @@ declare namespace MSHTML { readonly scrollWidth: number; setActive(): void; - /** @param number [lFlags=1] */ + /** @param lFlags [lFlags=1] */ setAttribute(strAttributeName: string, AttributeValue: any, lFlags?: number): void; setAttributeNode(pattr: IHTMLDOMAttribute): IHTMLDOMAttribute; setAttributeNodeNS(pattr: IHTMLDOMAttribute2): IHTMLDOMAttribute2; setAttributeNS(pvarNS: any, strAttributeName: string, pvarAttributeValue: any): void; - /** @param boolean [containerCapture=true] */ + /** @param containerCapture [containerCapture=true] */ setCapture(containerCapture?: boolean): void; - /** @param string [language=''] */ + /** @param language [language=''] */ setExpression(propname: string, expression: string, language?: string): void; readonly sourceIndex: number; spellcheck: any; @@ -17116,7 +17082,7 @@ declare namespace MSHTML { focus(): void; getAdjacentText(where: string): string; - /** @param number [lFlags=0] */ + /** @param lFlags [lFlags=0] */ getAttribute(strAttributeName: string, lFlags?: number): any; getAttributeNode(bstrName: string): IHTMLDOMAttribute; getAttributeNodeNS(pvarNS: any, bstrName: string): IHTMLDOMAttribute2; @@ -17303,7 +17269,7 @@ declare namespace MSHTML { readonly recordNumber: any; releaseCapture(): void; - /** @param number [lFlags=1] */ + /** @param lFlags [lFlags=1] */ removeAttribute(strAttributeName: string, lFlags?: number): boolean; removeAttributeNode(pattr: IHTMLDOMAttribute): IHTMLDOMAttribute; removeAttributeNS(pvarNS: any, strAttributeName: string): void; @@ -17312,7 +17278,7 @@ declare namespace MSHTML { removeExpression(propname: string): boolean; removeFilter(pUnk: any): void; - /** @param boolean [fDeep=false] */ + /** @param fDeep [fDeep=false] */ removeNode(fDeep?: boolean): IHTMLDOMNode; replaceAdjacentText(where: string, newText: string): string; replaceChild(newChild: IHTMLDOMNode, oldChild: IHTMLDOMNode): IHTMLDOMNode; @@ -17327,16 +17293,16 @@ declare namespace MSHTML { readonly scrollWidth: number; setActive(): void; - /** @param number [lFlags=1] */ + /** @param lFlags [lFlags=1] */ setAttribute(strAttributeName: string, AttributeValue: any, lFlags?: number): void; setAttributeNode(pattr: IHTMLDOMAttribute): IHTMLDOMAttribute; setAttributeNodeNS(pattr: IHTMLDOMAttribute2): IHTMLDOMAttribute2; setAttributeNS(pvarNS: any, strAttributeName: string, pvarAttributeValue: any): void; - /** @param boolean [containerCapture=true] */ + /** @param containerCapture [containerCapture=true] */ setCapture(containerCapture?: boolean): void; - /** @param string [language=''] */ + /** @param language [language=''] */ setExpression(propname: string, expression: string, language?: string): void; readonly sourceIndex: number; spellcheck: any; @@ -17425,7 +17391,7 @@ declare namespace MSHTML { focus(): void; getAdjacentText(where: string): string; - /** @param number [lFlags=0] */ + /** @param lFlags [lFlags=0] */ getAttribute(strAttributeName: string, lFlags?: number): any; getAttributeNode(bstrName: string): IHTMLDOMAttribute; getAttributeNodeNS(pvarNS: any, bstrName: string): IHTMLDOMAttribute2; @@ -17617,7 +17583,7 @@ declare namespace MSHTML { rel: string; releaseCapture(): void; - /** @param number [lFlags=1] */ + /** @param lFlags [lFlags=1] */ removeAttribute(strAttributeName: string, lFlags?: number): boolean; removeAttributeNode(pattr: IHTMLDOMAttribute): IHTMLDOMAttribute; removeAttributeNS(pvarNS: any, strAttributeName: string): void; @@ -17626,7 +17592,7 @@ declare namespace MSHTML { removeExpression(propname: string): boolean; removeFilter(pUnk: any): void; - /** @param boolean [fDeep=false] */ + /** @param fDeep [fDeep=false] */ removeNode(fDeep?: boolean): IHTMLDOMNode; replaceAdjacentText(where: string, newText: string): string; replaceChild(newChild: IHTMLDOMNode, oldChild: IHTMLDOMNode): IHTMLDOMNode; @@ -17642,16 +17608,16 @@ declare namespace MSHTML { readonly scrollWidth: number; setActive(): void; - /** @param number [lFlags=1] */ + /** @param lFlags [lFlags=1] */ setAttribute(strAttributeName: string, AttributeValue: any, lFlags?: number): void; setAttributeNode(pattr: IHTMLDOMAttribute): IHTMLDOMAttribute; setAttributeNodeNS(pattr: IHTMLDOMAttribute2): IHTMLDOMAttribute2; setAttributeNS(pvarNS: any, strAttributeName: string, pvarAttributeValue: any): void; - /** @param boolean [containerCapture=true] */ + /** @param containerCapture [containerCapture=true] */ setCapture(containerCapture?: boolean): void; - /** @param string [language=''] */ + /** @param language [language=''] */ setExpression(propname: string, expression: string, language?: string): void; readonly sheet: IHTMLStyleSheet; readonly sourceIndex: number; @@ -17742,7 +17708,7 @@ declare namespace MSHTML { focus(): void; getAdjacentText(where: string): string; - /** @param number [lFlags=0] */ + /** @param lFlags [lFlags=0] */ getAttribute(strAttributeName: string, lFlags?: number): any; getAttributeNode(bstrName: string): IHTMLDOMAttribute; getAttributeNodeNS(pvarNS: any, bstrName: string): IHTMLDOMAttribute2; @@ -17929,7 +17895,7 @@ declare namespace MSHTML { readonly recordNumber: any; releaseCapture(): void; - /** @param number [lFlags=1] */ + /** @param lFlags [lFlags=1] */ removeAttribute(strAttributeName: string, lFlags?: number): boolean; removeAttributeNode(pattr: IHTMLDOMAttribute): IHTMLDOMAttribute; removeAttributeNS(pvarNS: any, strAttributeName: string): void; @@ -17938,7 +17904,7 @@ declare namespace MSHTML { removeExpression(propname: string): boolean; removeFilter(pUnk: any): void; - /** @param boolean [fDeep=false] */ + /** @param fDeep [fDeep=false] */ removeNode(fDeep?: boolean): IHTMLDOMNode; replaceAdjacentText(where: string, newText: string): string; replaceChild(newChild: IHTMLDOMNode, oldChild: IHTMLDOMNode): IHTMLDOMNode; @@ -17953,16 +17919,16 @@ declare namespace MSHTML { readonly scrollWidth: number; setActive(): void; - /** @param number [lFlags=1] */ + /** @param lFlags [lFlags=1] */ setAttribute(strAttributeName: string, AttributeValue: any, lFlags?: number): void; setAttributeNode(pattr: IHTMLDOMAttribute): IHTMLDOMAttribute; setAttributeNodeNS(pattr: IHTMLDOMAttribute2): IHTMLDOMAttribute2; setAttributeNS(pvarNS: any, strAttributeName: string, pvarAttributeValue: any): void; - /** @param boolean [containerCapture=true] */ + /** @param containerCapture [containerCapture=true] */ setCapture(containerCapture?: boolean): void; - /** @param string [language=''] */ + /** @param language [language=''] */ setExpression(propname: string, expression: string, language?: string): void; readonly sourceIndex: number; spellcheck: any; @@ -17991,7 +17957,7 @@ declare namespace MSHTML { port: string; protocol: string; - /** @param boolean [flag=false] */ + /** @param flag [flag=false] */ reload(flag?: boolean): void; replace(bstr: string): void; search: string; @@ -18069,7 +18035,7 @@ declare namespace MSHTML { focus(): void; getAdjacentText(where: string): string; - /** @param number [lFlags=0] */ + /** @param lFlags [lFlags=0] */ getAttribute(strAttributeName: string, lFlags?: number): any; getAttributeNode(bstrName: string): IHTMLDOMAttribute; getAttributeNodeNS(pvarNS: any, bstrName: string): IHTMLDOMAttribute2; @@ -18257,7 +18223,7 @@ declare namespace MSHTML { readonly recordNumber: any; releaseCapture(): void; - /** @param number [lFlags=1] */ + /** @param lFlags [lFlags=1] */ removeAttribute(strAttributeName: string, lFlags?: number): boolean; removeAttributeNode(pattr: IHTMLDOMAttribute): IHTMLDOMAttribute; removeAttributeNS(pvarNS: any, strAttributeName: string): void; @@ -18266,7 +18232,7 @@ declare namespace MSHTML { removeExpression(propname: string): boolean; removeFilter(pUnk: any): void; - /** @param boolean [fDeep=false] */ + /** @param fDeep [fDeep=false] */ removeNode(fDeep?: boolean): IHTMLDOMNode; replaceAdjacentText(where: string, newText: string): string; replaceChild(newChild: IHTMLDOMNode, oldChild: IHTMLDOMNode): IHTMLDOMNode; @@ -18281,16 +18247,16 @@ declare namespace MSHTML { readonly scrollWidth: number; setActive(): void; - /** @param number [lFlags=1] */ + /** @param lFlags [lFlags=1] */ setAttribute(strAttributeName: string, AttributeValue: any, lFlags?: number): void; setAttributeNode(pattr: IHTMLDOMAttribute): IHTMLDOMAttribute; setAttributeNodeNS(pattr: IHTMLDOMAttribute2): IHTMLDOMAttribute2; setAttributeNS(pvarNS: any, strAttributeName: string, pvarAttributeValue: any): void; - /** @param boolean [containerCapture=true] */ + /** @param containerCapture [containerCapture=true] */ setCapture(containerCapture?: boolean): void; - /** @param string [language=''] */ + /** @param language [language=''] */ setExpression(propname: string, expression: string, language?: string): void; readonly sourceIndex: number; spellcheck: any; @@ -18383,7 +18349,7 @@ declare namespace MSHTML { focus(): void; getAdjacentText(where: string): string; - /** @param number [lFlags=0] */ + /** @param lFlags [lFlags=0] */ getAttribute(strAttributeName: string, lFlags?: number): any; getAttributeNode(bstrName: string): IHTMLDOMAttribute; getAttributeNodeNS(pvarNS: any, bstrName: string): IHTMLDOMAttribute2; @@ -18591,7 +18557,7 @@ declare namespace MSHTML { readonly recordNumber: any; releaseCapture(): void; - /** @param number [lFlags=1] */ + /** @param lFlags [lFlags=1] */ removeAttribute(strAttributeName: string, lFlags?: number): boolean; removeAttributeNode(pattr: IHTMLDOMAttribute): IHTMLDOMAttribute; removeAttributeNS(pvarNS: any, strAttributeName: string): void; @@ -18600,7 +18566,7 @@ declare namespace MSHTML { removeExpression(propname: string): boolean; removeFilter(pUnk: any): void; - /** @param boolean [fDeep=false] */ + /** @param fDeep [fDeep=false] */ removeNode(fDeep?: boolean): IHTMLDOMNode; replaceAdjacentText(where: string, newText: string): string; replaceChild(newChild: IHTMLDOMNode, oldChild: IHTMLDOMNode): IHTMLDOMNode; @@ -18617,16 +18583,16 @@ declare namespace MSHTML { readonly scrollWidth: number; setActive(): void; - /** @param number [lFlags=1] */ + /** @param lFlags [lFlags=1] */ setAttribute(strAttributeName: string, AttributeValue: any, lFlags?: number): void; setAttributeNode(pattr: IHTMLDOMAttribute): IHTMLDOMAttribute; setAttributeNodeNS(pattr: IHTMLDOMAttribute2): IHTMLDOMAttribute2; setAttributeNS(pvarNS: any, strAttributeName: string, pvarAttributeValue: any): void; - /** @param boolean [containerCapture=true] */ + /** @param containerCapture [containerCapture=true] */ setCapture(containerCapture?: boolean): void; - /** @param string [language=''] */ + /** @param language [language=''] */ setExpression(propname: string, expression: string, language?: string): void; readonly sourceIndex: number; spellcheck: any; @@ -18736,7 +18702,7 @@ declare namespace MSHTML { focus(): void; getAdjacentText(where: string): string; - /** @param number [lFlags=0] */ + /** @param lFlags [lFlags=0] */ getAttribute(strAttributeName: string, lFlags?: number): any; getAttributeNode(bstrName: string): IHTMLDOMAttribute; getAttributeNodeNS(pvarNS: any, bstrName: string): IHTMLDOMAttribute2; @@ -18953,7 +18919,7 @@ declare namespace MSHTML { readonly recordNumber: any; releaseCapture(): void; - /** @param number [lFlags=1] */ + /** @param lFlags [lFlags=1] */ removeAttribute(strAttributeName: string, lFlags?: number): boolean; removeAttributeNode(pattr: IHTMLDOMAttribute): IHTMLDOMAttribute; removeAttributeNS(pvarNS: any, strAttributeName: string): void; @@ -18962,7 +18928,7 @@ declare namespace MSHTML { removeExpression(propname: string): boolean; removeFilter(pUnk: any): void; - /** @param boolean [fDeep=false] */ + /** @param fDeep [fDeep=false] */ removeNode(fDeep?: boolean): IHTMLDOMNode; replaceAdjacentText(where: string, newText: string): string; replaceChild(newChild: IHTMLDOMNode, oldChild: IHTMLDOMNode): IHTMLDOMNode; @@ -18979,16 +18945,16 @@ declare namespace MSHTML { readonly seeking: boolean; setActive(): void; - /** @param number [lFlags=1] */ + /** @param lFlags [lFlags=1] */ setAttribute(strAttributeName: string, AttributeValue: any, lFlags?: number): void; setAttributeNode(pattr: IHTMLDOMAttribute): IHTMLDOMAttribute; setAttributeNodeNS(pattr: IHTMLDOMAttribute2): IHTMLDOMAttribute2; setAttributeNS(pvarNS: any, strAttributeName: string, pvarAttributeValue: any): void; - /** @param boolean [containerCapture=true] */ + /** @param containerCapture [containerCapture=true] */ setCapture(containerCapture?: boolean): void; - /** @param string [language=''] */ + /** @param language [language=''] */ setExpression(propname: string, expression: string, language?: string): void; readonly sourceIndex: number; spellcheck: any; @@ -19086,7 +19052,7 @@ declare namespace MSHTML { focus(): void; getAdjacentText(where: string): string; - /** @param number [lFlags=0] */ + /** @param lFlags [lFlags=0] */ getAttribute(strAttributeName: string, lFlags?: number): any; getAttributeNode(bstrName: string): IHTMLDOMAttribute; getAttributeNodeNS(pvarNS: any, bstrName: string): IHTMLDOMAttribute2; @@ -19276,7 +19242,7 @@ declare namespace MSHTML { readonly recordNumber: any; releaseCapture(): void; - /** @param number [lFlags=1] */ + /** @param lFlags [lFlags=1] */ removeAttribute(strAttributeName: string, lFlags?: number): boolean; removeAttributeNode(pattr: IHTMLDOMAttribute): IHTMLDOMAttribute; removeAttributeNS(pvarNS: any, strAttributeName: string): void; @@ -19285,7 +19251,7 @@ declare namespace MSHTML { removeExpression(propname: string): boolean; removeFilter(pUnk: any): void; - /** @param boolean [fDeep=false] */ + /** @param fDeep [fDeep=false] */ removeNode(fDeep?: boolean): IHTMLDOMNode; replaceAdjacentText(where: string, newText: string): string; replaceChild(newChild: IHTMLDOMNode, oldChild: IHTMLDOMNode): IHTMLDOMNode; @@ -19301,16 +19267,16 @@ declare namespace MSHTML { readonly scrollWidth: number; setActive(): void; - /** @param number [lFlags=1] */ + /** @param lFlags [lFlags=1] */ setAttribute(strAttributeName: string, AttributeValue: any, lFlags?: number): void; setAttributeNode(pattr: IHTMLDOMAttribute): IHTMLDOMAttribute; setAttributeNodeNS(pattr: IHTMLDOMAttribute2): IHTMLDOMAttribute2; setAttributeNS(pvarNS: any, strAttributeName: string, pvarAttributeValue: any): void; - /** @param boolean [containerCapture=true] */ + /** @param containerCapture [containerCapture=true] */ setCapture(containerCapture?: boolean): void; - /** @param string [language=''] */ + /** @param language [language=''] */ setExpression(propname: string, expression: string, language?: string): void; readonly sourceIndex: number; spellcheck: any; @@ -19366,13 +19332,12 @@ declare namespace MSHTML { readonly urn: string; } - class HTMLNamespaceCollection { - private 'MSHTML.HTMLNamespaceCollection_typekey': HTMLNamespaceCollection; - private constructor(); + interface HTMLNamespaceCollection { add(bstrNamespace: string, bstrUrn: string, implementationUrl?: any): any; readonly 'constructor': any; item(index: any): any; readonly length: number; + (index: any): any; } class HTMLNavigator { @@ -19473,7 +19438,7 @@ declare namespace MSHTML { focus(): void; getAdjacentText(where: string): string; - /** @param number [lFlags=0] */ + /** @param lFlags [lFlags=0] */ getAttribute(strAttributeName: string, lFlags?: number): any; getAttributeNode(bstrName: string): IHTMLDOMAttribute; getAttributeNodeNS(pvarNS: any, bstrName: string): IHTMLDOMAttribute2; @@ -19661,7 +19626,7 @@ declare namespace MSHTML { readonly recordNumber: any; releaseCapture(): void; - /** @param number [lFlags=1] */ + /** @param lFlags [lFlags=1] */ removeAttribute(strAttributeName: string, lFlags?: number): boolean; removeAttributeNode(pattr: IHTMLDOMAttribute): IHTMLDOMAttribute; removeAttributeNS(pvarNS: any, strAttributeName: string): void; @@ -19670,7 +19635,7 @@ declare namespace MSHTML { removeExpression(propname: string): boolean; removeFilter(pUnk: any): void; - /** @param boolean [fDeep=false] */ + /** @param fDeep [fDeep=false] */ removeNode(fDeep?: boolean): IHTMLDOMNode; replaceAdjacentText(where: string, newText: string): string; replaceChild(newChild: IHTMLDOMNode, oldChild: IHTMLDOMNode): IHTMLDOMNode; @@ -19685,16 +19650,16 @@ declare namespace MSHTML { readonly scrollWidth: number; setActive(): void; - /** @param number [lFlags=1] */ + /** @param lFlags [lFlags=1] */ setAttribute(strAttributeName: string, AttributeValue: any, lFlags?: number): void; setAttributeNode(pattr: IHTMLDOMAttribute): IHTMLDOMAttribute; setAttributeNodeNS(pattr: IHTMLDOMAttribute2): IHTMLDOMAttribute2; setAttributeNS(pvarNS: any, strAttributeName: string, pvarAttributeValue: any): void; - /** @param boolean [containerCapture=true] */ + /** @param containerCapture [containerCapture=true] */ setCapture(containerCapture?: boolean): void; - /** @param string [language=''] */ + /** @param language [language=''] */ setExpression(propname: string, expression: string, language?: string): void; readonly sourceIndex: number; spellcheck: any; @@ -19780,7 +19745,7 @@ declare namespace MSHTML { focus(): void; getAdjacentText(where: string): string; - /** @param number [lFlags=0] */ + /** @param lFlags [lFlags=0] */ getAttribute(strAttributeName: string, lFlags?: number): any; getAttributeNode(bstrName: string): IHTMLDOMAttribute; getAttributeNodeNS(pvarNS: any, bstrName: string): IHTMLDOMAttribute2; @@ -19967,7 +19932,7 @@ declare namespace MSHTML { readonly recordNumber: any; releaseCapture(): void; - /** @param number [lFlags=1] */ + /** @param lFlags [lFlags=1] */ removeAttribute(strAttributeName: string, lFlags?: number): boolean; removeAttributeNode(pattr: IHTMLDOMAttribute): IHTMLDOMAttribute; removeAttributeNS(pvarNS: any, strAttributeName: string): void; @@ -19976,7 +19941,7 @@ declare namespace MSHTML { removeExpression(propname: string): boolean; removeFilter(pUnk: any): void; - /** @param boolean [fDeep=false] */ + /** @param fDeep [fDeep=false] */ removeNode(fDeep?: boolean): IHTMLDOMNode; replaceAdjacentText(where: string, newText: string): string; replaceChild(newChild: IHTMLDOMNode, oldChild: IHTMLDOMNode): IHTMLDOMNode; @@ -19991,16 +19956,16 @@ declare namespace MSHTML { readonly scrollWidth: number; setActive(): void; - /** @param number [lFlags=1] */ + /** @param lFlags [lFlags=1] */ setAttribute(strAttributeName: string, AttributeValue: any, lFlags?: number): void; setAttributeNode(pattr: IHTMLDOMAttribute): IHTMLDOMAttribute; setAttributeNodeNS(pattr: IHTMLDOMAttribute2): IHTMLDOMAttribute2; setAttributeNS(pvarNS: any, strAttributeName: string, pvarAttributeValue: any): void; - /** @param boolean [containerCapture=true] */ + /** @param containerCapture [containerCapture=true] */ setCapture(containerCapture?: boolean): void; - /** @param string [language=''] */ + /** @param language [language=''] */ setExpression(propname: string, expression: string, language?: string): void; readonly sourceIndex: number; spellcheck: any; @@ -20104,7 +20069,7 @@ declare namespace MSHTML { readonly form: IHTMLFormElement; getAdjacentText(where: string): string; - /** @param number [lFlags=0] */ + /** @param lFlags [lFlags=0] */ getAttribute(strAttributeName: string, lFlags?: number): any; getAttributeNode(bstrName: string): IHTMLDOMAttribute; getAttributeNodeNS(pvarNS: any, bstrName: string): IHTMLDOMAttribute2; @@ -20316,7 +20281,7 @@ declare namespace MSHTML { recordset: any; releaseCapture(): void; - /** @param number [lFlags=1] */ + /** @param lFlags [lFlags=1] */ removeAttribute(strAttributeName: string, lFlags?: number): boolean; removeAttributeNode(pattr: IHTMLDOMAttribute): IHTMLDOMAttribute; removeAttributeNS(pvarNS: any, strAttributeName: string): void; @@ -20325,7 +20290,7 @@ declare namespace MSHTML { removeExpression(propname: string): boolean; removeFilter(pUnk: any): void; - /** @param boolean [fDeep=false] */ + /** @param fDeep [fDeep=false] */ removeNode(fDeep?: boolean): IHTMLDOMNode; replaceAdjacentText(where: string, newText: string): string; replaceChild(newChild: IHTMLDOMNode, oldChild: IHTMLDOMNode): IHTMLDOMNode; @@ -20340,16 +20305,16 @@ declare namespace MSHTML { readonly scrollWidth: number; setActive(): void; - /** @param number [lFlags=1] */ + /** @param lFlags [lFlags=1] */ setAttribute(strAttributeName: string, AttributeValue: any, lFlags?: number): void; setAttributeNode(pattr: IHTMLDOMAttribute): IHTMLDOMAttribute; setAttributeNodeNS(pattr: IHTMLDOMAttribute2): IHTMLDOMAttribute2; setAttributeNS(pvarNS: any, strAttributeName: string, pvarAttributeValue: any): void; - /** @param boolean [containerCapture=true] */ + /** @param containerCapture [containerCapture=true] */ setCapture(containerCapture?: boolean): void; - /** @param string [language=''] */ + /** @param language [language=''] */ setExpression(propname: string, expression: string, language?: string): void; readonly sourceIndex: number; spellcheck: any; @@ -20442,7 +20407,7 @@ declare namespace MSHTML { focus(): void; getAdjacentText(where: string): string; - /** @param number [lFlags=0] */ + /** @param lFlags [lFlags=0] */ getAttribute(strAttributeName: string, lFlags?: number): any; getAttributeNode(bstrName: string): IHTMLDOMAttribute; getAttributeNodeNS(pvarNS: any, bstrName: string): IHTMLDOMAttribute2; @@ -20629,7 +20594,7 @@ declare namespace MSHTML { readonly recordNumber: any; releaseCapture(): void; - /** @param number [lFlags=1] */ + /** @param lFlags [lFlags=1] */ removeAttribute(strAttributeName: string, lFlags?: number): boolean; removeAttributeNode(pattr: IHTMLDOMAttribute): IHTMLDOMAttribute; removeAttributeNS(pvarNS: any, strAttributeName: string): void; @@ -20638,7 +20603,7 @@ declare namespace MSHTML { removeExpression(propname: string): boolean; removeFilter(pUnk: any): void; - /** @param boolean [fDeep=false] */ + /** @param fDeep [fDeep=false] */ removeNode(fDeep?: boolean): IHTMLDOMNode; replaceAdjacentText(where: string, newText: string): string; replaceChild(newChild: IHTMLDOMNode, oldChild: IHTMLDOMNode): IHTMLDOMNode; @@ -20653,16 +20618,16 @@ declare namespace MSHTML { readonly scrollWidth: number; setActive(): void; - /** @param number [lFlags=1] */ + /** @param lFlags [lFlags=1] */ setAttribute(strAttributeName: string, AttributeValue: any, lFlags?: number): void; setAttributeNode(pattr: IHTMLDOMAttribute): IHTMLDOMAttribute; setAttributeNodeNS(pattr: IHTMLDOMAttribute2): IHTMLDOMAttribute2; setAttributeNS(pvarNS: any, strAttributeName: string, pvarAttributeValue: any): void; - /** @param boolean [containerCapture=true] */ + /** @param containerCapture [containerCapture=true] */ setCapture(containerCapture?: boolean): void; - /** @param string [language=''] */ + /** @param language [language=''] */ setExpression(propname: string, expression: string, language?: string): void; readonly sourceIndex: number; spellcheck: any; @@ -20706,7 +20671,7 @@ declare namespace MSHTML { focus(): void; readonly form: IHTMLFormElement; - /** @param number [lFlags=0] */ + /** @param lFlags [lFlags=0] */ getAttribute(strAttributeName: string, lFlags?: number): any; id: string; indeterminate: boolean; @@ -20755,12 +20720,12 @@ declare namespace MSHTML { readonly parentTextEdit: IHTMLElement; readonly recordNumber: any; - /** @param number [lFlags=1] */ + /** @param lFlags [lFlags=1] */ removeAttribute(strAttributeName: string, lFlags?: number): boolean; removeFilter(pUnk: any): void; scrollIntoView(varargStart?: any): void; - /** @param number [lFlags=1] */ + /** @param lFlags [lFlags=1] */ setAttribute(strAttributeName: string, AttributeValue: any, lFlags?: number): void; readonly sourceIndex: number; status: boolean; @@ -20849,7 +20814,7 @@ declare namespace MSHTML { readonly form: IHTMLFormElement; getAdjacentText(where: string): string; - /** @param number [lFlags=0] */ + /** @param lFlags [lFlags=0] */ getAttribute(strAttributeName: string, lFlags?: number): any; getAttributeNode(bstrName: string): IHTMLDOMAttribute; getAttributeNodeNS(pvarNS: any, bstrName: string): IHTMLDOMAttribute2; @@ -21054,7 +21019,7 @@ declare namespace MSHTML { readonly recordNumber: any; releaseCapture(): void; - /** @param number [lFlags=1] */ + /** @param lFlags [lFlags=1] */ removeAttribute(strAttributeName: string, lFlags?: number): boolean; removeAttributeNode(pattr: IHTMLDOMAttribute): IHTMLDOMAttribute; removeAttributeNS(pvarNS: any, strAttributeName: string): void; @@ -21063,7 +21028,7 @@ declare namespace MSHTML { removeExpression(propname: string): boolean; removeFilter(pUnk: any): void; - /** @param boolean [fDeep=false] */ + /** @param fDeep [fDeep=false] */ removeNode(fDeep?: boolean): IHTMLDOMNode; replaceAdjacentText(where: string, newText: string): string; replaceChild(newChild: IHTMLDOMNode, oldChild: IHTMLDOMNode): IHTMLDOMNode; @@ -21079,16 +21044,16 @@ declare namespace MSHTML { selected: boolean; setActive(): void; - /** @param number [lFlags=1] */ + /** @param lFlags [lFlags=1] */ setAttribute(strAttributeName: string, AttributeValue: any, lFlags?: number): void; setAttributeNode(pattr: IHTMLDOMAttribute): IHTMLDOMAttribute; setAttributeNodeNS(pattr: IHTMLDOMAttribute2): IHTMLDOMAttribute2; setAttributeNS(pvarNS: any, strAttributeName: string, pvarAttributeValue: any): void; - /** @param boolean [containerCapture=true] */ + /** @param containerCapture [containerCapture=true] */ setCapture(containerCapture?: boolean): void; - /** @param string [language=''] */ + /** @param language [language=''] */ setExpression(propname: string, expression: string, language?: string): void; readonly sourceIndex: number; spellcheck: any; @@ -21107,10 +21072,9 @@ declare namespace MSHTML { xmsAcceleratorKey: string; } - class HTMLOptionElementFactory { - private 'MSHTML.HTMLOptionElementFactory_typekey': HTMLOptionElementFactory; - private constructor(); + interface HTMLOptionElementFactory { create(text?: any, value?: any, defaultSelected?: any, selected?: any): IHTMLOptionElement; + (text?: any, value?: any, defaultSelected?: any, selected?: any): IHTMLOptionElement; } class HTMLParaElement { @@ -21185,7 +21149,7 @@ declare namespace MSHTML { focus(): void; getAdjacentText(where: string): string; - /** @param number [lFlags=0] */ + /** @param lFlags [lFlags=0] */ getAttribute(strAttributeName: string, lFlags?: number): any; getAttributeNode(bstrName: string): IHTMLDOMAttribute; getAttributeNodeNS(pvarNS: any, bstrName: string): IHTMLDOMAttribute2; @@ -21372,7 +21336,7 @@ declare namespace MSHTML { readonly recordNumber: any; releaseCapture(): void; - /** @param number [lFlags=1] */ + /** @param lFlags [lFlags=1] */ removeAttribute(strAttributeName: string, lFlags?: number): boolean; removeAttributeNode(pattr: IHTMLDOMAttribute): IHTMLDOMAttribute; removeAttributeNS(pvarNS: any, strAttributeName: string): void; @@ -21381,7 +21345,7 @@ declare namespace MSHTML { removeExpression(propname: string): boolean; removeFilter(pUnk: any): void; - /** @param boolean [fDeep=false] */ + /** @param fDeep [fDeep=false] */ removeNode(fDeep?: boolean): IHTMLDOMNode; replaceAdjacentText(where: string, newText: string): string; replaceChild(newChild: IHTMLDOMNode, oldChild: IHTMLDOMNode): IHTMLDOMNode; @@ -21396,16 +21360,16 @@ declare namespace MSHTML { readonly scrollWidth: number; setActive(): void; - /** @param number [lFlags=1] */ + /** @param lFlags [lFlags=1] */ setAttribute(strAttributeName: string, AttributeValue: any, lFlags?: number): void; setAttributeNode(pattr: IHTMLDOMAttribute): IHTMLDOMAttribute; setAttributeNodeNS(pattr: IHTMLDOMAttribute2): IHTMLDOMAttribute2; setAttributeNS(pvarNS: any, strAttributeName: string, pvarAttributeValue: any): void; - /** @param boolean [containerCapture=true] */ + /** @param containerCapture [containerCapture=true] */ setCapture(containerCapture?: boolean): void; - /** @param string [language=''] */ + /** @param language [language=''] */ setExpression(propname: string, expression: string, language?: string): void; readonly sourceIndex: number; spellcheck: any; @@ -21491,7 +21455,7 @@ declare namespace MSHTML { focus(): void; getAdjacentText(where: string): string; - /** @param number [lFlags=0] */ + /** @param lFlags [lFlags=0] */ getAttribute(strAttributeName: string, lFlags?: number): any; getAttributeNode(bstrName: string): IHTMLDOMAttribute; getAttributeNodeNS(pvarNS: any, bstrName: string): IHTMLDOMAttribute2; @@ -21680,7 +21644,7 @@ declare namespace MSHTML { readonly recordNumber: any; releaseCapture(): void; - /** @param number [lFlags=1] */ + /** @param lFlags [lFlags=1] */ removeAttribute(strAttributeName: string, lFlags?: number): boolean; removeAttributeNode(pattr: IHTMLDOMAttribute): IHTMLDOMAttribute; removeAttributeNS(pvarNS: any, strAttributeName: string): void; @@ -21689,7 +21653,7 @@ declare namespace MSHTML { removeExpression(propname: string): boolean; removeFilter(pUnk: any): void; - /** @param boolean [fDeep=false] */ + /** @param fDeep [fDeep=false] */ removeNode(fDeep?: boolean): IHTMLDOMNode; replaceAdjacentText(where: string, newText: string): string; replaceChild(newChild: IHTMLDOMNode, oldChild: IHTMLDOMNode): IHTMLDOMNode; @@ -21704,16 +21668,16 @@ declare namespace MSHTML { readonly scrollWidth: number; setActive(): void; - /** @param number [lFlags=1] */ + /** @param lFlags [lFlags=1] */ setAttribute(strAttributeName: string, AttributeValue: any, lFlags?: number): void; setAttributeNode(pattr: IHTMLDOMAttribute): IHTMLDOMAttribute; setAttributeNodeNS(pattr: IHTMLDOMAttribute2): IHTMLDOMAttribute2; setAttributeNS(pvarNS: any, strAttributeName: string, pvarAttributeValue: any): void; - /** @param boolean [containerCapture=true] */ + /** @param containerCapture [containerCapture=true] */ setCapture(containerCapture?: boolean): void; - /** @param string [language=''] */ + /** @param language [language=''] */ setExpression(propname: string, expression: string, language?: string): void; readonly sourceIndex: number; spellcheck: any; @@ -21850,7 +21814,7 @@ declare namespace MSHTML { focus(): void; getAdjacentText(where: string): string; - /** @param number [lFlags=0] */ + /** @param lFlags [lFlags=0] */ getAttribute(strAttributeName: string, lFlags?: number): any; getAttributeNode(bstrName: string): IHTMLDOMAttribute; getAttributeNodeNS(pvarNS: any, bstrName: string): IHTMLDOMAttribute2; @@ -22038,7 +22002,7 @@ declare namespace MSHTML { readonly recordNumber: any; releaseCapture(): void; - /** @param number [lFlags=1] */ + /** @param lFlags [lFlags=1] */ removeAttribute(strAttributeName: string, lFlags?: number): boolean; removeAttributeNode(pattr: IHTMLDOMAttribute): IHTMLDOMAttribute; removeAttributeNS(pvarNS: any, strAttributeName: string): void; @@ -22047,7 +22011,7 @@ declare namespace MSHTML { removeExpression(propname: string): boolean; removeFilter(pUnk: any): void; - /** @param boolean [fDeep=false] */ + /** @param fDeep [fDeep=false] */ removeNode(fDeep?: boolean): IHTMLDOMNode; replaceAdjacentText(where: string, newText: string): string; replaceChild(newChild: IHTMLDOMNode, oldChild: IHTMLDOMNode): IHTMLDOMNode; @@ -22062,16 +22026,16 @@ declare namespace MSHTML { readonly scrollWidth: number; setActive(): void; - /** @param number [lFlags=1] */ + /** @param lFlags [lFlags=1] */ setAttribute(strAttributeName: string, AttributeValue: any, lFlags?: number): void; setAttributeNode(pattr: IHTMLDOMAttribute): IHTMLDOMAttribute; setAttributeNodeNS(pattr: IHTMLDOMAttribute2): IHTMLDOMAttribute2; setAttributeNS(pvarNS: any, strAttributeName: string, pvarAttributeValue: any): void; - /** @param boolean [containerCapture=true] */ + /** @param containerCapture [containerCapture=true] */ setCapture(containerCapture?: boolean): void; - /** @param string [language=''] */ + /** @param language [language=''] */ setExpression(propname: string, expression: string, language?: string): void; readonly sourceIndex: number; spellcheck: any; @@ -22172,7 +22136,7 @@ declare namespace MSHTML { readonly form: IHTMLFormElement; getAdjacentText(where: string): string; - /** @param number [lFlags=0] */ + /** @param lFlags [lFlags=0] */ getAttribute(strAttributeName: string, lFlags?: number): any; getAttributeNode(bstrName: string): IHTMLDOMAttribute; getAttributeNodeNS(pvarNS: any, bstrName: string): IHTMLDOMAttribute2; @@ -22376,7 +22340,7 @@ declare namespace MSHTML { readonly recordNumber: any; releaseCapture(): void; - /** @param number [lFlags=1] */ + /** @param lFlags [lFlags=1] */ removeAttribute(strAttributeName: string, lFlags?: number): boolean; removeAttributeNode(pattr: IHTMLDOMAttribute): IHTMLDOMAttribute; removeAttributeNS(pvarNS: any, strAttributeName: string): void; @@ -22385,7 +22349,7 @@ declare namespace MSHTML { removeExpression(propname: string): boolean; removeFilter(pUnk: any): void; - /** @param boolean [fDeep=false] */ + /** @param fDeep [fDeep=false] */ removeNode(fDeep?: boolean): IHTMLDOMNode; replaceAdjacentText(where: string, newText: string): string; replaceChild(newChild: IHTMLDOMNode, oldChild: IHTMLDOMNode): IHTMLDOMNode; @@ -22400,16 +22364,16 @@ declare namespace MSHTML { readonly scrollWidth: number; setActive(): void; - /** @param number [lFlags=1] */ + /** @param lFlags [lFlags=1] */ setAttribute(strAttributeName: string, AttributeValue: any, lFlags?: number): void; setAttributeNode(pattr: IHTMLDOMAttribute): IHTMLDOMAttribute; setAttributeNodeNS(pattr: IHTMLDOMAttribute2): IHTMLDOMAttribute2; setAttributeNS(pvarNS: any, strAttributeName: string, pvarAttributeValue: any): void; - /** @param boolean [containerCapture=true] */ + /** @param containerCapture [containerCapture=true] */ setCapture(containerCapture?: boolean): void; - /** @param string [language=''] */ + /** @param language [language=''] */ setExpression(propname: string, expression: string, language?: string): void; readonly sourceIndex: number; spellcheck: any; @@ -22519,7 +22483,7 @@ declare namespace MSHTML { readonly form: IHTMLFormElement; getAdjacentText(where: string): string; - /** @param number [lFlags=0] */ + /** @param lFlags [lFlags=0] */ getAttribute(strAttributeName: string, lFlags?: number): any; getAttributeNode(bstrName: string): IHTMLDOMAttribute; getAttributeNodeNS(pvarNS: any, bstrName: string): IHTMLDOMAttribute2; @@ -22723,7 +22687,7 @@ declare namespace MSHTML { readonly recordNumber: any; releaseCapture(): void; - /** @param number [lFlags=1] */ + /** @param lFlags [lFlags=1] */ removeAttribute(strAttributeName: string, lFlags?: number): boolean; removeAttributeNode(pattr: IHTMLDOMAttribute): IHTMLDOMAttribute; removeAttributeNS(pvarNS: any, strAttributeName: string): void; @@ -22732,7 +22696,7 @@ declare namespace MSHTML { removeExpression(propname: string): boolean; removeFilter(pUnk: any): void; - /** @param boolean [fDeep=false] */ + /** @param fDeep [fDeep=false] */ removeNode(fDeep?: boolean): IHTMLDOMNode; replaceAdjacentText(where: string, newText: string): string; replaceChild(newChild: IHTMLDOMNode, oldChild: IHTMLDOMNode): IHTMLDOMNode; @@ -22749,16 +22713,16 @@ declare namespace MSHTML { select(): void; setActive(): void; - /** @param number [lFlags=1] */ + /** @param lFlags [lFlags=1] */ setAttribute(strAttributeName: string, AttributeValue: any, lFlags?: number): void; setAttributeNode(pattr: IHTMLDOMAttribute): IHTMLDOMAttribute; setAttributeNodeNS(pattr: IHTMLDOMAttribute2): IHTMLDOMAttribute2; setAttributeNS(pvarNS: any, strAttributeName: string, pvarAttributeValue: any): void; - /** @param boolean [containerCapture=true] */ + /** @param containerCapture [containerCapture=true] */ setCapture(containerCapture?: boolean): void; - /** @param string [language=''] */ + /** @param language [language=''] */ setExpression(propname: string, expression: string, language?: string): void; readonly sourceIndex: number; spellcheck: any; @@ -22779,9 +22743,7 @@ declare namespace MSHTML { xmsAcceleratorKey: string; } - class HTMLRuleStyle { - private 'MSHTML.HTMLRuleStyle_typekey': HTMLRuleStyle; - private constructor(); + interface HTMLRuleStyle { accelerator: string; alignContent: string; alignItems: string; @@ -22881,7 +22843,7 @@ declare namespace MSHTML { fontVariant: string; fontWeight: string; - /** @param number [lFlags=0] */ + /** @param lFlags [lFlags=0] */ getAttribute(strAttributeName: string, lFlags?: number): any; getPropertyPriority(bstrPropertyName: string): string; getPropertyValue(bstrPropertyName: string): string; @@ -23021,7 +22983,7 @@ declare namespace MSHTML { posRight: number; quotes: string; - /** @param number [lFlags=1] */ + /** @param lFlags [lFlags=1] */ removeAttribute(strAttributeName: string, lFlags?: number): boolean; removeProperty(bstrPropertyName: string): string; right: any; @@ -23037,10 +22999,10 @@ declare namespace MSHTML { scrollbarShadowColor: any; scrollbarTrackColor: any; - /** @param number [lFlags=1] */ + /** @param lFlags [lFlags=1] */ setAttribute(strAttributeName: string, AttributeValue: any, lFlags?: number): void; - /** @param any [pvarPropertyPriority=''] */ + /** @param pvarPropertyPriority [pvarPropertyPriority=''] */ setProperty(bstrPropertyName: string, pvarPropertyValue: any, pvarPropertyPriority?: any): void; styleFloat: string; tableLayout: string; @@ -23128,6 +23090,7 @@ declare namespace MSHTML { writingMode: string; zIndex: any; zoom: any; + (index: number): string; } class HTMLScreen { @@ -23224,7 +23187,7 @@ declare namespace MSHTML { focus(): void; getAdjacentText(where: string): string; - /** @param number [lFlags=0] */ + /** @param lFlags [lFlags=0] */ getAttribute(strAttributeName: string, lFlags?: number): any; getAttributeNode(bstrName: string): IHTMLDOMAttribute; getAttributeNodeNS(pvarNS: any, bstrName: string): IHTMLDOMAttribute2; @@ -23413,7 +23376,7 @@ declare namespace MSHTML { readonly recordNumber: any; releaseCapture(): void; - /** @param number [lFlags=1] */ + /** @param lFlags [lFlags=1] */ removeAttribute(strAttributeName: string, lFlags?: number): boolean; removeAttributeNode(pattr: IHTMLDOMAttribute): IHTMLDOMAttribute; removeAttributeNS(pvarNS: any, strAttributeName: string): void; @@ -23422,7 +23385,7 @@ declare namespace MSHTML { removeExpression(propname: string): boolean; removeFilter(pUnk: any): void; - /** @param boolean [fDeep=false] */ + /** @param fDeep [fDeep=false] */ removeNode(fDeep?: boolean): IHTMLDOMNode; replaceAdjacentText(where: string, newText: string): string; replaceChild(newChild: IHTMLDOMNode, oldChild: IHTMLDOMNode): IHTMLDOMNode; @@ -23437,16 +23400,16 @@ declare namespace MSHTML { readonly scrollWidth: number; setActive(): void; - /** @param number [lFlags=1] */ + /** @param lFlags [lFlags=1] */ setAttribute(strAttributeName: string, AttributeValue: any, lFlags?: number): void; setAttributeNode(pattr: IHTMLDOMAttribute): IHTMLDOMAttribute; setAttributeNodeNS(pattr: IHTMLDOMAttribute2): IHTMLDOMAttribute2; setAttributeNS(pvarNS: any, strAttributeName: string, pvarAttributeValue: any): void; - /** @param boolean [containerCapture=true] */ + /** @param containerCapture [containerCapture=true] */ setCapture(containerCapture?: boolean): void; - /** @param string [language=''] */ + /** @param language [language=''] */ setExpression(propname: string, expression: string, language?: string): void; readonly sourceIndex: number; spellcheck: any; @@ -23466,9 +23429,7 @@ declare namespace MSHTML { xmsAcceleratorKey: string; } - class HTMLSelectElement { - private 'MSHTML.HTMLSelectElement_typekey': HTMLSelectElement; - private constructor(); + interface HTMLSelectElement { accessKey: string; add(element: IHTMLElement, before?: any): void; addBehavior(bstrURL: string, pvarFactory?: any): number; @@ -23542,7 +23503,7 @@ declare namespace MSHTML { readonly form: IHTMLFormElement; getAdjacentText(where: string): string; - /** @param number [lFlags=0] */ + /** @param lFlags [lFlags=0] */ getAttribute(strAttributeName: string, lFlags?: number): any; getAttributeNode(bstrName: string): IHTMLDOMAttribute; getAttributeNodeNS(pvarNS: any, bstrName: string): IHTMLDOMAttribute2; @@ -23753,10 +23714,10 @@ declare namespace MSHTML { readonly recordNumber: any; releaseCapture(): void; - /** @param number [index=-1] */ + /** @param index [index=-1] */ remove(index?: number): void; - /** @param number [lFlags=1] */ + /** @param lFlags [lFlags=1] */ removeAttribute(strAttributeName: string, lFlags?: number): boolean; removeAttributeNode(pattr: IHTMLDOMAttribute): IHTMLDOMAttribute; removeAttributeNS(pvarNS: any, strAttributeName: string): void; @@ -23765,7 +23726,7 @@ declare namespace MSHTML { removeExpression(propname: string): boolean; removeFilter(pUnk: any): void; - /** @param boolean [fDeep=false] */ + /** @param fDeep [fDeep=false] */ removeNode(fDeep?: boolean): IHTMLDOMNode; replaceAdjacentText(where: string, newText: string): string; replaceChild(newChild: IHTMLDOMNode, oldChild: IHTMLDOMNode): IHTMLDOMNode; @@ -23781,16 +23742,16 @@ declare namespace MSHTML { selectedIndex: number; setActive(): void; - /** @param number [lFlags=1] */ + /** @param lFlags [lFlags=1] */ setAttribute(strAttributeName: string, AttributeValue: any, lFlags?: number): void; setAttributeNode(pattr: IHTMLDOMAttribute): IHTMLDOMAttribute; setAttributeNodeNS(pattr: IHTMLDOMAttribute2): IHTMLDOMAttribute2; setAttributeNS(pvarNS: any, strAttributeName: string, pvarAttributeValue: any): void; - /** @param boolean [containerCapture=true] */ + /** @param containerCapture [containerCapture=true] */ setCapture(containerCapture?: boolean): void; - /** @param string [language=''] */ + /** @param language [language=''] */ setExpression(propname: string, expression: string, language?: string): void; size: number; readonly sourceIndex: number; @@ -23810,6 +23771,7 @@ declare namespace MSHTML { urns(urn: any): any; value: string; xmsAcceleratorKey: string; + (name?: any, index?: any): any; } class HTMLSemanticElement { @@ -23882,7 +23844,7 @@ declare namespace MSHTML { focus(): void; getAdjacentText(where: string): string; - /** @param number [lFlags=0] */ + /** @param lFlags [lFlags=0] */ getAttribute(strAttributeName: string, lFlags?: number): any; getAttributeNode(bstrName: string): IHTMLDOMAttribute; getAttributeNodeNS(pvarNS: any, bstrName: string): IHTMLDOMAttribute2; @@ -24069,7 +24031,7 @@ declare namespace MSHTML { readonly recordNumber: any; releaseCapture(): void; - /** @param number [lFlags=1] */ + /** @param lFlags [lFlags=1] */ removeAttribute(strAttributeName: string, lFlags?: number): boolean; removeAttributeNode(pattr: IHTMLDOMAttribute): IHTMLDOMAttribute; removeAttributeNS(pvarNS: any, strAttributeName: string): void; @@ -24078,7 +24040,7 @@ declare namespace MSHTML { removeExpression(propname: string): boolean; removeFilter(pUnk: any): void; - /** @param boolean [fDeep=false] */ + /** @param fDeep [fDeep=false] */ removeNode(fDeep?: boolean): IHTMLDOMNode; replaceAdjacentText(where: string, newText: string): string; replaceChild(newChild: IHTMLDOMNode, oldChild: IHTMLDOMNode): IHTMLDOMNode; @@ -24093,16 +24055,16 @@ declare namespace MSHTML { readonly scrollWidth: number; setActive(): void; - /** @param number [lFlags=1] */ + /** @param lFlags [lFlags=1] */ setAttribute(strAttributeName: string, AttributeValue: any, lFlags?: number): void; setAttributeNode(pattr: IHTMLDOMAttribute): IHTMLDOMAttribute; setAttributeNodeNS(pattr: IHTMLDOMAttribute2): IHTMLDOMAttribute2; setAttributeNS(pvarNS: any, strAttributeName: string, pvarAttributeValue: any): void; - /** @param boolean [containerCapture=true] */ + /** @param containerCapture [containerCapture=true] */ setCapture(containerCapture?: boolean): void; - /** @param string [language=''] */ + /** @param language [language=''] */ setExpression(propname: string, expression: string, language?: string): void; readonly sourceIndex: number; spellcheck: any; @@ -24192,7 +24154,7 @@ declare namespace MSHTML { focus(): void; getAdjacentText(where: string): string; - /** @param number [lFlags=0] */ + /** @param lFlags [lFlags=0] */ getAttribute(strAttributeName: string, lFlags?: number): any; getAttributeNode(bstrName: string): IHTMLDOMAttribute; getAttributeNodeNS(pvarNS: any, bstrName: string): IHTMLDOMAttribute2; @@ -24395,7 +24357,7 @@ declare namespace MSHTML { readonly recordNumber: any; releaseCapture(): void; - /** @param number [lFlags=1] */ + /** @param lFlags [lFlags=1] */ removeAttribute(strAttributeName: string, lFlags?: number): boolean; removeAttributeNode(pattr: IHTMLDOMAttribute): IHTMLDOMAttribute; removeAttributeNS(pvarNS: any, strAttributeName: string): void; @@ -24404,7 +24366,7 @@ declare namespace MSHTML { removeExpression(propname: string): boolean; removeFilter(pUnk: any): void; - /** @param boolean [fDeep=false] */ + /** @param fDeep [fDeep=false] */ removeNode(fDeep?: boolean): IHTMLDOMNode; replaceAdjacentText(where: string, newText: string): string; replaceChild(newChild: IHTMLDOMNode, oldChild: IHTMLDOMNode): IHTMLDOMNode; @@ -24419,16 +24381,16 @@ declare namespace MSHTML { readonly scrollWidth: number; setActive(): void; - /** @param number [lFlags=1] */ + /** @param lFlags [lFlags=1] */ setAttribute(strAttributeName: string, AttributeValue: any, lFlags?: number): void; setAttributeNode(pattr: IHTMLDOMAttribute): IHTMLDOMAttribute; setAttributeNodeNS(pattr: IHTMLDOMAttribute2): IHTMLDOMAttribute2; setAttributeNS(pvarNS: any, strAttributeName: string, pvarAttributeValue: any): void; - /** @param boolean [containerCapture=true] */ + /** @param containerCapture [containerCapture=true] */ setCapture(containerCapture?: boolean): void; - /** @param string [language=''] */ + /** @param language [language=''] */ setExpression(propname: string, expression: string, language?: string): void; readonly sourceIndex: number; spellcheck: any; @@ -24521,7 +24483,7 @@ declare namespace MSHTML { focus(): void; getAdjacentText(where: string): string; - /** @param number [lFlags=0] */ + /** @param lFlags [lFlags=0] */ getAttribute(strAttributeName: string, lFlags?: number): any; getAttributeNode(bstrName: string): IHTMLDOMAttribute; getAttributeNodeNS(pvarNS: any, bstrName: string): IHTMLDOMAttribute2; @@ -24723,7 +24685,7 @@ declare namespace MSHTML { readonly recordNumber: any; releaseCapture(): void; - /** @param number [lFlags=1] */ + /** @param lFlags [lFlags=1] */ removeAttribute(strAttributeName: string, lFlags?: number): boolean; removeAttributeNode(pattr: IHTMLDOMAttribute): IHTMLDOMAttribute; removeAttributeNS(pvarNS: any, strAttributeName: string): void; @@ -24732,7 +24694,7 @@ declare namespace MSHTML { removeExpression(propname: string): boolean; removeFilter(pUnk: any): void; - /** @param boolean [fDeep=false] */ + /** @param fDeep [fDeep=false] */ removeNode(fDeep?: boolean): IHTMLDOMNode; replaceAdjacentText(where: string, newText: string): string; replaceChild(newChild: IHTMLDOMNode, oldChild: IHTMLDOMNode): IHTMLDOMNode; @@ -24747,16 +24709,16 @@ declare namespace MSHTML { readonly scrollWidth: number; setActive(): void; - /** @param number [lFlags=1] */ + /** @param lFlags [lFlags=1] */ setAttribute(strAttributeName: string, AttributeValue: any, lFlags?: number): void; setAttributeNode(pattr: IHTMLDOMAttribute): IHTMLDOMAttribute; setAttributeNodeNS(pattr: IHTMLDOMAttribute2): IHTMLDOMAttribute2; setAttributeNS(pvarNS: any, strAttributeName: string, pvarAttributeValue: any): void; - /** @param boolean [containerCapture=true] */ + /** @param containerCapture [containerCapture=true] */ setCapture(containerCapture?: boolean): void; - /** @param string [language=''] */ + /** @param language [language=''] */ setExpression(propname: string, expression: string, language?: string): void; readonly sourceIndex: number; spellcheck: any; @@ -24848,7 +24810,7 @@ declare namespace MSHTML { focus(): void; getAdjacentText(where: string): string; - /** @param number [lFlags=0] */ + /** @param lFlags [lFlags=0] */ getAttribute(strAttributeName: string, lFlags?: number): any; getAttributeNode(bstrName: string): IHTMLDOMAttribute; getAttributeNodeNS(pvarNS: any, bstrName: string): IHTMLDOMAttribute2; @@ -25050,7 +25012,7 @@ declare namespace MSHTML { readonly recordNumber: any; releaseCapture(): void; - /** @param number [lFlags=1] */ + /** @param lFlags [lFlags=1] */ removeAttribute(strAttributeName: string, lFlags?: number): boolean; removeAttributeNode(pattr: IHTMLDOMAttribute): IHTMLDOMAttribute; removeAttributeNS(pvarNS: any, strAttributeName: string): void; @@ -25059,7 +25021,7 @@ declare namespace MSHTML { removeExpression(propname: string): boolean; removeFilter(pUnk: any): void; - /** @param boolean [fDeep=false] */ + /** @param fDeep [fDeep=false] */ removeNode(fDeep?: boolean): IHTMLDOMNode; replaceAdjacentText(where: string, newText: string): string; replaceChild(newChild: IHTMLDOMNode, oldChild: IHTMLDOMNode): IHTMLDOMNode; @@ -25074,16 +25036,16 @@ declare namespace MSHTML { readonly scrollWidth: number; setActive(): void; - /** @param number [lFlags=1] */ + /** @param lFlags [lFlags=1] */ setAttribute(strAttributeName: string, AttributeValue: any, lFlags?: number): void; setAttributeNode(pattr: IHTMLDOMAttribute): IHTMLDOMAttribute; setAttributeNodeNS(pattr: IHTMLDOMAttribute2): IHTMLDOMAttribute2; setAttributeNS(pvarNS: any, strAttributeName: string, pvarAttributeValue: any): void; - /** @param boolean [containerCapture=true] */ + /** @param containerCapture [containerCapture=true] */ setCapture(containerCapture?: boolean): void; - /** @param string [language=''] */ + /** @param language [language=''] */ setExpression(propname: string, expression: string, language?: string): void; readonly sourceIndex: number; spellcheck: any; @@ -25114,9 +25076,7 @@ declare namespace MSHTML { setItem(bstrKey: string, bstrValue: string): void; } - class HTMLStyle { - private 'MSHTML.HTMLStyle_typekey': HTMLStyle; - private constructor(); + interface HTMLStyle { accelerator: string; alignContent: string; alignItems: string; @@ -25216,7 +25176,7 @@ declare namespace MSHTML { fontVariant: string; fontWeight: string; - /** @param number [lFlags=0] */ + /** @param lFlags [lFlags=0] */ getAttribute(strAttributeName: string, lFlags?: number): any; getExpression(propname: string): any; getPropertyPriority(bstrPropertyName: string): string; @@ -25365,7 +25325,7 @@ declare namespace MSHTML { posWidth: number; quotes: string; - /** @param number [lFlags=1] */ + /** @param lFlags [lFlags=1] */ removeAttribute(strAttributeName: string, lFlags?: number): boolean; removeExpression(propname: string): boolean; removeProperty(bstrPropertyName: string): string; @@ -25382,13 +25342,13 @@ declare namespace MSHTML { scrollbarShadowColor: any; scrollbarTrackColor: any; - /** @param number [lFlags=1] */ + /** @param lFlags [lFlags=1] */ setAttribute(strAttributeName: string, AttributeValue: any, lFlags?: number): void; - /** @param string [language=''] */ + /** @param language [language=''] */ setExpression(propname: string, expression: string, language?: string): void; - /** @param any [pvarPropertyPriority=''] */ + /** @param pvarPropertyPriority [pvarPropertyPriority=''] */ setProperty(bstrPropertyName: string, pvarPropertyValue: any, pvarPropertyPriority?: any): void; styleFloat: string; tableLayout: string; @@ -25477,6 +25437,7 @@ declare namespace MSHTML { writingMode: string; zIndex: any; zoom: any; + (index: number): string; } class HTMLStyleElement { @@ -25549,7 +25510,7 @@ declare namespace MSHTML { focus(): void; getAdjacentText(where: string): string; - /** @param number [lFlags=0] */ + /** @param lFlags [lFlags=0] */ getAttribute(strAttributeName: string, lFlags?: number): any; getAttributeNode(bstrName: string): IHTMLDOMAttribute; getAttributeNodeNS(pvarNS: any, bstrName: string): IHTMLDOMAttribute2; @@ -25737,7 +25698,7 @@ declare namespace MSHTML { readonly recordNumber: any; releaseCapture(): void; - /** @param number [lFlags=1] */ + /** @param lFlags [lFlags=1] */ removeAttribute(strAttributeName: string, lFlags?: number): boolean; removeAttributeNode(pattr: IHTMLDOMAttribute): IHTMLDOMAttribute; removeAttributeNS(pvarNS: any, strAttributeName: string): void; @@ -25746,7 +25707,7 @@ declare namespace MSHTML { removeExpression(propname: string): boolean; removeFilter(pUnk: any): void; - /** @param boolean [fDeep=false] */ + /** @param fDeep [fDeep=false] */ removeNode(fDeep?: boolean): IHTMLDOMNode; replaceAdjacentText(where: string, newText: string): string; replaceChild(newChild: IHTMLDOMNode, oldChild: IHTMLDOMNode): IHTMLDOMNode; @@ -25761,16 +25722,16 @@ declare namespace MSHTML { readonly scrollWidth: number; setActive(): void; - /** @param number [lFlags=1] */ + /** @param lFlags [lFlags=1] */ setAttribute(strAttributeName: string, AttributeValue: any, lFlags?: number): void; setAttributeNode(pattr: IHTMLDOMAttribute): IHTMLDOMAttribute; setAttributeNodeNS(pattr: IHTMLDOMAttribute2): IHTMLDOMAttribute2; setAttributeNS(pvarNS: any, strAttributeName: string, pvarAttributeValue: any): void; - /** @param boolean [containerCapture=true] */ + /** @param containerCapture [containerCapture=true] */ setCapture(containerCapture?: boolean): void; - /** @param string [language=''] */ + /** @param language [language=''] */ setExpression(propname: string, expression: string, language?: string): void; readonly sheet: IHTMLStyleSheet; readonly sourceIndex: number; @@ -25811,19 +25772,19 @@ declare namespace MSHTML { private 'MSHTML.HTMLStyleSheet_typekey': HTMLStyleSheet; private constructor(); - /** @param number [lIndex=-1] */ + /** @param lIndex [lIndex=-1] */ addImport(bstrURL: string, lIndex?: number): number; - /** @param number [lIndex=-1] */ + /** @param lIndex [lIndex=-1] */ addPageRule(bstrSelector: string, bstrStyle: string, lIndex?: number): number; - /** @param number [lIndex=-1] */ + /** @param lIndex [lIndex=-1] */ addRule(bstrSelector: string, bstrStyle: string, lIndex?: number): number; readonly 'constructor': any; readonly cssRules: IHTMLStyleSheetRulesCollection; cssText: string; - /** @param number [lIndex=-1] */ + /** @param lIndex [lIndex=-1] */ deleteRule(lIndex?: number): void; disabled: boolean; href: string; @@ -25835,7 +25796,7 @@ declare namespace MSHTML { readonly ie9_type: string; readonly imports: IHTMLStyleSheetsCollection; - /** @param number [lIndex=-1] */ + /** @param lIndex [lIndex=-1] */ insertRule(bstrRule: string, lIndex?: number): number; readonly isAlternate: boolean; readonly isPrefAlternate: boolean; @@ -25867,12 +25828,11 @@ declare namespace MSHTML { readonly type: number; } - class HTMLStyleSheetPagesCollection { - private 'MSHTML.HTMLStyleSheetPagesCollection_typekey': HTMLStyleSheetPagesCollection; - private constructor(); + interface HTMLStyleSheetPagesCollection { readonly 'constructor': any; item(index: number): IHTMLStyleSheetPage; readonly length: number; + (index: number): IHTMLStyleSheetPage; } class HTMLStyleSheetRule { @@ -25890,33 +25850,30 @@ declare namespace MSHTML { readonly type: number; } - class HTMLStyleSheetRulesAppliedCollection { - private 'MSHTML.HTMLStyleSheetRulesAppliedCollection_typekey': HTMLStyleSheetRulesAppliedCollection; - private constructor(); + interface HTMLStyleSheetRulesAppliedCollection { item(index: number): IHTMLStyleSheetRule; readonly length: number; propertyAppliedBy(name: string): IHTMLStyleSheetRule; propertyAppliedTrace(name: string, index: number): IHTMLStyleSheetRule; propertyAppliedTraceLength(name: string): number; + (index: number): IHTMLStyleSheetRule; } - class HTMLStyleSheetRulesCollection { - private 'MSHTML.HTMLStyleSheetRulesCollection_typekey': HTMLStyleSheetRulesCollection; - private constructor(); + interface HTMLStyleSheetRulesCollection { readonly 'constructor': any; ie9_item(index: number): IHTMLCSSRule; readonly ie9_length: number; item(index: number): IHTMLStyleSheetRule; readonly length: number; + (index: number): IHTMLStyleSheetRule; } - class HTMLStyleSheetsCollection { - private 'MSHTML.HTMLStyleSheetsCollection_typekey': HTMLStyleSheetsCollection; - private constructor(); + interface HTMLStyleSheetsCollection { readonly 'constructor': any; ie9_item(index: number): any; item(pvarIndex: any): any; readonly length: number; + (pvarIndex: any): any; } class HTMLTable { @@ -26000,7 +25957,7 @@ declare namespace MSHTML { dataSrc: string; deleteCaption(): void; - /** @param number [index=-1] */ + /** @param index [index=-1] */ deleteRow(index?: number): void; deleteTFoot(): void; deleteTHead(): void; @@ -26018,7 +25975,7 @@ declare namespace MSHTML { frame: string; getAdjacentText(where: string): string; - /** @param number [lFlags=0] */ + /** @param lFlags [lFlags=0] */ getAttribute(strAttributeName: string, lFlags?: number): any; getAttributeNode(bstrName: string): IHTMLDOMAttribute; getAttributeNodeNS(pvarNS: any, bstrName: string): IHTMLDOMAttribute2; @@ -26046,7 +26003,7 @@ declare namespace MSHTML { ie9_appendChild(newChild: IHTMLDOMNode): IHTMLDOMNode; ie9_caption: IHTMLTableCaption; - /** @param number [index=-1] */ + /** @param index [index=-1] */ ie9_deleteRow(index?: number): void; ie9_getAttribute(strAttributeName: string): any; ie9_getAttributeNode(strAttributeName: string): IHTMLDOMAttribute2; @@ -26054,7 +26011,7 @@ declare namespace MSHTML { ie9_hasAttributes(): boolean; ie9_insertBefore(newChild: IHTMLDOMNode, refChild?: any): IHTMLDOMNode; - /** @param number [index=-1] */ + /** @param index [index=-1] */ ie9_insertRow(index?: number): any; readonly ie9_nodeName: string; ie9_removeAttribute(strAttributeName: string): void; @@ -26073,7 +26030,7 @@ declare namespace MSHTML { insertAdjacentText(where: string, text: string): void; insertBefore(newChild: IHTMLDOMNode, refChild?: any): IHTMLDOMNode; - /** @param number [index=-1] */ + /** @param index [index=-1] */ insertRow(index?: number): any; readonly isContentEditable: boolean; isDefaultNamespace(pvarNamespace: any): boolean; @@ -26093,8 +26050,8 @@ declare namespace MSHTML { mergeAttributes(mergeThis: IHTMLElement, pvarFlags?: any): void; /** - * @param number [indexFrom=-1] - * @param number [indexTo=-1] + * @param indexFrom [indexFrom=-1] + * @param indexTo [indexTo=-1] */ moveRow(indexFrom?: number, indexTo?: number): any; msMatchesSelector(v: string): boolean; @@ -26243,7 +26200,7 @@ declare namespace MSHTML { refresh(): void; releaseCapture(): void; - /** @param number [lFlags=1] */ + /** @param lFlags [lFlags=1] */ removeAttribute(strAttributeName: string, lFlags?: number): boolean; removeAttributeNode(pattr: IHTMLDOMAttribute): IHTMLDOMAttribute; removeAttributeNS(pvarNS: any, strAttributeName: string): void; @@ -26252,7 +26209,7 @@ declare namespace MSHTML { removeExpression(propname: string): boolean; removeFilter(pUnk: any): void; - /** @param boolean [fDeep=false] */ + /** @param fDeep [fDeep=false] */ removeNode(fDeep?: boolean): IHTMLDOMNode; replaceAdjacentText(where: string, newText: string): string; replaceChild(newChild: IHTMLDOMNode, oldChild: IHTMLDOMNode): IHTMLDOMNode; @@ -26269,16 +26226,16 @@ declare namespace MSHTML { readonly scrollWidth: number; setActive(): void; - /** @param number [lFlags=1] */ + /** @param lFlags [lFlags=1] */ setAttribute(strAttributeName: string, AttributeValue: any, lFlags?: number): void; setAttributeNode(pattr: IHTMLDOMAttribute): IHTMLDOMAttribute; setAttributeNodeNS(pattr: IHTMLDOMAttribute2): IHTMLDOMAttribute2; setAttributeNS(pvarNS: any, strAttributeName: string, pvarAttributeValue: any): void; - /** @param boolean [containerCapture=true] */ + /** @param containerCapture [containerCapture=true] */ setCapture(containerCapture?: boolean): void; - /** @param string [language=''] */ + /** @param language [language=''] */ setExpression(propname: string, expression: string, language?: string): void; readonly sourceIndex: number; spellcheck: any; @@ -26371,7 +26328,7 @@ declare namespace MSHTML { focus(): void; getAdjacentText(where: string): string; - /** @param number [lFlags=0] */ + /** @param lFlags [lFlags=0] */ getAttribute(strAttributeName: string, lFlags?: number): any; getAttributeNode(bstrName: string): IHTMLDOMAttribute; getAttributeNodeNS(pvarNS: any, bstrName: string): IHTMLDOMAttribute2; @@ -26558,7 +26515,7 @@ declare namespace MSHTML { readonly recordNumber: any; releaseCapture(): void; - /** @param number [lFlags=1] */ + /** @param lFlags [lFlags=1] */ removeAttribute(strAttributeName: string, lFlags?: number): boolean; removeAttributeNode(pattr: IHTMLDOMAttribute): IHTMLDOMAttribute; removeAttributeNS(pvarNS: any, strAttributeName: string): void; @@ -26567,7 +26524,7 @@ declare namespace MSHTML { removeExpression(propname: string): boolean; removeFilter(pUnk: any): void; - /** @param boolean [fDeep=false] */ + /** @param fDeep [fDeep=false] */ removeNode(fDeep?: boolean): IHTMLDOMNode; replaceAdjacentText(where: string, newText: string): string; replaceChild(newChild: IHTMLDOMNode, oldChild: IHTMLDOMNode): IHTMLDOMNode; @@ -26582,16 +26539,16 @@ declare namespace MSHTML { readonly scrollWidth: number; setActive(): void; - /** @param number [lFlags=1] */ + /** @param lFlags [lFlags=1] */ setAttribute(strAttributeName: string, AttributeValue: any, lFlags?: number): void; setAttributeNode(pattr: IHTMLDOMAttribute): IHTMLDOMAttribute; setAttributeNodeNS(pattr: IHTMLDOMAttribute2): IHTMLDOMAttribute2; setAttributeNS(pvarNS: any, strAttributeName: string, pvarAttributeValue: any): void; - /** @param boolean [containerCapture=true] */ + /** @param containerCapture [containerCapture=true] */ setCapture(containerCapture?: boolean): void; - /** @param string [language=''] */ + /** @param language [language=''] */ setExpression(propname: string, expression: string, language?: string): void; readonly sourceIndex: number; spellcheck: any; @@ -26690,7 +26647,7 @@ declare namespace MSHTML { focus(): void; getAdjacentText(where: string): string; - /** @param number [lFlags=0] */ + /** @param lFlags [lFlags=0] */ getAttribute(strAttributeName: string, lFlags?: number): any; getAttributeNode(bstrName: string): IHTMLDOMAttribute; getAttributeNodeNS(pvarNS: any, bstrName: string): IHTMLDOMAttribute2; @@ -26882,7 +26839,7 @@ declare namespace MSHTML { readonly recordNumber: any; releaseCapture(): void; - /** @param number [lFlags=1] */ + /** @param lFlags [lFlags=1] */ removeAttribute(strAttributeName: string, lFlags?: number): boolean; removeAttributeNode(pattr: IHTMLDOMAttribute): IHTMLDOMAttribute; removeAttributeNS(pvarNS: any, strAttributeName: string): void; @@ -26891,7 +26848,7 @@ declare namespace MSHTML { removeExpression(propname: string): boolean; removeFilter(pUnk: any): void; - /** @param boolean [fDeep=false] */ + /** @param fDeep [fDeep=false] */ removeNode(fDeep?: boolean): IHTMLDOMNode; replaceAdjacentText(where: string, newText: string): string; replaceChild(newChild: IHTMLDOMNode, oldChild: IHTMLDOMNode): IHTMLDOMNode; @@ -26908,16 +26865,16 @@ declare namespace MSHTML { readonly scrollWidth: number; setActive(): void; - /** @param number [lFlags=1] */ + /** @param lFlags [lFlags=1] */ setAttribute(strAttributeName: string, AttributeValue: any, lFlags?: number): void; setAttributeNode(pattr: IHTMLDOMAttribute): IHTMLDOMAttribute; setAttributeNodeNS(pattr: IHTMLDOMAttribute2): IHTMLDOMAttribute2; setAttributeNS(pvarNS: any, strAttributeName: string, pvarAttributeValue: any): void; - /** @param boolean [containerCapture=true] */ + /** @param containerCapture [containerCapture=true] */ setCapture(containerCapture?: boolean): void; - /** @param string [language=''] */ + /** @param language [language=''] */ setExpression(propname: string, expression: string, language?: string): void; readonly sourceIndex: number; spellcheck: any; @@ -27008,7 +26965,7 @@ declare namespace MSHTML { focus(): void; getAdjacentText(where: string): string; - /** @param number [lFlags=0] */ + /** @param lFlags [lFlags=0] */ getAttribute(strAttributeName: string, lFlags?: number): any; getAttributeNode(bstrName: string): IHTMLDOMAttribute; getAttributeNodeNS(pvarNS: any, bstrName: string): IHTMLDOMAttribute2; @@ -27197,7 +27154,7 @@ declare namespace MSHTML { readonly recordNumber: any; releaseCapture(): void; - /** @param number [lFlags=1] */ + /** @param lFlags [lFlags=1] */ removeAttribute(strAttributeName: string, lFlags?: number): boolean; removeAttributeNode(pattr: IHTMLDOMAttribute): IHTMLDOMAttribute; removeAttributeNS(pvarNS: any, strAttributeName: string): void; @@ -27206,7 +27163,7 @@ declare namespace MSHTML { removeExpression(propname: string): boolean; removeFilter(pUnk: any): void; - /** @param boolean [fDeep=false] */ + /** @param fDeep [fDeep=false] */ removeNode(fDeep?: boolean): IHTMLDOMNode; replaceAdjacentText(where: string, newText: string): string; replaceChild(newChild: IHTMLDOMNode, oldChild: IHTMLDOMNode): IHTMLDOMNode; @@ -27221,16 +27178,16 @@ declare namespace MSHTML { readonly scrollWidth: number; setActive(): void; - /** @param number [lFlags=1] */ + /** @param lFlags [lFlags=1] */ setAttribute(strAttributeName: string, AttributeValue: any, lFlags?: number): void; setAttributeNode(pattr: IHTMLDOMAttribute): IHTMLDOMAttribute; setAttributeNodeNS(pattr: IHTMLDOMAttribute2): IHTMLDOMAttribute2; setAttributeNS(pvarNS: any, strAttributeName: string, pvarAttributeValue: any): void; - /** @param boolean [containerCapture=true] */ + /** @param containerCapture [containerCapture=true] */ setCapture(containerCapture?: boolean): void; - /** @param string [language=''] */ + /** @param language [language=''] */ setExpression(propname: string, expression: string, language?: string): void; readonly sourceIndex: number; span: number; @@ -27316,7 +27273,7 @@ declare namespace MSHTML { createControlRange(): any; readonly currentStyle: IHTMLCurrentStyle; - /** @param number [index=-1] */ + /** @param index [index=-1] */ deleteCell(index?: number): void; detachEvent(event: string, pdisp: any): void; dir: string; @@ -27330,7 +27287,7 @@ declare namespace MSHTML { focus(): void; getAdjacentText(where: string): string; - /** @param number [lFlags=0] */ + /** @param lFlags [lFlags=0] */ getAttribute(strAttributeName: string, lFlags?: number): any; getAttributeNode(bstrName: string): IHTMLDOMAttribute; getAttributeNodeNS(pvarNS: any, bstrName: string): IHTMLDOMAttribute2; @@ -27358,14 +27315,14 @@ declare namespace MSHTML { ie9_ch: string; ie9_chOff: string; - /** @param number [index=-1] */ + /** @param index [index=-1] */ ie9_deleteCell(index?: number): void; ie9_getAttribute(strAttributeName: string): any; ie9_getAttributeNode(strAttributeName: string): IHTMLDOMAttribute2; ie9_hasAttribute(name: string): boolean; ie9_hasAttributes(): boolean; - /** @param number [index=-1] */ + /** @param index [index=-1] */ ie9_insertCell(index?: number): any; readonly ie9_nodeName: string; ie9_removeAttribute(strAttributeName: string): void; @@ -27380,7 +27337,7 @@ declare namespace MSHTML { insertAdjacentText(where: string, text: string): void; insertBefore(newChild: IHTMLDOMNode, refChild?: any): IHTMLDOMNode; - /** @param number [index=-1] */ + /** @param index [index=-1] */ insertCell(index?: number): any; readonly isContentEditable: boolean; readonly isDisabled: boolean; @@ -27529,7 +27486,7 @@ declare namespace MSHTML { readonly recordNumber: any; releaseCapture(): void; - /** @param number [lFlags=1] */ + /** @param lFlags [lFlags=1] */ removeAttribute(strAttributeName: string, lFlags?: number): boolean; removeAttributeNode(pattr: IHTMLDOMAttribute): IHTMLDOMAttribute; removeAttributeNS(pvarNS: any, strAttributeName: string): void; @@ -27538,7 +27495,7 @@ declare namespace MSHTML { removeExpression(propname: string): boolean; removeFilter(pUnk: any): void; - /** @param boolean [fDeep=false] */ + /** @param fDeep [fDeep=false] */ removeNode(fDeep?: boolean): IHTMLDOMNode; replaceAdjacentText(where: string, newText: string): string; replaceChild(newChild: IHTMLDOMNode, oldChild: IHTMLDOMNode): IHTMLDOMNode; @@ -27555,16 +27512,16 @@ declare namespace MSHTML { readonly sectionRowIndex: number; setActive(): void; - /** @param number [lFlags=1] */ + /** @param lFlags [lFlags=1] */ setAttribute(strAttributeName: string, AttributeValue: any, lFlags?: number): void; setAttributeNode(pattr: IHTMLDOMAttribute): IHTMLDOMAttribute; setAttributeNodeNS(pattr: IHTMLDOMAttribute2): IHTMLDOMAttribute2; setAttributeNS(pvarNS: any, strAttributeName: string, pvarAttributeValue: any): void; - /** @param boolean [containerCapture=true] */ + /** @param containerCapture [containerCapture=true] */ setCapture(containerCapture?: boolean): void; - /** @param string [language=''] */ + /** @param language [language=''] */ setExpression(propname: string, expression: string, language?: string): void; readonly sourceIndex: number; spellcheck: any; @@ -27644,7 +27601,7 @@ declare namespace MSHTML { createControlRange(): any; readonly currentStyle: IHTMLCurrentStyle; - /** @param number [index=-1] */ + /** @param index [index=-1] */ deleteRow(index?: number): void; detachEvent(event: string, pdisp: any): void; dir: string; @@ -27658,7 +27615,7 @@ declare namespace MSHTML { focus(): void; getAdjacentText(where: string): string; - /** @param number [lFlags=0] */ + /** @param lFlags [lFlags=0] */ getAttribute(strAttributeName: string, lFlags?: number): any; getAttributeNode(bstrName: string): IHTMLDOMAttribute; getAttributeNodeNS(pvarNS: any, bstrName: string): IHTMLDOMAttribute2; @@ -27685,14 +27642,14 @@ declare namespace MSHTML { ie9_ch: string; ie9_chOff: string; - /** @param number [index=-1] */ + /** @param index [index=-1] */ ie9_deleteRow(index?: number): void; ie9_getAttribute(strAttributeName: string): any; ie9_getAttributeNode(strAttributeName: string): IHTMLDOMAttribute2; ie9_hasAttribute(name: string): boolean; ie9_hasAttributes(): boolean; - /** @param number [index=-1] */ + /** @param index [index=-1] */ ie9_insertRow(index?: number): any; readonly ie9_nodeName: string; ie9_removeAttribute(strAttributeName: string): void; @@ -27707,7 +27664,7 @@ declare namespace MSHTML { insertAdjacentText(where: string, text: string): void; insertBefore(newChild: IHTMLDOMNode, refChild?: any): IHTMLDOMNode; - /** @param number [index=-1] */ + /** @param index [index=-1] */ insertRow(index?: number): any; readonly isContentEditable: boolean; readonly isDisabled: boolean; @@ -27719,8 +27676,8 @@ declare namespace MSHTML { mergeAttributes(mergeThis: IHTMLElement, pvarFlags?: any): void; /** - * @param number [indexFrom=-1] - * @param number [indexTo=-1] + * @param indexFrom [indexFrom=-1] + * @param indexTo [indexTo=-1] */ moveRow(indexFrom?: number, indexTo?: number): any; msMatchesSelector(v: string): boolean; @@ -27862,7 +27819,7 @@ declare namespace MSHTML { readonly recordNumber: any; releaseCapture(): void; - /** @param number [lFlags=1] */ + /** @param lFlags [lFlags=1] */ removeAttribute(strAttributeName: string, lFlags?: number): boolean; removeAttributeNode(pattr: IHTMLDOMAttribute): IHTMLDOMAttribute; removeAttributeNS(pvarNS: any, strAttributeName: string): void; @@ -27871,7 +27828,7 @@ declare namespace MSHTML { removeExpression(propname: string): boolean; removeFilter(pUnk: any): void; - /** @param boolean [fDeep=false] */ + /** @param fDeep [fDeep=false] */ removeNode(fDeep?: boolean): IHTMLDOMNode; replaceAdjacentText(where: string, newText: string): string; replaceChild(newChild: IHTMLDOMNode, oldChild: IHTMLDOMNode): IHTMLDOMNode; @@ -27887,16 +27844,16 @@ declare namespace MSHTML { readonly scrollWidth: number; setActive(): void; - /** @param number [lFlags=1] */ + /** @param lFlags [lFlags=1] */ setAttribute(strAttributeName: string, AttributeValue: any, lFlags?: number): void; setAttributeNode(pattr: IHTMLDOMAttribute): IHTMLDOMAttribute; setAttributeNodeNS(pattr: IHTMLDOMAttribute2): IHTMLDOMAttribute2; setAttributeNS(pvarNS: any, strAttributeName: string, pvarAttributeValue: any): void; - /** @param boolean [containerCapture=true] */ + /** @param containerCapture [containerCapture=true] */ setCapture(containerCapture?: boolean): void; - /** @param string [language=''] */ + /** @param language [language=''] */ setExpression(propname: string, expression: string, language?: string): void; readonly sourceIndex: number; spellcheck: any; @@ -27991,7 +27948,7 @@ declare namespace MSHTML { readonly form: IHTMLFormElement; getAdjacentText(where: string): string; - /** @param number [lFlags=0] */ + /** @param lFlags [lFlags=0] */ getAttribute(strAttributeName: string, lFlags?: number): any; getAttributeNode(bstrName: string): IHTMLDOMAttribute; getAttributeNodeNS(pvarNS: any, bstrName: string): IHTMLDOMAttribute2; @@ -28195,7 +28152,7 @@ declare namespace MSHTML { readonly recordNumber: any; releaseCapture(): void; - /** @param number [lFlags=1] */ + /** @param lFlags [lFlags=1] */ removeAttribute(strAttributeName: string, lFlags?: number): boolean; removeAttributeNode(pattr: IHTMLDOMAttribute): IHTMLDOMAttribute; removeAttributeNS(pvarNS: any, strAttributeName: string): void; @@ -28204,7 +28161,7 @@ declare namespace MSHTML { removeExpression(propname: string): boolean; removeFilter(pUnk: any): void; - /** @param boolean [fDeep=false] */ + /** @param fDeep [fDeep=false] */ removeNode(fDeep?: boolean): IHTMLDOMNode; replaceAdjacentText(where: string, newText: string): string; replaceChild(newChild: IHTMLDOMNode, oldChild: IHTMLDOMNode): IHTMLDOMNode; @@ -28223,16 +28180,16 @@ declare namespace MSHTML { selectionStart: number; setActive(): void; - /** @param number [lFlags=1] */ + /** @param lFlags [lFlags=1] */ setAttribute(strAttributeName: string, AttributeValue: any, lFlags?: number): void; setAttributeNode(pattr: IHTMLDOMAttribute): IHTMLDOMAttribute; setAttributeNodeNS(pattr: IHTMLDOMAttribute2): IHTMLDOMAttribute2; setAttributeNS(pvarNS: any, strAttributeName: string, pvarAttributeValue: any): void; - /** @param boolean [containerCapture=true] */ + /** @param containerCapture [containerCapture=true] */ setCapture(containerCapture?: boolean): void; - /** @param string [language=''] */ + /** @param language [language=''] */ setExpression(propname: string, expression: string, language?: string): void; setSelectionRange(start: number, end: number): void; readonly sourceIndex: number; @@ -28324,7 +28281,7 @@ declare namespace MSHTML { focus(): void; getAdjacentText(where: string): string; - /** @param number [lFlags=0] */ + /** @param lFlags [lFlags=0] */ getAttribute(strAttributeName: string, lFlags?: number): any; getAttributeNode(bstrName: string): IHTMLDOMAttribute; getAttributeNodeNS(pvarNS: any, bstrName: string): IHTMLDOMAttribute2; @@ -28511,7 +28468,7 @@ declare namespace MSHTML { readonly recordNumber: any; releaseCapture(): void; - /** @param number [lFlags=1] */ + /** @param lFlags [lFlags=1] */ removeAttribute(strAttributeName: string, lFlags?: number): boolean; removeAttributeNode(pattr: IHTMLDOMAttribute): IHTMLDOMAttribute; removeAttributeNS(pvarNS: any, strAttributeName: string): void; @@ -28520,7 +28477,7 @@ declare namespace MSHTML { removeExpression(propname: string): boolean; removeFilter(pUnk: any): void; - /** @param boolean [fDeep=false] */ + /** @param fDeep [fDeep=false] */ removeNode(fDeep?: boolean): IHTMLDOMNode; replaceAdjacentText(where: string, newText: string): string; replaceChild(newChild: IHTMLDOMNode, oldChild: IHTMLDOMNode): IHTMLDOMNode; @@ -28535,16 +28492,16 @@ declare namespace MSHTML { readonly scrollWidth: number; setActive(): void; - /** @param number [lFlags=1] */ + /** @param lFlags [lFlags=1] */ setAttribute(strAttributeName: string, AttributeValue: any, lFlags?: number): void; setAttributeNode(pattr: IHTMLDOMAttribute): IHTMLDOMAttribute; setAttributeNodeNS(pattr: IHTMLDOMAttribute2): IHTMLDOMAttribute2; setAttributeNS(pvarNS: any, strAttributeName: string, pvarAttributeValue: any): void; - /** @param boolean [containerCapture=true] */ + /** @param containerCapture [containerCapture=true] */ setCapture(containerCapture?: boolean): void; - /** @param string [language=''] */ + /** @param language [language=''] */ setExpression(propname: string, expression: string, language?: string): void; readonly sourceIndex: number; spellcheck: any; @@ -28640,7 +28597,7 @@ declare namespace MSHTML { focus(): void; getAdjacentText(where: string): string; - /** @param number [lFlags=0] */ + /** @param lFlags [lFlags=0] */ getAttribute(strAttributeName: string, lFlags?: number): any; getAttributeNode(bstrName: string): IHTMLDOMAttribute; getAttributeNodeNS(pvarNS: any, bstrName: string): IHTMLDOMAttribute2; @@ -28827,7 +28784,7 @@ declare namespace MSHTML { readonly recordNumber: any; releaseCapture(): void; - /** @param number [lFlags=1] */ + /** @param lFlags [lFlags=1] */ removeAttribute(strAttributeName: string, lFlags?: number): boolean; removeAttributeNode(pattr: IHTMLDOMAttribute): IHTMLDOMAttribute; removeAttributeNS(pvarNS: any, strAttributeName: string): void; @@ -28836,7 +28793,7 @@ declare namespace MSHTML { removeExpression(propname: string): boolean; removeFilter(pUnk: any): void; - /** @param boolean [fDeep=false] */ + /** @param fDeep [fDeep=false] */ removeNode(fDeep?: boolean): IHTMLDOMNode; replaceAdjacentText(where: string, newText: string): string; replaceChild(newChild: IHTMLDOMNode, oldChild: IHTMLDOMNode): IHTMLDOMNode; @@ -28851,16 +28808,16 @@ declare namespace MSHTML { readonly scrollWidth: number; setActive(): void; - /** @param number [lFlags=1] */ + /** @param lFlags [lFlags=1] */ setAttribute(strAttributeName: string, AttributeValue: any, lFlags?: number): void; setAttributeNode(pattr: IHTMLDOMAttribute): IHTMLDOMAttribute; setAttributeNodeNS(pattr: IHTMLDOMAttribute2): IHTMLDOMAttribute2; setAttributeNS(pvarNS: any, strAttributeName: string, pvarAttributeValue: any): void; - /** @param boolean [containerCapture=true] */ + /** @param containerCapture [containerCapture=true] */ setCapture(containerCapture?: boolean): void; - /** @param string [language=''] */ + /** @param language [language=''] */ setExpression(propname: string, expression: string, language?: string): void; readonly sourceIndex: number; spellcheck: any; @@ -28948,7 +28905,7 @@ declare namespace MSHTML { focus(): void; getAdjacentText(where: string): string; - /** @param number [lFlags=0] */ + /** @param lFlags [lFlags=0] */ getAttribute(strAttributeName: string, lFlags?: number): any; getAttributeNode(bstrName: string): IHTMLDOMAttribute; getAttributeNodeNS(pvarNS: any, bstrName: string): IHTMLDOMAttribute2; @@ -29135,7 +29092,7 @@ declare namespace MSHTML { readonly recordNumber: any; releaseCapture(): void; - /** @param number [lFlags=1] */ + /** @param lFlags [lFlags=1] */ removeAttribute(strAttributeName: string, lFlags?: number): boolean; removeAttributeNode(pattr: IHTMLDOMAttribute): IHTMLDOMAttribute; removeAttributeNS(pvarNS: any, strAttributeName: string): void; @@ -29144,7 +29101,7 @@ declare namespace MSHTML { removeExpression(propname: string): boolean; removeFilter(pUnk: any): void; - /** @param boolean [fDeep=false] */ + /** @param fDeep [fDeep=false] */ removeNode(fDeep?: boolean): IHTMLDOMNode; replaceAdjacentText(where: string, newText: string): string; replaceChild(newChild: IHTMLDOMNode, oldChild: IHTMLDOMNode): IHTMLDOMNode; @@ -29159,16 +29116,16 @@ declare namespace MSHTML { readonly scrollWidth: number; setActive(): void; - /** @param number [lFlags=1] */ + /** @param lFlags [lFlags=1] */ setAttribute(strAttributeName: string, AttributeValue: any, lFlags?: number): void; setAttributeNode(pattr: IHTMLDOMAttribute): IHTMLDOMAttribute; setAttributeNodeNS(pattr: IHTMLDOMAttribute2): IHTMLDOMAttribute2; setAttributeNS(pvarNS: any, strAttributeName: string, pvarAttributeValue: any): void; - /** @param boolean [containerCapture=true] */ + /** @param containerCapture [containerCapture=true] */ setCapture(containerCapture?: boolean): void; - /** @param string [language=''] */ + /** @param language [language=''] */ setExpression(propname: string, expression: string, language?: string): void; readonly sourceIndex: number; spellcheck: any; @@ -29255,7 +29212,7 @@ declare namespace MSHTML { focus(): void; getAdjacentText(where: string): string; - /** @param number [lFlags=0] */ + /** @param lFlags [lFlags=0] */ getAttribute(strAttributeName: string, lFlags?: number): any; getAttributeNode(bstrName: string): IHTMLDOMAttribute; getAttributeNodeNS(pvarNS: any, bstrName: string): IHTMLDOMAttribute2; @@ -29442,7 +29399,7 @@ declare namespace MSHTML { readonly recordNumber: any; releaseCapture(): void; - /** @param number [lFlags=1] */ + /** @param lFlags [lFlags=1] */ removeAttribute(strAttributeName: string, lFlags?: number): boolean; removeAttributeNode(pattr: IHTMLDOMAttribute): IHTMLDOMAttribute; removeAttributeNS(pvarNS: any, strAttributeName: string): void; @@ -29451,7 +29408,7 @@ declare namespace MSHTML { removeExpression(propname: string): boolean; removeFilter(pUnk: any): void; - /** @param boolean [fDeep=false] */ + /** @param fDeep [fDeep=false] */ removeNode(fDeep?: boolean): IHTMLDOMNode; replaceAdjacentText(where: string, newText: string): string; replaceChild(newChild: IHTMLDOMNode, oldChild: IHTMLDOMNode): IHTMLDOMNode; @@ -29466,16 +29423,16 @@ declare namespace MSHTML { readonly scrollWidth: number; setActive(): void; - /** @param number [lFlags=1] */ + /** @param lFlags [lFlags=1] */ setAttribute(strAttributeName: string, AttributeValue: any, lFlags?: number): void; setAttributeNode(pattr: IHTMLDOMAttribute): IHTMLDOMAttribute; setAttributeNodeNS(pattr: IHTMLDOMAttribute2): IHTMLDOMAttribute2; setAttributeNS(pvarNS: any, strAttributeName: string, pvarAttributeValue: any): void; - /** @param boolean [containerCapture=true] */ + /** @param containerCapture [containerCapture=true] */ setCapture(containerCapture?: boolean): void; - /** @param string [language=''] */ + /** @param language [language=''] */ setExpression(propname: string, expression: string, language?: string): void; readonly sourceIndex: number; spellcheck: any; @@ -29491,12 +29448,11 @@ declare namespace MSHTML { xmsAcceleratorKey: string; } - class HTMLUrnCollection { - private 'MSHTML.HTMLUrnCollection_typekey': HTMLUrnCollection; - private constructor(); + interface HTMLUrnCollection { readonly 'constructor': any; item(index: number): string; readonly length: number; + (index: number): string; } class HTMLVideoElement { @@ -29587,7 +29543,7 @@ declare namespace MSHTML { focus(): void; getAdjacentText(where: string): string; - /** @param number [lFlags=0] */ + /** @param lFlags [lFlags=0] */ getAttribute(strAttributeName: string, lFlags?: number): any; getAttributeNode(bstrName: string): IHTMLDOMAttribute; getAttributeNodeNS(pvarNS: any, bstrName: string): IHTMLDOMAttribute2; @@ -29806,7 +29762,7 @@ declare namespace MSHTML { readonly recordNumber: any; releaseCapture(): void; - /** @param number [lFlags=1] */ + /** @param lFlags [lFlags=1] */ removeAttribute(strAttributeName: string, lFlags?: number): boolean; removeAttributeNode(pattr: IHTMLDOMAttribute): IHTMLDOMAttribute; removeAttributeNS(pvarNS: any, strAttributeName: string): void; @@ -29815,7 +29771,7 @@ declare namespace MSHTML { removeExpression(propname: string): boolean; removeFilter(pUnk: any): void; - /** @param boolean [fDeep=false] */ + /** @param fDeep [fDeep=false] */ removeNode(fDeep?: boolean): IHTMLDOMNode; replaceAdjacentText(where: string, newText: string): string; replaceChild(newChild: IHTMLDOMNode, oldChild: IHTMLDOMNode): IHTMLDOMNode; @@ -29832,16 +29788,16 @@ declare namespace MSHTML { readonly seeking: boolean; setActive(): void; - /** @param number [lFlags=1] */ + /** @param lFlags [lFlags=1] */ setAttribute(strAttributeName: string, AttributeValue: any, lFlags?: number): void; setAttributeNode(pattr: IHTMLDOMAttribute): IHTMLDOMAttribute; setAttributeNodeNS(pattr: IHTMLDOMAttribute2): IHTMLDOMAttribute2; setAttributeNS(pvarNS: any, strAttributeName: string, pvarAttributeValue: any): void; - /** @param boolean [containerCapture=true] */ + /** @param containerCapture [containerCapture=true] */ setCapture(containerCapture?: boolean): void; - /** @param string [language=''] */ + /** @param language [language=''] */ setExpression(propname: string, expression: string, language?: string): void; readonly sourceIndex: number; spellcheck: any; @@ -29864,9 +29820,7 @@ declare namespace MSHTML { xmsAcceleratorKey: string; } - class HTMLW3CComputedStyle { - private 'MSHTML.HTMLW3CComputedStyle_typekey': HTMLW3CComputedStyle; - private constructor(); + interface HTMLW3CComputedStyle { accelerator: string; alignContent: string; alignItems: string; @@ -30145,7 +30099,7 @@ declare namespace MSHTML { scrollbarShadowColor: any; scrollbarTrackColor: any; - /** @param any [pvarPropertyPriority=''] */ + /** @param pvarPropertyPriority [pvarPropertyPriority=''] */ setProperty(bstrPropertyName: string, pvarPropertyValue: any, pvarPropertyPriority?: any): void; stopColor: any; stopOpacity: any; @@ -30239,14 +30193,13 @@ declare namespace MSHTML { writingMode: string; zIndex: any; zoom: any; + (index: number): string; } - class HTMLWindow2 { - private 'MSHTML.HTMLWindow2_typekey': HTMLWindow2; - private constructor(); + interface HTMLWindow2 { addEventListener(type: string, listener: any, useCapture: boolean): void; - /** @param string [message=''] */ + /** @param message [message=''] */ alert(message?: string): void; readonly applicationCache: applicationCache; attachEvent(event: string, pdisp: any): boolean; @@ -30258,7 +30211,7 @@ declare namespace MSHTML { close(): void; readonly closed: boolean; - /** @param string [message=''] */ + /** @param message [message=''] */ confirm(message?: string): boolean; readonly 'constructor': any; createPopup(varArgIn?: any): any; @@ -30268,14 +30221,14 @@ declare namespace MSHTML { readonly document: IHTMLDocument2; readonly event: IHTMLEventObj; - /** @param string [language='JScript'] */ + /** @param language [language='JScript'] */ execScript(code: string, language?: string): any; readonly external: any; focus(): void; readonly frameElement: IHTMLFrameBase; readonly frames: FramesCollection; - /** @param string [bstrPseudoElt=''] */ + /** @param bstrPseudoElt [bstrPseudoElt=''] */ getComputedStyle(varArgIn: IHTMLDOMNode, bstrPseudoElt?: string): IHTMLCSSStyleDeclaration; getSelection(): IHTMLSelection; readonly history: IOmHistory; @@ -30376,10 +30329,10 @@ declare namespace MSHTML { onwaiting: any; /** - * @param string [url=''] - * @param string [name=''] - * @param string [features=''] - * @param boolean [replace=false] + * @param url [url=''] + * @param name [name=''] + * @param features [features=''] + * @param replace [replace=false] */ open(url?: string, name?: string, features?: string, replace?: boolean): IHTMLWindow2; opener: any; @@ -30393,8 +30346,8 @@ declare namespace MSHTML { print(): void; /** - * @param string [message=''] - * @param string [defstr='undefined'] + * @param message [message=''] + * @param defstr [defstr='undefined'] */ prompt(message?: string, defstr?: string): any; removeEventListener(type: string, listener: any, useCapture: boolean): void; @@ -30413,11 +30366,11 @@ declare namespace MSHTML { setInterval(expression: any, msec: number, language?: any): number; setTimeout(expression: any, msec: number, language?: any): number; - /** @param string [features=''] */ + /** @param features [features=''] */ showHelp(helpURL: string, helpArg: any, features?: string): void; showModalDialog(dialog: string, varArgIn?: any, varOptions?: any): any; - /** @param string [url=''] */ + /** @param url [url=''] */ showModelessDialog(url?: string, varArgIn?: any, options?: any): IHTMLWindow2; status: string; readonly styleMedia: IHTMLStyleMedia; @@ -30425,14 +30378,13 @@ declare namespace MSHTML { toStaticHTML(bstrHTML: string): string; toString(): string; readonly window: IHTMLWindow2; + (pvarIndex: any): any; } - class HTMLWindowProxy { - private 'MSHTML.HTMLWindowProxy_typekey': HTMLWindowProxy; - private constructor(); + interface HTMLWindowProxy { addEventListener(type: string, listener: any, useCapture: boolean): void; - /** @param string [message=''] */ + /** @param message [message=''] */ alert(message?: string): void; readonly applicationCache: applicationCache; attachEvent(event: string, pdisp: any): boolean; @@ -30444,7 +30396,7 @@ declare namespace MSHTML { close(): void; readonly closed: boolean; - /** @param string [message=''] */ + /** @param message [message=''] */ confirm(message?: string): boolean; readonly 'constructor': any; createPopup(varArgIn?: any): any; @@ -30454,14 +30406,14 @@ declare namespace MSHTML { readonly document: IHTMLDocument2; readonly event: IHTMLEventObj; - /** @param string [language='JScript'] */ + /** @param language [language='JScript'] */ execScript(code: string, language?: string): any; readonly external: any; focus(): void; readonly frameElement: IHTMLFrameBase; readonly frames: FramesCollection; - /** @param string [bstrPseudoElt=''] */ + /** @param bstrPseudoElt [bstrPseudoElt=''] */ getComputedStyle(varArgIn: IHTMLDOMNode, bstrPseudoElt?: string): IHTMLCSSStyleDeclaration; getSelection(): IHTMLSelection; readonly history: IOmHistory; @@ -30562,10 +30514,10 @@ declare namespace MSHTML { onwaiting: any; /** - * @param string [url=''] - * @param string [name=''] - * @param string [features=''] - * @param boolean [replace=false] + * @param url [url=''] + * @param name [name=''] + * @param features [features=''] + * @param replace [replace=false] */ open(url?: string, name?: string, features?: string, replace?: boolean): IHTMLWindow2; opener: any; @@ -30579,8 +30531,8 @@ declare namespace MSHTML { print(): void; /** - * @param string [message=''] - * @param string [defstr='undefined'] + * @param message [message=''] + * @param defstr [defstr='undefined'] */ prompt(message?: string, defstr?: string): any; removeEventListener(type: string, listener: any, useCapture: boolean): void; @@ -30599,11 +30551,11 @@ declare namespace MSHTML { setInterval(expression: any, msec: number, language?: any): number; setTimeout(expression: any, msec: number, language?: any): number; - /** @param string [features=''] */ + /** @param features [features=''] */ showHelp(helpURL: string, helpArg: any, features?: string): void; showModalDialog(dialog: string, varArgIn?: any, varOptions?: any): any; - /** @param string [url=''] */ + /** @param url [url=''] */ showModelessDialog(url?: string, varArgIn?: any, options?: any): IHTMLWindow2; status: string; readonly styleMedia: IHTMLStyleMedia; @@ -30611,6 +30563,7 @@ declare namespace MSHTML { toStaticHTML(bstrHTML: string): string; toString(): string; readonly window: IHTMLWindow2; + (pvarIndex: any): any; } class HTMLWndOptionElement { @@ -30689,7 +30642,7 @@ declare namespace MSHTML { readonly form: IHTMLFormElement; getAdjacentText(where: string): string; - /** @param number [lFlags=0] */ + /** @param lFlags [lFlags=0] */ getAttribute(strAttributeName: string, lFlags?: number): any; getAttributeNode(bstrName: string): IHTMLDOMAttribute; getAttributeNodeNS(pvarNS: any, bstrName: string): IHTMLDOMAttribute2; @@ -30893,7 +30846,7 @@ declare namespace MSHTML { readonly recordNumber: any; releaseCapture(): void; - /** @param number [lFlags=1] */ + /** @param lFlags [lFlags=1] */ removeAttribute(strAttributeName: string, lFlags?: number): boolean; removeAttributeNode(pattr: IHTMLDOMAttribute): IHTMLDOMAttribute; removeAttributeNS(pvarNS: any, strAttributeName: string): void; @@ -30902,7 +30855,7 @@ declare namespace MSHTML { removeExpression(propname: string): boolean; removeFilter(pUnk: any): void; - /** @param boolean [fDeep=false] */ + /** @param fDeep [fDeep=false] */ removeNode(fDeep?: boolean): IHTMLDOMNode; replaceAdjacentText(where: string, newText: string): string; replaceChild(newChild: IHTMLDOMNode, oldChild: IHTMLDOMNode): IHTMLDOMNode; @@ -30918,16 +30871,16 @@ declare namespace MSHTML { selected: boolean; setActive(): void; - /** @param number [lFlags=1] */ + /** @param lFlags [lFlags=1] */ setAttribute(strAttributeName: string, AttributeValue: any, lFlags?: number): void; setAttributeNode(pattr: IHTMLDOMAttribute): IHTMLDOMAttribute; setAttributeNodeNS(pattr: IHTMLDOMAttribute2): IHTMLDOMAttribute2; setAttributeNS(pvarNS: any, strAttributeName: string, pvarAttributeValue: any): void; - /** @param boolean [containerCapture=true] */ + /** @param containerCapture [containerCapture=true] */ setCapture(containerCapture?: boolean): void; - /** @param string [language=''] */ + /** @param language [language=''] */ setExpression(propname: string, expression: string, language?: string): void; readonly sourceIndex: number; spellcheck: any; @@ -30946,9 +30899,7 @@ declare namespace MSHTML { xmsAcceleratorKey: string; } - class HTMLWndSelectElement { - private 'MSHTML.HTMLWndSelectElement_typekey': HTMLWndSelectElement; - private constructor(); + interface HTMLWndSelectElement { accessKey: string; add(element: IHTMLElement, before?: any): void; addBehavior(bstrURL: string, pvarFactory?: any): number; @@ -31022,7 +30973,7 @@ declare namespace MSHTML { readonly form: IHTMLFormElement; getAdjacentText(where: string): string; - /** @param number [lFlags=0] */ + /** @param lFlags [lFlags=0] */ getAttribute(strAttributeName: string, lFlags?: number): any; getAttributeNode(bstrName: string): IHTMLDOMAttribute; getAttributeNodeNS(pvarNS: any, bstrName: string): IHTMLDOMAttribute2; @@ -31230,10 +31181,10 @@ declare namespace MSHTML { readonly recordNumber: any; releaseCapture(): void; - /** @param number [index=-1] */ + /** @param index [index=-1] */ remove(index?: number): void; - /** @param number [lFlags=1] */ + /** @param lFlags [lFlags=1] */ removeAttribute(strAttributeName: string, lFlags?: number): boolean; removeAttributeNode(pattr: IHTMLDOMAttribute): IHTMLDOMAttribute; removeAttributeNS(pvarNS: any, strAttributeName: string): void; @@ -31242,7 +31193,7 @@ declare namespace MSHTML { removeExpression(propname: string): boolean; removeFilter(pUnk: any): void; - /** @param boolean [fDeep=false] */ + /** @param fDeep [fDeep=false] */ removeNode(fDeep?: boolean): IHTMLDOMNode; replaceAdjacentText(where: string, newText: string): string; replaceChild(newChild: IHTMLDOMNode, oldChild: IHTMLDOMNode): IHTMLDOMNode; @@ -31258,16 +31209,16 @@ declare namespace MSHTML { selectedIndex: number; setActive(): void; - /** @param number [lFlags=1] */ + /** @param lFlags [lFlags=1] */ setAttribute(strAttributeName: string, AttributeValue: any, lFlags?: number): void; setAttributeNode(pattr: IHTMLDOMAttribute): IHTMLDOMAttribute; setAttributeNodeNS(pattr: IHTMLDOMAttribute2): IHTMLDOMAttribute2; setAttributeNS(pvarNS: any, strAttributeName: string, pvarAttributeValue: any): void; - /** @param boolean [containerCapture=true] */ + /** @param containerCapture [containerCapture=true] */ setCapture(containerCapture?: boolean): void; - /** @param string [language=''] */ + /** @param language [language=''] */ setExpression(propname: string, expression: string, language?: string): void; size: number; readonly sourceIndex: number; @@ -31287,6 +31238,7 @@ declare namespace MSHTML { urns(urn: any): any; value: string; xmsAcceleratorKey: string; + (name?: any, index?: any): any; } class HTMLXMLHttpRequest { @@ -31313,10 +31265,9 @@ declare namespace MSHTML { timeout: number; } - class HTMLXMLHttpRequestFactory { - private 'MSHTML.HTMLXMLHttpRequestFactory_typekey': HTMLXMLHttpRequestFactory; - private constructor(); + interface HTMLXMLHttpRequestFactory { create(): IHTMLXMLHttpRequest; + (): IHTMLXMLHttpRequest; } class ICanvasGradient { @@ -31485,16 +31436,16 @@ declare namespace MSHTML { removeEventListener(type: string, listener: any, useCapture: boolean): void; } - class IHTMLAreasCollection { - private 'MSHTML.IHTMLAreasCollection_typekey': IHTMLAreasCollection; - private constructor(); + // tslint:disable-next-line:interface-name + interface IHTMLAreasCollection { add(element: IHTMLElement, before?: any): void; item(name?: any, index?: any): any; length: number; - /** @param number [index=-1] */ + /** @param index [index=-1] */ remove(index?: number): void; tags(tagName: any): any; + (name?: any, index?: any): any; } class IHTMLAttributeCollection3 { @@ -31512,11 +31463,11 @@ declare namespace MSHTML { private constructor(); } - class IHTMLBookmarkCollection { - private 'MSHTML.IHTMLBookmarkCollection_typekey': IHTMLBookmarkCollection; - private constructor(); + // tslint:disable-next-line:interface-name + interface IHTMLBookmarkCollection { item(index: number): any; readonly length: number; + (index: number): any; } class IHTMLCanvasElement { @@ -31537,9 +31488,8 @@ declare namespace MSHTML { readonly type: number; } - class IHTMLCSSStyleDeclaration { - private 'MSHTML.IHTMLCSSStyleDeclaration_typekey': IHTMLCSSStyleDeclaration; - private constructor(); + // tslint:disable-next-line:interface-name + interface IHTMLCSSStyleDeclaration { accelerator: string; alignmentBaseline: string; background: string; @@ -31693,7 +31643,7 @@ declare namespace MSHTML { scrollbarShadowColor: any; scrollbarTrackColor: any; - /** @param any [pvarPropertyPriority=''] */ + /** @param pvarPropertyPriority [pvarPropertyPriority=''] */ setProperty(bstrPropertyName: string, pvarPropertyValue: any, pvarPropertyPriority?: any): void; stopColor: any; stopOpacity: any; @@ -31733,6 +31683,7 @@ declare namespace MSHTML { writingMode: string; zIndex: any; zoom: any; + (index: number): string; } class IHTMLCurrentStyle { @@ -31779,7 +31730,7 @@ declare namespace MSHTML { readonly fontVariant: string; readonly fontWeight: any; - /** @param number [lFlags=0] */ + /** @param lFlags [lFlags=0] */ getAttribute(strAttributeName: string, lFlags?: number): any; readonly height: any; readonly imeMode: string; @@ -31866,8 +31817,8 @@ declare namespace MSHTML { createElement(eTag: string): IHTMLElement; /** - * @param string [bstrHref=''] - * @param number [lIndex=-1] + * @param bstrHref [bstrHref=''] + * @param lIndex [lIndex=-1] */ createStyleSheet(bstrHref?: string, lIndex?: number): IHTMLStyleSheet; defaultCharset: string; @@ -31876,7 +31827,7 @@ declare namespace MSHTML { elementFromPoint(x: number, y: number): IHTMLElement; readonly embeds: IHTMLElementCollection; - /** @param boolean [showUI=false] */ + /** @param showUI [showUI=false] */ execCommand(cmdID: string, showUI?: boolean, value?: any): boolean; execCommandShowHelp(cmdID: string): boolean; expando: boolean; @@ -31914,7 +31865,7 @@ declare namespace MSHTML { onrowexit: any; onselectstart: any; - /** @param string [url='text/html'] */ + /** @param url [url='text/html'] */ open(url?: string, name?: any, features?: any, replace?: any): any; readonly parentWindow: IHTMLWindow2; readonly plugins: IHTMLElementCollection; @@ -32014,11 +31965,11 @@ declare namespace MSHTML { readonly version: string; } - class IHTMLDocumentCompatibleInfoCollection { - private 'MSHTML.IHTMLDocumentCompatibleInfoCollection_typekey': IHTMLDocumentCompatibleInfoCollection; - private constructor(); + // tslint:disable-next-line:interface-name + interface IHTMLDocumentCompatibleInfoCollection { item(index: number): IHTMLDocumentCompatibleInfo; readonly length: number; + (index: number): IHTMLDocumentCompatibleInfo; } class IHTMLDOMAttribute { @@ -32052,11 +32003,11 @@ declare namespace MSHTML { value: string; } - class IHTMLDOMChildrenCollection { - private 'MSHTML.IHTMLDOMChildrenCollection_typekey': IHTMLDOMChildrenCollection; - private constructor(); + // tslint:disable-next-line:interface-name + interface IHTMLDOMChildrenCollection { item(index: number): any; readonly length: number; + (index: number): any; } class IHTMLDOMImplementation { @@ -32084,7 +32035,7 @@ declare namespace MSHTML { readonly previousSibling: IHTMLDOMNode; removeChild(oldChild: IHTMLDOMNode): IHTMLDOMNode; - /** @param boolean [fDeep=false] */ + /** @param fDeep [fDeep=false] */ removeNode(fDeep?: boolean): IHTMLDOMNode; replaceChild(newChild: IHTMLDOMNode, oldChild: IHTMLDOMNode): IHTMLDOMNode; replaceNode(replacement: IHTMLDOMNode): IHTMLDOMNode; @@ -32153,7 +32104,7 @@ declare namespace MSHTML { readonly document: any; readonly filters: IHTMLFiltersCollection; - /** @param number [lFlags=0] */ + /** @param lFlags [lFlags=0] */ getAttribute(strAttributeName: string, lFlags?: number): any; id: string; innerHTML: string; @@ -32196,11 +32147,11 @@ declare namespace MSHTML { readonly parentTextEdit: IHTMLElement; readonly recordNumber: any; - /** @param number [lFlags=1] */ + /** @param lFlags [lFlags=1] */ removeAttribute(strAttributeName: string, lFlags?: number): boolean; scrollIntoView(varargStart?: any): void; - /** @param number [lFlags=1] */ + /** @param lFlags [lFlags=1] */ setAttribute(strAttributeName: string, AttributeValue: any, lFlags?: number): void; readonly sourceIndex: number; readonly style: IHTMLStyle; @@ -32276,22 +32227,22 @@ declare namespace MSHTML { scrollTop: number; readonly scrollWidth: number; - /** @param boolean [containerCapture=true] */ + /** @param containerCapture [containerCapture=true] */ setCapture(containerCapture?: boolean): void; - /** @param string [language=''] */ + /** @param language [language=''] */ setExpression(propname: string, expression: string, language?: string): void; tabIndex: number; tagUrn: string; } - class IHTMLElementCollection { - private 'MSHTML.IHTMLElementCollection_typekey': IHTMLElementCollection; - private constructor(); - item(name?: string | number, index?: number): any; + // tslint:disable-next-line:interface-name + interface IHTMLElementCollection { + item(name?: any, index?: any): any; length: number; tags(tagName: any): any; toString(): string; + (name?: any, index?: any): any; } class IHTMLEventObj { @@ -32321,16 +32272,15 @@ declare namespace MSHTML { readonly y: number; } - class IHTMLFiltersCollection { - private 'MSHTML.IHTMLFiltersCollection_typekey': IHTMLFiltersCollection; - private constructor(); + // tslint:disable-next-line:interface-name + interface IHTMLFiltersCollection { item(pvarIndex: any): any; readonly length: number; + (pvarIndex: any): any; } - class IHTMLFormElement { - private 'MSHTML.IHTMLFormElement_typekey': IHTMLFormElement; - private constructor(); + // tslint:disable-next-line:interface-name + interface IHTMLFormElement { action: string; dir: string; readonly elements: any; @@ -32345,6 +32295,7 @@ declare namespace MSHTML { submit(): void; tags(tagName: any): any; target: string; + (name?: any, index?: any): any; } class IHTMLFrameBase { @@ -32407,7 +32358,7 @@ declare namespace MSHTML { port: string; protocol: string; - /** @param boolean [flag=false] */ + /** @param flag [flag=false] */ reload(flag?: boolean): void; replace(bstr: string): void; search: string; @@ -32480,7 +32431,7 @@ declare namespace MSHTML { private constructor(); readonly length: number; - /** @param boolean [reload=false] */ + /** @param reload [reload=false] */ refresh(reload?: boolean): void; } @@ -32493,11 +32444,11 @@ declare namespace MSHTML { top: number; } - class IHTMLRectCollection { - private 'MSHTML.IHTMLRectCollection_typekey': IHTMLRectCollection; - private constructor(); + // tslint:disable-next-line:interface-name + interface IHTMLRectCollection { item(pvarIndex: any): any; readonly length: number; + (pvarIndex: any): any; } class IHTMLRenderStyle { @@ -32559,7 +32510,7 @@ declare namespace MSHTML { fontVariant: string; fontWeight: string; - /** @param number [lFlags=0] */ + /** @param lFlags [lFlags=0] */ getAttribute(strAttributeName: string, lFlags?: number): any; height: any; left: any; @@ -32584,10 +32535,10 @@ declare namespace MSHTML { pageBreakBefore: string; readonly position: string; - /** @param number [lFlags=1] */ + /** @param lFlags [lFlags=1] */ removeAttribute(strAttributeName: string, lFlags?: number): boolean; - /** @param number [lFlags=1] */ + /** @param lFlags [lFlags=1] */ setAttribute(strAttributeName: string, AttributeValue: any, lFlags?: number): void; styleFloat: string; textAlign: string; @@ -32708,7 +32659,7 @@ declare namespace MSHTML { fontVariant: string; fontWeight: string; - /** @param number [lFlags=0] */ + /** @param lFlags [lFlags=0] */ getAttribute(strAttributeName: string, lFlags?: number): any; height: any; left: any; @@ -32741,10 +32692,10 @@ declare namespace MSHTML { posTop: number; posWidth: number; - /** @param number [lFlags=1] */ + /** @param lFlags [lFlags=1] */ removeAttribute(strAttributeName: string, lFlags?: number): boolean; - /** @param number [lFlags=1] */ + /** @param lFlags [lFlags=1] */ setAttribute(strAttributeName: string, AttributeValue: any, lFlags?: number): void; styleFloat: string; textAlign: string; @@ -32777,10 +32728,10 @@ declare namespace MSHTML { private 'MSHTML.IHTMLStyleSheet_typekey': IHTMLStyleSheet; private constructor(); - /** @param number [lIndex=-1] */ + /** @param lIndex [lIndex=-1] */ addImport(bstrURL: string, lIndex?: number): number; - /** @param number [lIndex=-1] */ + /** @param lIndex [lIndex=-1] */ addRule(bstrSelector: string, bstrStyle: string, lIndex?: number): number; cssText: string; disabled: boolean; @@ -32805,11 +32756,11 @@ declare namespace MSHTML { readonly selector: string; } - class IHTMLStyleSheetPagesCollection { - private 'MSHTML.IHTMLStyleSheetPagesCollection_typekey': IHTMLStyleSheetPagesCollection; - private constructor(); + // tslint:disable-next-line:interface-name + interface IHTMLStyleSheetPagesCollection { item(index: number): IHTMLStyleSheetPage; readonly length: number; + (index: number): IHTMLStyleSheetPage; } class IHTMLStyleSheetRule { @@ -32820,28 +32771,28 @@ declare namespace MSHTML { readonly style: IHTMLRuleStyle; } - class IHTMLStyleSheetRulesAppliedCollection { - private 'MSHTML.IHTMLStyleSheetRulesAppliedCollection_typekey': IHTMLStyleSheetRulesAppliedCollection; - private constructor(); + // tslint:disable-next-line:interface-name + interface IHTMLStyleSheetRulesAppliedCollection { item(index: number): IHTMLStyleSheetRule; readonly length: number; propertyAppliedBy(name: string): IHTMLStyleSheetRule; propertyAppliedTrace(name: string, index: number): IHTMLStyleSheetRule; propertyAppliedTraceLength(name: string): number; + (index: number): IHTMLStyleSheetRule; } - class IHTMLStyleSheetRulesCollection { - private 'MSHTML.IHTMLStyleSheetRulesCollection_typekey': IHTMLStyleSheetRulesCollection; - private constructor(); + // tslint:disable-next-line:interface-name + interface IHTMLStyleSheetRulesCollection { item(index: number): IHTMLStyleSheetRule; readonly length: number; + (index: number): IHTMLStyleSheetRule; } - class IHTMLStyleSheetsCollection { - private 'MSHTML.IHTMLStyleSheetsCollection_typekey': IHTMLStyleSheetsCollection; - private constructor(); + // tslint:disable-next-line:interface-name + interface IHTMLStyleSheetsCollection { item(pvarIndex: any): any; readonly length: number; + (pvarIndex: any): any; } class IHTMLTableCaption { @@ -32857,10 +32808,10 @@ declare namespace MSHTML { align: string; bgColor: any; - /** @param number [index=-1] */ + /** @param index [index=-1] */ deleteRow(index?: number): void; - /** @param number [index=-1] */ + /** @param index [index=-1] */ insertRow(index?: number): any; readonly rows: IHTMLElementCollection; vAlign: string; @@ -32878,19 +32829,19 @@ declare namespace MSHTML { private 'MSHTML.IHTMLTxtRange_typekey': IHTMLTxtRange; private constructor(); - /** @param boolean [start=true] */ + /** @param start [start=true] */ collapse(start?: boolean): void; compareEndPoints(how: string, sourceRange: IHTMLTxtRange): number; duplicate(): IHTMLTxtRange; - /** @param boolean [showUI=false] */ + /** @param showUI [showUI=false] */ execCommand(cmdID: string, showUI?: boolean, value?: any): boolean; execCommandShowHelp(cmdID: string): boolean; expand(Unit: string): boolean; /** - * @param number [Count=1073741823] - * @param number [flags=0] + * @param Count [Count=1073741823] + * @param flags [flags=0] */ findText(String: string, Count?: number, flags?: number): boolean; getBookmark(): string; @@ -32898,13 +32849,13 @@ declare namespace MSHTML { inRange(range: IHTMLTxtRange): boolean; isEqual(range: IHTMLTxtRange): boolean; - /** @param number [Count=1] */ + /** @param Count [Count=1] */ move(Unit: string, Count?: number): number; - /** @param number [Count=1] */ + /** @param Count [Count=1] */ moveEnd(Unit: string, Count?: number): number; - /** @param number [Count=1] */ + /** @param Count [Count=1] */ moveStart(Unit: string, Count?: number): number; moveToBookmark(Bookmark: string): boolean; moveToElementText(element: IHTMLElement): void; @@ -32918,18 +32869,16 @@ declare namespace MSHTML { queryCommandText(cmdID: string): string; queryCommandValue(cmdID: string): any; - /** @param boolean [fStart=true] */ + /** @param fStart [fStart=true] */ scrollIntoView(fStart?: boolean): void; select(): void; setEndPoint(how: string, sourceRange: IHTMLTxtRange): void; text: string; } - class IHTMLWindow2 { - private 'MSHTML.IHTMLWindow2_typekey': IHTMLWindow2; - private constructor(); - - /** @param string [message=''] */ + // tslint:disable-next-line:interface-name + interface IHTMLWindow2 { + /** @param message [message=''] */ alert(message?: string): void; blur(): void; clearInterval(timerID: number): void; @@ -32938,13 +32887,13 @@ declare namespace MSHTML { close(): void; readonly closed: boolean; - /** @param string [message=''] */ + /** @param message [message=''] */ confirm(message?: string): boolean; defaultStatus: string; readonly document: IHTMLDocument2; readonly event: IHTMLEventObj; - /** @param string [language='JScript'] */ + /** @param language [language='JScript'] */ execScript(code: string, language?: string): any; readonly external: any; focus(): void; @@ -32971,10 +32920,10 @@ declare namespace MSHTML { onunload: any; /** - * @param string [url=''] - * @param string [name=''] - * @param string [features=''] - * @param boolean [replace=false] + * @param url [url=''] + * @param name [name=''] + * @param features [features=''] + * @param replace [replace=false] */ open(url?: string, name?: string, features?: string, replace?: boolean): IHTMLWindow2; opener: any; @@ -32982,8 +32931,8 @@ declare namespace MSHTML { readonly parent: IHTMLWindow2; /** - * @param string [message=''] - * @param string [defstr='undefined'] + * @param message [message=''] + * @param defstr [defstr='undefined'] */ prompt(message?: string, defstr?: string): any; resizeBy(x: number, y: number): void; @@ -32996,13 +32945,14 @@ declare namespace MSHTML { setInterval(expression: string, msec: number, language?: any): number; setTimeout(expression: string, msec: number, language?: any): number; - /** @param string [features=''] */ + /** @param features [features=''] */ showHelp(helpURL: string, helpArg: any, features?: string): void; showModalDialog(dialog: string, varArgIn?: any, varOptions?: any): any; status: string; readonly top: IHTMLWindow2; toString(): string; readonly window: IHTMLWindow2; + (pvarIndex: any): any; } class IHTMLXDomainRequest { @@ -33398,8 +33348,8 @@ declare namespace MSHTML { createRenderStyle(v: string): IHTMLRenderStyle; /** - * @param string [bstrHref=''] - * @param number [lIndex=-1] + * @param bstrHref [bstrHref=''] + * @param lIndex [lIndex=-1] */ createStyleSheet(bstrHref?: string, lIndex?: number): IHTMLStyleSheet; createTextNode(text: string): IHTMLDOMNode; @@ -33419,7 +33369,7 @@ declare namespace MSHTML { elementsFromRect(left: number, top: number, width: number, height: number): IHTMLDOMChildrenCollection; readonly embeds: IHTMLElementCollection; - /** @param boolean [showUI=false] */ + /** @param showUI [showUI=false] */ execCommand(cmdID: string, showUI?: boolean, value?: any): boolean; execCommandShowHelp(cmdID: string): boolean; expando: boolean; @@ -33577,7 +33527,7 @@ declare namespace MSHTML { onvolumechange: any; onwaiting: any; - /** @param string [url='text/html'] */ + /** @param url [url='text/html'] */ open(url?: string, name?: any, features?: any, replace?: any): any; readonly ownerDocument: any; readonly parentNode: IHTMLDOMNode; @@ -33596,14 +33546,14 @@ declare namespace MSHTML { querySelectorAll(v: string): IHTMLDOMChildrenCollection; readonly readyState: string; - /** @param boolean [fForce=false] */ + /** @param fForce [fForce=false] */ recalc(fForce?: boolean): void; readonly referrer: string; releaseCapture(): void; removeChild(oldChild: IHTMLDOMNode): IHTMLDOMNode; removeEventListener(type: string, listener: any, useCapture: boolean): void; - /** @param boolean [fDeep=false] */ + /** @param fDeep [fDeep=false] */ removeNode(fDeep?: boolean): IHTMLDOMNode; replaceChild(newChild: IHTMLDOMNode, oldChild: IHTMLDOMNode): IHTMLDOMNode; replaceNode(replacement: IHTMLDOMNode): IHTMLDOMNode; @@ -33629,9 +33579,7 @@ declare namespace MSHTML { xmlVersion: string; } - class OldHTMLFormElement { - private 'MSHTML.OldHTMLFormElement_typekey': OldHTMLFormElement; - private constructor(); + interface OldHTMLFormElement { acceptCharset: string; accessKey: string; action: string; @@ -33642,14 +33590,14 @@ declare namespace MSHTML { appendItemSeparator(): void; /** - * @param string [name=''] - * @param string [filename=''] + * @param name [name=''] + * @param filename [filename=''] */ appendNameFilePair(name?: string, filename?: string): void; /** - * @param string [name=''] - * @param string [value=''] + * @param name [name=''] + * @param value [value=''] */ appendNameValuePair(name?: string, value?: string): void; applyElement(apply: IHTMLElement, where: string): IHTMLElement; @@ -33716,7 +33664,7 @@ declare namespace MSHTML { focus(): void; getAdjacentText(where: string): string; - /** @param number [lFlags=0] */ + /** @param lFlags [lFlags=0] */ getAttribute(strAttributeName: string, lFlags?: number): any; getAttributeNode(bstrName: string): IHTMLDOMAttribute; getAttributeNodeNS(pvarNS: any, bstrName: string): IHTMLDOMAttribute2; @@ -33909,7 +33857,7 @@ declare namespace MSHTML { readonly recordNumber: any; releaseCapture(): void; - /** @param number [lFlags=1] */ + /** @param lFlags [lFlags=1] */ removeAttribute(strAttributeName: string, lFlags?: number): boolean; removeAttributeNode(pattr: IHTMLDOMAttribute): IHTMLDOMAttribute; removeAttributeNS(pvarNS: any, strAttributeName: string): void; @@ -33918,7 +33866,7 @@ declare namespace MSHTML { removeExpression(propname: string): boolean; removeFilter(pUnk: any): void; - /** @param boolean [fDeep=false] */ + /** @param fDeep [fDeep=false] */ removeNode(fDeep?: boolean): IHTMLDOMNode; replaceAdjacentText(where: string, newText: string): string; replaceChild(newChild: IHTMLDOMNode, oldChild: IHTMLDOMNode): IHTMLDOMNode; @@ -33934,16 +33882,16 @@ declare namespace MSHTML { readonly scrollWidth: number; setActive(): void; - /** @param number [lFlags=1] */ + /** @param lFlags [lFlags=1] */ setAttribute(strAttributeName: string, AttributeValue: any, lFlags?: number): void; setAttributeNode(pattr: IHTMLDOMAttribute): IHTMLDOMAttribute; setAttributeNodeNS(pattr: IHTMLDOMAttribute2): IHTMLDOMAttribute2; setAttributeNS(pvarNS: any, strAttributeName: string, pvarAttributeValue: any): void; - /** @param boolean [containerCapture=true] */ + /** @param containerCapture [containerCapture=true] */ setCapture(containerCapture?: boolean): void; - /** @param string [language=''] */ + /** @param language [language=''] */ setExpression(propname: string, expression: string, language?: string): void; readonly sourceIndex: number; spellcheck: any; @@ -33961,6 +33909,7 @@ declare namespace MSHTML { readonly uniqueNumber: number; urns(urn: any): any; xmsAcceleratorKey: string; + (name?: any, index?: any): any; } class RangeException { @@ -33981,9 +33930,7 @@ declare namespace MSHTML { propertyIsInline(name: string): boolean; } - class RulesAppliedCollection { - private 'MSHTML.RulesAppliedCollection_typekey': RulesAppliedCollection; - private constructor(); + interface RulesAppliedCollection { readonly element: IHTMLElement; item(index: number): IRulesApplied; readonly length: number; @@ -33992,6 +33939,7 @@ declare namespace MSHTML { propertyInheritedFrom(name: string): IRulesApplied; propertyInheritedTrace(name: string, index: number): IRulesApplied; propertyInheritedTraceLength(name: string): number; + (index: number): IRulesApplied; } class Scriptlet { @@ -34005,12 +33953,11 @@ declare namespace MSHTML { url: string; } - class StaticNodeList { - private 'MSHTML.StaticNodeList_typekey': StaticNodeList; - private constructor(); + interface StaticNodeList { readonly 'constructor': any; item(index: number): any; readonly length: number; + (index: number): any; } class SVGAElement { @@ -34230,7 +34177,7 @@ declare namespace MSHTML { readonly filters: IHTMLFiltersCollection; focusable: SVGAnimatedEnumeration; - /** @param number [lFlags=0] */ + /** @param lFlags [lFlags=0] */ getAttribute(strAttributeName: string, lFlags?: number): any; id: string; innerHTML: string; @@ -34274,11 +34221,11 @@ declare namespace MSHTML { readonly parentTextEdit: IHTMLElement; readonly recordNumber: any; - /** @param number [lFlags=1] */ + /** @param lFlags [lFlags=1] */ removeAttribute(strAttributeName: string, lFlags?: number): boolean; scrollIntoView(varargStart?: any): void; - /** @param number [lFlags=1] */ + /** @param lFlags [lFlags=1] */ setAttribute(strAttributeName: string, AttributeValue: any, lFlags?: number): void; readonly sourceIndex: number; readonly style: IHTMLStyle; @@ -35487,10 +35434,9 @@ declare namespace MSHTML { readonly 'constructor': any; } - class XDomainRequestFactory { - private 'MSHTML.XDomainRequestFactory_typekey': XDomainRequestFactory; - private constructor(); + interface XDomainRequestFactory { create(): IHTMLXDomainRequest; + (): IHTMLXDomainRequest; } class XMLHttpRequestEventTarget { @@ -35510,983 +35456,120 @@ declare namespace MSHTML { interface ActiveXObject { on(obj: MSHTML.HTMLNamespace, event: 'onreadystatechange', argNames: ['pEvtObj'], handler: (this: MSHTML.HTMLNamespace, parameter: {readonly pEvtObj: MSHTML.IHTMLEventObj}) => void): void; - on( - obj: MSHTML.HTMLWindow2, event: 'onerror', argNames: ['description', 'url', 'line'], handler: ( - this: MSHTML.HTMLWindow2, parameter: {readonly description: string, readonly url: string, readonly line: number}) => void): void; - on( - obj: MSHTML.HTMLWindowProxy, event: 'onerror', argNames: ['description', 'url', 'line'], handler: ( - this: MSHTML.HTMLWindowProxy, parameter: {readonly description: string, readonly url: string, readonly line: number}) => void): void; + on(obj: MSHTML.HTMLWindow2, event: 'onerror', argNames: ['description', 'url', 'line'], handler: (this: MSHTML.HTMLWindow2, parameter: {readonly description: string, readonly url: string, readonly line: number}) => void): void; + on(obj: MSHTML.HTMLWindowProxy, event: 'onerror', argNames: ['description', 'url', 'line'], handler: (this: MSHTML.HTMLWindowProxy, parameter: {readonly description: string, readonly url: string, readonly line: number}) => void): void; on(obj: MSHTML.Scriptlet, event: 'onscriptletevent', argNames: ['name', 'eventData'], handler: (this: MSHTML.Scriptlet, parameter: {readonly name: string, readonly eventData: any}) => void): void; - on( - obj: MSHTML.HTMLAnchorElement, event: 'onactivate' | 'onafterupdate' | 'onbeforeactivate' | 'onbeforecopy' | 'onbeforecut' | 'onbeforedeactivate' | - 'onbeforeeditfocus' | 'onbeforepaste' | 'onbeforeupdate' | 'onblur' | 'oncellchange' | 'onclick' | 'oncontextmenu' | 'oncontrolselect' | 'oncopy' | 'oncut' | - 'ondataavailable' | 'ondatasetchanged' | 'ondatasetcomplete' | 'ondblclick' | 'ondeactivate' | 'ondrag' | 'ondragend' | 'ondragenter' | 'ondragleave' | - 'ondragover' | 'ondragstart' | 'ondrop' | 'onerrorupdate' | 'onfilterchange' | 'onfocus' | 'onfocusin' | 'onfocusout' | 'onhelp' | 'onkeydown' | 'onkeypress' | - 'onkeyup' | 'onlayoutcomplete' | 'onlosecapture' | 'onmousedown' | 'onmouseenter' | 'onmouseleave' | 'onmousemove' | 'onmouseout' | 'onmouseover' | 'onmouseup' | - 'onmousewheel' | 'onmove' | 'onmoveend' | 'onmovestart' | 'onpage' | 'onpaste' | 'onpropertychange' | 'onreadystatechange' | 'onresize' | 'onresizeend' | - 'onresizestart' | 'onrowenter' | 'onrowexit' | 'onrowsdelete' | 'onrowsinserted' | 'onscroll' | 'onselectstart', - handler: (this: MSHTML.HTMLAnchorElement, parameter: {}) => void): void; - on( - obj: MSHTML.HTMLAreaElement, event: 'onactivate' | 'onafterupdate' | 'onbeforeactivate' | 'onbeforecopy' | 'onbeforecut' | 'onbeforedeactivate' | - 'onbeforeeditfocus' | 'onbeforepaste' | 'onbeforeupdate' | 'onblur' | 'oncellchange' | 'onclick' | 'oncontextmenu' | 'oncontrolselect' | 'oncopy' | 'oncut' | - 'ondataavailable' | 'ondatasetchanged' | 'ondatasetcomplete' | 'ondblclick' | 'ondeactivate' | 'ondrag' | 'ondragend' | 'ondragenter' | 'ondragleave' | - 'ondragover' | 'ondragstart' | 'ondrop' | 'onerrorupdate' | 'onfilterchange' | 'onfocus' | 'onfocusin' | 'onfocusout' | 'onhelp' | 'onkeydown' | 'onkeypress' | - 'onkeyup' | 'onlayoutcomplete' | 'onlosecapture' | 'onmousedown' | 'onmouseenter' | 'onmouseleave' | 'onmousemove' | 'onmouseout' | 'onmouseover' | 'onmouseup' | - 'onmousewheel' | 'onmove' | 'onmoveend' | 'onmovestart' | 'onpage' | 'onpaste' | 'onpropertychange' | 'onreadystatechange' | 'onresize' | 'onresizeend' | - 'onresizestart' | 'onrowenter' | 'onrowexit' | 'onrowsdelete' | 'onrowsinserted' | 'onscroll' | 'onselectstart', - handler: (this: MSHTML.HTMLAreaElement, parameter: {}) => void): void; - on( - obj: MSHTML.HTMLAudioElement, event: 'onactivate' | 'onafterupdate' | 'onbeforeactivate' | 'onbeforecopy' | 'onbeforecut' | 'onbeforedeactivate' | - 'onbeforeeditfocus' | 'onbeforepaste' | 'onbeforeupdate' | 'onblur' | 'oncellchange' | 'onclick' | 'oncontextmenu' | 'oncontrolselect' | 'oncopy' | 'oncut' | - 'ondataavailable' | 'ondatasetchanged' | 'ondatasetcomplete' | 'ondblclick' | 'ondeactivate' | 'ondrag' | 'ondragend' | 'ondragenter' | 'ondragleave' | - 'ondragover' | 'ondragstart' | 'ondrop' | 'onerrorupdate' | 'onfilterchange' | 'onfocus' | 'onfocusin' | 'onfocusout' | 'onhelp' | 'onkeydown' | 'onkeypress' | - 'onkeyup' | 'onlayoutcomplete' | 'onlosecapture' | 'onmousedown' | 'onmouseenter' | 'onmouseleave' | 'onmousemove' | 'onmouseout' | 'onmouseover' | 'onmouseup' | - 'onmousewheel' | 'onmove' | 'onmoveend' | 'onmovestart' | 'onpage' | 'onpaste' | 'onpropertychange' | 'onreadystatechange' | 'onresize' | 'onresizeend' | - 'onresizestart' | 'onrowenter' | 'onrowexit' | 'onrowsdelete' | 'onrowsinserted' | 'onscroll' | 'onselectstart', - handler: (this: MSHTML.HTMLAudioElement, parameter: {}) => void): void; - on( - obj: MSHTML.HTMLBaseElement, event: 'onactivate' | 'onafterupdate' | 'onbeforeactivate' | 'onbeforecopy' | 'onbeforecut' | 'onbeforedeactivate' | - 'onbeforeeditfocus' | 'onbeforepaste' | 'onbeforeupdate' | 'onblur' | 'oncellchange' | 'onclick' | 'oncontextmenu' | 'oncontrolselect' | 'oncopy' | 'oncut' | - 'ondataavailable' | 'ondatasetchanged' | 'ondatasetcomplete' | 'ondblclick' | 'ondeactivate' | 'ondrag' | 'ondragend' | 'ondragenter' | 'ondragleave' | - 'ondragover' | 'ondragstart' | 'ondrop' | 'onerrorupdate' | 'onfilterchange' | 'onfocus' | 'onfocusin' | 'onfocusout' | 'onhelp' | 'onkeydown' | 'onkeypress' | - 'onkeyup' | 'onlayoutcomplete' | 'onlosecapture' | 'onmousedown' | 'onmouseenter' | 'onmouseleave' | 'onmousemove' | 'onmouseout' | 'onmouseover' | 'onmouseup' | - 'onmousewheel' | 'onmove' | 'onmoveend' | 'onmovestart' | 'onpage' | 'onpaste' | 'onpropertychange' | 'onreadystatechange' | 'onresize' | 'onresizeend' | - 'onresizestart' | 'onrowenter' | 'onrowexit' | 'onrowsdelete' | 'onrowsinserted' | 'onscroll' | 'onselectstart', - handler: (this: MSHTML.HTMLBaseElement, parameter: {}) => void): void; - on( - obj: MSHTML.HTMLBaseFontElement, event: 'onactivate' | 'onafterupdate' | 'onbeforeactivate' | 'onbeforecopy' | 'onbeforecut' | 'onbeforedeactivate' | - 'onbeforeeditfocus' | 'onbeforepaste' | 'onbeforeupdate' | 'onblur' | 'oncellchange' | 'onclick' | 'oncontextmenu' | 'oncontrolselect' | 'oncopy' | 'oncut' | - 'ondataavailable' | 'ondatasetchanged' | 'ondatasetcomplete' | 'ondblclick' | 'ondeactivate' | 'ondrag' | 'ondragend' | 'ondragenter' | 'ondragleave' | - 'ondragover' | 'ondragstart' | 'ondrop' | 'onerrorupdate' | 'onfilterchange' | 'onfocus' | 'onfocusin' | 'onfocusout' | 'onhelp' | 'onkeydown' | 'onkeypress' | - 'onkeyup' | 'onlayoutcomplete' | 'onlosecapture' | 'onmousedown' | 'onmouseenter' | 'onmouseleave' | 'onmousemove' | 'onmouseout' | 'onmouseover' | 'onmouseup' | - 'onmousewheel' | 'onmove' | 'onmoveend' | 'onmovestart' | 'onpage' | 'onpaste' | 'onpropertychange' | 'onreadystatechange' | 'onresize' | 'onresizeend' | - 'onresizestart' | 'onrowenter' | 'onrowexit' | 'onrowsdelete' | 'onrowsinserted' | 'onscroll' | 'onselectstart', - handler: (this: MSHTML.HTMLBaseFontElement, parameter: {}) => void): void; - on( - obj: MSHTML.HTMLBGsound, event: 'onactivate' | 'onafterupdate' | 'onbeforeactivate' | 'onbeforecopy' | 'onbeforecut' | 'onbeforedeactivate' | 'onbeforeeditfocus' | - 'onbeforepaste' | 'onbeforeupdate' | 'onblur' | 'oncellchange' | 'onclick' | 'oncontextmenu' | 'oncontrolselect' | 'oncopy' | 'oncut' | 'ondataavailable' | - 'ondatasetchanged' | 'ondatasetcomplete' | 'ondblclick' | 'ondeactivate' | 'ondrag' | 'ondragend' | 'ondragenter' | 'ondragleave' | 'ondragover' | 'ondragstart' | - 'ondrop' | 'onerrorupdate' | 'onfilterchange' | 'onfocus' | 'onfocusin' | 'onfocusout' | 'onhelp' | 'onkeydown' | 'onkeypress' | 'onkeyup' | 'onlayoutcomplete' | - 'onlosecapture' | 'onmousedown' | 'onmouseenter' | 'onmouseleave' | 'onmousemove' | 'onmouseout' | 'onmouseover' | 'onmouseup' | 'onmousewheel' | 'onmove' | - 'onmoveend' | 'onmovestart' | 'onpage' | 'onpaste' | 'onpropertychange' | 'onreadystatechange' | 'onresize' | 'onresizeend' | 'onresizestart' | 'onrowenter' | - 'onrowexit' | 'onrowsdelete' | 'onrowsinserted' | 'onscroll' | 'onselectstart', - handler: (this: MSHTML.HTMLBGsound, parameter: {}) => void): void; - on( - obj: MSHTML.HTMLBlockElement, event: 'onactivate' | 'onafterupdate' | 'onbeforeactivate' | 'onbeforecopy' | 'onbeforecut' | 'onbeforedeactivate' | - 'onbeforeeditfocus' | 'onbeforepaste' | 'onbeforeupdate' | 'onblur' | 'oncellchange' | 'onclick' | 'oncontextmenu' | 'oncontrolselect' | 'oncopy' | 'oncut' | - 'ondataavailable' | 'ondatasetchanged' | 'ondatasetcomplete' | 'ondblclick' | 'ondeactivate' | 'ondrag' | 'ondragend' | 'ondragenter' | 'ondragleave' | - 'ondragover' | 'ondragstart' | 'ondrop' | 'onerrorupdate' | 'onfilterchange' | 'onfocus' | 'onfocusin' | 'onfocusout' | 'onhelp' | 'onkeydown' | 'onkeypress' | - 'onkeyup' | 'onlayoutcomplete' | 'onlosecapture' | 'onmousedown' | 'onmouseenter' | 'onmouseleave' | 'onmousemove' | 'onmouseout' | 'onmouseover' | 'onmouseup' | - 'onmousewheel' | 'onmove' | 'onmoveend' | 'onmovestart' | 'onpage' | 'onpaste' | 'onpropertychange' | 'onreadystatechange' | 'onresize' | 'onresizeend' | - 'onresizestart' | 'onrowenter' | 'onrowexit' | 'onrowsdelete' | 'onrowsinserted' | 'onscroll' | 'onselectstart', - handler: (this: MSHTML.HTMLBlockElement, parameter: {}) => void): void; - on( - obj: MSHTML.HTMLBody, event: 'onactivate' | 'onafterupdate' | 'onbeforeactivate' | 'onbeforecopy' | 'onbeforecut' | 'onbeforedeactivate' | 'onbeforeeditfocus' | - 'onbeforepaste' | 'onbeforeupdate' | 'onblur' | 'oncellchange' | 'onchange' | 'onclick' | 'oncontextmenu' | 'oncontrolselect' | 'oncopy' | 'oncut' | - 'ondataavailable' | 'ondatasetchanged' | 'ondatasetcomplete' | 'ondblclick' | 'ondeactivate' | 'ondrag' | 'ondragend' | 'ondragenter' | 'ondragleave' | - 'ondragover' | 'ondragstart' | 'ondrop' | 'onerrorupdate' | 'onfilterchange' | 'onfocus' | 'onfocusin' | 'onfocusout' | 'onhelp' | 'onkeydown' | 'onkeypress' | - 'onkeyup' | 'onlayoutcomplete' | 'onlosecapture' | 'onmousedown' | 'onmouseenter' | 'onmouseleave' | 'onmousemove' | 'onmouseout' | 'onmouseover' | 'onmouseup' | - 'onmousewheel' | 'onmove' | 'onmoveend' | 'onmovestart' | 'onpage' | 'onpaste' | 'onpropertychange' | 'onreadystatechange' | 'onresize' | 'onresizeend' | - 'onresizestart' | 'onrowenter' | 'onrowexit' | 'onrowsdelete' | 'onrowsinserted' | 'onscroll' | 'onselect' | 'onselectstart', - handler: (this: MSHTML.HTMLBody, parameter: {}) => void): void; - on( - obj: MSHTML.HTMLBRElement, event: 'onactivate' | 'onafterupdate' | 'onbeforeactivate' | 'onbeforecopy' | 'onbeforecut' | 'onbeforedeactivate' | - 'onbeforeeditfocus' | 'onbeforepaste' | 'onbeforeupdate' | 'onblur' | 'oncellchange' | 'onclick' | 'oncontextmenu' | 'oncontrolselect' | 'oncopy' | 'oncut' | - 'ondataavailable' | 'ondatasetchanged' | 'ondatasetcomplete' | 'ondblclick' | 'ondeactivate' | 'ondrag' | 'ondragend' | 'ondragenter' | 'ondragleave' | - 'ondragover' | 'ondragstart' | 'ondrop' | 'onerrorupdate' | 'onfilterchange' | 'onfocus' | 'onfocusin' | 'onfocusout' | 'onhelp' | 'onkeydown' | 'onkeypress' | - 'onkeyup' | 'onlayoutcomplete' | 'onlosecapture' | 'onmousedown' | 'onmouseenter' | 'onmouseleave' | 'onmousemove' | 'onmouseout' | 'onmouseover' | 'onmouseup' | - 'onmousewheel' | 'onmove' | 'onmoveend' | 'onmovestart' | 'onpage' | 'onpaste' | 'onpropertychange' | 'onreadystatechange' | 'onresize' | 'onresizeend' | - 'onresizestart' | 'onrowenter' | 'onrowexit' | 'onrowsdelete' | 'onrowsinserted' | 'onscroll' | 'onselectstart', - handler: (this: MSHTML.HTMLBRElement, parameter: {}) => void): void; - on( - obj: MSHTML.HTMLButtonElement, event: 'onactivate' | 'onafterupdate' | 'onbeforeactivate' | 'onbeforecopy' | 'onbeforecut' | 'onbeforedeactivate' | - 'onbeforeeditfocus' | 'onbeforepaste' | 'onbeforeupdate' | 'onblur' | 'oncellchange' | 'onclick' | 'oncontextmenu' | 'oncontrolselect' | 'oncopy' | 'oncut' | - 'ondataavailable' | 'ondatasetchanged' | 'ondatasetcomplete' | 'ondblclick' | 'ondeactivate' | 'ondrag' | 'ondragend' | 'ondragenter' | 'ondragleave' | - 'ondragover' | 'ondragstart' | 'ondrop' | 'onerrorupdate' | 'onfilterchange' | 'onfocus' | 'onfocusin' | 'onfocusout' | 'onhelp' | 'onkeydown' | 'onkeypress' | - 'onkeyup' | 'onlayoutcomplete' | 'onlosecapture' | 'onmousedown' | 'onmouseenter' | 'onmouseleave' | 'onmousemove' | 'onmouseout' | 'onmouseover' | 'onmouseup' | - 'onmousewheel' | 'onmove' | 'onmoveend' | 'onmovestart' | 'onpage' | 'onpaste' | 'onpropertychange' | 'onreadystatechange' | 'onresize' | 'onresizeend' | - 'onresizestart' | 'onrowenter' | 'onrowexit' | 'onrowsdelete' | 'onrowsinserted' | 'onscroll' | 'onselectstart', - handler: (this: MSHTML.HTMLButtonElement, parameter: {}) => void): void; - on( - obj: MSHTML.HTMLCanvasElement, event: 'onactivate' | 'onafterupdate' | 'onbeforeactivate' | 'onbeforecopy' | 'onbeforecut' | 'onbeforedeactivate' | - 'onbeforeeditfocus' | 'onbeforepaste' | 'onbeforeupdate' | 'onblur' | 'oncellchange' | 'onclick' | 'oncontextmenu' | 'oncontrolselect' | 'oncopy' | 'oncut' | - 'ondataavailable' | 'ondatasetchanged' | 'ondatasetcomplete' | 'ondblclick' | 'ondeactivate' | 'ondrag' | 'ondragend' | 'ondragenter' | 'ondragleave' | - 'ondragover' | 'ondragstart' | 'ondrop' | 'onerrorupdate' | 'onfilterchange' | 'onfocus' | 'onfocusin' | 'onfocusout' | 'onhelp' | 'onkeydown' | 'onkeypress' | - 'onkeyup' | 'onlayoutcomplete' | 'onlosecapture' | 'onmousedown' | 'onmouseenter' | 'onmouseleave' | 'onmousemove' | 'onmouseout' | 'onmouseover' | 'onmouseup' | - 'onmousewheel' | 'onmove' | 'onmoveend' | 'onmovestart' | 'onpage' | 'onpaste' | 'onpropertychange' | 'onreadystatechange' | 'onresize' | 'onresizeend' | - 'onresizestart' | 'onrowenter' | 'onrowexit' | 'onrowsdelete' | 'onrowsinserted' | 'onscroll' | 'onselectstart', - handler: (this: MSHTML.HTMLCanvasElement, parameter: {}) => void): void; - on( - obj: MSHTML.HTMLCommentElement, event: 'onactivate' | 'onafterupdate' | 'onbeforeactivate' | 'onbeforecopy' | 'onbeforecut' | 'onbeforedeactivate' | - 'onbeforeeditfocus' | 'onbeforepaste' | 'onbeforeupdate' | 'onblur' | 'oncellchange' | 'onclick' | 'oncontextmenu' | 'oncontrolselect' | 'oncopy' | 'oncut' | - 'ondataavailable' | 'ondatasetchanged' | 'ondatasetcomplete' | 'ondblclick' | 'ondeactivate' | 'ondrag' | 'ondragend' | 'ondragenter' | 'ondragleave' | - 'ondragover' | 'ondragstart' | 'ondrop' | 'onerrorupdate' | 'onfilterchange' | 'onfocus' | 'onfocusin' | 'onfocusout' | 'onhelp' | 'onkeydown' | 'onkeypress' | - 'onkeyup' | 'onlayoutcomplete' | 'onlosecapture' | 'onmousedown' | 'onmouseenter' | 'onmouseleave' | 'onmousemove' | 'onmouseout' | 'onmouseover' | 'onmouseup' | - 'onmousewheel' | 'onmove' | 'onmoveend' | 'onmovestart' | 'onpage' | 'onpaste' | 'onpropertychange' | 'onreadystatechange' | 'onresize' | 'onresizeend' | - 'onresizestart' | 'onrowenter' | 'onrowexit' | 'onrowsdelete' | 'onrowsinserted' | 'onscroll' | 'onselectstart', - handler: (this: MSHTML.HTMLCommentElement, parameter: {}) => void): void; - on( - obj: MSHTML.HTMLDDElement, event: 'onactivate' | 'onafterupdate' | 'onbeforeactivate' | 'onbeforecopy' | 'onbeforecut' | 'onbeforedeactivate' | - 'onbeforeeditfocus' | 'onbeforepaste' | 'onbeforeupdate' | 'onblur' | 'oncellchange' | 'onclick' | 'oncontextmenu' | 'oncontrolselect' | 'oncopy' | 'oncut' | - 'ondataavailable' | 'ondatasetchanged' | 'ondatasetcomplete' | 'ondblclick' | 'ondeactivate' | 'ondrag' | 'ondragend' | 'ondragenter' | 'ondragleave' | - 'ondragover' | 'ondragstart' | 'ondrop' | 'onerrorupdate' | 'onfilterchange' | 'onfocus' | 'onfocusin' | 'onfocusout' | 'onhelp' | 'onkeydown' | 'onkeypress' | - 'onkeyup' | 'onlayoutcomplete' | 'onlosecapture' | 'onmousedown' | 'onmouseenter' | 'onmouseleave' | 'onmousemove' | 'onmouseout' | 'onmouseover' | 'onmouseup' | - 'onmousewheel' | 'onmove' | 'onmoveend' | 'onmovestart' | 'onpage' | 'onpaste' | 'onpropertychange' | 'onreadystatechange' | 'onresize' | 'onresizeend' | - 'onresizestart' | 'onrowenter' | 'onrowexit' | 'onrowsdelete' | 'onrowsinserted' | 'onscroll' | 'onselectstart', - handler: (this: MSHTML.HTMLDDElement, parameter: {}) => void): void; - on( - obj: MSHTML.HTMLDivElement, event: 'onactivate' | 'onafterupdate' | 'onbeforeactivate' | 'onbeforecopy' | 'onbeforecut' | 'onbeforedeactivate' | - 'onbeforeeditfocus' | 'onbeforepaste' | 'onbeforeupdate' | 'onblur' | 'oncellchange' | 'onclick' | 'oncontextmenu' | 'oncontrolselect' | 'oncopy' | 'oncut' | - 'ondataavailable' | 'ondatasetchanged' | 'ondatasetcomplete' | 'ondblclick' | 'ondeactivate' | 'ondrag' | 'ondragend' | 'ondragenter' | 'ondragleave' | - 'ondragover' | 'ondragstart' | 'ondrop' | 'onerrorupdate' | 'onfilterchange' | 'onfocus' | 'onfocusin' | 'onfocusout' | 'onhelp' | 'onkeydown' | 'onkeypress' | - 'onkeyup' | 'onlayoutcomplete' | 'onlosecapture' | 'onmousedown' | 'onmouseenter' | 'onmouseleave' | 'onmousemove' | 'onmouseout' | 'onmouseover' | 'onmouseup' | - 'onmousewheel' | 'onmove' | 'onmoveend' | 'onmovestart' | 'onpage' | 'onpaste' | 'onpropertychange' | 'onreadystatechange' | 'onresize' | 'onresizeend' | - 'onresizestart' | 'onrowenter' | 'onrowexit' | 'onrowsdelete' | 'onrowsinserted' | 'onscroll' | 'onselectstart', - handler: (this: MSHTML.HTMLDivElement, parameter: {}) => void): void; - on( - obj: MSHTML.HTMLDivPosition, event: 'onactivate' | 'onafterupdate' | 'onbeforeactivate' | 'onbeforecopy' | 'onbeforecut' | 'onbeforedeactivate' | - 'onbeforeeditfocus' | 'onbeforepaste' | 'onbeforeupdate' | 'onblur' | 'oncellchange' | 'onchange' | 'onclick' | 'oncontextmenu' | 'oncontrolselect' | 'oncopy' | - 'oncut' | 'ondataavailable' | 'ondatasetchanged' | 'ondatasetcomplete' | 'ondblclick' | 'ondeactivate' | 'ondrag' | 'ondragend' | 'ondragenter' | 'ondragleave' | - 'ondragover' | 'ondragstart' | 'ondrop' | 'onerrorupdate' | 'onfilterchange' | 'onfocus' | 'onfocusin' | 'onfocusout' | 'onhelp' | 'onkeydown' | 'onkeypress' | - 'onkeyup' | 'onlayoutcomplete' | 'onlosecapture' | 'onmousedown' | 'onmouseenter' | 'onmouseleave' | 'onmousemove' | 'onmouseout' | 'onmouseover' | 'onmouseup' | - 'onmousewheel' | 'onmove' | 'onmoveend' | 'onmovestart' | 'onpage' | 'onpaste' | 'onpropertychange' | 'onreadystatechange' | 'onresize' | 'onresizeend' | - 'onresizestart' | 'onrowenter' | 'onrowexit' | 'onrowsdelete' | 'onrowsinserted' | 'onscroll' | 'onselect' | 'onselectstart', - handler: (this: MSHTML.HTMLDivPosition, parameter: {}) => void): void; - on( - obj: MSHTML.HTMLDListElement, event: 'onactivate' | 'onafterupdate' | 'onbeforeactivate' | 'onbeforecopy' | 'onbeforecut' | 'onbeforedeactivate' | - 'onbeforeeditfocus' | 'onbeforepaste' | 'onbeforeupdate' | 'onblur' | 'oncellchange' | 'onclick' | 'oncontextmenu' | 'oncontrolselect' | 'oncopy' | 'oncut' | - 'ondataavailable' | 'ondatasetchanged' | 'ondatasetcomplete' | 'ondblclick' | 'ondeactivate' | 'ondrag' | 'ondragend' | 'ondragenter' | 'ondragleave' | - 'ondragover' | 'ondragstart' | 'ondrop' | 'onerrorupdate' | 'onfilterchange' | 'onfocus' | 'onfocusin' | 'onfocusout' | 'onhelp' | 'onkeydown' | 'onkeypress' | - 'onkeyup' | 'onlayoutcomplete' | 'onlosecapture' | 'onmousedown' | 'onmouseenter' | 'onmouseleave' | 'onmousemove' | 'onmouseout' | 'onmouseover' | 'onmouseup' | - 'onmousewheel' | 'onmove' | 'onmoveend' | 'onmovestart' | 'onpage' | 'onpaste' | 'onpropertychange' | 'onreadystatechange' | 'onresize' | 'onresizeend' | - 'onresizestart' | 'onrowenter' | 'onrowexit' | 'onrowsdelete' | 'onrowsinserted' | 'onscroll' | 'onselectstart', - handler: (this: MSHTML.HTMLDListElement, parameter: {}) => void): void; - on( - obj: MSHTML.HTMLDocument, event: 'onactivate' | 'onafterupdate' | 'onbeforeactivate' | 'onbeforedeactivate' | 'onbeforeeditfocus' | 'onbeforeupdate' | - 'oncellchange' | 'onclick' | 'oncontextmenu' | 'oncontrolselect' | 'ondataavailable' | 'ondatasetchanged' | 'ondatasetcomplete' | 'ondblclick' | 'ondeactivate' | - 'ondragstart' | 'onerrorupdate' | 'onfocusin' | 'onfocusout' | 'onhelp' | 'onkeydown' | 'onkeypress' | 'onkeyup' | 'onmousedown' | 'onmousemove' | 'onmouseout' | - 'onmouseover' | 'onmouseup' | 'onmousewheel' | 'onpropertychange' | 'onreadystatechange' | 'onrowenter' | 'onrowexit' | 'onrowsdelete' | 'onrowsinserted' | - 'onselectionchange' | 'onselectstart' | 'onstop', - handler: (this: MSHTML.HTMLDocument, parameter: {}) => void): void; - on( - obj: MSHTML.HTMLDTElement, event: 'onactivate' | 'onafterupdate' | 'onbeforeactivate' | 'onbeforecopy' | 'onbeforecut' | 'onbeforedeactivate' | - 'onbeforeeditfocus' | 'onbeforepaste' | 'onbeforeupdate' | 'onblur' | 'oncellchange' | 'onclick' | 'oncontextmenu' | 'oncontrolselect' | 'oncopy' | 'oncut' | - 'ondataavailable' | 'ondatasetchanged' | 'ondatasetcomplete' | 'ondblclick' | 'ondeactivate' | 'ondrag' | 'ondragend' | 'ondragenter' | 'ondragleave' | - 'ondragover' | 'ondragstart' | 'ondrop' | 'onerrorupdate' | 'onfilterchange' | 'onfocus' | 'onfocusin' | 'onfocusout' | 'onhelp' | 'onkeydown' | 'onkeypress' | - 'onkeyup' | 'onlayoutcomplete' | 'onlosecapture' | 'onmousedown' | 'onmouseenter' | 'onmouseleave' | 'onmousemove' | 'onmouseout' | 'onmouseover' | 'onmouseup' | - 'onmousewheel' | 'onmove' | 'onmoveend' | 'onmovestart' | 'onpage' | 'onpaste' | 'onpropertychange' | 'onreadystatechange' | 'onresize' | 'onresizeend' | - 'onresizestart' | 'onrowenter' | 'onrowexit' | 'onrowsdelete' | 'onrowsinserted' | 'onscroll' | 'onselectstart', - handler: (this: MSHTML.HTMLDTElement, parameter: {}) => void): void; - on( - obj: MSHTML.HTMLEmbed, event: 'onactivate' | 'onafterupdate' | 'onbeforeactivate' | 'onbeforecopy' | 'onbeforecut' | 'onbeforedeactivate' | 'onbeforeeditfocus' | - 'onbeforepaste' | 'onbeforeupdate' | 'onblur' | 'oncellchange' | 'onclick' | 'oncontextmenu' | 'oncontrolselect' | 'oncopy' | 'oncut' | 'ondataavailable' | - 'ondatasetchanged' | 'ondatasetcomplete' | 'ondblclick' | 'ondeactivate' | 'ondrag' | 'ondragend' | 'ondragenter' | 'ondragleave' | 'ondragover' | 'ondragstart' | - 'ondrop' | 'onerrorupdate' | 'onfilterchange' | 'onfocus' | 'onfocusin' | 'onfocusout' | 'onhelp' | 'onkeydown' | 'onkeypress' | 'onkeyup' | 'onlayoutcomplete' | - 'onlosecapture' | 'onmousedown' | 'onmouseenter' | 'onmouseleave' | 'onmousemove' | 'onmouseout' | 'onmouseover' | 'onmouseup' | 'onmousewheel' | 'onmove' | - 'onmoveend' | 'onmovestart' | 'onpage' | 'onpaste' | 'onpropertychange' | 'onreadystatechange' | 'onresize' | 'onresizeend' | 'onresizestart' | 'onrowenter' | - 'onrowexit' | 'onrowsdelete' | 'onrowsinserted' | 'onscroll' | 'onselectstart', - handler: (this: MSHTML.HTMLEmbed, parameter: {}) => void): void; - on( - obj: MSHTML.HTMLFieldSetElement, event: 'onactivate' | 'onafterupdate' | 'onbeforeactivate' | 'onbeforecopy' | 'onbeforecut' | 'onbeforedeactivate' | - 'onbeforeeditfocus' | 'onbeforepaste' | 'onbeforeupdate' | 'onblur' | 'oncellchange' | 'onchange' | 'onclick' | 'oncontextmenu' | 'oncontrolselect' | 'oncopy' | - 'oncut' | 'ondataavailable' | 'ondatasetchanged' | 'ondatasetcomplete' | 'ondblclick' | 'ondeactivate' | 'ondrag' | 'ondragend' | 'ondragenter' | 'ondragleave' | - 'ondragover' | 'ondragstart' | 'ondrop' | 'onerrorupdate' | 'onfilterchange' | 'onfocus' | 'onfocusin' | 'onfocusout' | 'onhelp' | 'onkeydown' | 'onkeypress' | - 'onkeyup' | 'onlayoutcomplete' | 'onlosecapture' | 'onmousedown' | 'onmouseenter' | 'onmouseleave' | 'onmousemove' | 'onmouseout' | 'onmouseover' | 'onmouseup' | - 'onmousewheel' | 'onmove' | 'onmoveend' | 'onmovestart' | 'onpage' | 'onpaste' | 'onpropertychange' | 'onreadystatechange' | 'onresize' | 'onresizeend' | - 'onresizestart' | 'onrowenter' | 'onrowexit' | 'onrowsdelete' | 'onrowsinserted' | 'onscroll' | 'onselect' | 'onselectstart', - handler: (this: MSHTML.HTMLFieldSetElement, parameter: {}) => void): void; - on( - obj: MSHTML.HTMLFontElement, event: 'onactivate' | 'onafterupdate' | 'onbeforeactivate' | 'onbeforecopy' | 'onbeforecut' | 'onbeforedeactivate' | - 'onbeforeeditfocus' | 'onbeforepaste' | 'onbeforeupdate' | 'onblur' | 'oncellchange' | 'onclick' | 'oncontextmenu' | 'oncontrolselect' | 'oncopy' | 'oncut' | - 'ondataavailable' | 'ondatasetchanged' | 'ondatasetcomplete' | 'ondblclick' | 'ondeactivate' | 'ondrag' | 'ondragend' | 'ondragenter' | 'ondragleave' | - 'ondragover' | 'ondragstart' | 'ondrop' | 'onerrorupdate' | 'onfilterchange' | 'onfocus' | 'onfocusin' | 'onfocusout' | 'onhelp' | 'onkeydown' | 'onkeypress' | - 'onkeyup' | 'onlayoutcomplete' | 'onlosecapture' | 'onmousedown' | 'onmouseenter' | 'onmouseleave' | 'onmousemove' | 'onmouseout' | 'onmouseover' | 'onmouseup' | - 'onmousewheel' | 'onmove' | 'onmoveend' | 'onmovestart' | 'onpage' | 'onpaste' | 'onpropertychange' | 'onreadystatechange' | 'onresize' | 'onresizeend' | - 'onresizestart' | 'onrowenter' | 'onrowexit' | 'onrowsdelete' | 'onrowsinserted' | 'onscroll' | 'onselectstart', - handler: (this: MSHTML.HTMLFontElement, parameter: {}) => void): void; - on( - obj: MSHTML.HTMLFormElement, event: 'onactivate' | 'onafterupdate' | 'onbeforeactivate' | 'onbeforecopy' | 'onbeforecut' | 'onbeforedeactivate' | - 'onbeforeeditfocus' | 'onbeforepaste' | 'onbeforeupdate' | 'onblur' | 'oncellchange' | 'onclick' | 'oncontextmenu' | 'oncontrolselect' | 'oncopy' | 'oncut' | - 'ondataavailable' | 'ondatasetchanged' | 'ondatasetcomplete' | 'ondblclick' | 'ondeactivate' | 'ondrag' | 'ondragend' | 'ondragenter' | 'ondragleave' | - 'ondragover' | 'ondragstart' | 'ondrop' | 'onerrorupdate' | 'onfilterchange' | 'onfocus' | 'onfocusin' | 'onfocusout' | 'onhelp' | 'onkeydown' | 'onkeypress' | - 'onkeyup' | 'onlayoutcomplete' | 'onlosecapture' | 'onmousedown' | 'onmouseenter' | 'onmouseleave' | 'onmousemove' | 'onmouseout' | 'onmouseover' | 'onmouseup' | - 'onmousewheel' | 'onmove' | 'onmoveend' | 'onmovestart' | 'onpage' | 'onpaste' | 'onpropertychange' | 'onreadystatechange' | 'onreset' | 'onresize' | - 'onresizeend' | 'onresizestart' | 'onrowenter' | 'onrowexit' | 'onrowsdelete' | 'onrowsinserted' | 'onscroll' | 'onselectstart' | 'onsubmit', - handler: (this: MSHTML.HTMLFormElement, parameter: {}) => void): void; - on( - obj: MSHTML.HTMLFrameBase, event: 'onactivate' | 'onafterupdate' | 'onbeforeactivate' | 'onbeforecopy' | 'onbeforecut' | 'onbeforedeactivate' | - 'onbeforeeditfocus' | 'onbeforepaste' | 'onbeforeupdate' | 'onblur' | 'oncellchange' | 'onclick' | 'oncontextmenu' | 'oncontrolselect' | 'oncopy' | 'oncut' | - 'ondataavailable' | 'ondatasetchanged' | 'ondatasetcomplete' | 'ondblclick' | 'ondeactivate' | 'ondrag' | 'ondragend' | 'ondragenter' | 'ondragleave' | - 'ondragover' | 'ondragstart' | 'ondrop' | 'onerrorupdate' | 'onfilterchange' | 'onfocus' | 'onfocusin' | 'onfocusout' | 'onhelp' | 'onkeydown' | 'onkeypress' | - 'onkeyup' | 'onlayoutcomplete' | 'onlosecapture' | 'onmousedown' | 'onmouseenter' | 'onmouseleave' | 'onmousemove' | 'onmouseout' | 'onmouseover' | 'onmouseup' | - 'onmousewheel' | 'onmove' | 'onmoveend' | 'onmovestart' | 'onpage' | 'onpaste' | 'onpropertychange' | 'onreadystatechange' | 'onresize' | 'onresizeend' | - 'onresizestart' | 'onrowenter' | 'onrowexit' | 'onrowsdelete' | 'onrowsinserted' | 'onscroll' | 'onselectstart', - handler: (this: MSHTML.HTMLFrameBase, parameter: {}) => void): void; - on( - obj: MSHTML.HTMLFrameElement, event: 'onactivate' | 'onafterupdate' | 'onbeforeactivate' | 'onbeforecopy' | 'onbeforecut' | 'onbeforedeactivate' | - 'onbeforeeditfocus' | 'onbeforepaste' | 'onbeforeupdate' | 'onblur' | 'oncellchange' | 'onclick' | 'oncontextmenu' | 'oncontrolselect' | 'oncopy' | 'oncut' | - 'ondataavailable' | 'ondatasetchanged' | 'ondatasetcomplete' | 'ondblclick' | 'ondeactivate' | 'ondrag' | 'ondragend' | 'ondragenter' | 'ondragleave' | - 'ondragover' | 'ondragstart' | 'ondrop' | 'onerrorupdate' | 'onfilterchange' | 'onfocus' | 'onfocusin' | 'onfocusout' | 'onhelp' | 'onkeydown' | 'onkeypress' | - 'onkeyup' | 'onlayoutcomplete' | 'onlosecapture' | 'onmousedown' | 'onmouseenter' | 'onmouseleave' | 'onmousemove' | 'onmouseout' | 'onmouseover' | 'onmouseup' | - 'onmousewheel' | 'onmove' | 'onmoveend' | 'onmovestart' | 'onpage' | 'onpaste' | 'onpropertychange' | 'onreadystatechange' | 'onresize' | 'onresizeend' | - 'onresizestart' | 'onrowenter' | 'onrowexit' | 'onrowsdelete' | 'onrowsinserted' | 'onscroll' | 'onselectstart', - handler: (this: MSHTML.HTMLFrameElement, parameter: {}) => void): void; - on( - obj: MSHTML.HTMLFrameSetSite, event: 'onactivate' | 'onafterupdate' | 'onbeforeactivate' | 'onbeforecopy' | 'onbeforecut' | 'onbeforedeactivate' | - 'onbeforeeditfocus' | 'onbeforepaste' | 'onbeforeupdate' | 'onblur' | 'oncellchange' | 'onclick' | 'oncontextmenu' | 'oncontrolselect' | 'oncopy' | 'oncut' | - 'ondataavailable' | 'ondatasetchanged' | 'ondatasetcomplete' | 'ondblclick' | 'ondeactivate' | 'ondrag' | 'ondragend' | 'ondragenter' | 'ondragleave' | - 'ondragover' | 'ondragstart' | 'ondrop' | 'onerrorupdate' | 'onfilterchange' | 'onfocus' | 'onfocusin' | 'onfocusout' | 'onhelp' | 'onkeydown' | 'onkeypress' | - 'onkeyup' | 'onlayoutcomplete' | 'onlosecapture' | 'onmousedown' | 'onmouseenter' | 'onmouseleave' | 'onmousemove' | 'onmouseout' | 'onmouseover' | 'onmouseup' | - 'onmousewheel' | 'onmove' | 'onmoveend' | 'onmovestart' | 'onpage' | 'onpaste' | 'onpropertychange' | 'onreadystatechange' | 'onresize' | 'onresizeend' | - 'onresizestart' | 'onrowenter' | 'onrowexit' | 'onrowsdelete' | 'onrowsinserted' | 'onscroll' | 'onselectstart', - handler: (this: MSHTML.HTMLFrameSetSite, parameter: {}) => void): void; - on( - obj: MSHTML.HTMLGenericElement, event: 'onactivate' | 'onafterupdate' | 'onbeforeactivate' | 'onbeforecopy' | 'onbeforecut' | 'onbeforedeactivate' | - 'onbeforeeditfocus' | 'onbeforepaste' | 'onbeforeupdate' | 'onblur' | 'oncellchange' | 'onclick' | 'oncontextmenu' | 'oncontrolselect' | 'oncopy' | 'oncut' | - 'ondataavailable' | 'ondatasetchanged' | 'ondatasetcomplete' | 'ondblclick' | 'ondeactivate' | 'ondrag' | 'ondragend' | 'ondragenter' | 'ondragleave' | - 'ondragover' | 'ondragstart' | 'ondrop' | 'onerrorupdate' | 'onfilterchange' | 'onfocus' | 'onfocusin' | 'onfocusout' | 'onhelp' | 'onkeydown' | 'onkeypress' | - 'onkeyup' | 'onlayoutcomplete' | 'onlosecapture' | 'onmousedown' | 'onmouseenter' | 'onmouseleave' | 'onmousemove' | 'onmouseout' | 'onmouseover' | 'onmouseup' | - 'onmousewheel' | 'onmove' | 'onmoveend' | 'onmovestart' | 'onpage' | 'onpaste' | 'onpropertychange' | 'onreadystatechange' | 'onresize' | 'onresizeend' | - 'onresizestart' | 'onrowenter' | 'onrowexit' | 'onrowsdelete' | 'onrowsinserted' | 'onscroll' | 'onselectstart', - handler: (this: MSHTML.HTMLGenericElement, parameter: {}) => void): void; - on( - obj: MSHTML.HTMLHeadElement, event: 'onactivate' | 'onafterupdate' | 'onbeforeactivate' | 'onbeforecopy' | 'onbeforecut' | 'onbeforedeactivate' | - 'onbeforeeditfocus' | 'onbeforepaste' | 'onbeforeupdate' | 'onblur' | 'oncellchange' | 'onclick' | 'oncontextmenu' | 'oncontrolselect' | 'oncopy' | 'oncut' | - 'ondataavailable' | 'ondatasetchanged' | 'ondatasetcomplete' | 'ondblclick' | 'ondeactivate' | 'ondrag' | 'ondragend' | 'ondragenter' | 'ondragleave' | - 'ondragover' | 'ondragstart' | 'ondrop' | 'onerrorupdate' | 'onfilterchange' | 'onfocus' | 'onfocusin' | 'onfocusout' | 'onhelp' | 'onkeydown' | 'onkeypress' | - 'onkeyup' | 'onlayoutcomplete' | 'onlosecapture' | 'onmousedown' | 'onmouseenter' | 'onmouseleave' | 'onmousemove' | 'onmouseout' | 'onmouseover' | 'onmouseup' | - 'onmousewheel' | 'onmove' | 'onmoveend' | 'onmovestart' | 'onpage' | 'onpaste' | 'onpropertychange' | 'onreadystatechange' | 'onresize' | 'onresizeend' | - 'onresizestart' | 'onrowenter' | 'onrowexit' | 'onrowsdelete' | 'onrowsinserted' | 'onscroll' | 'onselectstart', - handler: (this: MSHTML.HTMLHeadElement, parameter: {}) => void): void; - on( - obj: MSHTML.HTMLHeaderElement, event: 'onactivate' | 'onafterupdate' | 'onbeforeactivate' | 'onbeforecopy' | 'onbeforecut' | 'onbeforedeactivate' | - 'onbeforeeditfocus' | 'onbeforepaste' | 'onbeforeupdate' | 'onblur' | 'oncellchange' | 'onclick' | 'oncontextmenu' | 'oncontrolselect' | 'oncopy' | 'oncut' | - 'ondataavailable' | 'ondatasetchanged' | 'ondatasetcomplete' | 'ondblclick' | 'ondeactivate' | 'ondrag' | 'ondragend' | 'ondragenter' | 'ondragleave' | - 'ondragover' | 'ondragstart' | 'ondrop' | 'onerrorupdate' | 'onfilterchange' | 'onfocus' | 'onfocusin' | 'onfocusout' | 'onhelp' | 'onkeydown' | 'onkeypress' | - 'onkeyup' | 'onlayoutcomplete' | 'onlosecapture' | 'onmousedown' | 'onmouseenter' | 'onmouseleave' | 'onmousemove' | 'onmouseout' | 'onmouseover' | 'onmouseup' | - 'onmousewheel' | 'onmove' | 'onmoveend' | 'onmovestart' | 'onpage' | 'onpaste' | 'onpropertychange' | 'onreadystatechange' | 'onresize' | 'onresizeend' | - 'onresizestart' | 'onrowenter' | 'onrowexit' | 'onrowsdelete' | 'onrowsinserted' | 'onscroll' | 'onselectstart', - handler: (this: MSHTML.HTMLHeaderElement, parameter: {}) => void): void; - on( - obj: MSHTML.HTMLHRElement, event: 'onactivate' | 'onafterupdate' | 'onbeforeactivate' | 'onbeforecopy' | 'onbeforecut' | 'onbeforedeactivate' | - 'onbeforeeditfocus' | 'onbeforepaste' | 'onbeforeupdate' | 'onblur' | 'oncellchange' | 'onclick' | 'oncontextmenu' | 'oncontrolselect' | 'oncopy' | 'oncut' | - 'ondataavailable' | 'ondatasetchanged' | 'ondatasetcomplete' | 'ondblclick' | 'ondeactivate' | 'ondrag' | 'ondragend' | 'ondragenter' | 'ondragleave' | - 'ondragover' | 'ondragstart' | 'ondrop' | 'onerrorupdate' | 'onfilterchange' | 'onfocus' | 'onfocusin' | 'onfocusout' | 'onhelp' | 'onkeydown' | 'onkeypress' | - 'onkeyup' | 'onlayoutcomplete' | 'onlosecapture' | 'onmousedown' | 'onmouseenter' | 'onmouseleave' | 'onmousemove' | 'onmouseout' | 'onmouseover' | 'onmouseup' | - 'onmousewheel' | 'onmove' | 'onmoveend' | 'onmovestart' | 'onpage' | 'onpaste' | 'onpropertychange' | 'onreadystatechange' | 'onresize' | 'onresizeend' | - 'onresizestart' | 'onrowenter' | 'onrowexit' | 'onrowsdelete' | 'onrowsinserted' | 'onscroll' | 'onselectstart', - handler: (this: MSHTML.HTMLHRElement, parameter: {}) => void): void; - on( - obj: MSHTML.HTMLHtmlElement, event: 'onactivate' | 'onafterupdate' | 'onbeforeactivate' | 'onbeforecopy' | 'onbeforecut' | 'onbeforedeactivate' | - 'onbeforeeditfocus' | 'onbeforepaste' | 'onbeforeupdate' | 'onblur' | 'oncellchange' | 'onclick' | 'oncontextmenu' | 'oncontrolselect' | 'oncopy' | 'oncut' | - 'ondataavailable' | 'ondatasetchanged' | 'ondatasetcomplete' | 'ondblclick' | 'ondeactivate' | 'ondrag' | 'ondragend' | 'ondragenter' | 'ondragleave' | - 'ondragover' | 'ondragstart' | 'ondrop' | 'onerrorupdate' | 'onfilterchange' | 'onfocus' | 'onfocusin' | 'onfocusout' | 'onhelp' | 'onkeydown' | 'onkeypress' | - 'onkeyup' | 'onlayoutcomplete' | 'onlosecapture' | 'onmousedown' | 'onmouseenter' | 'onmouseleave' | 'onmousemove' | 'onmouseout' | 'onmouseover' | 'onmouseup' | - 'onmousewheel' | 'onmove' | 'onmoveend' | 'onmovestart' | 'onpage' | 'onpaste' | 'onpropertychange' | 'onreadystatechange' | 'onresize' | 'onresizeend' | - 'onresizestart' | 'onrowenter' | 'onrowexit' | 'onrowsdelete' | 'onrowsinserted' | 'onscroll' | 'onselectstart', - handler: (this: MSHTML.HTMLHtmlElement, parameter: {}) => void): void; - on( - obj: MSHTML.HTMLIFrame, event: 'onactivate' | 'onafterupdate' | 'onbeforeactivate' | 'onbeforecopy' | 'onbeforecut' | 'onbeforedeactivate' | 'onbeforeeditfocus' | - 'onbeforepaste' | 'onbeforeupdate' | 'onblur' | 'oncellchange' | 'onclick' | 'oncontextmenu' | 'oncontrolselect' | 'oncopy' | 'oncut' | 'ondataavailable' | - 'ondatasetchanged' | 'ondatasetcomplete' | 'ondblclick' | 'ondeactivate' | 'ondrag' | 'ondragend' | 'ondragenter' | 'ondragleave' | 'ondragover' | 'ondragstart' | - 'ondrop' | 'onerrorupdate' | 'onfilterchange' | 'onfocus' | 'onfocusin' | 'onfocusout' | 'onhelp' | 'onkeydown' | 'onkeypress' | 'onkeyup' | 'onlayoutcomplete' | - 'onlosecapture' | 'onmousedown' | 'onmouseenter' | 'onmouseleave' | 'onmousemove' | 'onmouseout' | 'onmouseover' | 'onmouseup' | 'onmousewheel' | 'onmove' | - 'onmoveend' | 'onmovestart' | 'onpage' | 'onpaste' | 'onpropertychange' | 'onreadystatechange' | 'onresize' | 'onresizeend' | 'onresizestart' | 'onrowenter' | - 'onrowexit' | 'onrowsdelete' | 'onrowsinserted' | 'onscroll' | 'onselectstart', - handler: (this: MSHTML.HTMLIFrame, parameter: {}) => void): void; - on( - obj: MSHTML.HTMLImg, event: 'onabort' | 'onactivate' | 'onafterupdate' | 'onbeforeactivate' | 'onbeforecopy' | 'onbeforecut' | 'onbeforedeactivate' | - 'onbeforeeditfocus' | 'onbeforepaste' | 'onbeforeupdate' | 'onblur' | 'oncellchange' | 'onclick' | 'oncontextmenu' | 'oncontrolselect' | 'oncopy' | 'oncut' | - 'ondataavailable' | 'ondatasetchanged' | 'ondatasetcomplete' | 'ondblclick' | 'ondeactivate' | 'ondrag' | 'ondragend' | 'ondragenter' | 'ondragleave' | - 'ondragover' | 'ondragstart' | 'ondrop' | 'onerror' | 'onerrorupdate' | 'onfilterchange' | 'onfocus' | 'onfocusin' | 'onfocusout' | 'onhelp' | 'onkeydown' | - 'onkeypress' | 'onkeyup' | 'onlayoutcomplete' | 'onload' | 'onlosecapture' | 'onmousedown' | 'onmouseenter' | 'onmouseleave' | 'onmousemove' | 'onmouseout' | - 'onmouseover' | 'onmouseup' | 'onmousewheel' | 'onmove' | 'onmoveend' | 'onmovestart' | 'onpage' | 'onpaste' | 'onpropertychange' | 'onreadystatechange' | - 'onresize' | 'onresizeend' | 'onresizestart' | 'onrowenter' | 'onrowexit' | 'onrowsdelete' | 'onrowsinserted' | 'onscroll' | 'onselectstart', - handler: (this: MSHTML.HTMLImg, parameter: {}) => void): void; - on( - obj: MSHTML.HTMLInputButtonElement, event: 'onactivate' | 'onafterupdate' | 'onbeforeactivate' | 'onbeforecopy' | 'onbeforecut' | 'onbeforedeactivate' | - 'onbeforeeditfocus' | 'onbeforepaste' | 'onbeforeupdate' | 'onblur' | 'oncellchange' | 'onclick' | 'oncontextmenu' | 'oncontrolselect' | 'oncopy' | 'oncut' | - 'ondataavailable' | 'ondatasetchanged' | 'ondatasetcomplete' | 'ondblclick' | 'ondeactivate' | 'ondrag' | 'ondragend' | 'ondragenter' | 'ondragleave' | - 'ondragover' | 'ondragstart' | 'ondrop' | 'onerrorupdate' | 'onfilterchange' | 'onfocus' | 'onfocusin' | 'onfocusout' | 'onhelp' | 'onkeydown' | 'onkeypress' | - 'onkeyup' | 'onlayoutcomplete' | 'onlosecapture' | 'onmousedown' | 'onmouseenter' | 'onmouseleave' | 'onmousemove' | 'onmouseout' | 'onmouseover' | 'onmouseup' | - 'onmousewheel' | 'onmove' | 'onmoveend' | 'onmovestart' | 'onpage' | 'onpaste' | 'onpropertychange' | 'onreadystatechange' | 'onresize' | 'onresizeend' | - 'onresizestart' | 'onrowenter' | 'onrowexit' | 'onrowsdelete' | 'onrowsinserted' | 'onscroll' | 'onselectstart', - handler: (this: MSHTML.HTMLInputButtonElement, parameter: {}) => void): void; - on( - obj: MSHTML.HTMLInputElement, event: 'onabort' | 'onactivate' | 'onafterupdate' | 'onbeforeactivate' | 'onbeforecopy' | 'onbeforecut' | 'onbeforedeactivate' | - 'onbeforeeditfocus' | 'onbeforepaste' | 'onbeforeupdate' | 'onblur' | 'oncellchange' | 'onchange' | 'onclick' | 'oncontextmenu' | 'oncontrolselect' | 'oncopy' | - 'oncut' | 'ondataavailable' | 'ondatasetchanged' | 'ondatasetcomplete' | 'ondblclick' | 'ondeactivate' | 'ondrag' | 'ondragend' | 'ondragenter' | 'ondragleave' | - 'ondragover' | 'ondragstart' | 'ondrop' | 'onerror' | 'onerrorupdate' | 'onfilterchange' | 'onfocus' | 'onfocusin' | 'onfocusout' | 'onhelp' | 'onkeydown' | - 'onkeypress' | 'onkeyup' | 'onlayoutcomplete' | 'onload' | 'onlosecapture' | 'onmousedown' | 'onmouseenter' | 'onmouseleave' | 'onmousemove' | 'onmouseout' | - 'onmouseover' | 'onmouseup' | 'onmousewheel' | 'onmove' | 'onmoveend' | 'onmovestart' | 'onpage' | 'onpaste' | 'onpropertychange' | 'onreadystatechange' | - 'onresize' | 'onresizeend' | 'onresizestart' | 'onrowenter' | 'onrowexit' | 'onrowsdelete' | 'onrowsinserted' | 'onscroll' | 'onselect' | 'onselectstart', - handler: (this: MSHTML.HTMLInputElement, parameter: {}) => void): void; - on( - obj: MSHTML.HTMLInputFileElement, event: 'onabort' | 'onactivate' | 'onafterupdate' | 'onbeforeactivate' | 'onbeforecopy' | 'onbeforecut' | 'onbeforedeactivate' | - 'onbeforeeditfocus' | 'onbeforepaste' | 'onbeforeupdate' | 'onblur' | 'oncellchange' | 'onchange' | 'onclick' | 'oncontextmenu' | 'oncontrolselect' | 'oncopy' | - 'oncut' | 'ondataavailable' | 'ondatasetchanged' | 'ondatasetcomplete' | 'ondblclick' | 'ondeactivate' | 'ondrag' | 'ondragend' | 'ondragenter' | 'ondragleave' | - 'ondragover' | 'ondragstart' | 'ondrop' | 'onerror' | 'onerrorupdate' | 'onfilterchange' | 'onfocus' | 'onfocusin' | 'onfocusout' | 'onhelp' | 'onkeydown' | - 'onkeypress' | 'onkeyup' | 'onlayoutcomplete' | 'onload' | 'onlosecapture' | 'onmousedown' | 'onmouseenter' | 'onmouseleave' | 'onmousemove' | 'onmouseout' | - 'onmouseover' | 'onmouseup' | 'onmousewheel' | 'onmove' | 'onmoveend' | 'onmovestart' | 'onpage' | 'onpaste' | 'onpropertychange' | 'onreadystatechange' | - 'onresize' | 'onresizeend' | 'onresizestart' | 'onrowenter' | 'onrowexit' | 'onrowsdelete' | 'onrowsinserted' | 'onscroll' | 'onselect' | 'onselectstart', - handler: (this: MSHTML.HTMLInputFileElement, parameter: {}) => void): void; - on( - obj: MSHTML.htmlInputImage, event: 'onabort' | 'onactivate' | 'onafterupdate' | 'onbeforeactivate' | 'onbeforecopy' | 'onbeforecut' | 'onbeforedeactivate' | - 'onbeforeeditfocus' | 'onbeforepaste' | 'onbeforeupdate' | 'onblur' | 'oncellchange' | 'onclick' | 'oncontextmenu' | 'oncontrolselect' | 'oncopy' | 'oncut' | - 'ondataavailable' | 'ondatasetchanged' | 'ondatasetcomplete' | 'ondblclick' | 'ondeactivate' | 'ondrag' | 'ondragend' | 'ondragenter' | 'ondragleave' | - 'ondragover' | 'ondragstart' | 'ondrop' | 'onerror' | 'onerrorupdate' | 'onfilterchange' | 'onfocus' | 'onfocusin' | 'onfocusout' | 'onhelp' | 'onkeydown' | - 'onkeypress' | 'onkeyup' | 'onlayoutcomplete' | 'onload' | 'onlosecapture' | 'onmousedown' | 'onmouseenter' | 'onmouseleave' | 'onmousemove' | 'onmouseout' | - 'onmouseover' | 'onmouseup' | 'onmousewheel' | 'onmove' | 'onmoveend' | 'onmovestart' | 'onpage' | 'onpaste' | 'onpropertychange' | 'onreadystatechange' | - 'onresize' | 'onresizeend' | 'onresizestart' | 'onrowenter' | 'onrowexit' | 'onrowsdelete' | 'onrowsinserted' | 'onscroll' | 'onselectstart', - handler: (this: MSHTML.htmlInputImage, parameter: {}) => void): void; - on( - obj: MSHTML.HTMLInputTextElement, event: 'onabort' | 'onactivate' | 'onafterupdate' | 'onbeforeactivate' | 'onbeforecopy' | 'onbeforecut' | 'onbeforedeactivate' | - 'onbeforeeditfocus' | 'onbeforepaste' | 'onbeforeupdate' | 'onblur' | 'oncellchange' | 'onchange' | 'onclick' | 'oncontextmenu' | 'oncontrolselect' | 'oncopy' | - 'oncut' | 'ondataavailable' | 'ondatasetchanged' | 'ondatasetcomplete' | 'ondblclick' | 'ondeactivate' | 'ondrag' | 'ondragend' | 'ondragenter' | 'ondragleave' | - 'ondragover' | 'ondragstart' | 'ondrop' | 'onerror' | 'onerrorupdate' | 'onfilterchange' | 'onfocus' | 'onfocusin' | 'onfocusout' | 'onhelp' | 'onkeydown' | - 'onkeypress' | 'onkeyup' | 'onlayoutcomplete' | 'onload' | 'onlosecapture' | 'onmousedown' | 'onmouseenter' | 'onmouseleave' | 'onmousemove' | 'onmouseout' | - 'onmouseover' | 'onmouseup' | 'onmousewheel' | 'onmove' | 'onmoveend' | 'onmovestart' | 'onpage' | 'onpaste' | 'onpropertychange' | 'onreadystatechange' | - 'onresize' | 'onresizeend' | 'onresizestart' | 'onrowenter' | 'onrowexit' | 'onrowsdelete' | 'onrowsinserted' | 'onscroll' | 'onselect' | 'onselectstart', - handler: (this: MSHTML.HTMLInputTextElement, parameter: {}) => void): void; - on( - obj: MSHTML.HTMLIsIndexElement, event: 'onactivate' | 'onafterupdate' | 'onbeforeactivate' | 'onbeforecopy' | 'onbeforecut' | 'onbeforedeactivate' | - 'onbeforeeditfocus' | 'onbeforepaste' | 'onbeforeupdate' | 'onblur' | 'oncellchange' | 'onclick' | 'oncontextmenu' | 'oncontrolselect' | 'oncopy' | 'oncut' | - 'ondataavailable' | 'ondatasetchanged' | 'ondatasetcomplete' | 'ondblclick' | 'ondeactivate' | 'ondrag' | 'ondragend' | 'ondragenter' | 'ondragleave' | - 'ondragover' | 'ondragstart' | 'ondrop' | 'onerrorupdate' | 'onfilterchange' | 'onfocus' | 'onfocusin' | 'onfocusout' | 'onhelp' | 'onkeydown' | 'onkeypress' | - 'onkeyup' | 'onlayoutcomplete' | 'onlosecapture' | 'onmousedown' | 'onmouseenter' | 'onmouseleave' | 'onmousemove' | 'onmouseout' | 'onmouseover' | 'onmouseup' | - 'onmousewheel' | 'onmove' | 'onmoveend' | 'onmovestart' | 'onpage' | 'onpaste' | 'onpropertychange' | 'onreadystatechange' | 'onresize' | 'onresizeend' | - 'onresizestart' | 'onrowenter' | 'onrowexit' | 'onrowsdelete' | 'onrowsinserted' | 'onscroll' | 'onselectstart', - handler: (this: MSHTML.HTMLIsIndexElement, parameter: {}) => void): void; - on( - obj: MSHTML.HTMLLabelElement, event: 'onactivate' | 'onafterupdate' | 'onbeforeactivate' | 'onbeforecopy' | 'onbeforecut' | 'onbeforedeactivate' | - 'onbeforeeditfocus' | 'onbeforepaste' | 'onbeforeupdate' | 'onblur' | 'oncellchange' | 'onclick' | 'oncontextmenu' | 'oncontrolselect' | 'oncopy' | 'oncut' | - 'ondataavailable' | 'ondatasetchanged' | 'ondatasetcomplete' | 'ondblclick' | 'ondeactivate' | 'ondrag' | 'ondragend' | 'ondragenter' | 'ondragleave' | - 'ondragover' | 'ondragstart' | 'ondrop' | 'onerrorupdate' | 'onfilterchange' | 'onfocus' | 'onfocusin' | 'onfocusout' | 'onhelp' | 'onkeydown' | 'onkeypress' | - 'onkeyup' | 'onlayoutcomplete' | 'onlosecapture' | 'onmousedown' | 'onmouseenter' | 'onmouseleave' | 'onmousemove' | 'onmouseout' | 'onmouseover' | 'onmouseup' | - 'onmousewheel' | 'onmove' | 'onmoveend' | 'onmovestart' | 'onpage' | 'onpaste' | 'onpropertychange' | 'onreadystatechange' | 'onresize' | 'onresizeend' | - 'onresizestart' | 'onrowenter' | 'onrowexit' | 'onrowsdelete' | 'onrowsinserted' | 'onscroll' | 'onselectstart', - handler: (this: MSHTML.HTMLLabelElement, parameter: {}) => void): void; - on( - obj: MSHTML.HTMLLegendElement, event: 'onactivate' | 'onafterupdate' | 'onbeforeactivate' | 'onbeforecopy' | 'onbeforecut' | 'onbeforedeactivate' | - 'onbeforeeditfocus' | 'onbeforepaste' | 'onbeforeupdate' | 'onblur' | 'oncellchange' | 'onchange' | 'onclick' | 'oncontextmenu' | 'oncontrolselect' | 'oncopy' | - 'oncut' | 'ondataavailable' | 'ondatasetchanged' | 'ondatasetcomplete' | 'ondblclick' | 'ondeactivate' | 'ondrag' | 'ondragend' | 'ondragenter' | 'ondragleave' | - 'ondragover' | 'ondragstart' | 'ondrop' | 'onerrorupdate' | 'onfilterchange' | 'onfocus' | 'onfocusin' | 'onfocusout' | 'onhelp' | 'onkeydown' | 'onkeypress' | - 'onkeyup' | 'onlayoutcomplete' | 'onlosecapture' | 'onmousedown' | 'onmouseenter' | 'onmouseleave' | 'onmousemove' | 'onmouseout' | 'onmouseover' | 'onmouseup' | - 'onmousewheel' | 'onmove' | 'onmoveend' | 'onmovestart' | 'onpage' | 'onpaste' | 'onpropertychange' | 'onreadystatechange' | 'onresize' | 'onresizeend' | - 'onresizestart' | 'onrowenter' | 'onrowexit' | 'onrowsdelete' | 'onrowsinserted' | 'onscroll' | 'onselect' | 'onselectstart', - handler: (this: MSHTML.HTMLLegendElement, parameter: {}) => void): void; - on( - obj: MSHTML.HTMLLIElement, event: 'onactivate' | 'onafterupdate' | 'onbeforeactivate' | 'onbeforecopy' | 'onbeforecut' | 'onbeforedeactivate' | - 'onbeforeeditfocus' | 'onbeforepaste' | 'onbeforeupdate' | 'onblur' | 'oncellchange' | 'onclick' | 'oncontextmenu' | 'oncontrolselect' | 'oncopy' | 'oncut' | - 'ondataavailable' | 'ondatasetchanged' | 'ondatasetcomplete' | 'ondblclick' | 'ondeactivate' | 'ondrag' | 'ondragend' | 'ondragenter' | 'ondragleave' | - 'ondragover' | 'ondragstart' | 'ondrop' | 'onerrorupdate' | 'onfilterchange' | 'onfocus' | 'onfocusin' | 'onfocusout' | 'onhelp' | 'onkeydown' | 'onkeypress' | - 'onkeyup' | 'onlayoutcomplete' | 'onlosecapture' | 'onmousedown' | 'onmouseenter' | 'onmouseleave' | 'onmousemove' | 'onmouseout' | 'onmouseover' | 'onmouseup' | - 'onmousewheel' | 'onmove' | 'onmoveend' | 'onmovestart' | 'onpage' | 'onpaste' | 'onpropertychange' | 'onreadystatechange' | 'onresize' | 'onresizeend' | - 'onresizestart' | 'onrowenter' | 'onrowexit' | 'onrowsdelete' | 'onrowsinserted' | 'onscroll' | 'onselectstart', - handler: (this: MSHTML.HTMLLIElement, parameter: {}) => void): void; - on( - obj: MSHTML.HTMLLinkElement, event: 'onactivate' | 'onafterupdate' | 'onbeforeactivate' | 'onbeforecopy' | 'onbeforecut' | 'onbeforedeactivate' | - 'onbeforeeditfocus' | 'onbeforepaste' | 'onbeforeupdate' | 'onblur' | 'oncellchange' | 'onclick' | 'oncontextmenu' | 'oncontrolselect' | 'oncopy' | 'oncut' | - 'ondataavailable' | 'ondatasetchanged' | 'ondatasetcomplete' | 'ondblclick' | 'ondeactivate' | 'ondrag' | 'ondragend' | 'ondragenter' | 'ondragleave' | - 'ondragover' | 'ondragstart' | 'ondrop' | 'onerror' | 'onerrorupdate' | 'onfilterchange' | 'onfocus' | 'onfocusin' | 'onfocusout' | 'onhelp' | 'onkeydown' | - 'onkeypress' | 'onkeyup' | 'onlayoutcomplete' | 'onload' | 'onlosecapture' | 'onmousedown' | 'onmouseenter' | 'onmouseleave' | 'onmousemove' | 'onmouseout' | - 'onmouseover' | 'onmouseup' | 'onmousewheel' | 'onmove' | 'onmoveend' | 'onmovestart' | 'onpage' | 'onpaste' | 'onpropertychange' | 'onreadystatechange' | - 'onresize' | 'onresizeend' | 'onresizestart' | 'onrowenter' | 'onrowexit' | 'onrowsdelete' | 'onrowsinserted' | 'onscroll' | 'onselectstart', - handler: (this: MSHTML.HTMLLinkElement, parameter: {}) => void): void; - on( - obj: MSHTML.HTMLListElement, event: 'onactivate' | 'onafterupdate' | 'onbeforeactivate' | 'onbeforecopy' | 'onbeforecut' | 'onbeforedeactivate' | - 'onbeforeeditfocus' | 'onbeforepaste' | 'onbeforeupdate' | 'onblur' | 'oncellchange' | 'onclick' | 'oncontextmenu' | 'oncontrolselect' | 'oncopy' | 'oncut' | - 'ondataavailable' | 'ondatasetchanged' | 'ondatasetcomplete' | 'ondblclick' | 'ondeactivate' | 'ondrag' | 'ondragend' | 'ondragenter' | 'ondragleave' | - 'ondragover' | 'ondragstart' | 'ondrop' | 'onerrorupdate' | 'onfilterchange' | 'onfocus' | 'onfocusin' | 'onfocusout' | 'onhelp' | 'onkeydown' | 'onkeypress' | - 'onkeyup' | 'onlayoutcomplete' | 'onlosecapture' | 'onmousedown' | 'onmouseenter' | 'onmouseleave' | 'onmousemove' | 'onmouseout' | 'onmouseover' | 'onmouseup' | - 'onmousewheel' | 'onmove' | 'onmoveend' | 'onmovestart' | 'onpage' | 'onpaste' | 'onpropertychange' | 'onreadystatechange' | 'onresize' | 'onresizeend' | - 'onresizestart' | 'onrowenter' | 'onrowexit' | 'onrowsdelete' | 'onrowsinserted' | 'onscroll' | 'onselectstart', - handler: (this: MSHTML.HTMLListElement, parameter: {}) => void): void; - on( - obj: MSHTML.HTMLMapElement, event: 'onactivate' | 'onafterupdate' | 'onbeforeactivate' | 'onbeforecopy' | 'onbeforecut' | 'onbeforedeactivate' | - 'onbeforeeditfocus' | 'onbeforepaste' | 'onbeforeupdate' | 'onblur' | 'oncellchange' | 'onclick' | 'oncontextmenu' | 'oncontrolselect' | 'oncopy' | 'oncut' | - 'ondataavailable' | 'ondatasetchanged' | 'ondatasetcomplete' | 'ondblclick' | 'ondeactivate' | 'ondrag' | 'ondragend' | 'ondragenter' | 'ondragleave' | - 'ondragover' | 'ondragstart' | 'ondrop' | 'onerrorupdate' | 'onfilterchange' | 'onfocus' | 'onfocusin' | 'onfocusout' | 'onhelp' | 'onkeydown' | 'onkeypress' | - 'onkeyup' | 'onlayoutcomplete' | 'onlosecapture' | 'onmousedown' | 'onmouseenter' | 'onmouseleave' | 'onmousemove' | 'onmouseout' | 'onmouseover' | 'onmouseup' | - 'onmousewheel' | 'onmove' | 'onmoveend' | 'onmovestart' | 'onpage' | 'onpaste' | 'onpropertychange' | 'onreadystatechange' | 'onresize' | 'onresizeend' | - 'onresizestart' | 'onrowenter' | 'onrowexit' | 'onrowsdelete' | 'onrowsinserted' | 'onscroll' | 'onselectstart', - handler: (this: MSHTML.HTMLMapElement, parameter: {}) => void): void; - on( - obj: MSHTML.HTMLMarqueeElement, event: 'onactivate' | 'onafterupdate' | 'onbeforeactivate' | 'onbeforecopy' | 'onbeforecut' | 'onbeforedeactivate' | - 'onbeforeeditfocus' | 'onbeforepaste' | 'onbeforeupdate' | 'onblur' | 'onbounce' | 'oncellchange' | 'onchange' | 'onclick' | 'oncontextmenu' | 'oncontrolselect' | - 'oncopy' | 'oncut' | 'ondataavailable' | 'ondatasetchanged' | 'ondatasetcomplete' | 'ondblclick' | 'ondeactivate' | 'ondrag' | 'ondragend' | 'ondragenter' | - 'ondragleave' | 'ondragover' | 'ondragstart' | 'ondrop' | 'onerrorupdate' | 'onfilterchange' | 'onfinish' | 'onfocus' | 'onfocusin' | 'onfocusout' | 'onhelp' | - 'onkeydown' | 'onkeypress' | 'onkeyup' | 'onlayoutcomplete' | 'onlosecapture' | 'onmousedown' | 'onmouseenter' | 'onmouseleave' | 'onmousemove' | 'onmouseout' | - 'onmouseover' | 'onmouseup' | 'onmousewheel' | 'onmove' | 'onmoveend' | 'onmovestart' | 'onpage' | 'onpaste' | 'onpropertychange' | 'onreadystatechange' | - 'onresize' | 'onresizeend' | 'onresizestart' | 'onrowenter' | 'onrowexit' | 'onrowsdelete' | 'onrowsinserted' | 'onscroll' | 'onselect' | 'onselectstart' | - 'onstart', - handler: (this: MSHTML.HTMLMarqueeElement, parameter: {}) => void): void; - on( - obj: MSHTML.HTMLMediaElement, event: 'onactivate' | 'onafterupdate' | 'onbeforeactivate' | 'onbeforecopy' | 'onbeforecut' | 'onbeforedeactivate' | - 'onbeforeeditfocus' | 'onbeforepaste' | 'onbeforeupdate' | 'onblur' | 'oncellchange' | 'onclick' | 'oncontextmenu' | 'oncontrolselect' | 'oncopy' | 'oncut' | - 'ondataavailable' | 'ondatasetchanged' | 'ondatasetcomplete' | 'ondblclick' | 'ondeactivate' | 'ondrag' | 'ondragend' | 'ondragenter' | 'ondragleave' | - 'ondragover' | 'ondragstart' | 'ondrop' | 'onerrorupdate' | 'onfilterchange' | 'onfocus' | 'onfocusin' | 'onfocusout' | 'onhelp' | 'onkeydown' | 'onkeypress' | - 'onkeyup' | 'onlayoutcomplete' | 'onlosecapture' | 'onmousedown' | 'onmouseenter' | 'onmouseleave' | 'onmousemove' | 'onmouseout' | 'onmouseover' | 'onmouseup' | - 'onmousewheel' | 'onmove' | 'onmoveend' | 'onmovestart' | 'onpage' | 'onpaste' | 'onpropertychange' | 'onreadystatechange' | 'onresize' | 'onresizeend' | - 'onresizestart' | 'onrowenter' | 'onrowexit' | 'onrowsdelete' | 'onrowsinserted' | 'onscroll' | 'onselectstart', - handler: (this: MSHTML.HTMLMediaElement, parameter: {}) => void): void; - on( - obj: MSHTML.HTMLMetaElement, event: 'onactivate' | 'onafterupdate' | 'onbeforeactivate' | 'onbeforecopy' | 'onbeforecut' | 'onbeforedeactivate' | - 'onbeforeeditfocus' | 'onbeforepaste' | 'onbeforeupdate' | 'onblur' | 'oncellchange' | 'onclick' | 'oncontextmenu' | 'oncontrolselect' | 'oncopy' | 'oncut' | - 'ondataavailable' | 'ondatasetchanged' | 'ondatasetcomplete' | 'ondblclick' | 'ondeactivate' | 'ondrag' | 'ondragend' | 'ondragenter' | 'ondragleave' | - 'ondragover' | 'ondragstart' | 'ondrop' | 'onerrorupdate' | 'onfilterchange' | 'onfocus' | 'onfocusin' | 'onfocusout' | 'onhelp' | 'onkeydown' | 'onkeypress' | - 'onkeyup' | 'onlayoutcomplete' | 'onlosecapture' | 'onmousedown' | 'onmouseenter' | 'onmouseleave' | 'onmousemove' | 'onmouseout' | 'onmouseover' | 'onmouseup' | - 'onmousewheel' | 'onmove' | 'onmoveend' | 'onmovestart' | 'onpage' | 'onpaste' | 'onpropertychange' | 'onreadystatechange' | 'onresize' | 'onresizeend' | - 'onresizestart' | 'onrowenter' | 'onrowexit' | 'onrowsdelete' | 'onrowsinserted' | 'onscroll' | 'onselectstart', - handler: (this: MSHTML.HTMLMetaElement, parameter: {}) => void): void; - on( - obj: MSHTML.HTMLNextIdElement, event: 'onactivate' | 'onafterupdate' | 'onbeforeactivate' | 'onbeforecopy' | 'onbeforecut' | 'onbeforedeactivate' | - 'onbeforeeditfocus' | 'onbeforepaste' | 'onbeforeupdate' | 'onblur' | 'oncellchange' | 'onclick' | 'oncontextmenu' | 'oncontrolselect' | 'oncopy' | 'oncut' | - 'ondataavailable' | 'ondatasetchanged' | 'ondatasetcomplete' | 'ondblclick' | 'ondeactivate' | 'ondrag' | 'ondragend' | 'ondragenter' | 'ondragleave' | - 'ondragover' | 'ondragstart' | 'ondrop' | 'onerrorupdate' | 'onfilterchange' | 'onfocus' | 'onfocusin' | 'onfocusout' | 'onhelp' | 'onkeydown' | 'onkeypress' | - 'onkeyup' | 'onlayoutcomplete' | 'onlosecapture' | 'onmousedown' | 'onmouseenter' | 'onmouseleave' | 'onmousemove' | 'onmouseout' | 'onmouseover' | 'onmouseup' | - 'onmousewheel' | 'onmove' | 'onmoveend' | 'onmovestart' | 'onpage' | 'onpaste' | 'onpropertychange' | 'onreadystatechange' | 'onresize' | 'onresizeend' | - 'onresizestart' | 'onrowenter' | 'onrowexit' | 'onrowsdelete' | 'onrowsinserted' | 'onscroll' | 'onselectstart', - handler: (this: MSHTML.HTMLNextIdElement, parameter: {}) => void): void; - on( - obj: MSHTML.HTMLNoShowElement, event: 'onactivate' | 'onafterupdate' | 'onbeforeactivate' | 'onbeforecopy' | 'onbeforecut' | 'onbeforedeactivate' | - 'onbeforeeditfocus' | 'onbeforepaste' | 'onbeforeupdate' | 'onblur' | 'oncellchange' | 'onclick' | 'oncontextmenu' | 'oncontrolselect' | 'oncopy' | 'oncut' | - 'ondataavailable' | 'ondatasetchanged' | 'ondatasetcomplete' | 'ondblclick' | 'ondeactivate' | 'ondrag' | 'ondragend' | 'ondragenter' | 'ondragleave' | - 'ondragover' | 'ondragstart' | 'ondrop' | 'onerrorupdate' | 'onfilterchange' | 'onfocus' | 'onfocusin' | 'onfocusout' | 'onhelp' | 'onkeydown' | 'onkeypress' | - 'onkeyup' | 'onlayoutcomplete' | 'onlosecapture' | 'onmousedown' | 'onmouseenter' | 'onmouseleave' | 'onmousemove' | 'onmouseout' | 'onmouseover' | 'onmouseup' | - 'onmousewheel' | 'onmove' | 'onmoveend' | 'onmovestart' | 'onpage' | 'onpaste' | 'onpropertychange' | 'onreadystatechange' | 'onresize' | 'onresizeend' | - 'onresizestart' | 'onrowenter' | 'onrowexit' | 'onrowsdelete' | 'onrowsinserted' | 'onscroll' | 'onselectstart', - handler: (this: MSHTML.HTMLNoShowElement, parameter: {}) => void): void; - on( - obj: MSHTML.HTMLObjectElement, event: 'onafterupdate' | 'onbeforeupdate' | 'oncellchange' | 'ondataavailable' | 'ondatasetchanged' | 'ondatasetcomplete' | - 'onerror' | 'onerrorupdate' | 'onreadystatechange' | 'onrowenter' | 'onrowexit' | 'onrowsdelete' | 'onrowsinserted', - handler: (this: MSHTML.HTMLObjectElement, parameter: {}) => void): void; - on( - obj: MSHTML.HTMLOListElement, event: 'onactivate' | 'onafterupdate' | 'onbeforeactivate' | 'onbeforecopy' | 'onbeforecut' | 'onbeforedeactivate' | - 'onbeforeeditfocus' | 'onbeforepaste' | 'onbeforeupdate' | 'onblur' | 'oncellchange' | 'onclick' | 'oncontextmenu' | 'oncontrolselect' | 'oncopy' | 'oncut' | - 'ondataavailable' | 'ondatasetchanged' | 'ondatasetcomplete' | 'ondblclick' | 'ondeactivate' | 'ondrag' | 'ondragend' | 'ondragenter' | 'ondragleave' | - 'ondragover' | 'ondragstart' | 'ondrop' | 'onerrorupdate' | 'onfilterchange' | 'onfocus' | 'onfocusin' | 'onfocusout' | 'onhelp' | 'onkeydown' | 'onkeypress' | - 'onkeyup' | 'onlayoutcomplete' | 'onlosecapture' | 'onmousedown' | 'onmouseenter' | 'onmouseleave' | 'onmousemove' | 'onmouseout' | 'onmouseover' | 'onmouseup' | - 'onmousewheel' | 'onmove' | 'onmoveend' | 'onmovestart' | 'onpage' | 'onpaste' | 'onpropertychange' | 'onreadystatechange' | 'onresize' | 'onresizeend' | - 'onresizestart' | 'onrowenter' | 'onrowexit' | 'onrowsdelete' | 'onrowsinserted' | 'onscroll' | 'onselectstart', - handler: (this: MSHTML.HTMLOListElement, parameter: {}) => void): void; - on( - obj: MSHTML.HTMLOptionButtonElement, event: 'onabort' | 'onactivate' | 'onafterupdate' | 'onbeforeactivate' | 'onbeforecopy' | 'onbeforecut' | - 'onbeforedeactivate' | 'onbeforeeditfocus' | 'onbeforepaste' | 'onbeforeupdate' | 'onblur' | 'oncellchange' | 'onchange' | 'onclick' | 'oncontextmenu' | - 'oncontrolselect' | 'oncopy' | 'oncut' | 'ondataavailable' | 'ondatasetchanged' | 'ondatasetcomplete' | 'ondblclick' | 'ondeactivate' | 'ondrag' | 'ondragend' | - 'ondragenter' | 'ondragleave' | 'ondragover' | 'ondragstart' | 'ondrop' | 'onerror' | 'onerrorupdate' | 'onfilterchange' | 'onfocus' | 'onfocusin' | 'onfocusout' | - 'onhelp' | 'onkeydown' | 'onkeypress' | 'onkeyup' | 'onlayoutcomplete' | 'onload' | 'onlosecapture' | 'onmousedown' | 'onmouseenter' | 'onmouseleave' | - 'onmousemove' | 'onmouseout' | 'onmouseover' | 'onmouseup' | 'onmousewheel' | 'onmove' | 'onmoveend' | 'onmovestart' | 'onpage' | 'onpaste' | 'onpropertychange' | - 'onreadystatechange' | 'onresize' | 'onresizeend' | 'onresizestart' | 'onrowenter' | 'onrowexit' | 'onrowsdelete' | 'onrowsinserted' | 'onscroll' | 'onselect' | - 'onselectstart', - handler: (this: MSHTML.HTMLOptionButtonElement, parameter: {}) => void): void; - on( - obj: MSHTML.HTMLOptionElement, event: 'onactivate' | 'onafterupdate' | 'onbeforeactivate' | 'onbeforecopy' | 'onbeforecut' | 'onbeforedeactivate' | - 'onbeforeeditfocus' | 'onbeforepaste' | 'onbeforeupdate' | 'onblur' | 'oncellchange' | 'onclick' | 'oncontextmenu' | 'oncontrolselect' | 'oncopy' | 'oncut' | - 'ondataavailable' | 'ondatasetchanged' | 'ondatasetcomplete' | 'ondblclick' | 'ondeactivate' | 'ondrag' | 'ondragend' | 'ondragenter' | 'ondragleave' | - 'ondragover' | 'ondragstart' | 'ondrop' | 'onerrorupdate' | 'onfilterchange' | 'onfocus' | 'onfocusin' | 'onfocusout' | 'onhelp' | 'onkeydown' | 'onkeypress' | - 'onkeyup' | 'onlayoutcomplete' | 'onlosecapture' | 'onmousedown' | 'onmouseenter' | 'onmouseleave' | 'onmousemove' | 'onmouseout' | 'onmouseover' | 'onmouseup' | - 'onmousewheel' | 'onmove' | 'onmoveend' | 'onmovestart' | 'onpage' | 'onpaste' | 'onpropertychange' | 'onreadystatechange' | 'onresize' | 'onresizeend' | - 'onresizestart' | 'onrowenter' | 'onrowexit' | 'onrowsdelete' | 'onrowsinserted' | 'onscroll' | 'onselectstart', - handler: (this: MSHTML.HTMLOptionElement, parameter: {}) => void): void; - on( - obj: MSHTML.HTMLParaElement, event: 'onactivate' | 'onafterupdate' | 'onbeforeactivate' | 'onbeforecopy' | 'onbeforecut' | 'onbeforedeactivate' | - 'onbeforeeditfocus' | 'onbeforepaste' | 'onbeforeupdate' | 'onblur' | 'oncellchange' | 'onclick' | 'oncontextmenu' | 'oncontrolselect' | 'oncopy' | 'oncut' | - 'ondataavailable' | 'ondatasetchanged' | 'ondatasetcomplete' | 'ondblclick' | 'ondeactivate' | 'ondrag' | 'ondragend' | 'ondragenter' | 'ondragleave' | - 'ondragover' | 'ondragstart' | 'ondrop' | 'onerrorupdate' | 'onfilterchange' | 'onfocus' | 'onfocusin' | 'onfocusout' | 'onhelp' | 'onkeydown' | 'onkeypress' | - 'onkeyup' | 'onlayoutcomplete' | 'onlosecapture' | 'onmousedown' | 'onmouseenter' | 'onmouseleave' | 'onmousemove' | 'onmouseout' | 'onmouseover' | 'onmouseup' | - 'onmousewheel' | 'onmove' | 'onmoveend' | 'onmovestart' | 'onpage' | 'onpaste' | 'onpropertychange' | 'onreadystatechange' | 'onresize' | 'onresizeend' | - 'onresizestart' | 'onrowenter' | 'onrowexit' | 'onrowsdelete' | 'onrowsinserted' | 'onscroll' | 'onselectstart', - handler: (this: MSHTML.HTMLParaElement, parameter: {}) => void): void; - on( - obj: MSHTML.HTMLParamElement, event: 'onactivate' | 'onafterupdate' | 'onbeforeactivate' | 'onbeforecopy' | 'onbeforecut' | 'onbeforedeactivate' | - 'onbeforeeditfocus' | 'onbeforepaste' | 'onbeforeupdate' | 'onblur' | 'oncellchange' | 'onclick' | 'oncontextmenu' | 'oncontrolselect' | 'oncopy' | 'oncut' | - 'ondataavailable' | 'ondatasetchanged' | 'ondatasetcomplete' | 'ondblclick' | 'ondeactivate' | 'ondrag' | 'ondragend' | 'ondragenter' | 'ondragleave' | - 'ondragover' | 'ondragstart' | 'ondrop' | 'onerrorupdate' | 'onfilterchange' | 'onfocus' | 'onfocusin' | 'onfocusout' | 'onhelp' | 'onkeydown' | 'onkeypress' | - 'onkeyup' | 'onlayoutcomplete' | 'onlosecapture' | 'onmousedown' | 'onmouseenter' | 'onmouseleave' | 'onmousemove' | 'onmouseout' | 'onmouseover' | 'onmouseup' | - 'onmousewheel' | 'onmove' | 'onmoveend' | 'onmovestart' | 'onpage' | 'onpaste' | 'onpropertychange' | 'onreadystatechange' | 'onresize' | 'onresizeend' | - 'onresizestart' | 'onrowenter' | 'onrowexit' | 'onrowsdelete' | 'onrowsinserted' | 'onscroll' | 'onselectstart', - handler: (this: MSHTML.HTMLParamElement, parameter: {}) => void): void; - on( - obj: MSHTML.HTMLPhraseElement, event: 'onactivate' | 'onafterupdate' | 'onbeforeactivate' | 'onbeforecopy' | 'onbeforecut' | 'onbeforedeactivate' | - 'onbeforeeditfocus' | 'onbeforepaste' | 'onbeforeupdate' | 'onblur' | 'oncellchange' | 'onclick' | 'oncontextmenu' | 'oncontrolselect' | 'oncopy' | 'oncut' | - 'ondataavailable' | 'ondatasetchanged' | 'ondatasetcomplete' | 'ondblclick' | 'ondeactivate' | 'ondrag' | 'ondragend' | 'ondragenter' | 'ondragleave' | - 'ondragover' | 'ondragstart' | 'ondrop' | 'onerrorupdate' | 'onfilterchange' | 'onfocus' | 'onfocusin' | 'onfocusout' | 'onhelp' | 'onkeydown' | 'onkeypress' | - 'onkeyup' | 'onlayoutcomplete' | 'onlosecapture' | 'onmousedown' | 'onmouseenter' | 'onmouseleave' | 'onmousemove' | 'onmouseout' | 'onmouseover' | 'onmouseup' | - 'onmousewheel' | 'onmove' | 'onmoveend' | 'onmovestart' | 'onpage' | 'onpaste' | 'onpropertychange' | 'onreadystatechange' | 'onresize' | 'onresizeend' | - 'onresizestart' | 'onrowenter' | 'onrowexit' | 'onrowsdelete' | 'onrowsinserted' | 'onscroll' | 'onselectstart', - handler: (this: MSHTML.HTMLPhraseElement, parameter: {}) => void): void; - on( - obj: MSHTML.HTMLProgressElement, event: 'onactivate' | 'onafterupdate' | 'onbeforeactivate' | 'onbeforecopy' | 'onbeforecut' | 'onbeforedeactivate' | - 'onbeforeeditfocus' | 'onbeforepaste' | 'onbeforeupdate' | 'onblur' | 'oncellchange' | 'onclick' | 'oncontextmenu' | 'oncontrolselect' | 'oncopy' | 'oncut' | - 'ondataavailable' | 'ondatasetchanged' | 'ondatasetcomplete' | 'ondblclick' | 'ondeactivate' | 'ondrag' | 'ondragend' | 'ondragenter' | 'ondragleave' | - 'ondragover' | 'ondragstart' | 'ondrop' | 'onerrorupdate' | 'onfilterchange' | 'onfocus' | 'onfocusin' | 'onfocusout' | 'onhelp' | 'onkeydown' | 'onkeypress' | - 'onkeyup' | 'onlayoutcomplete' | 'onlosecapture' | 'onmousedown' | 'onmouseenter' | 'onmouseleave' | 'onmousemove' | 'onmouseout' | 'onmouseover' | 'onmouseup' | - 'onmousewheel' | 'onmove' | 'onmoveend' | 'onmovestart' | 'onpage' | 'onpaste' | 'onpropertychange' | 'onreadystatechange' | 'onresize' | 'onresizeend' | - 'onresizestart' | 'onrowenter' | 'onrowexit' | 'onrowsdelete' | 'onrowsinserted' | 'onscroll' | 'onselectstart', - handler: (this: MSHTML.HTMLProgressElement, parameter: {}) => void): void; - on( - obj: MSHTML.HTMLRichtextElement, event: 'onabort' | 'onactivate' | 'onafterupdate' | 'onbeforeactivate' | 'onbeforecopy' | 'onbeforecut' | 'onbeforedeactivate' | - 'onbeforeeditfocus' | 'onbeforepaste' | 'onbeforeupdate' | 'onblur' | 'oncellchange' | 'onchange' | 'onclick' | 'oncontextmenu' | 'oncontrolselect' | 'oncopy' | - 'oncut' | 'ondataavailable' | 'ondatasetchanged' | 'ondatasetcomplete' | 'ondblclick' | 'ondeactivate' | 'ondrag' | 'ondragend' | 'ondragenter' | 'ondragleave' | - 'ondragover' | 'ondragstart' | 'ondrop' | 'onerror' | 'onerrorupdate' | 'onfilterchange' | 'onfocus' | 'onfocusin' | 'onfocusout' | 'onhelp' | 'onkeydown' | - 'onkeypress' | 'onkeyup' | 'onlayoutcomplete' | 'onload' | 'onlosecapture' | 'onmousedown' | 'onmouseenter' | 'onmouseleave' | 'onmousemove' | 'onmouseout' | - 'onmouseover' | 'onmouseup' | 'onmousewheel' | 'onmove' | 'onmoveend' | 'onmovestart' | 'onpage' | 'onpaste' | 'onpropertychange' | 'onreadystatechange' | - 'onresize' | 'onresizeend' | 'onresizestart' | 'onrowenter' | 'onrowexit' | 'onrowsdelete' | 'onrowsinserted' | 'onscroll' | 'onselect' | 'onselectstart', - handler: (this: MSHTML.HTMLRichtextElement, parameter: {}) => void): void; - on( - obj: MSHTML.HTMLScriptElement, event: 'onactivate' | 'onafterupdate' | 'onbeforeactivate' | 'onbeforecopy' | 'onbeforecut' | 'onbeforedeactivate' | - 'onbeforeeditfocus' | 'onbeforepaste' | 'onbeforeupdate' | 'onblur' | 'oncellchange' | 'onclick' | 'oncontextmenu' | 'oncontrolselect' | 'oncopy' | 'oncut' | - 'ondataavailable' | 'ondatasetchanged' | 'ondatasetcomplete' | 'ondblclick' | 'ondeactivate' | 'ondrag' | 'ondragend' | 'ondragenter' | 'ondragleave' | - 'ondragover' | 'ondragstart' | 'ondrop' | 'onerror' | 'onerrorupdate' | 'onfilterchange' | 'onfocus' | 'onfocusin' | 'onfocusout' | 'onhelp' | 'onkeydown' | - 'onkeypress' | 'onkeyup' | 'onlayoutcomplete' | 'onlosecapture' | 'onmousedown' | 'onmouseenter' | 'onmouseleave' | 'onmousemove' | 'onmouseout' | 'onmouseover' | - 'onmouseup' | 'onmousewheel' | 'onmove' | 'onmoveend' | 'onmovestart' | 'onpage' | 'onpaste' | 'onpropertychange' | 'onreadystatechange' | 'onresize' | - 'onresizeend' | 'onresizestart' | 'onrowenter' | 'onrowexit' | 'onrowsdelete' | 'onrowsinserted' | 'onscroll' | 'onselectstart', - handler: (this: MSHTML.HTMLScriptElement, parameter: {}) => void): void; - on( - obj: MSHTML.HTMLSelectElement, event: 'onactivate' | 'onafterupdate' | 'onbeforeactivate' | 'onbeforecopy' | 'onbeforecut' | 'onbeforedeactivate' | - 'onbeforeeditfocus' | 'onbeforepaste' | 'onbeforeupdate' | 'onblur' | 'oncellchange' | 'onchange' | 'onclick' | 'oncontextmenu' | 'oncontrolselect' | 'oncopy' | - 'oncut' | 'ondataavailable' | 'ondatasetchanged' | 'ondatasetcomplete' | 'ondblclick' | 'ondeactivate' | 'ondrag' | 'ondragend' | 'ondragenter' | 'ondragleave' | - 'ondragover' | 'ondragstart' | 'ondrop' | 'onerrorupdate' | 'onfilterchange' | 'onfocus' | 'onfocusin' | 'onfocusout' | 'onhelp' | 'onkeydown' | 'onkeypress' | - 'onkeyup' | 'onlayoutcomplete' | 'onlosecapture' | 'onmousedown' | 'onmouseenter' | 'onmouseleave' | 'onmousemove' | 'onmouseout' | 'onmouseover' | 'onmouseup' | - 'onmousewheel' | 'onmove' | 'onmoveend' | 'onmovestart' | 'onpage' | 'onpaste' | 'onpropertychange' | 'onreadystatechange' | 'onresize' | 'onresizeend' | - 'onresizestart' | 'onrowenter' | 'onrowexit' | 'onrowsdelete' | 'onrowsinserted' | 'onscroll' | 'onselectstart', - handler: (this: MSHTML.HTMLSelectElement, parameter: {}) => void): void; - on( - obj: MSHTML.HTMLSemanticElement, event: 'onactivate' | 'onafterupdate' | 'onbeforeactivate' | 'onbeforecopy' | 'onbeforecut' | 'onbeforedeactivate' | - 'onbeforeeditfocus' | 'onbeforepaste' | 'onbeforeupdate' | 'onblur' | 'oncellchange' | 'onclick' | 'oncontextmenu' | 'oncontrolselect' | 'oncopy' | 'oncut' | - 'ondataavailable' | 'ondatasetchanged' | 'ondatasetcomplete' | 'ondblclick' | 'ondeactivate' | 'ondrag' | 'ondragend' | 'ondragenter' | 'ondragleave' | - 'ondragover' | 'ondragstart' | 'ondrop' | 'onerrorupdate' | 'onfilterchange' | 'onfocus' | 'onfocusin' | 'onfocusout' | 'onhelp' | 'onkeydown' | 'onkeypress' | - 'onkeyup' | 'onlayoutcomplete' | 'onlosecapture' | 'onmousedown' | 'onmouseenter' | 'onmouseleave' | 'onmousemove' | 'onmouseout' | 'onmouseover' | 'onmouseup' | - 'onmousewheel' | 'onmove' | 'onmoveend' | 'onmovestart' | 'onpage' | 'onpaste' | 'onpropertychange' | 'onreadystatechange' | 'onresize' | 'onresizeend' | - 'onresizestart' | 'onrowenter' | 'onrowexit' | 'onrowsdelete' | 'onrowsinserted' | 'onscroll' | 'onselectstart', - handler: (this: MSHTML.HTMLSemanticElement, parameter: {}) => void): void; - on( - obj: MSHTML.HTMLSourceElement, event: 'onactivate' | 'onafterupdate' | 'onbeforeactivate' | 'onbeforecopy' | 'onbeforecut' | 'onbeforedeactivate' | - 'onbeforeeditfocus' | 'onbeforepaste' | 'onbeforeupdate' | 'onblur' | 'oncellchange' | 'onclick' | 'oncontextmenu' | 'oncontrolselect' | 'oncopy' | 'oncut' | - 'ondataavailable' | 'ondatasetchanged' | 'ondatasetcomplete' | 'ondblclick' | 'ondeactivate' | 'ondrag' | 'ondragend' | 'ondragenter' | 'ondragleave' | - 'ondragover' | 'ondragstart' | 'ondrop' | 'onerrorupdate' | 'onfilterchange' | 'onfocus' | 'onfocusin' | 'onfocusout' | 'onhelp' | 'onkeydown' | 'onkeypress' | - 'onkeyup' | 'onlayoutcomplete' | 'onlosecapture' | 'onmousedown' | 'onmouseenter' | 'onmouseleave' | 'onmousemove' | 'onmouseout' | 'onmouseover' | 'onmouseup' | - 'onmousewheel' | 'onmove' | 'onmoveend' | 'onmovestart' | 'onpage' | 'onpaste' | 'onpropertychange' | 'onreadystatechange' | 'onresize' | 'onresizeend' | - 'onresizestart' | 'onrowenter' | 'onrowexit' | 'onrowsdelete' | 'onrowsinserted' | 'onscroll' | 'onselectstart', - handler: (this: MSHTML.HTMLSourceElement, parameter: {}) => void): void; - on( - obj: MSHTML.HTMLSpanElement, event: 'onactivate' | 'onafterupdate' | 'onbeforeactivate' | 'onbeforecopy' | 'onbeforecut' | 'onbeforedeactivate' | - 'onbeforeeditfocus' | 'onbeforepaste' | 'onbeforeupdate' | 'onblur' | 'oncellchange' | 'onclick' | 'oncontextmenu' | 'oncontrolselect' | 'oncopy' | 'oncut' | - 'ondataavailable' | 'ondatasetchanged' | 'ondatasetcomplete' | 'ondblclick' | 'ondeactivate' | 'ondrag' | 'ondragend' | 'ondragenter' | 'ondragleave' | - 'ondragover' | 'ondragstart' | 'ondrop' | 'onerrorupdate' | 'onfilterchange' | 'onfocus' | 'onfocusin' | 'onfocusout' | 'onhelp' | 'onkeydown' | 'onkeypress' | - 'onkeyup' | 'onlayoutcomplete' | 'onlosecapture' | 'onmousedown' | 'onmouseenter' | 'onmouseleave' | 'onmousemove' | 'onmouseout' | 'onmouseover' | 'onmouseup' | - 'onmousewheel' | 'onmove' | 'onmoveend' | 'onmovestart' | 'onpage' | 'onpaste' | 'onpropertychange' | 'onreadystatechange' | 'onresize' | 'onresizeend' | - 'onresizestart' | 'onrowenter' | 'onrowexit' | 'onrowsdelete' | 'onrowsinserted' | 'onscroll' | 'onselectstart', - handler: (this: MSHTML.HTMLSpanElement, parameter: {}) => void): void; - on( - obj: MSHTML.HTMLSpanFlow, event: 'onactivate' | 'onafterupdate' | 'onbeforeactivate' | 'onbeforecopy' | 'onbeforecut' | 'onbeforedeactivate' | - 'onbeforeeditfocus' | 'onbeforepaste' | 'onbeforeupdate' | 'onblur' | 'oncellchange' | 'onchange' | 'onclick' | 'oncontextmenu' | 'oncontrolselect' | 'oncopy' | - 'oncut' | 'ondataavailable' | 'ondatasetchanged' | 'ondatasetcomplete' | 'ondblclick' | 'ondeactivate' | 'ondrag' | 'ondragend' | 'ondragenter' | 'ondragleave' | - 'ondragover' | 'ondragstart' | 'ondrop' | 'onerrorupdate' | 'onfilterchange' | 'onfocus' | 'onfocusin' | 'onfocusout' | 'onhelp' | 'onkeydown' | 'onkeypress' | - 'onkeyup' | 'onlayoutcomplete' | 'onlosecapture' | 'onmousedown' | 'onmouseenter' | 'onmouseleave' | 'onmousemove' | 'onmouseout' | 'onmouseover' | 'onmouseup' | - 'onmousewheel' | 'onmove' | 'onmoveend' | 'onmovestart' | 'onpage' | 'onpaste' | 'onpropertychange' | 'onreadystatechange' | 'onresize' | 'onresizeend' | - 'onresizestart' | 'onrowenter' | 'onrowexit' | 'onrowsdelete' | 'onrowsinserted' | 'onscroll' | 'onselect' | 'onselectstart', handler: ( - this: MSHTML.HTMLSpanFlow, parameter: {}) => void): void; - on( - obj: MSHTML.HTMLStyleElement, event: 'onactivate' | 'onafterupdate' | 'onbeforeactivate' | 'onbeforecopy' | 'onbeforecut' | 'onbeforedeactivate' | - 'onbeforeeditfocus' | 'onbeforepaste' | 'onbeforeupdate' | 'onblur' | 'oncellchange' | 'onclick' | 'oncontextmenu' | 'oncontrolselect' | 'oncopy' | 'oncut' | - 'ondataavailable' | 'ondatasetchanged' | 'ondatasetcomplete' | 'ondblclick' | 'ondeactivate' | 'ondrag' | 'ondragend' | 'ondragenter' | 'ondragleave' | - 'ondragover' | 'ondragstart' | 'ondrop' | 'onerror' | 'onerrorupdate' | 'onfilterchange' | 'onfocus' | 'onfocusin' | 'onfocusout' | 'onhelp' | 'onkeydown' | - 'onkeypress' | 'onkeyup' | 'onlayoutcomplete' | 'onload' | 'onlosecapture' | 'onmousedown' | 'onmouseenter' | 'onmouseleave' | 'onmousemove' | 'onmouseout' | - 'onmouseover' | 'onmouseup' | 'onmousewheel' | 'onmove' | 'onmoveend' | 'onmovestart' | 'onpage' | 'onpaste' | 'onpropertychange' | 'onreadystatechange' | - 'onresize' | 'onresizeend' | 'onresizestart' | 'onrowenter' | 'onrowexit' | 'onrowsdelete' | 'onrowsinserted' | 'onscroll' | 'onselectstart', - handler: (this: MSHTML.HTMLStyleElement, parameter: {}) => void): void; - on( - obj: MSHTML.HTMLTable, event: 'onactivate' | 'onafterupdate' | 'onbeforeactivate' | 'onbeforecopy' | 'onbeforecut' | 'onbeforedeactivate' | 'onbeforeeditfocus' | - 'onbeforepaste' | 'onbeforeupdate' | 'onblur' | 'oncellchange' | 'onclick' | 'oncontextmenu' | 'oncontrolselect' | 'oncopy' | 'oncut' | 'ondataavailable' | - 'ondatasetchanged' | 'ondatasetcomplete' | 'ondblclick' | 'ondeactivate' | 'ondrag' | 'ondragend' | 'ondragenter' | 'ondragleave' | 'ondragover' | 'ondragstart' | - 'ondrop' | 'onerrorupdate' | 'onfilterchange' | 'onfocus' | 'onfocusin' | 'onfocusout' | 'onhelp' | 'onkeydown' | 'onkeypress' | 'onkeyup' | 'onlayoutcomplete' | - 'onlosecapture' | 'onmousedown' | 'onmouseenter' | 'onmouseleave' | 'onmousemove' | 'onmouseout' | 'onmouseover' | 'onmouseup' | 'onmousewheel' | 'onmove' | - 'onmoveend' | 'onmovestart' | 'onpage' | 'onpaste' | 'onpropertychange' | 'onreadystatechange' | 'onresize' | 'onresizeend' | 'onresizestart' | 'onrowenter' | - 'onrowexit' | 'onrowsdelete' | 'onrowsinserted' | 'onscroll' | 'onselectstart', - handler: (this: MSHTML.HTMLTable, parameter: {}) => void): void; - on( - obj: MSHTML.HTMLTableCaption, event: 'onactivate' | 'onafterupdate' | 'onbeforeactivate' | 'onbeforecopy' | 'onbeforecut' | 'onbeforedeactivate' | - 'onbeforeeditfocus' | 'onbeforepaste' | 'onbeforeupdate' | 'onblur' | 'oncellchange' | 'onchange' | 'onclick' | 'oncontextmenu' | 'oncontrolselect' | 'oncopy' | - 'oncut' | 'ondataavailable' | 'ondatasetchanged' | 'ondatasetcomplete' | 'ondblclick' | 'ondeactivate' | 'ondrag' | 'ondragend' | 'ondragenter' | 'ondragleave' | - 'ondragover' | 'ondragstart' | 'ondrop' | 'onerrorupdate' | 'onfilterchange' | 'onfocus' | 'onfocusin' | 'onfocusout' | 'onhelp' | 'onkeydown' | 'onkeypress' | - 'onkeyup' | 'onlayoutcomplete' | 'onlosecapture' | 'onmousedown' | 'onmouseenter' | 'onmouseleave' | 'onmousemove' | 'onmouseout' | 'onmouseover' | 'onmouseup' | - 'onmousewheel' | 'onmove' | 'onmoveend' | 'onmovestart' | 'onpage' | 'onpaste' | 'onpropertychange' | 'onreadystatechange' | 'onresize' | 'onresizeend' | - 'onresizestart' | 'onrowenter' | 'onrowexit' | 'onrowsdelete' | 'onrowsinserted' | 'onscroll' | 'onselect' | 'onselectstart', - handler: (this: MSHTML.HTMLTableCaption, parameter: {}) => void): void; - on( - obj: MSHTML.HTMLTableCell, event: 'onactivate' | 'onafterupdate' | 'onbeforeactivate' | 'onbeforecopy' | 'onbeforecut' | 'onbeforedeactivate' | - 'onbeforeeditfocus' | 'onbeforepaste' | 'onbeforeupdate' | 'onblur' | 'oncellchange' | 'onchange' | 'onclick' | 'oncontextmenu' | 'oncontrolselect' | 'oncopy' | - 'oncut' | 'ondataavailable' | 'ondatasetchanged' | 'ondatasetcomplete' | 'ondblclick' | 'ondeactivate' | 'ondrag' | 'ondragend' | 'ondragenter' | 'ondragleave' | - 'ondragover' | 'ondragstart' | 'ondrop' | 'onerrorupdate' | 'onfilterchange' | 'onfocus' | 'onfocusin' | 'onfocusout' | 'onhelp' | 'onkeydown' | 'onkeypress' | - 'onkeyup' | 'onlayoutcomplete' | 'onlosecapture' | 'onmousedown' | 'onmouseenter' | 'onmouseleave' | 'onmousemove' | 'onmouseout' | 'onmouseover' | 'onmouseup' | - 'onmousewheel' | 'onmove' | 'onmoveend' | 'onmovestart' | 'onpage' | 'onpaste' | 'onpropertychange' | 'onreadystatechange' | 'onresize' | 'onresizeend' | - 'onresizestart' | 'onrowenter' | 'onrowexit' | 'onrowsdelete' | 'onrowsinserted' | 'onscroll' | 'onselect' | 'onselectstart', handler: ( - this: MSHTML.HTMLTableCell, parameter: {}) => void): void; - on( - obj: MSHTML.HTMLTableCol, event: 'onactivate' | 'onafterupdate' | 'onbeforeactivate' | 'onbeforecopy' | 'onbeforecut' | 'onbeforedeactivate' | - 'onbeforeeditfocus' | 'onbeforepaste' | 'onbeforeupdate' | 'onblur' | 'oncellchange' | 'onclick' | 'oncontextmenu' | 'oncontrolselect' | 'oncopy' | 'oncut' | - 'ondataavailable' | 'ondatasetchanged' | 'ondatasetcomplete' | 'ondblclick' | 'ondeactivate' | 'ondrag' | 'ondragend' | 'ondragenter' | 'ondragleave' | - 'ondragover' | 'ondragstart' | 'ondrop' | 'onerrorupdate' | 'onfilterchange' | 'onfocus' | 'onfocusin' | 'onfocusout' | 'onhelp' | 'onkeydown' | 'onkeypress' | - 'onkeyup' | 'onlayoutcomplete' | 'onlosecapture' | 'onmousedown' | 'onmouseenter' | 'onmouseleave' | 'onmousemove' | 'onmouseout' | 'onmouseover' | 'onmouseup' | - 'onmousewheel' | 'onmove' | 'onmoveend' | 'onmovestart' | 'onpage' | 'onpaste' | 'onpropertychange' | 'onreadystatechange' | 'onresize' | 'onresizeend' | - 'onresizestart' | 'onrowenter' | 'onrowexit' | 'onrowsdelete' | 'onrowsinserted' | 'onscroll' | 'onselectstart', - handler: (this: MSHTML.HTMLTableCol, parameter: {}) => void): void; - on( - obj: MSHTML.HTMLTableRow, event: 'onactivate' | 'onafterupdate' | 'onbeforeactivate' | 'onbeforecopy' | 'onbeforecut' | 'onbeforedeactivate' | - 'onbeforeeditfocus' | 'onbeforepaste' | 'onbeforeupdate' | 'onblur' | 'oncellchange' | 'onclick' | 'oncontextmenu' | 'oncontrolselect' | 'oncopy' | 'oncut' | - 'ondataavailable' | 'ondatasetchanged' | 'ondatasetcomplete' | 'ondblclick' | 'ondeactivate' | 'ondrag' | 'ondragend' | 'ondragenter' | 'ondragleave' | - 'ondragover' | 'ondragstart' | 'ondrop' | 'onerrorupdate' | 'onfilterchange' | 'onfocus' | 'onfocusin' | 'onfocusout' | 'onhelp' | 'onkeydown' | 'onkeypress' | - 'onkeyup' | 'onlayoutcomplete' | 'onlosecapture' | 'onmousedown' | 'onmouseenter' | 'onmouseleave' | 'onmousemove' | 'onmouseout' | 'onmouseover' | 'onmouseup' | - 'onmousewheel' | 'onmove' | 'onmoveend' | 'onmovestart' | 'onpage' | 'onpaste' | 'onpropertychange' | 'onreadystatechange' | 'onresize' | 'onresizeend' | - 'onresizestart' | 'onrowenter' | 'onrowexit' | 'onrowsdelete' | 'onrowsinserted' | 'onscroll' | 'onselectstart', - handler: (this: MSHTML.HTMLTableRow, parameter: {}) => void): void; - on( - obj: MSHTML.HTMLTableSection, event: 'onactivate' | 'onafterupdate' | 'onbeforeactivate' | 'onbeforecopy' | 'onbeforecut' | 'onbeforedeactivate' | - 'onbeforeeditfocus' | 'onbeforepaste' | 'onbeforeupdate' | 'onblur' | 'oncellchange' | 'onclick' | 'oncontextmenu' | 'oncontrolselect' | 'oncopy' | 'oncut' | - 'ondataavailable' | 'ondatasetchanged' | 'ondatasetcomplete' | 'ondblclick' | 'ondeactivate' | 'ondrag' | 'ondragend' | 'ondragenter' | 'ondragleave' | - 'ondragover' | 'ondragstart' | 'ondrop' | 'onerrorupdate' | 'onfilterchange' | 'onfocus' | 'onfocusin' | 'onfocusout' | 'onhelp' | 'onkeydown' | 'onkeypress' | - 'onkeyup' | 'onlayoutcomplete' | 'onlosecapture' | 'onmousedown' | 'onmouseenter' | 'onmouseleave' | 'onmousemove' | 'onmouseout' | 'onmouseover' | 'onmouseup' | - 'onmousewheel' | 'onmove' | 'onmoveend' | 'onmovestart' | 'onpage' | 'onpaste' | 'onpropertychange' | 'onreadystatechange' | 'onresize' | 'onresizeend' | - 'onresizestart' | 'onrowenter' | 'onrowexit' | 'onrowsdelete' | 'onrowsinserted' | 'onscroll' | 'onselectstart', - handler: (this: MSHTML.HTMLTableSection, parameter: {}) => void): void; - on( - obj: MSHTML.HTMLTextAreaElement, event: 'onabort' | 'onactivate' | 'onafterupdate' | 'onbeforeactivate' | 'onbeforecopy' | 'onbeforecut' | 'onbeforedeactivate' | - 'onbeforeeditfocus' | 'onbeforepaste' | 'onbeforeupdate' | 'onblur' | 'oncellchange' | 'onchange' | 'onclick' | 'oncontextmenu' | 'oncontrolselect' | 'oncopy' | - 'oncut' | 'ondataavailable' | 'ondatasetchanged' | 'ondatasetcomplete' | 'ondblclick' | 'ondeactivate' | 'ondrag' | 'ondragend' | 'ondragenter' | 'ondragleave' | - 'ondragover' | 'ondragstart' | 'ondrop' | 'onerror' | 'onerrorupdate' | 'onfilterchange' | 'onfocus' | 'onfocusin' | 'onfocusout' | 'onhelp' | 'onkeydown' | - 'onkeypress' | 'onkeyup' | 'onlayoutcomplete' | 'onload' | 'onlosecapture' | 'onmousedown' | 'onmouseenter' | 'onmouseleave' | 'onmousemove' | 'onmouseout' | - 'onmouseover' | 'onmouseup' | 'onmousewheel' | 'onmove' | 'onmoveend' | 'onmovestart' | 'onpage' | 'onpaste' | 'onpropertychange' | 'onreadystatechange' | - 'onresize' | 'onresizeend' | 'onresizestart' | 'onrowenter' | 'onrowexit' | 'onrowsdelete' | 'onrowsinserted' | 'onscroll' | 'onselect' | 'onselectstart', - handler: (this: MSHTML.HTMLTextAreaElement, parameter: {}) => void): void; - on( - obj: MSHTML.HTMLTextElement, event: 'onactivate' | 'onafterupdate' | 'onbeforeactivate' | 'onbeforecopy' | 'onbeforecut' | 'onbeforedeactivate' | - 'onbeforeeditfocus' | 'onbeforepaste' | 'onbeforeupdate' | 'onblur' | 'oncellchange' | 'onclick' | 'oncontextmenu' | 'oncontrolselect' | 'oncopy' | 'oncut' | - 'ondataavailable' | 'ondatasetchanged' | 'ondatasetcomplete' | 'ondblclick' | 'ondeactivate' | 'ondrag' | 'ondragend' | 'ondragenter' | 'ondragleave' | - 'ondragover' | 'ondragstart' | 'ondrop' | 'onerrorupdate' | 'onfilterchange' | 'onfocus' | 'onfocusin' | 'onfocusout' | 'onhelp' | 'onkeydown' | 'onkeypress' | - 'onkeyup' | 'onlayoutcomplete' | 'onlosecapture' | 'onmousedown' | 'onmouseenter' | 'onmouseleave' | 'onmousemove' | 'onmouseout' | 'onmouseover' | 'onmouseup' | - 'onmousewheel' | 'onmove' | 'onmoveend' | 'onmovestart' | 'onpage' | 'onpaste' | 'onpropertychange' | 'onreadystatechange' | 'onresize' | 'onresizeend' | - 'onresizestart' | 'onrowenter' | 'onrowexit' | 'onrowsdelete' | 'onrowsinserted' | 'onscroll' | 'onselectstart', - handler: (this: MSHTML.HTMLTextElement, parameter: {}) => void): void; - on( - obj: MSHTML.HTMLTitleElement, event: 'onactivate' | 'onafterupdate' | 'onbeforeactivate' | 'onbeforecopy' | 'onbeforecut' | 'onbeforedeactivate' | - 'onbeforeeditfocus' | 'onbeforepaste' | 'onbeforeupdate' | 'onblur' | 'oncellchange' | 'onclick' | 'oncontextmenu' | 'oncontrolselect' | 'oncopy' | 'oncut' | - 'ondataavailable' | 'ondatasetchanged' | 'ondatasetcomplete' | 'ondblclick' | 'ondeactivate' | 'ondrag' | 'ondragend' | 'ondragenter' | 'ondragleave' | - 'ondragover' | 'ondragstart' | 'ondrop' | 'onerrorupdate' | 'onfilterchange' | 'onfocus' | 'onfocusin' | 'onfocusout' | 'onhelp' | 'onkeydown' | 'onkeypress' | - 'onkeyup' | 'onlayoutcomplete' | 'onlosecapture' | 'onmousedown' | 'onmouseenter' | 'onmouseleave' | 'onmousemove' | 'onmouseout' | 'onmouseover' | 'onmouseup' | - 'onmousewheel' | 'onmove' | 'onmoveend' | 'onmovestart' | 'onpage' | 'onpaste' | 'onpropertychange' | 'onreadystatechange' | 'onresize' | 'onresizeend' | - 'onresizestart' | 'onrowenter' | 'onrowexit' | 'onrowsdelete' | 'onrowsinserted' | 'onscroll' | 'onselectstart', - handler: (this: MSHTML.HTMLTitleElement, parameter: {}) => void): void; - on( - obj: MSHTML.HTMLUListElement, event: 'onactivate' | 'onafterupdate' | 'onbeforeactivate' | 'onbeforecopy' | 'onbeforecut' | 'onbeforedeactivate' | - 'onbeforeeditfocus' | 'onbeforepaste' | 'onbeforeupdate' | 'onblur' | 'oncellchange' | 'onclick' | 'oncontextmenu' | 'oncontrolselect' | 'oncopy' | 'oncut' | - 'ondataavailable' | 'ondatasetchanged' | 'ondatasetcomplete' | 'ondblclick' | 'ondeactivate' | 'ondrag' | 'ondragend' | 'ondragenter' | 'ondragleave' | - 'ondragover' | 'ondragstart' | 'ondrop' | 'onerrorupdate' | 'onfilterchange' | 'onfocus' | 'onfocusin' | 'onfocusout' | 'onhelp' | 'onkeydown' | 'onkeypress' | - 'onkeyup' | 'onlayoutcomplete' | 'onlosecapture' | 'onmousedown' | 'onmouseenter' | 'onmouseleave' | 'onmousemove' | 'onmouseout' | 'onmouseover' | 'onmouseup' | - 'onmousewheel' | 'onmove' | 'onmoveend' | 'onmovestart' | 'onpage' | 'onpaste' | 'onpropertychange' | 'onreadystatechange' | 'onresize' | 'onresizeend' | - 'onresizestart' | 'onrowenter' | 'onrowexit' | 'onrowsdelete' | 'onrowsinserted' | 'onscroll' | 'onselectstart', - handler: (this: MSHTML.HTMLUListElement, parameter: {}) => void): void; - on( - obj: MSHTML.HTMLUnknownElement, event: 'onactivate' | 'onafterupdate' | 'onbeforeactivate' | 'onbeforecopy' | 'onbeforecut' | 'onbeforedeactivate' | - 'onbeforeeditfocus' | 'onbeforepaste' | 'onbeforeupdate' | 'onblur' | 'oncellchange' | 'onclick' | 'oncontextmenu' | 'oncontrolselect' | 'oncopy' | 'oncut' | - 'ondataavailable' | 'ondatasetchanged' | 'ondatasetcomplete' | 'ondblclick' | 'ondeactivate' | 'ondrag' | 'ondragend' | 'ondragenter' | 'ondragleave' | - 'ondragover' | 'ondragstart' | 'ondrop' | 'onerrorupdate' | 'onfilterchange' | 'onfocus' | 'onfocusin' | 'onfocusout' | 'onhelp' | 'onkeydown' | 'onkeypress' | - 'onkeyup' | 'onlayoutcomplete' | 'onlosecapture' | 'onmousedown' | 'onmouseenter' | 'onmouseleave' | 'onmousemove' | 'onmouseout' | 'onmouseover' | 'onmouseup' | - 'onmousewheel' | 'onmove' | 'onmoveend' | 'onmovestart' | 'onpage' | 'onpaste' | 'onpropertychange' | 'onreadystatechange' | 'onresize' | 'onresizeend' | - 'onresizestart' | 'onrowenter' | 'onrowexit' | 'onrowsdelete' | 'onrowsinserted' | 'onscroll' | 'onselectstart', - handler: (this: MSHTML.HTMLUnknownElement, parameter: {}) => void): void; - on( - obj: MSHTML.HTMLVideoElement, event: 'onactivate' | 'onafterupdate' | 'onbeforeactivate' | 'onbeforecopy' | 'onbeforecut' | 'onbeforedeactivate' | - 'onbeforeeditfocus' | 'onbeforepaste' | 'onbeforeupdate' | 'onblur' | 'oncellchange' | 'onclick' | 'oncontextmenu' | 'oncontrolselect' | 'oncopy' | 'oncut' | - 'ondataavailable' | 'ondatasetchanged' | 'ondatasetcomplete' | 'ondblclick' | 'ondeactivate' | 'ondrag' | 'ondragend' | 'ondragenter' | 'ondragleave' | - 'ondragover' | 'ondragstart' | 'ondrop' | 'onerrorupdate' | 'onfilterchange' | 'onfocus' | 'onfocusin' | 'onfocusout' | 'onhelp' | 'onkeydown' | 'onkeypress' | - 'onkeyup' | 'onlayoutcomplete' | 'onlosecapture' | 'onmousedown' | 'onmouseenter' | 'onmouseleave' | 'onmousemove' | 'onmouseout' | 'onmouseover' | 'onmouseup' | - 'onmousewheel' | 'onmove' | 'onmoveend' | 'onmovestart' | 'onpage' | 'onpaste' | 'onpropertychange' | 'onreadystatechange' | 'onresize' | 'onresizeend' | - 'onresizestart' | 'onrowenter' | 'onrowexit' | 'onrowsdelete' | 'onrowsinserted' | 'onscroll' | 'onselectstart', - handler: (this: MSHTML.HTMLVideoElement, parameter: {}) => void): void; - on( - obj: MSHTML.HTMLWindow2, event: 'onafterprint' | 'onbeforeprint' | 'onbeforeunload' | 'onblur' | 'onfocus' | 'onhelp' | 'onload' | 'onresize' | 'onscroll' | - 'onunload', - handler: (this: MSHTML.HTMLWindow2, parameter: {}) => void): void; - on( - obj: MSHTML.HTMLWindowProxy, event: 'onafterprint' | 'onbeforeprint' | 'onbeforeunload' | 'onblur' | 'onfocus' | 'onhelp' | 'onload' | 'onresize' | 'onscroll' | - 'onunload', - handler: (this: MSHTML.HTMLWindowProxy, parameter: {}) => void): void; - on( - obj: MSHTML.HTMLWndOptionElement, event: 'onactivate' | 'onafterupdate' | 'onbeforeactivate' | 'onbeforecopy' | 'onbeforecut' | 'onbeforedeactivate' | - 'onbeforeeditfocus' | 'onbeforepaste' | 'onbeforeupdate' | 'onblur' | 'oncellchange' | 'onclick' | 'oncontextmenu' | 'oncontrolselect' | 'oncopy' | 'oncut' | - 'ondataavailable' | 'ondatasetchanged' | 'ondatasetcomplete' | 'ondblclick' | 'ondeactivate' | 'ondrag' | 'ondragend' | 'ondragenter' | 'ondragleave' | - 'ondragover' | 'ondragstart' | 'ondrop' | 'onerrorupdate' | 'onfilterchange' | 'onfocus' | 'onfocusin' | 'onfocusout' | 'onhelp' | 'onkeydown' | 'onkeypress' | - 'onkeyup' | 'onlayoutcomplete' | 'onlosecapture' | 'onmousedown' | 'onmouseenter' | 'onmouseleave' | 'onmousemove' | 'onmouseout' | 'onmouseover' | 'onmouseup' | - 'onmousewheel' | 'onmove' | 'onmoveend' | 'onmovestart' | 'onpage' | 'onpaste' | 'onpropertychange' | 'onreadystatechange' | 'onresize' | 'onresizeend' | - 'onresizestart' | 'onrowenter' | 'onrowexit' | 'onrowsdelete' | 'onrowsinserted' | 'onscroll' | 'onselectstart', - handler: (this: MSHTML.HTMLWndOptionElement, parameter: {}) => void): void; - on( - obj: MSHTML.HTMLWndSelectElement, event: 'onactivate' | 'onafterupdate' | 'onbeforeactivate' | 'onbeforecopy' | 'onbeforecut' | 'onbeforedeactivate' | - 'onbeforeeditfocus' | 'onbeforepaste' | 'onbeforeupdate' | 'onblur' | 'oncellchange' | 'onchange' | 'onclick' | 'oncontextmenu' | 'oncontrolselect' | 'oncopy' | - 'oncut' | 'ondataavailable' | 'ondatasetchanged' | 'ondatasetcomplete' | 'ondblclick' | 'ondeactivate' | 'ondrag' | 'ondragend' | 'ondragenter' | 'ondragleave' | - 'ondragover' | 'ondragstart' | 'ondrop' | 'onerrorupdate' | 'onfilterchange' | 'onfocus' | 'onfocusin' | 'onfocusout' | 'onhelp' | 'onkeydown' | 'onkeypress' | - 'onkeyup' | 'onlayoutcomplete' | 'onlosecapture' | 'onmousedown' | 'onmouseenter' | 'onmouseleave' | 'onmousemove' | 'onmouseout' | 'onmouseover' | 'onmouseup' | - 'onmousewheel' | 'onmove' | 'onmoveend' | 'onmovestart' | 'onpage' | 'onpaste' | 'onpropertychange' | 'onreadystatechange' | 'onresize' | 'onresizeend' | - 'onresizestart' | 'onrowenter' | 'onrowexit' | 'onrowsdelete' | 'onrowsinserted' | 'onscroll' | 'onselectstart', - handler: (this: MSHTML.HTMLWndSelectElement, parameter: {}) => void): void; + on(obj: MSHTML.HTMLAnchorElement, event: 'onactivate' | 'onafterupdate' | 'onbeforeactivate' | 'onbeforecopy' | 'onbeforecut' | 'onbeforedeactivate' | 'onbeforeeditfocus' | 'onbeforepaste' | 'onbeforeupdate' | 'onblur' | 'oncellchange' | 'onclick' | 'oncontextmenu' | 'oncontrolselect' | 'oncopy' | 'oncut' | 'ondataavailable' | 'ondatasetchanged' | 'ondatasetcomplete' | 'ondblclick' | 'ondeactivate' | 'ondrag' | 'ondragend' | 'ondragenter' | 'ondragleave' | 'ondragover' | 'ondragstart' | 'ondrop' | 'onerrorupdate' | 'onfilterchange' | 'onfocus' | 'onfocusin' | 'onfocusout' | 'onhelp' | 'onkeydown' | 'onkeypress' | 'onkeyup' | 'onlayoutcomplete' | 'onlosecapture' | 'onmousedown' | 'onmouseenter' | 'onmouseleave' | 'onmousemove' | 'onmouseout' | 'onmouseover' | 'onmouseup' | 'onmousewheel' | 'onmove' | 'onmoveend' | 'onmovestart' | 'onpage' | 'onpaste' | 'onpropertychange' | 'onreadystatechange' | 'onresize' | 'onresizeend' | 'onresizestart' | 'onrowenter' | 'onrowexit' | 'onrowsdelete' | 'onrowsinserted' | 'onscroll' | 'onselectstart', handler: (this: MSHTML.HTMLAnchorElement, parameter: {}) => void): void; + on(obj: MSHTML.HTMLAreaElement, event: 'onactivate' | 'onafterupdate' | 'onbeforeactivate' | 'onbeforecopy' | 'onbeforecut' | 'onbeforedeactivate' | 'onbeforeeditfocus' | 'onbeforepaste' | 'onbeforeupdate' | 'onblur' | 'oncellchange' | 'onclick' | 'oncontextmenu' | 'oncontrolselect' | 'oncopy' | 'oncut' | 'ondataavailable' | 'ondatasetchanged' | 'ondatasetcomplete' | 'ondblclick' | 'ondeactivate' | 'ondrag' | 'ondragend' | 'ondragenter' | 'ondragleave' | 'ondragover' | 'ondragstart' | 'ondrop' | 'onerrorupdate' | 'onfilterchange' | 'onfocus' | 'onfocusin' | 'onfocusout' | 'onhelp' | 'onkeydown' | 'onkeypress' | 'onkeyup' | 'onlayoutcomplete' | 'onlosecapture' | 'onmousedown' | 'onmouseenter' | 'onmouseleave' | 'onmousemove' | 'onmouseout' | 'onmouseover' | 'onmouseup' | 'onmousewheel' | 'onmove' | 'onmoveend' | 'onmovestart' | 'onpage' | 'onpaste' | 'onpropertychange' | 'onreadystatechange' | 'onresize' | 'onresizeend' | 'onresizestart' | 'onrowenter' | 'onrowexit' | 'onrowsdelete' | 'onrowsinserted' | 'onscroll' | 'onselectstart', handler: (this: MSHTML.HTMLAreaElement, parameter: {}) => void): void; + on(obj: MSHTML.HTMLAudioElement, event: 'onactivate' | 'onafterupdate' | 'onbeforeactivate' | 'onbeforecopy' | 'onbeforecut' | 'onbeforedeactivate' | 'onbeforeeditfocus' | 'onbeforepaste' | 'onbeforeupdate' | 'onblur' | 'oncellchange' | 'onclick' | 'oncontextmenu' | 'oncontrolselect' | 'oncopy' | 'oncut' | 'ondataavailable' | 'ondatasetchanged' | 'ondatasetcomplete' | 'ondblclick' | 'ondeactivate' | 'ondrag' | 'ondragend' | 'ondragenter' | 'ondragleave' | 'ondragover' | 'ondragstart' | 'ondrop' | 'onerrorupdate' | 'onfilterchange' | 'onfocus' | 'onfocusin' | 'onfocusout' | 'onhelp' | 'onkeydown' | 'onkeypress' | 'onkeyup' | 'onlayoutcomplete' | 'onlosecapture' | 'onmousedown' | 'onmouseenter' | 'onmouseleave' | 'onmousemove' | 'onmouseout' | 'onmouseover' | 'onmouseup' | 'onmousewheel' | 'onmove' | 'onmoveend' | 'onmovestart' | 'onpage' | 'onpaste' | 'onpropertychange' | 'onreadystatechange' | 'onresize' | 'onresizeend' | 'onresizestart' | 'onrowenter' | 'onrowexit' | 'onrowsdelete' | 'onrowsinserted' | 'onscroll' | 'onselectstart', handler: (this: MSHTML.HTMLAudioElement, parameter: {}) => void): void; + on(obj: MSHTML.HTMLBaseElement, event: 'onactivate' | 'onafterupdate' | 'onbeforeactivate' | 'onbeforecopy' | 'onbeforecut' | 'onbeforedeactivate' | 'onbeforeeditfocus' | 'onbeforepaste' | 'onbeforeupdate' | 'onblur' | 'oncellchange' | 'onclick' | 'oncontextmenu' | 'oncontrolselect' | 'oncopy' | 'oncut' | 'ondataavailable' | 'ondatasetchanged' | 'ondatasetcomplete' | 'ondblclick' | 'ondeactivate' | 'ondrag' | 'ondragend' | 'ondragenter' | 'ondragleave' | 'ondragover' | 'ondragstart' | 'ondrop' | 'onerrorupdate' | 'onfilterchange' | 'onfocus' | 'onfocusin' | 'onfocusout' | 'onhelp' | 'onkeydown' | 'onkeypress' | 'onkeyup' | 'onlayoutcomplete' | 'onlosecapture' | 'onmousedown' | 'onmouseenter' | 'onmouseleave' | 'onmousemove' | 'onmouseout' | 'onmouseover' | 'onmouseup' | 'onmousewheel' | 'onmove' | 'onmoveend' | 'onmovestart' | 'onpage' | 'onpaste' | 'onpropertychange' | 'onreadystatechange' | 'onresize' | 'onresizeend' | 'onresizestart' | 'onrowenter' | 'onrowexit' | 'onrowsdelete' | 'onrowsinserted' | 'onscroll' | 'onselectstart', handler: (this: MSHTML.HTMLBaseElement, parameter: {}) => void): void; + on(obj: MSHTML.HTMLBaseFontElement, event: 'onactivate' | 'onafterupdate' | 'onbeforeactivate' | 'onbeforecopy' | 'onbeforecut' | 'onbeforedeactivate' | 'onbeforeeditfocus' | 'onbeforepaste' | 'onbeforeupdate' | 'onblur' | 'oncellchange' | 'onclick' | 'oncontextmenu' | 'oncontrolselect' | 'oncopy' | 'oncut' | 'ondataavailable' | 'ondatasetchanged' | 'ondatasetcomplete' | 'ondblclick' | 'ondeactivate' | 'ondrag' | 'ondragend' | 'ondragenter' | 'ondragleave' | 'ondragover' | 'ondragstart' | 'ondrop' | 'onerrorupdate' | 'onfilterchange' | 'onfocus' | 'onfocusin' | 'onfocusout' | 'onhelp' | 'onkeydown' | 'onkeypress' | 'onkeyup' | 'onlayoutcomplete' | 'onlosecapture' | 'onmousedown' | 'onmouseenter' | 'onmouseleave' | 'onmousemove' | 'onmouseout' | 'onmouseover' | 'onmouseup' | 'onmousewheel' | 'onmove' | 'onmoveend' | 'onmovestart' | 'onpage' | 'onpaste' | 'onpropertychange' | 'onreadystatechange' | 'onresize' | 'onresizeend' | 'onresizestart' | 'onrowenter' | 'onrowexit' | 'onrowsdelete' | 'onrowsinserted' | 'onscroll' | 'onselectstart', handler: (this: MSHTML.HTMLBaseFontElement, parameter: {}) => void): void; + on(obj: MSHTML.HTMLBGsound, event: 'onactivate' | 'onafterupdate' | 'onbeforeactivate' | 'onbeforecopy' | 'onbeforecut' | 'onbeforedeactivate' | 'onbeforeeditfocus' | 'onbeforepaste' | 'onbeforeupdate' | 'onblur' | 'oncellchange' | 'onclick' | 'oncontextmenu' | 'oncontrolselect' | 'oncopy' | 'oncut' | 'ondataavailable' | 'ondatasetchanged' | 'ondatasetcomplete' | 'ondblclick' | 'ondeactivate' | 'ondrag' | 'ondragend' | 'ondragenter' | 'ondragleave' | 'ondragover' | 'ondragstart' | 'ondrop' | 'onerrorupdate' | 'onfilterchange' | 'onfocus' | 'onfocusin' | 'onfocusout' | 'onhelp' | 'onkeydown' | 'onkeypress' | 'onkeyup' | 'onlayoutcomplete' | 'onlosecapture' | 'onmousedown' | 'onmouseenter' | 'onmouseleave' | 'onmousemove' | 'onmouseout' | 'onmouseover' | 'onmouseup' | 'onmousewheel' | 'onmove' | 'onmoveend' | 'onmovestart' | 'onpage' | 'onpaste' | 'onpropertychange' | 'onreadystatechange' | 'onresize' | 'onresizeend' | 'onresizestart' | 'onrowenter' | 'onrowexit' | 'onrowsdelete' | 'onrowsinserted' | 'onscroll' | 'onselectstart', handler: (this: MSHTML.HTMLBGsound, parameter: {}) => void): void; + on(obj: MSHTML.HTMLBlockElement, event: 'onactivate' | 'onafterupdate' | 'onbeforeactivate' | 'onbeforecopy' | 'onbeforecut' | 'onbeforedeactivate' | 'onbeforeeditfocus' | 'onbeforepaste' | 'onbeforeupdate' | 'onblur' | 'oncellchange' | 'onclick' | 'oncontextmenu' | 'oncontrolselect' | 'oncopy' | 'oncut' | 'ondataavailable' | 'ondatasetchanged' | 'ondatasetcomplete' | 'ondblclick' | 'ondeactivate' | 'ondrag' | 'ondragend' | 'ondragenter' | 'ondragleave' | 'ondragover' | 'ondragstart' | 'ondrop' | 'onerrorupdate' | 'onfilterchange' | 'onfocus' | 'onfocusin' | 'onfocusout' | 'onhelp' | 'onkeydown' | 'onkeypress' | 'onkeyup' | 'onlayoutcomplete' | 'onlosecapture' | 'onmousedown' | 'onmouseenter' | 'onmouseleave' | 'onmousemove' | 'onmouseout' | 'onmouseover' | 'onmouseup' | 'onmousewheel' | 'onmove' | 'onmoveend' | 'onmovestart' | 'onpage' | 'onpaste' | 'onpropertychange' | 'onreadystatechange' | 'onresize' | 'onresizeend' | 'onresizestart' | 'onrowenter' | 'onrowexit' | 'onrowsdelete' | 'onrowsinserted' | 'onscroll' | 'onselectstart', handler: (this: MSHTML.HTMLBlockElement, parameter: {}) => void): void; + on(obj: MSHTML.HTMLBody, event: 'onactivate' | 'onafterupdate' | 'onbeforeactivate' | 'onbeforecopy' | 'onbeforecut' | 'onbeforedeactivate' | 'onbeforeeditfocus' | 'onbeforepaste' | 'onbeforeupdate' | 'onblur' | 'oncellchange' | 'onchange' | 'onclick' | 'oncontextmenu' | 'oncontrolselect' | 'oncopy' | 'oncut' | 'ondataavailable' | 'ondatasetchanged' | 'ondatasetcomplete' | 'ondblclick' | 'ondeactivate' | 'ondrag' | 'ondragend' | 'ondragenter' | 'ondragleave' | 'ondragover' | 'ondragstart' | 'ondrop' | 'onerrorupdate' | 'onfilterchange' | 'onfocus' | 'onfocusin' | 'onfocusout' | 'onhelp' | 'onkeydown' | 'onkeypress' | 'onkeyup' | 'onlayoutcomplete' | 'onlosecapture' | 'onmousedown' | 'onmouseenter' | 'onmouseleave' | 'onmousemove' | 'onmouseout' | 'onmouseover' | 'onmouseup' | 'onmousewheel' | 'onmove' | 'onmoveend' | 'onmovestart' | 'onpage' | 'onpaste' | 'onpropertychange' | 'onreadystatechange' | 'onresize' | 'onresizeend' | 'onresizestart' | 'onrowenter' | 'onrowexit' | 'onrowsdelete' | 'onrowsinserted' | 'onscroll' | 'onselect' | 'onselectstart', handler: (this: MSHTML.HTMLBody, parameter: {}) => void): void; + on(obj: MSHTML.HTMLBRElement, event: 'onactivate' | 'onafterupdate' | 'onbeforeactivate' | 'onbeforecopy' | 'onbeforecut' | 'onbeforedeactivate' | 'onbeforeeditfocus' | 'onbeforepaste' | 'onbeforeupdate' | 'onblur' | 'oncellchange' | 'onclick' | 'oncontextmenu' | 'oncontrolselect' | 'oncopy' | 'oncut' | 'ondataavailable' | 'ondatasetchanged' | 'ondatasetcomplete' | 'ondblclick' | 'ondeactivate' | 'ondrag' | 'ondragend' | 'ondragenter' | 'ondragleave' | 'ondragover' | 'ondragstart' | 'ondrop' | 'onerrorupdate' | 'onfilterchange' | 'onfocus' | 'onfocusin' | 'onfocusout' | 'onhelp' | 'onkeydown' | 'onkeypress' | 'onkeyup' | 'onlayoutcomplete' | 'onlosecapture' | 'onmousedown' | 'onmouseenter' | 'onmouseleave' | 'onmousemove' | 'onmouseout' | 'onmouseover' | 'onmouseup' | 'onmousewheel' | 'onmove' | 'onmoveend' | 'onmovestart' | 'onpage' | 'onpaste' | 'onpropertychange' | 'onreadystatechange' | 'onresize' | 'onresizeend' | 'onresizestart' | 'onrowenter' | 'onrowexit' | 'onrowsdelete' | 'onrowsinserted' | 'onscroll' | 'onselectstart', handler: (this: MSHTML.HTMLBRElement, parameter: {}) => void): void; + on(obj: MSHTML.HTMLButtonElement, event: 'onactivate' | 'onafterupdate' | 'onbeforeactivate' | 'onbeforecopy' | 'onbeforecut' | 'onbeforedeactivate' | 'onbeforeeditfocus' | 'onbeforepaste' | 'onbeforeupdate' | 'onblur' | 'oncellchange' | 'onclick' | 'oncontextmenu' | 'oncontrolselect' | 'oncopy' | 'oncut' | 'ondataavailable' | 'ondatasetchanged' | 'ondatasetcomplete' | 'ondblclick' | 'ondeactivate' | 'ondrag' | 'ondragend' | 'ondragenter' | 'ondragleave' | 'ondragover' | 'ondragstart' | 'ondrop' | 'onerrorupdate' | 'onfilterchange' | 'onfocus' | 'onfocusin' | 'onfocusout' | 'onhelp' | 'onkeydown' | 'onkeypress' | 'onkeyup' | 'onlayoutcomplete' | 'onlosecapture' | 'onmousedown' | 'onmouseenter' | 'onmouseleave' | 'onmousemove' | 'onmouseout' | 'onmouseover' | 'onmouseup' | 'onmousewheel' | 'onmove' | 'onmoveend' | 'onmovestart' | 'onpage' | 'onpaste' | 'onpropertychange' | 'onreadystatechange' | 'onresize' | 'onresizeend' | 'onresizestart' | 'onrowenter' | 'onrowexit' | 'onrowsdelete' | 'onrowsinserted' | 'onscroll' | 'onselectstart', handler: (this: MSHTML.HTMLButtonElement, parameter: {}) => void): void; + on(obj: MSHTML.HTMLCanvasElement, event: 'onactivate' | 'onafterupdate' | 'onbeforeactivate' | 'onbeforecopy' | 'onbeforecut' | 'onbeforedeactivate' | 'onbeforeeditfocus' | 'onbeforepaste' | 'onbeforeupdate' | 'onblur' | 'oncellchange' | 'onclick' | 'oncontextmenu' | 'oncontrolselect' | 'oncopy' | 'oncut' | 'ondataavailable' | 'ondatasetchanged' | 'ondatasetcomplete' | 'ondblclick' | 'ondeactivate' | 'ondrag' | 'ondragend' | 'ondragenter' | 'ondragleave' | 'ondragover' | 'ondragstart' | 'ondrop' | 'onerrorupdate' | 'onfilterchange' | 'onfocus' | 'onfocusin' | 'onfocusout' | 'onhelp' | 'onkeydown' | 'onkeypress' | 'onkeyup' | 'onlayoutcomplete' | 'onlosecapture' | 'onmousedown' | 'onmouseenter' | 'onmouseleave' | 'onmousemove' | 'onmouseout' | 'onmouseover' | 'onmouseup' | 'onmousewheel' | 'onmove' | 'onmoveend' | 'onmovestart' | 'onpage' | 'onpaste' | 'onpropertychange' | 'onreadystatechange' | 'onresize' | 'onresizeend' | 'onresizestart' | 'onrowenter' | 'onrowexit' | 'onrowsdelete' | 'onrowsinserted' | 'onscroll' | 'onselectstart', handler: (this: MSHTML.HTMLCanvasElement, parameter: {}) => void): void; + on(obj: MSHTML.HTMLCommentElement, event: 'onactivate' | 'onafterupdate' | 'onbeforeactivate' | 'onbeforecopy' | 'onbeforecut' | 'onbeforedeactivate' | 'onbeforeeditfocus' | 'onbeforepaste' | 'onbeforeupdate' | 'onblur' | 'oncellchange' | 'onclick' | 'oncontextmenu' | 'oncontrolselect' | 'oncopy' | 'oncut' | 'ondataavailable' | 'ondatasetchanged' | 'ondatasetcomplete' | 'ondblclick' | 'ondeactivate' | 'ondrag' | 'ondragend' | 'ondragenter' | 'ondragleave' | 'ondragover' | 'ondragstart' | 'ondrop' | 'onerrorupdate' | 'onfilterchange' | 'onfocus' | 'onfocusin' | 'onfocusout' | 'onhelp' | 'onkeydown' | 'onkeypress' | 'onkeyup' | 'onlayoutcomplete' | 'onlosecapture' | 'onmousedown' | 'onmouseenter' | 'onmouseleave' | 'onmousemove' | 'onmouseout' | 'onmouseover' | 'onmouseup' | 'onmousewheel' | 'onmove' | 'onmoveend' | 'onmovestart' | 'onpage' | 'onpaste' | 'onpropertychange' | 'onreadystatechange' | 'onresize' | 'onresizeend' | 'onresizestart' | 'onrowenter' | 'onrowexit' | 'onrowsdelete' | 'onrowsinserted' | 'onscroll' | 'onselectstart', handler: (this: MSHTML.HTMLCommentElement, parameter: {}) => void): void; + on(obj: MSHTML.HTMLDDElement, event: 'onactivate' | 'onafterupdate' | 'onbeforeactivate' | 'onbeforecopy' | 'onbeforecut' | 'onbeforedeactivate' | 'onbeforeeditfocus' | 'onbeforepaste' | 'onbeforeupdate' | 'onblur' | 'oncellchange' | 'onclick' | 'oncontextmenu' | 'oncontrolselect' | 'oncopy' | 'oncut' | 'ondataavailable' | 'ondatasetchanged' | 'ondatasetcomplete' | 'ondblclick' | 'ondeactivate' | 'ondrag' | 'ondragend' | 'ondragenter' | 'ondragleave' | 'ondragover' | 'ondragstart' | 'ondrop' | 'onerrorupdate' | 'onfilterchange' | 'onfocus' | 'onfocusin' | 'onfocusout' | 'onhelp' | 'onkeydown' | 'onkeypress' | 'onkeyup' | 'onlayoutcomplete' | 'onlosecapture' | 'onmousedown' | 'onmouseenter' | 'onmouseleave' | 'onmousemove' | 'onmouseout' | 'onmouseover' | 'onmouseup' | 'onmousewheel' | 'onmove' | 'onmoveend' | 'onmovestart' | 'onpage' | 'onpaste' | 'onpropertychange' | 'onreadystatechange' | 'onresize' | 'onresizeend' | 'onresizestart' | 'onrowenter' | 'onrowexit' | 'onrowsdelete' | 'onrowsinserted' | 'onscroll' | 'onselectstart', handler: (this: MSHTML.HTMLDDElement, parameter: {}) => void): void; + on(obj: MSHTML.HTMLDivElement, event: 'onactivate' | 'onafterupdate' | 'onbeforeactivate' | 'onbeforecopy' | 'onbeforecut' | 'onbeforedeactivate' | 'onbeforeeditfocus' | 'onbeforepaste' | 'onbeforeupdate' | 'onblur' | 'oncellchange' | 'onclick' | 'oncontextmenu' | 'oncontrolselect' | 'oncopy' | 'oncut' | 'ondataavailable' | 'ondatasetchanged' | 'ondatasetcomplete' | 'ondblclick' | 'ondeactivate' | 'ondrag' | 'ondragend' | 'ondragenter' | 'ondragleave' | 'ondragover' | 'ondragstart' | 'ondrop' | 'onerrorupdate' | 'onfilterchange' | 'onfocus' | 'onfocusin' | 'onfocusout' | 'onhelp' | 'onkeydown' | 'onkeypress' | 'onkeyup' | 'onlayoutcomplete' | 'onlosecapture' | 'onmousedown' | 'onmouseenter' | 'onmouseleave' | 'onmousemove' | 'onmouseout' | 'onmouseover' | 'onmouseup' | 'onmousewheel' | 'onmove' | 'onmoveend' | 'onmovestart' | 'onpage' | 'onpaste' | 'onpropertychange' | 'onreadystatechange' | 'onresize' | 'onresizeend' | 'onresizestart' | 'onrowenter' | 'onrowexit' | 'onrowsdelete' | 'onrowsinserted' | 'onscroll' | 'onselectstart', handler: (this: MSHTML.HTMLDivElement, parameter: {}) => void): void; + on(obj: MSHTML.HTMLDivPosition, event: 'onactivate' | 'onafterupdate' | 'onbeforeactivate' | 'onbeforecopy' | 'onbeforecut' | 'onbeforedeactivate' | 'onbeforeeditfocus' | 'onbeforepaste' | 'onbeforeupdate' | 'onblur' | 'oncellchange' | 'onchange' | 'onclick' | 'oncontextmenu' | 'oncontrolselect' | 'oncopy' | 'oncut' | 'ondataavailable' | 'ondatasetchanged' | 'ondatasetcomplete' | 'ondblclick' | 'ondeactivate' | 'ondrag' | 'ondragend' | 'ondragenter' | 'ondragleave' | 'ondragover' | 'ondragstart' | 'ondrop' | 'onerrorupdate' | 'onfilterchange' | 'onfocus' | 'onfocusin' | 'onfocusout' | 'onhelp' | 'onkeydown' | 'onkeypress' | 'onkeyup' | 'onlayoutcomplete' | 'onlosecapture' | 'onmousedown' | 'onmouseenter' | 'onmouseleave' | 'onmousemove' | 'onmouseout' | 'onmouseover' | 'onmouseup' | 'onmousewheel' | 'onmove' | 'onmoveend' | 'onmovestart' | 'onpage' | 'onpaste' | 'onpropertychange' | 'onreadystatechange' | 'onresize' | 'onresizeend' | 'onresizestart' | 'onrowenter' | 'onrowexit' | 'onrowsdelete' | 'onrowsinserted' | 'onscroll' | 'onselect' | 'onselectstart', handler: (this: MSHTML.HTMLDivPosition, parameter: {}) => void): void; + on(obj: MSHTML.HTMLDListElement, event: 'onactivate' | 'onafterupdate' | 'onbeforeactivate' | 'onbeforecopy' | 'onbeforecut' | 'onbeforedeactivate' | 'onbeforeeditfocus' | 'onbeforepaste' | 'onbeforeupdate' | 'onblur' | 'oncellchange' | 'onclick' | 'oncontextmenu' | 'oncontrolselect' | 'oncopy' | 'oncut' | 'ondataavailable' | 'ondatasetchanged' | 'ondatasetcomplete' | 'ondblclick' | 'ondeactivate' | 'ondrag' | 'ondragend' | 'ondragenter' | 'ondragleave' | 'ondragover' | 'ondragstart' | 'ondrop' | 'onerrorupdate' | 'onfilterchange' | 'onfocus' | 'onfocusin' | 'onfocusout' | 'onhelp' | 'onkeydown' | 'onkeypress' | 'onkeyup' | 'onlayoutcomplete' | 'onlosecapture' | 'onmousedown' | 'onmouseenter' | 'onmouseleave' | 'onmousemove' | 'onmouseout' | 'onmouseover' | 'onmouseup' | 'onmousewheel' | 'onmove' | 'onmoveend' | 'onmovestart' | 'onpage' | 'onpaste' | 'onpropertychange' | 'onreadystatechange' | 'onresize' | 'onresizeend' | 'onresizestart' | 'onrowenter' | 'onrowexit' | 'onrowsdelete' | 'onrowsinserted' | 'onscroll' | 'onselectstart', handler: (this: MSHTML.HTMLDListElement, parameter: {}) => void): void; + on(obj: MSHTML.HTMLDocument, event: 'onactivate' | 'onafterupdate' | 'onbeforeactivate' | 'onbeforedeactivate' | 'onbeforeeditfocus' | 'onbeforeupdate' | 'oncellchange' | 'onclick' | 'oncontextmenu' | 'oncontrolselect' | 'ondataavailable' | 'ondatasetchanged' | 'ondatasetcomplete' | 'ondblclick' | 'ondeactivate' | 'ondragstart' | 'onerrorupdate' | 'onfocusin' | 'onfocusout' | 'onhelp' | 'onkeydown' | 'onkeypress' | 'onkeyup' | 'onmousedown' | 'onmousemove' | 'onmouseout' | 'onmouseover' | 'onmouseup' | 'onmousewheel' | 'onpropertychange' | 'onreadystatechange' | 'onrowenter' | 'onrowexit' | 'onrowsdelete' | 'onrowsinserted' | 'onselectionchange' | 'onselectstart' | 'onstop', handler: (this: MSHTML.HTMLDocument, parameter: {}) => void): void; + on(obj: MSHTML.HTMLDTElement, event: 'onactivate' | 'onafterupdate' | 'onbeforeactivate' | 'onbeforecopy' | 'onbeforecut' | 'onbeforedeactivate' | 'onbeforeeditfocus' | 'onbeforepaste' | 'onbeforeupdate' | 'onblur' | 'oncellchange' | 'onclick' | 'oncontextmenu' | 'oncontrolselect' | 'oncopy' | 'oncut' | 'ondataavailable' | 'ondatasetchanged' | 'ondatasetcomplete' | 'ondblclick' | 'ondeactivate' | 'ondrag' | 'ondragend' | 'ondragenter' | 'ondragleave' | 'ondragover' | 'ondragstart' | 'ondrop' | 'onerrorupdate' | 'onfilterchange' | 'onfocus' | 'onfocusin' | 'onfocusout' | 'onhelp' | 'onkeydown' | 'onkeypress' | 'onkeyup' | 'onlayoutcomplete' | 'onlosecapture' | 'onmousedown' | 'onmouseenter' | 'onmouseleave' | 'onmousemove' | 'onmouseout' | 'onmouseover' | 'onmouseup' | 'onmousewheel' | 'onmove' | 'onmoveend' | 'onmovestart' | 'onpage' | 'onpaste' | 'onpropertychange' | 'onreadystatechange' | 'onresize' | 'onresizeend' | 'onresizestart' | 'onrowenter' | 'onrowexit' | 'onrowsdelete' | 'onrowsinserted' | 'onscroll' | 'onselectstart', handler: (this: MSHTML.HTMLDTElement, parameter: {}) => void): void; + on(obj: MSHTML.HTMLEmbed, event: 'onactivate' | 'onafterupdate' | 'onbeforeactivate' | 'onbeforecopy' | 'onbeforecut' | 'onbeforedeactivate' | 'onbeforeeditfocus' | 'onbeforepaste' | 'onbeforeupdate' | 'onblur' | 'oncellchange' | 'onclick' | 'oncontextmenu' | 'oncontrolselect' | 'oncopy' | 'oncut' | 'ondataavailable' | 'ondatasetchanged' | 'ondatasetcomplete' | 'ondblclick' | 'ondeactivate' | 'ondrag' | 'ondragend' | 'ondragenter' | 'ondragleave' | 'ondragover' | 'ondragstart' | 'ondrop' | 'onerrorupdate' | 'onfilterchange' | 'onfocus' | 'onfocusin' | 'onfocusout' | 'onhelp' | 'onkeydown' | 'onkeypress' | 'onkeyup' | 'onlayoutcomplete' | 'onlosecapture' | 'onmousedown' | 'onmouseenter' | 'onmouseleave' | 'onmousemove' | 'onmouseout' | 'onmouseover' | 'onmouseup' | 'onmousewheel' | 'onmove' | 'onmoveend' | 'onmovestart' | 'onpage' | 'onpaste' | 'onpropertychange' | 'onreadystatechange' | 'onresize' | 'onresizeend' | 'onresizestart' | 'onrowenter' | 'onrowexit' | 'onrowsdelete' | 'onrowsinserted' | 'onscroll' | 'onselectstart', handler: (this: MSHTML.HTMLEmbed, parameter: {}) => void): void; + on(obj: MSHTML.HTMLFieldSetElement, event: 'onactivate' | 'onafterupdate' | 'onbeforeactivate' | 'onbeforecopy' | 'onbeforecut' | 'onbeforedeactivate' | 'onbeforeeditfocus' | 'onbeforepaste' | 'onbeforeupdate' | 'onblur' | 'oncellchange' | 'onchange' | 'onclick' | 'oncontextmenu' | 'oncontrolselect' | 'oncopy' | 'oncut' | 'ondataavailable' | 'ondatasetchanged' | 'ondatasetcomplete' | 'ondblclick' | 'ondeactivate' | 'ondrag' | 'ondragend' | 'ondragenter' | 'ondragleave' | 'ondragover' | 'ondragstart' | 'ondrop' | 'onerrorupdate' | 'onfilterchange' | 'onfocus' | 'onfocusin' | 'onfocusout' | 'onhelp' | 'onkeydown' | 'onkeypress' | 'onkeyup' | 'onlayoutcomplete' | 'onlosecapture' | 'onmousedown' | 'onmouseenter' | 'onmouseleave' | 'onmousemove' | 'onmouseout' | 'onmouseover' | 'onmouseup' | 'onmousewheel' | 'onmove' | 'onmoveend' | 'onmovestart' | 'onpage' | 'onpaste' | 'onpropertychange' | 'onreadystatechange' | 'onresize' | 'onresizeend' | 'onresizestart' | 'onrowenter' | 'onrowexit' | 'onrowsdelete' | 'onrowsinserted' | 'onscroll' | 'onselect' | 'onselectstart', handler: (this: MSHTML.HTMLFieldSetElement, parameter: {}) => void): void; + on(obj: MSHTML.HTMLFontElement, event: 'onactivate' | 'onafterupdate' | 'onbeforeactivate' | 'onbeforecopy' | 'onbeforecut' | 'onbeforedeactivate' | 'onbeforeeditfocus' | 'onbeforepaste' | 'onbeforeupdate' | 'onblur' | 'oncellchange' | 'onclick' | 'oncontextmenu' | 'oncontrolselect' | 'oncopy' | 'oncut' | 'ondataavailable' | 'ondatasetchanged' | 'ondatasetcomplete' | 'ondblclick' | 'ondeactivate' | 'ondrag' | 'ondragend' | 'ondragenter' | 'ondragleave' | 'ondragover' | 'ondragstart' | 'ondrop' | 'onerrorupdate' | 'onfilterchange' | 'onfocus' | 'onfocusin' | 'onfocusout' | 'onhelp' | 'onkeydown' | 'onkeypress' | 'onkeyup' | 'onlayoutcomplete' | 'onlosecapture' | 'onmousedown' | 'onmouseenter' | 'onmouseleave' | 'onmousemove' | 'onmouseout' | 'onmouseover' | 'onmouseup' | 'onmousewheel' | 'onmove' | 'onmoveend' | 'onmovestart' | 'onpage' | 'onpaste' | 'onpropertychange' | 'onreadystatechange' | 'onresize' | 'onresizeend' | 'onresizestart' | 'onrowenter' | 'onrowexit' | 'onrowsdelete' | 'onrowsinserted' | 'onscroll' | 'onselectstart', handler: (this: MSHTML.HTMLFontElement, parameter: {}) => void): void; + on(obj: MSHTML.HTMLFormElement, event: 'onactivate' | 'onafterupdate' | 'onbeforeactivate' | 'onbeforecopy' | 'onbeforecut' | 'onbeforedeactivate' | 'onbeforeeditfocus' | 'onbeforepaste' | 'onbeforeupdate' | 'onblur' | 'oncellchange' | 'onclick' | 'oncontextmenu' | 'oncontrolselect' | 'oncopy' | 'oncut' | 'ondataavailable' | 'ondatasetchanged' | 'ondatasetcomplete' | 'ondblclick' | 'ondeactivate' | 'ondrag' | 'ondragend' | 'ondragenter' | 'ondragleave' | 'ondragover' | 'ondragstart' | 'ondrop' | 'onerrorupdate' | 'onfilterchange' | 'onfocus' | 'onfocusin' | 'onfocusout' | 'onhelp' | 'onkeydown' | 'onkeypress' | 'onkeyup' | 'onlayoutcomplete' | 'onlosecapture' | 'onmousedown' | 'onmouseenter' | 'onmouseleave' | 'onmousemove' | 'onmouseout' | 'onmouseover' | 'onmouseup' | 'onmousewheel' | 'onmove' | 'onmoveend' | 'onmovestart' | 'onpage' | 'onpaste' | 'onpropertychange' | 'onreadystatechange' | 'onreset' | 'onresize' | 'onresizeend' | 'onresizestart' | 'onrowenter' | 'onrowexit' | 'onrowsdelete' | 'onrowsinserted' | 'onscroll' | 'onselectstart' | 'onsubmit', handler: (this: MSHTML.HTMLFormElement, parameter: {}) => void): void; + on(obj: MSHTML.HTMLFrameBase, event: 'onactivate' | 'onafterupdate' | 'onbeforeactivate' | 'onbeforecopy' | 'onbeforecut' | 'onbeforedeactivate' | 'onbeforeeditfocus' | 'onbeforepaste' | 'onbeforeupdate' | 'onblur' | 'oncellchange' | 'onclick' | 'oncontextmenu' | 'oncontrolselect' | 'oncopy' | 'oncut' | 'ondataavailable' | 'ondatasetchanged' | 'ondatasetcomplete' | 'ondblclick' | 'ondeactivate' | 'ondrag' | 'ondragend' | 'ondragenter' | 'ondragleave' | 'ondragover' | 'ondragstart' | 'ondrop' | 'onerrorupdate' | 'onfilterchange' | 'onfocus' | 'onfocusin' | 'onfocusout' | 'onhelp' | 'onkeydown' | 'onkeypress' | 'onkeyup' | 'onlayoutcomplete' | 'onlosecapture' | 'onmousedown' | 'onmouseenter' | 'onmouseleave' | 'onmousemove' | 'onmouseout' | 'onmouseover' | 'onmouseup' | 'onmousewheel' | 'onmove' | 'onmoveend' | 'onmovestart' | 'onpage' | 'onpaste' | 'onpropertychange' | 'onreadystatechange' | 'onresize' | 'onresizeend' | 'onresizestart' | 'onrowenter' | 'onrowexit' | 'onrowsdelete' | 'onrowsinserted' | 'onscroll' | 'onselectstart', handler: (this: MSHTML.HTMLFrameBase, parameter: {}) => void): void; + on(obj: MSHTML.HTMLFrameElement, event: 'onactivate' | 'onafterupdate' | 'onbeforeactivate' | 'onbeforecopy' | 'onbeforecut' | 'onbeforedeactivate' | 'onbeforeeditfocus' | 'onbeforepaste' | 'onbeforeupdate' | 'onblur' | 'oncellchange' | 'onclick' | 'oncontextmenu' | 'oncontrolselect' | 'oncopy' | 'oncut' | 'ondataavailable' | 'ondatasetchanged' | 'ondatasetcomplete' | 'ondblclick' | 'ondeactivate' | 'ondrag' | 'ondragend' | 'ondragenter' | 'ondragleave' | 'ondragover' | 'ondragstart' | 'ondrop' | 'onerrorupdate' | 'onfilterchange' | 'onfocus' | 'onfocusin' | 'onfocusout' | 'onhelp' | 'onkeydown' | 'onkeypress' | 'onkeyup' | 'onlayoutcomplete' | 'onlosecapture' | 'onmousedown' | 'onmouseenter' | 'onmouseleave' | 'onmousemove' | 'onmouseout' | 'onmouseover' | 'onmouseup' | 'onmousewheel' | 'onmove' | 'onmoveend' | 'onmovestart' | 'onpage' | 'onpaste' | 'onpropertychange' | 'onreadystatechange' | 'onresize' | 'onresizeend' | 'onresizestart' | 'onrowenter' | 'onrowexit' | 'onrowsdelete' | 'onrowsinserted' | 'onscroll' | 'onselectstart', handler: (this: MSHTML.HTMLFrameElement, parameter: {}) => void): void; + on(obj: MSHTML.HTMLFrameSetSite, event: 'onactivate' | 'onafterupdate' | 'onbeforeactivate' | 'onbeforecopy' | 'onbeforecut' | 'onbeforedeactivate' | 'onbeforeeditfocus' | 'onbeforepaste' | 'onbeforeupdate' | 'onblur' | 'oncellchange' | 'onclick' | 'oncontextmenu' | 'oncontrolselect' | 'oncopy' | 'oncut' | 'ondataavailable' | 'ondatasetchanged' | 'ondatasetcomplete' | 'ondblclick' | 'ondeactivate' | 'ondrag' | 'ondragend' | 'ondragenter' | 'ondragleave' | 'ondragover' | 'ondragstart' | 'ondrop' | 'onerrorupdate' | 'onfilterchange' | 'onfocus' | 'onfocusin' | 'onfocusout' | 'onhelp' | 'onkeydown' | 'onkeypress' | 'onkeyup' | 'onlayoutcomplete' | 'onlosecapture' | 'onmousedown' | 'onmouseenter' | 'onmouseleave' | 'onmousemove' | 'onmouseout' | 'onmouseover' | 'onmouseup' | 'onmousewheel' | 'onmove' | 'onmoveend' | 'onmovestart' | 'onpage' | 'onpaste' | 'onpropertychange' | 'onreadystatechange' | 'onresize' | 'onresizeend' | 'onresizestart' | 'onrowenter' | 'onrowexit' | 'onrowsdelete' | 'onrowsinserted' | 'onscroll' | 'onselectstart', handler: (this: MSHTML.HTMLFrameSetSite, parameter: {}) => void): void; + on(obj: MSHTML.HTMLGenericElement, event: 'onactivate' | 'onafterupdate' | 'onbeforeactivate' | 'onbeforecopy' | 'onbeforecut' | 'onbeforedeactivate' | 'onbeforeeditfocus' | 'onbeforepaste' | 'onbeforeupdate' | 'onblur' | 'oncellchange' | 'onclick' | 'oncontextmenu' | 'oncontrolselect' | 'oncopy' | 'oncut' | 'ondataavailable' | 'ondatasetchanged' | 'ondatasetcomplete' | 'ondblclick' | 'ondeactivate' | 'ondrag' | 'ondragend' | 'ondragenter' | 'ondragleave' | 'ondragover' | 'ondragstart' | 'ondrop' | 'onerrorupdate' | 'onfilterchange' | 'onfocus' | 'onfocusin' | 'onfocusout' | 'onhelp' | 'onkeydown' | 'onkeypress' | 'onkeyup' | 'onlayoutcomplete' | 'onlosecapture' | 'onmousedown' | 'onmouseenter' | 'onmouseleave' | 'onmousemove' | 'onmouseout' | 'onmouseover' | 'onmouseup' | 'onmousewheel' | 'onmove' | 'onmoveend' | 'onmovestart' | 'onpage' | 'onpaste' | 'onpropertychange' | 'onreadystatechange' | 'onresize' | 'onresizeend' | 'onresizestart' | 'onrowenter' | 'onrowexit' | 'onrowsdelete' | 'onrowsinserted' | 'onscroll' | 'onselectstart', handler: (this: MSHTML.HTMLGenericElement, parameter: {}) => void): void; + on(obj: MSHTML.HTMLHeadElement, event: 'onactivate' | 'onafterupdate' | 'onbeforeactivate' | 'onbeforecopy' | 'onbeforecut' | 'onbeforedeactivate' | 'onbeforeeditfocus' | 'onbeforepaste' | 'onbeforeupdate' | 'onblur' | 'oncellchange' | 'onclick' | 'oncontextmenu' | 'oncontrolselect' | 'oncopy' | 'oncut' | 'ondataavailable' | 'ondatasetchanged' | 'ondatasetcomplete' | 'ondblclick' | 'ondeactivate' | 'ondrag' | 'ondragend' | 'ondragenter' | 'ondragleave' | 'ondragover' | 'ondragstart' | 'ondrop' | 'onerrorupdate' | 'onfilterchange' | 'onfocus' | 'onfocusin' | 'onfocusout' | 'onhelp' | 'onkeydown' | 'onkeypress' | 'onkeyup' | 'onlayoutcomplete' | 'onlosecapture' | 'onmousedown' | 'onmouseenter' | 'onmouseleave' | 'onmousemove' | 'onmouseout' | 'onmouseover' | 'onmouseup' | 'onmousewheel' | 'onmove' | 'onmoveend' | 'onmovestart' | 'onpage' | 'onpaste' | 'onpropertychange' | 'onreadystatechange' | 'onresize' | 'onresizeend' | 'onresizestart' | 'onrowenter' | 'onrowexit' | 'onrowsdelete' | 'onrowsinserted' | 'onscroll' | 'onselectstart', handler: (this: MSHTML.HTMLHeadElement, parameter: {}) => void): void; + on(obj: MSHTML.HTMLHeaderElement, event: 'onactivate' | 'onafterupdate' | 'onbeforeactivate' | 'onbeforecopy' | 'onbeforecut' | 'onbeforedeactivate' | 'onbeforeeditfocus' | 'onbeforepaste' | 'onbeforeupdate' | 'onblur' | 'oncellchange' | 'onclick' | 'oncontextmenu' | 'oncontrolselect' | 'oncopy' | 'oncut' | 'ondataavailable' | 'ondatasetchanged' | 'ondatasetcomplete' | 'ondblclick' | 'ondeactivate' | 'ondrag' | 'ondragend' | 'ondragenter' | 'ondragleave' | 'ondragover' | 'ondragstart' | 'ondrop' | 'onerrorupdate' | 'onfilterchange' | 'onfocus' | 'onfocusin' | 'onfocusout' | 'onhelp' | 'onkeydown' | 'onkeypress' | 'onkeyup' | 'onlayoutcomplete' | 'onlosecapture' | 'onmousedown' | 'onmouseenter' | 'onmouseleave' | 'onmousemove' | 'onmouseout' | 'onmouseover' | 'onmouseup' | 'onmousewheel' | 'onmove' | 'onmoveend' | 'onmovestart' | 'onpage' | 'onpaste' | 'onpropertychange' | 'onreadystatechange' | 'onresize' | 'onresizeend' | 'onresizestart' | 'onrowenter' | 'onrowexit' | 'onrowsdelete' | 'onrowsinserted' | 'onscroll' | 'onselectstart', handler: (this: MSHTML.HTMLHeaderElement, parameter: {}) => void): void; + on(obj: MSHTML.HTMLHRElement, event: 'onactivate' | 'onafterupdate' | 'onbeforeactivate' | 'onbeforecopy' | 'onbeforecut' | 'onbeforedeactivate' | 'onbeforeeditfocus' | 'onbeforepaste' | 'onbeforeupdate' | 'onblur' | 'oncellchange' | 'onclick' | 'oncontextmenu' | 'oncontrolselect' | 'oncopy' | 'oncut' | 'ondataavailable' | 'ondatasetchanged' | 'ondatasetcomplete' | 'ondblclick' | 'ondeactivate' | 'ondrag' | 'ondragend' | 'ondragenter' | 'ondragleave' | 'ondragover' | 'ondragstart' | 'ondrop' | 'onerrorupdate' | 'onfilterchange' | 'onfocus' | 'onfocusin' | 'onfocusout' | 'onhelp' | 'onkeydown' | 'onkeypress' | 'onkeyup' | 'onlayoutcomplete' | 'onlosecapture' | 'onmousedown' | 'onmouseenter' | 'onmouseleave' | 'onmousemove' | 'onmouseout' | 'onmouseover' | 'onmouseup' | 'onmousewheel' | 'onmove' | 'onmoveend' | 'onmovestart' | 'onpage' | 'onpaste' | 'onpropertychange' | 'onreadystatechange' | 'onresize' | 'onresizeend' | 'onresizestart' | 'onrowenter' | 'onrowexit' | 'onrowsdelete' | 'onrowsinserted' | 'onscroll' | 'onselectstart', handler: (this: MSHTML.HTMLHRElement, parameter: {}) => void): void; + on(obj: MSHTML.HTMLHtmlElement, event: 'onactivate' | 'onafterupdate' | 'onbeforeactivate' | 'onbeforecopy' | 'onbeforecut' | 'onbeforedeactivate' | 'onbeforeeditfocus' | 'onbeforepaste' | 'onbeforeupdate' | 'onblur' | 'oncellchange' | 'onclick' | 'oncontextmenu' | 'oncontrolselect' | 'oncopy' | 'oncut' | 'ondataavailable' | 'ondatasetchanged' | 'ondatasetcomplete' | 'ondblclick' | 'ondeactivate' | 'ondrag' | 'ondragend' | 'ondragenter' | 'ondragleave' | 'ondragover' | 'ondragstart' | 'ondrop' | 'onerrorupdate' | 'onfilterchange' | 'onfocus' | 'onfocusin' | 'onfocusout' | 'onhelp' | 'onkeydown' | 'onkeypress' | 'onkeyup' | 'onlayoutcomplete' | 'onlosecapture' | 'onmousedown' | 'onmouseenter' | 'onmouseleave' | 'onmousemove' | 'onmouseout' | 'onmouseover' | 'onmouseup' | 'onmousewheel' | 'onmove' | 'onmoveend' | 'onmovestart' | 'onpage' | 'onpaste' | 'onpropertychange' | 'onreadystatechange' | 'onresize' | 'onresizeend' | 'onresizestart' | 'onrowenter' | 'onrowexit' | 'onrowsdelete' | 'onrowsinserted' | 'onscroll' | 'onselectstart', handler: (this: MSHTML.HTMLHtmlElement, parameter: {}) => void): void; + on(obj: MSHTML.HTMLIFrame, event: 'onactivate' | 'onafterupdate' | 'onbeforeactivate' | 'onbeforecopy' | 'onbeforecut' | 'onbeforedeactivate' | 'onbeforeeditfocus' | 'onbeforepaste' | 'onbeforeupdate' | 'onblur' | 'oncellchange' | 'onclick' | 'oncontextmenu' | 'oncontrolselect' | 'oncopy' | 'oncut' | 'ondataavailable' | 'ondatasetchanged' | 'ondatasetcomplete' | 'ondblclick' | 'ondeactivate' | 'ondrag' | 'ondragend' | 'ondragenter' | 'ondragleave' | 'ondragover' | 'ondragstart' | 'ondrop' | 'onerrorupdate' | 'onfilterchange' | 'onfocus' | 'onfocusin' | 'onfocusout' | 'onhelp' | 'onkeydown' | 'onkeypress' | 'onkeyup' | 'onlayoutcomplete' | 'onlosecapture' | 'onmousedown' | 'onmouseenter' | 'onmouseleave' | 'onmousemove' | 'onmouseout' | 'onmouseover' | 'onmouseup' | 'onmousewheel' | 'onmove' | 'onmoveend' | 'onmovestart' | 'onpage' | 'onpaste' | 'onpropertychange' | 'onreadystatechange' | 'onresize' | 'onresizeend' | 'onresizestart' | 'onrowenter' | 'onrowexit' | 'onrowsdelete' | 'onrowsinserted' | 'onscroll' | 'onselectstart', handler: (this: MSHTML.HTMLIFrame, parameter: {}) => void): void; + on(obj: MSHTML.HTMLImg, event: 'onabort' | 'onactivate' | 'onafterupdate' | 'onbeforeactivate' | 'onbeforecopy' | 'onbeforecut' | 'onbeforedeactivate' | 'onbeforeeditfocus' | 'onbeforepaste' | 'onbeforeupdate' | 'onblur' | 'oncellchange' | 'onclick' | 'oncontextmenu' | 'oncontrolselect' | 'oncopy' | 'oncut' | 'ondataavailable' | 'ondatasetchanged' | 'ondatasetcomplete' | 'ondblclick' | 'ondeactivate' | 'ondrag' | 'ondragend' | 'ondragenter' | 'ondragleave' | 'ondragover' | 'ondragstart' | 'ondrop' | 'onerror' | 'onerrorupdate' | 'onfilterchange' | 'onfocus' | 'onfocusin' | 'onfocusout' | 'onhelp' | 'onkeydown' | 'onkeypress' | 'onkeyup' | 'onlayoutcomplete' | 'onload' | 'onlosecapture' | 'onmousedown' | 'onmouseenter' | 'onmouseleave' | 'onmousemove' | 'onmouseout' | 'onmouseover' | 'onmouseup' | 'onmousewheel' | 'onmove' | 'onmoveend' | 'onmovestart' | 'onpage' | 'onpaste' | 'onpropertychange' | 'onreadystatechange' | 'onresize' | 'onresizeend' | 'onresizestart' | 'onrowenter' | 'onrowexit' | 'onrowsdelete' | 'onrowsinserted' | 'onscroll' | 'onselectstart', handler: (this: MSHTML.HTMLImg, parameter: {}) => void): void; + on(obj: MSHTML.HTMLInputButtonElement, event: 'onactivate' | 'onafterupdate' | 'onbeforeactivate' | 'onbeforecopy' | 'onbeforecut' | 'onbeforedeactivate' | 'onbeforeeditfocus' | 'onbeforepaste' | 'onbeforeupdate' | 'onblur' | 'oncellchange' | 'onclick' | 'oncontextmenu' | 'oncontrolselect' | 'oncopy' | 'oncut' | 'ondataavailable' | 'ondatasetchanged' | 'ondatasetcomplete' | 'ondblclick' | 'ondeactivate' | 'ondrag' | 'ondragend' | 'ondragenter' | 'ondragleave' | 'ondragover' | 'ondragstart' | 'ondrop' | 'onerrorupdate' | 'onfilterchange' | 'onfocus' | 'onfocusin' | 'onfocusout' | 'onhelp' | 'onkeydown' | 'onkeypress' | 'onkeyup' | 'onlayoutcomplete' | 'onlosecapture' | 'onmousedown' | 'onmouseenter' | 'onmouseleave' | 'onmousemove' | 'onmouseout' | 'onmouseover' | 'onmouseup' | 'onmousewheel' | 'onmove' | 'onmoveend' | 'onmovestart' | 'onpage' | 'onpaste' | 'onpropertychange' | 'onreadystatechange' | 'onresize' | 'onresizeend' | 'onresizestart' | 'onrowenter' | 'onrowexit' | 'onrowsdelete' | 'onrowsinserted' | 'onscroll' | 'onselectstart', handler: (this: MSHTML.HTMLInputButtonElement, parameter: {}) => void): void; + on(obj: MSHTML.HTMLInputElement, event: 'onabort' | 'onactivate' | 'onafterupdate' | 'onbeforeactivate' | 'onbeforecopy' | 'onbeforecut' | 'onbeforedeactivate' | 'onbeforeeditfocus' | 'onbeforepaste' | 'onbeforeupdate' | 'onblur' | 'oncellchange' | 'onchange' | 'onclick' | 'oncontextmenu' | 'oncontrolselect' | 'oncopy' | 'oncut' | 'ondataavailable' | 'ondatasetchanged' | 'ondatasetcomplete' | 'ondblclick' | 'ondeactivate' | 'ondrag' | 'ondragend' | 'ondragenter' | 'ondragleave' | 'ondragover' | 'ondragstart' | 'ondrop' | 'onerror' | 'onerrorupdate' | 'onfilterchange' | 'onfocus' | 'onfocusin' | 'onfocusout' | 'onhelp' | 'onkeydown' | 'onkeypress' | 'onkeyup' | 'onlayoutcomplete' | 'onload' | 'onlosecapture' | 'onmousedown' | 'onmouseenter' | 'onmouseleave' | 'onmousemove' | 'onmouseout' | 'onmouseover' | 'onmouseup' | 'onmousewheel' | 'onmove' | 'onmoveend' | 'onmovestart' | 'onpage' | 'onpaste' | 'onpropertychange' | 'onreadystatechange' | 'onresize' | 'onresizeend' | 'onresizestart' | 'onrowenter' | 'onrowexit' | 'onrowsdelete' | 'onrowsinserted' | 'onscroll' | 'onselect' | 'onselectstart', handler: (this: MSHTML.HTMLInputElement, parameter: {}) => void): void; + on(obj: MSHTML.HTMLInputFileElement, event: 'onabort' | 'onactivate' | 'onafterupdate' | 'onbeforeactivate' | 'onbeforecopy' | 'onbeforecut' | 'onbeforedeactivate' | 'onbeforeeditfocus' | 'onbeforepaste' | 'onbeforeupdate' | 'onblur' | 'oncellchange' | 'onchange' | 'onclick' | 'oncontextmenu' | 'oncontrolselect' | 'oncopy' | 'oncut' | 'ondataavailable' | 'ondatasetchanged' | 'ondatasetcomplete' | 'ondblclick' | 'ondeactivate' | 'ondrag' | 'ondragend' | 'ondragenter' | 'ondragleave' | 'ondragover' | 'ondragstart' | 'ondrop' | 'onerror' | 'onerrorupdate' | 'onfilterchange' | 'onfocus' | 'onfocusin' | 'onfocusout' | 'onhelp' | 'onkeydown' | 'onkeypress' | 'onkeyup' | 'onlayoutcomplete' | 'onload' | 'onlosecapture' | 'onmousedown' | 'onmouseenter' | 'onmouseleave' | 'onmousemove' | 'onmouseout' | 'onmouseover' | 'onmouseup' | 'onmousewheel' | 'onmove' | 'onmoveend' | 'onmovestart' | 'onpage' | 'onpaste' | 'onpropertychange' | 'onreadystatechange' | 'onresize' | 'onresizeend' | 'onresizestart' | 'onrowenter' | 'onrowexit' | 'onrowsdelete' | 'onrowsinserted' | 'onscroll' | 'onselect' | 'onselectstart', handler: (this: MSHTML.HTMLInputFileElement, parameter: {}) => void): void; + on(obj: MSHTML.htmlInputImage, event: 'onabort' | 'onactivate' | 'onafterupdate' | 'onbeforeactivate' | 'onbeforecopy' | 'onbeforecut' | 'onbeforedeactivate' | 'onbeforeeditfocus' | 'onbeforepaste' | 'onbeforeupdate' | 'onblur' | 'oncellchange' | 'onclick' | 'oncontextmenu' | 'oncontrolselect' | 'oncopy' | 'oncut' | 'ondataavailable' | 'ondatasetchanged' | 'ondatasetcomplete' | 'ondblclick' | 'ondeactivate' | 'ondrag' | 'ondragend' | 'ondragenter' | 'ondragleave' | 'ondragover' | 'ondragstart' | 'ondrop' | 'onerror' | 'onerrorupdate' | 'onfilterchange' | 'onfocus' | 'onfocusin' | 'onfocusout' | 'onhelp' | 'onkeydown' | 'onkeypress' | 'onkeyup' | 'onlayoutcomplete' | 'onload' | 'onlosecapture' | 'onmousedown' | 'onmouseenter' | 'onmouseleave' | 'onmousemove' | 'onmouseout' | 'onmouseover' | 'onmouseup' | 'onmousewheel' | 'onmove' | 'onmoveend' | 'onmovestart' | 'onpage' | 'onpaste' | 'onpropertychange' | 'onreadystatechange' | 'onresize' | 'onresizeend' | 'onresizestart' | 'onrowenter' | 'onrowexit' | 'onrowsdelete' | 'onrowsinserted' | 'onscroll' | 'onselectstart', handler: (this: MSHTML.htmlInputImage, parameter: {}) => void): void; + on(obj: MSHTML.HTMLInputTextElement, event: 'onabort' | 'onactivate' | 'onafterupdate' | 'onbeforeactivate' | 'onbeforecopy' | 'onbeforecut' | 'onbeforedeactivate' | 'onbeforeeditfocus' | 'onbeforepaste' | 'onbeforeupdate' | 'onblur' | 'oncellchange' | 'onchange' | 'onclick' | 'oncontextmenu' | 'oncontrolselect' | 'oncopy' | 'oncut' | 'ondataavailable' | 'ondatasetchanged' | 'ondatasetcomplete' | 'ondblclick' | 'ondeactivate' | 'ondrag' | 'ondragend' | 'ondragenter' | 'ondragleave' | 'ondragover' | 'ondragstart' | 'ondrop' | 'onerror' | 'onerrorupdate' | 'onfilterchange' | 'onfocus' | 'onfocusin' | 'onfocusout' | 'onhelp' | 'onkeydown' | 'onkeypress' | 'onkeyup' | 'onlayoutcomplete' | 'onload' | 'onlosecapture' | 'onmousedown' | 'onmouseenter' | 'onmouseleave' | 'onmousemove' | 'onmouseout' | 'onmouseover' | 'onmouseup' | 'onmousewheel' | 'onmove' | 'onmoveend' | 'onmovestart' | 'onpage' | 'onpaste' | 'onpropertychange' | 'onreadystatechange' | 'onresize' | 'onresizeend' | 'onresizestart' | 'onrowenter' | 'onrowexit' | 'onrowsdelete' | 'onrowsinserted' | 'onscroll' | 'onselect' | 'onselectstart', handler: (this: MSHTML.HTMLInputTextElement, parameter: {}) => void): void; + on(obj: MSHTML.HTMLIsIndexElement, event: 'onactivate' | 'onafterupdate' | 'onbeforeactivate' | 'onbeforecopy' | 'onbeforecut' | 'onbeforedeactivate' | 'onbeforeeditfocus' | 'onbeforepaste' | 'onbeforeupdate' | 'onblur' | 'oncellchange' | 'onclick' | 'oncontextmenu' | 'oncontrolselect' | 'oncopy' | 'oncut' | 'ondataavailable' | 'ondatasetchanged' | 'ondatasetcomplete' | 'ondblclick' | 'ondeactivate' | 'ondrag' | 'ondragend' | 'ondragenter' | 'ondragleave' | 'ondragover' | 'ondragstart' | 'ondrop' | 'onerrorupdate' | 'onfilterchange' | 'onfocus' | 'onfocusin' | 'onfocusout' | 'onhelp' | 'onkeydown' | 'onkeypress' | 'onkeyup' | 'onlayoutcomplete' | 'onlosecapture' | 'onmousedown' | 'onmouseenter' | 'onmouseleave' | 'onmousemove' | 'onmouseout' | 'onmouseover' | 'onmouseup' | 'onmousewheel' | 'onmove' | 'onmoveend' | 'onmovestart' | 'onpage' | 'onpaste' | 'onpropertychange' | 'onreadystatechange' | 'onresize' | 'onresizeend' | 'onresizestart' | 'onrowenter' | 'onrowexit' | 'onrowsdelete' | 'onrowsinserted' | 'onscroll' | 'onselectstart', handler: (this: MSHTML.HTMLIsIndexElement, parameter: {}) => void): void; + on(obj: MSHTML.HTMLLabelElement, event: 'onactivate' | 'onafterupdate' | 'onbeforeactivate' | 'onbeforecopy' | 'onbeforecut' | 'onbeforedeactivate' | 'onbeforeeditfocus' | 'onbeforepaste' | 'onbeforeupdate' | 'onblur' | 'oncellchange' | 'onclick' | 'oncontextmenu' | 'oncontrolselect' | 'oncopy' | 'oncut' | 'ondataavailable' | 'ondatasetchanged' | 'ondatasetcomplete' | 'ondblclick' | 'ondeactivate' | 'ondrag' | 'ondragend' | 'ondragenter' | 'ondragleave' | 'ondragover' | 'ondragstart' | 'ondrop' | 'onerrorupdate' | 'onfilterchange' | 'onfocus' | 'onfocusin' | 'onfocusout' | 'onhelp' | 'onkeydown' | 'onkeypress' | 'onkeyup' | 'onlayoutcomplete' | 'onlosecapture' | 'onmousedown' | 'onmouseenter' | 'onmouseleave' | 'onmousemove' | 'onmouseout' | 'onmouseover' | 'onmouseup' | 'onmousewheel' | 'onmove' | 'onmoveend' | 'onmovestart' | 'onpage' | 'onpaste' | 'onpropertychange' | 'onreadystatechange' | 'onresize' | 'onresizeend' | 'onresizestart' | 'onrowenter' | 'onrowexit' | 'onrowsdelete' | 'onrowsinserted' | 'onscroll' | 'onselectstart', handler: (this: MSHTML.HTMLLabelElement, parameter: {}) => void): void; + on(obj: MSHTML.HTMLLegendElement, event: 'onactivate' | 'onafterupdate' | 'onbeforeactivate' | 'onbeforecopy' | 'onbeforecut' | 'onbeforedeactivate' | 'onbeforeeditfocus' | 'onbeforepaste' | 'onbeforeupdate' | 'onblur' | 'oncellchange' | 'onchange' | 'onclick' | 'oncontextmenu' | 'oncontrolselect' | 'oncopy' | 'oncut' | 'ondataavailable' | 'ondatasetchanged' | 'ondatasetcomplete' | 'ondblclick' | 'ondeactivate' | 'ondrag' | 'ondragend' | 'ondragenter' | 'ondragleave' | 'ondragover' | 'ondragstart' | 'ondrop' | 'onerrorupdate' | 'onfilterchange' | 'onfocus' | 'onfocusin' | 'onfocusout' | 'onhelp' | 'onkeydown' | 'onkeypress' | 'onkeyup' | 'onlayoutcomplete' | 'onlosecapture' | 'onmousedown' | 'onmouseenter' | 'onmouseleave' | 'onmousemove' | 'onmouseout' | 'onmouseover' | 'onmouseup' | 'onmousewheel' | 'onmove' | 'onmoveend' | 'onmovestart' | 'onpage' | 'onpaste' | 'onpropertychange' | 'onreadystatechange' | 'onresize' | 'onresizeend' | 'onresizestart' | 'onrowenter' | 'onrowexit' | 'onrowsdelete' | 'onrowsinserted' | 'onscroll' | 'onselect' | 'onselectstart', handler: (this: MSHTML.HTMLLegendElement, parameter: {}) => void): void; + on(obj: MSHTML.HTMLLIElement, event: 'onactivate' | 'onafterupdate' | 'onbeforeactivate' | 'onbeforecopy' | 'onbeforecut' | 'onbeforedeactivate' | 'onbeforeeditfocus' | 'onbeforepaste' | 'onbeforeupdate' | 'onblur' | 'oncellchange' | 'onclick' | 'oncontextmenu' | 'oncontrolselect' | 'oncopy' | 'oncut' | 'ondataavailable' | 'ondatasetchanged' | 'ondatasetcomplete' | 'ondblclick' | 'ondeactivate' | 'ondrag' | 'ondragend' | 'ondragenter' | 'ondragleave' | 'ondragover' | 'ondragstart' | 'ondrop' | 'onerrorupdate' | 'onfilterchange' | 'onfocus' | 'onfocusin' | 'onfocusout' | 'onhelp' | 'onkeydown' | 'onkeypress' | 'onkeyup' | 'onlayoutcomplete' | 'onlosecapture' | 'onmousedown' | 'onmouseenter' | 'onmouseleave' | 'onmousemove' | 'onmouseout' | 'onmouseover' | 'onmouseup' | 'onmousewheel' | 'onmove' | 'onmoveend' | 'onmovestart' | 'onpage' | 'onpaste' | 'onpropertychange' | 'onreadystatechange' | 'onresize' | 'onresizeend' | 'onresizestart' | 'onrowenter' | 'onrowexit' | 'onrowsdelete' | 'onrowsinserted' | 'onscroll' | 'onselectstart', handler: (this: MSHTML.HTMLLIElement, parameter: {}) => void): void; + on(obj: MSHTML.HTMLLinkElement, event: 'onactivate' | 'onafterupdate' | 'onbeforeactivate' | 'onbeforecopy' | 'onbeforecut' | 'onbeforedeactivate' | 'onbeforeeditfocus' | 'onbeforepaste' | 'onbeforeupdate' | 'onblur' | 'oncellchange' | 'onclick' | 'oncontextmenu' | 'oncontrolselect' | 'oncopy' | 'oncut' | 'ondataavailable' | 'ondatasetchanged' | 'ondatasetcomplete' | 'ondblclick' | 'ondeactivate' | 'ondrag' | 'ondragend' | 'ondragenter' | 'ondragleave' | 'ondragover' | 'ondragstart' | 'ondrop' | 'onerror' | 'onerrorupdate' | 'onfilterchange' | 'onfocus' | 'onfocusin' | 'onfocusout' | 'onhelp' | 'onkeydown' | 'onkeypress' | 'onkeyup' | 'onlayoutcomplete' | 'onload' | 'onlosecapture' | 'onmousedown' | 'onmouseenter' | 'onmouseleave' | 'onmousemove' | 'onmouseout' | 'onmouseover' | 'onmouseup' | 'onmousewheel' | 'onmove' | 'onmoveend' | 'onmovestart' | 'onpage' | 'onpaste' | 'onpropertychange' | 'onreadystatechange' | 'onresize' | 'onresizeend' | 'onresizestart' | 'onrowenter' | 'onrowexit' | 'onrowsdelete' | 'onrowsinserted' | 'onscroll' | 'onselectstart', handler: (this: MSHTML.HTMLLinkElement, parameter: {}) => void): void; + on(obj: MSHTML.HTMLListElement, event: 'onactivate' | 'onafterupdate' | 'onbeforeactivate' | 'onbeforecopy' | 'onbeforecut' | 'onbeforedeactivate' | 'onbeforeeditfocus' | 'onbeforepaste' | 'onbeforeupdate' | 'onblur' | 'oncellchange' | 'onclick' | 'oncontextmenu' | 'oncontrolselect' | 'oncopy' | 'oncut' | 'ondataavailable' | 'ondatasetchanged' | 'ondatasetcomplete' | 'ondblclick' | 'ondeactivate' | 'ondrag' | 'ondragend' | 'ondragenter' | 'ondragleave' | 'ondragover' | 'ondragstart' | 'ondrop' | 'onerrorupdate' | 'onfilterchange' | 'onfocus' | 'onfocusin' | 'onfocusout' | 'onhelp' | 'onkeydown' | 'onkeypress' | 'onkeyup' | 'onlayoutcomplete' | 'onlosecapture' | 'onmousedown' | 'onmouseenter' | 'onmouseleave' | 'onmousemove' | 'onmouseout' | 'onmouseover' | 'onmouseup' | 'onmousewheel' | 'onmove' | 'onmoveend' | 'onmovestart' | 'onpage' | 'onpaste' | 'onpropertychange' | 'onreadystatechange' | 'onresize' | 'onresizeend' | 'onresizestart' | 'onrowenter' | 'onrowexit' | 'onrowsdelete' | 'onrowsinserted' | 'onscroll' | 'onselectstart', handler: (this: MSHTML.HTMLListElement, parameter: {}) => void): void; + on(obj: MSHTML.HTMLMapElement, event: 'onactivate' | 'onafterupdate' | 'onbeforeactivate' | 'onbeforecopy' | 'onbeforecut' | 'onbeforedeactivate' | 'onbeforeeditfocus' | 'onbeforepaste' | 'onbeforeupdate' | 'onblur' | 'oncellchange' | 'onclick' | 'oncontextmenu' | 'oncontrolselect' | 'oncopy' | 'oncut' | 'ondataavailable' | 'ondatasetchanged' | 'ondatasetcomplete' | 'ondblclick' | 'ondeactivate' | 'ondrag' | 'ondragend' | 'ondragenter' | 'ondragleave' | 'ondragover' | 'ondragstart' | 'ondrop' | 'onerrorupdate' | 'onfilterchange' | 'onfocus' | 'onfocusin' | 'onfocusout' | 'onhelp' | 'onkeydown' | 'onkeypress' | 'onkeyup' | 'onlayoutcomplete' | 'onlosecapture' | 'onmousedown' | 'onmouseenter' | 'onmouseleave' | 'onmousemove' | 'onmouseout' | 'onmouseover' | 'onmouseup' | 'onmousewheel' | 'onmove' | 'onmoveend' | 'onmovestart' | 'onpage' | 'onpaste' | 'onpropertychange' | 'onreadystatechange' | 'onresize' | 'onresizeend' | 'onresizestart' | 'onrowenter' | 'onrowexit' | 'onrowsdelete' | 'onrowsinserted' | 'onscroll' | 'onselectstart', handler: (this: MSHTML.HTMLMapElement, parameter: {}) => void): void; + on(obj: MSHTML.HTMLMarqueeElement, event: 'onactivate' | 'onafterupdate' | 'onbeforeactivate' | 'onbeforecopy' | 'onbeforecut' | 'onbeforedeactivate' | 'onbeforeeditfocus' | 'onbeforepaste' | 'onbeforeupdate' | 'onblur' | 'onbounce' | 'oncellchange' | 'onchange' | 'onclick' | 'oncontextmenu' | 'oncontrolselect' | 'oncopy' | 'oncut' | 'ondataavailable' | 'ondatasetchanged' | 'ondatasetcomplete' | 'ondblclick' | 'ondeactivate' | 'ondrag' | 'ondragend' | 'ondragenter' | 'ondragleave' | 'ondragover' | 'ondragstart' | 'ondrop' | 'onerrorupdate' | 'onfilterchange' | 'onfinish' | 'onfocus' | 'onfocusin' | 'onfocusout' | 'onhelp' | 'onkeydown' | 'onkeypress' | 'onkeyup' | 'onlayoutcomplete' | 'onlosecapture' | 'onmousedown' | 'onmouseenter' | 'onmouseleave' | 'onmousemove' | 'onmouseout' | 'onmouseover' | 'onmouseup' | 'onmousewheel' | 'onmove' | 'onmoveend' | 'onmovestart' | 'onpage' | 'onpaste' | 'onpropertychange' | 'onreadystatechange' | 'onresize' | 'onresizeend' | 'onresizestart' | 'onrowenter' | 'onrowexit' | 'onrowsdelete' | 'onrowsinserted' | 'onscroll' | 'onselect' | 'onselectstart' | 'onstart', handler: (this: MSHTML.HTMLMarqueeElement, parameter: {}) => void): void; + on(obj: MSHTML.HTMLMediaElement, event: 'onactivate' | 'onafterupdate' | 'onbeforeactivate' | 'onbeforecopy' | 'onbeforecut' | 'onbeforedeactivate' | 'onbeforeeditfocus' | 'onbeforepaste' | 'onbeforeupdate' | 'onblur' | 'oncellchange' | 'onclick' | 'oncontextmenu' | 'oncontrolselect' | 'oncopy' | 'oncut' | 'ondataavailable' | 'ondatasetchanged' | 'ondatasetcomplete' | 'ondblclick' | 'ondeactivate' | 'ondrag' | 'ondragend' | 'ondragenter' | 'ondragleave' | 'ondragover' | 'ondragstart' | 'ondrop' | 'onerrorupdate' | 'onfilterchange' | 'onfocus' | 'onfocusin' | 'onfocusout' | 'onhelp' | 'onkeydown' | 'onkeypress' | 'onkeyup' | 'onlayoutcomplete' | 'onlosecapture' | 'onmousedown' | 'onmouseenter' | 'onmouseleave' | 'onmousemove' | 'onmouseout' | 'onmouseover' | 'onmouseup' | 'onmousewheel' | 'onmove' | 'onmoveend' | 'onmovestart' | 'onpage' | 'onpaste' | 'onpropertychange' | 'onreadystatechange' | 'onresize' | 'onresizeend' | 'onresizestart' | 'onrowenter' | 'onrowexit' | 'onrowsdelete' | 'onrowsinserted' | 'onscroll' | 'onselectstart', handler: (this: MSHTML.HTMLMediaElement, parameter: {}) => void): void; + on(obj: MSHTML.HTMLMetaElement, event: 'onactivate' | 'onafterupdate' | 'onbeforeactivate' | 'onbeforecopy' | 'onbeforecut' | 'onbeforedeactivate' | 'onbeforeeditfocus' | 'onbeforepaste' | 'onbeforeupdate' | 'onblur' | 'oncellchange' | 'onclick' | 'oncontextmenu' | 'oncontrolselect' | 'oncopy' | 'oncut' | 'ondataavailable' | 'ondatasetchanged' | 'ondatasetcomplete' | 'ondblclick' | 'ondeactivate' | 'ondrag' | 'ondragend' | 'ondragenter' | 'ondragleave' | 'ondragover' | 'ondragstart' | 'ondrop' | 'onerrorupdate' | 'onfilterchange' | 'onfocus' | 'onfocusin' | 'onfocusout' | 'onhelp' | 'onkeydown' | 'onkeypress' | 'onkeyup' | 'onlayoutcomplete' | 'onlosecapture' | 'onmousedown' | 'onmouseenter' | 'onmouseleave' | 'onmousemove' | 'onmouseout' | 'onmouseover' | 'onmouseup' | 'onmousewheel' | 'onmove' | 'onmoveend' | 'onmovestart' | 'onpage' | 'onpaste' | 'onpropertychange' | 'onreadystatechange' | 'onresize' | 'onresizeend' | 'onresizestart' | 'onrowenter' | 'onrowexit' | 'onrowsdelete' | 'onrowsinserted' | 'onscroll' | 'onselectstart', handler: (this: MSHTML.HTMLMetaElement, parameter: {}) => void): void; + on(obj: MSHTML.HTMLNextIdElement, event: 'onactivate' | 'onafterupdate' | 'onbeforeactivate' | 'onbeforecopy' | 'onbeforecut' | 'onbeforedeactivate' | 'onbeforeeditfocus' | 'onbeforepaste' | 'onbeforeupdate' | 'onblur' | 'oncellchange' | 'onclick' | 'oncontextmenu' | 'oncontrolselect' | 'oncopy' | 'oncut' | 'ondataavailable' | 'ondatasetchanged' | 'ondatasetcomplete' | 'ondblclick' | 'ondeactivate' | 'ondrag' | 'ondragend' | 'ondragenter' | 'ondragleave' | 'ondragover' | 'ondragstart' | 'ondrop' | 'onerrorupdate' | 'onfilterchange' | 'onfocus' | 'onfocusin' | 'onfocusout' | 'onhelp' | 'onkeydown' | 'onkeypress' | 'onkeyup' | 'onlayoutcomplete' | 'onlosecapture' | 'onmousedown' | 'onmouseenter' | 'onmouseleave' | 'onmousemove' | 'onmouseout' | 'onmouseover' | 'onmouseup' | 'onmousewheel' | 'onmove' | 'onmoveend' | 'onmovestart' | 'onpage' | 'onpaste' | 'onpropertychange' | 'onreadystatechange' | 'onresize' | 'onresizeend' | 'onresizestart' | 'onrowenter' | 'onrowexit' | 'onrowsdelete' | 'onrowsinserted' | 'onscroll' | 'onselectstart', handler: (this: MSHTML.HTMLNextIdElement, parameter: {}) => void): void; + on(obj: MSHTML.HTMLNoShowElement, event: 'onactivate' | 'onafterupdate' | 'onbeforeactivate' | 'onbeforecopy' | 'onbeforecut' | 'onbeforedeactivate' | 'onbeforeeditfocus' | 'onbeforepaste' | 'onbeforeupdate' | 'onblur' | 'oncellchange' | 'onclick' | 'oncontextmenu' | 'oncontrolselect' | 'oncopy' | 'oncut' | 'ondataavailable' | 'ondatasetchanged' | 'ondatasetcomplete' | 'ondblclick' | 'ondeactivate' | 'ondrag' | 'ondragend' | 'ondragenter' | 'ondragleave' | 'ondragover' | 'ondragstart' | 'ondrop' | 'onerrorupdate' | 'onfilterchange' | 'onfocus' | 'onfocusin' | 'onfocusout' | 'onhelp' | 'onkeydown' | 'onkeypress' | 'onkeyup' | 'onlayoutcomplete' | 'onlosecapture' | 'onmousedown' | 'onmouseenter' | 'onmouseleave' | 'onmousemove' | 'onmouseout' | 'onmouseover' | 'onmouseup' | 'onmousewheel' | 'onmove' | 'onmoveend' | 'onmovestart' | 'onpage' | 'onpaste' | 'onpropertychange' | 'onreadystatechange' | 'onresize' | 'onresizeend' | 'onresizestart' | 'onrowenter' | 'onrowexit' | 'onrowsdelete' | 'onrowsinserted' | 'onscroll' | 'onselectstart', handler: (this: MSHTML.HTMLNoShowElement, parameter: {}) => void): void; + on(obj: MSHTML.HTMLObjectElement, event: 'onafterupdate' | 'onbeforeupdate' | 'oncellchange' | 'ondataavailable' | 'ondatasetchanged' | 'ondatasetcomplete' | 'onerror' | 'onerrorupdate' | 'onreadystatechange' | 'onrowenter' | 'onrowexit' | 'onrowsdelete' | 'onrowsinserted', handler: (this: MSHTML.HTMLObjectElement, parameter: {}) => void): void; + on(obj: MSHTML.HTMLOListElement, event: 'onactivate' | 'onafterupdate' | 'onbeforeactivate' | 'onbeforecopy' | 'onbeforecut' | 'onbeforedeactivate' | 'onbeforeeditfocus' | 'onbeforepaste' | 'onbeforeupdate' | 'onblur' | 'oncellchange' | 'onclick' | 'oncontextmenu' | 'oncontrolselect' | 'oncopy' | 'oncut' | 'ondataavailable' | 'ondatasetchanged' | 'ondatasetcomplete' | 'ondblclick' | 'ondeactivate' | 'ondrag' | 'ondragend' | 'ondragenter' | 'ondragleave' | 'ondragover' | 'ondragstart' | 'ondrop' | 'onerrorupdate' | 'onfilterchange' | 'onfocus' | 'onfocusin' | 'onfocusout' | 'onhelp' | 'onkeydown' | 'onkeypress' | 'onkeyup' | 'onlayoutcomplete' | 'onlosecapture' | 'onmousedown' | 'onmouseenter' | 'onmouseleave' | 'onmousemove' | 'onmouseout' | 'onmouseover' | 'onmouseup' | 'onmousewheel' | 'onmove' | 'onmoveend' | 'onmovestart' | 'onpage' | 'onpaste' | 'onpropertychange' | 'onreadystatechange' | 'onresize' | 'onresizeend' | 'onresizestart' | 'onrowenter' | 'onrowexit' | 'onrowsdelete' | 'onrowsinserted' | 'onscroll' | 'onselectstart', handler: (this: MSHTML.HTMLOListElement, parameter: {}) => void): void; + on(obj: MSHTML.HTMLOptionButtonElement, event: 'onabort' | 'onactivate' | 'onafterupdate' | 'onbeforeactivate' | 'onbeforecopy' | 'onbeforecut' | 'onbeforedeactivate' | 'onbeforeeditfocus' | 'onbeforepaste' | 'onbeforeupdate' | 'onblur' | 'oncellchange' | 'onchange' | 'onclick' | 'oncontextmenu' | 'oncontrolselect' | 'oncopy' | 'oncut' | 'ondataavailable' | 'ondatasetchanged' | 'ondatasetcomplete' | 'ondblclick' | 'ondeactivate' | 'ondrag' | 'ondragend' | 'ondragenter' | 'ondragleave' | 'ondragover' | 'ondragstart' | 'ondrop' | 'onerror' | 'onerrorupdate' | 'onfilterchange' | 'onfocus' | 'onfocusin' | 'onfocusout' | 'onhelp' | 'onkeydown' | 'onkeypress' | 'onkeyup' | 'onlayoutcomplete' | 'onload' | 'onlosecapture' | 'onmousedown' | 'onmouseenter' | 'onmouseleave' | 'onmousemove' | 'onmouseout' | 'onmouseover' | 'onmouseup' | 'onmousewheel' | 'onmove' | 'onmoveend' | 'onmovestart' | 'onpage' | 'onpaste' | 'onpropertychange' | 'onreadystatechange' | 'onresize' | 'onresizeend' | 'onresizestart' | 'onrowenter' | 'onrowexit' | 'onrowsdelete' | 'onrowsinserted' | 'onscroll' | 'onselect' | 'onselectstart', handler: (this: MSHTML.HTMLOptionButtonElement, parameter: {}) => void): void; + on(obj: MSHTML.HTMLOptionElement, event: 'onactivate' | 'onafterupdate' | 'onbeforeactivate' | 'onbeforecopy' | 'onbeforecut' | 'onbeforedeactivate' | 'onbeforeeditfocus' | 'onbeforepaste' | 'onbeforeupdate' | 'onblur' | 'oncellchange' | 'onclick' | 'oncontextmenu' | 'oncontrolselect' | 'oncopy' | 'oncut' | 'ondataavailable' | 'ondatasetchanged' | 'ondatasetcomplete' | 'ondblclick' | 'ondeactivate' | 'ondrag' | 'ondragend' | 'ondragenter' | 'ondragleave' | 'ondragover' | 'ondragstart' | 'ondrop' | 'onerrorupdate' | 'onfilterchange' | 'onfocus' | 'onfocusin' | 'onfocusout' | 'onhelp' | 'onkeydown' | 'onkeypress' | 'onkeyup' | 'onlayoutcomplete' | 'onlosecapture' | 'onmousedown' | 'onmouseenter' | 'onmouseleave' | 'onmousemove' | 'onmouseout' | 'onmouseover' | 'onmouseup' | 'onmousewheel' | 'onmove' | 'onmoveend' | 'onmovestart' | 'onpage' | 'onpaste' | 'onpropertychange' | 'onreadystatechange' | 'onresize' | 'onresizeend' | 'onresizestart' | 'onrowenter' | 'onrowexit' | 'onrowsdelete' | 'onrowsinserted' | 'onscroll' | 'onselectstart', handler: (this: MSHTML.HTMLOptionElement, parameter: {}) => void): void; + on(obj: MSHTML.HTMLParaElement, event: 'onactivate' | 'onafterupdate' | 'onbeforeactivate' | 'onbeforecopy' | 'onbeforecut' | 'onbeforedeactivate' | 'onbeforeeditfocus' | 'onbeforepaste' | 'onbeforeupdate' | 'onblur' | 'oncellchange' | 'onclick' | 'oncontextmenu' | 'oncontrolselect' | 'oncopy' | 'oncut' | 'ondataavailable' | 'ondatasetchanged' | 'ondatasetcomplete' | 'ondblclick' | 'ondeactivate' | 'ondrag' | 'ondragend' | 'ondragenter' | 'ondragleave' | 'ondragover' | 'ondragstart' | 'ondrop' | 'onerrorupdate' | 'onfilterchange' | 'onfocus' | 'onfocusin' | 'onfocusout' | 'onhelp' | 'onkeydown' | 'onkeypress' | 'onkeyup' | 'onlayoutcomplete' | 'onlosecapture' | 'onmousedown' | 'onmouseenter' | 'onmouseleave' | 'onmousemove' | 'onmouseout' | 'onmouseover' | 'onmouseup' | 'onmousewheel' | 'onmove' | 'onmoveend' | 'onmovestart' | 'onpage' | 'onpaste' | 'onpropertychange' | 'onreadystatechange' | 'onresize' | 'onresizeend' | 'onresizestart' | 'onrowenter' | 'onrowexit' | 'onrowsdelete' | 'onrowsinserted' | 'onscroll' | 'onselectstart', handler: (this: MSHTML.HTMLParaElement, parameter: {}) => void): void; + on(obj: MSHTML.HTMLParamElement, event: 'onactivate' | 'onafterupdate' | 'onbeforeactivate' | 'onbeforecopy' | 'onbeforecut' | 'onbeforedeactivate' | 'onbeforeeditfocus' | 'onbeforepaste' | 'onbeforeupdate' | 'onblur' | 'oncellchange' | 'onclick' | 'oncontextmenu' | 'oncontrolselect' | 'oncopy' | 'oncut' | 'ondataavailable' | 'ondatasetchanged' | 'ondatasetcomplete' | 'ondblclick' | 'ondeactivate' | 'ondrag' | 'ondragend' | 'ondragenter' | 'ondragleave' | 'ondragover' | 'ondragstart' | 'ondrop' | 'onerrorupdate' | 'onfilterchange' | 'onfocus' | 'onfocusin' | 'onfocusout' | 'onhelp' | 'onkeydown' | 'onkeypress' | 'onkeyup' | 'onlayoutcomplete' | 'onlosecapture' | 'onmousedown' | 'onmouseenter' | 'onmouseleave' | 'onmousemove' | 'onmouseout' | 'onmouseover' | 'onmouseup' | 'onmousewheel' | 'onmove' | 'onmoveend' | 'onmovestart' | 'onpage' | 'onpaste' | 'onpropertychange' | 'onreadystatechange' | 'onresize' | 'onresizeend' | 'onresizestart' | 'onrowenter' | 'onrowexit' | 'onrowsdelete' | 'onrowsinserted' | 'onscroll' | 'onselectstart', handler: (this: MSHTML.HTMLParamElement, parameter: {}) => void): void; + on(obj: MSHTML.HTMLPhraseElement, event: 'onactivate' | 'onafterupdate' | 'onbeforeactivate' | 'onbeforecopy' | 'onbeforecut' | 'onbeforedeactivate' | 'onbeforeeditfocus' | 'onbeforepaste' | 'onbeforeupdate' | 'onblur' | 'oncellchange' | 'onclick' | 'oncontextmenu' | 'oncontrolselect' | 'oncopy' | 'oncut' | 'ondataavailable' | 'ondatasetchanged' | 'ondatasetcomplete' | 'ondblclick' | 'ondeactivate' | 'ondrag' | 'ondragend' | 'ondragenter' | 'ondragleave' | 'ondragover' | 'ondragstart' | 'ondrop' | 'onerrorupdate' | 'onfilterchange' | 'onfocus' | 'onfocusin' | 'onfocusout' | 'onhelp' | 'onkeydown' | 'onkeypress' | 'onkeyup' | 'onlayoutcomplete' | 'onlosecapture' | 'onmousedown' | 'onmouseenter' | 'onmouseleave' | 'onmousemove' | 'onmouseout' | 'onmouseover' | 'onmouseup' | 'onmousewheel' | 'onmove' | 'onmoveend' | 'onmovestart' | 'onpage' | 'onpaste' | 'onpropertychange' | 'onreadystatechange' | 'onresize' | 'onresizeend' | 'onresizestart' | 'onrowenter' | 'onrowexit' | 'onrowsdelete' | 'onrowsinserted' | 'onscroll' | 'onselectstart', handler: (this: MSHTML.HTMLPhraseElement, parameter: {}) => void): void; + on(obj: MSHTML.HTMLProgressElement, event: 'onactivate' | 'onafterupdate' | 'onbeforeactivate' | 'onbeforecopy' | 'onbeforecut' | 'onbeforedeactivate' | 'onbeforeeditfocus' | 'onbeforepaste' | 'onbeforeupdate' | 'onblur' | 'oncellchange' | 'onclick' | 'oncontextmenu' | 'oncontrolselect' | 'oncopy' | 'oncut' | 'ondataavailable' | 'ondatasetchanged' | 'ondatasetcomplete' | 'ondblclick' | 'ondeactivate' | 'ondrag' | 'ondragend' | 'ondragenter' | 'ondragleave' | 'ondragover' | 'ondragstart' | 'ondrop' | 'onerrorupdate' | 'onfilterchange' | 'onfocus' | 'onfocusin' | 'onfocusout' | 'onhelp' | 'onkeydown' | 'onkeypress' | 'onkeyup' | 'onlayoutcomplete' | 'onlosecapture' | 'onmousedown' | 'onmouseenter' | 'onmouseleave' | 'onmousemove' | 'onmouseout' | 'onmouseover' | 'onmouseup' | 'onmousewheel' | 'onmove' | 'onmoveend' | 'onmovestart' | 'onpage' | 'onpaste' | 'onpropertychange' | 'onreadystatechange' | 'onresize' | 'onresizeend' | 'onresizestart' | 'onrowenter' | 'onrowexit' | 'onrowsdelete' | 'onrowsinserted' | 'onscroll' | 'onselectstart', handler: (this: MSHTML.HTMLProgressElement, parameter: {}) => void): void; + on(obj: MSHTML.HTMLRichtextElement, event: 'onabort' | 'onactivate' | 'onafterupdate' | 'onbeforeactivate' | 'onbeforecopy' | 'onbeforecut' | 'onbeforedeactivate' | 'onbeforeeditfocus' | 'onbeforepaste' | 'onbeforeupdate' | 'onblur' | 'oncellchange' | 'onchange' | 'onclick' | 'oncontextmenu' | 'oncontrolselect' | 'oncopy' | 'oncut' | 'ondataavailable' | 'ondatasetchanged' | 'ondatasetcomplete' | 'ondblclick' | 'ondeactivate' | 'ondrag' | 'ondragend' | 'ondragenter' | 'ondragleave' | 'ondragover' | 'ondragstart' | 'ondrop' | 'onerror' | 'onerrorupdate' | 'onfilterchange' | 'onfocus' | 'onfocusin' | 'onfocusout' | 'onhelp' | 'onkeydown' | 'onkeypress' | 'onkeyup' | 'onlayoutcomplete' | 'onload' | 'onlosecapture' | 'onmousedown' | 'onmouseenter' | 'onmouseleave' | 'onmousemove' | 'onmouseout' | 'onmouseover' | 'onmouseup' | 'onmousewheel' | 'onmove' | 'onmoveend' | 'onmovestart' | 'onpage' | 'onpaste' | 'onpropertychange' | 'onreadystatechange' | 'onresize' | 'onresizeend' | 'onresizestart' | 'onrowenter' | 'onrowexit' | 'onrowsdelete' | 'onrowsinserted' | 'onscroll' | 'onselect' | 'onselectstart', handler: (this: MSHTML.HTMLRichtextElement, parameter: {}) => void): void; + on(obj: MSHTML.HTMLScriptElement, event: 'onactivate' | 'onafterupdate' | 'onbeforeactivate' | 'onbeforecopy' | 'onbeforecut' | 'onbeforedeactivate' | 'onbeforeeditfocus' | 'onbeforepaste' | 'onbeforeupdate' | 'onblur' | 'oncellchange' | 'onclick' | 'oncontextmenu' | 'oncontrolselect' | 'oncopy' | 'oncut' | 'ondataavailable' | 'ondatasetchanged' | 'ondatasetcomplete' | 'ondblclick' | 'ondeactivate' | 'ondrag' | 'ondragend' | 'ondragenter' | 'ondragleave' | 'ondragover' | 'ondragstart' | 'ondrop' | 'onerror' | 'onerrorupdate' | 'onfilterchange' | 'onfocus' | 'onfocusin' | 'onfocusout' | 'onhelp' | 'onkeydown' | 'onkeypress' | 'onkeyup' | 'onlayoutcomplete' | 'onlosecapture' | 'onmousedown' | 'onmouseenter' | 'onmouseleave' | 'onmousemove' | 'onmouseout' | 'onmouseover' | 'onmouseup' | 'onmousewheel' | 'onmove' | 'onmoveend' | 'onmovestart' | 'onpage' | 'onpaste' | 'onpropertychange' | 'onreadystatechange' | 'onresize' | 'onresizeend' | 'onresizestart' | 'onrowenter' | 'onrowexit' | 'onrowsdelete' | 'onrowsinserted' | 'onscroll' | 'onselectstart', handler: (this: MSHTML.HTMLScriptElement, parameter: {}) => void): void; + on(obj: MSHTML.HTMLSelectElement, event: 'onactivate' | 'onafterupdate' | 'onbeforeactivate' | 'onbeforecopy' | 'onbeforecut' | 'onbeforedeactivate' | 'onbeforeeditfocus' | 'onbeforepaste' | 'onbeforeupdate' | 'onblur' | 'oncellchange' | 'onchange' | 'onclick' | 'oncontextmenu' | 'oncontrolselect' | 'oncopy' | 'oncut' | 'ondataavailable' | 'ondatasetchanged' | 'ondatasetcomplete' | 'ondblclick' | 'ondeactivate' | 'ondrag' | 'ondragend' | 'ondragenter' | 'ondragleave' | 'ondragover' | 'ondragstart' | 'ondrop' | 'onerrorupdate' | 'onfilterchange' | 'onfocus' | 'onfocusin' | 'onfocusout' | 'onhelp' | 'onkeydown' | 'onkeypress' | 'onkeyup' | 'onlayoutcomplete' | 'onlosecapture' | 'onmousedown' | 'onmouseenter' | 'onmouseleave' | 'onmousemove' | 'onmouseout' | 'onmouseover' | 'onmouseup' | 'onmousewheel' | 'onmove' | 'onmoveend' | 'onmovestart' | 'onpage' | 'onpaste' | 'onpropertychange' | 'onreadystatechange' | 'onresize' | 'onresizeend' | 'onresizestart' | 'onrowenter' | 'onrowexit' | 'onrowsdelete' | 'onrowsinserted' | 'onscroll' | 'onselectstart', handler: (this: MSHTML.HTMLSelectElement, parameter: {}) => void): void; + on(obj: MSHTML.HTMLSemanticElement, event: 'onactivate' | 'onafterupdate' | 'onbeforeactivate' | 'onbeforecopy' | 'onbeforecut' | 'onbeforedeactivate' | 'onbeforeeditfocus' | 'onbeforepaste' | 'onbeforeupdate' | 'onblur' | 'oncellchange' | 'onclick' | 'oncontextmenu' | 'oncontrolselect' | 'oncopy' | 'oncut' | 'ondataavailable' | 'ondatasetchanged' | 'ondatasetcomplete' | 'ondblclick' | 'ondeactivate' | 'ondrag' | 'ondragend' | 'ondragenter' | 'ondragleave' | 'ondragover' | 'ondragstart' | 'ondrop' | 'onerrorupdate' | 'onfilterchange' | 'onfocus' | 'onfocusin' | 'onfocusout' | 'onhelp' | 'onkeydown' | 'onkeypress' | 'onkeyup' | 'onlayoutcomplete' | 'onlosecapture' | 'onmousedown' | 'onmouseenter' | 'onmouseleave' | 'onmousemove' | 'onmouseout' | 'onmouseover' | 'onmouseup' | 'onmousewheel' | 'onmove' | 'onmoveend' | 'onmovestart' | 'onpage' | 'onpaste' | 'onpropertychange' | 'onreadystatechange' | 'onresize' | 'onresizeend' | 'onresizestart' | 'onrowenter' | 'onrowexit' | 'onrowsdelete' | 'onrowsinserted' | 'onscroll' | 'onselectstart', handler: (this: MSHTML.HTMLSemanticElement, parameter: {}) => void): void; + on(obj: MSHTML.HTMLSourceElement, event: 'onactivate' | 'onafterupdate' | 'onbeforeactivate' | 'onbeforecopy' | 'onbeforecut' | 'onbeforedeactivate' | 'onbeforeeditfocus' | 'onbeforepaste' | 'onbeforeupdate' | 'onblur' | 'oncellchange' | 'onclick' | 'oncontextmenu' | 'oncontrolselect' | 'oncopy' | 'oncut' | 'ondataavailable' | 'ondatasetchanged' | 'ondatasetcomplete' | 'ondblclick' | 'ondeactivate' | 'ondrag' | 'ondragend' | 'ondragenter' | 'ondragleave' | 'ondragover' | 'ondragstart' | 'ondrop' | 'onerrorupdate' | 'onfilterchange' | 'onfocus' | 'onfocusin' | 'onfocusout' | 'onhelp' | 'onkeydown' | 'onkeypress' | 'onkeyup' | 'onlayoutcomplete' | 'onlosecapture' | 'onmousedown' | 'onmouseenter' | 'onmouseleave' | 'onmousemove' | 'onmouseout' | 'onmouseover' | 'onmouseup' | 'onmousewheel' | 'onmove' | 'onmoveend' | 'onmovestart' | 'onpage' | 'onpaste' | 'onpropertychange' | 'onreadystatechange' | 'onresize' | 'onresizeend' | 'onresizestart' | 'onrowenter' | 'onrowexit' | 'onrowsdelete' | 'onrowsinserted' | 'onscroll' | 'onselectstart', handler: (this: MSHTML.HTMLSourceElement, parameter: {}) => void): void; + on(obj: MSHTML.HTMLSpanElement, event: 'onactivate' | 'onafterupdate' | 'onbeforeactivate' | 'onbeforecopy' | 'onbeforecut' | 'onbeforedeactivate' | 'onbeforeeditfocus' | 'onbeforepaste' | 'onbeforeupdate' | 'onblur' | 'oncellchange' | 'onclick' | 'oncontextmenu' | 'oncontrolselect' | 'oncopy' | 'oncut' | 'ondataavailable' | 'ondatasetchanged' | 'ondatasetcomplete' | 'ondblclick' | 'ondeactivate' | 'ondrag' | 'ondragend' | 'ondragenter' | 'ondragleave' | 'ondragover' | 'ondragstart' | 'ondrop' | 'onerrorupdate' | 'onfilterchange' | 'onfocus' | 'onfocusin' | 'onfocusout' | 'onhelp' | 'onkeydown' | 'onkeypress' | 'onkeyup' | 'onlayoutcomplete' | 'onlosecapture' | 'onmousedown' | 'onmouseenter' | 'onmouseleave' | 'onmousemove' | 'onmouseout' | 'onmouseover' | 'onmouseup' | 'onmousewheel' | 'onmove' | 'onmoveend' | 'onmovestart' | 'onpage' | 'onpaste' | 'onpropertychange' | 'onreadystatechange' | 'onresize' | 'onresizeend' | 'onresizestart' | 'onrowenter' | 'onrowexit' | 'onrowsdelete' | 'onrowsinserted' | 'onscroll' | 'onselectstart', handler: (this: MSHTML.HTMLSpanElement, parameter: {}) => void): void; + on(obj: MSHTML.HTMLSpanFlow, event: 'onactivate' | 'onafterupdate' | 'onbeforeactivate' | 'onbeforecopy' | 'onbeforecut' | 'onbeforedeactivate' | 'onbeforeeditfocus' | 'onbeforepaste' | 'onbeforeupdate' | 'onblur' | 'oncellchange' | 'onchange' | 'onclick' | 'oncontextmenu' | 'oncontrolselect' | 'oncopy' | 'oncut' | 'ondataavailable' | 'ondatasetchanged' | 'ondatasetcomplete' | 'ondblclick' | 'ondeactivate' | 'ondrag' | 'ondragend' | 'ondragenter' | 'ondragleave' | 'ondragover' | 'ondragstart' | 'ondrop' | 'onerrorupdate' | 'onfilterchange' | 'onfocus' | 'onfocusin' | 'onfocusout' | 'onhelp' | 'onkeydown' | 'onkeypress' | 'onkeyup' | 'onlayoutcomplete' | 'onlosecapture' | 'onmousedown' | 'onmouseenter' | 'onmouseleave' | 'onmousemove' | 'onmouseout' | 'onmouseover' | 'onmouseup' | 'onmousewheel' | 'onmove' | 'onmoveend' | 'onmovestart' | 'onpage' | 'onpaste' | 'onpropertychange' | 'onreadystatechange' | 'onresize' | 'onresizeend' | 'onresizestart' | 'onrowenter' | 'onrowexit' | 'onrowsdelete' | 'onrowsinserted' | 'onscroll' | 'onselect' | 'onselectstart', handler: (this: MSHTML.HTMLSpanFlow, parameter: {}) => void): void; + on(obj: MSHTML.HTMLStyleElement, event: 'onactivate' | 'onafterupdate' | 'onbeforeactivate' | 'onbeforecopy' | 'onbeforecut' | 'onbeforedeactivate' | 'onbeforeeditfocus' | 'onbeforepaste' | 'onbeforeupdate' | 'onblur' | 'oncellchange' | 'onclick' | 'oncontextmenu' | 'oncontrolselect' | 'oncopy' | 'oncut' | 'ondataavailable' | 'ondatasetchanged' | 'ondatasetcomplete' | 'ondblclick' | 'ondeactivate' | 'ondrag' | 'ondragend' | 'ondragenter' | 'ondragleave' | 'ondragover' | 'ondragstart' | 'ondrop' | 'onerror' | 'onerrorupdate' | 'onfilterchange' | 'onfocus' | 'onfocusin' | 'onfocusout' | 'onhelp' | 'onkeydown' | 'onkeypress' | 'onkeyup' | 'onlayoutcomplete' | 'onload' | 'onlosecapture' | 'onmousedown' | 'onmouseenter' | 'onmouseleave' | 'onmousemove' | 'onmouseout' | 'onmouseover' | 'onmouseup' | 'onmousewheel' | 'onmove' | 'onmoveend' | 'onmovestart' | 'onpage' | 'onpaste' | 'onpropertychange' | 'onreadystatechange' | 'onresize' | 'onresizeend' | 'onresizestart' | 'onrowenter' | 'onrowexit' | 'onrowsdelete' | 'onrowsinserted' | 'onscroll' | 'onselectstart', handler: (this: MSHTML.HTMLStyleElement, parameter: {}) => void): void; + on(obj: MSHTML.HTMLTable, event: 'onactivate' | 'onafterupdate' | 'onbeforeactivate' | 'onbeforecopy' | 'onbeforecut' | 'onbeforedeactivate' | 'onbeforeeditfocus' | 'onbeforepaste' | 'onbeforeupdate' | 'onblur' | 'oncellchange' | 'onclick' | 'oncontextmenu' | 'oncontrolselect' | 'oncopy' | 'oncut' | 'ondataavailable' | 'ondatasetchanged' | 'ondatasetcomplete' | 'ondblclick' | 'ondeactivate' | 'ondrag' | 'ondragend' | 'ondragenter' | 'ondragleave' | 'ondragover' | 'ondragstart' | 'ondrop' | 'onerrorupdate' | 'onfilterchange' | 'onfocus' | 'onfocusin' | 'onfocusout' | 'onhelp' | 'onkeydown' | 'onkeypress' | 'onkeyup' | 'onlayoutcomplete' | 'onlosecapture' | 'onmousedown' | 'onmouseenter' | 'onmouseleave' | 'onmousemove' | 'onmouseout' | 'onmouseover' | 'onmouseup' | 'onmousewheel' | 'onmove' | 'onmoveend' | 'onmovestart' | 'onpage' | 'onpaste' | 'onpropertychange' | 'onreadystatechange' | 'onresize' | 'onresizeend' | 'onresizestart' | 'onrowenter' | 'onrowexit' | 'onrowsdelete' | 'onrowsinserted' | 'onscroll' | 'onselectstart', handler: (this: MSHTML.HTMLTable, parameter: {}) => void): void; + on(obj: MSHTML.HTMLTableCaption, event: 'onactivate' | 'onafterupdate' | 'onbeforeactivate' | 'onbeforecopy' | 'onbeforecut' | 'onbeforedeactivate' | 'onbeforeeditfocus' | 'onbeforepaste' | 'onbeforeupdate' | 'onblur' | 'oncellchange' | 'onchange' | 'onclick' | 'oncontextmenu' | 'oncontrolselect' | 'oncopy' | 'oncut' | 'ondataavailable' | 'ondatasetchanged' | 'ondatasetcomplete' | 'ondblclick' | 'ondeactivate' | 'ondrag' | 'ondragend' | 'ondragenter' | 'ondragleave' | 'ondragover' | 'ondragstart' | 'ondrop' | 'onerrorupdate' | 'onfilterchange' | 'onfocus' | 'onfocusin' | 'onfocusout' | 'onhelp' | 'onkeydown' | 'onkeypress' | 'onkeyup' | 'onlayoutcomplete' | 'onlosecapture' | 'onmousedown' | 'onmouseenter' | 'onmouseleave' | 'onmousemove' | 'onmouseout' | 'onmouseover' | 'onmouseup' | 'onmousewheel' | 'onmove' | 'onmoveend' | 'onmovestart' | 'onpage' | 'onpaste' | 'onpropertychange' | 'onreadystatechange' | 'onresize' | 'onresizeend' | 'onresizestart' | 'onrowenter' | 'onrowexit' | 'onrowsdelete' | 'onrowsinserted' | 'onscroll' | 'onselect' | 'onselectstart', handler: (this: MSHTML.HTMLTableCaption, parameter: {}) => void): void; + on(obj: MSHTML.HTMLTableCell, event: 'onactivate' | 'onafterupdate' | 'onbeforeactivate' | 'onbeforecopy' | 'onbeforecut' | 'onbeforedeactivate' | 'onbeforeeditfocus' | 'onbeforepaste' | 'onbeforeupdate' | 'onblur' | 'oncellchange' | 'onchange' | 'onclick' | 'oncontextmenu' | 'oncontrolselect' | 'oncopy' | 'oncut' | 'ondataavailable' | 'ondatasetchanged' | 'ondatasetcomplete' | 'ondblclick' | 'ondeactivate' | 'ondrag' | 'ondragend' | 'ondragenter' | 'ondragleave' | 'ondragover' | 'ondragstart' | 'ondrop' | 'onerrorupdate' | 'onfilterchange' | 'onfocus' | 'onfocusin' | 'onfocusout' | 'onhelp' | 'onkeydown' | 'onkeypress' | 'onkeyup' | 'onlayoutcomplete' | 'onlosecapture' | 'onmousedown' | 'onmouseenter' | 'onmouseleave' | 'onmousemove' | 'onmouseout' | 'onmouseover' | 'onmouseup' | 'onmousewheel' | 'onmove' | 'onmoveend' | 'onmovestart' | 'onpage' | 'onpaste' | 'onpropertychange' | 'onreadystatechange' | 'onresize' | 'onresizeend' | 'onresizestart' | 'onrowenter' | 'onrowexit' | 'onrowsdelete' | 'onrowsinserted' | 'onscroll' | 'onselect' | 'onselectstart', handler: (this: MSHTML.HTMLTableCell, parameter: {}) => void): void; + on(obj: MSHTML.HTMLTableCol, event: 'onactivate' | 'onafterupdate' | 'onbeforeactivate' | 'onbeforecopy' | 'onbeforecut' | 'onbeforedeactivate' | 'onbeforeeditfocus' | 'onbeforepaste' | 'onbeforeupdate' | 'onblur' | 'oncellchange' | 'onclick' | 'oncontextmenu' | 'oncontrolselect' | 'oncopy' | 'oncut' | 'ondataavailable' | 'ondatasetchanged' | 'ondatasetcomplete' | 'ondblclick' | 'ondeactivate' | 'ondrag' | 'ondragend' | 'ondragenter' | 'ondragleave' | 'ondragover' | 'ondragstart' | 'ondrop' | 'onerrorupdate' | 'onfilterchange' | 'onfocus' | 'onfocusin' | 'onfocusout' | 'onhelp' | 'onkeydown' | 'onkeypress' | 'onkeyup' | 'onlayoutcomplete' | 'onlosecapture' | 'onmousedown' | 'onmouseenter' | 'onmouseleave' | 'onmousemove' | 'onmouseout' | 'onmouseover' | 'onmouseup' | 'onmousewheel' | 'onmove' | 'onmoveend' | 'onmovestart' | 'onpage' | 'onpaste' | 'onpropertychange' | 'onreadystatechange' | 'onresize' | 'onresizeend' | 'onresizestart' | 'onrowenter' | 'onrowexit' | 'onrowsdelete' | 'onrowsinserted' | 'onscroll' | 'onselectstart', handler: (this: MSHTML.HTMLTableCol, parameter: {}) => void): void; + on(obj: MSHTML.HTMLTableRow, event: 'onactivate' | 'onafterupdate' | 'onbeforeactivate' | 'onbeforecopy' | 'onbeforecut' | 'onbeforedeactivate' | 'onbeforeeditfocus' | 'onbeforepaste' | 'onbeforeupdate' | 'onblur' | 'oncellchange' | 'onclick' | 'oncontextmenu' | 'oncontrolselect' | 'oncopy' | 'oncut' | 'ondataavailable' | 'ondatasetchanged' | 'ondatasetcomplete' | 'ondblclick' | 'ondeactivate' | 'ondrag' | 'ondragend' | 'ondragenter' | 'ondragleave' | 'ondragover' | 'ondragstart' | 'ondrop' | 'onerrorupdate' | 'onfilterchange' | 'onfocus' | 'onfocusin' | 'onfocusout' | 'onhelp' | 'onkeydown' | 'onkeypress' | 'onkeyup' | 'onlayoutcomplete' | 'onlosecapture' | 'onmousedown' | 'onmouseenter' | 'onmouseleave' | 'onmousemove' | 'onmouseout' | 'onmouseover' | 'onmouseup' | 'onmousewheel' | 'onmove' | 'onmoveend' | 'onmovestart' | 'onpage' | 'onpaste' | 'onpropertychange' | 'onreadystatechange' | 'onresize' | 'onresizeend' | 'onresizestart' | 'onrowenter' | 'onrowexit' | 'onrowsdelete' | 'onrowsinserted' | 'onscroll' | 'onselectstart', handler: (this: MSHTML.HTMLTableRow, parameter: {}) => void): void; + on(obj: MSHTML.HTMLTableSection, event: 'onactivate' | 'onafterupdate' | 'onbeforeactivate' | 'onbeforecopy' | 'onbeforecut' | 'onbeforedeactivate' | 'onbeforeeditfocus' | 'onbeforepaste' | 'onbeforeupdate' | 'onblur' | 'oncellchange' | 'onclick' | 'oncontextmenu' | 'oncontrolselect' | 'oncopy' | 'oncut' | 'ondataavailable' | 'ondatasetchanged' | 'ondatasetcomplete' | 'ondblclick' | 'ondeactivate' | 'ondrag' | 'ondragend' | 'ondragenter' | 'ondragleave' | 'ondragover' | 'ondragstart' | 'ondrop' | 'onerrorupdate' | 'onfilterchange' | 'onfocus' | 'onfocusin' | 'onfocusout' | 'onhelp' | 'onkeydown' | 'onkeypress' | 'onkeyup' | 'onlayoutcomplete' | 'onlosecapture' | 'onmousedown' | 'onmouseenter' | 'onmouseleave' | 'onmousemove' | 'onmouseout' | 'onmouseover' | 'onmouseup' | 'onmousewheel' | 'onmove' | 'onmoveend' | 'onmovestart' | 'onpage' | 'onpaste' | 'onpropertychange' | 'onreadystatechange' | 'onresize' | 'onresizeend' | 'onresizestart' | 'onrowenter' | 'onrowexit' | 'onrowsdelete' | 'onrowsinserted' | 'onscroll' | 'onselectstart', handler: (this: MSHTML.HTMLTableSection, parameter: {}) => void): void; + on(obj: MSHTML.HTMLTextAreaElement, event: 'onabort' | 'onactivate' | 'onafterupdate' | 'onbeforeactivate' | 'onbeforecopy' | 'onbeforecut' | 'onbeforedeactivate' | 'onbeforeeditfocus' | 'onbeforepaste' | 'onbeforeupdate' | 'onblur' | 'oncellchange' | 'onchange' | 'onclick' | 'oncontextmenu' | 'oncontrolselect' | 'oncopy' | 'oncut' | 'ondataavailable' | 'ondatasetchanged' | 'ondatasetcomplete' | 'ondblclick' | 'ondeactivate' | 'ondrag' | 'ondragend' | 'ondragenter' | 'ondragleave' | 'ondragover' | 'ondragstart' | 'ondrop' | 'onerror' | 'onerrorupdate' | 'onfilterchange' | 'onfocus' | 'onfocusin' | 'onfocusout' | 'onhelp' | 'onkeydown' | 'onkeypress' | 'onkeyup' | 'onlayoutcomplete' | 'onload' | 'onlosecapture' | 'onmousedown' | 'onmouseenter' | 'onmouseleave' | 'onmousemove' | 'onmouseout' | 'onmouseover' | 'onmouseup' | 'onmousewheel' | 'onmove' | 'onmoveend' | 'onmovestart' | 'onpage' | 'onpaste' | 'onpropertychange' | 'onreadystatechange' | 'onresize' | 'onresizeend' | 'onresizestart' | 'onrowenter' | 'onrowexit' | 'onrowsdelete' | 'onrowsinserted' | 'onscroll' | 'onselect' | 'onselectstart', handler: (this: MSHTML.HTMLTextAreaElement, parameter: {}) => void): void; + on(obj: MSHTML.HTMLTextElement, event: 'onactivate' | 'onafterupdate' | 'onbeforeactivate' | 'onbeforecopy' | 'onbeforecut' | 'onbeforedeactivate' | 'onbeforeeditfocus' | 'onbeforepaste' | 'onbeforeupdate' | 'onblur' | 'oncellchange' | 'onclick' | 'oncontextmenu' | 'oncontrolselect' | 'oncopy' | 'oncut' | 'ondataavailable' | 'ondatasetchanged' | 'ondatasetcomplete' | 'ondblclick' | 'ondeactivate' | 'ondrag' | 'ondragend' | 'ondragenter' | 'ondragleave' | 'ondragover' | 'ondragstart' | 'ondrop' | 'onerrorupdate' | 'onfilterchange' | 'onfocus' | 'onfocusin' | 'onfocusout' | 'onhelp' | 'onkeydown' | 'onkeypress' | 'onkeyup' | 'onlayoutcomplete' | 'onlosecapture' | 'onmousedown' | 'onmouseenter' | 'onmouseleave' | 'onmousemove' | 'onmouseout' | 'onmouseover' | 'onmouseup' | 'onmousewheel' | 'onmove' | 'onmoveend' | 'onmovestart' | 'onpage' | 'onpaste' | 'onpropertychange' | 'onreadystatechange' | 'onresize' | 'onresizeend' | 'onresizestart' | 'onrowenter' | 'onrowexit' | 'onrowsdelete' | 'onrowsinserted' | 'onscroll' | 'onselectstart', handler: (this: MSHTML.HTMLTextElement, parameter: {}) => void): void; + on(obj: MSHTML.HTMLTitleElement, event: 'onactivate' | 'onafterupdate' | 'onbeforeactivate' | 'onbeforecopy' | 'onbeforecut' | 'onbeforedeactivate' | 'onbeforeeditfocus' | 'onbeforepaste' | 'onbeforeupdate' | 'onblur' | 'oncellchange' | 'onclick' | 'oncontextmenu' | 'oncontrolselect' | 'oncopy' | 'oncut' | 'ondataavailable' | 'ondatasetchanged' | 'ondatasetcomplete' | 'ondblclick' | 'ondeactivate' | 'ondrag' | 'ondragend' | 'ondragenter' | 'ondragleave' | 'ondragover' | 'ondragstart' | 'ondrop' | 'onerrorupdate' | 'onfilterchange' | 'onfocus' | 'onfocusin' | 'onfocusout' | 'onhelp' | 'onkeydown' | 'onkeypress' | 'onkeyup' | 'onlayoutcomplete' | 'onlosecapture' | 'onmousedown' | 'onmouseenter' | 'onmouseleave' | 'onmousemove' | 'onmouseout' | 'onmouseover' | 'onmouseup' | 'onmousewheel' | 'onmove' | 'onmoveend' | 'onmovestart' | 'onpage' | 'onpaste' | 'onpropertychange' | 'onreadystatechange' | 'onresize' | 'onresizeend' | 'onresizestart' | 'onrowenter' | 'onrowexit' | 'onrowsdelete' | 'onrowsinserted' | 'onscroll' | 'onselectstart', handler: (this: MSHTML.HTMLTitleElement, parameter: {}) => void): void; + on(obj: MSHTML.HTMLUListElement, event: 'onactivate' | 'onafterupdate' | 'onbeforeactivate' | 'onbeforecopy' | 'onbeforecut' | 'onbeforedeactivate' | 'onbeforeeditfocus' | 'onbeforepaste' | 'onbeforeupdate' | 'onblur' | 'oncellchange' | 'onclick' | 'oncontextmenu' | 'oncontrolselect' | 'oncopy' | 'oncut' | 'ondataavailable' | 'ondatasetchanged' | 'ondatasetcomplete' | 'ondblclick' | 'ondeactivate' | 'ondrag' | 'ondragend' | 'ondragenter' | 'ondragleave' | 'ondragover' | 'ondragstart' | 'ondrop' | 'onerrorupdate' | 'onfilterchange' | 'onfocus' | 'onfocusin' | 'onfocusout' | 'onhelp' | 'onkeydown' | 'onkeypress' | 'onkeyup' | 'onlayoutcomplete' | 'onlosecapture' | 'onmousedown' | 'onmouseenter' | 'onmouseleave' | 'onmousemove' | 'onmouseout' | 'onmouseover' | 'onmouseup' | 'onmousewheel' | 'onmove' | 'onmoveend' | 'onmovestart' | 'onpage' | 'onpaste' | 'onpropertychange' | 'onreadystatechange' | 'onresize' | 'onresizeend' | 'onresizestart' | 'onrowenter' | 'onrowexit' | 'onrowsdelete' | 'onrowsinserted' | 'onscroll' | 'onselectstart', handler: (this: MSHTML.HTMLUListElement, parameter: {}) => void): void; + on(obj: MSHTML.HTMLUnknownElement, event: 'onactivate' | 'onafterupdate' | 'onbeforeactivate' | 'onbeforecopy' | 'onbeforecut' | 'onbeforedeactivate' | 'onbeforeeditfocus' | 'onbeforepaste' | 'onbeforeupdate' | 'onblur' | 'oncellchange' | 'onclick' | 'oncontextmenu' | 'oncontrolselect' | 'oncopy' | 'oncut' | 'ondataavailable' | 'ondatasetchanged' | 'ondatasetcomplete' | 'ondblclick' | 'ondeactivate' | 'ondrag' | 'ondragend' | 'ondragenter' | 'ondragleave' | 'ondragover' | 'ondragstart' | 'ondrop' | 'onerrorupdate' | 'onfilterchange' | 'onfocus' | 'onfocusin' | 'onfocusout' | 'onhelp' | 'onkeydown' | 'onkeypress' | 'onkeyup' | 'onlayoutcomplete' | 'onlosecapture' | 'onmousedown' | 'onmouseenter' | 'onmouseleave' | 'onmousemove' | 'onmouseout' | 'onmouseover' | 'onmouseup' | 'onmousewheel' | 'onmove' | 'onmoveend' | 'onmovestart' | 'onpage' | 'onpaste' | 'onpropertychange' | 'onreadystatechange' | 'onresize' | 'onresizeend' | 'onresizestart' | 'onrowenter' | 'onrowexit' | 'onrowsdelete' | 'onrowsinserted' | 'onscroll' | 'onselectstart', handler: (this: MSHTML.HTMLUnknownElement, parameter: {}) => void): void; + on(obj: MSHTML.HTMLVideoElement, event: 'onactivate' | 'onafterupdate' | 'onbeforeactivate' | 'onbeforecopy' | 'onbeforecut' | 'onbeforedeactivate' | 'onbeforeeditfocus' | 'onbeforepaste' | 'onbeforeupdate' | 'onblur' | 'oncellchange' | 'onclick' | 'oncontextmenu' | 'oncontrolselect' | 'oncopy' | 'oncut' | 'ondataavailable' | 'ondatasetchanged' | 'ondatasetcomplete' | 'ondblclick' | 'ondeactivate' | 'ondrag' | 'ondragend' | 'ondragenter' | 'ondragleave' | 'ondragover' | 'ondragstart' | 'ondrop' | 'onerrorupdate' | 'onfilterchange' | 'onfocus' | 'onfocusin' | 'onfocusout' | 'onhelp' | 'onkeydown' | 'onkeypress' | 'onkeyup' | 'onlayoutcomplete' | 'onlosecapture' | 'onmousedown' | 'onmouseenter' | 'onmouseleave' | 'onmousemove' | 'onmouseout' | 'onmouseover' | 'onmouseup' | 'onmousewheel' | 'onmove' | 'onmoveend' | 'onmovestart' | 'onpage' | 'onpaste' | 'onpropertychange' | 'onreadystatechange' | 'onresize' | 'onresizeend' | 'onresizestart' | 'onrowenter' | 'onrowexit' | 'onrowsdelete' | 'onrowsinserted' | 'onscroll' | 'onselectstart', handler: (this: MSHTML.HTMLVideoElement, parameter: {}) => void): void; + on(obj: MSHTML.HTMLWindow2, event: 'onafterprint' | 'onbeforeprint' | 'onbeforeunload' | 'onblur' | 'onfocus' | 'onhelp' | 'onload' | 'onresize' | 'onscroll' | 'onunload', handler: (this: MSHTML.HTMLWindow2, parameter: {}) => void): void; + on(obj: MSHTML.HTMLWindowProxy, event: 'onafterprint' | 'onbeforeprint' | 'onbeforeunload' | 'onblur' | 'onfocus' | 'onhelp' | 'onload' | 'onresize' | 'onscroll' | 'onunload', handler: (this: MSHTML.HTMLWindowProxy, parameter: {}) => void): void; + on(obj: MSHTML.HTMLWndOptionElement, event: 'onactivate' | 'onafterupdate' | 'onbeforeactivate' | 'onbeforecopy' | 'onbeforecut' | 'onbeforedeactivate' | 'onbeforeeditfocus' | 'onbeforepaste' | 'onbeforeupdate' | 'onblur' | 'oncellchange' | 'onclick' | 'oncontextmenu' | 'oncontrolselect' | 'oncopy' | 'oncut' | 'ondataavailable' | 'ondatasetchanged' | 'ondatasetcomplete' | 'ondblclick' | 'ondeactivate' | 'ondrag' | 'ondragend' | 'ondragenter' | 'ondragleave' | 'ondragover' | 'ondragstart' | 'ondrop' | 'onerrorupdate' | 'onfilterchange' | 'onfocus' | 'onfocusin' | 'onfocusout' | 'onhelp' | 'onkeydown' | 'onkeypress' | 'onkeyup' | 'onlayoutcomplete' | 'onlosecapture' | 'onmousedown' | 'onmouseenter' | 'onmouseleave' | 'onmousemove' | 'onmouseout' | 'onmouseover' | 'onmouseup' | 'onmousewheel' | 'onmove' | 'onmoveend' | 'onmovestart' | 'onpage' | 'onpaste' | 'onpropertychange' | 'onreadystatechange' | 'onresize' | 'onresizeend' | 'onresizestart' | 'onrowenter' | 'onrowexit' | 'onrowsdelete' | 'onrowsinserted' | 'onscroll' | 'onselectstart', handler: (this: MSHTML.HTMLWndOptionElement, parameter: {}) => void): void; + on(obj: MSHTML.HTMLWndSelectElement, event: 'onactivate' | 'onafterupdate' | 'onbeforeactivate' | 'onbeforecopy' | 'onbeforecut' | 'onbeforedeactivate' | 'onbeforeeditfocus' | 'onbeforepaste' | 'onbeforeupdate' | 'onblur' | 'oncellchange' | 'onchange' | 'onclick' | 'oncontextmenu' | 'oncontrolselect' | 'oncopy' | 'oncut' | 'ondataavailable' | 'ondatasetchanged' | 'ondatasetcomplete' | 'ondblclick' | 'ondeactivate' | 'ondrag' | 'ondragend' | 'ondragenter' | 'ondragleave' | 'ondragover' | 'ondragstart' | 'ondrop' | 'onerrorupdate' | 'onfilterchange' | 'onfocus' | 'onfocusin' | 'onfocusout' | 'onhelp' | 'onkeydown' | 'onkeypress' | 'onkeyup' | 'onlayoutcomplete' | 'onlosecapture' | 'onmousedown' | 'onmouseenter' | 'onmouseleave' | 'onmousemove' | 'onmouseout' | 'onmouseover' | 'onmouseup' | 'onmousewheel' | 'onmove' | 'onmoveend' | 'onmovestart' | 'onpage' | 'onpaste' | 'onpropertychange' | 'onreadystatechange' | 'onresize' | 'onresizeend' | 'onresizestart' | 'onrowenter' | 'onrowexit' | 'onrowsdelete' | 'onrowsinserted' | 'onscroll' | 'onselectstart', handler: (this: MSHTML.HTMLWndSelectElement, parameter: {}) => void): void; on(obj: MSHTML.HTMLXMLHttpRequest, event: 'onreadystatechange' | 'ontimeout', handler: (this: MSHTML.HTMLXMLHttpRequest, parameter: {}) => void): void; - on( - obj: MSHTML.OldHTMLDocument, event: 'onactivate' | 'onafterupdate' | 'onbeforeactivate' | 'onbeforedeactivate' | 'onbeforeeditfocus' | 'onbeforeupdate' | - 'oncellchange' | 'onclick' | 'oncontextmenu' | 'oncontrolselect' | 'ondataavailable' | 'ondatasetchanged' | 'ondatasetcomplete' | 'ondblclick' | 'ondeactivate' | - 'ondragstart' | 'onerrorupdate' | 'onfocusin' | 'onfocusout' | 'onhelp' | 'onkeydown' | 'onkeypress' | 'onkeyup' | 'onmousedown' | 'onmousemove' | 'onmouseout' | - 'onmouseover' | 'onmouseup' | 'onmousewheel' | 'onpropertychange' | 'onreadystatechange' | 'onrowenter' | 'onrowexit' | 'onrowsdelete' | 'onrowsinserted' | - 'onselectionchange' | 'onselectstart' | 'onstop', - handler: (this: MSHTML.OldHTMLDocument, parameter: {}) => void): void; - on( - obj: MSHTML.OldHTMLFormElement, event: 'onactivate' | 'onafterupdate' | 'onbeforeactivate' | 'onbeforecopy' | 'onbeforecut' | 'onbeforedeactivate' | - 'onbeforeeditfocus' | 'onbeforepaste' | 'onbeforeupdate' | 'onblur' | 'oncellchange' | 'onclick' | 'oncontextmenu' | 'oncontrolselect' | 'oncopy' | 'oncut' | - 'ondataavailable' | 'ondatasetchanged' | 'ondatasetcomplete' | 'ondblclick' | 'ondeactivate' | 'ondrag' | 'ondragend' | 'ondragenter' | 'ondragleave' | - 'ondragover' | 'ondragstart' | 'ondrop' | 'onerrorupdate' | 'onfilterchange' | 'onfocus' | 'onfocusin' | 'onfocusout' | 'onhelp' | 'onkeydown' | 'onkeypress' | - 'onkeyup' | 'onlayoutcomplete' | 'onlosecapture' | 'onmousedown' | 'onmouseenter' | 'onmouseleave' | 'onmousemove' | 'onmouseout' | 'onmouseover' | 'onmouseup' | - 'onmousewheel' | 'onmove' | 'onmoveend' | 'onmovestart' | 'onpage' | 'onpaste' | 'onpropertychange' | 'onreadystatechange' | 'onreset' | 'onresize' | - 'onresizeend' | 'onresizestart' | 'onrowenter' | 'onrowexit' | 'onrowsdelete' | 'onrowsinserted' | 'onscroll' | 'onselectstart' | 'onsubmit', - handler: (this: MSHTML.OldHTMLFormElement, parameter: {}) => void): void; - on( - obj: MSHTML.Scriptlet, event: 'onclick' | 'ondblclick' | 'onkeydown' | 'onkeypress' | 'onkeyup' | 'onmousedown' | 'onmousemove' | 'onmouseup' | - 'onreadystatechange', - handler: (this: MSHTML.Scriptlet, parameter: {}) => void): void; - on( - obj: MSHTML.SVGAElement, event: 'onactivate' | 'onafterupdate' | 'onbeforeactivate' | 'onbeforecopy' | 'onbeforecut' | 'onbeforedeactivate' | 'onbeforeeditfocus' | - 'onbeforepaste' | 'onbeforeupdate' | 'onblur' | 'oncellchange' | 'onclick' | 'oncontextmenu' | 'oncontrolselect' | 'oncopy' | 'oncut' | 'ondataavailable' | - 'ondatasetchanged' | 'ondatasetcomplete' | 'ondblclick' | 'ondeactivate' | 'ondrag' | 'ondragend' | 'ondragenter' | 'ondragleave' | 'ondragover' | 'ondragstart' | - 'ondrop' | 'onerrorupdate' | 'onfilterchange' | 'onfocus' | 'onfocusin' | 'onfocusout' | 'onhelp' | 'onkeydown' | 'onkeypress' | 'onkeyup' | 'onlayoutcomplete' | - 'onlosecapture' | 'onmousedown' | 'onmouseenter' | 'onmouseleave' | 'onmousemove' | 'onmouseout' | 'onmouseover' | 'onmouseup' | 'onmousewheel' | 'onmove' | - 'onmoveend' | 'onmovestart' | 'onpage' | 'onpaste' | 'onpropertychange' | 'onreadystatechange' | 'onresize' | 'onresizeend' | 'onresizestart' | 'onrowenter' | - 'onrowexit' | 'onrowsdelete' | 'onrowsinserted' | 'onscroll' | 'onselectstart', - handler: (this: MSHTML.SVGAElement, parameter: {}) => void): void; - on( - obj: MSHTML.SVGCircleElement, event: 'onactivate' | 'onafterupdate' | 'onbeforeactivate' | 'onbeforecopy' | 'onbeforecut' | 'onbeforedeactivate' | - 'onbeforeeditfocus' | 'onbeforepaste' | 'onbeforeupdate' | 'onblur' | 'oncellchange' | 'onclick' | 'oncontextmenu' | 'oncontrolselect' | 'oncopy' | 'oncut' | - 'ondataavailable' | 'ondatasetchanged' | 'ondatasetcomplete' | 'ondblclick' | 'ondeactivate' | 'ondrag' | 'ondragend' | 'ondragenter' | 'ondragleave' | - 'ondragover' | 'ondragstart' | 'ondrop' | 'onerrorupdate' | 'onfilterchange' | 'onfocus' | 'onfocusin' | 'onfocusout' | 'onhelp' | 'onkeydown' | 'onkeypress' | - 'onkeyup' | 'onlayoutcomplete' | 'onlosecapture' | 'onmousedown' | 'onmouseenter' | 'onmouseleave' | 'onmousemove' | 'onmouseout' | 'onmouseover' | 'onmouseup' | - 'onmousewheel' | 'onmove' | 'onmoveend' | 'onmovestart' | 'onpage' | 'onpaste' | 'onpropertychange' | 'onreadystatechange' | 'onresize' | 'onresizeend' | - 'onresizestart' | 'onrowenter' | 'onrowexit' | 'onrowsdelete' | 'onrowsinserted' | 'onscroll' | 'onselectstart', - handler: (this: MSHTML.SVGCircleElement, parameter: {}) => void): void; - on( - obj: MSHTML.SVGClipPathElement, event: 'onactivate' | 'onafterupdate' | 'onbeforeactivate' | 'onbeforecopy' | 'onbeforecut' | 'onbeforedeactivate' | - 'onbeforeeditfocus' | 'onbeforepaste' | 'onbeforeupdate' | 'onblur' | 'oncellchange' | 'onclick' | 'oncontextmenu' | 'oncontrolselect' | 'oncopy' | 'oncut' | - 'ondataavailable' | 'ondatasetchanged' | 'ondatasetcomplete' | 'ondblclick' | 'ondeactivate' | 'ondrag' | 'ondragend' | 'ondragenter' | 'ondragleave' | - 'ondragover' | 'ondragstart' | 'ondrop' | 'onerrorupdate' | 'onfilterchange' | 'onfocus' | 'onfocusin' | 'onfocusout' | 'onhelp' | 'onkeydown' | 'onkeypress' | - 'onkeyup' | 'onlayoutcomplete' | 'onlosecapture' | 'onmousedown' | 'onmouseenter' | 'onmouseleave' | 'onmousemove' | 'onmouseout' | 'onmouseover' | 'onmouseup' | - 'onmousewheel' | 'onmove' | 'onmoveend' | 'onmovestart' | 'onpage' | 'onpaste' | 'onpropertychange' | 'onreadystatechange' | 'onresize' | 'onresizeend' | - 'onresizestart' | 'onrowenter' | 'onrowexit' | 'onrowsdelete' | 'onrowsinserted' | 'onscroll' | 'onselectstart', - handler: (this: MSHTML.SVGClipPathElement, parameter: {}) => void): void; - on( - obj: MSHTML.SVGDefsElement, event: 'onactivate' | 'onafterupdate' | 'onbeforeactivate' | 'onbeforecopy' | 'onbeforecut' | 'onbeforedeactivate' | - 'onbeforeeditfocus' | 'onbeforepaste' | 'onbeforeupdate' | 'onblur' | 'oncellchange' | 'onclick' | 'oncontextmenu' | 'oncontrolselect' | 'oncopy' | 'oncut' | - 'ondataavailable' | 'ondatasetchanged' | 'ondatasetcomplete' | 'ondblclick' | 'ondeactivate' | 'ondrag' | 'ondragend' | 'ondragenter' | 'ondragleave' | - 'ondragover' | 'ondragstart' | 'ondrop' | 'onerrorupdate' | 'onfilterchange' | 'onfocus' | 'onfocusin' | 'onfocusout' | 'onhelp' | 'onkeydown' | 'onkeypress' | - 'onkeyup' | 'onlayoutcomplete' | 'onlosecapture' | 'onmousedown' | 'onmouseenter' | 'onmouseleave' | 'onmousemove' | 'onmouseout' | 'onmouseover' | 'onmouseup' | - 'onmousewheel' | 'onmove' | 'onmoveend' | 'onmovestart' | 'onpage' | 'onpaste' | 'onpropertychange' | 'onreadystatechange' | 'onresize' | 'onresizeend' | - 'onresizestart' | 'onrowenter' | 'onrowexit' | 'onrowsdelete' | 'onrowsinserted' | 'onscroll' | 'onselectstart', - handler: (this: MSHTML.SVGDefsElement, parameter: {}) => void): void; - on( - obj: MSHTML.SVGElement, event: 'onactivate' | 'onafterupdate' | 'onbeforeactivate' | 'onbeforecopy' | 'onbeforecut' | 'onbeforedeactivate' | 'onbeforeeditfocus' | - 'onbeforepaste' | 'onbeforeupdate' | 'onblur' | 'oncellchange' | 'onclick' | 'oncontextmenu' | 'oncontrolselect' | 'oncopy' | 'oncut' | 'ondataavailable' | - 'ondatasetchanged' | 'ondatasetcomplete' | 'ondblclick' | 'ondeactivate' | 'ondrag' | 'ondragend' | 'ondragenter' | 'ondragleave' | 'ondragover' | 'ondragstart' | - 'ondrop' | 'onerrorupdate' | 'onfilterchange' | 'onfocus' | 'onfocusin' | 'onfocusout' | 'onhelp' | 'onkeydown' | 'onkeypress' | 'onkeyup' | 'onlayoutcomplete' | - 'onlosecapture' | 'onmousedown' | 'onmouseenter' | 'onmouseleave' | 'onmousemove' | 'onmouseout' | 'onmouseover' | 'onmouseup' | 'onmousewheel' | 'onmove' | - 'onmoveend' | 'onmovestart' | 'onpage' | 'onpaste' | 'onpropertychange' | 'onreadystatechange' | 'onresize' | 'onresizeend' | 'onresizestart' | 'onrowenter' | - 'onrowexit' | 'onrowsdelete' | 'onrowsinserted' | 'onscroll' | 'onselectstart', - handler: (this: MSHTML.SVGElement, parameter: {}) => void): void; - on( - obj: MSHTML.SVGEllipseElement, event: 'onactivate' | 'onafterupdate' | 'onbeforeactivate' | 'onbeforecopy' | 'onbeforecut' | 'onbeforedeactivate' | - 'onbeforeeditfocus' | 'onbeforepaste' | 'onbeforeupdate' | 'onblur' | 'oncellchange' | 'onclick' | 'oncontextmenu' | 'oncontrolselect' | 'oncopy' | 'oncut' | - 'ondataavailable' | 'ondatasetchanged' | 'ondatasetcomplete' | 'ondblclick' | 'ondeactivate' | 'ondrag' | 'ondragend' | 'ondragenter' | 'ondragleave' | - 'ondragover' | 'ondragstart' | 'ondrop' | 'onerrorupdate' | 'onfilterchange' | 'onfocus' | 'onfocusin' | 'onfocusout' | 'onhelp' | 'onkeydown' | 'onkeypress' | - 'onkeyup' | 'onlayoutcomplete' | 'onlosecapture' | 'onmousedown' | 'onmouseenter' | 'onmouseleave' | 'onmousemove' | 'onmouseout' | 'onmouseover' | 'onmouseup' | - 'onmousewheel' | 'onmove' | 'onmoveend' | 'onmovestart' | 'onpage' | 'onpaste' | 'onpropertychange' | 'onreadystatechange' | 'onresize' | 'onresizeend' | - 'onresizestart' | 'onrowenter' | 'onrowexit' | 'onrowsdelete' | 'onrowsinserted' | 'onscroll' | 'onselectstart', - handler: (this: MSHTML.SVGEllipseElement, parameter: {}) => void): void; - on( - obj: MSHTML.SVGGElement, event: 'onactivate' | 'onafterupdate' | 'onbeforeactivate' | 'onbeforecopy' | 'onbeforecut' | 'onbeforedeactivate' | 'onbeforeeditfocus' | - 'onbeforepaste' | 'onbeforeupdate' | 'onblur' | 'oncellchange' | 'onclick' | 'oncontextmenu' | 'oncontrolselect' | 'oncopy' | 'oncut' | 'ondataavailable' | - 'ondatasetchanged' | 'ondatasetcomplete' | 'ondblclick' | 'ondeactivate' | 'ondrag' | 'ondragend' | 'ondragenter' | 'ondragleave' | 'ondragover' | 'ondragstart' | - 'ondrop' | 'onerrorupdate' | 'onfilterchange' | 'onfocus' | 'onfocusin' | 'onfocusout' | 'onhelp' | 'onkeydown' | 'onkeypress' | 'onkeyup' | 'onlayoutcomplete' | - 'onlosecapture' | 'onmousedown' | 'onmouseenter' | 'onmouseleave' | 'onmousemove' | 'onmouseout' | 'onmouseover' | 'onmouseup' | 'onmousewheel' | 'onmove' | - 'onmoveend' | 'onmovestart' | 'onpage' | 'onpaste' | 'onpropertychange' | 'onreadystatechange' | 'onresize' | 'onresizeend' | 'onresizestart' | 'onrowenter' | - 'onrowexit' | 'onrowsdelete' | 'onrowsinserted' | 'onscroll' | 'onselectstart', - handler: (this: MSHTML.SVGGElement, parameter: {}) => void): void; - on( - obj: MSHTML.SVGGradientElement, event: 'onactivate' | 'onafterupdate' | 'onbeforeactivate' | 'onbeforecopy' | 'onbeforecut' | 'onbeforedeactivate' | - 'onbeforeeditfocus' | 'onbeforepaste' | 'onbeforeupdate' | 'onblur' | 'oncellchange' | 'onclick' | 'oncontextmenu' | 'oncontrolselect' | 'oncopy' | 'oncut' | - 'ondataavailable' | 'ondatasetchanged' | 'ondatasetcomplete' | 'ondblclick' | 'ondeactivate' | 'ondrag' | 'ondragend' | 'ondragenter' | 'ondragleave' | - 'ondragover' | 'ondragstart' | 'ondrop' | 'onerrorupdate' | 'onfilterchange' | 'onfocus' | 'onfocusin' | 'onfocusout' | 'onhelp' | 'onkeydown' | 'onkeypress' | - 'onkeyup' | 'onlayoutcomplete' | 'onlosecapture' | 'onmousedown' | 'onmouseenter' | 'onmouseleave' | 'onmousemove' | 'onmouseout' | 'onmouseover' | 'onmouseup' | - 'onmousewheel' | 'onmove' | 'onmoveend' | 'onmovestart' | 'onpage' | 'onpaste' | 'onpropertychange' | 'onreadystatechange' | 'onresize' | 'onresizeend' | - 'onresizestart' | 'onrowenter' | 'onrowexit' | 'onrowsdelete' | 'onrowsinserted' | 'onscroll' | 'onselectstart', - handler: (this: MSHTML.SVGGradientElement, parameter: {}) => void): void; - on( - obj: MSHTML.SVGImageElement, event: 'onactivate' | 'onafterupdate' | 'onbeforeactivate' | 'onbeforecopy' | 'onbeforecut' | 'onbeforedeactivate' | - 'onbeforeeditfocus' | 'onbeforepaste' | 'onbeforeupdate' | 'onblur' | 'oncellchange' | 'onclick' | 'oncontextmenu' | 'oncontrolselect' | 'oncopy' | 'oncut' | - 'ondataavailable' | 'ondatasetchanged' | 'ondatasetcomplete' | 'ondblclick' | 'ondeactivate' | 'ondrag' | 'ondragend' | 'ondragenter' | 'ondragleave' | - 'ondragover' | 'ondragstart' | 'ondrop' | 'onerrorupdate' | 'onfilterchange' | 'onfocus' | 'onfocusin' | 'onfocusout' | 'onhelp' | 'onkeydown' | 'onkeypress' | - 'onkeyup' | 'onlayoutcomplete' | 'onlosecapture' | 'onmousedown' | 'onmouseenter' | 'onmouseleave' | 'onmousemove' | 'onmouseout' | 'onmouseover' | 'onmouseup' | - 'onmousewheel' | 'onmove' | 'onmoveend' | 'onmovestart' | 'onpage' | 'onpaste' | 'onpropertychange' | 'onreadystatechange' | 'onresize' | 'onresizeend' | - 'onresizestart' | 'onrowenter' | 'onrowexit' | 'onrowsdelete' | 'onrowsinserted' | 'onscroll' | 'onselectstart', - handler: (this: MSHTML.SVGImageElement, parameter: {}) => void): void; - on( - obj: MSHTML.SVGLineElement, event: 'onactivate' | 'onafterupdate' | 'onbeforeactivate' | 'onbeforecopy' | 'onbeforecut' | 'onbeforedeactivate' | - 'onbeforeeditfocus' | 'onbeforepaste' | 'onbeforeupdate' | 'onblur' | 'oncellchange' | 'onclick' | 'oncontextmenu' | 'oncontrolselect' | 'oncopy' | 'oncut' | - 'ondataavailable' | 'ondatasetchanged' | 'ondatasetcomplete' | 'ondblclick' | 'ondeactivate' | 'ondrag' | 'ondragend' | 'ondragenter' | 'ondragleave' | - 'ondragover' | 'ondragstart' | 'ondrop' | 'onerrorupdate' | 'onfilterchange' | 'onfocus' | 'onfocusin' | 'onfocusout' | 'onhelp' | 'onkeydown' | 'onkeypress' | - 'onkeyup' | 'onlayoutcomplete' | 'onlosecapture' | 'onmousedown' | 'onmouseenter' | 'onmouseleave' | 'onmousemove' | 'onmouseout' | 'onmouseover' | 'onmouseup' | - 'onmousewheel' | 'onmove' | 'onmoveend' | 'onmovestart' | 'onpage' | 'onpaste' | 'onpropertychange' | 'onreadystatechange' | 'onresize' | 'onresizeend' | - 'onresizestart' | 'onrowenter' | 'onrowexit' | 'onrowsdelete' | 'onrowsinserted' | 'onscroll' | 'onselectstart', - handler: (this: MSHTML.SVGLineElement, parameter: {}) => void): void; - on( - obj: MSHTML.SVGMarkerElement, event: 'onactivate' | 'onafterupdate' | 'onbeforeactivate' | 'onbeforecopy' | 'onbeforecut' | 'onbeforedeactivate' | - 'onbeforeeditfocus' | 'onbeforepaste' | 'onbeforeupdate' | 'onblur' | 'oncellchange' | 'onclick' | 'oncontextmenu' | 'oncontrolselect' | 'oncopy' | 'oncut' | - 'ondataavailable' | 'ondatasetchanged' | 'ondatasetcomplete' | 'ondblclick' | 'ondeactivate' | 'ondrag' | 'ondragend' | 'ondragenter' | 'ondragleave' | - 'ondragover' | 'ondragstart' | 'ondrop' | 'onerrorupdate' | 'onfilterchange' | 'onfocus' | 'onfocusin' | 'onfocusout' | 'onhelp' | 'onkeydown' | 'onkeypress' | - 'onkeyup' | 'onlayoutcomplete' | 'onlosecapture' | 'onmousedown' | 'onmouseenter' | 'onmouseleave' | 'onmousemove' | 'onmouseout' | 'onmouseover' | 'onmouseup' | - 'onmousewheel' | 'onmove' | 'onmoveend' | 'onmovestart' | 'onpage' | 'onpaste' | 'onpropertychange' | 'onreadystatechange' | 'onresize' | 'onresizeend' | - 'onresizestart' | 'onrowenter' | 'onrowexit' | 'onrowsdelete' | 'onrowsinserted' | 'onscroll' | 'onselectstart', - handler: (this: MSHTML.SVGMarkerElement, parameter: {}) => void): void; - on( - obj: MSHTML.SVGMaskElement, event: 'onactivate' | 'onafterupdate' | 'onbeforeactivate' | 'onbeforecopy' | 'onbeforecut' | 'onbeforedeactivate' | - 'onbeforeeditfocus' | 'onbeforepaste' | 'onbeforeupdate' | 'onblur' | 'oncellchange' | 'onclick' | 'oncontextmenu' | 'oncontrolselect' | 'oncopy' | 'oncut' | - 'ondataavailable' | 'ondatasetchanged' | 'ondatasetcomplete' | 'ondblclick' | 'ondeactivate' | 'ondrag' | 'ondragend' | 'ondragenter' | 'ondragleave' | - 'ondragover' | 'ondragstart' | 'ondrop' | 'onerrorupdate' | 'onfilterchange' | 'onfocus' | 'onfocusin' | 'onfocusout' | 'onhelp' | 'onkeydown' | 'onkeypress' | - 'onkeyup' | 'onlayoutcomplete' | 'onlosecapture' | 'onmousedown' | 'onmouseenter' | 'onmouseleave' | 'onmousemove' | 'onmouseout' | 'onmouseover' | 'onmouseup' | - 'onmousewheel' | 'onmove' | 'onmoveend' | 'onmovestart' | 'onpage' | 'onpaste' | 'onpropertychange' | 'onreadystatechange' | 'onresize' | 'onresizeend' | - 'onresizestart' | 'onrowenter' | 'onrowexit' | 'onrowsdelete' | 'onrowsinserted' | 'onscroll' | 'onselectstart', - handler: (this: MSHTML.SVGMaskElement, parameter: {}) => void): void; - on( - obj: MSHTML.SVGPathElement, event: 'onactivate' | 'onafterupdate' | 'onbeforeactivate' | 'onbeforecopy' | 'onbeforecut' | 'onbeforedeactivate' | - 'onbeforeeditfocus' | 'onbeforepaste' | 'onbeforeupdate' | 'onblur' | 'oncellchange' | 'onclick' | 'oncontextmenu' | 'oncontrolselect' | 'oncopy' | 'oncut' | - 'ondataavailable' | 'ondatasetchanged' | 'ondatasetcomplete' | 'ondblclick' | 'ondeactivate' | 'ondrag' | 'ondragend' | 'ondragenter' | 'ondragleave' | - 'ondragover' | 'ondragstart' | 'ondrop' | 'onerrorupdate' | 'onfilterchange' | 'onfocus' | 'onfocusin' | 'onfocusout' | 'onhelp' | 'onkeydown' | 'onkeypress' | - 'onkeyup' | 'onlayoutcomplete' | 'onlosecapture' | 'onmousedown' | 'onmouseenter' | 'onmouseleave' | 'onmousemove' | 'onmouseout' | 'onmouseover' | 'onmouseup' | - 'onmousewheel' | 'onmove' | 'onmoveend' | 'onmovestart' | 'onpage' | 'onpaste' | 'onpropertychange' | 'onreadystatechange' | 'onresize' | 'onresizeend' | - 'onresizestart' | 'onrowenter' | 'onrowexit' | 'onrowsdelete' | 'onrowsinserted' | 'onscroll' | 'onselectstart', - handler: (this: MSHTML.SVGPathElement, parameter: {}) => void): void; - on( - obj: MSHTML.SVGPatternElement, event: 'onactivate' | 'onafterupdate' | 'onbeforeactivate' | 'onbeforecopy' | 'onbeforecut' | 'onbeforedeactivate' | - 'onbeforeeditfocus' | 'onbeforepaste' | 'onbeforeupdate' | 'onblur' | 'oncellchange' | 'onclick' | 'oncontextmenu' | 'oncontrolselect' | 'oncopy' | 'oncut' | - 'ondataavailable' | 'ondatasetchanged' | 'ondatasetcomplete' | 'ondblclick' | 'ondeactivate' | 'ondrag' | 'ondragend' | 'ondragenter' | 'ondragleave' | - 'ondragover' | 'ondragstart' | 'ondrop' | 'onerrorupdate' | 'onfilterchange' | 'onfocus' | 'onfocusin' | 'onfocusout' | 'onhelp' | 'onkeydown' | 'onkeypress' | - 'onkeyup' | 'onlayoutcomplete' | 'onlosecapture' | 'onmousedown' | 'onmouseenter' | 'onmouseleave' | 'onmousemove' | 'onmouseout' | 'onmouseover' | 'onmouseup' | - 'onmousewheel' | 'onmove' | 'onmoveend' | 'onmovestart' | 'onpage' | 'onpaste' | 'onpropertychange' | 'onreadystatechange' | 'onresize' | 'onresizeend' | - 'onresizestart' | 'onrowenter' | 'onrowexit' | 'onrowsdelete' | 'onrowsinserted' | 'onscroll' | 'onselectstart', - handler: (this: MSHTML.SVGPatternElement, parameter: {}) => void): void; - on( - obj: MSHTML.SVGPolygonElement, event: 'onactivate' | 'onafterupdate' | 'onbeforeactivate' | 'onbeforecopy' | 'onbeforecut' | 'onbeforedeactivate' | - 'onbeforeeditfocus' | 'onbeforepaste' | 'onbeforeupdate' | 'onblur' | 'oncellchange' | 'onclick' | 'oncontextmenu' | 'oncontrolselect' | 'oncopy' | 'oncut' | - 'ondataavailable' | 'ondatasetchanged' | 'ondatasetcomplete' | 'ondblclick' | 'ondeactivate' | 'ondrag' | 'ondragend' | 'ondragenter' | 'ondragleave' | - 'ondragover' | 'ondragstart' | 'ondrop' | 'onerrorupdate' | 'onfilterchange' | 'onfocus' | 'onfocusin' | 'onfocusout' | 'onhelp' | 'onkeydown' | 'onkeypress' | - 'onkeyup' | 'onlayoutcomplete' | 'onlosecapture' | 'onmousedown' | 'onmouseenter' | 'onmouseleave' | 'onmousemove' | 'onmouseout' | 'onmouseover' | 'onmouseup' | - 'onmousewheel' | 'onmove' | 'onmoveend' | 'onmovestart' | 'onpage' | 'onpaste' | 'onpropertychange' | 'onreadystatechange' | 'onresize' | 'onresizeend' | - 'onresizestart' | 'onrowenter' | 'onrowexit' | 'onrowsdelete' | 'onrowsinserted' | 'onscroll' | 'onselectstart', - handler: (this: MSHTML.SVGPolygonElement, parameter: {}) => void): void; - on( - obj: MSHTML.SVGPolylineElement, event: 'onactivate' | 'onafterupdate' | 'onbeforeactivate' | 'onbeforecopy' | 'onbeforecut' | 'onbeforedeactivate' | - 'onbeforeeditfocus' | 'onbeforepaste' | 'onbeforeupdate' | 'onblur' | 'oncellchange' | 'onclick' | 'oncontextmenu' | 'oncontrolselect' | 'oncopy' | 'oncut' | - 'ondataavailable' | 'ondatasetchanged' | 'ondatasetcomplete' | 'ondblclick' | 'ondeactivate' | 'ondrag' | 'ondragend' | 'ondragenter' | 'ondragleave' | - 'ondragover' | 'ondragstart' | 'ondrop' | 'onerrorupdate' | 'onfilterchange' | 'onfocus' | 'onfocusin' | 'onfocusout' | 'onhelp' | 'onkeydown' | 'onkeypress' | - 'onkeyup' | 'onlayoutcomplete' | 'onlosecapture' | 'onmousedown' | 'onmouseenter' | 'onmouseleave' | 'onmousemove' | 'onmouseout' | 'onmouseover' | 'onmouseup' | - 'onmousewheel' | 'onmove' | 'onmoveend' | 'onmovestart' | 'onpage' | 'onpaste' | 'onpropertychange' | 'onreadystatechange' | 'onresize' | 'onresizeend' | - 'onresizestart' | 'onrowenter' | 'onrowexit' | 'onrowsdelete' | 'onrowsinserted' | 'onscroll' | 'onselectstart', - handler: (this: MSHTML.SVGPolylineElement, parameter: {}) => void): void; - on( - obj: MSHTML.SVGRectElement, event: 'onactivate' | 'onafterupdate' | 'onbeforeactivate' | 'onbeforecopy' | 'onbeforecut' | 'onbeforedeactivate' | - 'onbeforeeditfocus' | 'onbeforepaste' | 'onbeforeupdate' | 'onblur' | 'oncellchange' | 'onclick' | 'oncontextmenu' | 'oncontrolselect' | 'oncopy' | 'oncut' | - 'ondataavailable' | 'ondatasetchanged' | 'ondatasetcomplete' | 'ondblclick' | 'ondeactivate' | 'ondrag' | 'ondragend' | 'ondragenter' | 'ondragleave' | - 'ondragover' | 'ondragstart' | 'ondrop' | 'onerrorupdate' | 'onfilterchange' | 'onfocus' | 'onfocusin' | 'onfocusout' | 'onhelp' | 'onkeydown' | 'onkeypress' | - 'onkeyup' | 'onlayoutcomplete' | 'onlosecapture' | 'onmousedown' | 'onmouseenter' | 'onmouseleave' | 'onmousemove' | 'onmouseout' | 'onmouseover' | 'onmouseup' | - 'onmousewheel' | 'onmove' | 'onmoveend' | 'onmovestart' | 'onpage' | 'onpaste' | 'onpropertychange' | 'onreadystatechange' | 'onresize' | 'onresizeend' | - 'onresizestart' | 'onrowenter' | 'onrowexit' | 'onrowsdelete' | 'onrowsinserted' | 'onscroll' | 'onselectstart', - handler: (this: MSHTML.SVGRectElement, parameter: {}) => void): void; - on( - obj: MSHTML.SVGScriptElement, event: 'onactivate' | 'onafterupdate' | 'onbeforeactivate' | 'onbeforecopy' | 'onbeforecut' | 'onbeforedeactivate' | - 'onbeforeeditfocus' | 'onbeforepaste' | 'onbeforeupdate' | 'onblur' | 'oncellchange' | 'onclick' | 'oncontextmenu' | 'oncontrolselect' | 'oncopy' | 'oncut' | - 'ondataavailable' | 'ondatasetchanged' | 'ondatasetcomplete' | 'ondblclick' | 'ondeactivate' | 'ondrag' | 'ondragend' | 'ondragenter' | 'ondragleave' | - 'ondragover' | 'ondragstart' | 'ondrop' | 'onerrorupdate' | 'onfilterchange' | 'onfocus' | 'onfocusin' | 'onfocusout' | 'onhelp' | 'onkeydown' | 'onkeypress' | - 'onkeyup' | 'onlayoutcomplete' | 'onlosecapture' | 'onmousedown' | 'onmouseenter' | 'onmouseleave' | 'onmousemove' | 'onmouseout' | 'onmouseover' | 'onmouseup' | - 'onmousewheel' | 'onmove' | 'onmoveend' | 'onmovestart' | 'onpage' | 'onpaste' | 'onpropertychange' | 'onreadystatechange' | 'onresize' | 'onresizeend' | - 'onresizestart' | 'onrowenter' | 'onrowexit' | 'onrowsdelete' | 'onrowsinserted' | 'onscroll' | 'onselectstart', - handler: (this: MSHTML.SVGScriptElement, parameter: {}) => void): void; - on( - obj: MSHTML.SVGStopElement, event: 'onactivate' | 'onafterupdate' | 'onbeforeactivate' | 'onbeforecopy' | 'onbeforecut' | 'onbeforedeactivate' | - 'onbeforeeditfocus' | 'onbeforepaste' | 'onbeforeupdate' | 'onblur' | 'oncellchange' | 'onclick' | 'oncontextmenu' | 'oncontrolselect' | 'oncopy' | 'oncut' | - 'ondataavailable' | 'ondatasetchanged' | 'ondatasetcomplete' | 'ondblclick' | 'ondeactivate' | 'ondrag' | 'ondragend' | 'ondragenter' | 'ondragleave' | - 'ondragover' | 'ondragstart' | 'ondrop' | 'onerrorupdate' | 'onfilterchange' | 'onfocus' | 'onfocusin' | 'onfocusout' | 'onhelp' | 'onkeydown' | 'onkeypress' | - 'onkeyup' | 'onlayoutcomplete' | 'onlosecapture' | 'onmousedown' | 'onmouseenter' | 'onmouseleave' | 'onmousemove' | 'onmouseout' | 'onmouseover' | 'onmouseup' | - 'onmousewheel' | 'onmove' | 'onmoveend' | 'onmovestart' | 'onpage' | 'onpaste' | 'onpropertychange' | 'onreadystatechange' | 'onresize' | 'onresizeend' | - 'onresizestart' | 'onrowenter' | 'onrowexit' | 'onrowsdelete' | 'onrowsinserted' | 'onscroll' | 'onselectstart', - handler: (this: MSHTML.SVGStopElement, parameter: {}) => void): void; - on( - obj: MSHTML.SVGSVGElement, event: 'onactivate' | 'onafterupdate' | 'onbeforeactivate' | 'onbeforecopy' | 'onbeforecut' | 'onbeforedeactivate' | - 'onbeforeeditfocus' | 'onbeforepaste' | 'onbeforeupdate' | 'onblur' | 'oncellchange' | 'onclick' | 'oncontextmenu' | 'oncontrolselect' | 'oncopy' | 'oncut' | - 'ondataavailable' | 'ondatasetchanged' | 'ondatasetcomplete' | 'ondblclick' | 'ondeactivate' | 'ondrag' | 'ondragend' | 'ondragenter' | 'ondragleave' | - 'ondragover' | 'ondragstart' | 'ondrop' | 'onerrorupdate' | 'onfilterchange' | 'onfocus' | 'onfocusin' | 'onfocusout' | 'onhelp' | 'onkeydown' | 'onkeypress' | - 'onkeyup' | 'onlayoutcomplete' | 'onlosecapture' | 'onmousedown' | 'onmouseenter' | 'onmouseleave' | 'onmousemove' | 'onmouseout' | 'onmouseover' | 'onmouseup' | - 'onmousewheel' | 'onmove' | 'onmoveend' | 'onmovestart' | 'onpage' | 'onpaste' | 'onpropertychange' | 'onreadystatechange' | 'onresize' | 'onresizeend' | - 'onresizestart' | 'onrowenter' | 'onrowexit' | 'onrowsdelete' | 'onrowsinserted' | 'onscroll' | 'onselectstart', - handler: (this: MSHTML.SVGSVGElement, parameter: {}) => void): void; - on( - obj: MSHTML.SVGSymbolElement, event: 'onactivate' | 'onafterupdate' | 'onbeforeactivate' | 'onbeforecopy' | 'onbeforecut' | 'onbeforedeactivate' | - 'onbeforeeditfocus' | 'onbeforepaste' | 'onbeforeupdate' | 'onblur' | 'oncellchange' | 'onclick' | 'oncontextmenu' | 'oncontrolselect' | 'oncopy' | 'oncut' | - 'ondataavailable' | 'ondatasetchanged' | 'ondatasetcomplete' | 'ondblclick' | 'ondeactivate' | 'ondrag' | 'ondragend' | 'ondragenter' | 'ondragleave' | - 'ondragover' | 'ondragstart' | 'ondrop' | 'onerrorupdate' | 'onfilterchange' | 'onfocus' | 'onfocusin' | 'onfocusout' | 'onhelp' | 'onkeydown' | 'onkeypress' | - 'onkeyup' | 'onlayoutcomplete' | 'onlosecapture' | 'onmousedown' | 'onmouseenter' | 'onmouseleave' | 'onmousemove' | 'onmouseout' | 'onmouseover' | 'onmouseup' | - 'onmousewheel' | 'onmove' | 'onmoveend' | 'onmovestart' | 'onpage' | 'onpaste' | 'onpropertychange' | 'onreadystatechange' | 'onresize' | 'onresizeend' | - 'onresizestart' | 'onrowenter' | 'onrowexit' | 'onrowsdelete' | 'onrowsinserted' | 'onscroll' | 'onselectstart', - handler: (this: MSHTML.SVGSymbolElement, parameter: {}) => void): void; - on( - obj: MSHTML.SVGTextElement, event: 'onactivate' | 'onafterupdate' | 'onbeforeactivate' | 'onbeforecopy' | 'onbeforecut' | 'onbeforedeactivate' | - 'onbeforeeditfocus' | 'onbeforepaste' | 'onbeforeupdate' | 'onblur' | 'oncellchange' | 'onclick' | 'oncontextmenu' | 'oncontrolselect' | 'oncopy' | 'oncut' | - 'ondataavailable' | 'ondatasetchanged' | 'ondatasetcomplete' | 'ondblclick' | 'ondeactivate' | 'ondrag' | 'ondragend' | 'ondragenter' | 'ondragleave' | - 'ondragover' | 'ondragstart' | 'ondrop' | 'onerrorupdate' | 'onfilterchange' | 'onfocus' | 'onfocusin' | 'onfocusout' | 'onhelp' | 'onkeydown' | 'onkeypress' | - 'onkeyup' | 'onlayoutcomplete' | 'onlosecapture' | 'onmousedown' | 'onmouseenter' | 'onmouseleave' | 'onmousemove' | 'onmouseout' | 'onmouseover' | 'onmouseup' | - 'onmousewheel' | 'onmove' | 'onmoveend' | 'onmovestart' | 'onpage' | 'onpaste' | 'onpropertychange' | 'onreadystatechange' | 'onresize' | 'onresizeend' | - 'onresizestart' | 'onrowenter' | 'onrowexit' | 'onrowsdelete' | 'onrowsinserted' | 'onscroll' | 'onselectstart', - handler: (this: MSHTML.SVGTextElement, parameter: {}) => void): void; - on( - obj: MSHTML.SVGTextPathElement, event: 'onactivate' | 'onafterupdate' | 'onbeforeactivate' | 'onbeforecopy' | 'onbeforecut' | 'onbeforedeactivate' | - 'onbeforeeditfocus' | 'onbeforepaste' | 'onbeforeupdate' | 'onblur' | 'oncellchange' | 'onclick' | 'oncontextmenu' | 'oncontrolselect' | 'oncopy' | 'oncut' | - 'ondataavailable' | 'ondatasetchanged' | 'ondatasetcomplete' | 'ondblclick' | 'ondeactivate' | 'ondrag' | 'ondragend' | 'ondragenter' | 'ondragleave' | - 'ondragover' | 'ondragstart' | 'ondrop' | 'onerrorupdate' | 'onfilterchange' | 'onfocus' | 'onfocusin' | 'onfocusout' | 'onhelp' | 'onkeydown' | 'onkeypress' | - 'onkeyup' | 'onlayoutcomplete' | 'onlosecapture' | 'onmousedown' | 'onmouseenter' | 'onmouseleave' | 'onmousemove' | 'onmouseout' | 'onmouseover' | 'onmouseup' | - 'onmousewheel' | 'onmove' | 'onmoveend' | 'onmovestart' | 'onpage' | 'onpaste' | 'onpropertychange' | 'onreadystatechange' | 'onresize' | 'onresizeend' | - 'onresizestart' | 'onrowenter' | 'onrowexit' | 'onrowsdelete' | 'onrowsinserted' | 'onscroll' | 'onselectstart', - handler: (this: MSHTML.SVGTextPathElement, parameter: {}) => void): void; - on( - obj: MSHTML.SVGTSpanElement, event: 'onactivate' | 'onafterupdate' | 'onbeforeactivate' | 'onbeforecopy' | 'onbeforecut' | 'onbeforedeactivate' | - 'onbeforeeditfocus' | 'onbeforepaste' | 'onbeforeupdate' | 'onblur' | 'oncellchange' | 'onclick' | 'oncontextmenu' | 'oncontrolselect' | 'oncopy' | 'oncut' | - 'ondataavailable' | 'ondatasetchanged' | 'ondatasetcomplete' | 'ondblclick' | 'ondeactivate' | 'ondrag' | 'ondragend' | 'ondragenter' | 'ondragleave' | - 'ondragover' | 'ondragstart' | 'ondrop' | 'onerrorupdate' | 'onfilterchange' | 'onfocus' | 'onfocusin' | 'onfocusout' | 'onhelp' | 'onkeydown' | 'onkeypress' | - 'onkeyup' | 'onlayoutcomplete' | 'onlosecapture' | 'onmousedown' | 'onmouseenter' | 'onmouseleave' | 'onmousemove' | 'onmouseout' | 'onmouseover' | 'onmouseup' | - 'onmousewheel' | 'onmove' | 'onmoveend' | 'onmovestart' | 'onpage' | 'onpaste' | 'onpropertychange' | 'onreadystatechange' | 'onresize' | 'onresizeend' | - 'onresizestart' | 'onrowenter' | 'onrowexit' | 'onrowsdelete' | 'onrowsinserted' | 'onscroll' | 'onselectstart', - handler: (this: MSHTML.SVGTSpanElement, parameter: {}) => void): void; - on( - obj: MSHTML.SVGUseElement, event: 'onactivate' | 'onafterupdate' | 'onbeforeactivate' | 'onbeforecopy' | 'onbeforecut' | 'onbeforedeactivate' | - 'onbeforeeditfocus' | 'onbeforepaste' | 'onbeforeupdate' | 'onblur' | 'oncellchange' | 'onclick' | 'oncontextmenu' | 'oncontrolselect' | 'oncopy' | 'oncut' | - 'ondataavailable' | 'ondatasetchanged' | 'ondatasetcomplete' | 'ondblclick' | 'ondeactivate' | 'ondrag' | 'ondragend' | 'ondragenter' | 'ondragleave' | - 'ondragover' | 'ondragstart' | 'ondrop' | 'onerrorupdate' | 'onfilterchange' | 'onfocus' | 'onfocusin' | 'onfocusout' | 'onhelp' | 'onkeydown' | 'onkeypress' | - 'onkeyup' | 'onlayoutcomplete' | 'onlosecapture' | 'onmousedown' | 'onmouseenter' | 'onmouseleave' | 'onmousemove' | 'onmouseout' | 'onmouseover' | 'onmouseup' | - 'onmousewheel' | 'onmove' | 'onmoveend' | 'onmovestart' | 'onpage' | 'onpaste' | 'onpropertychange' | 'onreadystatechange' | 'onresize' | 'onresizeend' | - 'onresizestart' | 'onrowenter' | 'onrowexit' | 'onrowsdelete' | 'onrowsinserted' | 'onscroll' | 'onselectstart', - handler: (this: MSHTML.SVGUseElement, parameter: {}) => void): void; - on( - obj: MSHTML.SVGViewElement, event: 'onactivate' | 'onafterupdate' | 'onbeforeactivate' | 'onbeforecopy' | 'onbeforecut' | 'onbeforedeactivate' | - 'onbeforeeditfocus' | 'onbeforepaste' | 'onbeforeupdate' | 'onblur' | 'oncellchange' | 'onclick' | 'oncontextmenu' | 'oncontrolselect' | 'oncopy' | 'oncut' | - 'ondataavailable' | 'ondatasetchanged' | 'ondatasetcomplete' | 'ondblclick' | 'ondeactivate' | 'ondrag' | 'ondragend' | 'ondragenter' | 'ondragleave' | - 'ondragover' | 'ondragstart' | 'ondrop' | 'onerrorupdate' | 'onfilterchange' | 'onfocus' | 'onfocusin' | 'onfocusout' | 'onhelp' | 'onkeydown' | 'onkeypress' | - 'onkeyup' | 'onlayoutcomplete' | 'onlosecapture' | 'onmousedown' | 'onmouseenter' | 'onmouseleave' | 'onmousemove' | 'onmouseout' | 'onmouseover' | 'onmouseup' | - 'onmousewheel' | 'onmove' | 'onmoveend' | 'onmovestart' | 'onpage' | 'onpaste' | 'onpropertychange' | 'onreadystatechange' | 'onresize' | 'onresizeend' | - 'onresizestart' | 'onrowenter' | 'onrowexit' | 'onrowsdelete' | 'onrowsinserted' | 'onscroll' | 'onselectstart', - handler: (this: MSHTML.SVGViewElement, parameter: {}) => void): void; - new(progid: K): ActiveXObjectNameMap[K]; + on(obj: MSHTML.OldHTMLDocument, event: 'onactivate' | 'onafterupdate' | 'onbeforeactivate' | 'onbeforedeactivate' | 'onbeforeeditfocus' | 'onbeforeupdate' | 'oncellchange' | 'onclick' | 'oncontextmenu' | 'oncontrolselect' | 'ondataavailable' | 'ondatasetchanged' | 'ondatasetcomplete' | 'ondblclick' | 'ondeactivate' | 'ondragstart' | 'onerrorupdate' | 'onfocusin' | 'onfocusout' | 'onhelp' | 'onkeydown' | 'onkeypress' | 'onkeyup' | 'onmousedown' | 'onmousemove' | 'onmouseout' | 'onmouseover' | 'onmouseup' | 'onmousewheel' | 'onpropertychange' | 'onreadystatechange' | 'onrowenter' | 'onrowexit' | 'onrowsdelete' | 'onrowsinserted' | 'onselectionchange' | 'onselectstart' | 'onstop', handler: (this: MSHTML.OldHTMLDocument, parameter: {}) => void): void; + on(obj: MSHTML.OldHTMLFormElement, event: 'onactivate' | 'onafterupdate' | 'onbeforeactivate' | 'onbeforecopy' | 'onbeforecut' | 'onbeforedeactivate' | 'onbeforeeditfocus' | 'onbeforepaste' | 'onbeforeupdate' | 'onblur' | 'oncellchange' | 'onclick' | 'oncontextmenu' | 'oncontrolselect' | 'oncopy' | 'oncut' | 'ondataavailable' | 'ondatasetchanged' | 'ondatasetcomplete' | 'ondblclick' | 'ondeactivate' | 'ondrag' | 'ondragend' | 'ondragenter' | 'ondragleave' | 'ondragover' | 'ondragstart' | 'ondrop' | 'onerrorupdate' | 'onfilterchange' | 'onfocus' | 'onfocusin' | 'onfocusout' | 'onhelp' | 'onkeydown' | 'onkeypress' | 'onkeyup' | 'onlayoutcomplete' | 'onlosecapture' | 'onmousedown' | 'onmouseenter' | 'onmouseleave' | 'onmousemove' | 'onmouseout' | 'onmouseover' | 'onmouseup' | 'onmousewheel' | 'onmove' | 'onmoveend' | 'onmovestart' | 'onpage' | 'onpaste' | 'onpropertychange' | 'onreadystatechange' | 'onreset' | 'onresize' | 'onresizeend' | 'onresizestart' | 'onrowenter' | 'onrowexit' | 'onrowsdelete' | 'onrowsinserted' | 'onscroll' | 'onselectstart' | 'onsubmit', handler: (this: MSHTML.OldHTMLFormElement, parameter: {}) => void): void; + on(obj: MSHTML.Scriptlet, event: 'onclick' | 'ondblclick' | 'onkeydown' | 'onkeypress' | 'onkeyup' | 'onmousedown' | 'onmousemove' | 'onmouseup' | 'onreadystatechange', handler: (this: MSHTML.Scriptlet, parameter: {}) => void): void; + on(obj: MSHTML.SVGAElement, event: 'onactivate' | 'onafterupdate' | 'onbeforeactivate' | 'onbeforecopy' | 'onbeforecut' | 'onbeforedeactivate' | 'onbeforeeditfocus' | 'onbeforepaste' | 'onbeforeupdate' | 'onblur' | 'oncellchange' | 'onclick' | 'oncontextmenu' | 'oncontrolselect' | 'oncopy' | 'oncut' | 'ondataavailable' | 'ondatasetchanged' | 'ondatasetcomplete' | 'ondblclick' | 'ondeactivate' | 'ondrag' | 'ondragend' | 'ondragenter' | 'ondragleave' | 'ondragover' | 'ondragstart' | 'ondrop' | 'onerrorupdate' | 'onfilterchange' | 'onfocus' | 'onfocusin' | 'onfocusout' | 'onhelp' | 'onkeydown' | 'onkeypress' | 'onkeyup' | 'onlayoutcomplete' | 'onlosecapture' | 'onmousedown' | 'onmouseenter' | 'onmouseleave' | 'onmousemove' | 'onmouseout' | 'onmouseover' | 'onmouseup' | 'onmousewheel' | 'onmove' | 'onmoveend' | 'onmovestart' | 'onpage' | 'onpaste' | 'onpropertychange' | 'onreadystatechange' | 'onresize' | 'onresizeend' | 'onresizestart' | 'onrowenter' | 'onrowexit' | 'onrowsdelete' | 'onrowsinserted' | 'onscroll' | 'onselectstart', handler: (this: MSHTML.SVGAElement, parameter: {}) => void): void; + on(obj: MSHTML.SVGCircleElement, event: 'onactivate' | 'onafterupdate' | 'onbeforeactivate' | 'onbeforecopy' | 'onbeforecut' | 'onbeforedeactivate' | 'onbeforeeditfocus' | 'onbeforepaste' | 'onbeforeupdate' | 'onblur' | 'oncellchange' | 'onclick' | 'oncontextmenu' | 'oncontrolselect' | 'oncopy' | 'oncut' | 'ondataavailable' | 'ondatasetchanged' | 'ondatasetcomplete' | 'ondblclick' | 'ondeactivate' | 'ondrag' | 'ondragend' | 'ondragenter' | 'ondragleave' | 'ondragover' | 'ondragstart' | 'ondrop' | 'onerrorupdate' | 'onfilterchange' | 'onfocus' | 'onfocusin' | 'onfocusout' | 'onhelp' | 'onkeydown' | 'onkeypress' | 'onkeyup' | 'onlayoutcomplete' | 'onlosecapture' | 'onmousedown' | 'onmouseenter' | 'onmouseleave' | 'onmousemove' | 'onmouseout' | 'onmouseover' | 'onmouseup' | 'onmousewheel' | 'onmove' | 'onmoveend' | 'onmovestart' | 'onpage' | 'onpaste' | 'onpropertychange' | 'onreadystatechange' | 'onresize' | 'onresizeend' | 'onresizestart' | 'onrowenter' | 'onrowexit' | 'onrowsdelete' | 'onrowsinserted' | 'onscroll' | 'onselectstart', handler: (this: MSHTML.SVGCircleElement, parameter: {}) => void): void; + on(obj: MSHTML.SVGClipPathElement, event: 'onactivate' | 'onafterupdate' | 'onbeforeactivate' | 'onbeforecopy' | 'onbeforecut' | 'onbeforedeactivate' | 'onbeforeeditfocus' | 'onbeforepaste' | 'onbeforeupdate' | 'onblur' | 'oncellchange' | 'onclick' | 'oncontextmenu' | 'oncontrolselect' | 'oncopy' | 'oncut' | 'ondataavailable' | 'ondatasetchanged' | 'ondatasetcomplete' | 'ondblclick' | 'ondeactivate' | 'ondrag' | 'ondragend' | 'ondragenter' | 'ondragleave' | 'ondragover' | 'ondragstart' | 'ondrop' | 'onerrorupdate' | 'onfilterchange' | 'onfocus' | 'onfocusin' | 'onfocusout' | 'onhelp' | 'onkeydown' | 'onkeypress' | 'onkeyup' | 'onlayoutcomplete' | 'onlosecapture' | 'onmousedown' | 'onmouseenter' | 'onmouseleave' | 'onmousemove' | 'onmouseout' | 'onmouseover' | 'onmouseup' | 'onmousewheel' | 'onmove' | 'onmoveend' | 'onmovestart' | 'onpage' | 'onpaste' | 'onpropertychange' | 'onreadystatechange' | 'onresize' | 'onresizeend' | 'onresizestart' | 'onrowenter' | 'onrowexit' | 'onrowsdelete' | 'onrowsinserted' | 'onscroll' | 'onselectstart', handler: (this: MSHTML.SVGClipPathElement, parameter: {}) => void): void; + on(obj: MSHTML.SVGDefsElement, event: 'onactivate' | 'onafterupdate' | 'onbeforeactivate' | 'onbeforecopy' | 'onbeforecut' | 'onbeforedeactivate' | 'onbeforeeditfocus' | 'onbeforepaste' | 'onbeforeupdate' | 'onblur' | 'oncellchange' | 'onclick' | 'oncontextmenu' | 'oncontrolselect' | 'oncopy' | 'oncut' | 'ondataavailable' | 'ondatasetchanged' | 'ondatasetcomplete' | 'ondblclick' | 'ondeactivate' | 'ondrag' | 'ondragend' | 'ondragenter' | 'ondragleave' | 'ondragover' | 'ondragstart' | 'ondrop' | 'onerrorupdate' | 'onfilterchange' | 'onfocus' | 'onfocusin' | 'onfocusout' | 'onhelp' | 'onkeydown' | 'onkeypress' | 'onkeyup' | 'onlayoutcomplete' | 'onlosecapture' | 'onmousedown' | 'onmouseenter' | 'onmouseleave' | 'onmousemove' | 'onmouseout' | 'onmouseover' | 'onmouseup' | 'onmousewheel' | 'onmove' | 'onmoveend' | 'onmovestart' | 'onpage' | 'onpaste' | 'onpropertychange' | 'onreadystatechange' | 'onresize' | 'onresizeend' | 'onresizestart' | 'onrowenter' | 'onrowexit' | 'onrowsdelete' | 'onrowsinserted' | 'onscroll' | 'onselectstart', handler: (this: MSHTML.SVGDefsElement, parameter: {}) => void): void; + on(obj: MSHTML.SVGElement, event: 'onactivate' | 'onafterupdate' | 'onbeforeactivate' | 'onbeforecopy' | 'onbeforecut' | 'onbeforedeactivate' | 'onbeforeeditfocus' | 'onbeforepaste' | 'onbeforeupdate' | 'onblur' | 'oncellchange' | 'onclick' | 'oncontextmenu' | 'oncontrolselect' | 'oncopy' | 'oncut' | 'ondataavailable' | 'ondatasetchanged' | 'ondatasetcomplete' | 'ondblclick' | 'ondeactivate' | 'ondrag' | 'ondragend' | 'ondragenter' | 'ondragleave' | 'ondragover' | 'ondragstart' | 'ondrop' | 'onerrorupdate' | 'onfilterchange' | 'onfocus' | 'onfocusin' | 'onfocusout' | 'onhelp' | 'onkeydown' | 'onkeypress' | 'onkeyup' | 'onlayoutcomplete' | 'onlosecapture' | 'onmousedown' | 'onmouseenter' | 'onmouseleave' | 'onmousemove' | 'onmouseout' | 'onmouseover' | 'onmouseup' | 'onmousewheel' | 'onmove' | 'onmoveend' | 'onmovestart' | 'onpage' | 'onpaste' | 'onpropertychange' | 'onreadystatechange' | 'onresize' | 'onresizeend' | 'onresizestart' | 'onrowenter' | 'onrowexit' | 'onrowsdelete' | 'onrowsinserted' | 'onscroll' | 'onselectstart', handler: (this: MSHTML.SVGElement, parameter: {}) => void): void; + on(obj: MSHTML.SVGEllipseElement, event: 'onactivate' | 'onafterupdate' | 'onbeforeactivate' | 'onbeforecopy' | 'onbeforecut' | 'onbeforedeactivate' | 'onbeforeeditfocus' | 'onbeforepaste' | 'onbeforeupdate' | 'onblur' | 'oncellchange' | 'onclick' | 'oncontextmenu' | 'oncontrolselect' | 'oncopy' | 'oncut' | 'ondataavailable' | 'ondatasetchanged' | 'ondatasetcomplete' | 'ondblclick' | 'ondeactivate' | 'ondrag' | 'ondragend' | 'ondragenter' | 'ondragleave' | 'ondragover' | 'ondragstart' | 'ondrop' | 'onerrorupdate' | 'onfilterchange' | 'onfocus' | 'onfocusin' | 'onfocusout' | 'onhelp' | 'onkeydown' | 'onkeypress' | 'onkeyup' | 'onlayoutcomplete' | 'onlosecapture' | 'onmousedown' | 'onmouseenter' | 'onmouseleave' | 'onmousemove' | 'onmouseout' | 'onmouseover' | 'onmouseup' | 'onmousewheel' | 'onmove' | 'onmoveend' | 'onmovestart' | 'onpage' | 'onpaste' | 'onpropertychange' | 'onreadystatechange' | 'onresize' | 'onresizeend' | 'onresizestart' | 'onrowenter' | 'onrowexit' | 'onrowsdelete' | 'onrowsinserted' | 'onscroll' | 'onselectstart', handler: (this: MSHTML.SVGEllipseElement, parameter: {}) => void): void; + on(obj: MSHTML.SVGGElement, event: 'onactivate' | 'onafterupdate' | 'onbeforeactivate' | 'onbeforecopy' | 'onbeforecut' | 'onbeforedeactivate' | 'onbeforeeditfocus' | 'onbeforepaste' | 'onbeforeupdate' | 'onblur' | 'oncellchange' | 'onclick' | 'oncontextmenu' | 'oncontrolselect' | 'oncopy' | 'oncut' | 'ondataavailable' | 'ondatasetchanged' | 'ondatasetcomplete' | 'ondblclick' | 'ondeactivate' | 'ondrag' | 'ondragend' | 'ondragenter' | 'ondragleave' | 'ondragover' | 'ondragstart' | 'ondrop' | 'onerrorupdate' | 'onfilterchange' | 'onfocus' | 'onfocusin' | 'onfocusout' | 'onhelp' | 'onkeydown' | 'onkeypress' | 'onkeyup' | 'onlayoutcomplete' | 'onlosecapture' | 'onmousedown' | 'onmouseenter' | 'onmouseleave' | 'onmousemove' | 'onmouseout' | 'onmouseover' | 'onmouseup' | 'onmousewheel' | 'onmove' | 'onmoveend' | 'onmovestart' | 'onpage' | 'onpaste' | 'onpropertychange' | 'onreadystatechange' | 'onresize' | 'onresizeend' | 'onresizestart' | 'onrowenter' | 'onrowexit' | 'onrowsdelete' | 'onrowsinserted' | 'onscroll' | 'onselectstart', handler: (this: MSHTML.SVGGElement, parameter: {}) => void): void; + on(obj: MSHTML.SVGGradientElement, event: 'onactivate' | 'onafterupdate' | 'onbeforeactivate' | 'onbeforecopy' | 'onbeforecut' | 'onbeforedeactivate' | 'onbeforeeditfocus' | 'onbeforepaste' | 'onbeforeupdate' | 'onblur' | 'oncellchange' | 'onclick' | 'oncontextmenu' | 'oncontrolselect' | 'oncopy' | 'oncut' | 'ondataavailable' | 'ondatasetchanged' | 'ondatasetcomplete' | 'ondblclick' | 'ondeactivate' | 'ondrag' | 'ondragend' | 'ondragenter' | 'ondragleave' | 'ondragover' | 'ondragstart' | 'ondrop' | 'onerrorupdate' | 'onfilterchange' | 'onfocus' | 'onfocusin' | 'onfocusout' | 'onhelp' | 'onkeydown' | 'onkeypress' | 'onkeyup' | 'onlayoutcomplete' | 'onlosecapture' | 'onmousedown' | 'onmouseenter' | 'onmouseleave' | 'onmousemove' | 'onmouseout' | 'onmouseover' | 'onmouseup' | 'onmousewheel' | 'onmove' | 'onmoveend' | 'onmovestart' | 'onpage' | 'onpaste' | 'onpropertychange' | 'onreadystatechange' | 'onresize' | 'onresizeend' | 'onresizestart' | 'onrowenter' | 'onrowexit' | 'onrowsdelete' | 'onrowsinserted' | 'onscroll' | 'onselectstart', handler: (this: MSHTML.SVGGradientElement, parameter: {}) => void): void; + on(obj: MSHTML.SVGImageElement, event: 'onactivate' | 'onafterupdate' | 'onbeforeactivate' | 'onbeforecopy' | 'onbeforecut' | 'onbeforedeactivate' | 'onbeforeeditfocus' | 'onbeforepaste' | 'onbeforeupdate' | 'onblur' | 'oncellchange' | 'onclick' | 'oncontextmenu' | 'oncontrolselect' | 'oncopy' | 'oncut' | 'ondataavailable' | 'ondatasetchanged' | 'ondatasetcomplete' | 'ondblclick' | 'ondeactivate' | 'ondrag' | 'ondragend' | 'ondragenter' | 'ondragleave' | 'ondragover' | 'ondragstart' | 'ondrop' | 'onerrorupdate' | 'onfilterchange' | 'onfocus' | 'onfocusin' | 'onfocusout' | 'onhelp' | 'onkeydown' | 'onkeypress' | 'onkeyup' | 'onlayoutcomplete' | 'onlosecapture' | 'onmousedown' | 'onmouseenter' | 'onmouseleave' | 'onmousemove' | 'onmouseout' | 'onmouseover' | 'onmouseup' | 'onmousewheel' | 'onmove' | 'onmoveend' | 'onmovestart' | 'onpage' | 'onpaste' | 'onpropertychange' | 'onreadystatechange' | 'onresize' | 'onresizeend' | 'onresizestart' | 'onrowenter' | 'onrowexit' | 'onrowsdelete' | 'onrowsinserted' | 'onscroll' | 'onselectstart', handler: (this: MSHTML.SVGImageElement, parameter: {}) => void): void; + on(obj: MSHTML.SVGLineElement, event: 'onactivate' | 'onafterupdate' | 'onbeforeactivate' | 'onbeforecopy' | 'onbeforecut' | 'onbeforedeactivate' | 'onbeforeeditfocus' | 'onbeforepaste' | 'onbeforeupdate' | 'onblur' | 'oncellchange' | 'onclick' | 'oncontextmenu' | 'oncontrolselect' | 'oncopy' | 'oncut' | 'ondataavailable' | 'ondatasetchanged' | 'ondatasetcomplete' | 'ondblclick' | 'ondeactivate' | 'ondrag' | 'ondragend' | 'ondragenter' | 'ondragleave' | 'ondragover' | 'ondragstart' | 'ondrop' | 'onerrorupdate' | 'onfilterchange' | 'onfocus' | 'onfocusin' | 'onfocusout' | 'onhelp' | 'onkeydown' | 'onkeypress' | 'onkeyup' | 'onlayoutcomplete' | 'onlosecapture' | 'onmousedown' | 'onmouseenter' | 'onmouseleave' | 'onmousemove' | 'onmouseout' | 'onmouseover' | 'onmouseup' | 'onmousewheel' | 'onmove' | 'onmoveend' | 'onmovestart' | 'onpage' | 'onpaste' | 'onpropertychange' | 'onreadystatechange' | 'onresize' | 'onresizeend' | 'onresizestart' | 'onrowenter' | 'onrowexit' | 'onrowsdelete' | 'onrowsinserted' | 'onscroll' | 'onselectstart', handler: (this: MSHTML.SVGLineElement, parameter: {}) => void): void; + on(obj: MSHTML.SVGMarkerElement, event: 'onactivate' | 'onafterupdate' | 'onbeforeactivate' | 'onbeforecopy' | 'onbeforecut' | 'onbeforedeactivate' | 'onbeforeeditfocus' | 'onbeforepaste' | 'onbeforeupdate' | 'onblur' | 'oncellchange' | 'onclick' | 'oncontextmenu' | 'oncontrolselect' | 'oncopy' | 'oncut' | 'ondataavailable' | 'ondatasetchanged' | 'ondatasetcomplete' | 'ondblclick' | 'ondeactivate' | 'ondrag' | 'ondragend' | 'ondragenter' | 'ondragleave' | 'ondragover' | 'ondragstart' | 'ondrop' | 'onerrorupdate' | 'onfilterchange' | 'onfocus' | 'onfocusin' | 'onfocusout' | 'onhelp' | 'onkeydown' | 'onkeypress' | 'onkeyup' | 'onlayoutcomplete' | 'onlosecapture' | 'onmousedown' | 'onmouseenter' | 'onmouseleave' | 'onmousemove' | 'onmouseout' | 'onmouseover' | 'onmouseup' | 'onmousewheel' | 'onmove' | 'onmoveend' | 'onmovestart' | 'onpage' | 'onpaste' | 'onpropertychange' | 'onreadystatechange' | 'onresize' | 'onresizeend' | 'onresizestart' | 'onrowenter' | 'onrowexit' | 'onrowsdelete' | 'onrowsinserted' | 'onscroll' | 'onselectstart', handler: (this: MSHTML.SVGMarkerElement, parameter: {}) => void): void; + on(obj: MSHTML.SVGMaskElement, event: 'onactivate' | 'onafterupdate' | 'onbeforeactivate' | 'onbeforecopy' | 'onbeforecut' | 'onbeforedeactivate' | 'onbeforeeditfocus' | 'onbeforepaste' | 'onbeforeupdate' | 'onblur' | 'oncellchange' | 'onclick' | 'oncontextmenu' | 'oncontrolselect' | 'oncopy' | 'oncut' | 'ondataavailable' | 'ondatasetchanged' | 'ondatasetcomplete' | 'ondblclick' | 'ondeactivate' | 'ondrag' | 'ondragend' | 'ondragenter' | 'ondragleave' | 'ondragover' | 'ondragstart' | 'ondrop' | 'onerrorupdate' | 'onfilterchange' | 'onfocus' | 'onfocusin' | 'onfocusout' | 'onhelp' | 'onkeydown' | 'onkeypress' | 'onkeyup' | 'onlayoutcomplete' | 'onlosecapture' | 'onmousedown' | 'onmouseenter' | 'onmouseleave' | 'onmousemove' | 'onmouseout' | 'onmouseover' | 'onmouseup' | 'onmousewheel' | 'onmove' | 'onmoveend' | 'onmovestart' | 'onpage' | 'onpaste' | 'onpropertychange' | 'onreadystatechange' | 'onresize' | 'onresizeend' | 'onresizestart' | 'onrowenter' | 'onrowexit' | 'onrowsdelete' | 'onrowsinserted' | 'onscroll' | 'onselectstart', handler: (this: MSHTML.SVGMaskElement, parameter: {}) => void): void; + on(obj: MSHTML.SVGPathElement, event: 'onactivate' | 'onafterupdate' | 'onbeforeactivate' | 'onbeforecopy' | 'onbeforecut' | 'onbeforedeactivate' | 'onbeforeeditfocus' | 'onbeforepaste' | 'onbeforeupdate' | 'onblur' | 'oncellchange' | 'onclick' | 'oncontextmenu' | 'oncontrolselect' | 'oncopy' | 'oncut' | 'ondataavailable' | 'ondatasetchanged' | 'ondatasetcomplete' | 'ondblclick' | 'ondeactivate' | 'ondrag' | 'ondragend' | 'ondragenter' | 'ondragleave' | 'ondragover' | 'ondragstart' | 'ondrop' | 'onerrorupdate' | 'onfilterchange' | 'onfocus' | 'onfocusin' | 'onfocusout' | 'onhelp' | 'onkeydown' | 'onkeypress' | 'onkeyup' | 'onlayoutcomplete' | 'onlosecapture' | 'onmousedown' | 'onmouseenter' | 'onmouseleave' | 'onmousemove' | 'onmouseout' | 'onmouseover' | 'onmouseup' | 'onmousewheel' | 'onmove' | 'onmoveend' | 'onmovestart' | 'onpage' | 'onpaste' | 'onpropertychange' | 'onreadystatechange' | 'onresize' | 'onresizeend' | 'onresizestart' | 'onrowenter' | 'onrowexit' | 'onrowsdelete' | 'onrowsinserted' | 'onscroll' | 'onselectstart', handler: (this: MSHTML.SVGPathElement, parameter: {}) => void): void; + on(obj: MSHTML.SVGPatternElement, event: 'onactivate' | 'onafterupdate' | 'onbeforeactivate' | 'onbeforecopy' | 'onbeforecut' | 'onbeforedeactivate' | 'onbeforeeditfocus' | 'onbeforepaste' | 'onbeforeupdate' | 'onblur' | 'oncellchange' | 'onclick' | 'oncontextmenu' | 'oncontrolselect' | 'oncopy' | 'oncut' | 'ondataavailable' | 'ondatasetchanged' | 'ondatasetcomplete' | 'ondblclick' | 'ondeactivate' | 'ondrag' | 'ondragend' | 'ondragenter' | 'ondragleave' | 'ondragover' | 'ondragstart' | 'ondrop' | 'onerrorupdate' | 'onfilterchange' | 'onfocus' | 'onfocusin' | 'onfocusout' | 'onhelp' | 'onkeydown' | 'onkeypress' | 'onkeyup' | 'onlayoutcomplete' | 'onlosecapture' | 'onmousedown' | 'onmouseenter' | 'onmouseleave' | 'onmousemove' | 'onmouseout' | 'onmouseover' | 'onmouseup' | 'onmousewheel' | 'onmove' | 'onmoveend' | 'onmovestart' | 'onpage' | 'onpaste' | 'onpropertychange' | 'onreadystatechange' | 'onresize' | 'onresizeend' | 'onresizestart' | 'onrowenter' | 'onrowexit' | 'onrowsdelete' | 'onrowsinserted' | 'onscroll' | 'onselectstart', handler: (this: MSHTML.SVGPatternElement, parameter: {}) => void): void; + on(obj: MSHTML.SVGPolygonElement, event: 'onactivate' | 'onafterupdate' | 'onbeforeactivate' | 'onbeforecopy' | 'onbeforecut' | 'onbeforedeactivate' | 'onbeforeeditfocus' | 'onbeforepaste' | 'onbeforeupdate' | 'onblur' | 'oncellchange' | 'onclick' | 'oncontextmenu' | 'oncontrolselect' | 'oncopy' | 'oncut' | 'ondataavailable' | 'ondatasetchanged' | 'ondatasetcomplete' | 'ondblclick' | 'ondeactivate' | 'ondrag' | 'ondragend' | 'ondragenter' | 'ondragleave' | 'ondragover' | 'ondragstart' | 'ondrop' | 'onerrorupdate' | 'onfilterchange' | 'onfocus' | 'onfocusin' | 'onfocusout' | 'onhelp' | 'onkeydown' | 'onkeypress' | 'onkeyup' | 'onlayoutcomplete' | 'onlosecapture' | 'onmousedown' | 'onmouseenter' | 'onmouseleave' | 'onmousemove' | 'onmouseout' | 'onmouseover' | 'onmouseup' | 'onmousewheel' | 'onmove' | 'onmoveend' | 'onmovestart' | 'onpage' | 'onpaste' | 'onpropertychange' | 'onreadystatechange' | 'onresize' | 'onresizeend' | 'onresizestart' | 'onrowenter' | 'onrowexit' | 'onrowsdelete' | 'onrowsinserted' | 'onscroll' | 'onselectstart', handler: (this: MSHTML.SVGPolygonElement, parameter: {}) => void): void; + on(obj: MSHTML.SVGPolylineElement, event: 'onactivate' | 'onafterupdate' | 'onbeforeactivate' | 'onbeforecopy' | 'onbeforecut' | 'onbeforedeactivate' | 'onbeforeeditfocus' | 'onbeforepaste' | 'onbeforeupdate' | 'onblur' | 'oncellchange' | 'onclick' | 'oncontextmenu' | 'oncontrolselect' | 'oncopy' | 'oncut' | 'ondataavailable' | 'ondatasetchanged' | 'ondatasetcomplete' | 'ondblclick' | 'ondeactivate' | 'ondrag' | 'ondragend' | 'ondragenter' | 'ondragleave' | 'ondragover' | 'ondragstart' | 'ondrop' | 'onerrorupdate' | 'onfilterchange' | 'onfocus' | 'onfocusin' | 'onfocusout' | 'onhelp' | 'onkeydown' | 'onkeypress' | 'onkeyup' | 'onlayoutcomplete' | 'onlosecapture' | 'onmousedown' | 'onmouseenter' | 'onmouseleave' | 'onmousemove' | 'onmouseout' | 'onmouseover' | 'onmouseup' | 'onmousewheel' | 'onmove' | 'onmoveend' | 'onmovestart' | 'onpage' | 'onpaste' | 'onpropertychange' | 'onreadystatechange' | 'onresize' | 'onresizeend' | 'onresizestart' | 'onrowenter' | 'onrowexit' | 'onrowsdelete' | 'onrowsinserted' | 'onscroll' | 'onselectstart', handler: (this: MSHTML.SVGPolylineElement, parameter: {}) => void): void; + on(obj: MSHTML.SVGRectElement, event: 'onactivate' | 'onafterupdate' | 'onbeforeactivate' | 'onbeforecopy' | 'onbeforecut' | 'onbeforedeactivate' | 'onbeforeeditfocus' | 'onbeforepaste' | 'onbeforeupdate' | 'onblur' | 'oncellchange' | 'onclick' | 'oncontextmenu' | 'oncontrolselect' | 'oncopy' | 'oncut' | 'ondataavailable' | 'ondatasetchanged' | 'ondatasetcomplete' | 'ondblclick' | 'ondeactivate' | 'ondrag' | 'ondragend' | 'ondragenter' | 'ondragleave' | 'ondragover' | 'ondragstart' | 'ondrop' | 'onerrorupdate' | 'onfilterchange' | 'onfocus' | 'onfocusin' | 'onfocusout' | 'onhelp' | 'onkeydown' | 'onkeypress' | 'onkeyup' | 'onlayoutcomplete' | 'onlosecapture' | 'onmousedown' | 'onmouseenter' | 'onmouseleave' | 'onmousemove' | 'onmouseout' | 'onmouseover' | 'onmouseup' | 'onmousewheel' | 'onmove' | 'onmoveend' | 'onmovestart' | 'onpage' | 'onpaste' | 'onpropertychange' | 'onreadystatechange' | 'onresize' | 'onresizeend' | 'onresizestart' | 'onrowenter' | 'onrowexit' | 'onrowsdelete' | 'onrowsinserted' | 'onscroll' | 'onselectstart', handler: (this: MSHTML.SVGRectElement, parameter: {}) => void): void; + on(obj: MSHTML.SVGScriptElement, event: 'onactivate' | 'onafterupdate' | 'onbeforeactivate' | 'onbeforecopy' | 'onbeforecut' | 'onbeforedeactivate' | 'onbeforeeditfocus' | 'onbeforepaste' | 'onbeforeupdate' | 'onblur' | 'oncellchange' | 'onclick' | 'oncontextmenu' | 'oncontrolselect' | 'oncopy' | 'oncut' | 'ondataavailable' | 'ondatasetchanged' | 'ondatasetcomplete' | 'ondblclick' | 'ondeactivate' | 'ondrag' | 'ondragend' | 'ondragenter' | 'ondragleave' | 'ondragover' | 'ondragstart' | 'ondrop' | 'onerrorupdate' | 'onfilterchange' | 'onfocus' | 'onfocusin' | 'onfocusout' | 'onhelp' | 'onkeydown' | 'onkeypress' | 'onkeyup' | 'onlayoutcomplete' | 'onlosecapture' | 'onmousedown' | 'onmouseenter' | 'onmouseleave' | 'onmousemove' | 'onmouseout' | 'onmouseover' | 'onmouseup' | 'onmousewheel' | 'onmove' | 'onmoveend' | 'onmovestart' | 'onpage' | 'onpaste' | 'onpropertychange' | 'onreadystatechange' | 'onresize' | 'onresizeend' | 'onresizestart' | 'onrowenter' | 'onrowexit' | 'onrowsdelete' | 'onrowsinserted' | 'onscroll' | 'onselectstart', handler: (this: MSHTML.SVGScriptElement, parameter: {}) => void): void; + on(obj: MSHTML.SVGStopElement, event: 'onactivate' | 'onafterupdate' | 'onbeforeactivate' | 'onbeforecopy' | 'onbeforecut' | 'onbeforedeactivate' | 'onbeforeeditfocus' | 'onbeforepaste' | 'onbeforeupdate' | 'onblur' | 'oncellchange' | 'onclick' | 'oncontextmenu' | 'oncontrolselect' | 'oncopy' | 'oncut' | 'ondataavailable' | 'ondatasetchanged' | 'ondatasetcomplete' | 'ondblclick' | 'ondeactivate' | 'ondrag' | 'ondragend' | 'ondragenter' | 'ondragleave' | 'ondragover' | 'ondragstart' | 'ondrop' | 'onerrorupdate' | 'onfilterchange' | 'onfocus' | 'onfocusin' | 'onfocusout' | 'onhelp' | 'onkeydown' | 'onkeypress' | 'onkeyup' | 'onlayoutcomplete' | 'onlosecapture' | 'onmousedown' | 'onmouseenter' | 'onmouseleave' | 'onmousemove' | 'onmouseout' | 'onmouseover' | 'onmouseup' | 'onmousewheel' | 'onmove' | 'onmoveend' | 'onmovestart' | 'onpage' | 'onpaste' | 'onpropertychange' | 'onreadystatechange' | 'onresize' | 'onresizeend' | 'onresizestart' | 'onrowenter' | 'onrowexit' | 'onrowsdelete' | 'onrowsinserted' | 'onscroll' | 'onselectstart', handler: (this: MSHTML.SVGStopElement, parameter: {}) => void): void; + on(obj: MSHTML.SVGSVGElement, event: 'onactivate' | 'onafterupdate' | 'onbeforeactivate' | 'onbeforecopy' | 'onbeforecut' | 'onbeforedeactivate' | 'onbeforeeditfocus' | 'onbeforepaste' | 'onbeforeupdate' | 'onblur' | 'oncellchange' | 'onclick' | 'oncontextmenu' | 'oncontrolselect' | 'oncopy' | 'oncut' | 'ondataavailable' | 'ondatasetchanged' | 'ondatasetcomplete' | 'ondblclick' | 'ondeactivate' | 'ondrag' | 'ondragend' | 'ondragenter' | 'ondragleave' | 'ondragover' | 'ondragstart' | 'ondrop' | 'onerrorupdate' | 'onfilterchange' | 'onfocus' | 'onfocusin' | 'onfocusout' | 'onhelp' | 'onkeydown' | 'onkeypress' | 'onkeyup' | 'onlayoutcomplete' | 'onlosecapture' | 'onmousedown' | 'onmouseenter' | 'onmouseleave' | 'onmousemove' | 'onmouseout' | 'onmouseover' | 'onmouseup' | 'onmousewheel' | 'onmove' | 'onmoveend' | 'onmovestart' | 'onpage' | 'onpaste' | 'onpropertychange' | 'onreadystatechange' | 'onresize' | 'onresizeend' | 'onresizestart' | 'onrowenter' | 'onrowexit' | 'onrowsdelete' | 'onrowsinserted' | 'onscroll' | 'onselectstart', handler: (this: MSHTML.SVGSVGElement, parameter: {}) => void): void; + on(obj: MSHTML.SVGSymbolElement, event: 'onactivate' | 'onafterupdate' | 'onbeforeactivate' | 'onbeforecopy' | 'onbeforecut' | 'onbeforedeactivate' | 'onbeforeeditfocus' | 'onbeforepaste' | 'onbeforeupdate' | 'onblur' | 'oncellchange' | 'onclick' | 'oncontextmenu' | 'oncontrolselect' | 'oncopy' | 'oncut' | 'ondataavailable' | 'ondatasetchanged' | 'ondatasetcomplete' | 'ondblclick' | 'ondeactivate' | 'ondrag' | 'ondragend' | 'ondragenter' | 'ondragleave' | 'ondragover' | 'ondragstart' | 'ondrop' | 'onerrorupdate' | 'onfilterchange' | 'onfocus' | 'onfocusin' | 'onfocusout' | 'onhelp' | 'onkeydown' | 'onkeypress' | 'onkeyup' | 'onlayoutcomplete' | 'onlosecapture' | 'onmousedown' | 'onmouseenter' | 'onmouseleave' | 'onmousemove' | 'onmouseout' | 'onmouseover' | 'onmouseup' | 'onmousewheel' | 'onmove' | 'onmoveend' | 'onmovestart' | 'onpage' | 'onpaste' | 'onpropertychange' | 'onreadystatechange' | 'onresize' | 'onresizeend' | 'onresizestart' | 'onrowenter' | 'onrowexit' | 'onrowsdelete' | 'onrowsinserted' | 'onscroll' | 'onselectstart', handler: (this: MSHTML.SVGSymbolElement, parameter: {}) => void): void; + on(obj: MSHTML.SVGTextElement, event: 'onactivate' | 'onafterupdate' | 'onbeforeactivate' | 'onbeforecopy' | 'onbeforecut' | 'onbeforedeactivate' | 'onbeforeeditfocus' | 'onbeforepaste' | 'onbeforeupdate' | 'onblur' | 'oncellchange' | 'onclick' | 'oncontextmenu' | 'oncontrolselect' | 'oncopy' | 'oncut' | 'ondataavailable' | 'ondatasetchanged' | 'ondatasetcomplete' | 'ondblclick' | 'ondeactivate' | 'ondrag' | 'ondragend' | 'ondragenter' | 'ondragleave' | 'ondragover' | 'ondragstart' | 'ondrop' | 'onerrorupdate' | 'onfilterchange' | 'onfocus' | 'onfocusin' | 'onfocusout' | 'onhelp' | 'onkeydown' | 'onkeypress' | 'onkeyup' | 'onlayoutcomplete' | 'onlosecapture' | 'onmousedown' | 'onmouseenter' | 'onmouseleave' | 'onmousemove' | 'onmouseout' | 'onmouseover' | 'onmouseup' | 'onmousewheel' | 'onmove' | 'onmoveend' | 'onmovestart' | 'onpage' | 'onpaste' | 'onpropertychange' | 'onreadystatechange' | 'onresize' | 'onresizeend' | 'onresizestart' | 'onrowenter' | 'onrowexit' | 'onrowsdelete' | 'onrowsinserted' | 'onscroll' | 'onselectstart', handler: (this: MSHTML.SVGTextElement, parameter: {}) => void): void; + on(obj: MSHTML.SVGTextPathElement, event: 'onactivate' | 'onafterupdate' | 'onbeforeactivate' | 'onbeforecopy' | 'onbeforecut' | 'onbeforedeactivate' | 'onbeforeeditfocus' | 'onbeforepaste' | 'onbeforeupdate' | 'onblur' | 'oncellchange' | 'onclick' | 'oncontextmenu' | 'oncontrolselect' | 'oncopy' | 'oncut' | 'ondataavailable' | 'ondatasetchanged' | 'ondatasetcomplete' | 'ondblclick' | 'ondeactivate' | 'ondrag' | 'ondragend' | 'ondragenter' | 'ondragleave' | 'ondragover' | 'ondragstart' | 'ondrop' | 'onerrorupdate' | 'onfilterchange' | 'onfocus' | 'onfocusin' | 'onfocusout' | 'onhelp' | 'onkeydown' | 'onkeypress' | 'onkeyup' | 'onlayoutcomplete' | 'onlosecapture' | 'onmousedown' | 'onmouseenter' | 'onmouseleave' | 'onmousemove' | 'onmouseout' | 'onmouseover' | 'onmouseup' | 'onmousewheel' | 'onmove' | 'onmoveend' | 'onmovestart' | 'onpage' | 'onpaste' | 'onpropertychange' | 'onreadystatechange' | 'onresize' | 'onresizeend' | 'onresizestart' | 'onrowenter' | 'onrowexit' | 'onrowsdelete' | 'onrowsinserted' | 'onscroll' | 'onselectstart', handler: (this: MSHTML.SVGTextPathElement, parameter: {}) => void): void; + on(obj: MSHTML.SVGTSpanElement, event: 'onactivate' | 'onafterupdate' | 'onbeforeactivate' | 'onbeforecopy' | 'onbeforecut' | 'onbeforedeactivate' | 'onbeforeeditfocus' | 'onbeforepaste' | 'onbeforeupdate' | 'onblur' | 'oncellchange' | 'onclick' | 'oncontextmenu' | 'oncontrolselect' | 'oncopy' | 'oncut' | 'ondataavailable' | 'ondatasetchanged' | 'ondatasetcomplete' | 'ondblclick' | 'ondeactivate' | 'ondrag' | 'ondragend' | 'ondragenter' | 'ondragleave' | 'ondragover' | 'ondragstart' | 'ondrop' | 'onerrorupdate' | 'onfilterchange' | 'onfocus' | 'onfocusin' | 'onfocusout' | 'onhelp' | 'onkeydown' | 'onkeypress' | 'onkeyup' | 'onlayoutcomplete' | 'onlosecapture' | 'onmousedown' | 'onmouseenter' | 'onmouseleave' | 'onmousemove' | 'onmouseout' | 'onmouseover' | 'onmouseup' | 'onmousewheel' | 'onmove' | 'onmoveend' | 'onmovestart' | 'onpage' | 'onpaste' | 'onpropertychange' | 'onreadystatechange' | 'onresize' | 'onresizeend' | 'onresizestart' | 'onrowenter' | 'onrowexit' | 'onrowsdelete' | 'onrowsinserted' | 'onscroll' | 'onselectstart', handler: (this: MSHTML.SVGTSpanElement, parameter: {}) => void): void; + on(obj: MSHTML.SVGUseElement, event: 'onactivate' | 'onafterupdate' | 'onbeforeactivate' | 'onbeforecopy' | 'onbeforecut' | 'onbeforedeactivate' | 'onbeforeeditfocus' | 'onbeforepaste' | 'onbeforeupdate' | 'onblur' | 'oncellchange' | 'onclick' | 'oncontextmenu' | 'oncontrolselect' | 'oncopy' | 'oncut' | 'ondataavailable' | 'ondatasetchanged' | 'ondatasetcomplete' | 'ondblclick' | 'ondeactivate' | 'ondrag' | 'ondragend' | 'ondragenter' | 'ondragleave' | 'ondragover' | 'ondragstart' | 'ondrop' | 'onerrorupdate' | 'onfilterchange' | 'onfocus' | 'onfocusin' | 'onfocusout' | 'onhelp' | 'onkeydown' | 'onkeypress' | 'onkeyup' | 'onlayoutcomplete' | 'onlosecapture' | 'onmousedown' | 'onmouseenter' | 'onmouseleave' | 'onmousemove' | 'onmouseout' | 'onmouseover' | 'onmouseup' | 'onmousewheel' | 'onmove' | 'onmoveend' | 'onmovestart' | 'onpage' | 'onpaste' | 'onpropertychange' | 'onreadystatechange' | 'onresize' | 'onresizeend' | 'onresizestart' | 'onrowenter' | 'onrowexit' | 'onrowsdelete' | 'onrowsinserted' | 'onscroll' | 'onselectstart', handler: (this: MSHTML.SVGUseElement, parameter: {}) => void): void; + on(obj: MSHTML.SVGViewElement, event: 'onactivate' | 'onafterupdate' | 'onbeforeactivate' | 'onbeforecopy' | 'onbeforecut' | 'onbeforedeactivate' | 'onbeforeeditfocus' | 'onbeforepaste' | 'onbeforeupdate' | 'onblur' | 'oncellchange' | 'onclick' | 'oncontextmenu' | 'oncontrolselect' | 'oncopy' | 'oncut' | 'ondataavailable' | 'ondatasetchanged' | 'ondatasetcomplete' | 'ondblclick' | 'ondeactivate' | 'ondrag' | 'ondragend' | 'ondragenter' | 'ondragleave' | 'ondragover' | 'ondragstart' | 'ondrop' | 'onerrorupdate' | 'onfilterchange' | 'onfocus' | 'onfocusin' | 'onfocusout' | 'onhelp' | 'onkeydown' | 'onkeypress' | 'onkeyup' | 'onlayoutcomplete' | 'onlosecapture' | 'onmousedown' | 'onmouseenter' | 'onmouseleave' | 'onmousemove' | 'onmouseout' | 'onmouseover' | 'onmouseup' | 'onmousewheel' | 'onmove' | 'onmoveend' | 'onmovestart' | 'onpage' | 'onpaste' | 'onpropertychange' | 'onreadystatechange' | 'onresize' | 'onresizeend' | 'onresizestart' | 'onrowenter' | 'onrowexit' | 'onrowsdelete' | 'onrowsinserted' | 'onscroll' | 'onselectstart', handler: (this: MSHTML.SVGViewElement, parameter: {}) => void): void; } interface ActiveXObjectNameMap { @@ -36494,7 +35577,3 @@ interface ActiveXObjectNameMap { 'ScriptBridge.ScriptBridge': MSHTML.Scriptlet; 'TemplatePrinter.TemplatePrinter': MSHTML.CTemplatePrinter; } - -interface SafeArray { - _brand: SafeArray; -} diff --git a/types/activex-mshtml/tsconfig.json b/types/activex-mshtml/tsconfig.json index deba2b6ba3..1ef33423ee 100644 --- a/types/activex-mshtml/tsconfig.json +++ b/types/activex-mshtml/tsconfig.json @@ -2,8 +2,7 @@ "compilerOptions": { "module": "commonjs", "lib": [ - "es5", - "scripthost" + "es5" ], "noImplicitAny": true, "noImplicitThis": true, diff --git a/types/activex-mshtml/tslint.json b/types/activex-mshtml/tslint.json index 3224b40b8b..916af93888 100644 --- a/types/activex-mshtml/tslint.json +++ b/types/activex-mshtml/tslint.json @@ -1,6 +1,7 @@ { "extends": "dtslint/dt.json", "rules": { - "no-const-enum": false + "no-const-enum": false, + "max-line-length": false } } diff --git a/types/activex-msxml2/activex-msxml2-tests.ts b/types/activex-msxml2/activex-msxml2-tests.ts index a793c08db5..01ef12802e 100644 --- a/types/activex-msxml2/activex-msxml2-tests.ts +++ b/types/activex-msxml2/activex-msxml2-tests.ts @@ -1,18 +1,20 @@ +/// + // https://msdn.microsoft.com/en-us/library/ms764708(v=vs.85).aspx -(() => { +{ const dom = new ActiveXObject('Msxml2.DOMDocument.6.0'); dom.async = false; dom.resolveExternals = false; dom.loadXML('A'); WScript.Echo(`dom: ${dom.xml}`); -})(); +} // https://msdn.microsoft.com/en-us/library/ms766390(v=vs.85).aspx -(() => { +{ const doc = new ActiveXObject('Msxml2.DOMDocument.6.0'); doc.load('test.xml'); WScript.Echo(`doc: ${doc.xml}`); -})(); +} const MakeDOM = () => { try { @@ -37,7 +39,7 @@ const LoadDOM = (file: string) => { }; // https://msdn.microsoft.com/en-us/library/ms759105(v=vs.85).aspx -(() => { +{ const doc = new ActiveXObject('Msxml2.DOMDocument.6.0'); doc.async = false; doc.resolveExternals = false; @@ -60,10 +62,10 @@ const LoadDOM = (file: string) => { `; doc.loadXML(xml); doc.save('saved.xml'); -})(); +} // https://msdn.microsoft.com/en-us/library/ms764656(v=vs.85).aspx -(() => { +{ const doc = LoadDOM('test.xml')!; const xsl = (LoadDOM('test.xsl')! as any) as MSXML2.IXMLDOMNode; @@ -73,10 +75,10 @@ const LoadDOM = (file: string) => { const out = MakeDOM()!; doc.transformNodeToObject(xsl, out); WScript.Echo('\ndoc.transformNodeToObject:\n' + out.xml); -})(); +} // https://msdn.microsoft.com/en-us/library/ms763685(v=vs.85).aspx -(() => { +{ const dom = MakeDOM()!; // Create a processing instruction targeted for xml. @@ -148,10 +150,10 @@ const LoadDOM = (file: string) => { // Save the XML document to a file. dom.save("dynamDom.xml"); -})(); +} // https://msdn.microsoft.com/en-us/library/ms757050(v=vs.85).aspx -(() => { +{ const dom = LoadDOM("stocks.xml")!; try { // Query a single node. @@ -172,17 +174,17 @@ const LoadDOM = (file: string) => { } catch (e) { WScript.Echo(e.description); } -})(); +} // https://msdn.microsoft.com/en-us/library/ms757064(v=vs.85).aspx -(() => { +{ const xhr = new ActiveXObject("Msxml2.XMLHTTP.6.0"); xhr.open("GET", "http://localhost/sxh/contact.asp?SearchID=John Doe", false); xhr.send(); const doc = xhr.responseXML; WScript.Echo(doc.xml); -})(); +} const xmlValidation = (fn: (x: MSXML2.DOMDocument60) => void) => { // Create and initialize the DOMDocument object @@ -212,16 +214,16 @@ ${x.xml} }; // https://msdn.microsoft.com/en-us/library/ms766449(v=vs.85).aspx -(() => { +{ const validateFile = (filename: string) => xmlValidation(x => x.load(filename)); let sOutput = validateFile("nn-valid.xml"); sOutput = sOutput + validateFile("nn-notValid.xml"); WScript.Echo(sOutput); -})(); +} // https://msdn.microsoft.com/en-us/library/ms767542(v=vs.85).aspx -(() => { +{ const validateFile = (filename: string) => xmlValidation(x => { // Configure DOM properties for namespace selection. x.setProperty("SelectionLanguage", "XPath"); @@ -235,10 +237,10 @@ ${x.xml} let sOutput = validateFile("sl-valid.xml"); sOutput = sOutput + validateFile("sl-notValid.xml"); WScript.Echo(sOutput); -})(); +} // https://msdn.microsoft.com/en-us/library/ms766439(v=vs.85).aspx -(() => { +{ const validateFile = (filename: string) => xmlValidation(xd => { // Create a schema cache and add books.xsd to it. const xs = new ActiveXObject('Msxml2.XMLSchemaCache'); @@ -253,10 +255,10 @@ ${x.xml} let sOutput = validateFile("sc-valid.xml"); sOutput = sOutput + validateFile("sc-notValid.xml"); WScript.Echo(sOutput); -})(); +} // https://msdn.microsoft.com/en-us/library/ms767636(v=vs.85).aspx -(() => { +{ const validateFile = (filename: string) => xmlValidation(x => { x.setProperty("UseInlineSchema", true); x.load(filename); @@ -265,10 +267,10 @@ ${x.xml} let sOutput = validateFile("valid.xml"); sOutput = sOutput + validateFile("notValid.xml"); WScript.Echo(sOutput); -})(); +} // https://msdn.microsoft.com/en-us/library/ms757833(v=vs.85).aspx -(() => { +{ // Load an XML document into a DOM instance. const oXMLDoc = LoadDOM("books.xml")!; @@ -326,4 +328,4 @@ ${oError.reason}`; } WScript.Echo(msg); } -})(); +} diff --git a/types/activex-msxml2/index.d.ts b/types/activex-msxml2/index.d.ts index 76dc3d9415..3ee2b1f050 100644 --- a/types/activex-msxml2/index.d.ts +++ b/types/activex-msxml2/index.d.ts @@ -2,7 +2,9 @@ // Project: https://msdn.microsoft.com/en-us/library/ms763742.aspx // Definitions by: Zev Spitz // Definitions: https://github.com/DefinitelyTyped/DefinitelyTyped -// TypeScript Version: 2.3 +// TypeScript Version: 2.6 + +/// declare namespace MSXML2 { /** Schema Object Model Content Types */ @@ -424,7 +426,7 @@ declare namespace MSXML2 { createEntityReference(name: string): IXMLDOMEntityReference; /** create a node of the specified node type and name */ - createNode(type: any, name: string, namespaceURI: string): IXMLDOMNode; + createNode(type: DOMNodeType.NODE_ATTRIBUTE | DOMNodeType.NODE_CDATA_SECTION | DOMNodeType.NODE_COMMENT | DOMNodeType.NODE_DOCUMENT_FRAGMENT | DOMNodeType.NODE_TEXT | DOMNodeType.NODE_ELEMENT | DOMNodeType.NODE_ENTITY_REFERENCE | DOMNodeType.NODE_PROCESSING_INSTRUCTION, name: string, namespaceURI: string): IXMLDOMNode; /** create a processing instruction node */ createProcessingInstruction(target: string, data: string): IXMLDOMProcessingInstruction; @@ -433,7 +435,7 @@ declare namespace MSXML2 { createTextNode(data: string): IXMLDOMText; /** the data type of the node */ - dataType: any; + dataType: string | null; /** pointer to the definition of the node in the DTD or schema */ readonly definition: IXMLDOMNode; @@ -497,7 +499,7 @@ declare namespace MSXML2 { readonly nodeTypeString: string; /** value stored in the node */ - nodeValue: any; + nodeValue: string | null; /** register an ondataavailable event handler */ readonly ondataavailable: any; @@ -795,8 +797,7 @@ declare namespace MSXML2 { getAllResponseHeaders(ppwszHeaders: string): void; GetCookie(pwszUrl: string, pwszName: string, dwFlags: number, pcCookies: number, ppCookies: tagXHR_COOKIE): void; getResponseHeader(pwszHeader: string, ppwszValue: string): void; - open( - pwszMethod: string, pwszUrl: string, pStatusCallback: IXMLHTTPRequest2Callback, pwszUserName: string, pwszPassword: string, pwszProxyUserName: string, pwszProxyPassword: string): void; + open(pwszMethod: string, pwszUrl: string, pStatusCallback: IXMLHTTPRequest2Callback, pwszUserName: string, pwszPassword: string, pwszProxyUserName: string, pwszProxyPassword: string): void; send(pBody: ISequentialStream, cbBody: number): void; SetCookie(pCookie: tagXHR_COOKIE, pdwCookieState: number): void; SetCustomResponseStream(pSequentialStream: ISequentialStream): void; @@ -805,11 +806,11 @@ declare namespace MSXML2 { } /** IMXNamespacePrefixes interface */ - class IMXNamespacePrefixes { - private 'MSXML2.IMXNamespacePrefixes_typekey': IMXNamespacePrefixes; - private constructor(); + // tslint:disable-next-line:interface-name + interface IMXNamespacePrefixes { item(index: number): string; readonly length: number; + (index: number): string; } /** XML Schema */ @@ -848,21 +849,21 @@ declare namespace MSXML2 { } /** XML Schema Item Collection */ - class ISchemaItemCollection { - private 'MSXML2.ISchemaItemCollection_typekey': ISchemaItemCollection; - private constructor(); + // tslint:disable-next-line:interface-name + interface ISchemaItemCollection { item(index: number): ISchemaItem; itemByName(name: string): ISchemaItem; itemByQName(name: string, namespaceURI: string): ISchemaItem; readonly length: number; + (index: number): ISchemaItem; } /** XML Schema String Collection */ - class ISchemaStringCollection { - private 'MSXML2.ISchemaStringCollection_typekey': ISchemaStringCollection; - private constructor(); + // tslint:disable-next-line:interface-name + interface ISchemaStringCollection { item(index: number): string; readonly length: number; + (index: number): string; } class ISequentialStream { @@ -1960,10 +1961,8 @@ declare namespace MSXML2 { hasFeature(feature: string, version: string): boolean; } - class IXMLDOMNamedNodeMap { - private 'MSXML2.IXMLDOMNamedNodeMap_typekey': IXMLDOMNamedNodeMap; - private constructor(); - + // tslint:disable-next-line:interface-name + interface IXMLDOMNamedNodeMap { /** lookup item by name */ getNamedItem(name: string): IXMLDOMNode; @@ -1990,6 +1989,9 @@ declare namespace MSXML2 { /** set item by name */ setNamedItem(newItem: IXMLDOMNode): IXMLDOMNode; + + /** collection of nodes */ + (index: number): IXMLDOMNode; } /** Core DOM node interface */ @@ -2090,10 +2092,8 @@ declare namespace MSXML2 { readonly xml: string; } - class IXMLDOMNodeList { - private 'MSXML2.IXMLDOMNodeList_typekey': IXMLDOMNodeList; - private constructor(); - + // tslint:disable-next-line:interface-name + interface IXMLDOMNodeList { /** collection of nodes */ item(index: number): IXMLDOMNode; @@ -2105,6 +2105,9 @@ declare namespace MSXML2 { /** reset the position of iterator */ reset(): void; + + /** collection of nodes */ + (index: number): IXMLDOMNode; } /** structure for reporting parser errors */ @@ -2238,10 +2241,8 @@ declare namespace MSXML2 { } /** XML Schemas Collection */ - class IXMLDOMSchemaCollection { - private 'MSXML2.IXMLDOMSchemaCollection_typekey': IXMLDOMSchemaCollection; - private constructor(); - + // tslint:disable-next-line:interface-name + interface IXMLDOMSchemaCollection { /** add a new schema */ add(namespaceURI: string, var_1: any): void; @@ -2259,6 +2260,9 @@ declare namespace MSXML2 { /** remove schema by namespaceURI */ remove(namespaceURI: string): void; + + /** Get namespaceURI for schema by index */ + (index: number): string; } class IXMLDOMText { @@ -2403,7 +2407,7 @@ declare namespace MSXML2 { /** * set values - * @param string [namespaceURI=''] + * @param namespaceURI [namespaceURI='0'] */ addParameter(baseName: string, parameter: any, namespaceURI?: string): void; @@ -2424,7 +2428,7 @@ declare namespace MSXML2 { /** * set XSL mode and it's namespace - * @param string [namespaceURI=''] + * @param namespaceURI [namespaceURI='0'] */ setStartMode(mode: string, namespaceURI?: string): void; @@ -2487,7 +2491,7 @@ declare namespace MSXML2 { popContext(): void; pushContext(): void; - /** @param boolean [fDeep=true] */ + /** @param fDeep [fDeep=true] */ pushNodeContext(contextNode: IXMLDOMNode, fDeep?: boolean): void; reset(): void; } @@ -2730,10 +2734,7 @@ declare namespace MSXML2 { } /** XML Schema Cache 6.0 */ - class XMLSchemaCache60 { - private 'MSXML2.XMLSchemaCache60_typekey': XMLSchemaCache60; - private constructor(); - + interface XMLSchemaCache60 { /** add a new schema */ add(namespaceURI: string, var_1: any): void; @@ -2755,6 +2756,9 @@ declare namespace MSXML2 { remove(namespaceURI: string): void; validate(): void; validateOnLoad: boolean; + + /** Get namespaceURI for schema by index */ + (index: number): string; } /** XSL Stylesheet Cache 6.0 */ @@ -2773,7 +2777,6 @@ declare namespace MSXML2 { interface ActiveXObject { on(obj: MSXML2.DOMDocument60, event: 'ondataavailable' | 'onreadystatechange', handler: (this: MSXML2.DOMDocument60, parameter: {}) => void): void; on(obj: MSXML2.FreeThreadedDOMDocument60, event: 'ondataavailable' | 'onreadystatechange', handler: (this: MSXML2.FreeThreadedDOMDocument60, parameter: {}) => void): void; - new(progid: K): ActiveXObjectNameMap[K]; } interface ActiveXObjectNameMap { @@ -2787,12 +2790,6 @@ interface ActiveXObjectNameMap { 'Msxml2.SAXXMLReader': MSXML2.SAXXMLReader60; 'Msxml2.ServerXMLHTTP': MSXML2.ServerXMLHTTP60; 'Msxml2.XMLHTTP': MSXML2.XMLHTTP60; - 'Msxml2.XMLHTTP.6.0': MSXML2.XMLHTTP60; 'Msxml2.XMLSchemaCache': MSXML2.XMLSchemaCache60; - 'Msxml2.XMLSchemaCache.6.0': MSXML2.XMLSchemaCache60; 'Msxml2.XSLTemplate': MSXML2.XSLTemplate60; } - -interface SafeArray { - _brand: SafeArray; -} diff --git a/types/activex-msxml2/tsconfig.json b/types/activex-msxml2/tsconfig.json index 49c53f71ca..fe55b33d3c 100644 --- a/types/activex-msxml2/tsconfig.json +++ b/types/activex-msxml2/tsconfig.json @@ -2,8 +2,7 @@ "compilerOptions": { "module": "commonjs", "lib": [ - "es5", - "scripthost" + "es5" ], "noImplicitAny": true, "noImplicitThis": true, diff --git a/types/activex-msxml2/tslint.json b/types/activex-msxml2/tslint.json index 3224b40b8b..7b89accc6d 100644 --- a/types/activex-msxml2/tslint.json +++ b/types/activex-msxml2/tslint.json @@ -1,6 +1,7 @@ { "extends": "dtslint/dt.json", "rules": { - "no-const-enum": false + "no-const-enum": false, + "max-line-length": false } } diff --git a/types/activex-office/activex-office-tests.ts b/types/activex-office/activex-office-tests.ts index 69a0563640..4dd24fd547 100644 --- a/types/activex-office/activex-office-tests.ts +++ b/types/activex-office/activex-office-tests.ts @@ -1,19 +1,27 @@ +/// /// +const collectionToArray = (col: { Item(key: any): T }): T[] => { + const results: T[] = []; + const enumerator = new Enumerator(col); + enumerator.moveFirst(); + while (!enumerator.atEnd()) { + results.push(enumerator.item()); + enumerator.moveNext(); + } + return results; +}; + let app = new ActiveXObject('Word.Application'); +app.Visible = true; let dlg = app.FileDialog(Office.MsoFileDialogType.msoFileDialogFolderPicker); dlg.AllowMultiSelect = true; dlg.Title = 'Select one or more folders'; dlg.Execute(); -let enumerator = new Enumerator(dlg.SelectedItems); -enumerator.moveFirst(); -while (!enumerator.atEnd()) { - WScript.Echo(enumerator.item); +for (const item of collectionToArray(dlg.SelectedItems)) { + WScript.Echo(item); } -let enumerator2 = new Enumerator(app.COMAddIns); -enumerator2.moveFirst(); -while (!enumerator2.atEnd()) { - const item = enumerator2.item(); +for (const item of collectionToArray(app.COMAddIns)) { WScript.Echo(`COM Addin: ${item.Description} -- ${item.ProgId}`); } diff --git a/types/activex-office/index.d.ts b/types/activex-office/index.d.ts index 20351b91f9..18a7dd285d 100644 --- a/types/activex-office/index.d.ts +++ b/types/activex-office/index.d.ts @@ -1,10 +1,11 @@ -// Type definitions for Microsoft Office 14.0 Object Library - Office 14.0 +// Type definitions for Microsoft Office 16.0 Object Library - Office 16.0 // Project: https://msdn.microsoft.com/VBA/Office-Shared-VBA/articles/office-vba-object-library-reference // Definitions by: Zev Spitz // Definitions: https://github.com/DefinitelyTyped/DefinitelyTyped -// TypeScript Version: 2.3 +// TypeScript Version: 2.6 /// +/// declare namespace Office { type MsoRGBType = number; @@ -524,6 +525,18 @@ declare namespace Office { msoblogImageTypePNG = 3, } + const enum MsoBroadcastCapabilities { + BroadcastCapFileSizeLimited = 1, + BroadcastCapSupportsMeetingNotes = 2, + BroadcastCapSupportsUpdateDoc = 4, + } + + const enum MsoBroadcastState { + BroadcastPaused = 2, + BroadcastStarted = 1, + NoBroadcast = 0, + } + const enum MsoBulletType { msoBulletMixed = -2, msoBulletNone = 0, @@ -622,6 +635,7 @@ declare namespace Office { msoElementChartWallShow = 1101, msoElementDataLabelBestFit = 210, msoElementDataLabelBottom = 209, + msoElementDataLabelCallout = 211, msoElementDataLabelCenter = 202, msoElementDataLabelInsideBase = 204, msoElementDataLabelInsideEnd = 203, @@ -741,6 +755,16 @@ declare namespace Office { msoElementUpDownBarsShow = 901, } + const enum MsoChartFieldType { + msoChartFieldBubbleSize = 1, + msoChartFieldCategoryName = 2, + msoChartFieldFormula = 6, + msoChartFieldPercentage = 3, + msoChartFieldRange = 7, + msoChartFieldSeriesName = 4, + msoChartFieldValue = 5, + } + const enum MsoClipboardFormat { msoClipboardFormatHTML = 2, msoClipboardFormatMixed = -2, @@ -1625,6 +1649,13 @@ declare namespace Office { msoLightRigTwoPoint = 25, } + const enum MsoLineCapStyle { + msoLineCapFlat = 3, + msoLineCapMixed = -2, + msoLineCapRound = 2, + msoLineCapSquare = 1, + } + const enum MsoLineDashStyle { msoLineDash = 4, msoLineDashDot = 5, @@ -1641,6 +1672,24 @@ declare namespace Office { msoLineSysDot = 11, } + const enum MsoLineFillType { + msoLineFillBackground = 5, + msoLineFillGradient = 3, + msoLineFillMixed = -2, + msoLineFillNone = 0, + msoLineFillPatterned = 2, + msoLineFillPicture = 6, + msoLineFillSolid = 1, + msoLineFillTextured = 4, + } + + const enum MsoLineJoinStyle { + msoLineJoinBevel = 2, + msoLineJoinMiter = 3, + msoLineJoinMixed = -2, + msoLineJoinRound = 1, + } + const enum MsoLineStyle { msoLineSingle = 1, msoLineStyleMixed = -2, @@ -1657,6 +1706,14 @@ declare namespace Office { msoMenuAnimationUnfold = 2, } + const enum MsoMergeCmd { + msoMergeCombine = 2, + msoMergeFragment = 5, + msoMergeIntersect = 3, + msoMergeSubtract = 4, + msoMergeUnion = 1, + } + const enum MsoMetaPropertyType { msoMetaPropertyTypeBoolean = 1, msoMetaPropertyTypeBusinessData = 20, @@ -1884,6 +1941,12 @@ declare namespace Office { msoPictureWatermark = 4, } + const enum MsoPictureCompress { + msoPictureCompressDocDefault = -1, + msoPictureCompressFalse = 0, + msoPictureCompressTrue = 1, + } + const enum MsoPictureEffectType { msoEffectBackgroundRemoval = 1, msoEffectBlur = 2, @@ -2086,8 +2149,28 @@ declare namespace Office { msoTextEffect29 = 28, msoTextEffect3 = 2, msoTextEffect30 = 29, + msoTextEffect31 = 30, + msoTextEffect32 = 31, + msoTextEffect33 = 32, + msoTextEffect34 = 33, + msoTextEffect35 = 34, + msoTextEffect36 = 35, + msoTextEffect37 = 36, + msoTextEffect38 = 37, + msoTextEffect39 = 38, msoTextEffect4 = 3, + msoTextEffect40 = 39, + msoTextEffect41 = 40, + msoTextEffect42 = 41, + msoTextEffect43 = 42, + msoTextEffect44 = 43, + msoTextEffect45 = 44, + msoTextEffect46 = 45, + msoTextEffect47 = 46, + msoTextEffect48 = 47, + msoTextEffect49 = 48, msoTextEffect5 = 4, + msoTextEffect50 = 49, msoTextEffect6 = 5, msoTextEffect7 = 6, msoTextEffect8 = 7, @@ -2324,8 +2407,29 @@ declare namespace Office { msoLineStylePreset2 = 10002, msoLineStylePreset20 = 10020, msoLineStylePreset21 = 10021, + msoLineStylePreset22 = 10022, + msoLineStylePreset23 = 10023, + msoLineStylePreset24 = 10024, + msoLineStylePreset25 = 10025, + msoLineStylePreset26 = 10026, + msoLineStylePreset27 = 10027, + msoLineStylePreset28 = 10028, + msoLineStylePreset29 = 10029, msoLineStylePreset3 = 10003, + msoLineStylePreset30 = 10030, + msoLineStylePreset31 = 10031, + msoLineStylePreset32 = 10032, + msoLineStylePreset33 = 10033, + msoLineStylePreset34 = 10034, + msoLineStylePreset35 = 10035, + msoLineStylePreset36 = 10036, + msoLineStylePreset37 = 10037, + msoLineStylePreset38 = 10038, + msoLineStylePreset39 = 10039, msoLineStylePreset4 = 10004, + msoLineStylePreset40 = 10040, + msoLineStylePreset41 = 10041, + msoLineStylePreset42 = 10042, msoLineStylePreset5 = 10005, msoLineStylePreset6 = 10006, msoLineStylePreset7 = 10007, @@ -2370,9 +2474,44 @@ declare namespace Office { msoShapeStylePreset40 = 40, msoShapeStylePreset41 = 41, msoShapeStylePreset42 = 42, + msoShapeStylePreset43 = 43, + msoShapeStylePreset44 = 44, + msoShapeStylePreset45 = 45, + msoShapeStylePreset46 = 46, + msoShapeStylePreset47 = 47, + msoShapeStylePreset48 = 48, + msoShapeStylePreset49 = 49, msoShapeStylePreset5 = 5, + msoShapeStylePreset50 = 50, + msoShapeStylePreset51 = 51, + msoShapeStylePreset52 = 52, + msoShapeStylePreset53 = 53, + msoShapeStylePreset54 = 54, + msoShapeStylePreset55 = 55, + msoShapeStylePreset56 = 56, + msoShapeStylePreset57 = 57, + msoShapeStylePreset58 = 58, + msoShapeStylePreset59 = 59, msoShapeStylePreset6 = 6, + msoShapeStylePreset60 = 60, + msoShapeStylePreset61 = 61, + msoShapeStylePreset62 = 62, + msoShapeStylePreset63 = 63, + msoShapeStylePreset64 = 64, + msoShapeStylePreset65 = 65, + msoShapeStylePreset66 = 66, + msoShapeStylePreset67 = 67, + msoShapeStylePreset68 = 68, + msoShapeStylePreset69 = 69, msoShapeStylePreset7 = 7, + msoShapeStylePreset70 = 70, + msoShapeStylePreset71 = 71, + msoShapeStylePreset72 = 72, + msoShapeStylePreset73 = 73, + msoShapeStylePreset74 = 74, + msoShapeStylePreset75 = 75, + msoShapeStylePreset76 = 76, + msoShapeStylePreset77 = 77, msoShapeStylePreset8 = 8, msoShapeStylePreset9 = 9, } @@ -2383,6 +2522,7 @@ declare namespace Office { msoCanvas = 20, msoChart = 3, msoComment = 4, + msoContentApp = 27, msoDiagram = 21, msoEmbeddedOLEObject = 7, msoFormControl = 8, @@ -2404,6 +2544,7 @@ declare namespace Office { msoTable = 19, msoTextBox = 17, msoTextEffect = 15, + msoWebVideo = 26, } const enum MsoSharedWorkspaceTaskPriority { @@ -2858,6 +2999,14 @@ declare namespace Office { xlPyramidToPoint = 1, } + const enum XlBinsType { + xlBinsTypeAutomatic = 0, + xlBinsTypeBinCount = 4, + xlBinsTypeBinSize = 3, + xlBinsTypeCategorical = 1, + xlBinsTypeManual = 2, + } + const enum XlBorderWeight { xlHairline = 1, xlMedium = -4138, @@ -2865,6 +3014,12 @@ declare namespace Office { xlThin = 2, } + const enum XlCategoryLabelLevel { + xlCategoryLabelLevelAll = -1, + xlCategoryLabelLevelCustom = -2, + xlCategoryLabelLevelNone = -3, + } + const enum XlCategoryType { xlAutomaticScale = -4105, xlCategoryScale = 2, @@ -2897,7 +3052,9 @@ declare namespace Office { xlMajorGridlines = 15, xlMinorGridlines = 16, xlNothing = 28, + xlPivotChartCollapseEntireFieldButton = 34, xlPivotChartDropZone = 32, + xlPivotChartExpandEntireFieldButton = 33, xlPivotChartFieldButton = 31, xlPlotArea = 19, xlRadarAxisLabels = 27, @@ -2952,11 +3109,16 @@ declare namespace Office { xlBarOfPie = 71, xlBarStacked = 58, xlBarStacked100 = 59, + xlBoxwhisker = 121, xlBubble = 15, xlBubble3DEffect = 87, xlColumnClustered = 51, xlColumnStacked = 52, xlColumnStacked100 = 53, + xlCombo = -4152, + xlComboAreaStackedColumnClustered = 115, + xlComboColumnClusteredLine = 113, + xlComboColumnClusteredLineSecondaryAxis = 114, xlConeBarClustered = 102, xlConeBarStacked = 103, xlConeBarStacked100 = 104, @@ -2973,12 +3135,15 @@ declare namespace Office { xlCylinderColStacked100 = 94, xlDoughnut = -4120, xlDoughnutExploded = 80, + xlHistogram = 118, xlLine = 4, xlLineMarkers = 65, xlLineMarkersStacked = 66, xlLineMarkersStacked100 = 67, xlLineStacked = 63, xlLineStacked100 = 64, + xlOtherCombinations = 116, + xlPareto = 122, xlPie = 5, xlPieExploded = 69, xlPieOfPie = 68, @@ -2996,10 +3161,14 @@ declare namespace Office { xlStockOHLC = 89, xlStockVHLC = 90, xlStockVOHLC = 91, + xlSuggestedChart = -2, + xlSunburst = 120, xlSurface = 83, xlSurfaceTopView = 85, xlSurfaceTopViewWireframe = 86, xlSurfaceWireframe = 84, + xlTreemap = 117, + xlWaterfall = 119, xlXYScatter = -4169, xlXYScatterLines = 74, xlXYScatterLinesNoMarkers = 75, @@ -3181,6 +3350,12 @@ declare namespace Office { xlMarkerStyleX = -4168, } + const enum XlParentDataLabelOptions { + xlParentDataLabelOptionsBanner = 1, + xlParentDataLabelOptionsNone = 0, + xlParentDataLabelOptionsOverlapping = 2, + } + const enum XlPieSliceIndex { xlCenterPoint = 5, xlInnerCenterPoint = 8, @@ -3222,6 +3397,12 @@ declare namespace Office { xlScaleLogarithmic = -4133, } + const enum XlSeriesNameLevel { + xlSeriesNameLevelAll = -1, + xlSeriesNameLevelCustom = -2, + xlSeriesNameLevelNone = -3, + } + const enum XlSizeRepresents { xlSizeIsArea = 1, xlSizeIsWidth = 2, @@ -3280,14 +3461,13 @@ declare namespace Office { xlVAlignTop = -4160, } - class Adjustments { - private 'Office.Adjustments_typekey': Adjustments; - private constructor(); + interface Adjustments { readonly Application: any; readonly Count: number; readonly Creator: number; Item(Index: number): number; readonly Parent: any; + (Index: number): number; } class AnswerWizard { @@ -3301,9 +3481,7 @@ declare namespace Office { ResetFileList(): void; } - class AnswerWizardFiles { - private 'Office.AnswerWizardFiles_typekey': AnswerWizardFiles; - private constructor(); + interface AnswerWizardFiles { Add(FileName: string): void; readonly Application: any; readonly Count: number; @@ -3311,12 +3489,13 @@ declare namespace Office { Delete(FileName: string): void; Item(Index: number): string; readonly Parent: any; + (Index: number): string; } class Assistant { private 'Office.Assistant_typekey': Assistant; private constructor(); - ActivateWizard(WizardID: number, act: MsoWizardActType, Animation?: any): void; + ActivateWizard(WizardID: number, act: MsoWizardActType, Animation?: MsoAnimationType): void; Animation: MsoAnimationType; readonly Application: any; AssistWithAlerts: boolean; @@ -3325,7 +3504,7 @@ declare namespace Office { readonly BalloonError: MsoBalloonErrorType; readonly Creator: number; DoAlert(bstrAlertTitle: string, bstrAlertText: string, alb: MsoAlertButtonType, alc: MsoAlertIconType, ald: MsoAlertDefaultType, alq: MsoAlertCancelType, varfSysAlert: boolean): number; - EndWizard(WizardID: number, varfSuccess: boolean, Animation?: any): void; + EndWizard(WizardID: number, varfSuccess: boolean, Animation?: MsoAnimationType): void; FeatureTips: boolean; FileName: string; GuessHelp: boolean; @@ -3345,7 +3524,7 @@ declare namespace Office { ResetTips(): void; SearchWhenProgramming: boolean; Sounds: boolean; - StartWizard(On: boolean, Callback: string, PrivateX: number, Animation?: any, CustomTeaser?: any, Top?: any, Left?: any, Bottom?: any, Right?: any): number; + StartWizard(On: boolean, Callback: string, PrivateX: number, Animation?: MsoAnimationType, CustomTeaser?: any, Top?: number, Left?: number, Bottom?: number, Right?: number): number; TipOfDay: boolean; Top: number; Visible: boolean; @@ -3359,12 +3538,12 @@ declare namespace Office { BalloonType: MsoBalloonType; Button: MsoButtonSetType; Callback: string; - readonly Checkboxes: any; + readonly Checkboxes: BalloonCheckboxes; Close(): void; readonly Creator: number; Heading: string; Icon: MsoIconType; - readonly Labels: any; + readonly Labels: BalloonLabels; Mode: MsoModeType; readonly Name: string; readonly Parent: any; @@ -3374,6 +3553,49 @@ declare namespace Office { Text: string; } + class BalloonCheckbox { + private 'Office.BalloonCheckbox_typekey': BalloonCheckbox; + private constructor(); + readonly Application: any; + Checked: boolean; + readonly Creator: number; + readonly Item: string; + readonly Name: string; + readonly Parent: any; + Text: string; + } + + interface BalloonCheckboxes { + readonly Application: any; + Count: number; + readonly Creator: number; + Item(Index: number): BalloonCheckbox; + readonly Name: string; + readonly Parent: any; + (Index: number): BalloonCheckbox; + } + + class BalloonLabel { + private constructor(); + private 'Office.BalloonLabel_typekey': BalloonLabel; + readonly Application: any; + readonly Creator: number; + readonly Item: string; + readonly Name: string; + readonly Parent: any; + Text: string; + } + + interface BalloonLabels { + readonly Application: any; + Count: number; + readonly Creator: number; + Item(Index: number): BalloonLabel; + readonly Name: string; + readonly Parent: any; + (Index: number): BalloonLabel; + } + class BulletFormat2 { private 'Office.BulletFormat2_typekey': BulletFormat2; private constructor(); @@ -3415,21 +3637,19 @@ declare namespace Office { Type: MsoCalloutType; } - class CanvasShapes { - private 'Office.CanvasShapes_typekey': CanvasShapes; - private constructor(); + interface CanvasShapes { AddCallout(Type: MsoCalloutType, Left: number, Top: number, Width: number, Height: number): Shape; AddConnector(Type: MsoConnectorType, BeginX: number, BeginY: number, EndX: number, EndY: number): Shape; - AddCurve(SafeArrayOfPoints: any): Shape; + AddCurve(SafeArrayOfPoints: SafeArray): Shape; AddLabel(Orientation: MsoTextOrientation, Left: number, Top: number, Width: number, Height: number): Shape; AddLine(BeginX: number, BeginY: number, EndX: number, EndY: number): Shape; /** - * @param number [Width=-1] - * @param number [Height=-1] + * @param Width [Width=-1] + * @param Height [Height=-1] */ AddPicture(FileName: string, LinkToFile: MsoTriState, SaveWithDocument: MsoTriState, Left: number, Top: number, Width?: number, Height?: number): Shape; - AddPolyline(SafeArrayOfPoints: any): Shape; + AddPolyline(SafeArrayOfPoints: SafeArray): Shape; AddShape(Type: MsoAutoShapeType, Left: number, Top: number, Width: number, Height: number): Shape; AddTextbox(Orientation: MsoTextOrientation, Left: number, Top: number, Width: number, Height: number): Shape; AddTextEffect(PresetTextEffect: MsoPresetTextEffect, Text: string, FontName: string, FontSize: number, FontBold: MsoTriState, FontItalic: MsoTriState, Left: number, Top: number): Shape; @@ -3438,10 +3658,11 @@ declare namespace Office { BuildFreeform(EditingType: MsoEditingType, X1: number, Y1: number): FreeformBuilder; readonly Count: number; readonly Creator: number; - Item(Index: any): Shape; + Item(Index: number | string): Shape; readonly Parent: any; Range(Index: any): ShapeRange; SelectAll(): void; + (Index: number | string): Shape; } class ChartColorFormat { @@ -3480,7 +3701,7 @@ declare namespace Office { readonly TextureType: number; TwoColorGradient(Style: number, Variant: number): void; readonly Type: number; - UserPicture(PictureFile: any, PictureFormat: any, PictureStackUnit: any, PicturePlacement: any): void; + UserPicture(PictureFile: string, PictureFormat: any, PictureStackUnit: any, PicturePlacement: any): void; UserTextured(TextureFile: string): void; Visible: number; } @@ -3534,16 +3755,15 @@ declare namespace Office { readonly ProgId: string; } - class COMAddIns { - private 'Office.COMAddIns_typekey': COMAddIns; - private constructor(); + interface COMAddIns { readonly Application: any; readonly Count: number; readonly Creator: number; - Item(Index: any): COMAddIn; + Item(Index: number | string): COMAddIn; readonly Parent: any; SetAppModal(varfModal: boolean): void; Update(): void; + (Index: number | string): COMAddIn; } class CommandBar { @@ -3576,7 +3796,7 @@ declare namespace Office { readonly Creator: number; Delete(): void; Enabled: boolean; - FindControl(Type?: any, Id?: any, Tag?: any, Visible?: any, Recursive?: any): CommandBarControl; + FindControl(Type?: any, Id?: any, Tag?: any, Visible?: boolean, Recursive?: boolean): CommandBarControl; Height: number; readonly Id: number; readonly Index: number; @@ -3590,7 +3810,7 @@ declare namespace Office { Protection: MsoBarProtection; Reset(): void; RowIndex: number; - ShowPopup(x?: any, y?: any): void; + ShowPopup(x?: number, y?: number): void; Top: number; readonly Type: MsoBarType; Visible: boolean; @@ -3625,10 +3845,10 @@ declare namespace Office { BuiltInFace: boolean; Caption: string; readonly Control: any; - Copy(Bar?: any, Before?: any): CommandBarControl; + Copy(Bar?: CommandBar, Before?: number): CommandBarControl; CopyFace(): void; readonly Creator: number; - Delete(Temporary?: any): void; + Delete(Temporary?: boolean): void; DescriptionText: string; Enabled: boolean; Execute(): void; @@ -3644,7 +3864,7 @@ declare namespace Office { readonly IsPriorityDropped: boolean; readonly Left: number; Mask: stdole.IPictureDisp; - Move(Bar?: any, Before?: any): CommandBarControl; + Move(Bar?: CommandBar, Before?: number): CommandBarControl; OLEUsage: MsoControlOLEUsage; OnAction: string; Parameter: string; @@ -3701,9 +3921,9 @@ declare namespace Office { Caption: string; Clear(): void; readonly Control: any; - Copy(Bar?: any, Before?: any): CommandBarControl; + Copy(Bar?: CommandBar, Before?: number): CommandBarControl; readonly Creator: number; - Delete(Temporary?: any): void; + Delete(Temporary?: boolean): void; DescriptionText: string; DropDownLines: number; DropDownWidth: number; @@ -3722,7 +3942,7 @@ declare namespace Office { readonly ListCount: number; ListHeaderCount: number; ListIndex: number; - Move(Bar?: any, Before?: any): CommandBarControl; + Move(Bar?: CommandBar, Before?: number): CommandBarControl; OLEUsage: MsoControlOLEUsage; OnAction: string; Parameter: string; @@ -3775,9 +3995,9 @@ declare namespace Office { readonly BuiltIn: boolean; Caption: string; readonly Control: any; - Copy(Bar?: any, Before?: any): CommandBarControl; + Copy(Bar?: CommandBar, Before?: number): CommandBarControl; readonly Creator: number; - Delete(Temporary?: any): void; + Delete(Temporary?: boolean): void; DescriptionText: string; Enabled: boolean; Execute(): void; @@ -3789,7 +4009,7 @@ declare namespace Office { readonly InstanceId: number; readonly IsPriorityDropped: boolean; readonly Left: number; - Move(Bar?: any, Before?: any): CommandBarControl; + Move(Bar?: CommandBar, Before?: number): CommandBarControl; OLEUsage: MsoControlOLEUsage; OnAction: string; Parameter: string; @@ -3812,24 +4032,21 @@ declare namespace Office { Width: number; } - class CommandBarControls { - private 'Office.CommandBarControls_typekey': CommandBarControls; - private constructor(); - Add(Type?: any, Id?: any, Parameter?: any, Before?: any, Temporary?: any): CommandBarControl; + interface CommandBarControls { + Add(Type?: MsoControlType.msoControlButton | MsoControlType.msoControlEdit | MsoControlType.msoControlDropdown | MsoControlType.msoControlComboBox | MsoControlType.msoControlPopup, Id?: number, Parameter?: any, Before?: number, Temporary?: boolean): CommandBarControl; readonly Application: any; readonly Count: number; readonly Creator: number; - Item(Index: any): CommandBarControl; + Item(Index: number | string): CommandBarControl; readonly Parent: CommandBar; + (Index: number | string): CommandBarControl; } - class CommandBars { - private 'Office.CommandBars_typekey': CommandBars; - private constructor(); + interface CommandBars { readonly ActionControl: CommandBarControl; readonly ActiveMenuBar: CommandBar; AdaptiveMenus: boolean; - Add(Name?: any, Position?: any, MenuBar?: any, Temporary?: any): CommandBar; + Add(Name?: string, Position?: MsoBarPosition, MenuBar?: boolean, Temporary?: boolean): CommandBar; AddEx(TbidOrName?: any, Position?: any, MenuBar?: any, Temporary?: any, TbtrProtection?: any): CommandBar; readonly Application: any; CommitRenderingTransaction(hwnd: number): void; @@ -3841,8 +4058,8 @@ declare namespace Office { DisplayKeysInTooltips: boolean; DisplayTooltips: boolean; ExecuteMso(idMso: string): void; - FindControl(Type?: any, Id?: any, Tag?: any, Visible?: any): CommandBarControl; - FindControls(Type?: any, Id?: any, Tag?: any, Visible?: any): CommandBarControls; + FindControl(Type?: MsoControlType, Id?: any, Tag?: any, Visible?: boolean): CommandBarControl | null; + FindControls(Type?: MsoControlType, Id?: any, Tag?: any, Visible?: boolean): CommandBarControls | null; GetEnabledMso(idMso: string): boolean; GetImageMso(idMso: string, Width: number, Height: number): stdole.IPictureDisp; GetLabelMso(idMso: string): string; @@ -3851,12 +4068,13 @@ declare namespace Office { GetSupertipMso(idMso: string): string; GetVisibleMso(idMso: string): boolean; IdsString(ids: number, pbstrName: string): number; - Item(Index: any): CommandBar; + Item(Index: number | string): CommandBar; LargeButtons: boolean; MenuAnimationStyle: MsoMenuAnimation; readonly Parent: any; ReleaseFocus(): void; TmcGetName(tmc: number, pbstrName: string): number; + (Index: number | string): CommandBar; } class ConnectorFormat { @@ -3886,8 +4104,7 @@ declare namespace Office { readonly Creator: number; /** @param boolean [ShowWithDelay=false] */ - Show( - CardStyle: MsoContactCardStyle, RectangleLeft: number, RectangleRight: number, RectangleTop: number, RectangleBottom: number, HorizontalPosition: number, ShowWithDelay?: boolean): void; + Show(CardStyle: MsoContactCardStyle, RectangleLeft: number, RectangleRight: number, RectangleTop: number, RectangleBottom: number, HorizontalPosition: number, ShowWithDelay?: boolean): void; } class Crop { @@ -3925,10 +4142,10 @@ declare namespace Office { private constructor(); /** - * @param string [Name=''] - * @param string [NamespaceURI=''] - * @param Office.MsoCustomXMLNodeType [NodeType=1] - * @param string [NodeValue=''] + * @param Name [Name=''] + * @param NamespaceURI [NamespaceURI=''] + * @param NodeType [NodeType=1] + * @param NodeValue [NodeValue=''] */ AppendChildNode(Name?: string, NamespaceURI?: string, NodeType?: MsoCustomXMLNodeType, NodeValue?: string): void; AppendChildSubtree(XML: string): void; @@ -3942,15 +4159,15 @@ declare namespace Office { HasChildNodes(): boolean; /** - * @param string [Name=''] - * @param string [NamespaceURI=''] - * @param Office.MsoCustomXMLNodeType [NodeType=1] - * @param string [NodeValue=''] - * @param Office.CustomXMLNode [NextSibling=0] + * @param Name [Name=''] + * @param NamespaceURI [NamespaceURI=''] + * @param NodeType [NodeType=1] + * @param NodeValue [NodeValue=''] + * @param NextSibling [NextSibling=0] */ InsertNodeBefore(Name?: string, NamespaceURI?: string, NodeType?: MsoCustomXMLNodeType, NodeValue?: string, NextSibling?: CustomXMLNode): void; - /** @param Office.CustomXMLNode [NextSibling=0] */ + /** @param NextSibling [NextSibling=0] */ InsertSubtreeBefore(XML: string, NextSibling?: CustomXMLNode): void; readonly LastChild: CustomXMLNode; readonly NamespaceURI: string; @@ -3965,10 +4182,10 @@ declare namespace Office { RemoveChild(Child: CustomXMLNode): void; /** - * @param string [Name=''] - * @param string [NamespaceURI=''] - * @param Office.MsoCustomXMLNodeType [NodeType=1] - * @param string [NodeValue=''] + * @param Name [Name=''] + * @param NamespaceURI [NamespaceURI=''] + * @param NodeType [NodeType=1] + * @param NodeValue [NodeValue=''] */ ReplaceChildNode(OldNode: CustomXMLNode, Name?: string, NamespaceURI?: string, NodeType?: MsoCustomXMLNodeType, NodeValue?: string): void; ReplaceChildSubtree(XML: string, OldNode: CustomXMLNode): void; @@ -3979,14 +4196,13 @@ declare namespace Office { readonly XPath: string; } - class CustomXMLNodes { - private 'Office.CustomXMLNodes_typekey': CustomXMLNodes; - private constructor(); + interface CustomXMLNodes { readonly Application: any; readonly Count: number; readonly Creator: number; Item(Index: number): CustomXMLNode; readonly Parent: any; + (Index: number): CustomXMLNode; } class CustomXMLPart { @@ -3994,11 +4210,11 @@ declare namespace Office { private constructor(); /** - * @param string [Name=''] - * @param string [NamespaceURI=''] - * @param Office.CustomXMLNode [NextSibling=0] - * @param Office.MsoCustomXMLNodeType [NodeType=1] - * @param string [NodeValue=''] + * @param Name [Name=''] + * @param NamespaceURI [NamespaceURI=''] + * @param NextSibling [NextSibling=0] + * @param NodeType [NodeType=1] + * @param NodeValue [NodeValue=''] */ AddNode(Parent: CustomXMLNode, Name?: string, NamespaceURI?: string, NextSibling?: CustomXMLNode, NodeType?: MsoCustomXMLNodeType, NodeValue?: string): void; readonly Application: any; @@ -4019,19 +4235,17 @@ declare namespace Office { readonly XML: string; } - class CustomXMLParts { - private 'Office.CustomXMLParts_typekey': CustomXMLParts; - private constructor(); - - /** @param string [XML=''] */ - Add(XML?: string, SchemaCollection?: any): CustomXMLPart; + interface CustomXMLParts { + /** @param XML [XML=''] */ + Add(XML?: string, SchemaCollection?: CustomXMLSchemaCollection): CustomXMLPart; readonly Application: any; readonly Count: number; readonly Creator: number; - Item(Index: any): CustomXMLPart; + Item(Index: number | string): CustomXMLPart; readonly Parent: any; SelectByID(Id: string): CustomXMLPart; SelectByNamespace(NamespaceURI: string): CustomXMLParts; + (Index: number | string): CustomXMLPart; } class CustomXMLPrefixMapping { @@ -4044,17 +4258,16 @@ declare namespace Office { readonly Prefix: string; } - class CustomXMLPrefixMappings { - private 'Office.CustomXMLPrefixMappings_typekey': CustomXMLPrefixMappings; - private constructor(); + interface CustomXMLPrefixMappings { AddNamespace(Prefix: string, NamespaceURI: string): void; readonly Application: any; readonly Count: number; readonly Creator: number; - Item(Index: any): CustomXMLPrefixMapping; + Item(Index: number | string): CustomXMLPrefixMapping; LookupNamespace(Prefix: string): string; LookupPrefix(NamespaceURI: string): string; readonly Parent: any; + (Index: number | string): CustomXMLPrefixMapping; } class CustomXMLSchema { @@ -4069,25 +4282,23 @@ declare namespace Office { Reload(): void; } - class CustomXMLSchemaCollection { - private 'Office.CustomXMLSchemaCollection_typekey': CustomXMLSchemaCollection; - private constructor(); - + interface CustomXMLSchemaCollection { /** - * @param string [NamespaceURI=''] - * @param string [Alias=''] - * @param string [FileName=''] - * @param boolean [InstallForAllUsers=false] + * @param NamespaceURI [NamespaceURI=''] + * @param Alias [Alias=''] + * @param FileName [FileName=''] + * @param InstallForAllUsers [InstallForAllUsers=false] */ Add(NamespaceURI?: string, Alias?: string, FileName?: string, InstallForAllUsers?: boolean): CustomXMLSchema; AddCollection(SchemaCollection: CustomXMLSchemaCollection): void; readonly Application: any; readonly Count: number; readonly Creator: number; - Item(Index: any): CustomXMLSchema; + Item(Index: number | string): CustomXMLSchema; NamespaceURI(Index: number): string; readonly Parent: any; Validate(): boolean; + (Index: number | string): CustomXMLSchema; } class CustomXMLValidationError { @@ -4104,13 +4315,10 @@ declare namespace Office { readonly Type: MsoCustomXMLValidationErrorType; } - class CustomXMLValidationErrors { - private 'Office.CustomXMLValidationErrors_typekey': CustomXMLValidationErrors; - private constructor(); - + interface CustomXMLValidationErrors { /** - * @param string [ErrorText=''] - * @param boolean [ClearedOnUpdate=true] + * @param ErrorText [ErrorText=''] + * @param ClearedOnUpdate [ClearedOnUpdate=true] */ Add(Node: CustomXMLNode, ErrorName: string, ErrorText?: string, ClearedOnUpdate?: boolean): void; readonly Application: any; @@ -4118,6 +4326,7 @@ declare namespace Office { readonly Creator: number; Item(Index: number): CustomXMLValidationError; readonly Parent: any; + (Index: number): CustomXMLValidationError; } class DiagramNode { @@ -4125,14 +4334,14 @@ declare namespace Office { private constructor(); /** - * @param Office.MsoRelativeNodePosition [Pos=2] - * @param Office.MsoDiagramNodeType [NodeType=1] + * @param Pos [Pos=2] + * @param NodeType [NodeType=1] */ AddNode(Pos?: MsoRelativeNodePosition, NodeType?: MsoDiagramNodeType): DiagramNode; readonly Application: any; readonly Children: DiagramNodeChildren; - /** @param Office.MsoRelativeNodePosition [Pos=2] */ + /** @param Pos [Pos=2] */ CloneNode(CopyChildren: boolean, TargetNode: DiagramNode, Pos?: MsoRelativeNodePosition): DiagramNode; readonly Creator: number; Delete(): void; @@ -4146,19 +4355,16 @@ declare namespace Office { readonly Root: DiagramNode; readonly Shape: Shape; - /** @param boolean [SwapChildren=true] */ + /** @param SwapChildren [SwapChildren=true] */ SwapNode(TargetNode: DiagramNode, SwapChildren?: boolean): void; readonly TextShape: Shape; TransferChildren(ReceivingNode: DiagramNode): void; } - class DiagramNodeChildren { - private 'Office.DiagramNodeChildren_typekey': DiagramNodeChildren; - private constructor(); - + interface DiagramNodeChildren { /** - * @param any [Index=-1] - * @param Office.MsoDiagramNodeType [NodeType=1] + * @param Index [Index=-1] + * @param NodeType [NodeType=1] */ AddNode(Index?: any, NodeType?: MsoDiagramNodeType): DiagramNode; readonly Application: any; @@ -4169,17 +4375,17 @@ declare namespace Office { readonly LastChild: DiagramNode; readonly Parent: any; SelectAll(): void; + (Index: any): DiagramNode; } - class DiagramNodes { - private 'Office.DiagramNodes_typekey': DiagramNodes; - private constructor(); + interface DiagramNodes { readonly Application: any; readonly Count: number; readonly Creator: number; Item(Index: any): DiagramNode; readonly Parent: any; SelectAll(): void; + (Index: any): DiagramNode; } class DocumentInspector { @@ -4194,25 +4400,23 @@ declare namespace Office { readonly Parent: any; } - class DocumentInspectors { - private 'Office.DocumentInspectors_typekey': DocumentInspectors; - private constructor(); + interface DocumentInspectors { readonly Application: any; readonly Count: number; readonly Creator: number; Item(Index: number): DocumentInspector; readonly Parent: any; + (Index: number): DocumentInspector; } - class DocumentProperties { - private 'Office.DocumentProperties_typekey': DocumentProperties; - private constructor(); + interface DocumentProperties { Add(Name: string, LinkToContent: boolean, Type?: MsoDocProperties, Value?: any, LinkSource?: string): DocumentProperty; Application: TApplication; Count: number; Creator: number; Item(index: string | number): DocumentProperty; Parent: any; + (index: string | number): DocumentProperty; } class DocumentProperty { @@ -4237,22 +4441,21 @@ declare namespace Office { readonly Creator: number; Delete(): void; readonly Index: number; - readonly Modified: any; + readonly Modified: VarDate; readonly ModifiedBy: string; Open(): any; readonly Parent: any; Restore(): any; } - class DocumentLibraryVersions { - private 'Office.DocumentLibraryVersions_typekey': DocumentLibraryVersions; - private constructor(); + interface DocumentLibraryVersions { readonly Application: any; readonly Count: number; readonly Creator: number; readonly IsVersioningEnabled: boolean; Item(lIndex: number): DocumentLibraryVersion; readonly Parent: any; + (lIndex: number): DocumentLibraryVersion; } class EffectParameter { @@ -4264,13 +4467,12 @@ declare namespace Office { Value: any; } - class EffectParameters { - private 'Office.EffectParameters_typekey': EffectParameters; - private constructor(); + interface EffectParameters { readonly Application: any; readonly Count: number; readonly Creator: number; - Item(Index: any): EffectParameter; + Item(Index: string | number): EffectParameter; + (Index: string | number): EffectParameter; } class FileDialog { @@ -4303,10 +4505,8 @@ declare namespace Office { readonly Parent: any; } - class FileDialogFilters { - private 'Office.FileDialogFilters_typekey': FileDialogFilters; - private constructor(); - Add(Description: string, Extensions: string, Position?: any): FileDialogFilter; + interface FileDialogFilters { + Add(Description: string, Extensions: string, Position?: number): FileDialogFilter; readonly Application: any; Clear(): void; readonly Count: number; @@ -4314,16 +4514,16 @@ declare namespace Office { Delete(filter?: any): void; Item(Index: number): FileDialogFilter; readonly Parent: any; + (Index: number): FileDialogFilter; } - class FileDialogSelectedItems { - private 'Office.FileDialogSelectedItems_typekey': FileDialogSelectedItems; - private constructor(); + interface FileDialogSelectedItems { readonly Application: any; readonly Count: number; readonly Creator: number; Item(Index: number): string; readonly Parent: any; + (Index: number): string; } class FileSearch { @@ -4333,9 +4533,9 @@ declare namespace Office { readonly Creator: number; /** - * @param Office.MsoSortBy [SortBy=1] - * @param Office.MsoSortOrder [SortOrder=1] - * @param boolean [AlwaysAccurate=true] + * @param SortBy [SortBy=1] + * @param SortOrder [SortOrder=1] + * @param AlwaysAccurate [AlwaysAccurate=true] */ Execute(SortBy?: MsoSortBy, SortOrder?: MsoSortOrder, AlwaysAccurate?: boolean): number; FileName: string; @@ -4355,15 +4555,14 @@ declare namespace Office { TextOrProperty: string; } - class FileTypes { - private 'Office.FileTypes_typekey': FileTypes; - private constructor(); + interface FileTypes { Add(FileType: MsoFileType): void; readonly Application: any; readonly Count: number; readonly Creator: number; Item(Index: number): MsoFileType; Remove(Index: number): void; + (Index: number): MsoFileType; } class FillFormat { @@ -4448,13 +4647,12 @@ declare namespace Office { WordArtformat: MsoPresetTextEffect; } - class FoundFiles { - private 'Office.FoundFiles_typekey': FoundFiles; - private constructor(); + interface FoundFiles { readonly Application: any; readonly Count: number; readonly Creator: number; Item(Index: number): string; + (Index: number): string; } class FreeformBuilder { @@ -4462,10 +4660,10 @@ declare namespace Office { private constructor(); /** - * @param number [X2=0] - * @param number [Y2=0] - * @param number [X3=0] - * @param number [Y3=0] + * @param X2 [X2=0] + * @param Y2 [Y2=0] + * @param X3 [X3=0] + * @param Y3 [Y3=0] */ AddNodes(SegmentType: MsoSegmentType, EditingType: MsoEditingType, X1: number, Y1: number, X2?: number, Y2?: number, X3?: number, Y3?: number): void; readonly Application: any; @@ -4494,40 +4692,38 @@ declare namespace Office { Transparency: number; } - class GradientStops { - private 'Office.GradientStops_typekey': GradientStops; - private constructor(); + interface GradientStops { readonly Application: any; readonly Count: number; readonly Creator: number; - /** @param number [Index=-1] */ + /** @param Index [Index=-1] */ Delete(Index?: number): void; /** - * @param number [Transparency=0] - * @param number [Index=-1] + * @param Transparency [Transparency=0] + * @param Index [Index=-1] */ Insert(RGB: number, Position: number, Transparency?: number, Index?: number): void; /** - * @param number [Transparency=0] - * @param number [Index=-1] - * @param number [Brightness=0] + * @param Transparency [Transparency=0] + * @param Index [Index=-1] + * @param Brightness [Brightness=0] */ Insert2(RGB: number, Position: number, Transparency?: number, Index?: number, Brightness?: number): void; Item(Index: number): GradientStop; + (Index: number): GradientStop; } - class GroupShapes { - private 'Office.GroupShapes_typekey': GroupShapes; - private constructor(); + interface GroupShapes { readonly Application: any; readonly Count: number; readonly Creator: number; Item(Index: any): Shape; readonly Parent: any; Range(Index: any): ShapeRange; + (Index: any): Shape; } class HTMLProject { @@ -4537,14 +4733,14 @@ declare namespace Office { readonly Creator: number; readonly HTMLProjectItems: HTMLProjectItems; - /** @param Office.MsoHTMLProjectOpen [OpenKind=0] */ + /** @param OpenKind [OpenKind=0] */ Open(OpenKind?: MsoHTMLProjectOpen): void; readonly Parent: any; - /** @param boolean [Refresh=true] */ + /** @param Refresh [Refresh=true] */ RefreshDocument(Refresh?: boolean): void; - /** @param boolean [Refresh=true] */ + /** @param Refresh [Refresh=true] */ RefreshProject(Refresh?: boolean): void; readonly State: MsoHTMLProjectState; } @@ -4558,21 +4754,20 @@ declare namespace Office { LoadFromFile(FileName: string): void; readonly Name: string; - /** @param Office.MsoHTMLProjectOpen [OpenKind=0] */ + /** @param OpenKind [OpenKind=0] */ Open(OpenKind?: MsoHTMLProjectOpen): void; readonly Parent: any; SaveCopyAs(FileName: string): void; Text: string; } - class HTMLProjectItems { - private 'Office.HTMLProjectItems_typekey': HTMLProjectItems; - private constructor(); + interface HTMLProjectItems { readonly Application: any; readonly Count: number; readonly Creator: number; Item(Index: any): HTMLProjectItem; readonly Parent: any; + (Index: any): HTMLProjectItem; } class IAssistance { @@ -4584,7 +4779,7 @@ declare namespace Office { /** * SearchHelp Method - * @param string [Scope=''] + * @param Scope [Scope=''] */ SearchHelp(Query: string, Scope?: string): void; @@ -4593,12 +4788,14 @@ declare namespace Office { /** * ShowHelp Method - * @param string [HelpId=''] - * @param string [Scope=''] + * @param HelpId [HelpId=''] + * @param Scope [Scope=''] */ ShowHelp(HelpId?: string, Scope?: string): void; } + /** For Macintosh only */ + // tslint:disable-next-line:interface-name class IFind { private 'Office.IFind_typekey': IFind; private constructor(); @@ -4631,11 +4828,12 @@ declare namespace Office { View: MsoFileFindView; } - class IFoundFiles { - private 'Office.IFoundFiles_typekey': IFoundFiles; - private constructor(); + /** For Macintosh only */ + // tslint:disable-next-line:interface-name + interface IFoundFiles { readonly Count: number; Item(Index: number): string; + (Index: number): string; } class IMsoBorder { @@ -4669,52 +4867,52 @@ declare namespace Office { private 'Office.IMsoChart_typekey': IMsoChart; private constructor(); - /** @param Office.XlDataLabelsType [Type=2] */ + /** @param Type [Type=2] */ _ApplyDataLabels(Type?: XlDataLabelsType, IMsoLegendKey?: any, AutoText?: any, HasLeaderLines?: any): void; readonly Application: any; ApplyChartTemplate(bstrFileName: string): void; ApplyCustomType(ChartType: XlChartType, TypeName?: any): void; - /** @param Office.XlDataLabelsType [Type=2] */ - ApplyDataLabels( - Type?: XlDataLabelsType, IMsoLegendKey?: any, AutoText?: any, HasLeaderLines?: any, ShowSeriesName?: any, ShowCategoryName?: any, ShowValue?: any, - ShowPercentage?: any, ShowBubbleSize?: any, Separator?: any): void; + /** @param Type [Type=2] */ + ApplyDataLabels(Type?: XlDataLabelsType, IMsoLegendKey?: any, AutoText?: any, HasLeaderLines?: any, ShowSeriesName?: any, ShowCategoryName?: any, ShowValue?: any, ShowPercentage?: any, ShowBubbleSize?: any, Separator?: any): void; ApplyLayout(Layout: number, varChartType?: any): void; readonly Area3DGroup: IMsoChartGroup; AreaGroups(Index?: any): any; AutoFormat(rGallery: number, varFormat?: any): void; AutoScaling: boolean; - /** @param Office.XlAxisGroup [AxisGroup=1] */ + /** @param AxisGroup [AxisGroup=1] */ Axes(Type: any, AxisGroup?: XlAxisGroup): any; readonly BackWall: IMsoWalls; readonly Bar3DGroup: IMsoChartGroup; BarGroups(Index?: any): any; BarShape: XlBarShape; + CategoryLabelLevel: XlCategoryLabelLevel; readonly ChartArea: IMsoChartArea; + ChartColor: any; readonly ChartData: IMsoChartData; ChartGroups(pvarIndex?: any, varIgallery?: any): any; ChartStyle: any; readonly ChartTitle: IMsoChartTitle; ChartType: XlChartType; - ChartWizard( - varSource?: any, varGallery?: any, varFormat?: any, varPlotBy?: any, varCategoryLabels?: any, varSeriesLabels?: any, varHasLegend?: any, varTitle?: any, - varCategoryTitle?: any, varValueTitle?: any, varExtraTitle?: any): void; + ChartWizard(varSource?: any, varGallery?: any, varFormat?: any, varPlotBy?: any, varCategoryLabels?: any, varSeriesLabels?: any, varHasLegend?: any, varTitle?: any, varCategoryTitle?: any, varValueTitle?: any, varExtraTitle?: any): void; + ClearToMatchColorStyle(): void; ClearToMatchStyle(): void; readonly Column3DGroup: IMsoChartGroup; ColumnGroups(Index?: any): any; Copy(): any; /** - * @param number [Appearance=1] - * @param number [Format=-4147] - * @param number [Size=2] + * @param Appearance [Appearance=1] + * @param Format [Format=-4147] + * @param Size [Size=2] */ CopyPicture(Appearance?: number, Format?: number, Size?: number): void; readonly Corners: IMsoCorners; readonly Creator: number; readonly DataTable: IMsoDataTable; Delete(): any; + DeleteHiddenContent(): void; DepthPercent: number; DisplayBlanksAs: XlDisplayBlanksAs; DoughnutGroups(Index?: any): any; @@ -4722,10 +4920,12 @@ declare namespace Office { Export(bstr: string, varFilterName?: any, varInteractive?: any): boolean; readonly Floor: IMsoFloor; readonly Format: IMsoChartFormat; + FullSeriesCollection(Index?: any): any; GapDepth: number; GetChartElement(x: number, y: number, ElementID: number, Arg1: number, Arg2: number): void; HasAxis(axisType?: any, AxisGroup?: any): any; HasDataTable: boolean; + readonly HasHiddenContent: boolean; HasLegend: boolean; HasPivotFields: boolean; HasTitle: boolean; @@ -4749,6 +4949,7 @@ declare namespace Office { SaveChartTemplate(bstrFileName: string): void; Select(Replace?: any): any; SeriesCollection(Index?: any): any; + SeriesNameLevel: XlSeriesNameLevel; SetDefaultChart(varName: any): void; SetElement(RHS: MsoChartElementType): void; SetSourceData(Source: string, PlotBy?: any): void; @@ -4756,6 +4957,7 @@ declare namespace Office { ShowAllFieldButtons: boolean; ShowAxisFieldButtons: boolean; ShowDataLabelsOverMaximum: boolean; + ShowExpandCollapseEntireFieldButtons: boolean; ShowLegendFieldButtons: boolean; ShowReportFilterFieldButtons: boolean; ShowValueFieldButtons: boolean; @@ -4764,7 +4966,7 @@ declare namespace Office { readonly SurfaceGroup: IMsoChartGroup; Type: number; - /** @param boolean [fBackWall=true] */ + /** @param fBackWall [fBackWall=true] */ Walls(fBackWall?: boolean): IMsoWalls; XYGroups(Index?: any): any; } @@ -4799,6 +5001,7 @@ declare namespace Office { private 'Office.IMsoChartData_typekey': IMsoChartData; private constructor(); Activate(): void; + ActivateChartDataWindow(): void; BreakLink(): void; readonly IsLinked: boolean; readonly Workbook: any; @@ -4807,7 +5010,9 @@ declare namespace Office { class IMsoChartFormat { private 'Office.IMsoChartFormat_typekey': IMsoChartFormat; private constructor(); + readonly Adjustments: Adjustments; readonly Application: any; + AutoShapeType: MsoAutoShapeType; readonly Creator: number; readonly Fill: FillFormat; readonly Glow: GlowFormat; @@ -4825,12 +5030,21 @@ declare namespace Office { private constructor(); readonly Application: any; AxisGroup: number; + BinsCountValue: number; + BinsOverflowEnabled: boolean; + BinsOverflowValue: number; + BinsType: XlBinsType; + BinsUnderflowEnabled: boolean; + BinsUnderflowValue: number; + BinWidthValue: number; BubbleScale: number; + CategoryCollection(Index?: any): any; readonly Creator: number; DoughnutHoleSize: number; readonly DownBars: IMsoDownBars; readonly DropLines: IMsoDropLines; FirstSliceAngle: number; + FullCategoryCollection(Index?: any): any; GapWidth: number; Has3DShading: boolean; HasDropLines: boolean; @@ -5137,18 +5351,17 @@ declare namespace Office { Weight: number; } - class MetaProperties { - private 'Office.MetaProperties_typekey': MetaProperties; - private constructor(); + interface MetaProperties { readonly Application: any; readonly Count: number; readonly Creator: number; GetItemByInternalName(InternalName: string): MetaProperty; - Item(Index: any): MetaProperty; + Item(Index: number | string): MetaProperty; readonly Parent: any; readonly SchemaXml: string; Validate(): string; readonly ValidationError: string; + (Index: number | string): MetaProperty; } class MetaProperty { @@ -5170,31 +5383,33 @@ declare namespace Office { class MsoDebugOptions { private 'Office.MsoDebugOptions_typekey': MsoDebugOptions; private constructor(); + AddIgnoredAssertTag(bstrTagToIgnore: string): void; readonly Application: any; readonly Creator: number; FeatureReports: number; OutputToDebugger: boolean; OutputToFile: boolean; OutputToMessageBox: boolean; + RemoveIgnoredAssertTag(bstrTagToIgnore: string): void; readonly UnitTestManager: any; } class MsoEnvelope { private 'Office.MsoEnvelope_typekey': MsoEnvelope; private constructor(); - readonly CommandBars: any; + readonly CommandBars: CommandBars; Introduction: string; - readonly Item: any; + readonly Item: Outlook.MailItem; readonly Parent: any; } class NewFile { private 'Office.NewFile_typekey': NewFile; private constructor(); - Add(FileName: string, Section?: any, DisplayName?: any, Action?: any): boolean; + Add(FileName: string, Section?: MsoFileNewSection, DisplayName?: string, Action?: MsoFileNewAction): boolean; readonly Application: any; readonly Creator: number; - Remove(FileName: string, Section?: any, DisplayName?: any, Action?: any): boolean; + Remove(FileName: string, Section?: MsoFileNewSection, DisplayName?: string, Action?: MsoFileNewAction): boolean; } class OfficeTheme { @@ -5234,10 +5449,8 @@ declare namespace Office { WordWrap: MsoTriState; } - class Permission { - private 'Office.Permission_typekey': Permission; - private constructor(); - Add(UserId: string, Permission?: any, ExpirationDate?: any): UserPermission; + interface Permission { + Add(UserId: string, Permission?: MsoPermission, ExpirationDate?: VarDate): UserPermission; readonly Application: any; ApplyPolicy(FileName: string): void; readonly Count: number; @@ -5253,6 +5466,7 @@ declare namespace Office { RemoveAll(): void; RequestPermissionURL: string; StoreLicenses: boolean; + (Index: any): UserPermission; } class PickerDialog { @@ -5266,8 +5480,8 @@ declare namespace Office { Resolve(TokenText: string, duplicateDlgMode: number): PickerResults; /** - * @param boolean [IsMultiSelect=true] - * @param Office.PickerResults [ExistingResults=0] + * @param IsMultiSelect [IsMultiSelect=true] + * @param ExistingResults [ExistingResults=0] */ Show(IsMultiSelect?: boolean, ExistingResults?: PickerResults): PickerResults; Title: string; @@ -5283,24 +5497,22 @@ declare namespace Office { readonly Type: MsoPickerField; } - class PickerFields { - private 'Office.PickerFields_typekey': PickerFields; - private constructor(); + interface PickerFields { readonly Application: any; readonly Count: number; readonly Creator: number; Item(Index: number): PickerField; + (Index: number): PickerField; } - class PickerProperties { - private 'Office.PickerProperties_typekey': PickerProperties; - private constructor(); + interface PickerProperties { Add(Id: string, Value: string, Type: MsoPickerField): PickerProperty; readonly Application: any; readonly Count: number; readonly Creator: number; Item(Index: number): PickerProperty; Remove(Id: string): void; + (Index: number): PickerProperty; } class PickerProperty { @@ -5328,16 +5540,14 @@ declare namespace Office { Type: string; } - class PickerResults { - private 'Office.PickerResults_typekey': PickerResults; - private constructor(); - - /** @param string [SIPId=''] */ + interface PickerResults { + /** @param SIPId [SIPId=''] */ Add(Id: string, DisplayName: string, Type: string, SIPId?: string, ItemData?: any, SubItems?: any): PickerResult; readonly Application: any; readonly Count: number; readonly Creator: number; Item(Index: number): PickerResult; + (Index: number): PickerResult; } class PictureEffect { @@ -5352,19 +5562,18 @@ declare namespace Office { Visible: MsoTriState; } - class PictureEffects { - private 'Office.PictureEffects_typekey': PictureEffects; - private constructor(); + interface PictureEffects { readonly Application: any; readonly Count: number; readonly Creator: number; - /** @param number [Index=-1] */ + /** @param Index [Index=-1] */ Delete(Index?: number): void; - /** @param number [Position=-1] */ + /** @param Position [Position=-1] */ Insert(EffectType: MsoPictureEffectType, Position?: number): PictureEffect; Item(Index: number): PictureEffect; + (Index: number): PictureEffect; } class PictureFormat { @@ -5411,17 +5620,15 @@ declare namespace Office { readonly Value: any; } - class PropertyTests { - private 'Office.PropertyTests_typekey': PropertyTests; - private constructor(); - - /** @param Office.MsoConnector [Connector=1] */ + interface PropertyTests { + /** @param Connector [Connector=1] */ Add(Name: string, Condition: MsoCondition, Value: any, SecondValue: any, Connector?: MsoConnector): void; readonly Application: any; readonly Count: number; readonly Creator: number; Item(Index: number): PropertyTest; Remove(Index: number): void; + (Index: number): PropertyTest; } class ReflectionFormat { @@ -5456,14 +5663,13 @@ declare namespace Office { readonly Parent: any; } - class RulerLevels2 { - private 'Office.RulerLevels2_typekey': RulerLevels2; - private constructor(); + interface RulerLevels2 { readonly Application: any; readonly Count: number; readonly Creator: number; - Item(Index: any): RulerLevel2; + Item(Index: 1 | 2 | 3 | 4 | 5): RulerLevel2; readonly Parent: any; + (Index: 1 | 2 | 3 | 4 | 5): RulerLevel2; } class ScopeFolder { @@ -5477,13 +5683,12 @@ declare namespace Office { readonly ScopeFolders: ScopeFolders; } - class ScopeFolders { - private 'Office.ScopeFolders_typekey': ScopeFolders; - private constructor(); + interface ScopeFolders { readonly Application: any; readonly Count: number; readonly Creator: number; Item(Index: number): ScopeFolder; + (Index: number): ScopeFolder; } class Script { @@ -5501,16 +5706,13 @@ declare namespace Office { readonly Shape: any; } - class Scripts { - private 'Office.Scripts_typekey': Scripts; - private constructor(); - + interface Scripts { /** - * @param Office.MsoScriptLocation [Location=2] - * @param Office.MsoScriptLanguage [Language=2] - * @param string [Id=''] - * @param string [Extended=''] - * @param string [ScriptText=''] + * @param Location [Location=2] + * @param Language [Language=2] + * @param Id [Id=''] + * @param Extended [Extended=''] + * @param ScriptText [ScriptText=''] */ Add(Anchor?: any, Location?: MsoScriptLocation, Language?: MsoScriptLanguage, Id?: string, Extended?: string, ScriptText?: string): Script; readonly Application: any; @@ -5519,17 +5721,17 @@ declare namespace Office { Delete(): void; Item(Index: any): Script; readonly Parent: any; + (Index: any): Script; } - class SearchFolders { - private 'Office.SearchFolders_typekey': SearchFolders; - private constructor(); + interface SearchFolders { Add(ScopeFolder: ScopeFolder): void; readonly Application: any; readonly Count: number; readonly Creator: number; Item(Index: number): ScopeFolder; Remove(Index: number): void; + (Index: number): ScopeFolder; } class SearchScope { @@ -5541,28 +5743,26 @@ declare namespace Office { readonly Type: MsoSearchIn; } - class SearchScopes { - private 'Office.SearchScopes_typekey': SearchScopes; - private constructor(); + interface SearchScopes { readonly Application: any; readonly Count: number; readonly Creator: number; Item(Index: number): SearchScope; + (Index: number): SearchScope; } - class ServerPolicy { - private 'Office.ServerPolicy_typekey': ServerPolicy; - private constructor(); + interface ServerPolicy { readonly Application: any; readonly BlockPreview: boolean; readonly Count: number; readonly Creator: number; readonly Description: string; readonly Id: string; - Item(Index: any): PolicyItem; + Item(Index: number | string): PolicyItem; readonly Name: string; readonly Parent: any; readonly Statement: string; + (Index: number | string): PolicyItem; } class ShadowFormat { @@ -5643,10 +5843,10 @@ declare namespace Office { Rotation: number; readonly RTF: string; - /** @param Office.MsoScaleFrom [fScale=0] */ + /** @param fScale [fScale=0] */ ScaleHeight(Factor: number, RelativeToOriginalSize: MsoTriState, fScale?: MsoScaleFrom): void; - /** @param Office.MsoScaleFrom [fScale=0] */ + /** @param fScale [fScale=0] */ ScaleWidth(Factor: number, RelativeToOriginalSize: MsoTriState, fScale?: MsoScaleFrom): void; readonly Script: Script; Select(Replace?: any): void; @@ -5682,19 +5882,17 @@ declare namespace Office { readonly SegmentType: MsoSegmentType; } - class ShapeNodes { - private 'Office.ShapeNodes_typekey': ShapeNodes; - private constructor(); + interface ShapeNodes { readonly Application: any; readonly Count: number; readonly Creator: number; Delete(Index: number): void; /** - * @param number [X2=0] - * @param number [Y2=0] - * @param number [X3=0] - * @param number [Y3=0] + * @param X2 [X2=0] + * @param Y2 [Y2=0] + * @param X3 [X3=0] + * @param Y3 [Y3=0] */ Insert(Index: number, SegmentType: MsoSegmentType, EditingType: MsoEditingType, X1: number, Y1: number, X2?: number, Y2?: number, X3?: number, Y3?: number): void; Item(Index: any): ShapeNode; @@ -5702,11 +5900,10 @@ declare namespace Office { SetEditingType(Index: number, EditingType: MsoEditingType): void; SetPosition(Index: number, X1: number, Y1: number): void; SetSegmentType(Index: number, SegmentType: MsoSegmentType): void; + (Index: any): ShapeNode; } - class ShapeRange { - private 'Office.ShapeRange_typekey': ShapeRange; - private constructor(); + interface ShapeRange { readonly Adjustments: Adjustments; Align(AlignCmd: MsoAlignCmd, RelativeTo: MsoTriState): void; AlternativeText: string; @@ -5753,6 +5950,9 @@ declare namespace Office { Left: number; readonly Line: LineFormat; LockAspectRatio: MsoTriState; + + /** @param PrimaryShape [PrimaryShape=0] */ + MergeShapes(MergeCmd: MsoMergeCmd, PrimaryShape?: Shape): void; Name: string; readonly Nodes: ShapeNodes; readonly Parent: any; @@ -5765,10 +5965,10 @@ declare namespace Office { Rotation: number; readonly RTF: string; - /** @param Office.MsoScaleFrom [fScale=0] */ + /** @param fScale [fScale=0] */ ScaleHeight(Factor: number, RelativeToOriginalSize: MsoTriState, fScale?: MsoScaleFrom): void; - /** @param Office.MsoScaleFrom [fScale=0] */ + /** @param fScale [fScale=0] */ ScaleWidth(Factor: number, RelativeToOriginalSize: MsoTriState, fScale?: MsoScaleFrom): void; readonly Script: Script; Select(Replace?: any): void; @@ -5790,22 +5990,32 @@ declare namespace Office { Width: number; ZOrder(ZOrderCmd: MsoZOrderCmd): void; readonly ZOrderPosition: number; + (Index: any): Shape; } - class Shapes { - private 'Office.Shapes_typekey': Shapes; - private constructor(); + interface Shapes { AddCallout(Type: MsoCalloutType, Left: number, Top: number, Width: number, Height: number): Shape; AddCanvas(Left: number, Top: number, Width: number, Height: number): Shape; /** - * @param Office.XlChartType [Type=-1] - * @param number [Left=-1] - * @param number [Top=-1] - * @param number [Width=-1] - * @param number [Height=-1] + * @param Type [Type=-1] + * @param Left [Left=-1] + * @param Top [Top=-1] + * @param Width [Width=-1] + * @param Height [Height=-1] */ AddChart(Type?: XlChartType, Left?: number, Top?: number, Width?: number, Height?: number): Shape; + + /** + * @param Style [Style=-1] + * @param Type [Type=-1] + * @param Left [Left=-1] + * @param Top [Top=-1] + * @param Width [Width=-1] + * @param Height [Height=-1] + * @param NewLayout [NewLayout=true] + */ + AddChart2(Style?: number, Type?: XlChartType, Left?: number, Top?: number, Width?: number, Height?: number, NewLayout?: boolean): Shape; AddConnector(Type: MsoConnectorType, BeginX: number, BeginY: number, EndX: number, EndY: number): Shape; AddCurve(SafeArrayOfPoints: any): Shape; AddDiagram(Type: MsoDiagramType, Left: number, Top: number, Width: number, Height: number): Shape; @@ -5813,18 +6023,18 @@ declare namespace Office { AddLine(BeginX: number, BeginY: number, EndX: number, EndY: number): Shape; /** - * @param number [Width=-1] - * @param number [Height=-1] + * @param Width [Width=-1] + * @param Height [Height=-1] */ AddPicture(FileName: string, LinkToFile: MsoTriState, SaveWithDocument: MsoTriState, Left: number, Top: number, Width?: number, Height?: number): Shape; AddPolyline(SafeArrayOfPoints: any): Shape; AddShape(Type: MsoAutoShapeType, Left: number, Top: number, Width: number, Height: number): Shape; /** - * @param number [Left=-1] - * @param number [Top=-1] - * @param number [Width=-1] - * @param number [Height=-1] + * @param Left [Left=-1] + * @param Top [Top=-1] + * @param Width [Width=-1] + * @param Height [Height=-1] */ AddSmartArt(Layout: SmartArtLayout, Left?: number, Top?: number, Width?: number, Height?: number): Shape; AddTable(NumRows: number, NumColumns: number, Left: number, Top: number, Width: number, Height: number): Shape; @@ -5840,6 +6050,7 @@ declare namespace Office { readonly Parent: any; Range(Index: any): ShapeRange; SelectAll(): void; + (Index: any): Shape; } class SharedWorkspace { @@ -5847,13 +6058,13 @@ declare namespace Office { private constructor(); readonly Application: any; readonly Connected: boolean; - CreateNew(URL?: any, Name?: any): void; + CreateNew(URL?: string, Name?: string): void; readonly Creator: number; Delete(): void; Disconnect(): void; readonly Files: SharedWorkspaceFiles; readonly Folders: SharedWorkspaceFolders; - readonly LastRefreshed: any; + readonly LastRefreshed: VarDate; readonly Links: SharedWorkspaceLinks; readonly Members: SharedWorkspaceMembers; Name: string; @@ -5870,25 +6081,24 @@ declare namespace Office { private constructor(); readonly Application: any; readonly CreatedBy: string; - readonly CreatedDate: any; + readonly CreatedDate: VarDate; readonly Creator: number; Delete(): void; readonly ModifiedBy: string; - readonly ModifiedDate: any; + readonly ModifiedDate: VarDate; readonly Parent: any; readonly URL: string; } - class SharedWorkspaceFiles { - private 'Office.SharedWorkspaceFiles_typekey': SharedWorkspaceFiles; - private constructor(); - Add(FileName: string, ParentFolder?: any, OverwriteIfFileAlreadyExists?: any, KeepInSync?: any): SharedWorkspaceFile; + interface SharedWorkspaceFiles { + Add(FileName: string, ParentFolder?: SharedWorkspaceFolder, OverwriteIfFileAlreadyExists?: boolean, KeepInSync?: boolean): SharedWorkspaceFile; readonly Application: any; readonly Count: number; readonly Creator: number; Item(Index: number): SharedWorkspaceFile; readonly ItemCountExceeded: boolean; readonly Parent: any; + (Index: number): SharedWorkspaceFile; } class SharedWorkspaceFolder { @@ -5896,21 +6106,20 @@ declare namespace Office { private constructor(); readonly Application: any; readonly Creator: number; - Delete(DeleteEventIfFolderContainsFiles?: any): void; + Delete(DeleteEventIfFolderContainsFiles?: boolean): void; readonly FolderName: string; readonly Parent: any; } - class SharedWorkspaceFolders { - private 'Office.SharedWorkspaceFolders_typekey': SharedWorkspaceFolders; - private constructor(); - Add(FolderName: string, ParentFolder?: any): SharedWorkspaceFolder; + interface SharedWorkspaceFolders { + Add(FolderName: string, ParentFolder?: SharedWorkspaceFolder): SharedWorkspaceFolder; readonly Application: any; readonly Count: number; readonly Creator: number; Item(Index: number): SharedWorkspaceFolder; readonly ItemCountExceeded: boolean; readonly Parent: any; + (Index: number): SharedWorkspaceFolder; } class SharedWorkspaceLink { @@ -5918,28 +6127,27 @@ declare namespace Office { private constructor(); readonly Application: any; readonly CreatedBy: string; - readonly CreatedDate: any; + readonly CreatedDate: VarDate; readonly Creator: number; Delete(): void; Description: string; readonly ModifiedBy: string; - readonly ModifiedDate: any; + readonly ModifiedDate: VarDate; Notes: string; readonly Parent: any; Save(): void; URL: string; } - class SharedWorkspaceLinks { - private 'Office.SharedWorkspaceLinks_typekey': SharedWorkspaceLinks; - private constructor(); - Add(URL: string, Description?: any, Notes?: any): SharedWorkspaceLink; + interface SharedWorkspaceLinks { + Add(URL: string, Description?: string, Notes?: string): SharedWorkspaceLink; readonly Application: any; readonly Count: number; readonly Creator: number; Item(Index: number): SharedWorkspaceLink; readonly ItemCountExceeded: boolean; readonly Parent: any; + (Index: number): SharedWorkspaceLink; } class SharedWorkspaceMember { @@ -5955,16 +6163,15 @@ declare namespace Office { readonly Parent: any; } - class SharedWorkspaceMembers { - private 'Office.SharedWorkspaceMembers_typekey': SharedWorkspaceMembers; - private constructor(); - Add(Email: string, DomainName: string, DisplayName: string, Role?: any): SharedWorkspaceMember; + interface SharedWorkspaceMembers { + Add(Email: string, DomainName: string, DisplayName: string, Role?: string): SharedWorkspaceMember; readonly Application: any; readonly Count: number; readonly Creator: number; Item(Index: number): SharedWorkspaceMember; readonly ItemCountExceeded: boolean; readonly Parent: any; + (Index: number): SharedWorkspaceMember; } class SharedWorkspaceTask { @@ -5973,13 +6180,13 @@ declare namespace Office { readonly Application: any; AssignedTo: string; readonly CreatedBy: string; - readonly CreatedDate: any; + readonly CreatedDate: VarDate; readonly Creator: number; Delete(): void; Description: string; - DueDate: any; + DueDate: VarDate; readonly ModifiedBy: string; - readonly ModifiedDate: any; + readonly ModifiedDate: VarDate; readonly Parent: any; Priority: MsoSharedWorkspaceTaskPriority; Save(): void; @@ -5987,16 +6194,15 @@ declare namespace Office { Title: string; } - class SharedWorkspaceTasks { - private 'Office.SharedWorkspaceTasks_typekey': SharedWorkspaceTasks; - private constructor(); - Add(Title: string, Status?: any, Priority?: any, Assignee?: any, Description?: any, DueDate?: any): SharedWorkspaceTask; + interface SharedWorkspaceTasks { + Add(Title: string, Status?: MsoSharedWorkspaceTaskStatus, Priority?: MsoSharedWorkspaceTaskPriority, Assignee?: SharedWorkspaceMember, Description?: string, DueDate?: VarDate): SharedWorkspaceTask; readonly Application: any; readonly Count: number; readonly Creator: number; Item(Index: number): SharedWorkspaceTask; readonly ItemCountExceeded: boolean; readonly Parent: any; + (Index: number): SharedWorkspaceTask; } class Signature { @@ -6008,7 +6214,7 @@ declare namespace Office { readonly Creator: number; Delete(): void; readonly Details: SignatureInfo; - readonly ExpireDate: any; + readonly ExpireDate: VarDate; readonly IsCertificateExpired: boolean; readonly IsCertificateRevoked: boolean; readonly IsSignatureLine: boolean; @@ -6019,8 +6225,8 @@ declare namespace Office { readonly Setup: SignatureSetup; ShowDetails(): void; Sign(varSigImg?: any, varDelSuggSigner?: any, varDelSuggSignerLine2?: any, varDelSuggSignerEmail?: any): void; - readonly SignatureLineShape: any; - readonly SignDate: any; + readonly SignatureLineShape: Shape; + readonly SignDate: VarDate; readonly Signer: string; readonly SortHint: number; } @@ -6048,9 +6254,7 @@ declare namespace Office { SignatureText: string; } - class SignatureSet { - private 'Office.SignatureSet_typekey': SignatureSet; - private constructor(); + interface SignatureSet { Add(): Signature; AddNonVisibleSignature(varSigProv?: any): Signature; AddSignatureLine(varSigProv?: any): Signature; @@ -6063,6 +6267,7 @@ declare namespace Office { readonly Parent: any; readonly ShowSignaturesPane: boolean; Subset: MsoSignatureSubset; + (iSig: number): Signature; } class SignatureSetup { @@ -6109,14 +6314,13 @@ declare namespace Office { readonly Parent: any; } - class SmartArtColors { - private 'Office.SmartArtColors_typekey': SmartArtColors; - private constructor(); + interface SmartArtColors { readonly Application: any; readonly Count: number; readonly Creator: number; - Item(Index: any): SmartArtColor; + Item(Index: number | string): SmartArtColor; readonly Parent: any; + (Index: number | string): SmartArtColor; } class SmartArtLayout { @@ -6131,14 +6335,13 @@ declare namespace Office { readonly Parent: any; } - class SmartArtLayouts { - private 'Office.SmartArtLayouts_typekey': SmartArtLayouts; - private constructor(); + interface SmartArtLayouts { readonly Application: any; readonly Count: number; readonly Creator: number; - Item(Index: any): SmartArtLayout; + Item(Index: number | string): SmartArtLayout; readonly Parent: any; + (Index: number | string): SmartArtLayout; } class SmartArtNode { @@ -6146,8 +6349,8 @@ declare namespace Office { private constructor(); /** - * @param Office.MsoSmartArtNodePosition [Position=1] - * @param Office.MsoSmartArtNodeType [Type=1] + * @param Position [Position=1] + * @param Type [Type=1] */ AddNode(Position?: MsoSmartArtNodePosition, Type?: MsoSmartArtNodeType): SmartArtNode; readonly Application: any; @@ -6170,15 +6373,14 @@ declare namespace Office { readonly Type: MsoSmartArtNodeType; } - class SmartArtNodes { - private 'Office.SmartArtNodes_typekey': SmartArtNodes; - private constructor(); + interface SmartArtNodes { Add(): SmartArtNode; readonly Application: any; readonly Count: number; readonly Creator: number; - Item(Index: any): SmartArtNode; + Item(Index: number | string): SmartArtNode; readonly Parent: any; + (Index: number | string): SmartArtNode; } class SmartArtQuickStyle { @@ -6193,14 +6395,13 @@ declare namespace Office { readonly Parent: any; } - class SmartArtQuickStyles { - private 'Office.SmartArtQuickStyles_typekey': SmartArtQuickStyles; - private constructor(); + interface SmartArtQuickStyles { readonly Application: any; readonly Count: number; readonly Creator: number; - Item(Index: any): SmartArtQuickStyle; + Item(Index: number | string): SmartArtQuickStyle; readonly Parent: any; + (Index: number | string): SmartArtQuickStyle; } class SmartDocument { @@ -6209,7 +6410,7 @@ declare namespace Office { readonly Application: any; readonly Creator: number; - /** @param boolean [ConsiderAllSchemas=false] */ + /** @param ConsiderAllSchemas [ConsiderAllSchemas=false] */ PickSolution(ConsiderAllSchemas?: boolean): void; RefreshPane(): void; SolutionID: string; @@ -6232,7 +6433,7 @@ declare namespace Office { readonly Creator: number; readonly ErrorType: MsoSyncErrorType; GetUpdate(): void; - readonly LastSyncTime: any; + readonly LastSyncTime: VarDate; OpenVersion(SyncVersionType: MsoSyncVersionType): void; readonly Parent: any; PutUpdate(): void; @@ -6253,16 +6454,15 @@ declare namespace Office { Type: MsoTabStopType; } - class TabStops2 { - private 'Office.TabStops2_typekey': TabStops2; - private constructor(); + interface TabStops2 { Add(Type: MsoTabStopType, Position: number): TabStop2; readonly Application: any; readonly Count: number; readonly Creator: number; DefaultSpacing: number; - Item(Index: any): TabStop2; + Item(Index: number): TabStop2; readonly Parent: any; + (Index: number): TabStop2; } class TextColumn2 { @@ -6348,8 +6548,8 @@ declare namespace Office { ChangeCase(Type: MsoTextChangeCase): void; /** - * @param number [Start=-1] - * @param number [Length=-1] + * @param Start [Start=-1] + * @param Length [Length=-1] */ Characters(Start?: number, Length?: number): TextRange2; Copy(): void; @@ -6359,42 +6559,48 @@ declare namespace Office { Delete(): void; /** - * @param number [After=0] - * @param Office.MsoTriState [MatchCase=0] - * @param Office.MsoTriState [WholeWords=0] + * @param After [After=0] + * @param MatchCase [MatchCase=0] + * @param WholeWords [WholeWords=0] */ Find(FindWhat: string, After?: number, MatchCase?: MsoTriState, WholeWords?: MsoTriState): TextRange2; readonly Font: Font2; - /** @param string [NewText=''] */ + /** @param NewText [NewText=''] */ InsertAfter(NewText?: string): TextRange2; - /** @param string [NewText=''] */ + /** @param NewText [NewText=''] */ InsertBefore(NewText?: string): TextRange2; - /** @param Office.MsoTriState [Unicode=0] */ + /** + * @param Formula [Formula=''] + * @param Position [Position=-1] + */ + InsertChartField(ChartFieldType: MsoChartFieldType, Formula?: string, Position?: number): TextRange2; + + /** @param Unicode [Unicode=0] */ InsertSymbol(FontName: string, CharNumber: number, Unicode?: MsoTriState): TextRange2; - Item(Index: any): TextRange2; + Item(Index: number): TextRange2; LanguageID: MsoLanguageID; readonly Length: number; /** - * @param number [Start=-1] - * @param number [Length=-1] + * @param Start [Start=-1] + * @param Length [Length=-1] */ Lines(Start?: number, Length?: number): TextRange2; LtrRun(): void; /** - * @param number [Start=-1] - * @param number [Length=-1] + * @param Start [Start=-1] + * @param Length [Length=-1] */ MathZones(Start?: number, Length?: number): TextRange2; readonly ParagraphFormat: ParagraphFormat2; /** - * @param number [Start=-1] - * @param number [Length=-1] + * @param Start [Start=-1] + * @param Length [Length=-1] */ Paragraphs(Start?: number, Length?: number): TextRange2; readonly Parent: any; @@ -6403,24 +6609,24 @@ declare namespace Office { RemovePeriods(): void; /** - * @param number [After=0] - * @param Office.MsoTriState [MatchCase=0] - * @param Office.MsoTriState [WholeWords=0] + * @param After [After=0] + * @param MatchCase [MatchCase=0] + * @param WholeWords [WholeWords=0] */ Replace(FindWhat: string, ReplaceWhat: string, After?: number, MatchCase?: MsoTriState, WholeWords?: MsoTriState): TextRange2; RotatedBounds(X1: number, Y1: number, X2: number, Y2: number, X3: number, Y3: number, x4: number, y4: number): void; RtlRun(): void; /** - * @param number [Start=-1] - * @param number [Length=-1] + * @param Start [Start=-1] + * @param Length [Length=-1] */ Runs(Start?: number, Length?: number): TextRange2; Select(): void; /** - * @param number [Start=-1] - * @param number [Length=-1] + * @param Start [Start=-1] + * @param Length [Length=-1] */ Sentences(Start?: number, Length?: number): TextRange2; readonly Start: number; @@ -6428,8 +6634,8 @@ declare namespace Office { TrimText(): TextRange2; /** - * @param number [Start=-1] - * @param number [Length=-1] + * @param Start [Start=-1] + * @param Length [Length=-1] */ Words(Start?: number, Length?: number): TextRange2; } @@ -6444,9 +6650,7 @@ declare namespace Office { readonly ThemeColorSchemeIndex: MsoThemeColorSchemeIndex; } - class ThemeColorScheme { - private 'Office.ThemeColorScheme_typekey': ThemeColorScheme; - private constructor(); + interface ThemeColorScheme { readonly Application: any; Colors(Index: MsoThemeColorSchemeIndex): ThemeColor; readonly Count: number; @@ -6455,6 +6659,7 @@ declare namespace Office { Load(FileName: string): void; readonly Parent: any; Save(FileName: string): void; + (Index: MsoThemeColorSchemeIndex): ThemeColor; } class ThemeEffectScheme { @@ -6475,14 +6680,13 @@ declare namespace Office { readonly Parent: any; } - class ThemeFonts { - private 'Office.ThemeFonts_typekey': ThemeFonts; - private constructor(); + interface ThemeFonts { readonly Application: any; readonly Count: number; readonly Creator: number; Item(Index: MsoFontLanguageIndex): ThemeFont; readonly Parent: any; + (Index: MsoFontLanguageIndex): ThemeFont; } class ThemeFontScheme { @@ -6546,7 +6750,7 @@ declare namespace Office { private constructor(); readonly Application: any; readonly Creator: number; - ExpirationDate: any; + ExpirationDate: VarDate; readonly Parent: any; Permission: number; Remove(): void; @@ -6564,13 +6768,12 @@ declare namespace Office { ProportionalFontSize: number; } - class WebPageFonts { - private 'Office.WebPageFonts_typekey': WebPageFonts; - private constructor(); + interface WebPageFonts { readonly Application: any; readonly Count: number; readonly Creator: number; Item(Index: MsoCharacterSet): WebPageFont; + (Index: MsoCharacterSet): WebPageFont; } class WorkflowTask { @@ -6590,13 +6793,12 @@ declare namespace Office { readonly WorkflowID: string; } - class WorkflowTasks { - private 'Office.WorkflowTasks_typekey': WorkflowTasks; - private constructor(); + interface WorkflowTasks { readonly Application: any; readonly Count: number; readonly Creator: number; Item(Index: number): WorkflowTask; + (Index: number): WorkflowTask; } class WorkflowTemplate { @@ -6612,13 +6814,12 @@ declare namespace Office { Show(): number; } - class WorkflowTemplates { - private 'Office.WorkflowTemplates_typekey': WorkflowTemplates; - private constructor(); + interface WorkflowTemplates { readonly Application: any; readonly Count: number; readonly Creator: number; Item(Index: number): WorkflowTemplate; + (Index: number): WorkflowTemplate; } namespace EventHelperTypes { @@ -6703,103 +6904,45 @@ declare namespace Office { } interface ActiveXObject { - on( - obj: Office.CommandBarButton, event: 'Click', argNames: ['Ctrl', 'CancelDefault'], handler: ( - this: Office.CommandBarButton, parameter: {readonly Ctrl: Office.CommandBarButton, CancelDefault: boolean}) => void): void; - on( - obj: Office.CommandBarButton, event: 'GetIDsOfNames', argNames: ['riid', 'rgszNames', 'cNames', 'lcid', 'rgdispid'], handler: ( - this: Office.CommandBarButton, parameter: {readonly riid: stdole.GUID, readonly rgszNames: number, readonly cNames: number, readonly lcid: number, rgdispid: number}) => void): void; - on( - obj: Office.CommandBarButton, event: 'GetTypeInfo', argNames: ['itinfo', 'lcid', 'pptinfo'], handler: ( - this: Office.CommandBarButton, parameter: {readonly itinfo: number, readonly lcid: number, pptinfo: undefined}) => void): void; + on(obj: Office.CommandBarButton, event: 'Click', argNames: ['Ctrl', 'CancelDefault'], handler: (this: Office.CommandBarButton, parameter: {readonly Ctrl: Office.CommandBarButton, CancelDefault: boolean}) => void): void; + on(obj: Office.CommandBarButton, event: 'GetIDsOfNames', argNames: ['riid', 'rgszNames', 'cNames', 'lcid', 'rgdispid'], handler: (this: Office.CommandBarButton, parameter: {readonly riid: stdole.GUID, readonly rgszNames: number, readonly cNames: number, readonly lcid: number, rgdispid: number}) => void): void; + on(obj: Office.CommandBarButton, event: 'GetTypeInfo', argNames: ['itinfo', 'lcid', 'pptinfo'], handler: (this: Office.CommandBarButton, parameter: {readonly itinfo: number, readonly lcid: number, pptinfo: undefined}) => void): void; on(obj: Office.CommandBarButton, event: 'GetTypeInfoCount', argNames: ['pctinfo'], handler: (this: Office.CommandBarButton, parameter: {pctinfo: number}) => void): void; - on( - obj: Office.CommandBarButton, event: 'Invoke', argNames: Office.EventHelperTypes.CommandBarButton_Invoke_ArgNames, handler: ( - this: Office.CommandBarButton, parameter: Office.EventHelperTypes.CommandBarButton_Invoke_Parameter) => void): void; - on( - obj: Office.CommandBarButton, event: 'QueryInterface', argNames: ['riid', 'ppvObj'], handler: ( - this: Office.CommandBarButton, parameter: {readonly riid: stdole.GUID, ppvObj: undefined}) => void): void; + on(obj: Office.CommandBarButton, event: 'Invoke', argNames: Office.EventHelperTypes.CommandBarButton_Invoke_ArgNames, handler: (this: Office.CommandBarButton, parameter: Office.EventHelperTypes.CommandBarButton_Invoke_Parameter) => void): void; + on(obj: Office.CommandBarButton, event: 'QueryInterface', argNames: ['riid', 'ppvObj'], handler: (this: Office.CommandBarButton, parameter: {readonly riid: stdole.GUID, ppvObj: undefined}) => void): void; on(obj: Office.CommandBarComboBox, event: 'Change', argNames: ['Ctrl'], handler: (this: Office.CommandBarComboBox, parameter: {readonly Ctrl: Office.CommandBarComboBox}) => void): void; - on( - obj: Office.CommandBarComboBox, event: 'GetIDsOfNames', argNames: ['riid', 'rgszNames', 'cNames', 'lcid', 'rgdispid'], handler: ( - this: Office.CommandBarComboBox, parameter: {readonly riid: stdole.GUID, readonly rgszNames: number, readonly cNames: number, readonly lcid: number, rgdispid: number}) => void): void; - on( - obj: Office.CommandBarComboBox, event: 'GetTypeInfo', argNames: ['itinfo', 'lcid', 'pptinfo'], handler: ( - this: Office.CommandBarComboBox, parameter: {readonly itinfo: number, readonly lcid: number, pptinfo: undefined}) => void): void; + on(obj: Office.CommandBarComboBox, event: 'GetIDsOfNames', argNames: ['riid', 'rgszNames', 'cNames', 'lcid', 'rgdispid'], handler: (this: Office.CommandBarComboBox, parameter: {readonly riid: stdole.GUID, readonly rgszNames: number, readonly cNames: number, readonly lcid: number, rgdispid: number}) => void): void; + on(obj: Office.CommandBarComboBox, event: 'GetTypeInfo', argNames: ['itinfo', 'lcid', 'pptinfo'], handler: (this: Office.CommandBarComboBox, parameter: {readonly itinfo: number, readonly lcid: number, pptinfo: undefined}) => void): void; on(obj: Office.CommandBarComboBox, event: 'GetTypeInfoCount', argNames: ['pctinfo'], handler: (this: Office.CommandBarComboBox, parameter: {pctinfo: number}) => void): void; - on( - obj: Office.CommandBarComboBox, event: 'Invoke', argNames: Office.EventHelperTypes.CommandBarComboBox_Invoke_ArgNames, handler: ( - this: Office.CommandBarComboBox, parameter: Office.EventHelperTypes.CommandBarComboBox_Invoke_Parameter) => void): void; - on( - obj: Office.CommandBarComboBox, event: 'QueryInterface', argNames: ['riid', 'ppvObj'], handler: ( - this: Office.CommandBarComboBox, parameter: {readonly riid: stdole.GUID, ppvObj: undefined}) => void): void; - on( - obj: Office.CommandBars, event: 'GetIDsOfNames', argNames: ['riid', 'rgszNames', 'cNames', 'lcid', 'rgdispid'], handler: ( - this: Office.CommandBars, parameter: {readonly riid: stdole.GUID, readonly rgszNames: number, readonly cNames: number, readonly lcid: number, rgdispid: number}) => void): void; - on( - obj: Office.CommandBars, event: 'GetTypeInfo', argNames: ['itinfo', 'lcid', 'pptinfo'], handler: ( - this: Office.CommandBars, parameter: {readonly itinfo: number, readonly lcid: number, pptinfo: undefined}) => void): void; + on(obj: Office.CommandBarComboBox, event: 'Invoke', argNames: Office.EventHelperTypes.CommandBarComboBox_Invoke_ArgNames, handler: (this: Office.CommandBarComboBox, parameter: Office.EventHelperTypes.CommandBarComboBox_Invoke_Parameter) => void): void; + on(obj: Office.CommandBarComboBox, event: 'QueryInterface', argNames: ['riid', 'ppvObj'], handler: (this: Office.CommandBarComboBox, parameter: {readonly riid: stdole.GUID, ppvObj: undefined}) => void): void; + on(obj: Office.CommandBars, event: 'GetIDsOfNames', argNames: ['riid', 'rgszNames', 'cNames', 'lcid', 'rgdispid'], handler: (this: Office.CommandBars, parameter: {readonly riid: stdole.GUID, readonly rgszNames: number, readonly cNames: number, readonly lcid: number, rgdispid: number}) => void): void; + on(obj: Office.CommandBars, event: 'GetTypeInfo', argNames: ['itinfo', 'lcid', 'pptinfo'], handler: (this: Office.CommandBars, parameter: {readonly itinfo: number, readonly lcid: number, pptinfo: undefined}) => void): void; on(obj: Office.CommandBars, event: 'GetTypeInfoCount', argNames: ['pctinfo'], handler: (this: Office.CommandBars, parameter: {pctinfo: number}) => void): void; - on( - obj: Office.CommandBars, event: 'Invoke', argNames: Office.EventHelperTypes.CommandBars_Invoke_ArgNames, handler: ( - this: Office.CommandBars, parameter: Office.EventHelperTypes.CommandBars_Invoke_Parameter) => void): void; + on(obj: Office.CommandBars, event: 'Invoke', argNames: Office.EventHelperTypes.CommandBars_Invoke_ArgNames, handler: (this: Office.CommandBars, parameter: Office.EventHelperTypes.CommandBars_Invoke_Parameter) => void): void; on(obj: Office.CommandBars, event: 'QueryInterface', argNames: ['riid', 'ppvObj'], handler: (this: Office.CommandBars, parameter: {readonly riid: stdole.GUID, ppvObj: undefined}) => void): void; - on( - obj: Office.CustomTaskPane, event: 'DockPositionStateChange' | 'VisibleStateChange', argNames: ['CustomTaskPaneInst'], handler: ( - this: Office.CustomTaskPane, parameter: {readonly CustomTaskPaneInst: Office.CustomTaskPane}) => void): void; - on( - obj: Office.CustomTaskPane, event: 'GetIDsOfNames', argNames: ['riid', 'rgszNames', 'cNames', 'lcid', 'rgdispid'], handler: ( - this: Office.CustomTaskPane, parameter: {readonly riid: stdole.GUID, readonly rgszNames: number, readonly cNames: number, readonly lcid: number, rgdispid: number}) => void): void; - on( - obj: Office.CustomTaskPane, event: 'GetTypeInfo', argNames: ['itinfo', 'lcid', 'pptinfo'], handler: ( - this: Office.CustomTaskPane, parameter: {readonly itinfo: number, readonly lcid: number, pptinfo: undefined}) => void): void; + on(obj: Office.CustomTaskPane, event: 'DockPositionStateChange' | 'VisibleStateChange', argNames: ['CustomTaskPaneInst'], handler: (this: Office.CustomTaskPane, parameter: {readonly CustomTaskPaneInst: Office.CustomTaskPane}) => void): void; + on(obj: Office.CustomTaskPane, event: 'GetIDsOfNames', argNames: ['riid', 'rgszNames', 'cNames', 'lcid', 'rgdispid'], handler: (this: Office.CustomTaskPane, parameter: {readonly riid: stdole.GUID, readonly rgszNames: number, readonly cNames: number, readonly lcid: number, rgdispid: number}) => void): void; + on(obj: Office.CustomTaskPane, event: 'GetTypeInfo', argNames: ['itinfo', 'lcid', 'pptinfo'], handler: (this: Office.CustomTaskPane, parameter: {readonly itinfo: number, readonly lcid: number, pptinfo: undefined}) => void): void; on(obj: Office.CustomTaskPane, event: 'GetTypeInfoCount', argNames: ['pctinfo'], handler: (this: Office.CustomTaskPane, parameter: {pctinfo: number}) => void): void; - on( - obj: Office.CustomTaskPane, event: 'Invoke', argNames: Office.EventHelperTypes.CustomTaskPane_Invoke_ArgNames, handler: ( - this: Office.CustomTaskPane, parameter: Office.EventHelperTypes.CustomTaskPane_Invoke_Parameter) => void): void; - on( - obj: Office.CustomTaskPane, event: 'QueryInterface', argNames: ['riid', 'ppvObj'], handler: ( - this: Office.CustomTaskPane, parameter: {readonly riid: stdole.GUID, ppvObj: undefined}) => void): void; - on( - obj: Office.CustomXMLPart, event: 'GetIDsOfNames', argNames: ['riid', 'rgszNames', 'cNames', 'lcid', 'rgdispid'], handler: ( - this: Office.CustomXMLPart, parameter: {readonly riid: stdole.GUID, readonly rgszNames: number, readonly cNames: number, readonly lcid: number, rgdispid: number}) => void): void; - on( - obj: Office.CustomXMLPart, event: 'GetTypeInfo', argNames: ['itinfo', 'lcid', 'pptinfo'], handler: ( - this: Office.CustomXMLPart, parameter: {readonly itinfo: number, readonly lcid: number, pptinfo: undefined}) => void): void; + on(obj: Office.CustomTaskPane, event: 'Invoke', argNames: Office.EventHelperTypes.CustomTaskPane_Invoke_ArgNames, handler: (this: Office.CustomTaskPane, parameter: Office.EventHelperTypes.CustomTaskPane_Invoke_Parameter) => void): void; + on(obj: Office.CustomTaskPane, event: 'QueryInterface', argNames: ['riid', 'ppvObj'], handler: (this: Office.CustomTaskPane, parameter: {readonly riid: stdole.GUID, ppvObj: undefined}) => void): void; + on(obj: Office.CustomXMLPart, event: 'GetIDsOfNames', argNames: ['riid', 'rgszNames', 'cNames', 'lcid', 'rgdispid'], handler: (this: Office.CustomXMLPart, parameter: {readonly riid: stdole.GUID, readonly rgszNames: number, readonly cNames: number, readonly lcid: number, rgdispid: number}) => void): void; + on(obj: Office.CustomXMLPart, event: 'GetTypeInfo', argNames: ['itinfo', 'lcid', 'pptinfo'], handler: (this: Office.CustomXMLPart, parameter: {readonly itinfo: number, readonly lcid: number, pptinfo: undefined}) => void): void; on(obj: Office.CustomXMLPart, event: 'GetTypeInfoCount', argNames: ['pctinfo'], handler: (this: Office.CustomXMLPart, parameter: {pctinfo: number}) => void): void; - on( - obj: Office.CustomXMLPart, event: 'Invoke', argNames: Office.EventHelperTypes.CustomXMLPart_Invoke_ArgNames, handler: ( - this: Office.CustomXMLPart, parameter: Office.EventHelperTypes.CustomXMLPart_Invoke_Parameter) => void): void; - on( - obj: Office.CustomXMLPart, event: 'NodeAfterDelete', argNames: ['OldNode', 'OldParentNode', 'OldNextSibling', 'InUndoRedo'], handler: ( - this: Office.CustomXMLPart, - parameter: { - readonly OldNode: Office.CustomXMLNode, readonly OldParentNode: Office.CustomXMLNode, readonly OldNextSibling: Office.CustomXMLNode, readonly InUndoRedo: boolean}) => void): void; - on( - obj: Office.CustomXMLPart, event: 'NodeAfterInsert', argNames: ['NewNode', 'InUndoRedo'], handler: ( - this: Office.CustomXMLPart, parameter: {readonly NewNode: Office.CustomXMLNode, readonly InUndoRedo: boolean}) => void): void; - on( - obj: Office.CustomXMLPart, event: 'NodeAfterReplace', argNames: ['OldNode', 'NewNode', 'InUndoRedo'], handler: ( - this: Office.CustomXMLPart, parameter: {readonly OldNode: Office.CustomXMLNode, readonly NewNode: Office.CustomXMLNode, readonly InUndoRedo: boolean}) => void): void; - on( - obj: Office.CustomXMLPart, event: 'QueryInterface', argNames: ['riid', 'ppvObj'], handler: ( - this: Office.CustomXMLPart, parameter: {readonly riid: stdole.GUID, ppvObj: undefined}) => void): void; - on( - obj: Office.CustomXMLParts, event: 'GetIDsOfNames', argNames: ['riid', 'rgszNames', 'cNames', 'lcid', 'rgdispid'], handler: ( - this: Office.CustomXMLParts, parameter: {readonly riid: stdole.GUID, readonly rgszNames: number, readonly cNames: number, readonly lcid: number, rgdispid: number}) => void): void; - on( - obj: Office.CustomXMLParts, event: 'GetTypeInfo', argNames: ['itinfo', 'lcid', 'pptinfo'], handler: ( - this: Office.CustomXMLParts, parameter: {readonly itinfo: number, readonly lcid: number, pptinfo: undefined}) => void): void; + on(obj: Office.CustomXMLPart, event: 'Invoke', argNames: Office.EventHelperTypes.CustomXMLPart_Invoke_ArgNames, handler: (this: Office.CustomXMLPart, parameter: Office.EventHelperTypes.CustomXMLPart_Invoke_Parameter) => void): void; + on(obj: Office.CustomXMLPart, event: 'NodeAfterDelete', argNames: ['OldNode', 'OldParentNode', 'OldNextSibling', 'InUndoRedo'], handler: (this: Office.CustomXMLPart, parameter: {readonly OldNode: Office.CustomXMLNode, readonly OldParentNode: Office.CustomXMLNode, readonly OldNextSibling: Office.CustomXMLNode, readonly InUndoRedo: boolean}) => void): void; + on(obj: Office.CustomXMLPart, event: 'NodeAfterInsert', argNames: ['NewNode', 'InUndoRedo'], handler: (this: Office.CustomXMLPart, parameter: {readonly NewNode: Office.CustomXMLNode, readonly InUndoRedo: boolean}) => void): void; + on(obj: Office.CustomXMLPart, event: 'NodeAfterReplace', argNames: ['OldNode', 'NewNode', 'InUndoRedo'], handler: (this: Office.CustomXMLPart, parameter: {readonly OldNode: Office.CustomXMLNode, readonly NewNode: Office.CustomXMLNode, readonly InUndoRedo: boolean}) => void): void; + on(obj: Office.CustomXMLPart, event: 'QueryInterface', argNames: ['riid', 'ppvObj'], handler: (this: Office.CustomXMLPart, parameter: {readonly riid: stdole.GUID, ppvObj: undefined}) => void): void; + on(obj: Office.CustomXMLParts, event: 'GetIDsOfNames', argNames: ['riid', 'rgszNames', 'cNames', 'lcid', 'rgdispid'], handler: (this: Office.CustomXMLParts, parameter: {readonly riid: stdole.GUID, readonly rgszNames: number, readonly cNames: number, readonly lcid: number, rgdispid: number}) => void): void; + on(obj: Office.CustomXMLParts, event: 'GetTypeInfo', argNames: ['itinfo', 'lcid', 'pptinfo'], handler: (this: Office.CustomXMLParts, parameter: {readonly itinfo: number, readonly lcid: number, pptinfo: undefined}) => void): void; on(obj: Office.CustomXMLParts, event: 'GetTypeInfoCount', argNames: ['pctinfo'], handler: (this: Office.CustomXMLParts, parameter: {pctinfo: number}) => void): void; - on( - obj: Office.CustomXMLParts, event: 'Invoke', argNames: Office.EventHelperTypes.CustomXMLParts_Invoke_ArgNames, handler: ( - this: Office.CustomXMLParts, parameter: Office.EventHelperTypes.CustomXMLParts_Invoke_Parameter) => void): void; + on(obj: Office.CustomXMLParts, event: 'Invoke', argNames: Office.EventHelperTypes.CustomXMLParts_Invoke_ArgNames, handler: (this: Office.CustomXMLParts, parameter: Office.EventHelperTypes.CustomXMLParts_Invoke_Parameter) => void): void; on(obj: Office.CustomXMLParts, event: 'PartAfterAdd', argNames: ['NewPart'], handler: (this: Office.CustomXMLParts, parameter: {readonly NewPart: Office.CustomXMLPart}) => void): void; on(obj: Office.CustomXMLParts, event: 'PartAfterLoad', argNames: ['Part'], handler: (this: Office.CustomXMLParts, parameter: {readonly Part: Office.CustomXMLPart}) => void): void; on(obj: Office.CustomXMLParts, event: 'PartBeforeDelete', argNames: ['OldPart'], handler: (this: Office.CustomXMLParts, parameter: {readonly OldPart: Office.CustomXMLPart}) => void): void; - on( - obj: Office.CustomXMLParts, event: 'QueryInterface', argNames: ['riid', 'ppvObj'], handler: ( - this: Office.CustomXMLParts, parameter: {readonly riid: stdole.GUID, ppvObj: undefined}) => void): void; + on(obj: Office.CustomXMLParts, event: 'QueryInterface', argNames: ['riid', 'ppvObj'], handler: (this: Office.CustomXMLParts, parameter: {readonly riid: stdole.GUID, ppvObj: undefined}) => void): void; on(obj: Office.CommandBarButton, event: 'AddRef' | 'Release', handler: (this: Office.CommandBarButton, parameter: {}) => void): void; on(obj: Office.CommandBarComboBox, event: 'AddRef' | 'Release', handler: (this: Office.CommandBarComboBox, parameter: {}) => void): void; on(obj: Office.CommandBars, event: 'AddRef' | 'OnUpdate' | 'Release', handler: (this: Office.CommandBars, parameter: {}) => void): void; @@ -6810,56 +6953,3 @@ interface ActiveXObject { set(obj: Office.CommandBarButton | Office.CommandBarComboBox, propertyName: 'accName' | 'accValue', parameterTypes: [any], newValue: string): void; set(obj: Office.CommandBarComboBox, propertyName: 'List', parameterTypes: [number], newValue: string): void; } - -interface EnumeratorConstructor { - new(col: Office.CanvasShapes | Office.GroupShapes | Office.ShapeRange | Office.Shapes): Enumerator; - new(col: Office.COMAddIns): Enumerator; - new(col: Office.CommandBarControls): Enumerator; - new(col: Office.CommandBars): Enumerator; - new(col: Office.CustomXMLNodes): Enumerator; - new(col: Office.CustomXMLParts): Enumerator; - new(col: Office.CustomXMLPrefixMappings): Enumerator; - new(col: Office.CustomXMLSchemaCollection): Enumerator; - new(col: Office.CustomXMLValidationErrors): Enumerator; - new(col: Office.DiagramNodeChildren | Office.DiagramNodes): Enumerator; - new(col: Office.DocumentInspectors): Enumerator; - new(col: Office.DocumentLibraryVersions): Enumerator; - new(col: Office.EffectParameters): Enumerator; - new(col: Office.FileDialogFilters): Enumerator; - new(col: Office.FileDialogSelectedItems | Office.FoundFiles | Office.IFoundFiles): Enumerator; - new(col: Office.FileTypes): Enumerator; - new(col: Office.GradientStops): Enumerator; - new(col: Office.HTMLProjectItems): Enumerator; - new(col: Office.MetaProperties): Enumerator; - new(col: Office.Permission): Enumerator; - new(col: Office.PickerFields): Enumerator; - new(col: Office.PickerProperties): Enumerator; - new(col: Office.PickerResults): Enumerator; - new(col: Office.PictureEffects): Enumerator; - new(col: Office.PropertyTests): Enumerator; - new(col: Office.RulerLevels2): Enumerator; - new(col: Office.ScopeFolders | Office.SearchFolders): Enumerator; - new(col: Office.Scripts): Enumerator; - new(col: Office.SearchScopes): Enumerator; - new(col: Office.ShapeNodes): Enumerator; - new(col: Office.SharedWorkspaceFiles): Enumerator; - new(col: Office.SharedWorkspaceFolders): Enumerator; - new(col: Office.SharedWorkspaceLinks): Enumerator; - new(col: Office.SharedWorkspaceMembers): Enumerator; - new(col: Office.SharedWorkspaceTasks): Enumerator; - new(col: Office.SignatureSet): Enumerator; - new(col: Office.SmartArtColors): Enumerator; - new(col: Office.SmartArtLayouts): Enumerator; - new(col: Office.SmartArtNodes): Enumerator; - new(col: Office.SmartArtQuickStyles): Enumerator; - new(col: Office.TabStops2): Enumerator; - new(col: Office.TextRange2): Enumerator; - new(col: Office.ThemeFonts): Enumerator; - new(col: Office.WebPageFonts): Enumerator; - new(col: Office.WorkflowTasks): Enumerator; - new(col: Office.WorkflowTemplates): Enumerator; -} - -interface SafeArray { - _brand: SafeArray; -} diff --git a/types/activex-office/tsconfig.json b/types/activex-office/tsconfig.json index 729657e813..6ded50cfda 100644 --- a/types/activex-office/tsconfig.json +++ b/types/activex-office/tsconfig.json @@ -2,8 +2,7 @@ "compilerOptions": { "module": "commonjs", "lib": [ - "es5", - "scripthost" + "es5" ], "noImplicitAny": true, "noImplicitThis": true, diff --git a/types/activex-office/tslint.json b/types/activex-office/tslint.json index 3224b40b8b..7b89accc6d 100644 --- a/types/activex-office/tslint.json +++ b/types/activex-office/tslint.json @@ -1,6 +1,7 @@ { "extends": "dtslint/dt.json", "rules": { - "no-const-enum": false + "no-const-enum": false, + "max-line-length": false } } diff --git a/types/activex-outlook/index.d.ts b/types/activex-outlook/index.d.ts index b7a709fe45..2b316d80bd 100644 --- a/types/activex-outlook/index.d.ts +++ b/types/activex-outlook/index.d.ts @@ -2,8 +2,9 @@ // Project: https://msdn.microsoft.com/en-us/vba/vba-outlook // Definitions by: Zev Spitz // Definitions: https://github.com/DefinitelyTyped/DefinitelyTyped -// TypeScript Version: 2.3 +// TypeScript Version: 2.6 +/// /// /// @@ -5855,7 +5856,6 @@ interface ActiveXObject { on(obj: Outlook.TaskRequestDeclineItem, event: 'AfterWrite' | 'BeforeRead' | 'Read' | 'Unload', handler: (this: Outlook.TaskRequestDeclineItem, parameter: {}) => void): void; on(obj: Outlook.TaskRequestItem, event: 'AfterWrite' | 'BeforeRead' | 'Read' | 'Unload', handler: (this: Outlook.TaskRequestItem, parameter: {}) => void): void; on(obj: Outlook.TaskRequestUpdateItem, event: 'AfterWrite' | 'BeforeRead' | 'Read' | 'Unload', handler: (this: Outlook.TaskRequestUpdateItem, parameter: {}) => void): void; - new(progid: K): ActiveXObjectNameMap[K]; } interface ActiveXObjectNameMap { diff --git a/types/activex-outlook/tsconfig.json b/types/activex-outlook/tsconfig.json index 1a9fddc714..1a7c466608 100644 --- a/types/activex-outlook/tsconfig.json +++ b/types/activex-outlook/tsconfig.json @@ -2,8 +2,7 @@ "compilerOptions": { "module": "commonjs", "lib": [ - "es5", - "scripthost" + "es5" ], "noImplicitAny": true, "noImplicitThis": true, diff --git a/types/activex-powerpoint/activex-powerpoint-tests.ts b/types/activex-powerpoint/activex-powerpoint-tests.ts index 3f2bedf8cd..eb5a2e4c05 100644 --- a/types/activex-powerpoint/activex-powerpoint-tests.ts +++ b/types/activex-powerpoint/activex-powerpoint-tests.ts @@ -1,5 +1,5 @@ // tslint:disable-next-line no-unnecessary-generics -const collectionToArray = (col: any): T[] => { +const collectionToArray = (col: {Item(index: any): T}): T[] => { const results: T[] = []; const enumerator = new Enumerator(col); enumerator.moveFirst(); @@ -13,8 +13,8 @@ const collectionToArray = (col: any): T[] => { const app = new ActiveXObject('PowerPoint.Application'); (() => { // delete empty textboxes in PowerPoint - collectionToArray(app.ActivePresentation.Slides).forEach(slide => { - collectionToArray(slide.Shapes).filter(shape => + collectionToArray(app.ActivePresentation.Slides).forEach(slide => { + collectionToArray(slide.Shapes).filter(shape => shape.Type === Office.MsoShapeType.msoTextBox && shape.TextFrame.TextRange.Text.trim() === '' ).forEach(shape => shape.Delete()); diff --git a/types/activex-powerpoint/index.d.ts b/types/activex-powerpoint/index.d.ts index 6de089010d..34e722a8a0 100644 --- a/types/activex-powerpoint/index.d.ts +++ b/types/activex-powerpoint/index.d.ts @@ -2,7 +2,7 @@ // Project: https://msdn.microsoft.com/en-us/library/fp161225.aspx // Definitions by: Zev Spitz // Definitions: https://github.com/DefinitelyTyped/DefinitelyTyped -// TypeScript Version: 2.3 +// TypeScript Version: 2.6 /// /// @@ -5374,7 +5374,6 @@ interface ActiveXObject { this: PowerPoint.Application, parameter: {readonly Sel: PowerPoint.Selection, Cancel: boolean}) => void): void; on(obj: PowerPoint.Application, event: 'WindowSelectionChange', argNames: ['Sel'], handler: (this: PowerPoint.Application, parameter: {readonly Sel: PowerPoint.Selection}) => void): void; on(obj: PowerPoint.OLEControl, event: 'GotFocus' | 'LostFocus', handler: (this: PowerPoint.OLEControl, parameter: {}) => void): void; - new(progid: K): ActiveXObjectNameMap[K]; } interface ActiveXObjectNameMap { diff --git a/types/activex-powerpoint/tsconfig.json b/types/activex-powerpoint/tsconfig.json index 8a0392da3f..25bcee9fa3 100644 --- a/types/activex-powerpoint/tsconfig.json +++ b/types/activex-powerpoint/tsconfig.json @@ -2,8 +2,7 @@ "compilerOptions": { "module": "commonjs", "lib": [ - "es5", - "scripthost" + "es5" ], "noImplicitAny": true, "noImplicitThis": true, diff --git a/types/activex-scripting/activex-scripting-tests.ts b/types/activex-scripting/activex-scripting-tests.ts index 313e480cb5..f3ee3218ca 100644 --- a/types/activex-scripting/activex-scripting-tests.ts +++ b/types/activex-scripting/activex-scripting-tests.ts @@ -1,3 +1,5 @@ +/// + // Note -- running these tests under cscript requires some ES5 polyfills const collectionToArray = (col: { Item(key: any): T }): T[] => { diff --git a/types/activex-scripting/index.d.ts b/types/activex-scripting/index.d.ts index 42e4f0c9e0..0d2ae52343 100644 --- a/types/activex-scripting/index.d.ts +++ b/types/activex-scripting/index.d.ts @@ -4,6 +4,8 @@ // Definitions: https://github.com/DefinitelyTyped/DefinitelyTyped // TypeScript Version: 2.6 +/// + declare namespace Scripting { // tslint:disable-next-line:no-const-enum const enum CompareMethod { @@ -489,8 +491,7 @@ declare namespace Scripting { } interface ActiveXObject { - new (progid: K): ActiveXObjectNameMap[K]; - set(obj: Scripting.Dictionary, propertyName: 'Item', parameterTypes: [any], newValue: any): void; + set(obj: Scripting.Dictionary, propertyName: 'Item', parameterTypes: [TKey], newValue: TValue): void; } interface ActiveXObjectNameMap { @@ -498,3 +499,7 @@ interface ActiveXObjectNameMap { 'Scripting.Encoder': Scripting.Encoder; 'Scripting.FileSystemObject': Scripting.FileSystemObject; } + +interface EnumeratorConstructor { + new (dict: Scripting.Dictionary): Enumerator; +} diff --git a/types/activex-scripting/tsconfig.json b/types/activex-scripting/tsconfig.json index e2008551fd..11cfcc44a4 100644 --- a/types/activex-scripting/tsconfig.json +++ b/types/activex-scripting/tsconfig.json @@ -2,8 +2,7 @@ "compilerOptions": { "module": "commonjs", "lib": [ - "es5", - "scripthost" + "es5" ], "noImplicitAny": true, "noImplicitThis": true, diff --git a/types/activex-shdocvw/index.d.ts b/types/activex-shdocvw/index.d.ts index 86568f6c5d..f450ea6112 100644 --- a/types/activex-shdocvw/index.d.ts +++ b/types/activex-shdocvw/index.d.ts @@ -4,6 +4,8 @@ // Definitions: https://github.com/DefinitelyTyped/DefinitelyTyped // TypeScript Version: 2.6 +/// + declare namespace SHDocVw { // tslint:disable-next-line no-const-enum const enum BrowserBarConstants { @@ -1562,7 +1564,6 @@ interface ActiveXObject { on(obj: SHDocVw.ShellNameSpace, event: 'DoubleClick' | 'Initialized' | 'SelectionChange', handler: (this: SHDocVw.ShellNameSpace, parameter: {}) => void): void; on(obj: SHDocVw.WebBrowser, event: 'DownloadBegin' | 'DownloadComplete' | 'OnQuit', handler: (this: SHDocVw.WebBrowser, parameter: {}) => void): void; on(obj: SHDocVw.WebBrowser_V1, event: 'DownloadBegin' | 'DownloadComplete' | 'WindowActivate' | 'WindowMove' | 'WindowResize', handler: (this: SHDocVw.WebBrowser_V1, parameter: {}) => void): void; - new (progid: K): ActiveXObjectNameMap[K]; } interface ActiveXObjectNameMap { @@ -1571,7 +1572,3 @@ interface ActiveXObjectNameMap { 'Shell.UIHelper': SHDocVw.ShellUIHelper; 'ShellNameSpace.ShellNameSpace': SHDocVw.ShellNameSpace; } - -interface EnumeratorConstructor { - new(col: SHDocVw.ShellWindows): Enumerator; -} diff --git a/types/activex-shdocvw/tsconfig.json b/types/activex-shdocvw/tsconfig.json index 1907cb1ef6..2a388d4c7d 100644 --- a/types/activex-shdocvw/tsconfig.json +++ b/types/activex-shdocvw/tsconfig.json @@ -2,8 +2,7 @@ "compilerOptions": { "module": "commonjs", "lib": [ - "es5", - "scripthost" + "es5" ], "noImplicitAny": true, "noImplicitThis": true, diff --git a/types/activex-shell/activex-shell-tests.ts b/types/activex-shell/activex-shell-tests.ts index f236f6e592..b9fd3b18fd 100644 --- a/types/activex-shell/activex-shell-tests.ts +++ b/types/activex-shell/activex-shell-tests.ts @@ -1,4 +1,4 @@ -/// +/// const shell = new ActiveXObject('Shell.Application'); diff --git a/types/activex-shell/index.d.ts b/types/activex-shell/index.d.ts index cb59a11c5e..f12d135979 100644 --- a/types/activex-shell/index.d.ts +++ b/types/activex-shell/index.d.ts @@ -1001,7 +1001,6 @@ interface ActiveXObject { on( obj: Shell32.ShellFolderViewOC, event: 'BeginDrag' | 'DefaultVerbInvoked' | 'EnumDone' | 'SelectionChanged' | 'VerbInvoked', handler: (this: Shell32.ShellFolderViewOC, parameter: {}) => void): void; - new (progid: K): ActiveXObjectNameMap[K]; } interface ActiveXObjectNameMap { diff --git a/types/activex-shell/tsconfig.json b/types/activex-shell/tsconfig.json index f4b549f649..364b5716de 100644 --- a/types/activex-shell/tsconfig.json +++ b/types/activex-shell/tsconfig.json @@ -2,8 +2,7 @@ "compilerOptions": { "module": "commonjs", "lib": [ - "es5", - "scripthost" + "es5" ], "noImplicitAny": true, "noImplicitThis": true, diff --git a/types/activex-stdole/index.d.ts b/types/activex-stdole/index.d.ts index 9d0c8f3a3c..070a84a30a 100644 --- a/types/activex-stdole/index.d.ts +++ b/types/activex-stdole/index.d.ts @@ -2,17 +2,25 @@ // Project: https://msdn.microsoft.com/en-us/library/hh272953.aspx // Definitions by: Zev Spitz // Definitions: https://github.com/DefinitelyTyped/DefinitelyTyped -// TypeScript Version: 2.3 +// TypeScript Version: 2.6 + +/// declare namespace stdole { + type IFontDisp = StdFont; + type IPictureDisp = StdPicture; type OLE_COLOR = number; type OLE_XPOS_CONTAINER = number; + type OLE_XPOS_PIXELS = number; + type OLE_YPOS_CONTAINER = number; + type OLE_YPOS_PIXELS = number; + const enum LoadPictureConstants { Color = 4, Default = 0, @@ -79,14 +87,9 @@ declare namespace stdole { interface ActiveXObject { on(obj: stdole.StdFont, event: 'FontChanged', argNames: ['PropertyName'], handler: (this: stdole.StdFont, parameter: {readonly PropertyName: string}) => void): void; - new(progid: K): ActiveXObjectNameMap[K]; } interface ActiveXObjectNameMap { StdFont: stdole.StdFont; StdPicture: stdole.StdPicture; } - -interface SafeArray { - _brand: SafeArray; -} diff --git a/types/activex-stdole/tsconfig.json b/types/activex-stdole/tsconfig.json index cbe3ce7aae..24ea6a5417 100644 --- a/types/activex-stdole/tsconfig.json +++ b/types/activex-stdole/tsconfig.json @@ -2,8 +2,7 @@ "compilerOptions": { "module": "commonjs", "lib": [ - "es5", - "scripthost" + "es5" ], "noImplicitAny": true, "noImplicitThis": true, diff --git a/types/activex-vbide/activex-vbide-tests.ts b/types/activex-vbide/activex-vbide-tests.ts index c3d92e51cf..5780d36b1a 100644 --- a/types/activex-vbide/activex-vbide-tests.ts +++ b/types/activex-vbide/activex-vbide-tests.ts @@ -1,21 +1,26 @@ -// tslint:disable-next-line no-unnecessary-generics -const collectionToArray = (col: any): T[] => { +/// +/// + +const collectionToArray = (col: { Item(key: any): T }): T[] => { const results: T[] = []; const enumerator = new Enumerator(col); enumerator.moveFirst(); while (!enumerator.atEnd()) { results.push(enumerator.item()); + enumerator.moveNext(); } return results; }; const app = new ActiveXObject('Word.Application'); -const projects = collectionToArray(app.VBE.VBProjects); -projects.forEach(project => { +app.Visible = true; + +for (const project of collectionToArray(app.VBE.VBProjects)) { WScript.Echo(`Name: ${project.Name}`); - collectionToArray(project.References) - .forEach(reference => { - WScript.Echo(` ${reference.Name} ${reference.Major}.${reference.Minor} -- ${reference.FullPath}`); - }); -}); + for (const reference of collectionToArray(project.References)) { + WScript.Echo(` ${reference.Name} ${reference.Major}.${reference.Minor} -- ${reference.FullPath}`); + } +} + +app.Quit(); diff --git a/types/activex-vbide/index.d.ts b/types/activex-vbide/index.d.ts index 83049260c2..88594969e6 100644 --- a/types/activex-vbide/index.d.ts +++ b/types/activex-vbide/index.d.ts @@ -2,7 +2,7 @@ // Project: https://msdn.microsoft.com/en-us/vba/language-reference-vba/articles/collections-visual-basic-add-in-model // Definitions by: Zev Spitz // Definitions: https://github.com/DefinitelyTyped/DefinitelyTyped -// TypeScript Version: 2.3 +// TypeScript Version: 2.6 /// @@ -99,14 +99,13 @@ declare namespace VBIDE { readonly VBE: VBE; } - class Addins { - private 'VBIDE.Addins_typekey': Addins; - private constructor(); + interface Addins { readonly Count: number; Item(index: any): AddIn; readonly Parent: any; Update(): void; readonly VBE: VBE; + (index: any): AddIn; } class Application { @@ -125,13 +124,13 @@ declare namespace VBIDE { readonly CountOfLines: number; CreateEventProc(EventName: string, ObjectName: string): number; - /** @param number [Count=1] */ + /** @param Count [Count=1] */ DeleteLines(StartLine: number, Count?: number): void; /** - * @param boolean [WholeWord=false] - * @param boolean [MatchCase=false] - * @param boolean [PatternSearch=false] + * @param WholeWord [WholeWord=false] + * @param MatchCase [MatchCase=false] + * @param PatternSearch [PatternSearch=false] */ Find(Target: string, StartLine: number, StartColumn: number, EndLine: number, EndColumn: number, WholeWord?: boolean, MatchCase?: boolean, PatternSearch?: boolean): boolean; InsertLines(Line: number, String: string): void; @@ -161,14 +160,13 @@ declare namespace VBIDE { readonly Window: Window; } - class CodePanes { - private 'VBIDE.CodePanes_typekey': CodePanes; - private constructor(); + interface CodePanes { readonly Count: number; Current: CodePane; Item(index: any): CodePane; readonly Parent: VBE; readonly VBE: VBE; + (index: any): CodePane; } class CommandBarEvents { @@ -185,9 +183,7 @@ declare namespace VBIDE { readonly Parent: Components; } - class Components { - private 'VBIDE.Components_typekey': Components; - private constructor(); + interface Components { Add(ComponentType: vbext_ComponentType): Component; readonly Application: Application; readonly Count: number; @@ -196,6 +192,7 @@ declare namespace VBIDE { readonly Parent: VBProject; Remove(Component: Component): void; readonly VBE: VBE; + (index: any): Component; } class Events { @@ -205,15 +202,14 @@ declare namespace VBIDE { ReferencesEvents(VBProject: VBProject): ReferencesEvents; } - class LinkedWindows { - private 'VBIDE.LinkedWindows_typekey': LinkedWindows; - private constructor(); + interface LinkedWindows { Add(Window: Window): void; readonly Count: number; Item(index: any): Window; readonly Parent: Window; Remove(Window: Window): void; readonly VBE: VBE; + (index: any): Window; } class ProjectTemplate { @@ -223,14 +219,13 @@ declare namespace VBIDE { readonly Parent: Application; } - class Properties { - private 'VBIDE.Properties_typekey': Properties; - private constructor(); + interface Properties { readonly Application: Application; readonly Count: number; Item(index: any): Property; readonly Parent: any; readonly VBE: VBE; + (index: any): Property; } class Property { @@ -263,9 +258,7 @@ declare namespace VBIDE { readonly VBE: VBE; } - class References { - private 'VBIDE.References_typekey': References; - private constructor(); + interface References { AddFromFile(FileName: string): Reference; AddFromGuid(Guid: string, Major: number, Minor: number): Reference; readonly Count: number; @@ -273,6 +266,7 @@ declare namespace VBIDE { readonly Parent: VBProject; Remove(Reference: Reference): void; readonly VBE: VBE; + (index: any): Reference; } class ReferencesEvents { @@ -298,13 +292,11 @@ declare namespace VBIDE { readonly VBE: VBE; } - class VBComponents { - private 'VBIDE.VBComponents_typekey': VBComponents; - private constructor(); + interface VBComponents { Add(ComponentType: vbext_ComponentType): VBComponent; AddCustom(ProgId: string): VBComponent; - /** @param number [index=0] */ + /** @param index [index=0] */ AddMTDesigner(index?: number): VBComponent; readonly Count: number; Import(FileName: string): VBComponent; @@ -312,6 +304,7 @@ declare namespace VBIDE { readonly Parent: VBProject; Remove(VBComponent: VBComponent): void; readonly VBE: VBE; + (index: any): VBComponent; } class VBE { @@ -354,9 +347,7 @@ declare namespace VBIDE { readonly VBE: VBE; } - class VBProjects { - private 'VBIDE.VBProjects_typekey': VBProjects; - private constructor(); + interface VBProjects { Add(Type: vbext_ProjectType): VBProject; readonly Count: number; Item(index: any): VBProject; @@ -364,6 +355,7 @@ declare namespace VBIDE { readonly Parent: VBE; Remove(lpc: VBProject): void; readonly VBE: VBE; + (index: any): VBProject; } class Window { @@ -386,38 +378,18 @@ declare namespace VBIDE { WindowState: vbext_WindowState; } - class Windows { - private 'VBIDE.Windows_typekey': Windows; - private constructor(); + interface Windows { readonly Count: number; CreateToolWindow(AddInInst: AddIn, ProgId: string, Caption: string, GuidPosition: string, DocObj: any): Window; Item(index: any): Window; readonly Parent: Application; readonly VBE: VBE; + (index: any): Window; } } interface ActiveXObject { - on( - obj: VBIDE.CommandBarEvents, event: 'Click', argNames: ['CommandBarControl', 'handled', 'CancelDefault'], handler: ( - this: VBIDE.CommandBarEvents, parameter: {readonly CommandBarControl: any, readonly handled: boolean, readonly CancelDefault: boolean}) => void): void; + on(obj: VBIDE.CommandBarEvents, event: 'Click', argNames: ['CommandBarControl', 'handled', 'CancelDefault'], handler: (this: VBIDE.CommandBarEvents, parameter: {readonly CommandBarControl: any, readonly handled: boolean, readonly CancelDefault: boolean}) => void): void; on(obj: VBIDE.References, event: 'ItemAdded' | 'ItemRemoved', argNames: ['Reference'], handler: (this: VBIDE.References, parameter: {readonly Reference: VBIDE.Reference}) => void): void; - on( - obj: VBIDE.ReferencesEvents, event: 'ItemAdded' | 'ItemRemoved', argNames: ['Reference'], handler: ( - this: VBIDE.ReferencesEvents, parameter: {readonly Reference: VBIDE.Reference}) => void): void; -} - -interface EnumeratorConstructor { - new(col: VBIDE.Addins): Enumerator; - new(col: VBIDE.CodePanes): Enumerator; - new(col: VBIDE.Components): Enumerator; - new(col: VBIDE.LinkedWindows | VBIDE.Windows): Enumerator; - new(col: VBIDE.Properties): Enumerator; - new(col: VBIDE.References): Enumerator; - new(col: VBIDE.VBComponents): Enumerator; - new(col: VBIDE.VBProjects): Enumerator; -} - -interface SafeArray { - _brand: SafeArray; + on(obj: VBIDE.ReferencesEvents, event: 'ItemAdded' | 'ItemRemoved', argNames: ['Reference'], handler: (this: VBIDE.ReferencesEvents, parameter: {readonly Reference: VBIDE.Reference}) => void): void; } diff --git a/types/activex-vbide/tsconfig.json b/types/activex-vbide/tsconfig.json index 6fb205a3c4..5d27488056 100644 --- a/types/activex-vbide/tsconfig.json +++ b/types/activex-vbide/tsconfig.json @@ -2,8 +2,7 @@ "compilerOptions": { "module": "commonjs", "lib": [ - "es5", - "scripthost" + "es5" ], "noImplicitAny": true, "noImplicitThis": true, diff --git a/types/activex-vbide/tslint.json b/types/activex-vbide/tslint.json index 3224b40b8b..7b89accc6d 100644 --- a/types/activex-vbide/tslint.json +++ b/types/activex-vbide/tslint.json @@ -1,6 +1,7 @@ { "extends": "dtslint/dt.json", "rules": { - "no-const-enum": false + "no-const-enum": false, + "max-line-length": false } } diff --git a/types/activex-wia/activex-wia-tests.ts b/types/activex-wia/activex-wia-tests.ts index c33385af14..25d025cc90 100644 --- a/types/activex-wia/activex-wia-tests.ts +++ b/types/activex-wia/activex-wia-tests.ts @@ -1,3 +1,5 @@ +/// + // Note -- running these tests under cscript requires some ES5 polyfills const collectionToArray = (col: { Item(key: any): T }): T[] => { @@ -11,6 +13,9 @@ const collectionToArray = (col: { Item(key: any): T }): T[] => { return results; }; +WScript.Echo('Hello, world'); +WScript.Quit(); + // source -- https://msdn.microsoft.com/en-us/library/windows/desktop/ms630826(v=vs.85).aspx { const cd = new ActiveXObject('WIA.CommonDialog'); @@ -51,7 +56,7 @@ const collectionToArray = (col: { Item(key: any): T }): T[] => { { const dev = cd.ShowSelectDevice(); if (dev) { - collectionToArray(dev.Properties).forEach(p => { + for (const p of collectionToArray(dev.Properties)) { let s = `${p.Name} (${p.PropertyID}) = `; if (p.IsVector) { s += '[vector of data]'; @@ -84,7 +89,7 @@ const collectionToArray = (col: { Item(key: any): T }): T[] => { } WScript.Echo(s); - }); + } } } @@ -112,7 +117,7 @@ const collectionToArray = (col: { Item(key: any): T }): T[] => { { const img = cd.ShowAcquireImage(); if (img) { - collectionToArray(img.Properties).forEach(p => { + for (const p of collectionToArray(img.Properties)) { let contents = ''; if (p.IsVector) { contents = '[vector data not emitted]'; @@ -124,7 +129,7 @@ const collectionToArray = (col: { Item(key: any): T }): T[] => { contents = p.Value; } WScript.Echo(`${p.Name} (${p.PropertyID}) = ${contents}`); - }); + } } } @@ -133,12 +138,12 @@ const collectionToArray = (col: { Item(key: any): T }): T[] => { const dev = cd.ShowSelectDevice(); if (dev) { const actionEvent = WIA.WiaEventFlag.ActionEvent; - collectionToArray(dev.Events).forEach(e => { + for (const e of collectionToArray(dev.Events)) { const msg = (e.Type & actionEvent) === actionEvent ? `${e.Name} is an Action event` : `${e.Name} is not an Action event`; WScript.Echo(msg); - }); + } } } @@ -208,14 +213,14 @@ Frame count = ${img.FrameCount}} // Create an imageprocess object and enumerate filters { const ip = new ActiveXObject('WIA.ImageProcess'); - collectionToArray(ip.FilterInfos).forEach(fi => { + for (const fi of collectionToArray(ip.FilterInfos)) { const s = [ fi.Name, new Array(51).join('='), fi.Description ].join('\n'); WScript.Echo(s); - }); + } } // Create an imageprocess object and create one of each available filter @@ -269,11 +274,11 @@ Frame count = ${img.FrameCount}} WScript.Echo(s); }; - collectionToArray(ip.FilterInfos).forEach(fi => { + for (const fi of collectionToArray(ip.FilterInfos)) { ip.Filters.Add(fi.FilterID); listProperties(ip.Filters(1)); ip.Filters.Remove(1); - }); + } } // List the supported transfer formats @@ -308,14 +313,14 @@ Frame count = ${img.FrameCount}} { const dev = cd.ShowSelectDevice(); if (dev) { - collectionToArray(dev.Items).forEach(item => { + for (const item of collectionToArray(dev.Items)) { let s: string = item.Properties("Item Name").Value; if (item.Properties.Exists("Item Time Stamp")) { const v: WIA.Vector = item.Properties("Item Time Stamp").Value; if (v.Count === 8) { s += ` (${v.Date})`; } } WScript.Echo(s); - }); + } } } @@ -340,16 +345,16 @@ Frame count = ${img.FrameCount}} } // List all available devices by name and deviceid - collectionToArray(dm.DeviceInfos).forEach(di => { + for (const di of collectionToArray(dm.DeviceInfos)) { const name: string = di.Properties("Name").Value; WScript.Echo(`${name} (${di.DeviceID})`); - }); + } // Display all the properties for the selected device { const dev = cd.ShowSelectDevice(); if (dev) { - collectionToArray(dev.Properties).forEach(p => { + for (const p of collectionToArray(dev.Properties)) { const name = `${p.Name} (${p.PropertyID})`; let contents: string; if (p.IsVector) { @@ -360,7 +365,7 @@ Frame count = ${img.FrameCount}} contents = p.Value; } WScript.Echo(`${name} = ${contents}`); - }); + } } } @@ -430,7 +435,7 @@ Frame count = ${img.FrameCount}} if (args[0] === 'connect') { const deviceID = args[1].substr(12); const device = dm.DeviceInfos(deviceID).Connect(); - collectionToArray(device.Items).forEach(item => { + for (const item of collectionToArray(device.Items)) { const img = item.Transfer(); img.SaveFile(`C:\\${item.Properties('Item Name').Value}.${img.FileExtension}`); @@ -445,7 +450,7 @@ Frame count = ${img.FrameCount}} WScript.Echo(error); } } - }); + } WScript.Quit(); } break; diff --git a/types/activex-wia/index.d.ts b/types/activex-wia/index.d.ts index 18e474e09c..5a06471ff8 100644 --- a/types/activex-wia/index.d.ts +++ b/types/activex-wia/index.d.ts @@ -4,6 +4,8 @@ // Definitions: https://github.com/DefinitelyTyped/DefinitelyTyped // TypeScript Version: 2.6 +/// + declare namespace WIA { /** String versions of globally unique identifiers (GUIDs) that identify common Device and Item commands. */ const enum CommandID { @@ -791,7 +793,6 @@ declare namespace WIA { } interface ActiveXObject { - new(progid: K): ActiveXObjectNameMap[K]; on(obj: WIA.DeviceManager, event: 'OnEvent', argNames: ['EventID', 'DeviceID', 'ItemID'], handler: ( this: WIA.DeviceManager, parameter: { readonly EventID: string, readonly DeviceID: string, readonly ItemID: string }) => void): void; set(obj: WIA.Vector, propertyName: 'Item', parameterTypes: [number], newValue: TItem): void; diff --git a/types/activex-wia/tsconfig.json b/types/activex-wia/tsconfig.json index e77b3d1b66..48ed56e82e 100644 --- a/types/activex-wia/tsconfig.json +++ b/types/activex-wia/tsconfig.json @@ -2,8 +2,7 @@ "compilerOptions": { "module": "commonjs", "lib": [ - "es5", - "scripthost" + "es5" ], "noImplicitAny": true, "noImplicitThis": true, diff --git a/types/activex-word/activex-word-tests.ts b/types/activex-word/activex-word-tests.ts index 4a0000e6fa..2b44a5ba22 100644 --- a/types/activex-word/activex-word-tests.ts +++ b/types/activex-word/activex-word-tests.ts @@ -1,5 +1,7 @@ +/// + // tslint:disable-next-line no-unnecessary-generics -const collectionToArray = (col: any): T[] => { +const collectionToArray = (col: {Item(index: any): T}): T[] => { const results: T[] = []; const enumerator = new Enumerator(col); enumerator.moveFirst(); @@ -233,7 +235,7 @@ const activeDoc = app.ActiveDocument; // looping through a collection -- https://msdn.microsoft.com/en-us/vba/word-vba/articles/looping-through-a-collection (() => { - collectionToArray(app.Documents) + collectionToArray(app.Documents) .forEach(openDocument => WScript.Echo(openDocument.Name)); const strMarks = collectionToArray(activeDoc.Bookmarks) diff --git a/types/activex-word/index.d.ts b/types/activex-word/index.d.ts index 7fe194552a..f6f559ae16 100644 --- a/types/activex-word/index.d.ts +++ b/types/activex-word/index.d.ts @@ -2,8 +2,9 @@ // Project: https://msdn.microsoft.com/en-us/library/fp179696.aspx // Definitions by: Zev Spitz // Definitions: https://github.com/DefinitelyTyped/DefinitelyTyped -// TypeScript Version: 2.3 +// TypeScript Version: 2.6 +/// /// /// /// @@ -12496,7 +12497,6 @@ interface ActiveXObject { set(obj: Word.Document, propertyName: 'ActiveWritingStyle', parameterTypes: [any], newValue: string): void; set(obj: Word.Document, propertyName: 'Compatibility', parameterTypes: [Word.WdCompatibility], newValue: boolean): void; set(obj: Word.System, propertyName: 'PrivateProfileString', parameterTypes: [string, string, string], newValue: string): void; - new(progid: K): ActiveXObjectNameMap[K]; } interface ActiveXObjectNameMap { diff --git a/types/activex-word/tsconfig.json b/types/activex-word/tsconfig.json index c62626ca52..c5316c83c4 100644 --- a/types/activex-word/tsconfig.json +++ b/types/activex-word/tsconfig.json @@ -1,10 +1,7 @@ { "compilerOptions": { "module": "commonjs", - "lib": [ - "es5", - "scripthost" - ], + "lib": ["es5"], "noImplicitAny": true, "noImplicitThis": true, "strictNullChecks": true, diff --git a/types/adal-angular/adal-angular-tests.ts b/types/adal-angular/adal-angular-tests.ts index 272591d56e..81293de159 100644 --- a/types/adal-angular/adal-angular-tests.ts +++ b/types/adal-angular/adal-angular-tests.ts @@ -1,10 +1,6 @@ -import AuthenticationContext, { - AuthenticationContextOptions, - TokenCallback, - UserCallback -} from "adal-angular"; +import AuthenticationContext = require("adal-angular"); -const onLogin: TokenCallback = (errorDescription, idToken, error) => { +const onLogin: AuthenticationContext.TokenCallback = (errorDescription, idToken, error) => { if (error) { console.error(errorDescription, error); return; @@ -14,7 +10,7 @@ const onLogin: TokenCallback = (errorDescription, idToken, error) => { } }; -const onToken: TokenCallback = (errorDesc, token, error) => { +const onToken: AuthenticationContext.TokenCallback = (errorDesc, token, error) => { if (error) { console.error(error); return; @@ -22,7 +18,7 @@ const onToken: TokenCallback = (errorDesc, token, error) => { console.log('Making request with token:', token); }; -const onUser: UserCallback = (error, user) => { +const onUser: AuthenticationContext.UserCallback = (error, user) => { if (error) { console.error(error); return; @@ -57,7 +53,7 @@ const acquireAnAccessToken = () => { ); }; -const config: AuthenticationContextOptions = { +const config: AuthenticationContext.Options = { clientId: "7cee0f68-5051-41f6-9e45-80463d21d65d", redirectUri: "http://localhost:16969/", instance: "https://login.microsoftonline.com/", @@ -70,6 +66,7 @@ const config: AuthenticationContextOptions = { }; const authenticationContext = new AuthenticationContext(config); +window.Logging.level = authenticationContext.CONSTANTS.LOGGING_LEVEL.ERROR; if (authenticationContext.isCallback(window.location.hash)) { authenticationContext.handleWindowCallback(); @@ -79,6 +76,11 @@ if (authenticationContext.isCallback(window.location.hash)) { acquireAnAccessToken(); } +const injectedContext = AuthenticationContext.inject({ + clientId: "7cee0f68-5051-41f6-9e45-80463d21d65d", +}); +injectedContext.handleWindowCallback(); + setTimeout(() => { authenticationContext.logOut(); }, 60000); diff --git a/types/adal-angular/index.d.ts b/types/adal-angular/index.d.ts index 00dc813ee8..ea4963b6d2 100644 --- a/types/adal-angular/index.d.ts +++ b/types/adal-angular/index.d.ts @@ -1,142 +1,28 @@ // Type definitions for adal-angular 1.0 // Project: https://github.com/AzureAD/azure-activedirectory-library-for-js#readme // Definitions by: Daniel Perez Alvarez +// Anthony Ciccarello // Definitions: https://github.com/DefinitelyTyped/DefinitelyTyped -export enum LoggingLevel { - ERROR = 0, - WARNING = 1, - INFO = 2, - VERBOSE = 3 -} +// In module contexts the class constructor function is the exported object +export = AuthenticationContext; -export type RequestType = "LOGIN" | "RENEW_TOKEN" | "UNKNOWN"; +// This class is defined globally in not in a module context +declare class AuthenticationContext { + instance: string; + config: AuthenticationContext.Options; + callback: AuthenticationContext.TokenCallback; + popUp: boolean; + isAngular: boolean; -export type ResponseType = "id_token token" | "token"; + /** + * Enum for request type + */ + REQUEST_TYPE: AuthenticationContext.RequestType; + RESPONSE_TYPE: AuthenticationContext.ResponseType; + CONSTANTS: AuthenticationContext.Constants; -export interface RequestInfo { - /** - * Object comprising of fields such as id_token/error, session_state, state, e.t.c. - */ - parameters: any; - /** - * Request type. - */ - requestType: RequestType; - /** - * Whether state is valid. - */ - stateMatch: boolean; - /** - * Unique guid used to match the response with the request. - */ - stateResponse: string; - /** - * Whether `requestType` contains `id_token`, `access_token` or error. - */ - valid: boolean; -} - -export interface UserInfo { - /** - * Username assigned from UPN or email. - */ - userName: string; - /** - * Properties parsed from `id_token`. - */ - profile: any; -} - -export type TokenCallback = ( - errorDesc: string | null, - token: string, - error: any -) => void; - -export type UserCallback = (errorDesc: string | null, user: UserInfo) => void; - -export interface AuthenticationContextOptions { - /** - * Client ID assigned to your app by Azure Active Directory. - */ - clientId: string; - /** - * Endpoint at which you expect to receive tokens.Defaults to `window.location.href`. - */ - redirectUri: string; - /** - * Azure Active Directory instance. Defaults to `https://login.microsoftonline.com/`. - */ - instance?: string; - /** - * Your target tenant. Defaults to `common`. - */ - tenant?: string; - /** - * Query parameters to add to the authentication request. - */ - extraQueryParameter?: string; - /** - * Unique identifier used to map the request with the response. Defaults to RFC4122 version 4 guid (128 bits). - */ - correlationId?: string; - /** - * User defined function of handling the navigation to Azure AD authorization endpoint in case of login. - */ - displayCall?: (url: string) => void; - /** - * Set this to true to enable login in a popup winodow instead of a full redirect. Defaults to `false`. - */ - popUp?: boolean; - /** - * Set this to the resource to request on login. Defaults to `clientId`. - */ - loginResource?: string; - /** - * Set this to redirect the user to a custom login page. - */ - localLoginUrl?: string; - /** - * Redirects to start page after login. Defaults to `true`. - */ - navigateToLoginRequestUrl?: boolean; - /** - * Set this to redirect the user to a custom logout page. - */ - logOutUri?: string; - /** - * Redirects the user to postLogoutRedirectUri after logout. Defaults to `redirectUri`. - */ - postLogoutRedirectUri?: string; - /** - * Sets browser storage to either 'localStorage' or sessionStorage'. Defaults to `sessionStorage`. - */ - cacheLocation?: "localStorage" | "sessionStorage"; - /** - * Array of keywords or URIs. Adal will attach a token to outgoing requests that have these keywords or URIs. - */ - endpoints?: { [resource: string]: string }; - /** - * Array of keywords or URIs. Adal will not attach a token to outgoing requests that have these keywords or URIs. - */ - anonymousEndpoints?: string[]; - /** - * If the cached token is about to be expired in the expireOffsetSeconds (in seconds), Adal will renew the token instead of using the cached token. Defaults to 300 seconds. - */ - expireOffsetSeconds?: number; - /** - * The number of milliseconds of inactivity before a token renewal response from AAD should be considered timed out. Defaults to 6 seconds. - */ - loadFrameTimeout?: number; - /** - * Callback to be invoked when a token is acquired. - */ - callback?: TokenCallback; -} - -export default class AuthenticationContext { - constructor(options: AuthenticationContextOptions); + constructor(options: AuthenticationContext.Options); /** * Initiates the login process by redirecting the user to Azure AD authorization endpoint. */ @@ -153,7 +39,7 @@ export default class AuthenticationContext { /** * If user object exists, returns it. Else creates a new user object by decoding `id_token` from the cache. */ - getCachedUser(): UserInfo; + getCachedUser(): AuthenticationContext.UserInfo; /** * Adds the passed callback to the array of callbacks for the specified resource. * @param resource A URI that identifies the resource for which the token is requested. @@ -163,14 +49,14 @@ export default class AuthenticationContext { registerCallback( expectedState: string, resource: string, - callback: TokenCallback + callback: AuthenticationContext.TokenCallback ): void; /** * Acquires token from the cache if it is not expired. Otherwise sends request to AAD to obtain a new token. * @param resource Resource URI identifying the target resource. * @param callback The callback provided by the caller. It will be called with token or error. */ - acquireToken(resource: string, callback: TokenCallback): void; + acquireToken(resource: string, callback: AuthenticationContext.TokenCallback): void; /** * Acquires token (interactive flow using a popup window) by sending request to AAD to obtain a new token. * @param resource Resource URI identifying the target resource. @@ -182,7 +68,7 @@ export default class AuthenticationContext { resource: string, extraQueryParameters: string | null | undefined, claims: string | null | undefined, - callback: TokenCallback + callback: AuthenticationContext.TokenCallback ): void; /** * Acquires token (interactive flow using a redirect) by sending request to AAD to obtain a new token. In this case the callback passed in the authentication request constructor will be called. @@ -217,7 +103,7 @@ export default class AuthenticationContext { * Calls the passed in callback with the user object or error message related to the user. * @param callback The callback provided by the caller. It will be called with user or error. */ - getUser(callback: UserCallback): void; + getUser(callback: AuthenticationContext.UserCallback): void; /** * Checks if the URL fragment contains access token, id token or error description. * @param hash Hash passed from redirect page. @@ -230,11 +116,11 @@ export default class AuthenticationContext { /** * Creates a request info object from the URL fragment and returns it. */ - getRequestInfo(hash: string): RequestInfo; + getRequestInfo(hash: string): AuthenticationContext.RequestInfo; /** * Saves token or error received in the response from AAD in the cache. In case of `id_token`, it also creates the user object. */ - saveTokenFromHash(requestInfo: RequestInfo): void; + saveTokenFromHash(requestInfo: AuthenticationContext.RequestInfo): void; /** * Gets resource for given endpoint if mapping is provided with config. * @param endpoint Resource URI identifying the target resource. @@ -252,7 +138,7 @@ export default class AuthenticationContext { * @param message Message to log. * @param error Error to log. */ - log(level: LoggingLevel, message: string, error: any): void; + log(level: AuthenticationContext.LoggingLevel, message: string, error: any): void; /** * Logs messages when logging level is set to 0. * @param message Message to log. @@ -274,4 +160,221 @@ export default class AuthenticationContext { * @param message Message to log. */ verbose(message: string): void; + + /** + * Logs Pii messages when Logging Level is set to 0 and window.piiLoggingEnabled is set to true. + * @param message Message to log. + * @param error Error to log. + */ + errorPii(message: string, error: any): void; + + /** + * Logs Pii messages when Logging Level is set to 1 and window.piiLoggingEnabled is set to true. + * @param message Message to log. + */ + warnPii(message: string): void; + + /** + * Logs messages when Logging Level is set to 2 and window.piiLoggingEnabled is set to true. + * @param message Message to log. + */ + infoPii(message: string): void; + + /** + * Logs messages when Logging Level is set to 3 and window.piiLoggingEnabled is set to true. + * @param message Message to log. + */ + verbosePii(message: string): void; +} + +declare namespace AuthenticationContext { + function inject(config: Options): AuthenticationContext; + + type LoggingLevel = 0 | 1 | 2 | 3; + + type RequestType = "LOGIN" | "RENEW_TOKEN" | "UNKNOWN"; + + type ResponseType = "id_token token" | "token"; + + interface RequestInfo { + /** + * Object comprising of fields such as id_token/error, session_state, state, e.t.c. + */ + parameters: any; + /** + * Request type. + */ + requestType: RequestType; + /** + * Whether state is valid. + */ + stateMatch: boolean; + /** + * Unique guid used to match the response with the request. + */ + stateResponse: string; + /** + * Whether `requestType` contains `id_token`, `access_token` or error. + */ + valid: boolean; + } + + interface UserInfo { + /** + * Username assigned from UPN or email. + */ + userName: string; + /** + * Properties parsed from `id_token`. + */ + profile: any; + } + + type TokenCallback = ( + errorDesc: string | null, + token: string | null, + error: any + ) => void; + + type UserCallback = (errorDesc: string | null, user: UserInfo | null) => void; + + /** + * Configuration options for Authentication Context + */ + interface Options { + /** + * Client ID assigned to your app by Azure Active Directory. + */ + clientId: string; + /** + * Endpoint at which you expect to receive tokens.Defaults to `window.location.href`. + */ + redirectUri?: string; + /** + * Azure Active Directory instance. Defaults to `https://login.microsoftonline.com/`. + */ + instance?: string; + /** + * Your target tenant. Defaults to `common`. + */ + tenant?: string; + /** + * Query parameters to add to the authentication request. + */ + extraQueryParameter?: string; + /** + * Unique identifier used to map the request with the response. Defaults to RFC4122 version 4 guid (128 bits). + */ + correlationId?: string; + /** + * User defined function of handling the navigation to Azure AD authorization endpoint in case of login. + */ + displayCall?: (url: string) => void; + /** + * Set this to true to enable login in a popup winodow instead of a full redirect. Defaults to `false`. + */ + popUp?: boolean; + /** + * Set this to the resource to request on login. Defaults to `clientId`. + */ + loginResource?: string; + /** + * Set this to redirect the user to a custom login page. + */ + localLoginUrl?: string; + /** + * Redirects to start page after login. Defaults to `true`. + */ + navigateToLoginRequestUrl?: boolean; + /** + * Set this to redirect the user to a custom logout page. + */ + logOutUri?: string; + /** + * Redirects the user to postLogoutRedirectUri after logout. Defaults to `redirectUri`. + */ + postLogoutRedirectUri?: string; + /** + * Sets browser storage to either 'localStorage' or sessionStorage'. Defaults to `sessionStorage`. + */ + cacheLocation?: "localStorage" | "sessionStorage"; + /** + * Array of keywords or URIs. Adal will attach a token to outgoing requests that have these keywords or URIs. + */ + endpoints?: { [resource: string]: string }; + /** + * Array of keywords or URIs. Adal will not attach a token to outgoing requests that have these keywords or URIs. + */ + anonymousEndpoints?: string[]; + /** + * If the cached token is about to be expired in the expireOffsetSeconds (in seconds), Adal will renew the token instead of using the cached token. Defaults to 300 seconds. + */ + expireOffsetSeconds?: number; + /** + * The number of milliseconds of inactivity before a token renewal response from AAD should be considered timed out. Defaults to 6 seconds. + */ + loadFrameTimeout?: number; + /** + * Callback to be invoked when a token is acquired. + */ + callback?: TokenCallback; + } + + interface LoggingConfig { + level: LoggingLevel; + log: (message: string) => void; + piiLoggingEnabled: boolean; + } + + /** + * Enum for storage constants + */ + interface Constants { + ACCESS_TOKEN: 'access_token'; + EXPIRES_IN: 'expires_in'; + ID_TOKEN: 'id_token'; + ERROR_DESCRIPTION: 'error_description'; + SESSION_STATE: 'session_state'; + STORAGE: { + TOKEN_KEYS: 'adal.token.keys'; + ACCESS_TOKEN_KEY: 'adal.access.token.key'; + EXPIRATION_KEY: 'adal.expiration.key'; + STATE_LOGIN: 'adal.state.login'; + STATE_RENEW: 'adal.state.renew'; + NONCE_IDTOKEN: 'adal.nonce.idtoken'; + SESSION_STATE: 'adal.session.state'; + USERNAME: 'adal.username'; + IDTOKEN: 'adal.idtoken'; + ERROR: 'adal.error'; + ERROR_DESCRIPTION: 'adal.error.description'; + LOGIN_REQUEST: 'adal.login.request'; + LOGIN_ERROR: 'adal.login.error'; + RENEW_STATUS: 'adal.token.renew.status'; + }; + RESOURCE_DELIMETER: '|'; + LOADFRAME_TIMEOUT: '6000'; + TOKEN_RENEW_STATUS_CANCELED: 'Canceled'; + TOKEN_RENEW_STATUS_COMPLETED: 'Completed'; + TOKEN_RENEW_STATUS_IN_PROGRESS: 'In Progress'; + LOGGING_LEVEL: { + ERROR: 0; + WARN: 1; + INFO: 2; + VERBOSE: 3; + }; + LEVEL_STRING_MAP: { + 0: 'ERROR:'; + 1: 'WARNING:'; + 2: 'INFO:'; + 3: 'VERBOSE:'; + }; + POPUP_WIDTH: 483; + POPUP_HEIGHT: 600; + } +} + +declare global { + interface Window { + Logging: AuthenticationContext.LoggingConfig; + } } diff --git a/types/adal-angular/tsconfig.json b/types/adal-angular/tsconfig.json index 9052e3fc04..f297baa423 100644 --- a/types/adal-angular/tsconfig.json +++ b/types/adal-angular/tsconfig.json @@ -15,10 +15,11 @@ ], "types": [], "noEmit": true, - "forceConsistentCasingInFileNames": true + "forceConsistentCasingInFileNames": true, + "esModuleInterop": true }, "files": [ "index.d.ts", "adal-angular-tests.ts" ] -} \ No newline at end of file +} diff --git a/types/adone/adone.d.ts b/types/adone/adone.d.ts index d4e8b67b7b..6322bf6efc 100644 --- a/types/adone/adone.d.ts +++ b/types/adone/adone.d.ts @@ -1,6 +1,7 @@ /// /// /// +/// declare namespace adone { const _null: symbol; @@ -110,4 +111,6 @@ declare namespace adone { export const lodash: _.LoDashStatic; export const benchmark: typeof tbenchmark; + + export const async: typeof tasync; } diff --git a/types/adone/async.d.ts b/types/adone/async.d.ts new file mode 100644 index 0000000000..4cd3d421da --- /dev/null +++ b/types/adone/async.d.ts @@ -0,0 +1,3 @@ +export * from "async"; + +export as namespace tasync; diff --git a/types/adone/glosses/application.d.ts b/types/adone/glosses/app.d.ts similarity index 90% rename from types/adone/glosses/application.d.ts rename to types/adone/glosses/app.d.ts index 4c9661843a..1c6dee3369 100644 --- a/types/adone/glosses/application.d.ts +++ b/types/adone/glosses/app.d.ts @@ -1,5 +1,5 @@ declare namespace adone { - namespace application { + namespace app { namespace I { type ArgumentType = ((x: string, index: number) => any) | RegExp; @@ -12,7 +12,7 @@ declare namespace adone { | "append" | "count" | "set"; - nargs?: number | "+" | "*" | "?" + nargs?: number | "+" | "*" | "?"; type?: ArgumentType | ArgumentType[]; verify?: (args: any, opts: any) => boolean; // TODO required?: boolean; @@ -49,7 +49,7 @@ declare namespace adone { name?: string; description?: string; subsystems?: SubsystemInfo[]; - commandsGroups?: Group[] + commandsGroups?: Group[]; } interface SubsystemInfo { @@ -71,24 +71,24 @@ declare namespace adone { namespace I { interface LoadSubsystemOptions { - name?: string, - description?: string, - group?: string, - transpile?: boolean + name?: string; + description?: string; + group?: string; + transpile?: boolean; } interface CommonAddSubsystemInfo { - name?: string, - useFilename?: boolean - description?: string, - group?: string, - configureArgs?: any[] - transpile?: boolean, - bind?: boolean | string + name?: string; + useFilename?: boolean; + description?: string; + group?: string; + configureArgs?: any[]; + transpile?: boolean; + bind?: boolean | string; } interface AddSubsystemInfo extends CommonAddSubsystemInfo { - subsystem: Subsystem | string, + subsystem: Subsystem | string; } interface SysInfo { @@ -109,7 +109,7 @@ declare namespace adone { } interface AddSubsystemsFromOptions extends CommonAddSubsystemInfo { - filter?: string[] | ((file: string) => boolean | Promise) + filter?: string[] | ((file: string) => boolean | Promise); } } @@ -211,25 +211,22 @@ declare namespace adone { _rejectionHandled(p: Promise): void; _signalExit(sigName: string): void; - } namespace I { interface Command { - // ? + names: string[]; + // TODO } interface Argument { - // ? + names: string[]; + // TODO } - interface PositionalArgument extends Argument { - // ? - } + type PositionalArgument = Argument; // TODO - interface OptionalArgument extends Argument { - // ? - } + type OptionalArgument = Argument; // TODO interface DefineCommandFromSubsystemOptions { name?: string; diff --git a/types/adone/glosses/collections/byte_array.d.ts b/types/adone/glosses/collections/byte_array.d.ts index 1dc3080fb3..e6f145ce38 100644 --- a/types/adone/glosses/collections/byte_array.d.ts +++ b/types/adone/glosses/collections/byte_array.d.ts @@ -103,6 +103,13 @@ declare namespace adone.collection { */ readUInt16BE(offset?: number): number; + /** + * Reads a 24bit unsigned be integer + * + * @param offset Offset to read from + */ + readUInt24BE(offset?: number): number; + /** * Reads a 32bit signed le integer * @@ -260,6 +267,13 @@ declare namespace adone.collection { */ writeUInt16BE(value: number, offset?: number): this; + /** + * Writes a 24bit unsigned be integer + * + * @param offset Offset to write at + */ + writeUInt24BE(value: number, offset?: number): this; + /** * Writes a 32bit signed le integer * diff --git a/types/adone/glosses/collections/fast_lru.d.ts b/types/adone/glosses/collections/fast_lru.d.ts index e991322bc0..3418f60ffa 100644 --- a/types/adone/glosses/collections/fast_lru.d.ts +++ b/types/adone/glosses/collections/fast_lru.d.ts @@ -4,13 +4,18 @@ declare namespace adone.collection { */ class FastLRU { /** - * @param size Cache size, unlimited by default + * @param size */ - constructor(size?: number, options?: { + constructor(options?: { + /** + * Cache size, unlimited by default + */ + maxSize?: number; + /** * Function that is called when a value is deleted */ - dispose?(key: K, value: V): void + dispose?(key: K, value: V): void; }); /** diff --git a/types/adone/glosses/collections/index.d.ts b/types/adone/glosses/collections/index.d.ts index 234ffe85f4..ab4e744d1a 100644 --- a/types/adone/glosses/collections/index.d.ts +++ b/types/adone/glosses/collections/index.d.ts @@ -16,7 +16,7 @@ /// /// /// -/// +/// declare namespace adone { /** diff --git a/types/adone/glosses/collections/lru.d.ts b/types/adone/glosses/collections/lru.d.ts index 7d41e32cd5..730845ae16 100644 --- a/types/adone/glosses/collections/lru.d.ts +++ b/types/adone/glosses/collections/lru.d.ts @@ -6,7 +6,7 @@ declare namespace adone.collection { * The maximum size of the cache, checked by applying the length function to all values in the cache. * Default is Infinity */ - max?: number; + maxSize?: number; /** * Maximum age in ms. Items are not pro-actively pruned out as they age, @@ -85,11 +85,6 @@ declare namespace adone.collection { * Represent an LRU cache */ class LRU { - /** - * Creates an LRU cache of the given size - */ - constructor(max: number); - /** * Creates an LRU cache with the given options */ @@ -98,7 +93,7 @@ declare namespace adone.collection { /** * The length of the cache, setter resizes the cache */ - max: number; + maxSize: number; /** * stale setting diff --git a/types/adone/glosses/collections/ns_cache.d.ts b/types/adone/glosses/collections/ns_cache.d.ts index 5630c295d3..1c6e88702f 100644 --- a/types/adone/glosses/collections/ns_cache.d.ts +++ b/types/adone/glosses/collections/ns_cache.d.ts @@ -1,6 +1,6 @@ declare namespace adone.collection { class NSCache { - constructor(size: number, namespaces: string[]); + constructor(maxSize: number, namespaces: string[]); resize(newSize: number): void; diff --git a/types/adone/glosses/collections/timedout_map.d.ts b/types/adone/glosses/collections/time_map.d.ts similarity index 93% rename from types/adone/glosses/collections/timedout_map.d.ts rename to types/adone/glosses/collections/time_map.d.ts index fedcf79fa2..ae5d23e62b 100644 --- a/types/adone/glosses/collections/timedout_map.d.ts +++ b/types/adone/glosses/collections/time_map.d.ts @@ -2,7 +2,7 @@ declare namespace adone.collection { /** * Represents a Map that keeps keys only for a specified interval of time */ - class TimedoutMap extends Map { + class TimeMap extends Map { /** * @param timeout maximum age of the keys, 1000 by default * @param callback callback that is called with each key when the timeout is passed diff --git a/types/adone/glosses/is.d.ts b/types/adone/glosses/is.d.ts index d112d3f109..bf8bb0a347 100644 --- a/types/adone/glosses/is.d.ts +++ b/types/adone/glosses/is.d.ts @@ -320,12 +320,12 @@ declare namespace adone { /** * Checks whether the given object is an adone subsystem */ - export function subsystem(obj: any): obj is adone.application.Subsystem; + export function subsystem(obj: any): obj is adone.app.Subsystem; /** * Checks whether the given object is an adone application */ - export function application(obj: any): obj is adone.application.Application; + export function application(obj: any): obj is adone.app.Application; /** * Checks whether the given object is an adone logger @@ -490,12 +490,17 @@ declare namespace adone { /** * Checks whether the given string is an IPv4 address */ - export function ip4(str: string): boolean; + export function ip4(str: string, options?: adone.regex.I.IP.Options): boolean; /** * Checks whether the given string is an IPv6 address */ - export function ip6(str: string): boolean; + export function ip6(str: string, options?: adone.regex.I.IP.Options): boolean; + + /** + * Checks whether the given string is IPv4 or IPv6 address + */ + export function ip(str: string, options?: adone.regex.I.IP.Options): boolean; /** * Checks whether the given object is an array buffer @@ -628,21 +633,6 @@ declare namespace adone { requireTld?: boolean }): obj is string; - /** - * Checks whether the given object is a valid IPv4 address - */ - export function ip(obj: any, version: 4): boolean; - - /** - * Checks whether the given object is a valid IPv6 address - */ - export function ip(obj: any, version: 6): boolean; - - /** - * Checks whether the given object in a valid IPv4 or IPv6 address - */ - export function ip(obj: any): boolean; - /** * Checks whether the given object is a valid UUIDv1 identifier */ @@ -680,5 +670,10 @@ declare namespace adone { export const openbsd: boolean; export const aix: boolean; + + /** + * Checks whether the given object is adone.multi.address.Multiaddr + */ + export function multiAddress(obj: any): boolean; // TODO: obj is adone.multi.address.Multiaddr } } diff --git a/types/adone/glosses/math/bignumber.d.ts b/types/adone/glosses/math/bignumber.d.ts new file mode 100644 index 0000000000..f746ebfe02 --- /dev/null +++ b/types/adone/glosses/math/bignumber.d.ts @@ -0,0 +1,227 @@ +declare namespace adone.math { + namespace I.BigNumber { + interface BufferConvertOptions { + endian?: 1 | -1 | "big" | "little"; + size?: "auto" | number; + } + } + + /** + * Represents a number of arbitrary precision + */ + class BigNumber { + /** + * Creates a BigNumber from the given value, the base is 10 + */ + constructor(n: number | string | BigNumber); + + /** + * Creates a BigNumber from the given string and base + */ + constructor(n: string, base: number); + + /** + * Converts the number to a string in the given base + */ + toString(base?: number): string; + + /** + * Converts the bignum into a Number. + * If the bignum is too big you'll lose precision or you'll get ±Infinity. + */ + toNumber(): number; + + /** + * Returns a new Buffer with the data from the bignum. + */ + toBuffer(opts?: I.BigNumber.BufferConvertOptions): Buffer; + + /** + * Returns a new bignum containing the instance value plus n + */ + add(n: number | string | BigNumber): BigNumber; + + /** + * Return a new bignum containing the instance value minus n + */ + sub(n: number | string | BigNumber): BigNumber; + + /** + * Returns a new bignum containing the instance value multiplied by n + */ + mul(n: number | string | BigNumber): BigNumber; + + /** + * Returns a new bignum containing the instance value integrally divided by n + */ + div(n: number | string | BigNumber): BigNumber; + + /** + * Returns a new bignum with the absolute value of the instance + */ + abs(): BigNumber; + + /** + * Returns a new bignum with the negative of the instance value + */ + neg(): BigNumber; + + /** + * Compares the instance value to n. + * + * Returns a positive integer if > n, a negative integer if < n, and 0 if == n + */ + cmp(n: number | string | BigNumber): number; + + /** + * Checks whether the instance value is greater than n (> n). + */ + gt(n: number | string | BigNumber): boolean; + + /** + * Checks whether the instance value is greater than or equal to n (>= n). + */ + ge(n: number | string | BigNumber): boolean; + + /** + * Checks whether the instance value is equal to n (== n). + */ + eq(n: number | string | BigNumber): boolean; + + /** + * Checks whether the instance value is less than n (< n). + */ + lt(n: number | string | BigNumber): boolean; + + /** + * Checks whether the instance value is less than or equal to n (<= n). + */ + le(n: number | string | BigNumber): boolean; + + /** + * Returns a new bignum with the instance value bitwise AND (&)-ed with n. + */ + and(n: number | string | BigNumber): BigNumber; + + /** + * Returns a new bignum with the instance value bitwise inclusive-OR (|)-ed with n. + */ + or(n: number | string | BigNumber): BigNumber; + + /** + * Returns a new bignum with the instance value bitwise exclusive-OR (^)-ed with n. + */ + xor(n: number | string | BigNumber): BigNumber; + + /** + * Returns a new bignum with the instance value modulo n. + */ + mod(n: number | string | BigNumber): BigNumber; + + /** + * Returns a new bignum with the instance value raised to the nth power. + */ + pow(n: number | string | BigNumber): BigNumber; + + /** + * Returns a new bignum with the instance value raised to the nth power modulo m. + */ + powm(n: number | string | BigNumber, m: number | string | BigNumber): BigNumber; + + /** + * Computes the multiplicative inverse modulo m. + */ + invertm(m: number | string | BigNumber): BigNumber; + + /** + * Returns a random number from 0 to this -1 + */ + rand(): BigNumber; + + /** + * Returns a random number from this to upperBound - 1 + */ + rand(upperBound: number | string | BigNumber): BigNumber; + + /** + * Checks whether the bignum is: + * + * - certainly prime (true) + * + * - probably prime ('maybe') + * + * - certainly composite (false) + */ + probPrime(): boolean | "maybe"; + + /** + * Returns the next prime number after this bignum + */ + nextPrime(): BigNumber; + + /** + * Returns a new bignum that is the square root. This truncates. + */ + sqrt(): BigNumber; + + /** + * Returns a new bignum that is the nth root. This truncates. + */ + root(n: number | string | BigNumber): BigNumber; + + /** + * Returns a new bignum that is the 2^n multiple. Equivalent of the << operator. + */ + shiftLeft(n: number | string | BigNumber): BigNumber; + + /** + * Returns a new bignum of the value integer divided by 2^n. Equivalent of the >> operator. + */ + shiftRight(n: number | string | BigNumber): BigNumber; + + /** + * Returns the greatest common divisor of the current bignum with n as a new bignum. + */ + gcd(n: number | string | BigNumber): BigNumber; + + /** + * Returns 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 + */ + jacobi(n: number | string | BigNumber): number; + + /** + * Returns the number of bits used to represent the current bignum + */ + bitLength(): number; + + /** + * Checks whether the bit at the given index is set + */ + isBitSet(n: number): boolean; + + /** + * Generates a probable prime number of length bits. + * + * @param bits the number of bits + * @param safe If true, it will be a "safe" prime of the form p=2p'+1 where p' is also prime. Default: true + */ + static prime(bits: number, safe?: boolean): BigNumber; + + /** + * Creates a new bignum from a Buffer. + */ + static fromBuffer(buf: Buffer, opts?: I.BigNumber.BufferConvertOptions): BigNumber; + + /** + * One + */ + static ONE: BigNumber; + + /** + * Zero + */ + static ZERO: BigNumber; + } +} diff --git a/types/adone/glosses/math/bitset.d.ts b/types/adone/glosses/math/bitset.d.ts new file mode 100644 index 0000000000..a6bbd36989 --- /dev/null +++ b/types/adone/glosses/math/bitset.d.ts @@ -0,0 +1,225 @@ +declare namespace adone.math { + /** + * Represents a set of bits + */ + class BitSet { + /** + * Creates a new bitset of n bits + */ + constructor(n: number); + + /** + * Creates a new bitset from a dehydrated bitset + */ + constructor(key: string); + + /** + * Checks whether a bit at a specific index is set + */ + get(idx: number): boolean; + + /** + * Sets a single bit. + * Returns true if set was successfull + */ + set(idx: number): boolean; + + /** + * Sets a range of bits. + * Returns true if set was successfull + */ + setRange(from: number, to: number): boolean; + + /** + * Unsets a single bit. + * Returns true if unset was successfull + */ + unset(idx: number): boolean; + + /** + * Unsets a range of bits. + * Returns true if unset was successfull + */ + unsetRange(from: number, to: number): boolean; + + /** + * Toggles a single bit + */ + toggle(idx: number): boolean; + + /** + * Toggles a range of bits + */ + toggleRange(from: number, to: number): boolean; + + /** + * Clears the entire bitset + */ + clear(): boolean; + + /** + * Clones the set + */ + clone(): BitSet; + + /** + * Turns the bitset into a comma separated string that skips leading & trailing 0 words. + * Ends with the number of leading 0s and MAX_BIT. + * Useful if you need the bitset to be an object key (eg dynamic programming). + * Can rehydrate by passing the result into the constructor + */ + dehydrate(): string; + + /** + * Performs a bitwise AND on 2 bitsets or 1 bitset and 1 index. + * Both bitsets must have the same number of words, no length check is performed to prevent and overflow. + */ + and(value: number | BitSet): BitSet; + + /** + * Performs a bitwise OR on 2 bitsets or 1 bitset and 1 index. + * Both bitsets must have the same number of words, no length check is performed to prevent and overflow. + */ + or(value: number | BitSet): BitSet; + + /** + * Performs a bitwise XOR on 2 bitsets or 1 bitset and 1 index. + * Both bitsets must have the same number of words, no length check is performed to prevent and overflow. + */ + xor(value: number | BitSet): BitSet; + + /** + * Runs a custom function on every set bit. + * Faster than iterating over the entire bitset with a get(). + * If the callback returns `false` it stops iterating. + */ + forEach(callback: ((idx: number) => void | boolean)): void; + + /** + * Performs a circular shift bitset by an offset + * + * @param n number of positions that the bitset that will be shifted to the right. Using a negative number will result in a left shift. + */ + circularShift(n: number): BitSet; + + /** + * Gets the cardinality (count of set bits) for the entire bitset + */ + getCardinality(): number; + + /** + * Gets the indices of all set bits + */ + getIndices(): number[]; + + /** + * Checks if one bitset is subset of another. + */ + isSubsetOf(other: BitSet): boolean; + + /** + * Quickly determines if a bitset is empty + */ + isEmpty(): boolean; + + /** + * Quickly determines if both bitsets are equal (faster than checking if the XOR of the two is === 0). + * Both bitsets must have the same number of words, no length check is performed to prevent and overflow. + */ + isEqual(other: BitSet): boolean; + + /** + * Gets a string representation of the entire bitset, including leading 0s + */ + toString(): string; + + /** + * Finds first set bit (useful for processing queues, breadth-first tree searches, etc.). + * Returns -1 if not found + * + * @param startWord the word to start with (only used internally by nextSetBit) + */ + ffs(startWord?: number): number; + + /** + * Finds first zero (unset bit). + * Returns -1 if not found + * + * @param startWord the word to start with (only used internally by nextUnsetBit) + */ + ffz(startWord?: number): number; + + /** + * Finds last set bit. + * Returns -1 if not found + * + * @param startWord the word to start with (only used internally by previousSetBit) + */ + fls(startWord?: number): number; + + /** + * Finds last zero (unset bit). + * Returns -1 if not found + * + * @param startWord the word to start with (only used internally by previousUnsetBit) + */ + flz(startWord?: number): number; + + /** + * Finds first set bit, starting at a given index. + * Return -1 if not found + * + * @param idx the starting index for the next set bit + */ + nextSetBit(idx: number): number; + + /** + * Finds first unset bit, starting at a given index. + * Return -1 if not found + * + * @param idx the starting index for the next unset bit + */ + nextUnsetBit(idx: number): number; + + /** + * Finds last set bit, up to a given index. + * Returns -1 if not found + * + * @param idx the starting index for the next unset bit (going in reverse) + */ + previousSetBit(idx: number): number; + + /** + * Finds last unset bit, up to a given index. + * Returns -1 if not found + */ + previousUnsetBit(idx: number): number; + + /** + * Converts the bitset to a math.Long number + */ + toLong(): Long; + + /** + * Reads an unsigned integer of the given bits from the given offset + * + * @param bits number of bits, 1 by default + * @param offset offset, 0 by default + */ + readUInt(bits?: number, offset?: number): number; + + /** + * Writes the given unsigned integer + * + * @param val integer + * @param bits number of bits to write, 1 by default + * @param offset write offset, 0 by default + */ + writeUInt(val: number, bits?: number, offset?: number): void; + + /** + * Creates a new BitSet from the given math.Long number + */ + static fromLong(l: Long): BitSet; + } +} diff --git a/types/adone/glosses/math/decimal.d.ts b/types/adone/glosses/math/decimal.d.ts new file mode 100644 index 0000000000..a7acb0ecad --- /dev/null +++ b/types/adone/glosses/math/decimal.d.ts @@ -0,0 +1,1287 @@ +declare namespace adone.math { + namespace I.Decimal { + type Constructor = typeof Decimal; + type Instance = Decimal; + type Rounding = 0 | 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8; + type Modulo = Rounding | 9; + type Value = string | number | Decimal; + + interface Config { + /** + * The maximum number of significant digits of the result of an operation. + * + * @default 20 + */ + precision?: number; + + /** + * The default rounding mode used when rounding the result of an operation to precision significant digits, and when rounding + * the return value of the round, toBinary, toDecimalPlaces, toExponential, toFixed, toHexadecimal, toNearest, toOctal, + * toPrecision and toSignificantDigits methods. + * + * @default 4 (ROUND_HALF_UP) + */ + rounding?: Rounding; + + /** + * The negative exponent value at and below which toString returns exponential notation. + * + * JavaScript numbers use exponential notation for negative exponents of -7 and below. + * + * @default -7 + */ + toExpNeg?: number; + + /** + * The positive exponent value at and above which toString returns exponential notation. + * + * JavaScript numbers use exponential notation for positive exponents of 20 and above. + * + * @default 20 + */ + toExpPos?: number; + + /** + * The negative exponent limit, i.e. the exponent value below which underflow to zero occurs. + * + * If the Decimal to be returned by a calculation would have an exponent lower than minE then the value of that Decimal becomes zero. + * + * JavaScript numbers underflow to zero for exponents below -324. + * + * @default -9e15 + */ + minE?: number; + + /** + * The positive exponent limit, i.e. the exponent value above which overflow to Infinity occurs. + * + * If the Decimal to be returned by a calculation would have an exponent higher than maxE then the value of that Decimal becomes Infinity. + * + * JavaScript numbers overflow to Infinity for exponents above 308. + * + * @default 9e15 + */ + maxE?: number; + + /** + * The value that determines whether cryptographically-secure pseudo-random number generation is used. + */ + crypto?: boolean; + + /** + * The modulo mode used when calculating the modulus: a mod n. + * + * The quotient, q = a / n, is calculated according to the rounding mode that corresponds to the chosen modulo mode. + * + * The remainder, r, is calculated as: r = a - n * q. + * + * @default 1 (ROUND_DOWN) + */ + modulo?: Modulo; + + defaults?: boolean; + } + } + + /** + * An arbitrary precision decimal number + */ + class Decimal { + /** + * digits + */ + readonly d: number[]; + + /** + * exponent + */ + readonly e: number; + + /** + * sign + */ + readonly s: number; + + private readonly name: string; + + constructor(x: I.Decimal.Value); + + /** + * Returns a new Decimal whose value is the absolute value, i.e. the magnitude, of the value of this Decimal. + * + * @alias abs + */ + absoluteValue(): Decimal; + + /** + * Returns a new Decimal whose value is the absolute value, i.e. the magnitude, of the value of this Decimal. + * + * @alias absoluteValue + */ + abs(): Decimal; + + /** + * Returns a new Decimal whose value is the value of this Decimal rounded to a whole number in the direction of positive Infinity. + * + * The return value is not affected by the value of the precision setting. + */ + ceil(): Decimal; + + /** + * 1 if the value of this Decimal is greater than the value of x + * + * -1 if the value of this Decimal is less than the value of x + * + * 0 if this Decimal and x have the same value + * + * NaN if the value of either this Decimal or x is NaN + * + * @alias cmp + */ + comparedTo(x: I.Decimal.Value): number; + + /** + * 1 if the value of this Decimal is greater than the value of x + * + * -1 if the value of this Decimal is less than the value of x + * + * 0 if this Decimal and x have the same value + * + * NaN if the value of either this Decimal or x is NaN + * + * @alias comparedTo + */ + cmp(x: I.Decimal.Value): number; + + /** + * Returns a new Decimal whose value is the cosine of the value in radians of this Decimal, + * rounded to precision significant digits using rounding mode rounding. + * + * @alias cos + */ + cosine(): Decimal; + + /** + * Returns a new Decimal whose value is the cosine of the value in radians of this Decimal, + * rounded to precision significant digits using rounding mode rounding. + * + * @alias cosine + */ + cos(): Decimal; + + /** + * Returns a new Decimal whose value is the cube root of this Decimal, + * rounded to precision significant digits using rounding mode rounding. + * + * The return value will be correctly rounded, + * i.e. rounded as if the result was first calculated to an infinite number of correct digits before rounding. + * + * @alias cbrt + */ + cubeRoot(): Decimal; + + /** + * Returns a new Decimal whose value is the cube root of this Decimal, + * rounded to precision significant digits using rounding mode rounding. + * + * The return value will be correctly rounded, + * i.e. rounded as if the result was first calculated to an infinite number of correct digits before rounding. + * + * @alias cubeRoot + */ + cbrt(): Decimal; + + /** + * Returns the number of decimal places, i.e. the number of digits after the decimal point, of the value of this Decimal. + * + * @alias dp + */ + decimalPlaces(): number; + + /** + * Returns the number of decimal places, i.e. the number of digits after the decimal point, of the value of this Decimal. + * + * @alias decimalPlaces + */ + dp(): number; + + /** + * Returns a new Decimal whose value is the value of this Decimal divided by x, + * rounded to precision significant digits using rounding mode rounding. + * + * @alias div + */ + dividedBy(x: I.Decimal.Value): Decimal; + + /** + * Returns a new Decimal whose value is the value of this Decimal divided by x, + * rounded to precision significant digits using rounding mode rounding. + * + * @alias dividedBy + */ + div(x: I.Decimal.Value): Decimal; + + /** + * Return a new Decimal whose value is the integer part of dividing this Decimal by x, + * rounded to precision significant digits using rounding mode rounding. + * + * @alias divToInt + */ + dividedToIntegerBy(x: I.Decimal.Value): Decimal; + + /** + * Return a new Decimal whose value is the integer part of dividing this Decimal by x, + * rounded to precision significant digits using rounding mode rounding. + * + * @alias dividedToIntegerBy + */ + divToInt(x: I.Decimal.Value): Decimal; + + /** + * Returns true if the value of this Decimal equals the value of x, otherwise returns false. + * As with JavaScript, NaN does not equal NaN. + * + * @alias eq + */ + equals(x: I.Decimal.Value): boolean; + + /** + * Returns true if the value of this Decimal equals the value of x, otherwise returns false. + * As with JavaScript, NaN does not equal NaN. + * + * @alias equals + */ + eq(x: I.Decimal.Value): boolean; + + /** + * Returns a new Decimal whose value is the value of this Decimal rounded to a whole number in the direction of negative Infinity. + * + * The return value is not affected by the value of the precision setting. + */ + floor(): Decimal; + + /** + * Returns true if the value of this Decimal is greater than the value of x, otherwise returns false. + * + * @alias gt + */ + greaterThan(x: I.Decimal.Value): boolean; + + /** + * Returns true if the value of this Decimal is greater than the value of x, otherwise returns false. + * + * @alias greaterThan + */ + gt(x: I.Decimal.Value): boolean; + + /** + * Returns true if the value of this Decimal is greater than or equal to the value of x, otherwise returns false. + * + * @alias gte + */ + greaterThanOrEqualTo(x: I.Decimal.Value): boolean; + + /** + * Returns true if the value of this Decimal is greater than or equal to the value of x, otherwise returns false. + * + * @alias greaterThanOrEqualTo + */ + gte(x: I.Decimal.Value): boolean; + + /** + * Returns a new Decimal whose value is the hyperbolic cosine of the value in radians of this Decimal, + * rounded to precision significant digits using rounding mode rounding. + * + * @alias cosh + */ + hyperbolicCosine(): Decimal; + + /** + * Returns a new Decimal whose value is the hyperbolic cosine of the value in radians of this Decimal, + * rounded to precision significant digits using rounding mode rounding. + * + * @alias hyperbolicCosine + */ + cosh(): Decimal; + + /** + * Returns a new Decimal whose value is the hyperbolic sine of the value in radians of this Decimal, + * rounded to precision significant digits using rounding mode rounding. + * + * @alias sinh + */ + hyperbolicSine(): Decimal; + + /** + * Returns a new Decimal whose value is the hyperbolic sine of the value in radians of this Decimal, + * rounded to precision significant digits using rounding mode rounding. + * + * @alias hyperbolicSine + */ + sinh(): Decimal; + + /** + * Returns a new Decimal whose value is the inverse hyperbolic tangent in radians of the value of this Decimal, + * rounded to precision significant digits using rounding mode rounding. + * + * @alias tanh + */ + hyperbolicTangent(): Decimal; + + /** + * Returns a new Decimal whose value is the inverse hyperbolic tangent in radians of the value of this Decimal, + * rounded to precision significant digits using rounding mode rounding. + * + * @alias hyperbolicTangent + */ + tanh(): Decimal; + + /** + * Returns a new Decimal whose value is the inverse cosine in radians of the value of this Decimal, + * rounded to precision significant digits using rounding mode rounding. + * + * @alias acos + */ + inverseCosine(): Decimal; + + /** + * Returns a new Decimal whose value is the inverse cosine in radians of the value of this Decimal, + * rounded to precision significant digits using rounding mode rounding. + * + * @alias inverseCosine + */ + acos(): Decimal; + + /** + * Returns a new Decimal whose value is the inverse hyperbolic cosine in radians of the value of this Decimal, + * rounded to precision significant digits using rounding mode rounding. + * + * @alias acosh + */ + inverseHyperbolicCosine(): Decimal; + + /** + * Returns a new Decimal whose value is the inverse hyperbolic cosine in radians of the value of this Decimal, + * rounded to precision significant digits using rounding mode rounding. + * + * @alias inverseHyperbolicCosine + */ + acosh(): Decimal; + + /** + * Returns a new Decimal whose value is the inverse hyperbolic sine in radians of the value of this Decimal, + * rounded to precision significant digits using rounding mode rounding. + * + * @alias asinh + */ + inverseHyperbolicSine(): Decimal; + + /** + * Returns a new Decimal whose value is the inverse hyperbolic sine in radians of the value of this Decimal, + * rounded to precision significant digits using rounding mode rounding. + * + * @alias inverseHyperbolicSine + */ + asinh(): Decimal; + + /** + * Returns a new Decimal whose value is the inverse hyperbolic tangent in radians of the value of this Decimal, + * rounded to precision significant digits using rounding mode rounding. + * + * @alias atanh + */ + inverseHyperbolicTangent(): Decimal; + + /** + * Returns a new Decimal whose value is the inverse hyperbolic tangent in radians of the value of this Decimal, + * rounded to precision significant digits using rounding mode rounding. + * + * @alias inverseHyperbolicTangent + */ + atanh(): Decimal; + + /** + * Returns a new Decimal whose value is the inverse sine in radians of the value of this Decimal, + * rounded to precision significant digits using rounding mode rounding. + * + * @alias asin + */ + inverseSine(): Decimal; + + /** + * Returns a new Decimal whose value is the inverse sine in radians of the value of this Decimal, + * rounded to precision significant digits using rounding mode rounding. + * + * @alias inverseSine + */ + asin(): Decimal; + + /** + * Returns a new Decimal whose value is the inverse tangent in radians of the value of this Decimal, + * rounded to precision significant digits using rounding mode rounding. + * + * @alias atan + */ + inverseTangent(): Decimal; + + /** + * Returns a new Decimal whose value is the inverse tangent in radians of the value of this Decimal, + * rounded to precision significant digits using rounding mode rounding. + * + * @alias inverseTangent + */ + atan(): Decimal; + + /** + * Returns true if the value of this Decimal is a finite number, otherwise returns false. + * The only possible non-finite values of a Decimal are NaN, Infinity and -Infinity. + */ + isFinite(): boolean; + + /** + * Returns true if the value of this Decimal is a whole number, otherwise returns false. + * + * @alias isInt + */ + isInteger(): boolean; + + /** + * Returns true if the value of this Decimal is a whole number, otherwise returns false. + * + * @alias isInteger + */ + isInt(): boolean; + + /** + * Returns true if the value of this Decimal is NaN, otherwise returns false. + */ + isNaN(): boolean; + + /** + * Returns true if the value of this Decimal is negative, otherwise returns false. + * + * @alias isNeg + */ + isNegative(): boolean; + + /** + * Returns true if the value of this Decimal is negative, otherwise returns false. + * + * @alias isNegative + */ + isNeg(): boolean; + + /** + * Returns true if the value of this Decimal is positive, otherwise returns false. + * + * @alias isPos + */ + isPositive(): boolean; + + /** + * Returns true if the value of this Decimal is positive, otherwise returns false. + * + * @alias isPositive + */ + isPos(): boolean; + + /** + * Returns true if the value of this Decimal is zero or minus zero, otherwise returns false. + */ + isZero(): boolean; + + /** + * Returns true if the value of this Decimal is less than the value of x, otherwise returns false. + * + * @alias lt + */ + lessThan(x: I.Decimal.Value): boolean; + + /** + * Returns true if the value of this Decimal is less than the value of x, otherwise returns false. + * + * @alias lessThan + */ + lt(x: I.Decimal.Value): boolean; + + /** + * Returns true if the value of this Decimal is less than or equal to the value of x, otherwise returns false. + * + * @alias lte + */ + lessThanOrEqualTo(x: I.Decimal.Value): boolean; + + /** + * Returns true if the value of this Decimal is less than or equal to the value of x, otherwise returns false. + * + * @alias lessThanOrEqualTo + */ + lte(x: I.Decimal.Value): boolean; + + /** + * Returns a new Decimal whose value is the base x logarithm of the value of this Decimal, + * rounded to precision significant digits using rounding mode rounding. + * + * @alias log + */ + logarithm(n?: I.Decimal.Value): Decimal; + + /** + * Returns a new Decimal whose value is the base x logarithm of the value of this Decimal, + * rounded to precision significant digits using rounding mode rounding. + * + * @alias logarithm + */ + log(n?: I.Decimal.Value): Decimal; + + /** + * Returns a new Decimal whose value is the value of this Decimal minus x, + * rounded to precision significant digits using rounding mode rounding. + * + * @alias sub + */ + minus(x: I.Decimal.Value): Decimal; + + /** + * Returns a new Decimal whose value is the value of this Decimal minus x, + * rounded to precision significant digits using rounding mode rounding. + * + * @alias minus + */ + sub(x: I.Decimal.Value): Decimal; + + /** + * Returns a new Decimal whose value is the value of this Decimal modulo x, + * rounded to precision significant digits using rounding mode rounding. + * + * The value returned, and in particular its sign, is dependent on the value of the modulo property of this Decimal's constructor. + * If it is 1 (default value), the result will have the same sign as this Decimal, + * and it will match that of Javascript's % operator (within the limits of double precision) and BigDecimal's remainder method. + * + * @alias mod + */ + modulo(x: I.Decimal.Value): Decimal; + + /** + * Returns a new Decimal whose value is the value of this Decimal modulo x, + * rounded to precision significant digits using rounding mode rounding. + * + * The value returned, and in particular its sign, is dependent on the value of the modulo property of this Decimal's constructor. + * If it is 1 (default value), the result will have the same sign as this Decimal, + * and it will match that of Javascript's % operator (within the limits of double precision) and BigDecimal's remainder method. + * + * @alias modulo + */ + mod(x: I.Decimal.Value): Decimal; + + /** + * Returns a new Decimal whose value is the base e (Euler's number, the base of the natural logarithm) exponential of the value of this Decimal, + * rounded to precision significant digits using rounding mode rounding. + * + * @alias exp + */ + naturalExponential(): Decimal; + + /** + * Returns a new Decimal whose value is the base e (Euler's number, the base of the natural logarithm) exponential of the value of this Decimal, + * rounded to precision significant digits using rounding mode rounding. + * + * @alias naturalExponential + */ + exp(): Decimal; + + /** + * Returns a new Decimal whose value is the natural logarithm of the value of this Decimal, + * rounded to precision significant digits using rounding mode rounding. + * + * @alias ln + */ + naturalLogarithm(): Decimal; + + /** + * Returns a new Decimal whose value is the natural logarithm of the value of this Decimal, + * rounded to precision significant digits using rounding mode rounding. + * + * @alias naturalLogarithm + */ + ln(): Decimal; + + /** + * Returns a new Decimal whose value is the value of this Decimal negated, i.e. multiplied by -1. + * + * @alias neg + */ + negated(): Decimal; + + /** + * Returns a new Decimal whose value is the value of this Decimal negated, i.e. multiplied by -1. + * + * @alias negated + */ + neg(): Decimal; + + /** + * Returns a new Decimal whose value is the value of this Decimal plus x, + * rounded to precision significant digits using rounding mode rounding. + * + * @alias add + */ + plus(x: I.Decimal.Value): Decimal; + + /** + * Returns a new Decimal whose value is the value of this Decimal plus x, + * rounded to precision significant digits using rounding mode rounding. + * + * @alias plus + */ + add(x: I.Decimal.Value): Decimal; + + /** + * Returns the number of significant digits of the value of this Decimal. + * + * @param includeZeros If it is true or 1 then any trailing zeros of the integer part of a number are counted as significant digits, + * otherwise they are not. + * @alias sd + */ + precision(includeZeros?: boolean): number; + + /** + * Returns the number of significant digits of the value of this Decimal. + * + * @param includeZeros If it is true or 1 then any trailing zeros of the integer part of a number are counted as significant digits, + * otherwise they are not. + * @alias precision + */ + sd(includeZeros?: boolean): number; + + /** + * Returns a new Decimal whose value is the value of this Decimal rounded to a whole number using rounding mode rounding. + */ + round(): Decimal; + + /** + * Returns a new Decimal whose value is the sine of the value in radians of this Decimal, + * rounded to precision significant digits using rounding mode rounding. + * + * @alias sin + */ + sine(): Decimal; + + /** + * Returns a new Decimal whose value is the sine of the value in radians of this Decimal, + * rounded to precision significant digits using rounding mode rounding. + * + * @alias sine + */ + sin(): Decimal; + + /** + * Returns a new Decimal whose value is the square root of this Decimal, + * rounded to precision significant digits using rounding mode rounding. + * + * The return value will be correctly rounded, + * i.e. rounded as if the result was first calculated to an infinite number of correct digits before rounding. + * + * @alias sqrt + */ + squareRoot(): Decimal; + + /** + * Returns a new Decimal whose value is the square root of this Decimal, + * rounded to precision significant digits using rounding mode rounding. + * + * The return value will be correctly rounded, + * i.e. rounded as if the result was first calculated to an infinite number of correct digits before rounding. + * + * @alias squareRoot + */ + sqrt(): Decimal; + + /** + * Returns a new Decimal whose value is the tangent of the value in radians of this Decimal, + * rounded to precision significant digits using rounding mode rounding. + * + * @alias tan + */ + tangent(): Decimal; + + /** + * Returns a new Decimal whose value is the tangent of the value in radians of this Decimal, + * rounded to precision significant digits using rounding mode rounding. + * + * @alias tangent + */ + tan(): Decimal; + + /** + * Returns a new Decimal whose value is the value of this Decimal times x, + * rounded to precision significant digits using rounding mode rounding. + * + * @alias mul + */ + times(x: I.Decimal.Value): Decimal; + + /** + * Returns a new Decimal whose value is the value of this Decimal times x, + * rounded to precision significant digits using rounding mode rounding. + * + * @alias times + */ + mul(x: I.Decimal.Value): Decimal; + + /** + * Returns a string representing the value of this Decimal in binary, rounded to sd significant digits using rounding mode rm. + */ + toBinary(significantDigits?: number): string; + + /** + * Returns a string representing the value of this Decimal in binary, rounded to sd significant digits using rounding mode rm. + */ + toBinary(significantDigits: number, rounding: I.Decimal.Rounding): string; + + /** + * Returns a new Decimal whose value is the value of this Decimal rounded to dp decimal places using rounding mode rm. + * + * @alias toDP + */ + toDecimalPlaces(decimalPlaces?: number): Decimal; + + /** + * Returns a new Decimal whose value is the value of this Decimal rounded to dp decimal places using rounding mode rm. + * + * @alias toDP + */ + toDecimalPlaces(decimalPlaces: number, rounding: I.Decimal.Rounding): Decimal; + + /** + * Returns a new Decimal whose value is the value of this Decimal rounded to dp decimal places using rounding mode rm. + * + * @alias toDecimalPlaces + */ + toDP(decimalPlaces?: number): Decimal; + + /** + * Returns a new Decimal whose value is the value of this Decimal rounded to dp decimal places using rounding mode rm. + * + * @alias toDecimalPlaces + */ + toDP(decimalPlaces: number, rounding: I.Decimal.Rounding): Decimal; + + /** + * Returns a string representing the value of this Decimal in exponential notation rounded using rounding mode rm to dp decimal places, + * i.e with one digit before the decimal point and dp digits after it. + * + * If the value of this Decimal in exponential notation has fewer than dp fraction digits, + * the return value will be appended with zeros accordingly. + */ + toExponential(decimalPlaces?: number): string; + + /** + * Returns a string representing the value of this Decimal in exponential notation rounded using rounding mode rm to dp decimal places, + * i.e with one digit before the decimal point and dp digits after it. + * + * If the value of this Decimal in exponential notation has fewer than dp fraction digits, + * the return value will be appended with zeros accordingly. + */ + toExponential(decimalPlaces: number, rounding: I.Decimal.Rounding): string; + + /** + * Returns a string representing the value of this Decimal in normal (fixed-point) notation rounded to dp decimal places using rounding mode rm. + * + * If the value of this Decimal in normal notation has fewer than dp fraction digits, the return value will be appended with zeros accordingly. + * + * Unlike Number.prototype.toFixed, which returns exponential notation if a number is greater or equal to 1021, this method will always return normal notation. + */ + toFixed(decimalPlaces?: number): string; + + /** + * Returns a string representing the value of this Decimal in normal (fixed-point) notation rounded to dp decimal places using rounding mode rm. + * + * If the value of this Decimal in normal notation has fewer than dp fraction digits, the return value will be appended with zeros accordingly. + * + * Unlike Number.prototype.toFixed, which returns exponential notation if a number is greater or equal to 1021, this method will always return normal notation. + */ + toFixed(decimalPlaces: number, rounding: I.Decimal.Rounding): string; + + /** + * Returns an array of two Decimals representing the value of this Decimal as a simple fraction with an integer numerator and an integer denominator. + * The denominator will be a positive non-zero value less than or equal to maxDenominator. + * + * If a maximum denominator is omitted, the denominator will be the lowest value necessary to represent the number exactly. + */ + toFraction(maxDenominator?: I.Decimal.Value): Decimal[]; + + /** + * Returns a string representing the value of this Decimal in hexadecimal, rounded to sd significant digits using rounding mode rm. + * + * @alias toHex + */ + toHexadecimal(significantDigits?: number): string; + + /** + * Returns a string representing the value of this Decimal in hexadecimal, rounded to sd significant digits using rounding mode rm. + * + * @alias toHex + */ + toHexadecimal(significantDigits: number, rounding: I.Decimal.Rounding): string; + + /** + * Returns a string representing the value of this Decimal in hexadecimal, rounded to sd significant digits using rounding mode rm. + * + * @alias toHexadecimal + */ + toHex(significantDigits?: number): string; + + /** + * Returns a string representing the value of this Decimal in hexadecimal, rounded to sd significant digits using rounding mode rm. + * + * @alias toHexadecimal + */ + toHex(significantDigits: number, rounding?: I.Decimal.Rounding): string; + + /** + * Same as valueOf + */ + toJSON(): string; + + /** + * Returns a new Decimal whose value is the nearest multiple of x in the direction of rounding mode rm, or rounding if rm is omitted, + * to the value of this Decimal. + * + * The return value will always have the same sign as this Decimal, unless either this Decimal or x is NaN, + * in which case the return value will be also be NaN. + */ + toNearest(x?: I.Decimal.Value, rounding?: I.Decimal.Rounding): Decimal; + + /** + * Returns the value of this Decimal converted to a primitive number. + * + * Type coercion with, for example, JavaScript's unary plus operator will also work, + * except that a Decimal with the value minus zero will convert to positive zero. + */ + toNumber(): number; + + /** + * Returns a string representing the value of this Decimal in octal, rounded to sd significant digits using rounding mode rm. + */ + toOctal(significantDigits?: number): string; + + /** + * Returns a string representing the value of this Decimal in octal, rounded to sd significant digits using rounding mode rm. + */ + toOctal(significantDigits: number, rounding: I.Decimal.Rounding): string; + + /** + * Returns a new Decimal whose value is the value of this Decimal raised to the power x, + * rounded to precision significant digits using rounding mode rounding. + * + * The return value will almost always be correctly rounded, + * i.e. rounded as if the result was first calculated to an infinite number of correct digits before rounding. + * If a result is incorrectly rounded the maximum error will be 1 ulp (unit in the last place). + * + * @alias pow + */ + toPower(x: I.Decimal.Value): Decimal; + + /** + * Returns a new Decimal whose value is the value of this Decimal raised to the power x, + * rounded to precision significant digits using rounding mode rounding. + * + * The return value will almost always be correctly rounded, + * i.e. rounded as if the result was first calculated to an infinite number of correct digits before rounding. + * If a result is incorrectly rounded the maximum error will be 1 ulp (unit in the last place). + * + * @alias toPower + */ + pow(x: I.Decimal.Value): Decimal; + + /** + * Returns a string representing the value of this Decimal rounded to sd significant digits using rounding mode rm. + */ + toPrecision(significantDigits?: number): string; + + /** + * Returns a string representing the value of this Decimal rounded to sd significant digits using rounding mode rm. + */ + toPrecision(significantDigits: number, rounding: I.Decimal.Rounding): string; + + /** + * Returns a new Decimal whose value is the value of this Decimal rounded to sd significant digits using rounding mode rm. + * + * @alias toSD + */ + toSignificantDigits(significantDigits?: number): Decimal; + + /** + * Returns a new Decimal whose value is the value of this Decimal rounded to sd significant digits using rounding mode rm. + * + * @alias toSD + */ + toSignificantDigits(significantDigits: number, rounding: I.Decimal.Rounding): Decimal; + + /** + * Returns a new Decimal whose value is the value of this Decimal rounded to sd significant digits using rounding mode rm. + * + * @alias toSignificantDigits + */ + toSD(significantDigits?: number): Decimal; + + /** + * Returns a new Decimal whose value is the value of this Decimal rounded to sd significant digits using rounding mode rm. + * + * @alias toSignificantDigits + */ + toSD(significantDigits: number, rounding: I.Decimal.Rounding): Decimal; + + /** + * Returns a string representing the value of this Decimal. + * + * If this Decimal has a positive exponent that is equal to or greater than toExpPos, + * or a negative exponent equal to or less than toExpNeg, then exponential notation will be returned. + */ + toString(): string; + + /** + * Returns a new Decimal whose value is the value of this Decimal truncated to a whole number. + * + * @alias trunc + */ + truncated(): Decimal; + + /** + * Returns a new Decimal whose value is the value of this Decimal truncated to a whole number. + * + * @alias truncated + */ + trunc(): Decimal; + + /** + * As toString, but zero is signed. + */ + valueOf(): string; + + /** + * Returns a new Decimal whose value is the absolute value of x + */ + static abs(x: I.Decimal.Value): Decimal; + + /** + * Returns a new Decimal whose value is the inverse cosine in radians of x, rounded to precision significant digits using rounding mode rounding. + */ + static acos(x: I.Decimal.Value): Decimal; + + /** + * Returns a new Decimal whose value is the inverse cosine in radians of x, rounded to precision significant digits using rounding mode rounding. + */ + static acosh(x: I.Decimal.Value): Decimal; + + /** + * Returns a new Decimal whose value is the value of x + y, rounded to precision significant digits using rounding mode rounding. + */ + static add(x: I.Decimal.Value, y: I.Decimal.Value): Decimal; + + /** + * Returns a new Decimal whose value is the inverse sine in radians of x, rounded to precision significant digits using rounding mode rounding. + */ + static asin(x: I.Decimal.Value): Decimal; + + /** + * Returns a new Decimal whose value is the inverse hyperbolic sine in radians of x, rounded to precision significant digits using rounding mode rounding. + */ + static asinh(x: I.Decimal.Value): Decimal; + + /** + * Returns a new Decimal whose value is the inverse tangent in radians of x, rounded to precision significant digits using rounding mode rounding. + */ + static atan(x: I.Decimal.Value): Decimal; + + /** + * Returns a new Decimal whose value is the inverse hyperbolic tangent in radians of x, rounded to precision significant digits using rounding mode rounding. + */ + static atanh(x: I.Decimal.Value): Decimal; + + /** + * Returns a new Decimal whose value is the inverse tangent in radians of the quotient of y and x, rounded to precision significant digits using rounding mode rounding. + * + * The signs of y and x are used to determine the quadrant of the result. + */ + static atan2(y: I.Decimal.Value, x: I.Decimal.Value): Decimal; + + /** + * Returns a new Decimal whose value is the cube root of x, rounded to precision significant digits using rounding mode rounding. + */ + static cbrt(x: I.Decimal.Value): Decimal; + + /** + * Returns a new Decimal whose value is the value of x rounded to a whole number in the direction of positive Infinity. + */ + static ceil(x: I.Decimal.Value): Decimal; + + /** + * Returns a new independent Decimal constructor with configuration settings as described by object, or with the same settings as this Decimal constructor if object is omitted. + * + * @alias config + */ + static clone(object?: I.Decimal.Config): I.Decimal.Constructor; + + /** + * Configures the 'global' settings for this particular Decimal constructor, i.e. the settings which apply to operations performed on the Decimal instances created by it. + * + * @alias set + */ + static config(object: I.Decimal.Config): I.Decimal.Constructor; + + /** + * Configures the 'global' settings for this particular Decimal constructor, i.e. the settings which apply to operations performed on the Decimal instances created by it. + * + * @alias config + */ + static set(object: I.Decimal.Config): I.Decimal.Constructor; + + /** + * Returns a new Decimal whose value is the cosine of the value in radians of x, rounded to precision significant digits using rounding mode rounding. + */ + static cos(x: I.Decimal.Value): Decimal; + + /** + * Returns a new Decimal whose value is the inverse hyperbolic cosine in radians of x, rounded to precision significant digits using rounding mode rounding. + */ + static cosh(x: I.Decimal.Value): Decimal; + + /** + * Returns a new Decimal whose value is the value of x divided by x, rounded to precision significant digits using rounding mode rounding. + */ + static div(x: I.Decimal.Value, y: I.Decimal.Value): Decimal; + + /** + * Returns a new Decimal whose value is the base e (Euler's number, the base of the natural logarithm) exponential of x, rounded to precision significant digits using rounding mode rounding. + */ + static exp(x: I.Decimal.Value): Decimal; + + /** + * Returns a new Decimal whose value is the value of x rounded to a whole number in the direction of negative Infinity. + */ + static floor(x: I.Decimal.Value): Decimal; + + /** + * Returns a new Decimal whose value is the square root of the sum of the squares of the arguments, rounded to precision significant digits using rounding mode rounding. + */ + static hypot(...x: I.Decimal.Value[]): Decimal; + + /** + * Returns true if object is a Decimal instance (where Decimal is any Decimal constructor), or false if it is not. + */ + static isDecimal(object: any): boolean; + + /** + * Returns a new Decimal whose value is the natural logarithm of x, rounded to precision significant digits using rounding mode rounding. + */ + static ln(x: I.Decimal.Value): Decimal; + + /** + * Returns a new Decimal whose value is the base x logarithm of x, rounded to precision significant digits using rounding mode rounding. + * + * @param base logarithm base, default is 10 + */ + static log(x: I.Decimal.Value, base?: I.Decimal.Value): Decimal; + + /** + * Returns a new Decimal whose value is the base 2 logarithm of x, rounded to precision significant digits using rounding mode rounding. + */ + static log2(x: I.Decimal.Value): Decimal; + + /** + * Returns a new Decimal whose value is the base 10 logarithm of x, rounded to precision significant digits using rounding mode rounding. + */ + static log10(x: I.Decimal.Value): Decimal; + + /** + * Returns a new Decimal whose value is the maximum of the arguments. + */ + static max(...x: I.Decimal.Value[]): Decimal; + + /** + * Returns a new Decimal whose value is the minimum of the arguments. + */ + static min(...x: I.Decimal.Value[]): Decimal; + + /** + * Returns a new Decimal whose value is x modulo y, rounded to precision significant digits using rounding mode rounding. + */ + static mod(x: I.Decimal.Value, y: I.Decimal.Value): Decimal; + + /** + * Returns a new Decimal whose value is x times y, rounded to precision significant digits using rounding mode rounding. + */ + static mul(x: I.Decimal.Value, y: I.Decimal.Value): Decimal; + + /** + * Returns a new Decimal whose value is base raised to the power exponent, rounded to precision significant digits using rounding mode rounding. + */ + static pow(base: I.Decimal.Value, exponent: I.Decimal.Value): Decimal; + + /** + * Returns a new Decimal with a pseudo-random value equal to or greater than 0 and less than 1. + * + * The return value will have dp decimal places (or less if trailing zeros are produced). If dp is omitted then the number of decimal places will default to the current precision setting. + */ + static random(significantDigits?: number): Decimal; + + /** + * Returns a new Decimal whose value is x rounded to a whole number using rounding mode rounding. + */ + static round(x: I.Decimal.Value): Decimal; + + /** + * 1 if the value of x is non-zero and its sign is positive + * + * -1 if the value of x is non-zero and its sign is negative + * + * 0 if the value of x is positive zero + * + * -0 if the value of x is negative zero + * + * NaN if the value of x is NaN + */ + static sign(x: I.Decimal.Value): Decimal; + + /** + * Returns a new Decimal whose value is the sine of the value in radians of x, rounded to precision significant digits using rounding mode rounding. + */ + static sin(x: I.Decimal.Value): Decimal; + + /** + * Returns a new Decimal whose value is the hyperbolic sine of the value in radians of x, rounded to precision significant digits using rounding mode rounding. + */ + static sinh(x: I.Decimal.Value): Decimal; + + /** + * Returns a new Decimal whose value is the square root of x, rounded to precision significant digits using rounding mode rounding. + */ + static sqrt(x: I.Decimal.Value): Decimal; + + /** + * Returns a new Decimal whose value is x minus y, rounded to precision significant digits using rounding mode rounding. + */ + static sub(x: I.Decimal.Value, y: I.Decimal.Value): Decimal; + + /** + * Returns a new Decimal whose value is the tangent of the value in radians of x, rounded to precision significant digits using rounding mode rounding. + */ + static tan(x: I.Decimal.Value): Decimal; + + /** + * Returns a new Decimal whose value is the hyperbolic tangent of the value in radians of x, rounded to precision significant digits using rounding mode rounding. + */ + static tanh(x: I.Decimal.Value): Decimal; + + /** + * Returns a new Decimal whose value is x truncated to a whole number. + */ + static trunc(x: I.Decimal.Value): Decimal; + + static readonly default?: I.Decimal.Constructor; + static readonly Decimal?: I.Decimal.Constructor; + + /** + * The maximum number of significant digits of the result of an operation. + */ + static readonly precision: number; + + /** + * The default rounding mode used when rounding the result of an operation to precision significant digits, and when rounding + * the return value of the round, toBinary, toDecimalPlaces, toExponential, toFixed, toHexadecimal, toNearest, toOctal, + * toPrecision and toSignificantDigits methods. + */ + static readonly rounding: I.Decimal.Rounding; + + /** + * The negative exponent value at and below which toString returns exponential notation. + * + * JavaScript numbers use exponential notation for negative exponents of -7 and below. + */ + static readonly toExpNeg: number; + + /** + * The positive exponent value at and above which toString returns exponential notation. + * + * JavaScript numbers use exponential notation for positive exponents of 20 and above. + */ + static readonly toExpPos: number; + + static readonly minE: number; + + static readonly maxE: number; + + static readonly crypto: boolean; + + /** + * The modulo mode used when calculating the modulus: a mod n. + * + * The quotient, q = a / n, is calculated according to the rounding mode that corresponds to the chosen modulo mode. + * + * The remainder, r, is calculated as: r = a - n * q. + */ + static readonly modulo: I.Decimal.Modulo; + + /** + * Rounds away from zero + */ + static readonly ROUND_UP: 0; + + /** + * Rounds towards zero + */ + static readonly ROUND_DOWN: 1; + + /** + * Rounds towards Infinity + */ + static readonly ROUND_CEIL: 2; + + /** + * Rounds towards -Infinity + */ + static readonly ROUND_FLOOR: 3; + + /** + * Rounds towards nearest neighbour. + * + * If equidistant, rounds away from zero + */ + static readonly ROUND_HALF_UP: 4; + + /** + * Rounds towards nearest neighbour. + * + * If equidistant, rounds towards zero + */ + static readonly ROUND_HALF_DOWN: 5; + + /** + * Rounds towards nearest neighbour. + * + * If equidistant, rounds towards even neighbour + */ + static readonly ROUND_HALF_EVEN: 6; + + /** + * Rounds towards nearest neighbour. + * + * If equidistant, rounds towards Infinity + */ + static readonly ROUND_HALF_CEIL: 7; + + /** + * Rounds towards nearest neighbour. + * + * If equidistant, rounds towards -Infinity + */ + static readonly ROUND_HALF_FLOOR: 8; + + /** + * Not a rounding mode + */ + static readonly EUCLID: 9; + } +} diff --git a/types/adone/glosses/math/index.d.ts b/types/adone/glosses/math/index.d.ts index 2713196e6e..5e6bbeea65 100644 --- a/types/adone/glosses/math/index.d.ts +++ b/types/adone/glosses/math/index.d.ts @@ -1,3 +1,7 @@ +/// +/// +/// +/// /// /// @@ -6,748 +10,6 @@ declare namespace adone { * math related things */ namespace math { - namespace I { - interface LowHighBits { - /** - * The low (signed) 32 bits of the long - */ - low: number; - /** - * The high (signed) 32 bits of the long - */ - high: number; - } - type Longable = Long | number | string | LowHighBits; - } - - /** - * Represents a 64 bit two's-complement integer - */ - class Long { - low: number; - high: number; - unsigned: boolean; - - /** - * @param low The low (signed) 32 bits of the long - * @param high The high (signed) 32 bits of the long - * @param unsigned Whether unsigned or not, defaults to false for signed - */ - constructor(low?: number, high?: number, unsigned?: boolean); - - /** - * Converts the Long to a 32 bit integer, assuming it is a 32 bit integer - */ - toInt(): number; - - /** - * Converts the Long to a the nearest floating-point representation of this value (double, 53 bit mantissa) - */ - toNumber(): number; - - /** - * Converts the Long to a string written in the specified radix - * - * @param radix Radix (2-36), 10 by default - */ - toString(radix?: number): string; - - inspect(): string; - - /** - * Gets the high 32 bits as a signed integer - */ - getHighBits(): number; - - /** - * Gets the high 32 bits as an unsigned integer - */ - getHighBitsUnsigned(): number; - - /** - * Gets the low 32 bits as a signed integer - */ - getLowBits(): number; - - /** - * Gets the low 32 bits as an unsigned integer - */ - getLowBitsUnsigned(): number; - - /** - * Gets the number of bits needed to represent the absolute value of this Long - */ - getNumBitsAbs(): number; - - /** - * Tests if this Long's value equals zero - */ - isZero(): boolean; - - /** - * Tests if this Long's value is negative - */ - isNegative(): boolean; - - /** - * Tests if this Long's value is positive - */ - isPositive(): boolean; - - /** - * Tests if this Long's value is odd - */ - isOdd(): boolean; - - /** - * Tests if this Long's value is even - */ - isEven(): boolean; - - /** - * Tests if this Long's value equals the specified's - */ - equals(other: I.Longable): boolean; - - /** - * Tests if this Long's value is less than the specified's - */ - lessThan(other: I.Longable): boolean; - - /** - * Tests if this Long's value is less than or equal the specified's - */ - lessThanOrEqual(other: I.Longable): boolean; - - /** - * Tests if this Long's value is greater than the specified's - */ - greaterThan(other: I.Longable): boolean; - - /** - * Tests if this Long's value is greater than or equal the specified's - */ - greaterThanOrEqual(other: I.Longable): boolean; - - /** - * Compares this Long's value with the specified's. - * Returns 0 if they are the same, 1 if the this is greater and -1 if the given one is greater - */ - compare(other: I.Longable): number; - - /** - * Negates this Long's value - */ - negate(): Long; - - /** - * Returns the sum of this and the specified Long - */ - add(addend: I.Longable): Long; - - /** - * Returns the difference of this and the specified Long - */ - sub(subtrahend: I.Longable): Long; - - /** - * Returns the product of this and the specified Long - */ - mul(multiplier: I.Longable): Long; - - /** - * Returns this Long divided by the specified - */ - div(divisor: I.Longable): Long; - - /** - * Returns this Long modulo the specified - */ - mod(divisor: I.Longable): Long; - - /** - * Returns the bitwise NOT of this Long - */ - not(): Long; - - /** - * Returns the bitwise AND of this Long and the specified - */ - and(other: I.Longable): Long; - - /** - * Returns the bitwise OR of this Long and the specifieds - */ - or(other: I.Longable): Long; - - /** - * Returns the bitwise XOR of this Long and the given one - */ - xor(other: I.Longable): Long; - - /** - * Returns this Long with bits shifted to the left by the given amount - */ - shl(numBits: number | Long): Long; - - /** - * Returns this Long with bits arithmetically shifted to the right by the given amount - */ - shr(numBits: number | Long): Long; - - /** - * Returns this Long with bits logically shifted to the right by the given amount - */ - shru(numBits: number | Long): Long; - - /** - * Converts this Long to signed - */ - toSigned(): Long; - - /** - * Converts this Long to unsigned - */ - toUnsigned(): Long; - - /** - * Converts this Long to an array of bytes, big-endian by default - * - * @param le Whether to return an array in little-endian format - */ - toBytes(le?: boolean): number[]; - - /** - * Converts this Long to an array of bytes in little-endian format - */ - toBytesLE(): number[]; - - /** - * Converts this Long to an array of bytes in big-endian format - */ - toBytesBE(): number[]; - - /** - * Returns a Long representing the given 32 bit integer value - */ - static fromInt(value: number, unsigned?: boolean): Long; - - /** - * Returns a Long representing the given value, provided that it is a finite number. Otherwise, zero is returned - */ - static fromNumber(value?: number, unsigned?: boolean): Long; - - /** - * Returns a Long representing the 64 bit integer that comes by concatenating the given low and high bits. Each is assumed to use 32 bits - */ - static fromBits(lowBits: number, highBits: number, unsigned?: boolean): Long; - - /** - * Returns a Long representation of the given string, written using the specified radix - */ - static fromString(str: string, unsigned?: boolean, radix?: number): Long; - - /** - * Returns a Long representation of the given string, written using the specified radix - */ - static fromString(str: string, radix?: number): Long; - - /** - * Converts the specified value to a Long - */ - static fromValue(val: I.Longable): Long; - - /** - * Minimum signed value - */ - static MIN_VALUE: Long; - - /** - * Maximum signed value - */ - static MAX_VALUE: Long; - - /** - * Maximum unsigned value - */ - static MAX_UNSIGNED_VALUE: Long; - - /** - * Signed zero - */ - static ZERO: Long; - - /** - * Unsigned zero - */ - static UZERO: Long; - - /** - * Signed one - */ - static ONE: Long; - - /** - * Unsigned one - */ - static UONE: Long; - - /** - * Signed negative one - */ - static NEG_ONE: Long; - } - - namespace I.BigNumber { - interface BufferConvertOptions { - endian?: 1 | -1 | "big" | "little"; - size?: "auto" | number; - } - } - - /** - * Represents a number of arbitrary precision - */ - class BigNumber { - /** - * Creates a BigNumber from the given value, the base is 10 - */ - constructor(n: number | string | BigNumber); - - /** - * Creates a BigNumber from the given string and base - */ - constructor(n: string, base: number); - - /** - * Converts the number to a string in the given base - */ - toString(base?: number): string; - - /** - * Converts the bignum into a Number. - * If the bignum is too big you'll lose precision or you'll get ±Infinity. - */ - toNumber(): number; - - /** - * Returns a new Buffer with the data from the bignum. - */ - toBuffer(opts?: I.BigNumber.BufferConvertOptions): Buffer; - - /** - * Returns a new bignum containing the instance value plus n - */ - add(n: number | string | BigNumber): BigNumber; - - /** - * Return a new bignum containing the instance value minus n - */ - sub(n: number | string | BigNumber): BigNumber; - - /** - * Returns a new bignum containing the instance value multiplied by n - */ - mul(n: number | string | BigNumber): BigNumber; - - /** - * Returns a new bignum containing the instance value integrally divided by n - */ - div(n: number | string | BigNumber): BigNumber; - - /** - * Returns a new bignum with the absolute value of the instance - */ - abs(): BigNumber; - - /** - * Returns a new bignum with the negative of the instance value - */ - neg(): BigNumber; - - /** - * Compares the instance value to n. - * - * Returns a positive integer if > n, a negative integer if < n, and 0 if == n - */ - cmp(n: number | string | BigNumber): number; - - /** - * Checks whether the instance value is greater than n (> n). - */ - gt(n: number | string | BigNumber): boolean; - - /** - * Checks whether the instance value is greater than or equal to n (>= n). - */ - ge(n: number | string | BigNumber): boolean; - - /** - * Checks whether the instance value is equal to n (== n). - */ - eq(n: number | string | BigNumber): boolean; - - /** - * Checks whether the instance value is less than n (< n). - */ - lt(n: number | string | BigNumber): boolean; - - /** - * Checks whether the instance value is less than or equal to n (<= n). - */ - le(n: number | string | BigNumber): boolean; - - /** - * Returns a new bignum with the instance value bitwise AND (&)-ed with n. - */ - and(n: number | string | BigNumber): BigNumber; - - /** - * Returns a new bignum with the instance value bitwise inclusive-OR (|)-ed with n. - */ - or(n: number | string | BigNumber): BigNumber; - - /** - * Returns a new bignum with the instance value bitwise exclusive-OR (^)-ed with n. - */ - xor(n: number | string | BigNumber): BigNumber; - - /** - * Returns a new bignum with the instance value modulo n. - */ - mod(n: number | string | BigNumber): BigNumber; - - /** - * Returns a new bignum with the instance value raised to the nth power. - */ - pow(n: number | string | BigNumber): BigNumber; - - /** - * Returns a new bignum with the instance value raised to the nth power modulo m. - */ - powm(n: number | string | BigNumber, m: number | string | BigNumber): BigNumber; - - /** - * Computes the multiplicative inverse modulo m. - */ - invertm(m: number | string | BigNumber): BigNumber; - - /** - * Returns a random number from 0 to this -1 - */ - rand(): BigNumber; - - /** - * Returns a random number from this to upperBound - 1 - */ - rand(upperBound: number | string | BigNumber): BigNumber; - - /** - * Checks whether the bignum is: - * - * - certainly prime (true) - * - * - probably prime ('maybe') - * - * - certainly composite (false) - */ - probPrime(): boolean | "maybe"; - - /** - * Returns the next prime number after this bignum - */ - nextPrime(): BigNumber; - - /** - * Returns a new bignum that is the square root. This truncates. - */ - sqrt(): BigNumber; - - /** - * Returns a new bignum that is the nth root. This truncates. - */ - root(n: number | string | BigNumber): BigNumber; - - /** - * Returns a new bignum that is the 2^n multiple. Equivalent of the << operator. - */ - shiftLeft(n: number | string | BigNumber): BigNumber; - - /** - * Returns a new bignum of the value integer divided by 2^n. Equivalent of the >> operator. - */ - shiftRight(n: number | string | BigNumber): BigNumber; - - /** - * Returns the greatest common divisor of the current bignum with n as a new bignum. - */ - gcd(n: number | string | BigNumber): BigNumber; - - /** - * Returns 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 - */ - jacobi(n: number | string | BigNumber): number; - - /** - * Returns the number of bits used to represent the current bignum - */ - bitLength(): number; - - /** - * Checks whether the bit at the given index is set - */ - isBitSet(n: number): boolean; - - /** - * Generates a probable prime number of length bits. - * - * @param bits the number of bits - * @param safe If true, it will be a "safe" prime of the form p=2p'+1 where p' is also prime. Default: true - */ - static prime(bits: number, safe?: boolean): BigNumber; - - /** - * Creates a new bignum from a Buffer. - */ - static fromBuffer(buf: Buffer, opts?: I.BigNumber.BufferConvertOptions): BigNumber; - - /** - * One - */ - static ONE: BigNumber; - - /** - * Zero - */ - static ZERO: BigNumber; - } - - /** - * Represents a set of bits - */ - class BitSet { - /** - * Creates a new bitset of n bits - */ - constructor(n: number); - - /** - * Creates a new bitset from a dehydrated bitset - */ - constructor(key: string); - - /** - * Checks whether a bit at a specific index is set - */ - get(idx: number): boolean; - - /** - * Sets a single bit. - * Returns true if set was successfull - */ - set(idx: number): boolean; - - /** - * Sets a range of bits. - * Returns true if set was successfull - */ - setRange(from: number, to: number): boolean; - - /** - * Unsets a single bit. - * Returns true if unset was successfull - */ - unset(idx: number): boolean; - - /** - * Unsets a range of bits. - * Returns true if unset was successfull - */ - unsetRange(from: number, to: number): boolean; - - /** - * Toggles a single bit - */ - toggle(idx: number): boolean; - - /** - * Toggles a range of bits - */ - toggleRange(from: number, to: number): boolean; - - /** - * Clears the entire bitset - */ - clear(): boolean; - - /** - * Clones the set - */ - clone(): BitSet; - - /** - * Turns the bitset into a comma separated string that skips leading & trailing 0 words. - * Ends with the number of leading 0s and MAX_BIT. - * Useful if you need the bitset to be an object key (eg dynamic programming). - * Can rehydrate by passing the result into the constructor - */ - dehydrate(): string; - - /** - * Performs a bitwise AND on 2 bitsets or 1 bitset and 1 index. - * Both bitsets must have the same number of words, no length check is performed to prevent and overflow. - */ - and(value: number | BitSet): BitSet; - - /** - * Performs a bitwise OR on 2 bitsets or 1 bitset and 1 index. - * Both bitsets must have the same number of words, no length check is performed to prevent and overflow. - */ - or(value: number | BitSet): BitSet; - - /** - * Performs a bitwise XOR on 2 bitsets or 1 bitset and 1 index. - * Both bitsets must have the same number of words, no length check is performed to prevent and overflow. - */ - xor(value: number | BitSet): BitSet; - - /** - * Runs a custom function on every set bit. - * Faster than iterating over the entire bitset with a get(). - * If the callback returns `false` it stops iterating. - */ - forEach(callback: ((idx: number) => void | boolean)): void; - - /** - * Performs a circular shift bitset by an offset - * - * @param n number of positions that the bitset that will be shifted to the right. Using a negative number will result in a left shift. - */ - circularShift(n: number): BitSet; - - /** - * Gets the cardinality (count of set bits) for the entire bitset - */ - getCardinality(): number; - - /** - * Gets the indices of all set bits - */ - getIndices(): number[]; - - /** - * Checks if one bitset is subset of another. - */ - isSubsetOf(other: BitSet): boolean; - - /** - * Quickly determines if a bitset is empty - */ - isEmpty(): boolean; - - /** - * Quickly determines if both bitsets are equal (faster than checking if the XOR of the two is === 0). - * Both bitsets must have the same number of words, no length check is performed to prevent and overflow. - */ - isEqual(other: BitSet): boolean; - - /** - * Gets a string representation of the entire bitset, including leading 0s - */ - toString(): string; - - /** - * Finds first set bit (useful for processing queues, breadth-first tree searches, etc.). - * Returns -1 if not found - * - * @param startWord the word to start with (only used internally by nextSetBit) - */ - ffs(startWord?: number): number; - - /** - * Finds first zero (unset bit). - * Returns -1 if not found - * - * @param startWord the word to start with (only used internally by nextUnsetBit) - */ - ffz(startWord?: number): number; - - /** - * Finds last set bit. - * Returns -1 if not found - * - * @param startWord the word to start with (only used internally by previousSetBit) - */ - fls(startWord?: number): number; - - /** - * Finds last zero (unset bit). - * Returns -1 if not found - * - * @param startWord the word to start with (only used internally by previousUnsetBit) - */ - flz(startWord?: number): number; - - /** - * Finds first set bit, starting at a given index. - * Return -1 if not found - * - * @param idx the starting index for the next set bit - */ - nextSetBit(idx: number): number; - - /** - * Finds first unset bit, starting at a given index. - * Return -1 if not found - * - * @param idx the starting index for the next unset bit - */ - nextUnsetBit(idx: number): number; - - /** - * Finds last set bit, up to a given index. - * Returns -1 if not found - * - * @param idx the starting index for the next unset bit (going in reverse) - */ - previousSetBit(idx: number): number; - - /** - * Finds last unset bit, up to a given index. - * Returns -1 if not found - */ - previousUnsetBit(idx: number): number; - - /** - * Converts the bitset to a math.Long number - */ - toLong(): Long; - - /** - * Reads an unsigned integer of the given bits from the given offset - * - * @param bits number of bits, 1 by default - * @param offset offset, 0 by default - */ - readUInt(bits?: number, offset?: number): number; - - /** - * Writes the given unsigned integer - * - * @param val integer - * @param bits number of bits to write, 1 by default - * @param offset write offset, 0 by default - */ - writeUInt(val: number, bits?: number, offset?: number): void; - - /** - * Creates a new BitSet from the given math.Long number - */ - static fromLong(l: Long): BitSet; - } - /** * Returns a random number from min to max - 1 * @@ -755,5 +17,21 @@ declare namespace adone { * @param max upper bound, default is 0xFFFFFFFF */ function random(min?: number, max?: number): number; + + /** + * Returns the maximum value from the given array + * + * @param array array of values + * @param score function to calculate the element score value + */ + function max(array: T[], score?: (x: T) => any): T; + + /** + * Returns the minimum value from the given array + * + * @param array array of values + * @param score function to calculate the element score value + */ + function min(array: T[], score?: (x: T) => any): T; } } diff --git a/types/adone/glosses/math/long.d.ts b/types/adone/glosses/math/long.d.ts new file mode 100644 index 0000000000..a4a15e2be5 --- /dev/null +++ b/types/adone/glosses/math/long.d.ts @@ -0,0 +1,293 @@ +declare namespace adone.math { + namespace I { + interface LowHighBits { + /** + * The low (signed) 32 bits of the long + */ + low: number; + /** + * The high (signed) 32 bits of the long + */ + high: number; + } + type Longable = Long | number | string | LowHighBits; + } + + /** + * Represents a 64 bit two's-complement integer + */ + class Long { + low: number; + high: number; + unsigned: boolean; + + /** + * @param low The low (signed) 32 bits of the long + * @param high The high (signed) 32 bits of the long + * @param unsigned Whether unsigned or not, defaults to false for signed + */ + constructor(low?: number, high?: number, unsigned?: boolean); + + /** + * Converts the Long to a 32 bit integer, assuming it is a 32 bit integer + */ + toInt(): number; + + /** + * Converts the Long to a the nearest floating-point representation of this value (double, 53 bit mantissa) + */ + toNumber(): number; + + /** + * Converts the Long to a string written in the specified radix + * + * @param radix Radix (2-36), 10 by default + */ + toString(radix?: number): string; + + inspect(): string; + + /** + * Gets the high 32 bits as a signed integer + */ + getHighBits(): number; + + /** + * Gets the high 32 bits as an unsigned integer + */ + getHighBitsUnsigned(): number; + + /** + * Gets the low 32 bits as a signed integer + */ + getLowBits(): number; + + /** + * Gets the low 32 bits as an unsigned integer + */ + getLowBitsUnsigned(): number; + + /** + * Gets the number of bits needed to represent the absolute value of this Long + */ + getNumBitsAbs(): number; + + /** + * Tests if this Long's value equals zero + */ + isZero(): boolean; + + /** + * Tests if this Long's value is negative + */ + isNegative(): boolean; + + /** + * Tests if this Long's value is positive + */ + isPositive(): boolean; + + /** + * Tests if this Long's value is odd + */ + isOdd(): boolean; + + /** + * Tests if this Long's value is even + */ + isEven(): boolean; + + /** + * Tests if this Long's value equals the specified's + */ + equals(other: I.Longable): boolean; + + /** + * Tests if this Long's value is less than the specified's + */ + lessThan(other: I.Longable): boolean; + + /** + * Tests if this Long's value is less than or equal the specified's + */ + lessThanOrEqual(other: I.Longable): boolean; + + /** + * Tests if this Long's value is greater than the specified's + */ + greaterThan(other: I.Longable): boolean; + + /** + * Tests if this Long's value is greater than or equal the specified's + */ + greaterThanOrEqual(other: I.Longable): boolean; + + /** + * Compares this Long's value with the specified's. + * Returns 0 if they are the same, 1 if the this is greater and -1 if the given one is greater + */ + compare(other: I.Longable): number; + + /** + * Negates this Long's value + */ + negate(): Long; + + /** + * Returns the sum of this and the specified Long + */ + add(addend: I.Longable): Long; + + /** + * Returns the difference of this and the specified Long + */ + sub(subtrahend: I.Longable): Long; + + /** + * Returns the product of this and the specified Long + */ + mul(multiplier: I.Longable): Long; + + /** + * Returns this Long divided by the specified + */ + div(divisor: I.Longable): Long; + + /** + * Returns this Long modulo the specified + */ + mod(divisor: I.Longable): Long; + + /** + * Returns the bitwise NOT of this Long + */ + not(): Long; + + /** + * Returns the bitwise AND of this Long and the specified + */ + and(other: I.Longable): Long; + + /** + * Returns the bitwise OR of this Long and the specifieds + */ + or(other: I.Longable): Long; + + /** + * Returns the bitwise XOR of this Long and the given one + */ + xor(other: I.Longable): Long; + + /** + * Returns this Long with bits shifted to the left by the given amount + */ + shl(numBits: number | Long): Long; + + /** + * Returns this Long with bits arithmetically shifted to the right by the given amount + */ + shr(numBits: number | Long): Long; + + /** + * Returns this Long with bits logically shifted to the right by the given amount + */ + shru(numBits: number | Long): Long; + + /** + * Converts this Long to signed + */ + toSigned(): Long; + + /** + * Converts this Long to unsigned + */ + toUnsigned(): Long; + + /** + * Converts this Long to an array of bytes, big-endian by default + * + * @param le Whether to return an array in little-endian format + */ + toBytes(le?: boolean): number[]; + + /** + * Converts this Long to an array of bytes in little-endian format + */ + toBytesLE(): number[]; + + /** + * Converts this Long to an array of bytes in big-endian format + */ + toBytesBE(): number[]; + + /** + * Returns a Long representing the given 32 bit integer value + */ + static fromInt(value: number, unsigned?: boolean): Long; + + /** + * Returns a Long representing the given value, provided that it is a finite number. Otherwise, zero is returned + */ + static fromNumber(value?: number, unsigned?: boolean): Long; + + /** + * Returns a Long representing the 64 bit integer that comes by concatenating the given low and high bits. Each is assumed to use 32 bits + */ + static fromBits(lowBits: number, highBits: number, unsigned?: boolean): Long; + + /** + * Returns a Long representation of the given string, written using the specified radix + */ + static fromString(str: string, unsigned?: boolean, radix?: number): Long; + + /** + * Returns a Long representation of the given string, written using the specified radix + */ + static fromString(str: string, radix?: number): Long; + + /** + * Converts the specified value to a Long + */ + static fromValue(val: I.Longable): Long; + + /** + * Minimum signed value + */ + static MIN_VALUE: Long; + + /** + * Maximum signed value + */ + static MAX_VALUE: Long; + + /** + * Maximum unsigned value + */ + static MAX_UNSIGNED_VALUE: Long; + + /** + * Signed zero + */ + static ZERO: Long; + + /** + * Unsigned zero + */ + static UZERO: Long; + + /** + * Signed one + */ + static ONE: Long; + + /** + * Unsigned one + */ + static UONE: Long; + + /** + * Signed negative one + */ + static NEG_ONE: Long; + } +} diff --git a/types/adone/glosses/regex.d.ts b/types/adone/glosses/regex.d.ts index e5c3be642a..edd66d324f 100644 --- a/types/adone/glosses/regex.d.ts +++ b/types/adone/glosses/regex.d.ts @@ -2,9 +2,17 @@ declare namespace adone { namespace regex { function filename(): RegExp; - function ip4(): RegExp; + namespace I.IP { + interface Options { + exact?: boolean; + } + } - function ip6(): RegExp; + function ip(options?: I.IP.Options): RegExp; + + function ip4(options?: I.IP.Options): RegExp; + + function ip6(options?: I.IP.Options): RegExp; function protocol(): RegExp; diff --git a/types/adone/index.d.ts b/types/adone/index.d.ts index a74641c4df..c6add2eeea 100644 --- a/types/adone/index.d.ts +++ b/types/adone/index.d.ts @@ -5,7 +5,7 @@ // TypeScript Version: 2.4 /// -/// +/// /// /// /// diff --git a/types/adone/test/glosses/application.ts b/types/adone/test/glosses/app.ts similarity index 99% rename from types/adone/test/glosses/application.ts rename to types/adone/test/glosses/app.ts index 38c5b0c8ff..8d74c8093b 100644 --- a/types/adone/test/glosses/application.ts +++ b/types/adone/test/glosses/app.ts @@ -8,7 +8,7 @@ namespace applicationTests { Subsystem, runCli, Application - } = adone.application; + } = adone.app; namespace DApplicationTests { { diff --git a/types/adone/test/glosses/collections/byte_array.ts b/types/adone/test/glosses/collections/byte_array.ts index 7254008322..377acfba9c 100644 --- a/types/adone/test/glosses/collections/byte_array.ts +++ b/types/adone/test/glosses/collections/byte_array.ts @@ -56,6 +56,11 @@ namespace adoneTests.collection.ByteArray { const b: number = buffer.readUInt16BE(10); } + namespace readUInt24BE { + const a: number = buffer.readUInt24BE(); + const b: number = buffer.readUInt24BE(10); + } + namespace readInt32LE { const a: number = buffer.readInt32LE(); const b: number = buffer.readInt32LE(10); @@ -162,6 +167,11 @@ namespace adoneTests.collection.ByteArray { const b: adone.collection.ByteArray = buffer.writeUInt16BE(10, 10); } + namespace writeUInt24BE { + const a: adone.collection.ByteArray = buffer.writeUInt24BE(10); + const b: adone.collection.ByteArray = buffer.writeUInt24BE(10, 10); + } + namespace writeInt32LE { const a: adone.collection.ByteArray = buffer.writeInt32LE(10); const b: adone.collection.ByteArray = buffer.writeInt32LE(10, 10); diff --git a/types/adone/test/glosses/collections/fast_lru.ts b/types/adone/test/glosses/collections/fast_lru.ts index 0e61f51dc5..6df1164d53 100644 --- a/types/adone/test/glosses/collections/fast_lru.ts +++ b/types/adone/test/glosses/collections/fast_lru.ts @@ -6,8 +6,8 @@ namespace adoneTests.collection.FastLRU { } = adone; new FastLRU(); - new FastLRU(100); - new FastLRU(100, { dispose: (key: string, value: number) => null }); + new FastLRU({ maxSize: 100 }); + new FastLRU({ maxSize: 100, dispose: (key: string, value: number) => null }); { const a: number = new FastLRU().size; } { const a: number | undefined = new FastLRU().get("key"); } new FastLRU().set("key", 123); diff --git a/types/adone/test/glosses/collections/lru.ts b/types/adone/test/glosses/collections/lru.ts index 934e5a1fbf..59e7b77694 100644 --- a/types/adone/test/glosses/collections/lru.ts +++ b/types/adone/test/glosses/collections/lru.ts @@ -8,15 +8,14 @@ namespace adoneTests.collection.LRU { type LRU = adone.collection.LRU; new LRU(); - new LRU(100); + new LRU({ maxSize: 100 }); new LRU({}); - new LRU({ max: 100 }); new LRU({ dispose: (key: string, value: number) => null }); new LRU({ maxAge: 100 }); new LRU({ noDisposeOnSet: false }); new LRU({ stale: true }); - { const a: number = new LRU().max; } - { new LRU().max = 100; } + { const a: number = new LRU().maxSize; } + { new LRU().maxSize = 100; } { const a: boolean = new LRU().allowStale; } { new LRU().allowStale = false; } { const a: number = new LRU().maxAge; } diff --git a/types/adone/test/glosses/collections/time_map.ts b/types/adone/test/glosses/collections/time_map.ts new file mode 100644 index 0000000000..5cabcdac9d --- /dev/null +++ b/types/adone/test/glosses/collections/time_map.ts @@ -0,0 +1,22 @@ +namespace adoneTests.collection.TimedoutMap { + const { + collection: { + TimeMap + } + } = adone; + + type TimeMap = adone.collection.TimeMap; + + new TimeMap(); + new TimeMap(1000); + new TimeMap(1000, (key: string) => null); + { + const a: TimeMap = new TimeMap().forEach((value: number, key: string) => null); + } + { + const a: TimeMap = new TimeMap().forEach(function (value: number, key: string) { + const a: number = this.a; + }, { a: 1 }); + } + { const a: boolean = new TimeMap().delete("123"); } +} diff --git a/types/adone/test/glosses/collections/timedout_map.ts b/types/adone/test/glosses/collections/timedout_map.ts deleted file mode 100644 index ffca754e2a..0000000000 --- a/types/adone/test/glosses/collections/timedout_map.ts +++ /dev/null @@ -1,22 +0,0 @@ -namespace adoneTests.collection.TimedoutMap { - const { - collection: { - TimedoutMap - } - } = adone; - - type TimedoutMap = adone.collection.TimedoutMap; - - new TimedoutMap(); - new TimedoutMap(1000); - new TimedoutMap(1000, (key: string) => null); - { - const a: TimedoutMap = new TimedoutMap().forEach((value: number, key: string) => null); - } - { - const a: TimedoutMap = new TimedoutMap().forEach(function (value: number, key: string) { - const a: number = this.a; - }, { a: 1 }); - } - { const a: boolean = new TimedoutMap().delete("123"); } -} diff --git a/types/adone/test/glosses/is.ts b/types/adone/test/glosses/is.ts index 455dd745da..96c954d284 100644 --- a/types/adone/test/glosses/is.ts +++ b/types/adone/test/glosses/is.ts @@ -345,7 +345,11 @@ namespace isTests { { const a: boolean = is.binaryExtension("mp3"); } { const a: boolean = is.binaryPath("a.mp3"); } { const a: boolean = is.ip4("192.168.1.1"); } + { const a: boolean = is.ip4("192.168.1.1", { exact: true }); } { const a: boolean = is.ip6("::192.168.1.1"); } + { const a: boolean = is.ip6("::192.168.1.1", { exact: true }); } + { const a: boolean = is.ip("::192.168.1.1"); } + { const a: boolean = is.ip("::192.168.1.1", { exact: true }); } { const a: boolean = is.arrayBuffer({}); const b: any = 2; @@ -492,4 +496,7 @@ namespace isTests { b.charCodeAt(0); } } + { + const a: boolean = is.multiAddress(2); + } } diff --git a/types/adone/test/glosses/math/bignumber.ts b/types/adone/test/glosses/math/bignumber.ts new file mode 100644 index 0000000000..8466abae7f --- /dev/null +++ b/types/adone/test/glosses/math/bignumber.ts @@ -0,0 +1,154 @@ +namespace mathTests.bignumberTests { + const { + math: { + BigNumber + } + } = adone; + + type BigNumber = adone.math.BigNumber; + + new BigNumber(10); + new BigNumber("10"); + new BigNumber(new BigNumber(10)); + new BigNumber("10", 2); + + { const a: string = new BigNumber(1).toString(); } + { const a: string = new BigNumber(1).toString(2); } + + { const a: number = new BigNumber(1).toNumber(); } + + { const a: Buffer = new BigNumber(1).toBuffer(); } + { const a: Buffer = new BigNumber(1).toBuffer({}); } + { const a: Buffer = new BigNumber(1).toBuffer({ endian: 1 }); } + { const a: Buffer = new BigNumber(1).toBuffer({ endian: -1 }); } + { const a: Buffer = new BigNumber(1).toBuffer({ endian: "big" }); } + { const a: Buffer = new BigNumber(1).toBuffer({ endian: "little" }); } + { const a: Buffer = new BigNumber(1).toBuffer({ size: 1 }); } + { const a: Buffer = new BigNumber(1).toBuffer({ size: "auto" }); } + + { const a: BigNumber = new BigNumber(10).add(1); } + { const a: BigNumber = new BigNumber(10).add("1"); } + { const a: BigNumber = new BigNumber(10).add(new BigNumber(1)); } + + { const a: BigNumber = new BigNumber(10).sub(1); } + { const a: BigNumber = new BigNumber(10).sub("1"); } + { const a: BigNumber = new BigNumber(10).sub(new BigNumber(1)); } + + { const a: BigNumber = new BigNumber(10).mul(1); } + { const a: BigNumber = new BigNumber(10).mul("1"); } + { const a: BigNumber = new BigNumber(10).mul(new BigNumber(1)); } + + { const a: BigNumber = new BigNumber(10).div(1); } + { const a: BigNumber = new BigNumber(10).div("1"); } + { const a: BigNumber = new BigNumber(10).div(new BigNumber(1)); } + + { const a: BigNumber = new BigNumber(10).abs(); } + + { const a: BigNumber = new BigNumber(10).neg(); } + + { const a: number = new BigNumber(10).cmp(1); } + { const a: number = new BigNumber(10).cmp("1"); } + { const a: number = new BigNumber(10).cmp(new BigNumber(1)); } + + { const a: boolean = new BigNumber(10).gt(1); } + { const a: boolean = new BigNumber(10).gt("1"); } + { const a: boolean = new BigNumber(10).gt(new BigNumber(10)); } + + { const a: boolean = new BigNumber(10).ge(1); } + { const a: boolean = new BigNumber(10).ge("1"); } + { const a: boolean = new BigNumber(10).ge(new BigNumber(10)); } + + { const a: boolean = new BigNumber(10).eq(1); } + { const a: boolean = new BigNumber(10).eq("1"); } + { const a: boolean = new BigNumber(10).eq(new BigNumber(10)); } + + { const a: boolean = new BigNumber(10).lt(1); } + { const a: boolean = new BigNumber(10).lt("1"); } + { const a: boolean = new BigNumber(10).lt(new BigNumber(10)); } + + { const a: boolean = new BigNumber(10).le(1); } + { const a: boolean = new BigNumber(10).le("1"); } + { const a: boolean = new BigNumber(10).le(new BigNumber(10)); } + + { const a: BigNumber = new BigNumber(10).and(1); } + { const a: BigNumber = new BigNumber(10).and("1"); } + { const a: BigNumber = new BigNumber(10).and(new BigNumber(1)); } + + { const a: BigNumber = new BigNumber(10).or(1); } + { const a: BigNumber = new BigNumber(10).or("1"); } + { const a: BigNumber = new BigNumber(10).or(new BigNumber(1)); } + + { const a: BigNumber = new BigNumber(10).xor(1); } + { const a: BigNumber = new BigNumber(10).xor("1"); } + { const a: BigNumber = new BigNumber(10).xor(new BigNumber(1)); } + + { const a: BigNumber = new BigNumber(10).mod(1); } + { const a: BigNumber = new BigNumber(10).mod("1"); } + { const a: BigNumber = new BigNumber(10).mod(new BigNumber(1)); } + + { const a: BigNumber = new BigNumber(10).pow(1); } + { const a: BigNumber = new BigNumber(10).pow("1"); } + { const a: BigNumber = new BigNumber(10).pow(new BigNumber(1)); } + + { const a: BigNumber = new BigNumber(10).powm(1, 1); } + { const a: BigNumber = new BigNumber(10).powm("1", 1); } + { const a: BigNumber = new BigNumber(10).powm(new BigNumber(1), 1); } + { const a: BigNumber = new BigNumber(10).powm(1, "1"); } + { const a: BigNumber = new BigNumber(10).powm("1", "1"); } + { const a: BigNumber = new BigNumber(10).powm(new BigNumber(1), "1"); } + { const a: BigNumber = new BigNumber(10).powm(1, new BigNumber(1)); } + { const a: BigNumber = new BigNumber(10).powm("1", new BigNumber(1)); } + { const a: BigNumber = new BigNumber(10).powm(new BigNumber(1), new BigNumber(1)); } + + { const a: BigNumber = new BigNumber(10).invertm(1); } + { const a: BigNumber = new BigNumber(10).invertm("1"); } + { const a: BigNumber = new BigNumber(10).invertm(new BigNumber(1)); } + + { const a: BigNumber = new BigNumber(10).rand(); } + { const a: BigNumber = new BigNumber(10).rand(1); } + { const a: BigNumber = new BigNumber(10).rand("1"); } + { const a: BigNumber = new BigNumber(10).rand(new BigNumber(1)); } + + { const a: boolean | "maybe" = new BigNumber(10).probPrime(); } + + { const a: BigNumber = new BigNumber(10).nextPrime(); } + + { const a: BigNumber = new BigNumber(10).sqrt(); } + + { const a: BigNumber = new BigNumber(10).root(1); } + { const a: BigNumber = new BigNumber(10).root("1"); } + { const a: BigNumber = new BigNumber(10).root(new BigNumber(1)); } + + { const a: BigNumber = new BigNumber(10).shiftLeft(1); } + { const a: BigNumber = new BigNumber(10).shiftLeft("1"); } + { const a: BigNumber = new BigNumber(10).shiftLeft(new BigNumber(1)); } + + { const a: BigNumber = new BigNumber(10).shiftRight(1); } + { const a: BigNumber = new BigNumber(10).shiftRight("1"); } + { const a: BigNumber = new BigNumber(10).shiftRight(new BigNumber(1)); } + + { const a: BigNumber = new BigNumber(10).gcd(1); } + { const a: BigNumber = new BigNumber(10).gcd("1"); } + { const a: BigNumber = new BigNumber(10).gcd(new BigNumber(1)); } + + { const a: number = new BigNumber(10).jacobi(1); } + { const a: number = new BigNumber(10).jacobi("1"); } + { const a: number = new BigNumber(10).jacobi(new BigNumber(1)); } + + { const a: number = new BigNumber(10).bitLength(); } + + { const a: boolean = new BigNumber(10).isBitSet(10); } + + { const a: BigNumber = BigNumber.prime(10); } + { const a: BigNumber = BigNumber.prime(10, true); } + + { const a: BigNumber = BigNumber.fromBuffer(Buffer.alloc(10)); } + { const a: BigNumber = BigNumber.fromBuffer(Buffer.alloc(10), { endian: "little" }); } + { const a: BigNumber = BigNumber.fromBuffer(Buffer.alloc(10), { endian: -1 }); } + { const a: BigNumber = BigNumber.fromBuffer(Buffer.alloc(10), { endian: 1 }); } + { const a: BigNumber = BigNumber.fromBuffer(Buffer.alloc(10), { endian: "big" }); } + { const a: BigNumber = BigNumber.fromBuffer(Buffer.alloc(10), { size: "auto" }); } + + { const a: BigNumber = BigNumber.ONE; } + { const a: BigNumber = BigNumber.ZERO; } +} diff --git a/types/adone/test/glosses/math/bitset.ts b/types/adone/test/glosses/math/bitset.ts new file mode 100644 index 0000000000..1e08d0649f --- /dev/null +++ b/types/adone/test/glosses/math/bitset.ts @@ -0,0 +1,62 @@ +namespace mathTests.bitsetTests { + const { + math: { + BitSet + } + } = adone; + + type BitSet = adone.math.BitSet; + + new BitSet(10); + new BitSet(new BitSet(10).dehydrate()); + + { const a: boolean = new BitSet(10).get(0); } + { const a: boolean = new BitSet(10).set(0); } + { const a: boolean = new BitSet(10).setRange(0, 10); } + { const a: boolean = new BitSet(10).unset(0); } + { const a: boolean = new BitSet(10).unsetRange(0, 10); } + { const a: boolean = new BitSet(10).toggle(0); } + { const a: boolean = new BitSet(10).toggleRange(0, 10); } + { const a: boolean = new BitSet(10).clear(); } + { const a: BitSet = new BitSet(10).clone(); } + { const a: string = new BitSet(10).dehydrate(); } + + { const a: BitSet = new BitSet(10).and(1); } + { const a: BitSet = new BitSet(10).and(new BitSet(10)); } + + { const a: BitSet = new BitSet(10).or(1); } + { const a: BitSet = new BitSet(10).or(new BitSet(10)); } + + { const a: BitSet = new BitSet(10).xor(1); } + { const a: BitSet = new BitSet(10).xor(new BitSet(10)); } + + new BitSet(10).forEach((x: number) => {}); + new BitSet(10).forEach((x: number) => false); + + { const a: BitSet = new BitSet(10).circularShift(10); } + { const a: number = new BitSet(10).getCardinality(); } + { const a: number[] = new BitSet(10).getIndices(); } + { const a: boolean = new BitSet(10).isSubsetOf(new BitSet(10)); } + { const a: boolean = new BitSet(10).isEmpty(); } + { const a: boolean = new BitSet(10).isEqual(new BitSet(10)); } + { const a: string = new BitSet(10).toString(); } + { const a: number = new BitSet(10).ffs(); } + { const a: number = new BitSet(10).ffs(1); } + { const a: number = new BitSet(10).ffz(); } + { const a: number = new BitSet(10).ffz(1); } + { const a: number = new BitSet(10).fls(); } + { const a: number = new BitSet(10).fls(1); } + { const a: number = new BitSet(10).flz(); } + { const a: number = new BitSet(10).flz(1); } + { const a: number = new BitSet(10).nextSetBit(1); } + { const a: number = new BitSet(10).nextUnsetBit(1); } + { const a: number = new BitSet(10).previousSetBit(1); } + { const a: number = new BitSet(10).previousUnsetBit(1); } + { const a: number = new BitSet(10).readUInt(); } + { const a: number = new BitSet(10).readUInt(1); } + { const a: number = new BitSet(10).readUInt(1, 2); } + { new BitSet(10).writeUInt(1); } + { new BitSet(10).writeUInt(1, 2); } + { new BitSet(10).writeUInt(1, 2, 3); } + { const a: BitSet = BitSet.fromLong(new adone.math.Long(10, 20)); } +} diff --git a/types/adone/test/glosses/math/decimal.ts b/types/adone/test/glosses/math/decimal.ts new file mode 100644 index 0000000000..7c5f450c35 --- /dev/null +++ b/types/adone/test/glosses/math/decimal.ts @@ -0,0 +1,445 @@ +namespace mathTests.decimalTest { + const { + math: { + Decimal + } + } = adone; + + type Decimal = adone.math.Decimal; + + new Decimal(0); + new Decimal("0"); + new Decimal(new Decimal(0)); + + new Decimal(0).e.toExponential(); + new Decimal(0).d[0].toExponential(); + new Decimal(0).s.toExponential(); + + const d = new Decimal(0); + + { const a: Decimal = d.abs(); } + { const a: Decimal = d.absoluteValue(); } + + { const a: Decimal = d.ceil(); } + + { const a: number = d.comparedTo(1); } + { const a: number = d.comparedTo("1"); } + { const a: number = d.comparedTo(d); } + { const a: number = d.cmp(1); } + { const a: number = d.cmp("1"); } + { const a: number = d.cmp(d); } + + { const a: Decimal = d.cos(); } + { const a: Decimal = d.cosine(); } + + { const a: Decimal = d.cubeRoot(); } + { const a: Decimal = d.cbrt(); } + + { const a: number = d.decimalPlaces(); } + { const a: number = d.dp(); } + + { const a: Decimal = d.dividedBy(1); } + { const a: Decimal = d.dividedBy("1"); } + { const a: Decimal = d.dividedBy(d); } + { const a: Decimal = d.div(1); } + { const a: Decimal = d.div("1"); } + { const a: Decimal = d.div(d); } + + { const a: Decimal = d.dividedToIntegerBy(1); } + { const a: Decimal = d.dividedToIntegerBy("1"); } + { const a: Decimal = d.dividedToIntegerBy(d); } + { const a: Decimal = d.divToInt(1); } + { const a: Decimal = d.divToInt("1"); } + { const a: Decimal = d.divToInt(d); } + + { const a: boolean = d.equals(1); } + { const a: boolean = d.equals("1"); } + { const a: boolean = d.equals(d); } + { const a: boolean = d.eq(1); } + { const a: boolean = d.eq("1"); } + { const a: boolean = d.eq(d); } + + { const a: Decimal = d.floor(); } + + { const a: boolean = d.greaterThan(1); } + { const a: boolean = d.greaterThan("1"); } + { const a: boolean = d.greaterThan(d); } + { const a: boolean = d.gt(1); } + { const a: boolean = d.gt("1"); } + { const a: boolean = d.gt(d); } + + { const a: boolean = d.greaterThanOrEqualTo(1); } + { const a: boolean = d.greaterThanOrEqualTo("1"); } + { const a: boolean = d.greaterThanOrEqualTo(d); } + { const a: boolean = d.gte(1); } + { const a: boolean = d.gte("1"); } + { const a: boolean = d.gte(d); } + + { const a: Decimal = d.hyperbolicCosine(); } + { const a: Decimal = d.cosh(); } + + { const a: Decimal = d.hyperbolicSine(); } + { const a: Decimal = d.sinh(); } + + { const a: Decimal = d.hyperbolicTangent(); } + { const a: Decimal = d.tanh(); } + + { const a: Decimal = d.inverseCosine(); } + { const a: Decimal = d.acos(); } + + { const a: Decimal = d.inverseHyperbolicCosine(); } + { const a: Decimal = d.acosh(); } + + { const a: Decimal = d.inverseHyperbolicSine(); } + { const a: Decimal = d.asinh(); } + + { const a: Decimal = d.inverseHyperbolicTangent(); } + { const a: Decimal = d.atanh(); } + + { const a: Decimal = d.inverseSine(); } + { const a: Decimal = d.asin(); } + + { const a: Decimal = d.inverseTangent(); } + { const a: Decimal = d.atan(); } + + { const a: boolean = d.isFinite(); } + + { const a: boolean = d.isInteger(); } + { const a: boolean = d.isInt(); } + + { const a: boolean = d.isNaN(); } + + { const a: boolean = d.isNegative(); } + { const a: boolean = d.isNeg(); } + + { const a: boolean = d.isPositive(); } + { const a: boolean = d.isPos(); } + + { const a: boolean = d.isZero(); } + + { const a: boolean = d.lessThan(1); } + { const a: boolean = d.lessThan("1"); } + { const a: boolean = d.lessThan(d); } + { const a: boolean = d.lt(1); } + { const a: boolean = d.lt("1"); } + { const a: boolean = d.lt(d); } + + { const a: boolean = d.lessThanOrEqualTo(1); } + { const a: boolean = d.lessThanOrEqualTo("1"); } + { const a: boolean = d.lessThanOrEqualTo(d); } + { const a: boolean = d.lte(1); } + { const a: boolean = d.lte("1"); } + { const a: boolean = d.lte(d); } + + { const a: Decimal = d.logarithm(); } + { const a: Decimal = d.logarithm(1); } + { const a: Decimal = d.logarithm("1"); } + { const a: Decimal = d.logarithm(d); } + { const a: Decimal = d.log(); } + { const a: Decimal = d.log(1); } + { const a: Decimal = d.log("1"); } + { const a: Decimal = d.log(d); } + + { const a: Decimal = d.minus(1); } + { const a: Decimal = d.minus("1"); } + { const a: Decimal = d.minus(d); } + { const a: Decimal = d.sub(1); } + { const a: Decimal = d.sub("1"); } + { const a: Decimal = d.sub(d); } + + { const a: Decimal = d.modulo(1); } + { const a: Decimal = d.modulo("1"); } + { const a: Decimal = d.modulo(d); } + { const a: Decimal = d.mod(1); } + { const a: Decimal = d.mod("1"); } + { const a: Decimal = d.mod(d); } + + { const a: Decimal = d.naturalExponential(); } + { const a: Decimal = d.exp(); } + + { const a: Decimal = d.naturalLogarithm(); } + { const a: Decimal = d.ln(); } + + { const a: Decimal = d.negated(); } + { const a: Decimal = d.neg(); } + + { const a: Decimal = d.plus(1); } + { const a: Decimal = d.plus("1"); } + { const a: Decimal = d.plus(d); } + { const a: Decimal = d.add(1); } + { const a: Decimal = d.add("1"); } + { const a: Decimal = d.add(d); } + + { const a: number = d.precision(); } + { const a: number = d.precision(true); } + { const a: number = d.sd(); } + { const a: number = d.sd(true); } + + { const a: Decimal = d.round(); } + + { const a: Decimal = d.sine(); } + { const a: Decimal = d.sin(); } + + { const a: Decimal = d.squareRoot(); } + { const a: Decimal = d.sqrt(); } + + { const a: Decimal = d.tangent(); } + { const a: Decimal = d.tan(); } + + { const a: Decimal = d.times(1); } + { const a: Decimal = d.times("1"); } + { const a: Decimal = d.times(d); } + { const a: Decimal = d.mul(1); } + { const a: Decimal = d.mul("1"); } + { const a: Decimal = d.mul(d); } + + { const a: string = d.toBinary(); } + { const a: string = d.toBinary(1); } + { const a: string = d.toBinary(1, 1); } + + { const a: Decimal = d.toDecimalPlaces(); } + { const a: Decimal = d.toDecimalPlaces(1); } + { const a: Decimal = d.toDecimalPlaces(1, 1); } + { const a: Decimal = d.toDP(); } + { const a: Decimal = d.toDP(1); } + { const a: Decimal = d.toDP(1, 1); } + + { const a: string = d.toExponential(); } + { const a: string = d.toExponential(1); } + { const a: string = d.toExponential(1, 1); } + + { const a: string = d.toFixed(); } + { const a: string = d.toFixed(1); } + { const a: string = d.toFixed(1, 1); } + + { const a: Decimal[] = d.toFraction(); } + { const a: Decimal[] = d.toFraction(1); } + { const a: Decimal[] = d.toFraction("1"); } + { const a: Decimal[] = d.toFraction(d); } + + { const a: string = d.toHexadecimal(); } + { const a: string = d.toHexadecimal(1); } + { const a: string = d.toHexadecimal(1, 1); } + { const a: string = d.toHex(); } + { const a: string = d.toHex(1); } + { const a: string = d.toHex(1, 1); } + + { const a: string = d.toJSON(); } + + { const a: Decimal = d.toNearest(); } + { const a: Decimal = d.toNearest(1); } + { const a: Decimal = d.toNearest("1"); } + { const a: Decimal = d.toNearest(d); } + { const a: Decimal = d.toNearest(d, 1); } + + { const a: number = d.toNumber(); } + + { const a: string = d.toOctal(); } + { const a: string = d.toOctal(1); } + { const a: string = d.toOctal(1, 1); } + + { const a: Decimal = d.toPower(1); } + { const a: Decimal = d.toPower("1"); } + { const a: Decimal = d.toPower(d); } + { const a: Decimal = d.pow(1); } + { const a: Decimal = d.pow("1"); } + { const a: Decimal = d.pow(d); } + + { const a: string = d.toPrecision(); } + { const a: string = d.toPrecision(1); } + { const a: string = d.toPrecision(1, 1); } + + { const a: Decimal = d.toSignificantDigits(); } + { const a: Decimal = d.toSignificantDigits(1); } + { const a: Decimal = d.toSignificantDigits(1, 1); } + { const a: Decimal = d.toSD(); } + { const a: Decimal = d.toSD(1); } + { const a: Decimal = d.toSD(1, 1); } + + { const a: string = d.toString(); } + + { const a: Decimal = d.truncated(); } + { const a: Decimal = d.trunc(); } + + { const a: string = d.valueOf(); } + + { const a: Decimal = Decimal.abs(1); } + { const a: Decimal = Decimal.abs("1"); } + { const a: Decimal = Decimal.abs(d); } + + { const a: Decimal = Decimal.acos(1); } + { const a: Decimal = Decimal.acos("1"); } + { const a: Decimal = Decimal.acos(d); } + + { const a: Decimal = Decimal.acosh(1); } + { const a: Decimal = Decimal.acosh("1"); } + { const a: Decimal = Decimal.acosh(d); } + + { const a: Decimal = Decimal.asin(1); } + { const a: Decimal = Decimal.asin("1"); } + { const a: Decimal = Decimal.asin(d); } + + { const a: Decimal = Decimal.asinh(1); } + { const a: Decimal = Decimal.asinh("1"); } + { const a: Decimal = Decimal.asinh(d); } + + { const a: Decimal = Decimal.atan(1); } + { const a: Decimal = Decimal.atan("1"); } + { const a: Decimal = Decimal.atan(d); } + + { const a: Decimal = Decimal.atan2(1, 1); } + { const a: Decimal = Decimal.atan2("1", "1"); } + { const a: Decimal = Decimal.atan2(d, d); } + + { const a: Decimal = Decimal.cbrt(1); } + { const a: Decimal = Decimal.cbrt("1"); } + { const a: Decimal = Decimal.cbrt(d); } + + { const a: typeof Decimal = Decimal.clone({}); } + { const a: typeof Decimal = Decimal.clone({ crypto: true }); } + { const a: typeof Decimal = Decimal.clone({ defaults: true }); } + { const a: typeof Decimal = Decimal.clone({ maxE: 1 }); } + { const a: typeof Decimal = Decimal.clone({ minE: 1 }); } + { const a: typeof Decimal = Decimal.clone({ modulo: 1 }); } + { const a: typeof Decimal = Decimal.clone({ precision: 1 }); } + { const a: typeof Decimal = Decimal.clone({ rounding: 1 }); } + { const a: typeof Decimal = Decimal.clone({ toExpNeg: 1 }); } + { const a: typeof Decimal = Decimal.clone({ toExpPos: 1 }); } + { const a: typeof Decimal = Decimal.clone({}); } + + { const a: typeof Decimal = Decimal.config({ crypto: true }); } + { const a: typeof Decimal = Decimal.config({ defaults: true }); } + { const a: typeof Decimal = Decimal.config({ maxE: 1 }); } + { const a: typeof Decimal = Decimal.config({ minE: 1 }); } + { const a: typeof Decimal = Decimal.config({ modulo: 1 }); } + { const a: typeof Decimal = Decimal.config({ precision: 1 }); } + { const a: typeof Decimal = Decimal.config({ rounding: 1 }); } + { const a: typeof Decimal = Decimal.config({ toExpNeg: 1 }); } + { const a: typeof Decimal = Decimal.config({ toExpPos: 1 }); } + + { const a: typeof Decimal = Decimal.set({ crypto: true }); } + { const a: typeof Decimal = Decimal.set({ defaults: true }); } + { const a: typeof Decimal = Decimal.set({ maxE: 1 }); } + { const a: typeof Decimal = Decimal.set({ minE: 1 }); } + { const a: typeof Decimal = Decimal.set({ modulo: 1 }); } + { const a: typeof Decimal = Decimal.set({ precision: 1 }); } + { const a: typeof Decimal = Decimal.set({ rounding: 1 }); } + { const a: typeof Decimal = Decimal.set({ toExpNeg: 1 }); } + { const a: typeof Decimal = Decimal.set({ toExpPos: 1 }); } + + { const a: Decimal = Decimal.cos(1); } + { const a: Decimal = Decimal.cos("1"); } + { const a: Decimal = Decimal.cos(d); } + + { const a: Decimal = Decimal.div(1, 1); } + { const a: Decimal = Decimal.div("1", "1"); } + { const a: Decimal = Decimal.div(d, d); } + + { const a: Decimal = Decimal.exp(1); } + { const a: Decimal = Decimal.exp("1"); } + { const a: Decimal = Decimal.exp(d); } + + { const a: Decimal = Decimal.floor(1); } + { const a: Decimal = Decimal.floor("1"); } + { const a: Decimal = Decimal.floor(d); } + + { const a: Decimal = Decimal.hypot(1); } + { const a: Decimal = Decimal.hypot("1"); } + { const a: Decimal = Decimal.hypot(d); } + { const a: Decimal = Decimal.hypot(1, 1); } + { const a: Decimal = Decimal.hypot("1", "1"); } + { const a: Decimal = Decimal.hypot(d, d); } + { const a: Decimal = Decimal.hypot(1, 1, 1); } + { const a: Decimal = Decimal.hypot("1", "1", "1"); } + { const a: Decimal = Decimal.hypot(d, d, d); } + { const a: Decimal = Decimal.hypot(1, 1, 1, 1, 1, 1, 1, 1, 1, d, 1, 1, 1, "1", d); } + + { const a: boolean = Decimal.isDecimal(d); } + + { const a: Decimal = Decimal.ln(1); } + { const a: Decimal = Decimal.ln("1"); } + { const a: Decimal = Decimal.ln(d); } + + { const a: Decimal = Decimal.log(1); } + { const a: Decimal = Decimal.log("1"); } + { const a: Decimal = Decimal.log(d); } + { const a: Decimal = Decimal.log(1, 2); } + { const a: Decimal = Decimal.log("1", 2); } + { const a: Decimal = Decimal.log(d, 2); } + + { const a: Decimal = Decimal.log2(1); } + { const a: Decimal = Decimal.log2("1"); } + { const a: Decimal = Decimal.log2(d); } + + { const a: Decimal = Decimal.log10(1); } + { const a: Decimal = Decimal.log10("1"); } + { const a: Decimal = Decimal.log10(d); } + + { const a: Decimal = Decimal.min(1, "1", 1, d); } + + { const a: Decimal = Decimal.max(1, "1", 1, d); } + + { const a: Decimal = Decimal.mul(1, 1); } + { const a: Decimal = Decimal.mul("1", "1"); } + { const a: Decimal = Decimal.mul(d, d); } + + { const a: Decimal = Decimal.pow(1, 1); } + { const a: Decimal = Decimal.pow("1", "1"); } + { const a: Decimal = Decimal.pow(d, d); } + + { const a: Decimal = Decimal.random(); } + { const a: Decimal = Decimal.random(1); } + + { const a: Decimal = Decimal.round(1); } + { const a: Decimal = Decimal.round("1"); } + { const a: Decimal = Decimal.round(d); } + + { const a: Decimal = Decimal.sign(1); } + { const a: Decimal = Decimal.sign("1"); } + { const a: Decimal = Decimal.sign(d); } + + { const a: Decimal = Decimal.sin(1); } + { const a: Decimal = Decimal.sin("1"); } + { const a: Decimal = Decimal.sin(d); } + + { const a: Decimal = Decimal.sinh(1); } + { const a: Decimal = Decimal.sinh("1"); } + { const a: Decimal = Decimal.sinh(d); } + + { const a: Decimal = Decimal.sqrt(1); } + { const a: Decimal = Decimal.sqrt("1"); } + { const a: Decimal = Decimal.sqrt(d); } + + { const a: Decimal = Decimal.sub(1, 1); } + { const a: Decimal = Decimal.sub("1", "1"); } + { const a: Decimal = Decimal.sub(d, d); } + + { const a: Decimal = Decimal.tan(1); } + { const a: Decimal = Decimal.tan("1"); } + { const a: Decimal = Decimal.tan(d); } + + { const a: Decimal = Decimal.tanh(1); } + { const a: Decimal = Decimal.tanh("1"); } + { const a: Decimal = Decimal.tanh(d); } + + { const a: Decimal = Decimal.trunc(1); } + { const a: Decimal = Decimal.trunc("1"); } + { const a: Decimal = Decimal.trunc(d); } + + { const a: number = Decimal.precision; } + { const a: number = Decimal.rounding; } + { const a: number = Decimal.toExpNeg; } + { const a: number = Decimal.minE; } + { const a: boolean = Decimal.crypto; } + { const a: number = Decimal.modulo; } + { const a: number = Decimal.ROUND_UP; } + { const a: number = Decimal.ROUND_DOWN; } + { const a: number = Decimal.ROUND_CEIL; } + { const a: number = Decimal.ROUND_FLOOR; } + { const a: number = Decimal.ROUND_HALF_UP; } + { const a: number = Decimal.ROUND_HALF_DOWN; } + { const a: number = Decimal.ROUND_HALF_EVEN; } + { const a: number = Decimal.ROUND_HALF_CEIL; } + { const a: number = Decimal.ROUND_HALF_FLOOR; } + { const a: number = Decimal.EUCLID; } +} diff --git a/types/adone/test/glosses/math/index.ts b/types/adone/test/glosses/math/index.ts index 928977fad9..d85c08bdef 100644 --- a/types/adone/test/glosses/math/index.ts +++ b/types/adone/test/glosses/math/index.ts @@ -1,469 +1,7 @@ namespace mathTests { - const { math } = adone; - - namespace LongTests { - new math.Long(); - new math.Long(0); - new math.Long(0, 0); - new math.Long(0, 0, true); - - namespace toInt { - const a: number = new math.Long().toInt(); - } - - namespace toNumber { - const a: number = new math.Long().toNumber(); - } - - namespace toString { - const a: string = new math.Long().toString(); - const b: string = new math.Long().toString(16); - } - - namespace getHighBits { - const a: number = new math.Long().getHighBits(); - } - - namespace getLowBits { - const a: number = new math.Long().getLowBits(); - } - - namespace getLowBitsUnsigned { - const a: number = new math.Long().getLowBitsUnsigned(); - } - - namespace getHighBitsUnsigned { - const a: number = new math.Long().getHighBitsUnsigned(); - } - - namespace getNumBitsAbs { - const a: number = new math.Long().getNumBitsAbs(); - } - - namespace isZero { - const a: boolean = new math.Long().isZero(); - } - - namespace isNegative { - const a: boolean = new math.Long().isNegative(); - } - - namespace isPositive { - const a: boolean = new math.Long().isPositive(); - } - - namespace isOdd { - const a: boolean = new math.Long().isOdd(); - } - - namespace isEven { - const a: boolean = new math.Long().isEven(); - } - - namespace equals { - const a = new math.Long(); - const b: boolean = a.equals(new math.Long()); - const c: boolean = a.equals(1); - const d: boolean = a.equals("1"); - const e: boolean = a.equals({ low: 0, high: 0 }); - } - - namespace lessThan { - const a = new math.Long(); - const b: boolean = a.lessThan(new math.Long()); - const c: boolean = a.lessThan(1); - const d: boolean = a.lessThan("1"); - const e: boolean = a.lessThan({ low: 0, high: 0 }); - } - - namespace lessThanOrEqual { - const a = new math.Long(); - const b: boolean = a.lessThanOrEqual(new math.Long()); - const c: boolean = a.lessThanOrEqual(1); - const d: boolean = a.lessThanOrEqual("1"); - const e: boolean = a.lessThanOrEqual({ low: 0, high: 0 }); - } - - namespace greaterThan { - const a = new math.Long(); - const b: boolean = a.greaterThan(new math.Long()); - const c: boolean = a.greaterThan(1); - const d: boolean = a.greaterThan("1"); - const e: boolean = a.greaterThan({ low: 0, high: 0 }); - } - - namespace greaterThanOrEqual { - const a = new math.Long(); - const b: boolean = a.greaterThanOrEqual(new math.Long()); - const c: boolean = a.greaterThanOrEqual(1); - const d: boolean = a.greaterThanOrEqual("1"); - const e: boolean = a.greaterThanOrEqual({ low: 0, high: 0 }); - } - - namespace compareTests { - const a = new math.Long(); - const b: number = a.compare(new math.Long()); - const c: number = a.compare(1); - const d: number = a.compare("1"); - const e: number = a.compare({ low: 0, high: 0 }); - } - - namespace negate { - const a: adone.math.Long = new math.Long().negate(); - } - - namespace add { - const a = new math.Long(); - const b: adone.math.Long = a.add(new math.Long()); - const c: adone.math.Long = a.add(1); - const d: adone.math.Long = a.add("1"); - const e: adone.math.Long = a.add({ low: 0, high: 0 }); - } - - namespace sub { - const a = new math.Long(); - const b: adone.math.Long = a.sub(new math.Long()); - const c: adone.math.Long = a.sub(1); - const d: adone.math.Long = a.sub("1"); - const e: adone.math.Long = a.sub({ low: 0, high: 0 }); - } - - namespace mul { - const a = new math.Long(); - const b: adone.math.Long = a.mul(new math.Long()); - const c: adone.math.Long = a.mul(1); - const d: adone.math.Long = a.mul("1"); - const e: adone.math.Long = a.mul({ low: 0, high: 0 }); - } - - namespace div { - const a = new math.Long(); - const b: adone.math.Long = a.div(new math.Long()); - const c: adone.math.Long = a.div(1); - const d: adone.math.Long = a.div("1"); - const e: adone.math.Long = a.div({ low: 0, high: 0 }); - } - - namespace mod { - const a = new math.Long(); - const b: adone.math.Long = a.mod(new math.Long()); - const c: adone.math.Long = a.mod(1); - const d: adone.math.Long = a.mod("1"); - const e: adone.math.Long = a.mod({ low: 0, high: 0 }); - } - - namespace not { - const a: adone.math.Long = new math.Long().not(); - } - - namespace and { - const a = new math.Long(); - const b: adone.math.Long = a.and(new math.Long()); - const c: adone.math.Long = a.and(1); - const d: adone.math.Long = a.and("1"); - const e: adone.math.Long = a.and({ low: 0, high: 0 }); - } - - namespace or { - const a = new math.Long(); - const b: adone.math.Long = a.or(new math.Long()); - const c: adone.math.Long = a.or(1); - const d: adone.math.Long = a.or("1"); - const e: adone.math.Long = a.or({ low: 0, high: 0 }); - } - - namespace xor { - const a = new math.Long(); - const b: adone.math.Long = a.xor(new math.Long()); - const c: adone.math.Long = a.xor(1); - const d: adone.math.Long = a.xor("1"); - const e: adone.math.Long = a.xor({ low: 0, high: 0 }); - } - - namespace shl { - const a = new math.Long(); - const b: adone.math.Long = a.shl(new math.Long()); - const c: adone.math.Long = a.shl(1); - } - - namespace shr { - const a = new math.Long(); - const b: adone.math.Long = a.shr(new math.Long()); - const c: adone.math.Long = a.shr(1); - } - - namespace shru { - const a = new math.Long(); - const b: adone.math.Long = a.shr(new math.Long()); - const c: adone.math.Long = a.shr(1); - } - - namespace toSigned { - const a: adone.math.Long = new math.Long().toSigned(); - } - - namespace toUnsigned { - const a: adone.math.Long = new math.Long().toUnsigned(); - } - - namespace toBytes { - const a: number[] = new math.Long().toBytes(); - } - - namespace toBytesLE { - const a: number[] = new math.Long().toBytesLE(); - } - - namespace static { - namespace fromInt { - const a: adone.math.Long = math.Long.fromInt(123); - const b: adone.math.Long = math.Long.fromInt(123, true); - } - - namespace fromNumber { - const a: adone.math.Long = math.Long.fromNumber(123); - const b: adone.math.Long = math.Long.fromNumber(123, true); - } - - namespace fromBits { - const a: adone.math.Long = math.Long.fromBits(0, 0); - const b: adone.math.Long = math.Long.fromBits(123, 0, true); - } - - namespace fromString { - const a: adone.math.Long = math.Long.fromString("123"); - const b: adone.math.Long = math.Long.fromString("123", true); - const c: adone.math.Long = math.Long.fromString("123", 16); - const d: adone.math.Long = math.Long.fromString("123", true, 16); - } - - namespace fromValue { - const a: adone.math.Long = math.Long.fromValue(new math.Long()); - const b: adone.math.Long = math.Long.fromValue(1); - const c: adone.math.Long = math.Long.fromValue("1"); - const e: adone.math.Long = math.Long.fromValue({ low: 0, high: 0 }); - } - - namespace constants { - const a: adone.math.Long = math.Long.MIN_VALUE; - const b: adone.math.Long = math.Long.MAX_VALUE; - const c: adone.math.Long = math.Long.MAX_UNSIGNED_VALUE; - const d: adone.math.Long = math.Long.ZERO; - const e: adone.math.Long = math.Long.UZERO; - const f: adone.math.Long = math.Long.ONE; - const g: adone.math.Long = math.Long.UONE; - const h: adone.math.Long = math.Long.NEG_ONE; - } - } - } - - namespace BigNumberTests { - const { BigNumber } = math; - type BigNumber = adone.math.BigNumber; - - new BigNumber(10); - new BigNumber("10"); - new BigNumber(new BigNumber(10)); - new BigNumber("10", 2); - - { const a: string = new BigNumber(1).toString(); } - { const a: string = new BigNumber(1).toString(2); } - - { const a: number = new BigNumber(1).toNumber(); } - - { const a: Buffer = new BigNumber(1).toBuffer(); } - { const a: Buffer = new BigNumber(1).toBuffer({}); } - { const a: Buffer = new BigNumber(1).toBuffer({ endian: 1 }); } - { const a: Buffer = new BigNumber(1).toBuffer({ endian: -1 }); } - { const a: Buffer = new BigNumber(1).toBuffer({ endian: "big" }); } - { const a: Buffer = new BigNumber(1).toBuffer({ endian: "little" }); } - { const a: Buffer = new BigNumber(1).toBuffer({ size: 1 }); } - { const a: Buffer = new BigNumber(1).toBuffer({ size: "auto" }); } - - { const a: BigNumber = new BigNumber(10).add(1); } - { const a: BigNumber = new BigNumber(10).add("1"); } - { const a: BigNumber = new BigNumber(10).add(new BigNumber(1)); } - - { const a: BigNumber = new BigNumber(10).sub(1); } - { const a: BigNumber = new BigNumber(10).sub("1"); } - { const a: BigNumber = new BigNumber(10).sub(new BigNumber(1)); } - - { const a: BigNumber = new BigNumber(10).mul(1); } - { const a: BigNumber = new BigNumber(10).mul("1"); } - { const a: BigNumber = new BigNumber(10).mul(new BigNumber(1)); } - - { const a: BigNumber = new BigNumber(10).div(1); } - { const a: BigNumber = new BigNumber(10).div("1"); } - { const a: BigNumber = new BigNumber(10).div(new BigNumber(1)); } - - { const a: BigNumber = new BigNumber(10).abs(); } - - { const a: BigNumber = new BigNumber(10).neg(); } - - { const a: number = new BigNumber(10).cmp(1); } - { const a: number = new BigNumber(10).cmp("1"); } - { const a: number = new BigNumber(10).cmp(new BigNumber(1)); } - - { const a: boolean = new BigNumber(10).gt(1); } - { const a: boolean = new BigNumber(10).gt("1"); } - { const a: boolean = new BigNumber(10).gt(new BigNumber(10)); } - - { const a: boolean = new BigNumber(10).ge(1); } - { const a: boolean = new BigNumber(10).ge("1"); } - { const a: boolean = new BigNumber(10).ge(new BigNumber(10)); } - - { const a: boolean = new BigNumber(10).eq(1); } - { const a: boolean = new BigNumber(10).eq("1"); } - { const a: boolean = new BigNumber(10).eq(new BigNumber(10)); } - - { const a: boolean = new BigNumber(10).lt(1); } - { const a: boolean = new BigNumber(10).lt("1"); } - { const a: boolean = new BigNumber(10).lt(new BigNumber(10)); } - - { const a: boolean = new BigNumber(10).le(1); } - { const a: boolean = new BigNumber(10).le("1"); } - { const a: boolean = new BigNumber(10).le(new BigNumber(10)); } - - { const a: BigNumber = new BigNumber(10).and(1); } - { const a: BigNumber = new BigNumber(10).and("1"); } - { const a: BigNumber = new BigNumber(10).and(new BigNumber(1)); } - - { const a: BigNumber = new BigNumber(10).or(1); } - { const a: BigNumber = new BigNumber(10).or("1"); } - { const a: BigNumber = new BigNumber(10).or(new BigNumber(1)); } - - { const a: BigNumber = new BigNumber(10).xor(1); } - { const a: BigNumber = new BigNumber(10).xor("1"); } - { const a: BigNumber = new BigNumber(10).xor(new BigNumber(1)); } - - { const a: BigNumber = new BigNumber(10).mod(1); } - { const a: BigNumber = new BigNumber(10).mod("1"); } - { const a: BigNumber = new BigNumber(10).mod(new BigNumber(1)); } - - { const a: BigNumber = new BigNumber(10).pow(1); } - { const a: BigNumber = new BigNumber(10).pow("1"); } - { const a: BigNumber = new BigNumber(10).pow(new BigNumber(1)); } - - { const a: BigNumber = new BigNumber(10).powm(1, 1); } - { const a: BigNumber = new BigNumber(10).powm("1", 1); } - { const a: BigNumber = new BigNumber(10).powm(new BigNumber(1), 1); } - { const a: BigNumber = new BigNumber(10).powm(1, "1"); } - { const a: BigNumber = new BigNumber(10).powm("1", "1"); } - { const a: BigNumber = new BigNumber(10).powm(new BigNumber(1), "1"); } - { const a: BigNumber = new BigNumber(10).powm(1, new BigNumber(1)); } - { const a: BigNumber = new BigNumber(10).powm("1", new BigNumber(1)); } - { const a: BigNumber = new BigNumber(10).powm(new BigNumber(1), new BigNumber(1)); } - - { const a: BigNumber = new BigNumber(10).invertm(1); } - { const a: BigNumber = new BigNumber(10).invertm("1"); } - { const a: BigNumber = new BigNumber(10).invertm(new BigNumber(1)); } - - { const a: BigNumber = new BigNumber(10).rand(); } - { const a: BigNumber = new BigNumber(10).rand(1); } - { const a: BigNumber = new BigNumber(10).rand("1"); } - { const a: BigNumber = new BigNumber(10).rand(new BigNumber(1)); } - - { const a: boolean | "maybe" = new BigNumber(10).probPrime(); } - - { const a: BigNumber = new BigNumber(10).nextPrime(); } - - { const a: BigNumber = new BigNumber(10).sqrt(); } - - { const a: BigNumber = new BigNumber(10).root(1); } - { const a: BigNumber = new BigNumber(10).root("1"); } - { const a: BigNumber = new BigNumber(10).root(new BigNumber(1)); } - - { const a: BigNumber = new BigNumber(10).shiftLeft(1); } - { const a: BigNumber = new BigNumber(10).shiftLeft("1"); } - { const a: BigNumber = new BigNumber(10).shiftLeft(new BigNumber(1)); } - - { const a: BigNumber = new BigNumber(10).shiftRight(1); } - { const a: BigNumber = new BigNumber(10).shiftRight("1"); } - { const a: BigNumber = new BigNumber(10).shiftRight(new BigNumber(1)); } - - { const a: BigNumber = new BigNumber(10).gcd(1); } - { const a: BigNumber = new BigNumber(10).gcd("1"); } - { const a: BigNumber = new BigNumber(10).gcd(new BigNumber(1)); } - - { const a: number = new BigNumber(10).jacobi(1); } - { const a: number = new BigNumber(10).jacobi("1"); } - { const a: number = new BigNumber(10).jacobi(new BigNumber(1)); } - - { const a: number = new BigNumber(10).bitLength(); } - - { const a: boolean = new BigNumber(10).isBitSet(10); } - - { const a: BigNumber = BigNumber.prime(10); } - { const a: BigNumber = BigNumber.prime(10, true); } - - { const a: BigNumber = BigNumber.fromBuffer(Buffer.alloc(10)); } - { const a: BigNumber = BigNumber.fromBuffer(Buffer.alloc(10), { endian: "little" }); } - { const a: BigNumber = BigNumber.fromBuffer(Buffer.alloc(10), { endian: -1 }); } - { const a: BigNumber = BigNumber.fromBuffer(Buffer.alloc(10), { endian: 1 }); } - { const a: BigNumber = BigNumber.fromBuffer(Buffer.alloc(10), { endian: "big" }); } - { const a: BigNumber = BigNumber.fromBuffer(Buffer.alloc(10), { size: "auto" }); } - - { const a: BigNumber = BigNumber.ONE; } - { const a: BigNumber = BigNumber.ZERO; } - } - - namespace bitSetTests { - const { BitSet } = math; - type BitSet = adone.math.BitSet; - - new BitSet(10); - new BitSet(new BitSet(10).dehydrate()); - - { const a: boolean = new BitSet(10).get(0); } - { const a: boolean = new BitSet(10).set(0); } - { const a: boolean = new BitSet(10).setRange(0, 10); } - { const a: boolean = new BitSet(10).unset(0); } - { const a: boolean = new BitSet(10).unsetRange(0, 10); } - { const a: boolean = new BitSet(10).toggle(0); } - { const a: boolean = new BitSet(10).toggleRange(0, 10); } - { const a: boolean = new BitSet(10).clear(); } - { const a: BitSet = new BitSet(10).clone(); } - { const a: string = new BitSet(10).dehydrate(); } - - { const a: BitSet = new BitSet(10).and(1); } - { const a: BitSet = new BitSet(10).and(new BitSet(10)); } - - { const a: BitSet = new BitSet(10).or(1); } - { const a: BitSet = new BitSet(10).or(new BitSet(10)); } - - { const a: BitSet = new BitSet(10).xor(1); } - { const a: BitSet = new BitSet(10).xor(new BitSet(10)); } - - new BitSet(10).forEach((x: number) => {}); - new BitSet(10).forEach((x: number) => false); - - { const a: BitSet = new BitSet(10).circularShift(10); } - { const a: number = new BitSet(10).getCardinality(); } - { const a: number[] = new BitSet(10).getIndices(); } - { const a: boolean = new BitSet(10).isSubsetOf(new BitSet(10)); } - { const a: boolean = new BitSet(10).isEmpty(); } - { const a: boolean = new BitSet(10).isEqual(new BitSet(10)); } - { const a: string = new BitSet(10).toString(); } - { const a: number = new BitSet(10).ffs(); } - { const a: number = new BitSet(10).ffs(1); } - { const a: number = new BitSet(10).ffz(); } - { const a: number = new BitSet(10).ffz(1); } - { const a: number = new BitSet(10).fls(); } - { const a: number = new BitSet(10).fls(1); } - { const a: number = new BitSet(10).flz(); } - { const a: number = new BitSet(10).flz(1); } - { const a: number = new BitSet(10).nextSetBit(1); } - { const a: number = new BitSet(10).nextUnsetBit(1); } - { const a: number = new BitSet(10).previousSetBit(1); } - { const a: number = new BitSet(10).previousUnsetBit(1); } - { const a: number = new BitSet(10).readUInt(); } - { const a: number = new BitSet(10).readUInt(1); } - { const a: number = new BitSet(10).readUInt(1, 2); } - { new BitSet(10).writeUInt(1); } - { new BitSet(10).writeUInt(1, 2); } - { new BitSet(10).writeUInt(1, 2, 3); } - { const a: BitSet = BitSet.fromLong(new adone.math.Long(10, 20)); } - } + const { + math + } = adone; namespace randomTests { const { random } = math; @@ -471,4 +9,22 @@ namespace mathTests { random(100); random(0, 10); } + + namespace maxTests { + const { max } = math; + max([]); + { const a: number = max([1, 2, 3]); } + { const a: string = max(["1", "2", "3"]); } + { const a: string = max(["1", "2", "3"], (a) => a.length); } + { const a: number = max([1, 2, 3], (a) => a.toExponential()); } + } + + namespace minTests { + const { min } = math; + min([]); + { const a: number = min([1, 2, 3]); } + { const a: string = min(["1", "2", "3"]); } + { const a: string = min(["1", "2", "3"], (a) => a.length); } + { const a: number = min([1, 2, 3], (a) => a.toExponential()); } + } } diff --git a/types/adone/test/glosses/math/long.ts b/types/adone/test/glosses/math/long.ts new file mode 100644 index 0000000000..f0dfa0b7ec --- /dev/null +++ b/types/adone/test/glosses/math/long.ts @@ -0,0 +1,261 @@ +namespace mathTests.longTests { + const { + math: { + Long + } + } = adone; + + new Long(); + new Long(0); + new Long(0, 0); + new Long(0, 0, true); + + namespace toInt { + const a: number = new Long().toInt(); + } + + namespace toNumber { + const a: number = new Long().toNumber(); + } + + namespace toString { + const a: string = new Long().toString(); + const b: string = new Long().toString(16); + } + + namespace getHighBits { + const a: number = new Long().getHighBits(); + } + + namespace getLowBits { + const a: number = new Long().getLowBits(); + } + + namespace getLowBitsUnsigned { + const a: number = new Long().getLowBitsUnsigned(); + } + + namespace getHighBitsUnsigned { + const a: number = new Long().getHighBitsUnsigned(); + } + + namespace getNumBitsAbs { + const a: number = new Long().getNumBitsAbs(); + } + + namespace isZero { + const a: boolean = new Long().isZero(); + } + + namespace isNegative { + const a: boolean = new Long().isNegative(); + } + + namespace isPositive { + const a: boolean = new Long().isPositive(); + } + + namespace isOdd { + const a: boolean = new Long().isOdd(); + } + + namespace isEven { + const a: boolean = new Long().isEven(); + } + + namespace equals { + const a = new Long(); + const b: boolean = a.equals(new Long()); + const c: boolean = a.equals(1); + const d: boolean = a.equals("1"); + const e: boolean = a.equals({ low: 0, high: 0 }); + } + + namespace lessThan { + const a = new Long(); + const b: boolean = a.lessThan(new Long()); + const c: boolean = a.lessThan(1); + const d: boolean = a.lessThan("1"); + const e: boolean = a.lessThan({ low: 0, high: 0 }); + } + + namespace lessThanOrEqual { + const a = new Long(); + const b: boolean = a.lessThanOrEqual(new Long()); + const c: boolean = a.lessThanOrEqual(1); + const d: boolean = a.lessThanOrEqual("1"); + const e: boolean = a.lessThanOrEqual({ low: 0, high: 0 }); + } + + namespace greaterThan { + const a = new Long(); + const b: boolean = a.greaterThan(new Long()); + const c: boolean = a.greaterThan(1); + const d: boolean = a.greaterThan("1"); + const e: boolean = a.greaterThan({ low: 0, high: 0 }); + } + + namespace greaterThanOrEqual { + const a = new Long(); + const b: boolean = a.greaterThanOrEqual(new Long()); + const c: boolean = a.greaterThanOrEqual(1); + const d: boolean = a.greaterThanOrEqual("1"); + const e: boolean = a.greaterThanOrEqual({ low: 0, high: 0 }); + } + + namespace compareTests { + const a = new Long(); + const b: number = a.compare(new Long()); + const c: number = a.compare(1); + const d: number = a.compare("1"); + const e: number = a.compare({ low: 0, high: 0 }); + } + + namespace negate { + const a: adone.math.Long = new Long().negate(); + } + + namespace add { + const a = new Long(); + const b: adone.math.Long = a.add(new Long()); + const c: adone.math.Long = a.add(1); + const d: adone.math.Long = a.add("1"); + const e: adone.math.Long = a.add({ low: 0, high: 0 }); + } + + namespace sub { + const a = new Long(); + const b: adone.math.Long = a.sub(new Long()); + const c: adone.math.Long = a.sub(1); + const d: adone.math.Long = a.sub("1"); + const e: adone.math.Long = a.sub({ low: 0, high: 0 }); + } + + namespace mul { + const a = new Long(); + const b: adone.math.Long = a.mul(new Long()); + const c: adone.math.Long = a.mul(1); + const d: adone.math.Long = a.mul("1"); + const e: adone.math.Long = a.mul({ low: 0, high: 0 }); + } + + namespace div { + const a = new Long(); + const b: adone.math.Long = a.div(new Long()); + const c: adone.math.Long = a.div(1); + const d: adone.math.Long = a.div("1"); + const e: adone.math.Long = a.div({ low: 0, high: 0 }); + } + + namespace mod { + const a = new Long(); + const b: adone.math.Long = a.mod(new Long()); + const c: adone.math.Long = a.mod(1); + const d: adone.math.Long = a.mod("1"); + const e: adone.math.Long = a.mod({ low: 0, high: 0 }); + } + + namespace not { + const a: adone.math.Long = new Long().not(); + } + + namespace and { + const a = new Long(); + const b: adone.math.Long = a.and(new Long()); + const c: adone.math.Long = a.and(1); + const d: adone.math.Long = a.and("1"); + const e: adone.math.Long = a.and({ low: 0, high: 0 }); + } + + namespace or { + const a = new Long(); + const b: adone.math.Long = a.or(new Long()); + const c: adone.math.Long = a.or(1); + const d: adone.math.Long = a.or("1"); + const e: adone.math.Long = a.or({ low: 0, high: 0 }); + } + + namespace xor { + const a = new Long(); + const b: adone.math.Long = a.xor(new Long()); + const c: adone.math.Long = a.xor(1); + const d: adone.math.Long = a.xor("1"); + const e: adone.math.Long = a.xor({ low: 0, high: 0 }); + } + + namespace shl { + const a = new Long(); + const b: adone.math.Long = a.shl(new Long()); + const c: adone.math.Long = a.shl(1); + } + + namespace shr { + const a = new Long(); + const b: adone.math.Long = a.shr(new Long()); + const c: adone.math.Long = a.shr(1); + } + + namespace shru { + const a = new Long(); + const b: adone.math.Long = a.shr(new Long()); + const c: adone.math.Long = a.shr(1); + } + + namespace toSigned { + const a: adone.math.Long = new Long().toSigned(); + } + + namespace toUnsigned { + const a: adone.math.Long = new Long().toUnsigned(); + } + + namespace toBytes { + const a: number[] = new Long().toBytes(); + } + + namespace toBytesLE { + const a: number[] = new Long().toBytesLE(); + } + + namespace static { + namespace fromInt { + const a: adone.math.Long = Long.fromInt(123); + const b: adone.math.Long = Long.fromInt(123, true); + } + + namespace fromNumber { + const a: adone.math.Long = Long.fromNumber(123); + const b: adone.math.Long = Long.fromNumber(123, true); + } + + namespace fromBits { + const a: adone.math.Long = Long.fromBits(0, 0); + const b: adone.math.Long = Long.fromBits(123, 0, true); + } + + namespace fromString { + const a: adone.math.Long = Long.fromString("123"); + const b: adone.math.Long = Long.fromString("123", true); + const c: adone.math.Long = Long.fromString("123", 16); + const d: adone.math.Long = Long.fromString("123", true, 16); + } + + namespace fromValue { + const a: adone.math.Long = Long.fromValue(new Long()); + const b: adone.math.Long = Long.fromValue(1); + const c: adone.math.Long = Long.fromValue("1"); + const e: adone.math.Long = Long.fromValue({ low: 0, high: 0 }); + } + + namespace constants { + const a: adone.math.Long = Long.MIN_VALUE; + const b: adone.math.Long = Long.MAX_VALUE; + const c: adone.math.Long = Long.MAX_UNSIGNED_VALUE; + const d: adone.math.Long = Long.ZERO; + const e: adone.math.Long = Long.UZERO; + const f: adone.math.Long = Long.ONE; + const g: adone.math.Long = Long.UONE; + const h: adone.math.Long = Long.NEG_ONE; + } + } +} diff --git a/types/adone/test/glosses/regex.ts b/types/adone/test/glosses/regex.ts index 7aab1e0d8d..2acf6cc24e 100644 --- a/types/adone/test/glosses/regex.ts +++ b/types/adone/test/glosses/regex.ts @@ -7,7 +7,11 @@ namespace adoneTests.regex { regex.filename().test("a"); regex.idn().test("a"); regex.ip4().test("a"); + regex.ip4({ exact: true }).test("a"); regex.ip6().test("a"); + regex.ip6({ exact: true }).test("a"); + regex.ip().test("a"); + regex.ip({ exact: true }).test("a"); regex.protocol().test("a"); regex.punycode().test("a"); regex.shebang().test("a"); diff --git a/types/adone/test/index.ts b/types/adone/test/index.ts index aec454539b..c97886c1e0 100644 --- a/types/adone/test/index.ts +++ b/types/adone/test/index.ts @@ -65,4 +65,9 @@ namespace AdoneRootTests { const b = new adone.benchmark.Benchmark.Suite(); b.add(() => {}).add("", () => {}).run(); } + + namespace asyncTests { + adone.async.all([], () => {}); + adone.async.forEach([], () => {}); + } } diff --git a/types/adone/tsconfig.json b/types/adone/tsconfig.json index 6a1af264a3..7194901d7a 100644 --- a/types/adone/tsconfig.json +++ b/types/adone/tsconfig.json @@ -22,7 +22,9 @@ "files": [ "adone-tests.ts", "adone.d.ts", + "async.d.ts", "benchmark.d.ts", + "glosses/app.d.ts", "glosses/archives.d.ts", "glosses/assertion.d.ts", "glosses/collections/array_set.d.ts", @@ -44,7 +46,7 @@ "glosses/collections/refcounted_cache.d.ts", "glosses/collections/set.d.ts", "glosses/collections/stack.d.ts", - "glosses/collections/timedout_map.d.ts", + "glosses/collections/time_map.d.ts", "glosses/compressors.d.ts", "glosses/crypto/asn1.d.ts", "glosses/crypto/ed25519.d.ts", @@ -58,7 +60,11 @@ "glosses/fast.d.ts", "glosses/fs.d.ts", "glosses/is.d.ts", + "glosses/math/bignumber.d.ts", + "glosses/math/bitset.d.ts", + "glosses/math/decimal.d.ts", "glosses/math/index.d.ts", + "glosses/math/long.d.ts", "glosses/math/matrix.d.ts", "glosses/math/simd.d.ts", "glosses/meta.d.ts", @@ -90,7 +96,7 @@ "glosses/utils.d.ts", "glosses/vault.d.ts", "index.d.ts", - "test/glosses/application.ts", + "test/glosses/app.ts", "test/glosses/archives.ts", "test/glosses/assertion.ts", "test/glosses/collections/array_set.ts", @@ -111,7 +117,7 @@ "test/glosses/collections/refcounted_cache.ts", "test/glosses/collections/set.ts", "test/glosses/collections/stack.ts", - "test/glosses/collections/timedout_map.ts", + "test/glosses/collections/time_map.ts", "test/glosses/compressors.ts", "test/glosses/crypto/asn1.ts", "test/glosses/crypto/ed25519.ts", @@ -124,7 +130,11 @@ "test/glosses/fast.ts", "test/glosses/fs.ts", "test/glosses/is.ts", + "test/glosses/math/bignumber.ts", + "test/glosses/math/bitset.ts", + "test/glosses/math/decimal.ts", "test/glosses/math/index.ts", + "test/glosses/math/long.ts", "test/glosses/math/matrix.ts", "test/glosses/math/simd.ts", "test/glosses/meta.ts", diff --git a/types/aframe/aframe-tests.ts b/types/aframe/aframe-tests.ts index 5af66a09d1..5e2bd23e36 100644 --- a/types/aframe/aframe-tests.ts +++ b/types/aframe/aframe-tests.ts @@ -21,9 +21,9 @@ type MyEntity = AFrame.Entity<{ material: THREE.Material; sound: { pause(): void }; }>; -const camera = document.querySelector('a-entity[camera]').components.camera; -const material = document.querySelector('a-entity[material]').components.material; -document.querySelector('a-entity[sound]').components.sound.pause(); +const camera = (document.querySelector('a-entity[camera]') as MyEntity).components.camera; +const material = (document.querySelector('a-entity[material]') as MyEntity).components.material; +(document.querySelector('a-entity[sound]') as MyEntity).components.sound.pause(); entity.getDOMAttribute('geometry').primitive; @@ -38,21 +38,82 @@ entity.addEventListener('child-detached', (event) => { }); // Components -const Component = AFRAME.registerComponent('test', {}); + +interface TestComponent extends AFrame.Component { + multiply: (f: number) => number; + + data: { + myProperty: any[], + string: string, + num: number + }; + + system: TestSystem; +} + +const Component = AFRAME.registerComponent('test-component', { + schema: { + myProperty: { + default: [], + parse() { return [true]; }, + }, + string: { type: 'string' }, + num: 0 + }, + init() { + this.data.num = 0; + }, + update() {}, + tick() {}, + remove() {}, + pause() {}, + play() {}, + + multiply(this: TestComponent, f: number) { + // Reference to system because both were registered with the same name. + return f * this.data.num * this.system.data.counter; + } +}); // Scene const scene = document.querySelector('a-scene'); scene.hasLoaded; // System -const system = scene.systems['systemName']; + +interface TestSystem extends AFrame.System { + data: { + counter: number; + }; +} + +const testSystem: AFrame.SystemDefinition = { + schema: { + counter: 0 + }, + + init() { + this.data.counter = 1; + } +}; + +AFRAME.registerSystem('test-component', testSystem); // Register Custom Geometry -AFRAME.registerGeometry('a-test-geometry', { + +interface TestGeometry extends AFrame.Geometry { + schema: AFrame.MultiPropertySchema<{ + groupIndex: number; + }>; +} + +AFRAME.registerGeometry('a-test-geometry', { schema: { groupIndex: { default: 0 } }, init(data) { this.geometry = new THREE.Geometry(); + const temp = data.groupIndex; + temp; } }); diff --git a/types/aframe/index.d.ts b/types/aframe/index.d.ts index 0da1ed0ef5..b405de0273 100644 --- a/types/aframe/index.d.ts +++ b/types/aframe/index.d.ts @@ -2,6 +2,7 @@ // Project: https://aframe.io/ // Definitions by: Paul Shannon // Roberto Ritger +// Trygve Wastvedt // Definitions: https://github.com/DefinitelyTyped/DefinitelyTyped // TypeScript Version: 2.3 @@ -19,7 +20,7 @@ declare var hasNativeWebVRImplementation: boolean; interface Document { createElement(tagName: string): AFrame.Entity; querySelector(selectors: 'a-scene'): AFrame.Scene; - querySelector>(selectors: string): T; + querySelector(selectors: string): AFrame.Entity; querySelectorAll(selectors: string): NodeListOf | Element>; } @@ -36,15 +37,15 @@ declare namespace AFrame { components: { [ key: string ]: ComponentDescriptor }; geometries: { [ key: string ]: GeometryDescriptor }; primitives: { [ key: string ]: Entity }; - registerComponent(name: string, component: ComponentDefinition): ComponentConstructor; + registerComponent(name: string, component: ComponentDefinition): ComponentConstructor; registerElement(name: string, element: ANode): void; - registerGeometry(name: string, geometry: GeometryDefinition): Geometry; + registerGeometry(name: string, geometry: GeometryDefinition): GeometryConstructor; registerPrimitive(name: string, primitive: PrimitiveDefinition): void; - registerShader(name: string, shader: any): void; - registerSystem(name: string, definition: SystemDefinition): void; + registerShader(name: string, shader: T): ShaderConstructor; + registerSystem(name: string, definition: SystemDefinition): SystemConstructor; schema: SchemaUtils; shaders: { [ key: string ]: ShaderDescriptor }; - systems: { [key: string]: System }; + systems: { [key: string]: SystemConstructor }; THREE: typeof THREE; TWEEN: typeof TWEEN; utils: Utils; @@ -89,54 +90,39 @@ declare namespace AFrame { tick(): void; } - interface Component { + interface Component { attrName?: string; - data?: any; + data: T; dependencies?: string[]; el: Entity; id: string; multiple?: boolean; name: string; - schema: Schema; + schema: Schema; + system: S | undefined; - init(data?: any): void; - pause(): void; - play(): void; - remove(): void; - tick?(time: number, timeDelta: number): void; - update(oldData: any): void; - updateSchema?(): void; + init(this: this, data?: T): void; + pause(this: this): void; + play(this: this): void; + remove(this: this): void; + tick?(this: this, time: number, timeDelta: number): void; + update(this: this, oldData: T): void; + updateSchema?(this: this): void; - extendSchema(update: Schema): void; - flushToDOM(): void; + extendSchema(this: this, update: Schema): void; + flushToDOM(this: this): void; } - interface ComponentConstructor { - new (el: Entity, name: string, id: string): Component; + interface ComponentConstructor { + new (el: Entity, attrValue: string, id: string): T; } - interface ComponentDefinition { - dependencies?: string[]; - el?: Entity; - id?: string; - multiple?: boolean; - schema?: Schema; + type ComponentDefinition = Partial; - init?(data?: any): void; - pause?(): void; - play?(): void; - remove?(): void; - tick?(time: number, timeDelta: number): void; - update?(oldData: any): void; - updateSchema?(): void; - - [ key: string ]: any; - } - - interface ComponentDescriptor { - Component: Component; - dependencies: string[] | null; - multiple: boolean | null; + interface ComponentDescriptor { + Component: ComponentConstructor; + dependencies: string[] | undefined; + multiple: boolean | undefined; // internal APIs2 // parse @@ -144,7 +130,6 @@ declare namespace AFrame { // schema // stringify // type - [ key: string ]: any; } interface Coordinate { @@ -153,8 +138,14 @@ declare namespace AFrame { z: number; } + interface DefaultComponents { + position: Component; + rotation: Component; + scale: Component; + } + interface Entity> extends ANode { - components: C; + components: C & DefaultComponents; isPlaying: boolean; object3D: THREE.Object3D; object3DMap: ObjectMap; @@ -165,8 +156,8 @@ declare namespace AFrame { /** * @deprecated since 0.4.0 */ - getComputedAttribute(attr: string): T; - getDOMAttribute(attr: string): T; + getComputedAttribute(attr: string): Component; + getDOMAttribute(attr: string): any; getObject3D(type: string): THREE.Object3D; getOrCreateObject3D(type: string, construct: any): THREE.Object3D; is(stateName: string): boolean; @@ -179,7 +170,6 @@ declare namespace AFrame { // getAttribute specific usages getAttribute(type: string): any; - getAttribute(attr: string): T; getAttribute(type: 'position' | 'rotation' | 'scale'): Coordinate; // setAttribute specific usages @@ -192,12 +182,18 @@ declare namespace AFrame { addEventListener(type: string, listener: EventListenerOrEventListenerObject, useCapture?: boolean): void; } - type DetailEvent = Event & { detail: D }; + type DetailEvent = Event & { + detail: D; + target: EventTarget & Entity; + }; interface EntityEventMap { 'child-attached': DetailEvent<{ el: Element | Entity }>; 'child-detached': DetailEvent<{ el: Element | Entity }>; - 'componentchanged': DetailEvent<{ name: string }>; + 'componentchanged': DetailEvent<{ + name: string, + id: string + }>; 'componentremoved': DetailEvent<{ name: string, id: string, @@ -215,23 +211,28 @@ declare namespace AFrame { interface Geometry { name: string; geometry: THREE.Geometry; - schema: Schema; - update(data: object): void; - [ key: string ]: any; + schema: Schema; + + init(this: this, data: { [P in keyof this['schema']]: any }): void; + // Would like the above to be: + // init?(this: this, data?: { [P in keyof T['schema']]: T['schema'][P]['default'] } ): void; + // I think this is prevented by the following issue: https://github.com/Microsoft/TypeScript/issues/21760. } - interface GeometryDefinition extends ComponentDefinition { - geometry?: THREE.Geometry; + interface GeometryConstructor { + new (): T; } - interface GeometryDescriptor { - Geometry: Geometry; + type GeometryDefinition = Partial; + + interface GeometryDescriptor { + Geometry: GeometryConstructor; schema: Schema; } - interface MultiPropertySchema { - [ key: string ]: SinglePropertySchema; - } + type MultiPropertySchema = { + [P in keyof T]: SinglePropertySchema | T[P]; + }; interface PrimitiveDefinition { defaultComponents?: any; // TODO cleanup type @@ -240,8 +241,9 @@ declare namespace AFrame { transforms?: any; // TODO cleanup type } - type PropertyTypes = 'array' | 'boolean' | 'color' | 'int' | 'number' | 'selector' | - 'selectorAll' | 'src' | 'string' | 'vec2' | 'vec3' | 'vec4'; + type PropertyTypes = 'array' | 'asset' | 'audio' | 'boolean' | 'color' | + 'int' | 'map' | 'model' | 'number' | 'selector' | 'selectorAll' | + 'string' | 'vec2' | 'vec3' | 'vec4'; type SceneEvents = 'enter-vr' | 'exit-vr' | 'loaded' | 'renderstart'; @@ -265,7 +267,7 @@ declare namespace AFrame { addEventListener(type: SceneEvents, listener: EventListener, useCapture?: boolean): void; } - type Schema = SinglePropertySchema | MultiPropertySchema; + type Schema = SinglePropertySchema | MultiPropertySchema; interface SchemaUtils { isSingleProperty(schema: Schema): boolean; @@ -274,11 +276,25 @@ declare namespace AFrame { interface Shader { name: string; - schema: Schema; + data: { [key: string]: any }; + schema: Schema; + material: THREE.Material; + vertexShader: string; + fragmentShader: string; + + init(this: this, data?: this['data']): void; + tick?(this: this, time: number, timeDelta: number): void; + update(this: this, oldData: this['data']): void; } - interface ShaderDescriptor { - Shader: Shader; + interface ShaderConstructor { + new (): T; + } + + type ShaderDefinition = Partial; + + interface ShaderDescriptor { + Shader: ShaderConstructor; schema: Schema; } @@ -287,27 +303,23 @@ declare namespace AFrame { 'default'?: T; parse?(value: string): T; stringify?(value: T): string; - [ key: string ]: any; } interface System { - data: any; - schema: Schema; - init(): void; - pause(): void; - play(): void; - tick?(): void; + data: { [key: string]: any }; + schema: Schema; + init(this: this): void; + pause(this: this): void; + play(this: this): void; + tick?(this: this, t: number, dt: number): void; } - interface SystemDefinition { - schema?: Schema; - init?(): void; - pause?(): void; - play?(): void; - tick?(): void; - [ key: string ]: any; + interface SystemConstructor { + new (scene: Scene): T; } + type SystemDefinition = Partial; + interface Utils { coordinates: { isCoordinate(value: string): boolean; @@ -326,5 +338,8 @@ declare namespace AFrame { diff(a: object, b: object): object; extend(target: object, ... source: object[]): object; extendDeep(target: object, ... source: object[]): object; + + throttle(tickFunction: () => void, minimumInterval: number, optionalContext?: {}): (t: number, dt: number) => void; + throttleTick(tickFunction: (t: number, dt: number) => void, minimumInterval: number, optionalContext?: {}): (t: number, dt: number) => void; } } diff --git a/types/aframe/tslint.json b/types/aframe/tslint.json index 71ee04c4e1..495d29983d 100644 --- a/types/aframe/tslint.json +++ b/types/aframe/tslint.json @@ -1,6 +1,5 @@ { "extends": "dtslint/dt.json", "rules": { - "no-unnecessary-generics": false } } diff --git a/types/agenda/agenda-tests.ts b/types/agenda/agenda-tests.ts index bbf945bd62..a7031d2ef8 100644 --- a/types/agenda/agenda-tests.ts +++ b/types/agenda/agenda-tests.ts @@ -5,8 +5,8 @@ var mongoConnectionString = "mongodb://127.0.0.1/agenda"; var agenda = new Agenda({ db: { address: mongoConnectionString } }); -agenda.define('delete old users', (job, done) => { - +agenda.define<{ foo: Error }>('delete old users', (job, done) => { + done(job.attrs.data.foo) }); agenda.on('ready', () => { @@ -62,7 +62,7 @@ agenda.schedule('tomorrow at noon', ['printAnalyticsReport', 'sendNotifications' agenda.now('do the hokey pokey'); -var job = agenda.create('printAnalyticsReport', { userCount: 100 }); +var job = agenda.create<{ userCount: number }>('printAnalyticsReport', { userCount: 100 }); job.save(function(err) { console.log("Job successfully saved"); }); diff --git a/types/agenda/index.d.ts b/types/agenda/index.d.ts index 12b0b76c38..b29158983d 100644 --- a/types/agenda/index.d.ts +++ b/types/agenda/index.d.ts @@ -1,6 +1,7 @@ -// Type definitions for Agenda v1.0.0 -// Project: https://github.com/rschmukler/agenda +// Type definitions for Agenda v1.0.3 +// Project: https://github.com/agenda/agenda // Definitions by: Meir Gottlieb +// Jeff Principe // Definitions: https://github.com/DefinitelyTyped/DefinitelyTyped // TypeScript Version: 2.3 @@ -89,14 +90,14 @@ declare class Agenda extends EventEmitter { * @param name The name of the job. * @param data Data to associated with the job. */ - create(name: string, data?: any): Agenda.Job; + create(name: string, data?: T): Agenda.Job; /** * Find all Jobs matching `query` and pass same back in cb(). * @param query * @param cb */ - jobs(query: any, cb: ResultCallback): void; + jobs(query: any, cb: ResultCallback[]>): void; /** * Removes all jobs in the database without defined behaviors. Useful if you change a definition name and want @@ -113,8 +114,8 @@ declare class Agenda extends EventEmitter { * @param options The options for the job. * @param handler The handler to execute. */ - define(name: string, handler: (job: Agenda.Job, done: (err?: Error) => void) => void): void; - define(name: string, options: Agenda.JobOptions, handler: (job: Agenda.Job, done: (err?: Error) => void) => void): void; + define(name: string, handler: (job: Agenda.Job, done: (err?: Error) => void) => void): void; + define(name: string, options: Agenda.JobOptions, handler: (job: Agenda.Job, done: (err?: Error) => void) => void): void; /** * Runs job name at the given interval. Optionally, data and options can be passed in. @@ -124,8 +125,8 @@ declare class Agenda extends EventEmitter { * @param options An optional argument that will be passed to job.repeatEvery. * @param cb An optional callback function which will be called when the job has been persisted in the database. */ - every(interval: number | string, names: string, data?: any, options?: any, cb?: ResultCallback): Agenda.Job; - every(interval: number | string, names: string[], data?: any, options?: any, cb?: ResultCallback): Agenda.Job[]; + every(interval: number | string, names: string, data?: T, options?: any, cb?: ResultCallback>): Agenda.Job; + every(interval: number | string, names: string[], data?: T, options?: any, cb?: ResultCallback[]>): Agenda.Job[]; /** * Schedules a job to run name once at a given time. @@ -134,8 +135,8 @@ declare class Agenda extends EventEmitter { * @param data An optional argument that will be passed to the processing function under job.attrs.data. * @param cb An optional callback function which will be called when the job has been persisted in the database. */ - schedule(when: Date | string, names: string, data?: any, cb?: ResultCallback): Agenda.Job; - schedule(when: Date | string, names: string[], data?: any, cb?: ResultCallback): Agenda.Job[]; + schedule(when: Date | string, names: string, data?: T, cb?: ResultCallback>): Agenda.Job; + schedule(when: Date | string, names: string[], data?: T, cb?: ResultCallback[]>): Agenda.Job[]; /** * Schedules a job to run name once immediately. @@ -143,7 +144,7 @@ declare class Agenda extends EventEmitter { * @param data An optional argument that will be passed to the processing function under job.attrs.data. * @param cb An optional callback function which will be called when the job has been persisted in the database. */ - now(name: string, data?: any, cb?: ResultCallback): Agenda.Job; + now(name: string, data?: T, cb?: ResultCallback>): Agenda.Job; /** * Cancels any jobs matching the passed mongodb-native query, and removes them from the database. @@ -242,10 +243,14 @@ declare namespace Agenda { } } + interface JobAttributesData { + [key: string]: any; + } + /** * The database record associated with a job. */ - interface JobAttributes { + interface JobAttributes { /** * The record identity. */ @@ -264,7 +269,7 @@ declare namespace Agenda { /** * The job details. */ - data: { [name: string]: any }; + data: T; /** * The priority of the job. @@ -330,12 +335,12 @@ declare namespace Agenda { /** * A scheduled job. */ - interface Job { + interface Job { /** * The database record associated with the job. */ - attrs: JobAttributes; + attrs: JobAttributes; /** * The agenda that created the job. @@ -348,54 +353,54 @@ declare namespace Agenda { * @param options An optional argument that can include a timezone field. The timezone should be a string as * accepted by moment-timezone and is considered when using an interval in the cron string format. */ - repeatEvery(interval: string | number, options?: { timezone?: string }): Job + repeatEvery(interval: string | number, options?: { timezone?: string }): Job /** * Specifies a time when the job should repeat. [Possible values](https://github.com/matthewmueller/date#examples). * @param time */ - repeatAt(time: string): Job + repeatAt(time: string): Job /** * Disables the job. */ - disable(): Job; + disable(): Job; /** * Enables the job. */ - enable(): Job; + enable(): Job; /** * Ensure that only one instance of this job exists with the specified properties * @param value The properties associated with the job that must be unqiue. * @param opts */ - unique(value: any, opts?: { insertOnly?: boolean }): Job; + unique(value: any, opts?: { insertOnly?: boolean }): Job; /** * Specifies the next time at which the job should run. * @param time The next time at which the job should run. */ - schedule(time: string | Date): Job; + schedule(time: string | Date): Job; /** * Specifies the priority weighting of the job. * @param value The priority of the job (lowest|low|normal|high|highest|number). */ - priority(value: string | number): Job; + priority(value: string | number): Job; /** * Sets job.attrs.failedAt to now, and sets job.attrs.failReason to reason. * @param reason A message or Error object that indicates why the job failed. */ - fail(reason: string | Error): Job; + fail(reason: string | Error): Job; /** * Runs the given job and calls callback(err, job) upon completion. Normally you never need to call this manually * @param cb Called when the job is completed. */ - run(cb?: ResultCallback): Job; + run(cb?: ResultCallback>): Job; /** * Returns true if the job is running; otherwise, returns false. @@ -406,7 +411,7 @@ declare namespace Agenda { * Saves the job into the database. * @param cb Called when the job is saved. */ - save(cb?: ResultCallback): Job; + save(cb?: ResultCallback>): Job; /** * Removes the job from the database and cancels the job. @@ -424,7 +429,7 @@ declare namespace Agenda { /** * Calculates next time the job should run */ - computeNextRunAt(): Job; + computeNextRunAt(): Job; } interface JobOptions { diff --git a/types/ajv-errors/ajv-errors-tests.ts b/types/ajv-errors/ajv-errors-tests.ts new file mode 100644 index 0000000000..d06c80b152 --- /dev/null +++ b/types/ajv-errors/ajv-errors-tests.ts @@ -0,0 +1,5 @@ +import * as Ajv from "ajv"; +import AjvErrors = require("ajv-errors"); + +const ajv = new Ajv({allErrors: true, jsonPointers: true}); +AjvErrors(ajv); diff --git a/types/ajv-errors/index.d.ts b/types/ajv-errors/index.d.ts new file mode 100644 index 0000000000..fed9e4585f --- /dev/null +++ b/types/ajv-errors/index.d.ts @@ -0,0 +1,18 @@ +// Type definitions for ajv-errors 1.0 +// Project: https://github.com/epoberezkin/ajv-errors +// Definitions by: Afshawn Lotfi +// Definitions: https://github.com/DefinitelyTyped/DefinitelyTyped + +import { Ajv } from "ajv"; + +/** + * + * @param ajv Ajv Main Class + * https://github.com/epoberezkin/ajv + * @param options Optional options for Ajv Errors + * https://github.com/epoberezkin/ajv-errors#options + * + */ + +export = AjvErrors; +declare function AjvErrors(ajv: Ajv, options?: {}): Ajv; diff --git a/types/ajv-errors/tsconfig.json b/types/ajv-errors/tsconfig.json new file mode 100644 index 0000000000..c78a24c8c9 --- /dev/null +++ b/types/ajv-errors/tsconfig.json @@ -0,0 +1,23 @@ +{ + "compilerOptions": { + "module": "commonjs", + "lib": [ + "es6" + ], + "noImplicitAny": true, + "noImplicitThis": true, + "strictFunctionTypes": true, + "strictNullChecks": true, + "baseUrl": "../", + "typeRoots": [ + "../" + ], + "types": [], + "noEmit": true, + "forceConsistentCasingInFileNames": true + }, + "files": [ + "index.d.ts", + "ajv-errors-tests.ts" + ] +} diff --git a/types/node-common-errors/tslint.json b/types/ajv-errors/tslint.json similarity index 100% rename from types/node-common-errors/tslint.json rename to types/ajv-errors/tslint.json diff --git a/types/algoliasearch/algoliasearch-tests.ts b/types/algoliasearch/algoliasearch-tests.ts index 0814b0fc03..87fdb95a01 100644 --- a/types/algoliasearch/algoliasearch-tests.ts +++ b/types/algoliasearch/algoliasearch-tests.ts @@ -2,16 +2,17 @@ import * as algoliasearch from 'algoliasearch'; import { ClientOptions, SynonymOption, - AlgoliaApiKeyOptions, + ApiKeyOptions, SearchSynonymOptions, - AlgoliaResponse, - AlgoliaSecuredApiOptions, - AlgoliaIndexSettings, - AlgoliaQueryParameters, - AlgoliaIndex, + SecuredApiOptions, + Index, + Response, + IndexSettings, + QueryParameters, + Client } from 'algoliasearch'; -let _algoliaResponse: AlgoliaResponse = { +let _algoliaResponse: Response = { hits: [{}, {}], page: 0, nbHits: 12, @@ -33,7 +34,7 @@ let _synonymOption: SynonymOption = { replaceExistingSynonyms: false, }; -let _algoliaApiKeyOptions: AlgoliaApiKeyOptions = { +let _algoliaApiKeyOptions: ApiKeyOptions = { validity: 0, maxQueriesPerIPPerHour: 0, indexes: [''], @@ -48,14 +49,14 @@ let _searchSynonymOptions: SearchSynonymOptions = { hitsPerPage: 0, }; -let _algoliaSecuredApiOptions: AlgoliaSecuredApiOptions = { +let _algoliaSecuredApiOptions: SecuredApiOptions = { filters: '', validUntil: 0, restrictIndices: '', userToken: '', }; -let _algoliaIndexSettings: AlgoliaIndexSettings = { +let _algoliaIndexSettings: IndexSettings = { attributesToIndex: [''], attributesForFaceting: [''], unretrievableAttributes: [''], @@ -63,7 +64,7 @@ let _algoliaIndexSettings: AlgoliaIndexSettings = { ranking: [''], customRanking: [''], replicas: [''], - maxValuesPerFacet: '', + maxValuesPerFacet: 100, attributesToHighlight: [''], attributesToSnippet: [''], highlightPreTag: '', @@ -78,7 +79,7 @@ let _algoliaIndexSettings: AlgoliaIndexSettings = { ignorePlurals: false, disableTypoToleranceOnAttributes: '', separatorsToIndex: '', - queryType: '', + queryType: 'prefixAll', removeWordsIfNoResults: '', advancedSyntax: false, optionalWords: [''], @@ -86,23 +87,24 @@ let _algoliaIndexSettings: AlgoliaIndexSettings = { disablePrefixOnAttributes: [''], disableExactOnAttributes: [''], exactOnSingleWordQuery: '', - alternativesAsExact: false, + alternativesAsExact: ['ignorePlurals'], attributeForDistinct: '', distinct: false, numericAttributesToIndex: [''], allowCompressionOfIntegerArray: false, altCorrections: [{}], minProximity: 0, - placeholders: '', + placeholders: { '': [''] }, + camelCaseAttributes: [''], }; -let _algoliaQueryParameters: AlgoliaQueryParameters = { +let _algoliaQueryParameters: QueryParameters = { query: '', filters: '', attributesToRetrieve: [''], restrictSearchableAttributes: [''], facets: '', - maxValuesPerFacet: '', + maxValuesPerFacet: 2, attributesToHighlight: [''], attributesToSnippet: [''], highlightPreTag: '', @@ -147,7 +149,30 @@ let _algoliaQueryParameters: AlgoliaQueryParameters = { minProximity: 0, }; -let index: AlgoliaIndex = algoliasearch('', '').initIndex(''); +let client: Client = algoliasearch('', ''); +let index: Index = client.initIndex(''); let search = index.search({ query: '' }); + index.search({ query: '' }, (err, res) => {}); + +// partialUpdateObject +index.partialUpdateObject({}, () => {}); +index.partialUpdateObject({}, false, () => {}); +index.partialUpdateObject({}).then(() => {}); +index.partialUpdateObject({}, false).then(() => {}); + +// partialUpdateObjects +index.partialUpdateObjects([{}], () => {}); +index.partialUpdateObjects([{}], false, () => {}); +index.partialUpdateObjects([{}]).then(() => {}); +index.partialUpdateObjects([{}], false).then(() => {}); + +let indexName : string = index.indexName; + +// complete copy +client.copyIndex('from', 'to').then(()=>{}) +client.copyIndex('from', 'to', ()=> {}) +// with scope +client.copyIndex('from', 'to', ['settings']).then(()=>{}) +client.copyIndex('from', 'to', ['synonyms', 'rules'], ()=> {}) diff --git a/types/algoliasearch/index.d.ts b/types/algoliasearch/index.d.ts index 5c7026d70e..b2890573ce 100644 --- a/types/algoliasearch/index.d.ts +++ b/types/algoliasearch/index.d.ts @@ -1,93 +1,51 @@ -// Type definitions for algoliasearch-client-js 3.24.8 +// Type definitions for algoliasearch-client-js 3.27.0 // Project: https://github.com/algolia/algoliasearch-client-js // Definitions by: Baptiste Coquelle // Haroen Viaene // Aurélien Hervé +// Samuel Vaillant // Definitions: https://github.com/DefinitelyTyped/DefinitelyTyped // TypeScript Version: 2.2 declare namespace algoliasearch { - interface AlgoliaResponse { - /** - * Contains all the hits matching the query - * https://github.com/algolia/algoliasearch-client-js#response-format - */ - hits: any[]; - /** - * Current page - * https://github.com/algolia/algoliasearch-client-js#response-format - */ - page: number; - /** - * Number of total hits matching the query - * https://github.com/algolia/algoliasearch-client-js#response-format - */ - nbHits: number; - /** - * Number of pages - * https://github.com/algolia/algoliasearch-client-js#response-format - */ - nbPages: number; - /** - * Number of hits per pages - * https://github.com/algolia/algoliasearch-client-js#response-format - */ - hitsPerPage: number; - /** - * Engine processing time (excluding network transfer) - * https://github.com/algolia/algoliasearch-client-js#response-format - */ - processingTimeMS: number; - /** - * Query used to perform the search - * https://github.com/algolia/algoliasearch-client-js#response-format - */ - query: string; - /** - * GET parameters used to perform the search - * https://github.com/algolia/algoliasearch-client-js#response-format - */ - params: string; - } - interface AlgoliaMultiResponse { - results: AlgoliaResponse[]; - } - /* - Interface for the algolia client object - */ - interface AlgoliaClient { + /** + * Interface for the algolia client object + */ + interface Client { /** * Initialization of the index - * @param name: index name - * return algolia index object * https://github.com/algolia/algoliasearch-client-js#init-index---initindex */ - initIndex(name: string): AlgoliaIndex; + initIndex(indexName: string): Index; /** * Query on multiple index - * @param queries index name, query and query parameters - * @param cb callback(err, res) * https://github.com/algolia/algoliasearch-client-js#multiple-queries---multiplequeries */ search( queries: { indexName: string; query: string; - params: AlgoliaQueryParameters; + params: QueryParameters; }[], - cb: (err: Error, res: AlgoliaMultiResponse) => void + cb: (err: Error, res: MultiResponse) => void ): void; /** * Query on multiple index - * @param queries index name, query and query parameters - * return {Promise} * https://github.com/algolia/algoliasearch-client-js#multiple-queries---multiplequeries */ - search(queries: { - indexName: string; - query: string; - params: AlgoliaQueryParameters; - }[]): Promise; + search( + queries: { + indexName: string; + query: string; + params: QueryParameters; + }[] + ): Promise; + /** + * Query for facet values of a specific facet + */ + searchForFacetValues( + queries: [{ indexName: string; params: SearchForFacetValues.Parameters }] + ): Promise; /** * clear browser cache * https://github.com/algolia/algoliasearch-client-js#cache @@ -107,336 +65,265 @@ declare namespace algoliasearch { */ getExtraHeader(name: string): string; /** - * remove an extra header for all upcoming requests + * Remove an extra header for all upcoming requests */ unsetExtraHeader(name: string): void; /** * List all your indices along with their associated information (number of entries, disk size, etc.) - * @param cb(err, res) * https://github.com/algolia/algoliasearch-client-js#list-indices---listindexes */ listIndexes(cb: (err: Error, res: any) => void): void; /** * List all your indices along with their associated information (number of entries, disk size, etc.) - * return {Promise} * https://github.com/algolia/algoliasearch-client-js#list-indices---listindexes */ listIndexes(): Promise; /** * Delete a specific index - * @param name - * @param cb(err, res) * https://github.com/algolia/algoliasearch-client-js#delete-index---deleteindex */ - deleteIndex(name: string, cb: (err: Error, res: any) => void): void; + deleteIndex(name: string, cb: (err: Error, res: Task) => void): void; /** * Delete a specific index - * @param name - * return {Promise} * https://github.com/algolia/algoliasearch-client-js#delete-index---deleteindex */ - deleteIndex(name: string): Promise; + deleteIndex(name: string): Promise; /** - * Copy an index from a specific index to a new one - * @param from origin index - * @param to destination index - * @param cb(err, res) + * Copy an index from a specific index to a new one * https://github.com/algolia/algoliasearch-client-js#copy-index---copyindex */ copyIndex( from: string, to: string, - cb: (err: Error, res: any) => void + cb: (err: Error, res: Task) => void ): void; /** - * Copy an index from a specific index to a new one - * @param from origin index - * @param to destination index - * return {Promise} + * Copy settings of an index from a specific index to a new one * https://github.com/algolia/algoliasearch-client-js#copy-index---copyindex */ - copyIndex(from: string, to: string): Promise; + copyIndex( + from: string, + to: string, + scope: ('settings' | 'synonyms' | 'rules')[], + cb: (err: Error, res: Task) => void + ): void; + /** + * Copy settings of an index from a specific index to a new one + * https://github.com/algolia/algoliasearch-client-js#copy-index---copyindex + */ + copyIndex( + from: string, + to: string, + scope?: ('settings' | 'synonyms' | 'rules')[] + ): Promise; /** * Move index to a new one (and will overwrite the original one) - * @param from origin index - * @param to destination index - * @param cb(err, res) * https://github.com/algolia/algoliasearch-client-js#move-index---moveindex */ moveIndex( from: string, to: string, - cb: (err: Error, res: any) => void + cb: (err: Error, res: Task) => void ): void; /** * Move index to a new one (and will overwrite the original one) - * @param from origin index - * @param to destination index - * return {Promise} * https://github.com/algolia/algoliasearch-client-js#move-index---moveindex */ - moveIndex(from: string, to: string): Promise; + moveIndex(from: string, to: string): Promise; /** * Generate a public API key - * @param key api key - * @param filters * https://github.com/algolia/algoliasearch-client-js#generate-key---generatesecuredapikey */ - generateSecuredApiKey( - key: string, - filters: AlgoliaSecuredApiOptions - ): string; + generateSecuredApiKey(key: string, filters: SecuredApiOptions): string; /** * Perform multiple operations with one API call to reduce latency - * @param action - * @param cb(err, res) * https://github.com/algolia/algoliasearch-client-js#custom-batch---batch */ - batch(action: AlgoliaAction[], cb: (err: Error, res: any) => void): void; + batch(action: Action[], cb: (err: Error, res: Task) => void): void; /** * Perform multiple operations with one API call to reduce latency - * @param action - * return {Promise} * https://github.com/algolia/algoliasearch-client-js#custom-batch---batch */ - batch(action: AlgoliaAction[]): Promise; + batch(action: Action[]): Promise; /** * Lists global API Keys - * @param cb(err, res) * https://github.com/algolia/algoliasearch-client-js#backup--export-an-index---browse */ listApiKeys(cb: (err: Error, res: any) => void): void; /** * Lists global API Keys - * return {Promise} * https://github.com/algolia/algoliasearch-client-js#backup--export-an-index---browse */ listApiKeys(): Promise; /** * Add global API Keys - * @param scopes - * @param cb(err, res) * https://github.com/algolia/algoliasearch-client-js#add-user-key---addapikey */ - addApiKey(scopes: string[], cb: (err: Error, res: any) => void): void; + addApiKey(scopes: string[], cb: (err: Error, res: Task) => void): void; /** * Add global API Key - * @param scopes - * @param options - * @param cb(err, res) * https://github.com/algolia/algoliasearch-client-js#add-user-key---addapikey */ addApiKey( scopes: string[], - options: AlgoliaApiKeyOptions, - cb: (err: Error, res: any) => void + options: ApiKeyOptions, + cb: (err: Error, res: Task) => void ): void; /** * Add global API Keys - * @param scopes - * @param options - * return {Promise} * https://github.com/algolia/algoliasearch-client-js#add-user-key---addapikey */ - addApiKey(scopes: string[], options?: AlgoliaApiKeyOptions): Promise; + addApiKey(scopes: string[], options?: ApiKeyOptions): Promise; /** * Update global API key - * @param key - * @param scopes - * @param cb(err, res) * https://github.com/algolia/algoliasearch-client-js#update-user-key---updateapikey */ updateApiKey( key: string, scopes: string[], - cb: (err: Error, res: any) => void + cb: (err: Error, res: Task) => void ): void; /** * Update global API key - * @param key - * @param scopes - * @param options - * @param cb(err, res) * https://github.com/algolia/algoliasearch-client-js#update-user-key---updateapikey */ updateApiKey( key: string, scopes: string[], - options: AlgoliaApiKeyOptions, - cb: (err: Error, res: any) => void + options: ApiKeyOptions, + cb: (err: Error, res: Task) => void ): void; /** * Update global API key - * @param key - * @param scopes - * @param options - * return {Promise} * https://github.com/algolia/algoliasearch-client-js#update-user-key---updateapikey */ updateApiKey( key: string, scopes: string[], - options?: AlgoliaApiKeyOptions - ): Promise; + options?: ApiKeyOptions + ): Promise; /** * Gets the rights of a global key - * @param key - * @param cb(err, res) * https://github.com/algolia/algoliasearch-client-js#update-user-key---updateapikey */ getApiKey(key: string, cb: (err: Error, res: any) => void): void; /** * Gets the rights of a global key - * @param key - * return {Promise} * https://github.com/algolia/algoliasearch-client-js#update-user-key---updateapikey */ getApiKey(key: string): Promise; /** * Deletes a global key - * @param key - * @param cb(err,res) * https://github.com/algolia/algoliasearch-client-js#delete-user-key---deleteapikey */ - deleteApiKey(key: string, cb: (err: Error, res: any) => void): void; + deleteApiKey(key: string, cb: (err: Error, res: Task) => void): void; /** * Deletes a global key - * @param key - * return {Promise} * https://github.com/algolia/algoliasearch-client-js#delete-user-key---deleteapikey */ - deleteApiKey(key: string): Promise; + deleteApiKey(key: string): Promise; /** * Get 1000 last events - * @param options - * @param cb(err, res) * https://github.com/algolia/algoliasearch-client-js#get-logs---getlogs */ - getLogs(options: LogsOptions, cb: (err: Error, res: any) => void): void; + getLogs( + options: LogsOptions, + cb: (err: Error, res: { logs: Log[] }) => void + ): void; /** * Get 1000 last events - * @param options - * return {Promise} * https://github.com/algolia/algoliasearch-client-js#get-logs---getlogs */ - getLogs(options: LogsOptions): Promise; + getLogs(options: LogsOptions): Promise<{ logs: Log[] }>; } /** * Interface for the index algolia object */ - interface AlgoliaIndex { + interface Index { + indexName: string; /** * Gets a specific object - * @param objectID - * @param cb(err, res) * https://github.com/algolia/algoliasearch-client-js#find-by-ids---getobjects */ - getObject(objectID: string, cb: (err: Error, res: any) => void): void; + getObject(objectID: string, cb: (err: Error, res: {}) => void): void; /** * Gets specific attributes from an object - * @param objectID - * @param attributes - * @param cb(err, res) * https://github.com/algolia/algoliasearch-client-js#find-by-ids---getobjects */ getObject( objectID: string, attributes: string[], - cb: (err: Error, res: any) => void + cb: (err: Error, res: {}) => void ): void; /** * Gets a list of objects - * @param objectIDs - * @param cb(err, res) * https://github.com/algolia/algoliasearch-client-js#find-by-ids---getobjects */ - getObjects(objectIDs: string[], cb: (err: Error, res: any) => void): void; + getObjects( + objectIDs: string[], + cb: (err: Error, res: { results: {}[] }) => void + ): void; /** * Add a specific object - * @param object without objectID - * @param cb(err, res) * https://github.com/algolia/algoliasearch-client-js#add-objects---addobjects */ - addObject(object: {}, cb: (err: Error, res: any) => void): void; + addObject(object: {}, cb: (err: Error, res: Task) => void): void; /** * Add a list of objects - * @param object with objectID - * @param objectID - * @param cb(err, res) * https://github.com/algolia/algoliasearch-client-js#add-objects---addobjects */ addObject( object: {}, objectID: string, - cb: (err: Error, res: any) => void + cb: (err: Error, res: Task) => void ): void; /** * Add list of objects - * @param objects - * @param cb(err, res) * https://github.com/algolia/algoliasearch-client-js#add-objects---addobjects */ - addObjects(objects: {}[], cb: (err: Error, res: any) => void): void; + addObjects(objects: {}[], cb: (err: Error, res: Task) => void): void; /** * Add or replace a specific object - * @param object - * @param cb(err, res) * https://github.com/algolia/algoliasearch-client-js#update-objects---saveobjects */ - saveObject(object: {}, cb: (err: Error, res: any) => void): void; + saveObject(object: {}, cb: (err: Error, res: Task) => void): void; /** * Add or replace several objects - * @param objects - * @param cb(err, res) * https://github.com/algolia/algoliasearch-client-js#update-objects---saveobjects */ - saveObjects(objects: object[], cb: (err: Error, res: any) => void): void; + saveObjects(objects: object[], cb: (err: Error, res: Task) => void): void; /** * Update parameters of a specific object - * @param object - * @param cb(err, res) * https://github.com/algolia/algoliasearch-client-js#update-objects---saveobjects */ - partialUpdateObject(object: {}, cb: (err: Error, res: any) => void): void; + partialUpdateObject(object: {}, cb: (err: Error, res: Task) => void): void; + partialUpdateObject(object: {}, createIfNotExists: boolean, cb: (err: Error, res: Task) => void): void; /** * Update parameters of a list of objects - * @param objects - * @param cb(err, res) * https://github.com/algolia/algoliasearch-client-js#update-objects---saveobjects */ - partialUpdateObjects( - objects: {}[], - cb: (err: Error, res: any) => void - ): void; + partialUpdateObjects(objects: {}[], cb: (err: Error, res: Task) => void): void; + partialUpdateObjects(objects: {}[], createIfNotExists: boolean, cb: (err: Error, res: Task) => void): void; /** * Delete a specific object - * @param objectID - * @param cb(err, res) * https://github.com/algolia/algoliasearch-client-js#delete-objects---deleteobjects */ - deleteObject(objectID: string, cb: (err: Error, res: any) => void): void; + deleteObject(objectID: string, cb: (err: Error, res: Task) => void): void; /** * Delete a list of objects - * @param objectIDs - * @param cb(err, res) * https://github.com/algolia/algoliasearch-client-js#delete-objects---deleteobjects */ deleteObjects( objectIDs: string[], - cb: (err: Error, res: any) => void + cb: (err: Error, res: Task) => void ): void; /** * Delete objects that matches the query - * @param query - * @param cb(err, res) * https://github.com/algolia/algoliasearch-client-js#delete-by-query---deletebyquery */ deleteByQuery(query: string, cb: (err: Error, res: any) => void): void; /** * Delete objects that matches the query - * @param query - * @param params of the object - * @param cb(err, res) * https://github.com/algolia/algoliasearch-client-js#delete-by-query---deletebyquery */ deleteByQuery( @@ -446,34 +333,26 @@ declare namespace algoliasearch { ): void; /** * Delete objects that matches the query - * @param query - * @param params of the object - * @param cb(err, res) * https://github.com/algolia/algoliasearch-client-js#delete-by-query---deleteby */ - deleteBy(params: {}, cb: (err: Error, res: any) => void): void; + deleteBy(params: {}, cb: (err: Error, res: Task) => void): void; /** * Wait for an indexing task to be compete - * @param taskID - * @param cb(err, res) * https://github.com/algolia/algoliasearch-client-js#wait-for-operations---waittask */ - waitTask(taskID: number, cb: (err: Error, res: any) => void): void; + waitTask(taskID: number, cb: (err: Error, res: TaskStatus) => void): void; /** * Get an index settings - * @param cb(err, res) * https://github.com/algolia/algoliasearch-client-js#get-settings---getsettings */ - getSettings(cb: (err: Error, res: any) => void): void; + getSettings(cb: (err: Error, res: IndexSettings) => void): void; /** * Set an index settings - * @param settings - * @param cb(err, res) * https://github.com/algolia/algoliasearch-client-js#set-settings---setsettings */ setSettings( - settings: AlgoliaIndexSettings, - cb: (err: Error, res: any) => void + settings: IndexSettings, + cb: (err: Error, res: Task) => void ): void; /** * Clear cache of an index @@ -482,66 +361,53 @@ declare namespace algoliasearch { clearCache(): void; /** * Clear an index content - * @param cb(err, res) * https://github.com/algolia/algoliasearch-client-js#clear-index---clearindex */ - clearIndex(cb: (err: Error, res: any) => void): void; + clearIndex(cb: (err: Error, res: Task) => void): void; /** * Save a synonym object - * @param synonym - * @param options - * @param cb(err, res) * https://github.com/algolia/algoliasearch-client-js#save-synonym---savesynonym */ saveSynonym( - synonym: AlgoliaSynonym, + synonym: Synonym, options: SynonymOption, - cb: (err: Error, res: any) => void + cb: (err: Error, res: Task) => void ): void; /** * Save a synonym object - * @param synonyms - * @param options - * @param cb(err, res) */ batchSynonyms( - synonyms: AlgoliaSynonym[], + synonyms: Synonym[], options: SynonymOption, - cb: (err: Error, res: any) => void + cb: (err: Error, res: Task) => void ): void; /** * Delete a specific synonym - * @param identifier - * @param options - * @param cb(err, res) * https://github.com/algolia/algoliasearch-client-js#batch-synonyms---batchsynonyms */ deleteSynonym( identifier: string, options: SynonymOption, - cb: (err: Error, res: any) => void + cb: (err: Error, res: Task) => void ): void; /** * Clear all synonyms of an index - * @param options - * @param cb(err, res) * https://github.com/algolia/algoliasearch-client-js#clear-all-synonyms---clearsynonyms */ clearSynonyms( options: SynonymOption, - cb: (err: Error, res: any) => void + cb: (err: Error, res: Task) => void ): void; /** * Get a specific synonym - * @param identifier - * @param cb(err, res) * https://github.com/algolia/algoliasearch-client-js#get-synonym---getsynonym */ - getSynonym(identifier: string, cb: (err: Error, res: any) => void): void; + getSynonym( + identifier: string, + cb: (err: Error, res: Synonym) => void + ): void; /** * Search a synonyms - * @param options - * @param cb(err, res) * https://github.com/algolia/algoliasearch-client-js#search-synonyms---searchsynonyms */ searchSynonyms( @@ -550,57 +416,42 @@ declare namespace algoliasearch { ): void; /** * Save a rule object - * @param rule - * @param options - * @param cb(err, res) * https://github.com/algolia/algoliasearch-client-js#save-rule---saverule */ saveRule( - rule: AlgoliaRule, + rule: Rule, options: RuleOption, - cb: (err: Error, res: any) => void + cb: (err: Error, res: Task) => void ): void; /** * Save a rule object - * @param rules - * @param options - * @param cb(err, res) */ batchRules( - rules: AlgoliaRule[], + rules: Rule[], options: RuleOption, - cb: (err: Error, res: any) => void + cb: (err: Error, res: Task) => void ): void; /** * Delete a specific rule - * @param identifier - * @param options - * @param cb(err, res) * https://github.com/algolia/algoliasearch-client-js#batch-rules---batchrules */ deleteRule( identifier: string, options: RuleOption, - cb: (err: Error, res: any) => void + cb: (err: Error, res: Task) => void ): void; /** * Clear all rules of an index - * @param options - * @param cb(err, res) * https://github.com/algolia/algoliasearch-client-js#clear-all-rules---clearrules */ - clearRules(options: RuleOption, cb: (err: Error, res: any) => void): void; + clearRules(options: RuleOption, cb: (err: Error, res: Task) => void): void; /** * Get a specific rule - * @param identifier - * @param cb(err, res) * https://github.com/algolia/algoliasearch-client-js#get-rule---getrule */ - getRule(identifier: string, cb: (err: Error, res: any) => void): void; + getRule(identifier: string, cb: (err: Error, res: Rule) => void): void; /** * Search a rules - * @param options - * @param cb(err, res) * https://github.com/algolia/algoliasearch-client-js#search-rules---searchrules */ searchRules( @@ -609,412 +460,286 @@ declare namespace algoliasearch { ): void; /** * List index user keys - * @param cb(err, res) * https://github.com/algolia/algoliasearch-client-js#list-api-keys---listapikeys */ listApiKeys(cb: (err: Error, res: any) => void): void; /** * Add key for this index - * @param scopes - * @param cb(err, res) * https://github.com/algolia/algoliasearch-client-js#add-user-key---addapikey */ - addApiKey(scopes: string[], cb: (err: Error, res: any) => void): void; + addApiKey(scopes: string[], cb: (err: Error, res: Task) => void): void; /** * Add key for this index - * @param scopes - * @param options - * @param cb(err, res) * https://github.com/algolia/algoliasearch-client-js#add-user-key---addapikey */ addApiKey( scopes: string[], - options: AlgoliaApiKeyOptions, - cb: (err: Error, res: any) => void + options: ApiKeyOptions, + cb: (err: Error, res: Task) => void ): void; /** * Update a key for this index - * @param key - * @param scopes - * @param cb(err, res) * https://github.com/algolia/algoliasearch-client-js#update-user-key---updateapikey */ updateApiKey( key: string, scopes: string[], - cb: (err: Error, res: any) => void + cb: (err: Error, res: Task) => void ): void; /** * Update a key for this index - * @param key - * @param scopes - * @param options - * @param cb(err, res) * https://github.com/algolia/algoliasearch-client-js#update-user-key---updateapikey */ updateApiKey( key: string, scopes: string[], - options: AlgoliaApiKeyOptions, - cb: (err: Error, res: any) => void + options: ApiKeyOptions, + cb: (err: Error, res: Task) => void ): void; /** * Gets the rights of an index specific key - * @param key - * @param cb(err, res) * https://github.com/algolia/algoliasearch-client-js#get-key-permissions---getapikeyacl */ getApiKey(key: string, cb: (err: Error, res: any) => void): void; /** * Deletes an index specific key - * @param key - * @param cb(err, res) * https://github.com/algolia/algoliasearch-client-js#delete-user-key---deleteapikey */ - deleteApiKey(key: string, cb: (err: Error, res: any) => void): void; + deleteApiKey(key: string, cb: (err: Error, res: Task) => void): void; /** * Gets specific attributes from an object - * @param objectID - * @param attributes - * return {Promise} * https://github.com/algolia/algoliasearch-client-js#find-by-ids---getobjects */ - getObject(objectID: string, attributes?: string[]): Promise; + getObject(objectID: string, attributes?: string[]): Promise<{}>; /** * Gets a list of objects - * @param objectIDs - * return {Promise} * https://github.com/algolia/algoliasearch-client-js#find-by-ids---getobjects */ - getObjects(objectIDs: string[]): Promise; + getObjects(objectIDs: string[]): Promise<{ results: {}[] }>; /** * Add a list of objects - * @param object with objectID - * @param objectID - * return {Promise} * https://github.com/algolia/algoliasearch-client-js#add-objects---addobjects */ - addObject(object: {}, objectID?: string): Promise; + addObject(object: {}, objectID?: string): Promise; /** * Add list of objects - * @param objects - * return {Promise} * https://github.com/algolia/algoliasearch-client-js#add-objects---addobjects */ - addObjects(objects: {}[]): Promise; + addObjects(objects: {}[]): Promise; /** * Add or replace a specific object - * @param object - * return {Promise} * https://github.com/algolia/algoliasearch-client-js#update-objects---saveobjects */ - saveObject(object: {}): Promise; + saveObject(object: {}): Promise; /** * Add or replace several objects - * @param objects - * return {Promise} * https://github.com/algolia/algoliasearch-client-js#update-objects---saveobjects */ - saveObjects(objects: object[]): Promise; + saveObjects(objects: object[]): Promise; /** * Update parameters of a specific object - * @param object - * return {Promise} * https://github.com/algolia/algoliasearch-client-js#update-objects---saveobjects */ - partialUpdateObject(object: {}): Promise; + partialUpdateObject(object: {}): Promise; + partialUpdateObject(object: {}, createIfNotExists: boolean): Promise; /** * Update parameters of a list of objects - * @param objects - * return {Promise} * https://github.com/algolia/algoliasearch-client-js#update-objects---saveobjects */ - partialUpdateObjects(objects: {}[]): Promise; + partialUpdateObjects(objects: {}[]): Promise; + partialUpdateObjects(objects: {}[], createIfNotExists?: boolean): Promise; /** * Delete a specific object - * @param objectID - * return {Promise} * https://github.com/algolia/algoliasearch-client-js#delete-objects---deleteobjects */ - deleteObject(objectID: string): Promise; + deleteObject(objectID: string): Promise; /** * Delete a list of objects - * @param objectIDs - * return {Promise} * https://github.com/algolia/algoliasearch-client-js#delete-objects---deleteobjects */ - deleteObjects(objectIDs: string[]): Promise; + deleteObjects(objectIDs: string[]): Promise; /** * Delete objects that matches the query - * @param query - * @param params of the object - * return {Promise} * https://github.com/algolia/algoliasearch-client-js#delete-by-query---deletebyquery */ deleteByQuery(query: string, params?: {}): Promise; /** * Delete objects that matches the query - * @param params of the search - * return {Promise} * https://www.algolia.com/doc/api-reference/api-methods/delete-by-query/ */ - deleteBy(params: {}): Promise; + deleteBy(params: {}): Promise; /** * Wait for an indexing task to be compete - * @param taskID - * return {Promise} * https://github.com/algolia/algoliasearch-client-js#wait-for-operations---waittask */ - waitTask(taskID: number): Promise; + waitTask(taskID: number): Promise; /** * Get an index settings - * return {Promise} * https://github.com/algolia/algoliasearch-client-js#get-settings---getsettings */ - getSettings(): Promise; + getSettings(): Promise; /** * Set an index settings - * @param settings - * return {Promise} * https://github.com/algolia/algoliasearch-client-js#set-settings---setsettings */ - setSettings(settings: AlgoliaIndexSettings): Promise; + setSettings(settings: IndexSettings): Promise; /** * Search in an index - * @param params query parameter - * return {Promise} - * @param err() error callback * https://github.com/algolia/algoliasearch-client-js#search-in-an-index---search */ - search(params: AlgoliaQueryParameters): Promise; + search(params: QueryParameters): Promise; /** * Search in an index - * @param params query parameter - * @param cb(err, res) - * @param err() error callback * https://github.com/algolia/algoliasearch-client-js#search-in-an-index---search */ search( - params: AlgoliaQueryParameters, - cb: (err: Error, res: AlgoliaResponse) => void + params: QueryParameters, + cb: (err: Error, res: Response) => void ): void; /** * Search in an index - * @param params query parameter - * return {Promise} - * @param err() error callback - * https://www.algolia.com/doc/api-reference/api-methods/search-for-facet-values/ - */ - searchForFacetValues({ - facetName, - facetQuery, - ...qp, - }: { - facetName: string; - facetQuery: string; - } & AlgoliaQueryParameters): Promise; - /** - * Search in an index - * @param params query parameter - * @param cb(err, res) - * @param err() error callback * https://www.algolia.com/doc/api-reference/api-methods/search-for-facet-values/ */ searchForFacetValues( - { - facetName, - facetQuery, - ...qp, - }: { - facetName: string; - facetQuery: string; - } & AlgoliaQueryParameters, - cb: (err: Error, res: any) => void + options: SearchForFacetValues.Parameters + ): Promise; + /** + * Search in an index + * https://www.algolia.com/doc/api-reference/api-methods/search-for-facet-values/ + */ + searchForFacetValues( + options: SearchForFacetValues.Parameters, + cb: (err: Error, res: SearchForFacetValues.Response) => void ): void; /** * Browse an index - * @param query - * @param cb(err, content) * https://github.com/algolia/algoliasearch-client-js#backup--export-an-index---browse */ - browse(query: string, cb: (err: Error, res: any) => void): void; + browse(query: string, cb: (err: Error, res: BrowseResponse) => void): void; /** * Browse an index - * @param query - * return {Promise} * https://github.com/algolia/algoliasearch-client-js#backup--export-an-index---browse */ - browse(query: string): Promise; + browse(query: string): Promise; /** * Browse an index from a cursor - * @param cursor - * @param cb(err, content) * https://github.com/algolia/algoliasearch-client-js#backup--export-an-index---browse */ - browseFrom(cursor: string, cb: (err: Error, res: any) => void): void; + browseFrom( + cursor: string, + cb: (err: Error, res: BrowseResponse) => void + ): void; /** * Browse an index from a cursor - * @param cursor - * return {Promise} * https://github.com/algolia/algoliasearch-client-js#backup--export-an-index---browse */ - browseFrom(cursor: string): Promise; + browseFrom(cursor: string): Promise; /** * Browse an entire index - * return Promise * https://github.com/algolia/algoliasearch-client-js#backup--export-an-index---browse */ - browseAll(): Promise; + browseAll(): Promise; /** * Clear an index content - * return {Promise} * https://github.com/algolia/algoliasearch-client-js#clear-index---clearindex */ - clearIndex(): Promise; + clearIndex(): Promise; /** * Save a synonym object - * @param synonym - * @param options - * return {Promise} * https://github.com/algolia/algoliasearch-client-js#save-synonym---savesynonym */ - saveSynonym(synonym: AlgoliaSynonym, options: SynonymOption): Promise; + saveSynonym(synonym: Synonym, options: SynonymOption): Promise; /** * Save a synonym object - * @param synonyms - * @param options - * return {Promise} */ - batchSynonyms( - synonyms: AlgoliaSynonym[], - options: SynonymOption - ): Promise; + batchSynonyms(synonyms: Synonym[], options: SynonymOption): Promise; /** * Delete a specific synonym - * @param identifier - * @param options - * return {Promise} * https://github.com/algolia/algoliasearch-client-js#batch-synonyms---batchsynonyms */ - deleteSynonym(identifier: string, options: SynonymOption): Promise; + deleteSynonym(objectID: string, options: SynonymOption): Promise; /** * Clear all synonyms of an index - * @param options - * return {Promise} * https://github.com/algolia/algoliasearch-client-js#clear-all-synonyms---clearsynonyms */ - clearSynonyms(options: SynonymOption): Promise; + clearSynonyms(options: SynonymOption): Promise; /** * Get a specific synonym - * @param identifier - * return {Promise} * https://github.com/algolia/algoliasearch-client-js#get-synonym---getsynonym */ - getSynonym(identifier: string): Promise; + getSynonym(objectID: string): Promise; /** * Search a synonyms - * @param options - * return {Promise} * https://github.com/algolia/algoliasearch-client-js#search-synonyms---searchsynonyms */ searchSynonyms(options: SearchSynonymOptions): Promise; /** * Save a rule object - * @param rule - * @param options - * return {Promise} * https://github.com/algolia/algoliasearch-client-js#save-rule---saverule */ - saveRule(rule: AlgoliaRule, options: RuleOption): Promise; + saveRule(rule: Rule, options: RuleOption): Promise; /** * Save a rule object - * @param rules - * @param options - * return {Promise} */ - batchRules(rules: AlgoliaRule[], options: RuleOption): Promise; + batchRules(rules: Rule[], options: RuleOption): Promise; /** * Delete a specific rule - * @param identifier - * @param options - * return {Promise} * https://github.com/algolia/algoliasearch-client-js#batch-rules---batchrules */ - deleteRule(identifier: string, options: RuleOption): Promise; + deleteRule(identifier: string, options: RuleOption): Promise; /** * Clear all query rules of an index - * @param options - * return {Promise} * https://github.com/algolia/algoliasearch-client-js#clear-all-rules---clearrules */ - clearRules(options: RuleOption): Promise; + clearRules(options: RuleOption): Promise; /** * Get a specific query rule - * @param identifier - * return {Promise} * https://github.com/algolia/algoliasearch-client-js#get-rule---getrule */ - getRule(identifier: string): Promise; + getRule(identifier: string): Promise; /** * Search for query rules - * @param options - * return {Promise} * https://github.com/algolia/algoliasearch-client-js#search-rules---searchrules */ searchRules(options: SearchRuleOptions): Promise; /** * List index user keys - * return {Promise} * https://github.com/algolia/algoliasearch-client-js#list-api-keys---listapikeys */ listApiKeys(): Promise; /** * Add key for this index - * @param scopes - * @param options - * return {Promise} * https://github.com/algolia/algoliasearch-client-js#add-user-key---addapikey */ - addApiKey(scopes: string[], options?: AlgoliaApiKeyOptions): Promise; + addApiKey(scopes: string[], options?: ApiKeyOptions): Promise; /** * Update a key for this index - * @param key - * @param scopes - * return {Promise} * https://github.com/algolia/algoliasearch-client-js#update-user-key---updateapikey */ - updateApiKey(key: string, scopes: string[]): Promise; + updateApiKey(key: string, scopes: string[]): Promise; /** * Update a key for this index - * @param key - * @param scopes - * @param options - * return {Promise} * https://github.com/algolia/algoliasearch-client-js#update-user-key---updateapikey */ updateApiKey( key: string, scopes: string[], - options: AlgoliaApiKeyOptions - ): Promise; + options: ApiKeyOptions + ): Promise; /** * Gets the rights of an index specific key - * @param key - * return {Promise} * https://github.com/algolia/algoliasearch-client-js#get-key-permissions---getapikeyacl */ getApiKey(key: string): Promise; /** * Deletes an index specific key - * @param key - * return {Promise} * https://github.com/algolia/algoliasearch-client-js#delete-user-key---deleteapikey */ - deleteApiKey(key: string): Promise; + deleteApiKey(key: string): Promise; } - /* -Interface describing available options when initializing a client -*/ + /** + * Interface describing available options when initializing a client + */ interface ClientOptions { /** * Timeout for requests to our servers, in milliseconds @@ -1029,20 +754,20 @@ Interface describing available options when initializing a client */ protocol?: string; /** - * (node only) httpAgent instance to use when communicating with Algolia servers. + * (node only) httpAgent instance to use when communicating with servers. * https://github.com/algolia/algoliasearch-client-js#client-options */ httpAgent?: any; /** - * read: array of read hosts to use to call Algolia servers, computed automatically - * write: array of read hosts to use to call Algolia servers, computed automatically + * read: array of read hosts to use to call servers, computed automatically + * write: array of read hosts to use to call servers, computed automatically * https://github.com/algolia/algoliasearch-client-js#client-options */ hosts?: { read?: string[]; write?: string[] }; } - /* -Interface describing options available for gettings the logs -*/ + /** + * Interface describing options available for gettings the logs + */ interface LogsOptions { /** * Specify the first entry to retrieve (0-based, 0 is the most recent log entry). @@ -1071,11 +796,15 @@ Interface describing options available for gettings the logs * https://github.com/algolia/algoliasearch-client-js#get-logs---getlogs */ type?: string; + /** + * The index to request logs from + */ + indexName?: string; } /** * Describe the action object used for batch operation */ - interface AlgoliaAction { + interface Action { /** * Type of the batch action * https://github.com/algolia/algoliasearch-client-js#custom-batch---batch @@ -1102,7 +831,7 @@ Interface describing options available for gettings the logs /** * Describes the option used when creating user key */ - interface AlgoliaApiKeyOptions { + interface ApiKeyOptions { /** * Add a validity period. The key will be valid for a specific period of time (in seconds). * https://github.com/algolia/algoliasearch-client-js#add-user-key---addapikey @@ -1132,7 +861,7 @@ Interface describing options available for gettings the logs * Specify the list of query parameters * https://github.com/algolia/algoliasearch-client-js#add-user-key---addapikey */ - queryParameters?: AlgoliaQueryParameters; + queryParameters?: QueryParameters; /** * Specify a description to describe where the key is used. * https://github.com/algolia/algoliasearch-client-js#add-user-key---addapikey @@ -1225,9 +954,9 @@ Interface describing options available for gettings the logs */ hitsPerPage?: number; } - interface AlgoliaBrowseResponse { + interface BrowseResponse { cursor?: string; - hits: any[]; + hits: {}[]; params: string; query: string; processingTimeMS: number; @@ -1235,7 +964,7 @@ Interface describing options available for gettings the logs /** * Describes a synonym object */ - interface AlgoliaSynonym { + interface Synonym { /** * ObjectID of the synonym * https://github.com/algolia/algoliasearch-client-js#save-synonym---savesynonym @@ -1255,7 +984,7 @@ Interface describing options available for gettings the logs /** * Describes a query rule object */ - interface AlgoliaRule { + interface Rule { /** * ObjectID of the synonym * https://github.com/algolia/algoliasearch-client-js#save-synonym---savesynonym @@ -1341,7 +1070,7 @@ Interface describing options available for gettings the logs /** * Describes the options used when generating new api keys */ - interface AlgoliaSecuredApiOptions { + interface SecuredApiOptions { /** * Filter the query with numeric, facet or/and tag filters * default: "" @@ -1364,266 +1093,7 @@ Interface describing options available for gettings the logs */ userToken?: string; } - - /** - * Describes the settings available for configure your index - */ - interface AlgoliaIndexSettings { - /** - * The list of attributes you want index - * default: * - * https://github.com/algolia/algoliasearch-client-js#attributestoindex - */ - attributesToIndex?: string[]; - /** - * The list of attributes you want to use for faceting - * default: null - * https://github.com/algolia/algoliasearch-client-js#attributesforfaceting - */ - attributesForFaceting?: string[]; - /** - * The list of attributes that cannot be retrieved at query time - * default: null - * https://github.com/algolia/algoliasearch-client-js#unretrievableattributes - */ - unretrievableAttributes?: string[]; - /** - * List of attributes you want to use for textual search - * default: [] - * https://github.com/algolia/algoliasearch-client-js#searchableattributes - */ - searchableAttributes?: string[]; - /** - * A string that contains the list of attributes you want to retrieve in order to minimize the size of the JSON answer - * default: * - * https://github.com/algolia/algoliasearch-client-js#attributestoretrieve - */ - attributesToRetrieve?: string[]; - /** - * Controls the way results are sorted - * default: ['typo', 'geo', 'words', 'filters', 'proximity', 'attribute', 'exact', 'custom'] - * https://github.com/algolia/algoliasearch-client-js#ranking - */ - ranking?: string[]; - /** - * Lets you specify part of the ranking - * default: [] - * https://github.com/algolia/algoliasearch-client-js#customranking - */ - customRanking?: string[]; - /** - * The list of indices on which you want to replicate all write operations - * default: [] - * https://github.com/algolia/algoliasearch-client-js#replicas - */ - replicas?: string[]; - /** - * Limit the number of facet values returned for each facet - * default: "" - * https://github.com/algolia/algoliasearch-client-js#maxvaluesperfacet - */ - maxValuesPerFacet?: string; - /** - * Default list of attributes to highlight. If set to null, all indexed attributes are highlighted. - * default: null - * https://github.com/algolia/algoliasearch-client-js#attributestohighlight - */ - attributesToHighlight?: string[]; - /** - * Default list of attributes to snippet alongside the number of words to return - * default: null - * https://github.com/algolia/algoliasearch-client-js#attributestosnippet - */ - attributesToSnippet?: string[]; - /** - * Specify the string that is inserted before the highlighted parts in the query result - * default: - * https://github.com/algolia/algoliasearch-client-js#highlightpretag - */ - highlightPreTag?: string; - /** - * Specify the string that is inserted after the highlighted parts in the query result - * default: - * https://github.com/algolia/algoliasearch-client-js#highlightposttag - */ - highlightPostTag?: string; - /** - * String used as an ellipsis indicator when a snippet is truncated. - * default: … - * https://github.com/algolia/algoliasearch-client-js#snippetellipsistext - */ - snippetEllipsisText?: string; - /** - * If set to true, restrict arrays in highlights and snippets to items that matched the query at least partially else return all array items in highlights and snippets - * default: false - * https://github.com/algolia/algoliasearch-client-js#restricthighlightandsnippetarrays - */ - restrictHighlightAndSnippetArrays?: boolean; - /** - * Pagination parameter used to select the number of hits per page - * default: 20 - * https://github.com/algolia/algoliasearch-client-js#hitsperpage - */ - hitsPerPage?: number; - /** - * The minimum number of characters needed to accept one typo - * default: 4 - * https://github.com/algolia/algoliasearch-client-js#minwordsizefor1typo - */ - minWordSizefor1Typo?: number; - /** - * The minimum number of characters needed to accept two typos. - * default: 8 - * https://github.com/algolia/algoliasearch-client-js#highlightposttag - */ - minWordSizefor2Typos?: number; - /** - * This option allows you to control the number of typos allowed in the result set - * default: true - * 'true' The typo tolerance is enabled and all matching hits are retrieved (default behavior). - * 'false' The typo tolerance is disabled. All results with typos will be hidden. - * 'min' Only keep results with the minimum number of typos. For example, if one result matches without typos, then all results with typos will be hidden. - * 'strict' Hits matching with 2 typos are not retrieved if there are some matching without typos. - * https://github.com/algolia/algoliasearch-client-js#typotolerance - */ - typoTolerance?: any; - /** - * If set to false, disables typo tolerance on numeric tokens (numbers). - * default: true - * https://github.com/algolia/algoliasearch-client-js#allowtyposonnumerictokens - */ - allowTyposOnNumericTokens?: boolean; - /** - * If set to true, plural won't be considered as a typo - * default: false - * https://github.com/algolia/algoliasearch-client-js#ignoreplurals - */ - ignorePlurals?: boolean; - /** - * List of attributes on which you want to disable typo tolerance - * default: "" - * https://github.com/algolia/algoliasearch-client-js#disabletypotoleranceonattributes - */ - disableTypoToleranceOnAttributes?: string; - /** - * Specify the separators (punctuation characters) to index. - * default: "" - * https://github.com/algolia/algoliasearch-client-js#separatorstoindex - */ - separatorsToIndex?: string; - /** - * Selects how the query words are interpreted - * default: 'prefixLast' - * 'prefixAll' All query words are interpreted as prefixes. This option is not recommended. - * 'prefixLast' Only the last word is interpreted as a prefix (default behavior). - * 'prefixNone' No query word is interpreted as a prefix. This option is not recommended. - * https://github.com/algolia/algoliasearch-client-js#querytype - */ - queryType?: any; - /** - * This option is used to select a strategy in order to avoid having an empty result page - * default: 'none' - * 'lastWords' When a query does not return any results, the last word will be added as optional - * 'firstWords' When a query does not return any results, the first word will be added as optional - * 'allOptional' When a query does not return any results, a second trial will be made with all words as optional - * 'none' No specific processing is done when a query does not return any results - * https://github.com/algolia/algoliasearch-client-js#removewordsifnoresults - */ - removeWordsIfNoResults?: string; - /** - * Enables the advanced query syntax - * default: false - * https://github.com/algolia/algoliasearch-client-js#advancedsyntax - */ - advancedSyntax?: boolean; - /** - * A string that contains the comma separated list of words that should be considered as optional when found in the query - * default: [] - * https://github.com/algolia/algoliasearch-client-js#optionalwords - */ - optionalWords?: string[]; - /** - * Remove stop words from the query before executing it - * default: false - * true|false: enable or disable stop words for all 41 supported languages; or - * a list of language ISO codes (as a comma-separated string) for which stop words should be enable - * https://github.com/algolia/algoliasearch-client-js#removestopwords - */ - removeStopWords?: string[]; - /** - * List of attributes on which you want to disable prefix matching - * default: [] - * https://github.com/algolia/algoliasearch-client-js#disableprefixonattributes - */ - disablePrefixOnAttributes?: string[]; - /** - * List of attributes on which you want to disable the computation of exact criteria - * default: [] - * https://github.com/algolia/algoliasearch-client-js#disableexactonattributes - */ - disableExactOnAttributes?: string[]; - /** - * This parameter control how the exact ranking criterion is computed when the query contains one word - * default: attribute - * 'none': no exact on single word query - * 'word': exact set to 1 if the query word is found in the record - * 'attribute': exact set to 1 if there is an attribute containing a string equals to the query - * https://github.com/algolia/algoliasearch-client-js#exactonsinglewordquery - */ - exactOnSingleWordQuery?: string; - /** - * Specify the list of approximation that should be considered as an exact match in the ranking formula - * default: ['ignorePlurals', 'singleWordSynonym'] - * 'ignorePlurals': alternative words added by the ignorePlurals feature - * 'singleWordSynonym': single-word synonym (For example "NY" = "NYC") - * 'multiWordsSynonym': multiple-words synonym - * https://github.com/algolia/algoliasearch-client-js#alternativesasexact - */ - alternativesAsExact?: any; - /** - * The name of the attribute used for the Distinct feature - * default: null - * https://github.com/algolia/algoliasearch-client-js#attributefordistinct - */ - attributeForDistinct?: string; - /** - * If set to 1, enables the distinct feature, disabled by default, if the attributeForDistinct index setting is set. - * https://github.com/algolia/algoliasearch-client-js#distinct - */ - distinct?: any; - /** - * All numerical attributes are automatically indexed as numerical filters - * default '' - * https://github.com/algolia/algoliasearch-client-js#numericattributestoindex - */ - numericAttributesToIndex?: string[]; - /** - * Allows compression of big integer arrays. - * default: false - * https://github.com/algolia/algoliasearch-client-js#allowcompressionofintegerarray - */ - allowCompressionOfIntegerArray?: boolean; - /** - * Specify alternative corrections that you want to consider. - * default: [] - * https://github.com/algolia/algoliasearch-client-js#altcorrections - */ - altCorrections?: {}[]; - /** - * Configure the precision of the proximity ranking criterion - * default: 1 - * https://github.com/algolia/algoliasearch-client-js#minproximity - */ - minProximity?: number; - /** - * This is an advanced use-case to define a token substitutable by a list of words without having the original token searchable - * default: '' - * https://github.com/algolia/algoliasearch-client-js#placeholders - */ - placeholders?: any; - } - - interface AlgoliaQueryParameters { + interface QueryParameters { /** * Query string used to perform the search * default: '' @@ -1659,7 +1129,7 @@ Interface describing options available for gettings the logs * default: "" * https://github.com/algolia/algoliasearch-client-js#maxvaluesperfacet */ - maxValuesPerFacet?: string; + maxValuesPerFacet?: number; /** * Default list of attributes to highlight. If set to null, all indexed attributes are highlighted. * default: null @@ -1931,6 +1401,380 @@ Interface describing options available for gettings the logs * https://github.com/algolia/algoliasearch-client-js#minproximity */ minProximity?: number; + + nbShards?: number; + userData?: string | object; + } + + namespace SearchForFacetValues { + interface Parameters extends QueryParameters { + /** + * The facet to search in + */ + facetName: string; + /** + * The query for the search in this facet + */ + facetQuery: string; + } + + interface Response { + facetHits: { value: string; highlighted: string; count: number }[]; + exhaustiveFacetsCount: boolean; + processingTimeMS: number; + } + } + + interface Log { + timestamp: string; + method: string; + answer_code: number; + query_body: string; + answer: string; + url: string; + ip: string; + query_headers: string; + sha1: string; + nb_api_calls: string; + index: string; + query_params: string; + query_nb_hits: string; + processing_time_ms: string; + exhaustive_faceting?: false; + exhaustive_nb_hits?: false; + } + + interface Task { + taskID: number; + createdAt: string; + objectID?: string; + } + + interface TaskStatus { + status: 'published' | 'notPublished', + pendingTask: boolean, + } + + interface IndexSettings { + /** + * The list of attributes you want index + * default: * + * https://github.com/algolia/algoliasearch-client-js#attributestoindex + */ + attributesToIndex?: string[]; + /** + * The list of attributes you want to use for faceting + * default: null + * https://github.com/algolia/algoliasearch-client-js#attributesforfaceting + */ + attributesForFaceting?: string[]; + /** + * The list of attributes that cannot be retrieved at query time + * default: null + * https://github.com/algolia/algoliasearch-client-js#unretrievableattributes + */ + unretrievableAttributes?: string[]; + /** + * List of attributes you want to use for textual search + * default: [] + * https://github.com/algolia/algoliasearch-client-js#searchableattributes + */ + searchableAttributes?: string[]; + /** + * A string that contains the list of attributes you want to retrieve in order to minimize the size of the JSON answer + * default: * + * https://github.com/algolia/algoliasearch-client-js#attributestoretrieve + */ + attributesToRetrieve?: string[]; + /** + * Controls the way results are sorted + * default: ['typo', 'geo', 'words', 'filters', 'proximity', 'attribute', 'exact', 'custom'] + * https://github.com/algolia/algoliasearch-client-js#ranking + */ + ranking?: string[]; + /** + * Lets you specify part of the ranking + * default: [] + * https://github.com/algolia/algoliasearch-client-js#customranking + */ + customRanking?: string[]; + /** + * The list of indices on which you want to replicate all write operations + * default: [] + * https://github.com/algolia/algoliasearch-client-js#replicas + */ + replicas?: string[]; + /** + * Limit the number of facet values returned for each facet + * default: "" + * https://github.com/algolia/algoliasearch-client-js#maxvaluesperfacet + */ + maxValuesPerFacet?: number; + /** + * Default list of attributes to highlight. If set to null, all indexed attributes are highlighted. + * default: null + * https://github.com/algolia/algoliasearch-client-js#attributestohighlight + */ + attributesToHighlight?: string[]; + /** + * Default list of attributes to snippet alongside the number of words to return + * default: null + * https://github.com/algolia/algoliasearch-client-js#attributestosnippet + */ + attributesToSnippet?: string[]; + /** + * Specify the string that is inserted before the highlighted parts in the query result + * default: + * https://github.com/algolia/algoliasearch-client-js#highlightpretag + */ + highlightPreTag?: string; + /** + * Specify the string that is inserted after the highlighted parts in the query result + * default: + * https://github.com/algolia/algoliasearch-client-js#highlightposttag + */ + highlightPostTag?: string; + /** + * String used as an ellipsis indicator when a snippet is truncated. + * default: … + * https://github.com/algolia/algoliasearch-client-js#snippetellipsistext + */ + snippetEllipsisText?: string; + /** + * If set to true, restrict arrays in highlights and snippets to items that matched the query at least partially else return all array items in highlights and snippets + * default: false + * https://github.com/algolia/algoliasearch-client-js#restricthighlightandsnippetarrays + */ + restrictHighlightAndSnippetArrays?: boolean; + /** + * Pagination parameter used to select the number of hits per page + * default: 20 + * https://github.com/algolia/algoliasearch-client-js#hitsperpage + */ + hitsPerPage?: number; + /** + * The minimum number of characters needed to accept one typo + * default: 4 + * https://github.com/algolia/algoliasearch-client-js#minwordsizefor1typo + */ + minWordSizefor1Typo?: number; + /** + * The minimum number of characters needed to accept two typos. + * default: 8 + * https://github.com/algolia/algoliasearch-client-js#highlightposttag + */ + minWordSizefor2Typos?: number; + /** + * This option allows you to control the number of typos allowed in the result set + * default: true + * 'true' The typo tolerance is enabled and all matching hits are retrieved (default behavior). + * 'false' The typo tolerance is disabled. All results with typos will be hidden. + * 'min' Only keep results with the minimum number of typos. For example, if one result matches without typos, then all results with typos will be hidden. + * 'strict' Hits matching with 2 typos are not retrieved if there are some matching without typos. + * https://github.com/algolia/algoliasearch-client-js#typotolerance + */ + typoTolerance?: boolean | 'min' | 'strict'; + /** + * If set to false, disables typo tolerance on numeric tokens (numbers). + * default: true + * https://github.com/algolia/algoliasearch-client-js#allowtyposonnumerictokens + */ + allowTyposOnNumericTokens?: boolean; + /** + * If set to true, plural won't be considered as a typo + * default: false + * https://github.com/algolia/algoliasearch-client-js#ignoreplurals + */ + ignorePlurals?: boolean; + /** + * List of attributes on which you want to disable typo tolerance + * default: "" + * https://github.com/algolia/algoliasearch-client-js#disabletypotoleranceonattributes + */ + disableTypoToleranceOnAttributes?: string; + /** + * Specify the separators (punctuation characters) to index. + * default: "" + * https://github.com/algolia/algoliasearch-client-js#separatorstoindex + */ + separatorsToIndex?: string; + /** + * Selects how the query words are interpreted + * default: 'prefixLast' + * 'prefixAll' All query words are interpreted as prefixes. This option is not recommended. + * 'prefixLast' Only the last word is interpreted as a prefix (default behavior). + * 'prefixNone' No query word is interpreted as a prefix. This option is not recommended. + * https://github.com/algolia/algoliasearch-client-js#querytype + */ + queryType?: 'prefixAll' | 'prefixLast' | 'prefixNone'; + /** + * This option is used to select a strategy in order to avoid having an empty result page + * default: 'none' + * 'lastWords' When a query does not return any results, the last word will be added as optional + * 'firstWords' When a query does not return any results, the first word will be added as optional + * 'allOptional' When a query does not return any results, a second trial will be made with all words as optional + * 'none' No specific processing is done when a query does not return any results + * https://github.com/algolia/algoliasearch-client-js#removewordsifnoresults + */ + removeWordsIfNoResults?: string; + /** + * Enables the advanced query syntax + * default: false + * https://github.com/algolia/algoliasearch-client-js#advancedsyntax + */ + advancedSyntax?: boolean; + /** + * A string that contains the comma separated list of words that should be considered as optional when found in the query + * default: [] + * https://github.com/algolia/algoliasearch-client-js#optionalwords + */ + optionalWords?: string[]; + /** + * Remove stop words from the query before executing it + * default: false + * true|false: enable or disable stop words for all 41 supported languages; or + * a list of language ISO codes (as a comma-separated string) for which stop words should be enable + * https://github.com/algolia/algoliasearch-client-js#removestopwords + */ + removeStopWords?: string[]; + /** + * List of attributes on which you want to apply word-splitting ("decompounding") for + * each of the languages supported (German, Dutch, and Finnish as of 05/2018) + * default: {de: [], nl: [], fi: []} + */ + decompoundedAttributes?: { [key in Partial<'nl' | 'de' | 'fi'>]: string[] }; + /** + * List of attributes on which you want to disable prefix matching + * default: [] + * https://github.com/algolia/algoliasearch-client-js#disableprefixonattributes + */ + disablePrefixOnAttributes?: string[]; + /** + * List of attributes on which you want to disable the computation of exact criteria + * default: [] + * https://github.com/algolia/algoliasearch-client-js#disableexactonattributes + */ + disableExactOnAttributes?: string[]; + /** + * This parameter control how the exact ranking criterion is computed when the query contains one word + * default: attribute + * 'none': no exact on single word query + * 'word': exact set to 1 if the query word is found in the record + * 'attribute': exact set to 1 if there is an attribute containing a string equals to the query + * https://github.com/algolia/algoliasearch-client-js#exactonsinglewordquery + */ + exactOnSingleWordQuery?: string; + /** + * Specify the list of approximation that should be considered as an exact match in the ranking formula + * default: ['ignorePlurals', 'singleWordSynonym'] + * 'ignorePlurals': alternative words added by the ignorePlurals feature + * 'singleWordSynonym': single-word synonym (For example "NY" = "NYC") + * 'multiWordsSynonym': multiple-words synonym + * https://github.com/algolia/algoliasearch-client-js#alternativesasexact + */ + alternativesAsExact?: ( + | "ignorePlurals" + | "singleWordSynonym" + | "multiWordsSynonym")[]; + /** + * The name of the attribute used for the Distinct feature + * default: null + * https://github.com/algolia/algoliasearch-client-js#attributefordistinct + */ + attributeForDistinct?: string; + /** + * If set to 1, enables the distinct feature, disabled by default, if the attributeForDistinct index setting is set. + * https://github.com/algolia/algoliasearch-client-js#distinct + */ + distinct?: boolean | number; + /** + * All numerical attributes are automatically indexed as numerical filters + * default '' + * https://github.com/algolia/algoliasearch-client-js#numericattributestoindex + */ + numericAttributesToIndex?: string[]; + /** + * Allows compression of big integer arrays. + * default: false + * https://github.com/algolia/algoliasearch-client-js#allowcompressionofintegerarray + */ + allowCompressionOfIntegerArray?: boolean; + /** + * Specify alternative corrections that you want to consider. + * default: [] + * https://github.com/algolia/algoliasearch-client-js#altcorrections + */ + altCorrections?: {}[]; + /** + * Configure the precision of the proximity ranking criterion + * default: 1 + * https://github.com/algolia/algoliasearch-client-js#minproximity + */ + minProximity?: number; + /** + * This is an advanced use-case to define a token substitutable by a list of words without having the original token searchable + * default: {} + * https://github.com/algolia/algoliasearch-client-js#placeholders + */ + placeholders?: { + [name: string]: string[], + }; + /** + * List of attributes on which to do a decomposition of camel case words. + * + https://www.algolia.com/doc/api-reference/api-parameters/camelCaseAttributes/ + */ + camelCaseAttributes?: string[]; + } + + interface Response { + /** + * Contains all the hits matching the query + * https://github.com/algolia/algoliasearch-client-js#response-format + */ + hits: any[]; + /** + * Current page + * https://github.com/algolia/algoliasearch-client-js#response-format + */ + page: number; + /** + * Number of total hits matching the query + * https://github.com/algolia/algoliasearch-client-js#response-format + */ + nbHits: number; + /** + * Number of pages + * https://github.com/algolia/algoliasearch-client-js#response-format + */ + nbPages: number; + /** + * Number of hits per pages + * https://github.com/algolia/algoliasearch-client-js#response-format + */ + hitsPerPage: number; + /** + * Engine processing time (excluding network transfer) + * https://github.com/algolia/algoliasearch-client-js#response-format + */ + processingTimeMS: number; + /** + * Query used to perform the search + * https://github.com/algolia/algoliasearch-client-js#response-format + */ + query: string; + /** + * GET parameters used to perform the search + * https://github.com/algolia/algoliasearch-client-js#response-format + */ + params: string; + facets?: { + [facetName: string]: { [facetValue: string]: number }; + }; + } + + interface MultiResponse { + results: Response[]; } } @@ -1938,5 +1782,5 @@ declare function algoliasearch( applicationId: string, apiKey: string, options?: algoliasearch.ClientOptions -): algoliasearch.AlgoliaClient; +): algoliasearch.Client; export = algoliasearch; diff --git a/types/algoliasearch/lite/index.d.ts b/types/algoliasearch/lite/index.d.ts new file mode 100644 index 0000000000..a567a917a8 --- /dev/null +++ b/types/algoliasearch/lite/index.d.ts @@ -0,0 +1,580 @@ +// Type definitions for algoliasearch-client-js 3.27.0 +// Project: https://github.com/algolia/algoliasearch-client-js +// Definitions by: Baptiste Coquelle +// Haroen Viaene +// Aurélien Hervé +// Samuel Vaillant +// Definitions: https://github.com/DefinitelyTyped/DefinitelyTyped +// TypeScript Version: 2.2 + +declare namespace algoliasearch { + /** + * Interface for the algolia client object + */ + interface Client { + /** + * Initialization of the index + * https://github.com/algolia/algoliasearch-client-js#init-index---initindex + */ + initIndex(indexName: string): Index; + /** + * Query on multiple index + * https://github.com/algolia/algoliasearch-client-js#multiple-queries---multiplequeries + */ + search( + queries: { + indexName: string; + query: string; + params: QueryParameters; + }[], + cb: (err: Error, res: MultiResponse) => void + ): void; + /** + * Query on multiple index + * https://github.com/algolia/algoliasearch-client-js#multiple-queries---multiplequeries + */ + search( + queries: { + indexName: string; + query: string; + params: QueryParameters; + }[] + ): Promise; + /** + * Query for facet values of a specific facet + */ + searchForFacetValues( + queries: [{ indexName: string; params: SearchForFacetValues.Parameters }] + ): Promise; + /** + * clear browser cache + * https://github.com/algolia/algoliasearch-client-js#cache + */ + clearCache(): void; + /** + * Add a header to be sent with all upcoming requests + */ + setExtraHeader(name: string, value: string): void; + /** + * Get the value of an extra header + */ + getExtraHeader(name: string): string; + /** + * remove an extra header for all upcoming requests + */ + unsetExtraHeader(name: string): void; + } + /** + * Interface for the index algolia object + */ + interface Index { + indexName: string; + /** + * Gets a specific object + * https://github.com/algolia/algoliasearch-client-js#find-by-ids---getobjects + */ + getObject(objectID: string, cb: (err: Error, res: {}) => void): void; + /** + * Gets specific attributes from an object + * https://github.com/algolia/algoliasearch-client-js#find-by-ids---getobjects + */ + getObject( + objectID: string, + attributes: string[], + cb: (err: Error, res: {}) => void + ): void; + /** + * Gets a list of objects + * https://github.com/algolia/algoliasearch-client-js#find-by-ids---getobjects + */ + getObjects( + objectIDs: string[], + cb: (err: Error, res: { results: {}[] }) => void + ): void; + /** + * Gets a list of objects + * https://github.com/algolia/algoliasearch-client-js#find-by-ids---getobjects + */ + getObjects(objectIDs: string[]): Promise<{ results: {}[] }>; + /** + * Clear cache of an index + * https://github.com/algolia/algoliasearch-client-js#cache + */ + clearCache(): void; + /** + * Search in an index + * https://github.com/algolia/algoliasearch-client-js#search-in-an-index---search + */ + search( + params: QueryParameters, + cb: (err: Error, res: Response) => void + ): void; + /** + * Search in an index + * https://github.com/algolia/algoliasearch-client-js#search-in-an-index---search + */ + search(params: QueryParameters): Promise; + /** + * Search in an index + * https://www.algolia.com/doc/api-reference/api-methods/search-for-facet-values/ + */ + searchForFacetValues( + options: SearchForFacetValues.Parameters + ): Promise; + /** + * Search in an index + * https://www.algolia.com/doc/api-reference/api-methods/search-for-facet-values/ + */ + searchForFacetValues( + options: SearchForFacetValues.Parameters, + cb: (err: Error, res: SearchForFacetValues.Response) => void + ): void; + /** + * Browse an index + * https://github.com/algolia/algoliasearch-client-js#backup--export-an-index---browse + */ + browse(query: string, cb: (err: Error, res: BrowseResponse) => void): void; + /** + * Browse an index + * https://github.com/algolia/algoliasearch-client-js#backup--export-an-index---browse + */ + browse(query: string): Promise; + /** + * Browse an index from a cursor + * https://github.com/algolia/algoliasearch-client-js#backup--export-an-index---browse + */ + browseFrom( + cursor: string, + cb: (err: Error, res: BrowseResponse) => void + ): void; + /** + * Browse an index from a cursor + * https://github.com/algolia/algoliasearch-client-js#backup--export-an-index---browse + */ + browseFrom(cursor: string): Promise; + } + /** + * Interface describing available options when initializing a client + */ + interface ClientOptions { + /** + * Timeout for requests to our servers, in milliseconds + * default: 15s (node), 2s (browser) + * https://github.com/algolia/algoliasearch-client-js#client-options + */ + timeout?: number; + /** + * Protocol to use when communicating with algolia + * default: current protocol(browser), https(node) + * https://github.com/algolia/algoliasearch-client-js#client-options + */ + protocol?: string; + /** + * (node only) httpAgent instance to use when communicating with servers. + * https://github.com/algolia/algoliasearch-client-js#client-options + */ + httpAgent?: any; + /** + * read: array of read hosts to use to call servers, computed automatically + * write: array of read hosts to use to call servers, computed automatically + * https://github.com/algolia/algoliasearch-client-js#client-options + */ + hosts?: { read?: string[]; write?: string[] }; + } + interface BrowseResponse { + cursor?: string; + hits: {}[]; + params: string; + query: string; + processingTimeMS: number; + } + + interface QueryParameters { + /** + * Query string used to perform the search + * default: '' + * https://github.com/algolia/algoliasearch-client-js#query + */ + query?: string; + /** + * Filter the query with numeric, facet or/and tag filters + * default: "" + * https://github.com/algolia/algoliasearch-client-js#filters + */ + filters?: string; + /** + * A string that contains the list of attributes you want to retrieve in order to minimize the size of the JSON answer. + * default: * + * https://github.com/algolia/algoliasearch-client-js#attributestoretrieve + */ + attributesToRetrieve?: string[]; + /** + * List of attributes you want to use for textual search + * default: attributeToIndex + * https://github.com/algolia/algoliasearch-client-js#restrictsearchableattributes + */ + restrictSearchableAttributes?: string[]; + /** + * You can use facets to retrieve only a part of your attributes declared in attributesForFaceting attributes + * default: "" + * https://github.com/algolia/algoliasearch-client-js#facets + */ + facets?: string; + /** + * Limit the number of facet values returned for each facet. + * default: "" + * https://github.com/algolia/algoliasearch-client-js#maxvaluesperfacet + */ + maxValuesPerFacet?: number; + /** + * Default list of attributes to highlight. If set to null, all indexed attributes are highlighted. + * default: null + * https://github.com/algolia/algoliasearch-client-js#attributestohighlight + */ + attributesToHighlight?: string[]; + /** + * Default list of attributes to snippet alongside the number of words to return + * default: null + * https://github.com/algolia/algoliasearch-client-js#attributestosnippet + */ + attributesToSnippet?: string[]; + /** + * Specify the string that is inserted before the highlighted parts in the query result + * default: + * https://github.com/algolia/algoliasearch-client-js#highlightpretag + */ + highlightPreTag?: string; + /** + * Specify the string that is inserted after the highlighted parts in the query result + * default: + * https://github.com/algolia/algoliasearch-client-js#highlightposttag + */ + highlightPostTag?: string; + /** + * String used as an ellipsis indicator when a snippet is truncated. + * default: … + * https://github.com/algolia/algoliasearch-client-js#snippetellipsistext + */ + snippetEllipsisText?: string; + /** + * If set to true, restrict arrays in highlights and snippets to items that matched the query at least partially else return all array items in highlights and snippets + * default: false + * https://github.com/algolia/algoliasearch-client-js#restricthighlightandsnippetarrays + */ + restrictHighlightAndSnippetArrays?: boolean; + /** + * Pagination parameter used to select the number of hits per page + * default: 20 + * https://github.com/algolia/algoliasearch-client-js#hitsperpage + */ + hitsPerPage?: number; + /** + * Pagination parameter used to select the page to retrieve. + * default: 0 + * https://github.com/algolia/algoliasearch-client-js#page + */ + page?: number; + /** + * Offset of the first hit to return + * default: null + * https://github.com/algolia/algoliasearch-client-js#offset + */ + offset?: number; + /** + * Number of hits to return. + * default: null + * https://github.com/algolia/algoliasearch-client-js#length + */ + length?: number; + /** + * The minimum number of characters needed to accept one typo. + * default: 4 + * https://github.com/algolia/algoliasearch-client-js#minwordsizefor1typo + */ + minWordSizefor1Typo?: number; + /** + * The minimum number of characters needed to accept two typo. + * fault: 8 + * https://github.com/algolia/algoliasearch-client-js#minwordsizefor2typos + */ + minWordSizefor2Typos?: number; + /** + * This option allows you to control the number of typos allowed in the result set: + * default: true + * 'true' The typo tolerance is enabled and all matching hits are retrieved + * 'false' The typo tolerance is disabled. All results with typos will be hidden. + * 'min' Only keep results with the minimum number of typos + * 'strict' Hits matching with 2 typos are not retrieved if there are some matching without typos. + * https://github.com/algolia/algoliasearch-client-js#minwordsizefor2typos + */ + typoTolerance?: boolean; + /** + * If set to false, disables typo tolerance on numeric tokens (numbers). + * default: + * https://github.com/algolia/algoliasearch-client-js#allowtyposonnumerictokens + */ + allowTyposOnNumericTokens?: boolean; + /** + * If set to true, plural won't be considered as a typo + * default: false + * https://github.com/algolia/algoliasearch-client-js#ignoreplurals + */ + ignorePlurals?: boolean; + /** + * List of attributes on which you want to disable typo tolerance + * default: "" + * https://github.com/algolia/algoliasearch-client-js#disabletypotoleranceonattributes + */ + disableTypoToleranceOnAttributes?: string; + /** + * Search for entries around a given location + * default: "" + * https://github.com/algolia/algoliasearch-client-js#aroundlatlng + */ + aroundLatLng?: string; + /** + * Search for entries around a given latitude/longitude automatically computed from user IP address. + * default: "" + * https://github.com/algolia/algoliasearch-client-js#aroundlatlngviaip + */ + aroundLatLngViaIP?: string; + /** + * Control the radius associated with a geo search. Defined in meters. + * default: null + * You can specify aroundRadius=all if you want to compute the geo distance without filtering in a geo area + * https://github.com/algolia/algoliasearch-client-js#aroundradius + */ + aroundRadius?: number | 'all'; + /** + * Control the precision of a geo search + * default: null + * https://github.com/algolia/algoliasearch-client-js#aroundprecision + */ + aroundPrecision?: number; + /** + * Define the minimum radius used for a geo search when aroundRadius is not set. + * default: null + * https://github.com/algolia/algoliasearch-client-js#minimumaroundradius + */ + minimumAroundRadius?: number; + /** + * Search entries inside a given area defined by the two extreme points of a rectangle + * default: null + * https://github.com/algolia/algoliasearch-client-js#insideboundingbox + */ + insideBoundingBox?: number[][]; + /** + * Selects how the query words are interpreted + * default: 'prefixLast' + * 'prefixAll' All query words are interpreted as prefixes. This option is not recommended. + * 'prefixLast' Only the last word is interpreted as a prefix (default behavior). + * 'prefixNone' No query word is interpreted as a prefix. This option is not recommended. + * https://github.com/algolia/algoliasearch-client-js#querytype + */ + queryType?: any; + /** + * Search entries inside a given area defined by a set of points + * defauly: '' + * https://github.com/algolia/algoliasearch-client-js#insidepolygon + */ + insidePolygon?: number[][]; + /** + * This option is used to select a strategy in order to avoid having an empty result page + * default: 'none' + * 'lastWords' When a query does not return any results, the last word will be added as optional + * 'firstWords' When a query does not return any results, the first word will be added as optional + * 'allOptional' When a query does not return any results, a second trial will be made with all words as optional + * 'none' No specific processing is done when a query does not return any results + * https://github.com/algolia/algoliasearch-client-js#removewordsifnoresults + */ + removeWordsIfNoResults?: string; + /** + * Enables the advanced query syntax + * default: false + * https://github.com/algolia/algoliasearch-client-js#advancedsyntax + */ + advancedSyntax?: boolean; + /** + * A string that contains the comma separated list of words that should be considered as optional when found in the query + * default: [] + * https://github.com/algolia/algoliasearch-client-js#optionalwords + */ + optionalWords?: string[]; + /** + * Remove stop words from the query before executing it + * default: false + * true|false: enable or disable stop words for all 41 supported languages; or + * a list of language ISO codes (as a comma-separated string) for which stop words should be enable + * https://github.com/algolia/algoliasearch-client-js#removestopwords + */ + removeStopWords?: string[]; + /** + * List of attributes on which you want to disable the computation of exact criteria + * default: [] + * https://github.com/algolia/algoliasearch-client-js#disableexactonattributes + */ + disableExactOnAttributes?: string[]; + /** + * This parameter control how the exact ranking criterion is computed when the query contains one word + * default: attribute + * 'none': no exact on single word query + * 'word': exact set to 1 if the query word is found in the record + * 'attribute': exact set to 1 if there is an attribute containing a string equals to the query + * https://github.com/algolia/algoliasearch-client-js#exactonsinglewordquery + */ + exactOnSingleWordQuery?: string; + /** + * Specify the list of approximation that should be considered as an exact match in the ranking formula + * default: ['ignorePlurals', 'singleWordSynonym'] + * 'ignorePlurals': alternative words added by the ignorePlurals feature + * 'singleWordSynonym': single-word synonym (For example "NY" = "NYC") + * 'multiWordsSynonym': multiple-words synonym + * https://github.com/algolia/algoliasearch-client-js#alternativesasexact + */ + alternativesAsExact?: any; + /** + * If set to 1, enables the distinct feature, disabled by default, if the attributeForDistinct index setting is set. + * https://github.com/algolia/algoliasearch-client-js#distinct + */ + distinct?: any; + /** + * If set to true, the result hits will contain ranking information in the _rankingInfo attribute. + * default: false + * https://github.com/algolia/algoliasearch-client-js#getrankinginfo + */ + getRankingInfo?: boolean; + /** + * All numerical attributes are automatically indexed as numerical filters + * default: '' + * https://github.com/algolia/algoliasearch-client-js#numericattributestoindex + */ + numericAttributesToIndex?: string[]; + /** + * @deprecated please use filters instead + * A string that contains the comma separated list of numeric filters you want to apply. + * https://github.com/algolia/algoliasearch-client-js#numericfilters-deprecated + */ + numericFilters?: string[]; + /** + * @deprecated + * Filter the query by a set of tags. + * https://github.com/algolia/algoliasearch-client-js#tagfilters-deprecated + */ + tagFilters?: string; + /** + * @deprecated + * Filter the query by a set of facets. + * https://github.com/algolia/algoliasearch-client-js#facetfilters-deprecated + */ + facetFilters?: string; + /** + * If set to false, this query will not be taken into account in the analytics feature. + * default true + * https://github.com/algolia/algoliasearch-client-js#analytics + */ + analytics?: boolean; + /** + * If set, tag your query with the specified identifiers + * default: null + * https://github.com/algolia/algoliasearch-client-js#analyticstags + */ + analyticsTags?: string[]; + /** + * If set to false, the search will not use the synonyms defined for the targeted index. + * default: true + * https://github.com/algolia/algoliasearch-client-js#synonyms + */ + synonyms?: boolean; + /** + * If set to false, words matched via synonym expansion will not be replaced by the matched synonym in the highlighted result. + * default: true + * https://github.com/algolia/algoliasearch-client-js#replacesynonymsinhighlight + */ + replaceSynonymsInHighlight?: boolean; + /** + * Configure the precision of the proximity ranking criterion + * default: 1 + * https://github.com/algolia/algoliasearch-client-js#minproximity + */ + minProximity?: number; + + nbShards?: number; + userData?: string | object; + } + + namespace SearchForFacetValues { + interface Parameters extends QueryParameters { + /** + * The facet to search in + */ + facetName: string; + /** + * The query for the search in this facet + */ + facetQuery: string; + } + + interface Response { + facetHits: { value: string; highlighted: string; count: number }[]; + exhaustiveFacetsCount: boolean; + processingTimeMS: number; + } + } + + interface Response { + /** + * Contains all the hits matching the query + * https://github.com/algolia/algoliasearch-client-js#response-format + */ + hits: any[]; + /** + * Current page + * https://github.com/algolia/algoliasearch-client-js#response-format + */ + page: number; + /** + * Number of total hits matching the query + * https://github.com/algolia/algoliasearch-client-js#response-format + */ + nbHits: number; + /** + * Number of pages + * https://github.com/algolia/algoliasearch-client-js#response-format + */ + nbPages: number; + /** + * Number of hits per pages + * https://github.com/algolia/algoliasearch-client-js#response-format + */ + hitsPerPage: number; + /** + * Engine processing time (excluding network transfer) + * https://github.com/algolia/algoliasearch-client-js#response-format + */ + processingTimeMS: number; + /** + * Query used to perform the search + * https://github.com/algolia/algoliasearch-client-js#response-format + */ + query: string; + /** + * GET parameters used to perform the search + * https://github.com/algolia/algoliasearch-client-js#response-format + */ + params: string; + facets?: { + [facetName: string]: { [facetValue: string]: number }; + }; + } + + interface MultiResponse { + results: Response[]; + } +} + +declare function algoliasearch( + applicationId: string, + apiKey: string, + options?: algoliasearch.ClientOptions +): algoliasearch.Client; +export = algoliasearch; diff --git a/types/algoliasearch/tsconfig.json b/types/algoliasearch/tsconfig.json index 3358732ba3..9a8a2a623c 100644 --- a/types/algoliasearch/tsconfig.json +++ b/types/algoliasearch/tsconfig.json @@ -18,6 +18,7 @@ }, "files": [ "index.d.ts", + "lite/index.d.ts", "algoliasearch-tests.ts" ] -} \ No newline at end of file +} diff --git a/types/allure-js-commons/allure-js-commons-tests.ts b/types/allure-js-commons/allure-js-commons-tests.ts new file mode 100644 index 0000000000..8ac15b6831 --- /dev/null +++ b/types/allure-js-commons/allure-js-commons-tests.ts @@ -0,0 +1,24 @@ +import Allure from "allure-js-commons"; + +const shouldMakeError = new Allure("test"); // $ExpectError +const allure = new Allure(); + +allure.startSuite("suite"); +allure.startCase("case"); +allure.startCase("case", 123456789); + +allure.endCase("passed"); +allure.endCase("pending"); +allure.endCase("skipped"); +allure.endCase("failed"); +allure.endCase("broken", 1232131232); +allure.endCase("error"); // $ExpectError + +allure.startStep("error"); +allure.endStep("error"); // $ExpectError + +allure.setDescription("description"); +allure.addAttachment("image", {}, "image/jpeg"); +allure.pendingCase("pending"); + +allure.endSuite(); diff --git a/types/allure-js-commons/index.d.ts b/types/allure-js-commons/index.d.ts new file mode 100644 index 0000000000..3ecd9aebf1 --- /dev/null +++ b/types/allure-js-commons/index.d.ts @@ -0,0 +1,111 @@ +// Type definitions for allure-js-commons 0.0 +// Project: https://github.com/allure-framework/allure-js-commons +// Definitions by: Denis Artyuhovich +// Definitions: https://github.com/DefinitelyTyped/DefinitelyTyped +// TypeScript Version: 2.7 + +declare class Allure { + constructor(); + + setOptions(options: Allure.Options): void; + + getCurrentSuite(): Allure.Suite; + + getCurrentTest(): Allure.Test; + + startSuite(suiteName: string, timestamp?: number): void; + + endSuite(timestamp?: number): void; + + startCase(testName: string, timestamp?: number): void; + + endCase(status: Allure.Status, err?: {}, timestamp?: number): void; + + startStep(stepName: string, timestamp?: number): void; + + endStep(status: Allure.Status, timestamp?: number): void; + + setDescription(description: string, timestamp?: number): void; + + addAttachment(attachmentName: string, buffer: any, type: string): void; + + pendingCase(testName: string, timestamp?: number): void; +} + +export = Allure; +export as namespace Allure; +declare namespace Allure { + interface Options { + targetDir: string; + } + + type Status = "passed" | "pending" | "skipped" | "failed" | "broken"; + + enum TYPE { + TEXT = "text", + HTML = "html", + MARKDOWN = "markdown" + } + + class Suite { + constructor(name: string, timestamp?: number); + + name: string; + + end(timestamp?: number): void; + + hasTests(): boolean; + + addTest(test: Test): boolean; + + toXML(): string; + } + + class Test { + constructor(name: string, timestamp?: number); + + setDescription(description: string, type: TYPE): void; + + addLabel(name: string, value: string): void; + + addParameter(kind: any, name: string, value: string): void; + + addStep(step: Step): void; + + addAttachment(attachment: Attachment): void; + + end(status: Status, error: Error, timestamp?: number): void; + + toXML(): string; + } + + class Description { + constructor(value: string, type: TYPE); + + toXML(): string; + } + + class Step { + constructor(name: string, timestamp?: number); + + addStep(step: Step): void; + + addAttachment(attachment: Attachment): void; + + end(status: Status, error: Error, timestamp?: number): void; + + toXML(): string; + } + + class Attachment { + constructor(title: string, source: any, size: number, mime: string); + + addStep(step: Step): void; + + addAttachment(attachment: Attachment): void; + + end(status: Status, error: Error, timestamp?: number): void; + + toXML(): string; + } +} diff --git a/types/allure-js-commons/tsconfig.json b/types/allure-js-commons/tsconfig.json new file mode 100644 index 0000000000..e536d9acbd --- /dev/null +++ b/types/allure-js-commons/tsconfig.json @@ -0,0 +1,24 @@ +{ + "compilerOptions": { + "module": "commonjs", + "lib": [ + "es6" + ], + "noImplicitAny": true, + "noImplicitThis": true, + "strictNullChecks": true, + "strictFunctionTypes": true, + "baseUrl": "../", + "typeRoots": [ + "../" + ], + "types": [], + "noEmit": true, + "forceConsistentCasingInFileNames": true, + "esModuleInterop": true + }, + "files": [ + "index.d.ts", + "allure-js-commons-tests.ts" + ] +} diff --git a/types/react-monaco-editor/tslint.json b/types/allure-js-commons/tslint.json similarity index 100% rename from types/react-monaco-editor/tslint.json rename to types/allure-js-commons/tslint.json diff --git a/types/amazon-cognito-auth-js/index.d.ts b/types/amazon-cognito-auth-js/index.d.ts new file mode 100644 index 0000000000..d828fccfc8 --- /dev/null +++ b/types/amazon-cognito-auth-js/index.d.ts @@ -0,0 +1,577 @@ +// Type definitions for amazon-cognito-auth-js 1.2 +// Project: https://github.com/aws/amazon-cognito-auth-js +// Definitions by: Scott Escue +// Definitions: https://github.com/DefinitelyTyped/DefinitelyTyped +// TypeScript Version: 2.2 + +/* + * Create global variable to provide access to types when used without module + * loading. + */ +export as namespace AmazonCognitoIdentity; + +// Stubs the XDomainRequest built-in from older IE browsers, does not follow the project's interface naming convention +export interface XDomainRequest { + readonly responseText: string; + timeout: number; + onprogress: () => void; + ontimeout: () => void; + onerror: () => void; + onload: () => void; + + open(method: string, url: string): void; + send(data: string): void; + abort(): void; +} + +export interface CognitoSessionData { + /** + * The session's Id token. + */ + IdToken?: CognitoIdToken; + + /** + * The session's refresh token. + */ + RefreshToken?: CognitoRefreshToken; + + /** + * The session's access token. + */ + AccessToken?: CognitoAccessToken; + + /** + * The session's token scopes. + */ + TokenScopes?: CognitoTokenScopes; + + /** + * The session's state. + */ + State?: string; +} + +export interface CognitoAuthOptions { + /** + * Required: User pool application client id. + */ + ClientId: string; + + /** + * Required: The application/user-pools Cognito web hostname,this is set at the Cognito console. + */ + AppWebDomain: string; + + /** + * Optional: The token scopes + */ + TokenScopesArray?: ReadonlyArray; + + /** + * Required: Required: The redirect Uri, which will be launched after authentication as signed in. + */ + RedirectUriSignIn: string; + + /** + * Required: The redirect Uri, which will be launched when signed out. + */ + RedirectUriSignOut: string; + + /** + * Optional: Pre-selected identity provider (this allows to automatically trigger social provider authentication flow). + */ + IdentityProvider?: string; + + /** + * Optional: UserPoolId for the configured cognito userPool. + */ + UserPoolId?: string; + + /** + * Optional: boolean flag indicating if the data collection is enabled to support cognito advanced security features. By default, this flag is set to true. + */ + AdvancedSecurityDataCollectionFlag?: boolean; +} + +export interface CognitoAuthUserHandler { + onSuccess: (authSession: CognitoAuthSession) => void; + onFailure: (err: any) => void; +} + +export interface CognitoConstants { + DOMAIN_SCHEME: string; + DOMAIN_PATH_SIGNIN: string; + DOMAIN_PATH_TOKEN: string; + DOMAIN_PATH_SIGNOUT: string; + DOMAIN_QUERY_PARAM_REDIRECT_URI: string; + DOMAIN_QUERY_PARAM_SIGNOUT_URI: string; + DOMAIN_QUERY_PARAM_RESPONSE_TYPE: string; + DOMAIN_QUERY_PARAM_IDENTITY_PROVIDER: string; + DOMAIN_QUERY_PARAM_USERCONTEXTDATA: string; + CLIENT_ID: string; + STATE: string; + SCOPE: string; + TOKEN: string; + CODE: string; + POST: string; + PARAMETERERROR: string; + SCOPETYPEERROR: string; + QUESTIONMARK: string; + POUNDSIGN: string; + COLONDOUBLESLASH: string; + SLASH: string; + AMPERSAND: string; + EQUALSIGN: string; + SPACE: string; + CONTENTTYPE: string; + CONTENTTYPEVALUE: string; + AUTHORIZATIONCODE: string; + IDTOKEN: string; + ACCESSTOKEN: string; + REFRESHTOKEN: string; + ERROR: string; + ERROR_DESCRIPTION: string; + STRINGTYPE: string; + STATELENGTH: number; + STATEORIGINSTRING: string; + WITHCREDENTIALS: string; + UNDEFINED: string; + SELF: string; + HOSTNAMEREGEX: RegExp; + QUERYPARAMETERREGEX1: RegExp; + QUERYPARAMETERREGEX2: RegExp; + HEADER: { 'Content-Type': string }; +} + +export class CognitoIdToken { + /** + * Constructs a new CognitoIdToken object + * @param IdToken The JWT Id token + */ + constructor(IdToken: string); + + /** + * @returns the record's token. + */ + getJwtToken(): string; + + /** + * Sets new value for id token. + * @param idToken The JWT Id token + */ + setJwtToken(idToken: string): void; + + /** + * @returns the token's expiration (exp member). + */ + getExpiration(): number; + + /** + * @returns the token's payload. + */ + decodePayload(): object; +} + +export class CognitoRefreshToken { + /** + * Constructs a new CognitoRefreshToken object + * @param RefreshToken The JWT refresh token. + */ + constructor(RefreshToken: string); + + /** + * @returns the record's token. + */ + getToken(): string; + + /** + * Sets new value for refresh token. + * @param refreshToken The JWT refresh token. + */ + setToken(refreshToken: string): void; +} + +export class CognitoAccessToken { + /** + * Constructs a new CognitoAccessToken object + * @param AccessToken The JWT access token. + */ + constructor(AccessToken: string); + + /** + * @returns the record's token. + */ + getJwtToken(): string; + + /** + * Sets new value for access token. + * @param accessToken The JWT access token. + */ + setJwtToken(accessToken: string): void; + + /** + * @returns the token's expiration (exp member). + */ + getExpiration(): number; + + /** + * @returns the username from payload. + */ + getUsername(): string; + + /** + * @returns the token's payload. + */ + decodePayload(): object; +} + +export class CognitoTokenScopes { + /** + * Constructs a new CognitoTokenScopes object + * @param TokenScopesArray The token scopes + */ + constructor(TokenScopesArray: ReadonlyArray); + + /** + * @returns the token scopes. + */ + getScopes(): string[]; + + /** + * Sets new value for token scopes. + * @param tokenScopes The token scopes + */ + setTokenScopes(tokenScopes: ReadonlyArray): void; +} + +export class CognitoAuthSession { + /** + * Constructs a new CognitoUserSession object + * @param sessionData The session's tokens, scopes, and state. + */ + constructor(sessionData: CognitoSessionData); + + /** + * @returns the session's Id token + */ + getIdToken(): CognitoIdToken; + + /** + * Set a new Id token + * @param IdToken The session's Id token. + */ + setIdToken(IdToken: CognitoIdToken): void; + + /** + * @returns the session's refresh token + */ + getRefreshToken(): CognitoRefreshToken; + + /** + * Set a new Refresh token + * @param RefreshToken The session's refresh token. + */ + setRefreshToken(RefreshToken: CognitoRefreshToken): void; + + /** + * @returns the session's access token + */ + getAccessToken(): CognitoAccessToken; + + /** + * Set a new Access token + * @param AccessToken The session's access token. + */ + setAccessToken(AccessToken: CognitoAccessToken): void; + + /** + * @returns the session's token scopes + */ + getTokenScopes(): CognitoTokenScopes; + + /** + * Set new token scopes + * @param tokenScopes The session's token scopes. + */ + setTokenScopes(tokenScopes: CognitoTokenScopes): void; + + /** + * @returns the session's state + */ + getState(): string; + + /** + * Set new state + * @param state The session's state. + */ + setState(State: string): void; + + /** + * Checks to see if the session is still valid based on session expiry information found + * in Access and Id Tokens and the current time + * @returns if the session is still valid + */ + isValid(): boolean; +} + +export class CognitoAuth { + /** + * Called on success or error. + */ + userhandler: CognitoAuthUserHandler; + + /** + * Constructs a new CognitoAuth object + * @param options Creation options + */ + constructor(options: CognitoAuthOptions); + + /** + * @returns the constants + */ + getCognitoConstants(): CognitoConstants; + + /** + * @returns the client id + */ + getClientId(): string; + + /** + * @returns the app web domain + */ + getAppWebDomain(): string; + + /** + * method for getting the current user of the application from the local storage + * + * @returns the user retrieved from storage + */ + getCurrentUser(): string; + + /** + * method for setting the current user's name + * @param Username the user's name + */ + setUser(Username: string): void; + + /** + * sets response type to 'code' + */ + useCodeGrantFlow(): void; + + /** + * sets response type to 'token' + */ + useImplicitFlow(): void; + + /** + * @returns the current session for this user + */ + getSignInUserSession(): CognitoAuthSession; + + /** + * @returns the user's username + */ + getUsername(): string; + + /** + * @param Username the user's username + */ + setUsername(Username: string): void; + + /** + * @returns the user's state + */ + getState(): string; + + /** + * @param State the user's state + */ + setState(State: string): void; + + /** + * This is used to get a session, either from the session object or from the local storage, or by using a refresh token + * @param RedirectUriSignIn Required: The redirect Uri, which will be launched after authentication. + * @param TokenScopesArray Required: The token scopes, it is an array of strings specifying all scopes for the tokens. + */ + getSession(): void; + + /** + * Parse the http request response and proceed according to different response types. + * @param httpRequestResponse the http request response + */ + parseCognitoWebResponse(httpRequestResponse: string): void; + + /** + * Get the query parameter map and proceed according to code response type. + * @param Query parameter map + */ + getCodeQueryParameter(map: ReadonlyMap): void; + + /** + * Get the query parameter map and proceed according to token response type. + * @param Query parameter map + */ + getTokenQueryParameter(map: ReadonlyMap): void; + + /** + * Get cached tokens and scopes and return a new session using all the cached data. + * @returns the auth session + */ + getCachedSession(): CognitoAuthSession; + + /** + * This is used to get last signed in user from local storage + * @returns the last user name + */ + getLastUser(): string; + + /** + * This is used to save the session tokens and scopes to local storage. + */ + cacheTokensScopes(): void; + + /** + * Compare two sets if they are identical. + * @param set1 one set + * @param set2 the other set + * @returns boolean value is true if two sets are identical + */ + compareSets(set1: ReadonlySet, set2: ReadonlySet): boolean; + + /** + * Get the hostname from url. + * @param url the url string + * @returns hostname string + */ + getHostName(url: string): string; + + /** + * Get http query parameters and return them as a map. + * @param url the url string + * @param splitMark query parameters split mark (prefix) + * @returns map + */ + getQueryParameters(url: string, splitMark: string): Map; + + /** + * helper function to generate a random string + * @param length the length of string + * @param chars a original string + * @returns a random value. + */ + generateRandomString(length: number, chars: string): string; + + /** + * This is used to clear the session tokens and scopes from local storage + */ + clearCachedTokensScopes(): void; + + /** + * This is used to build a user session from tokens retrieved in the authentication result + * @param refreshToken Successful auth response from server. + */ + refreshSession(refreshToken: string): void; + + /** + * Make the http POST request. + * @param header header JSON object + * @param body body JSON object + * @param url string + * @param onSuccess callback + * @param onFailure callback + */ + makePOSTRequest(header: object, body: object, url: string, + onSuccess: (responseText: string) => void, + onFailure: (responseText: string) => void): void; + + /** + * Create the XHR object + * @param method which method to call + * @param url the url string + * @returns xhr + */ + createCORSRequest(method: string, url: string): XMLHttpRequest | XDomainRequest; + + /** + * The http POST request onFailure callback. + * @param err the error object + */ + onFailure(err: any): void; + + /** + * The http POST request onSuccess callback when refreshing tokens. + * @param jsonData tokens + */ + onSuccessRefreshToken(jsonData: string): void; + + /** + * The http POST request onSuccess callback when exchanging code for tokens. + * @param jsonData tokens + */ + onSuccessExchangeForToken(jsonData: string): void; + + /** + * Launch Cognito Auth UI page. + * @param URL the url to launch + */ + launchUri(URL: string): void; + + /** + * @returns scopes string + */ + getSpaceSeperatedScopeString(): string; + + /** + * Create the FQDN(fully qualified domain name) for authorization endpoint. + * @returns url + */ + getFQDNSignIn(): string; + + /** + * Sign out the user. + */ + signOut(): void; + + /** + * Create the FQDN(fully qualified domain name) for signout endpoint. + * @returns url + */ + getFQDNSignOut(): string; + + /** + * This method returns the encoded data string used for cognito advanced security feature. + * This would be generated only when developer has included the JS used for collecting the + * data on their client. Please refer to documentation to know more about using AdvancedSecurity + * features + */ + getUserContextData(): string; + + /** + * Helper method to let the user know if he has either a valid cached session + * or a valid authenticated session from the app integration callback. + * @returns userSignedIn + */ + isUserSignedIn(): boolean; +} + +export class DateHelper { + /** + * @returns The current time in "ddd MMM D HH:mm:ss UTC YYYY" format. + */ + getNowString(): string; +} + +export class StorageHelper { + /** + * This is used to get a storage object + * @returns the storage + */ + constructor(); + + /** + * This is used to return the storage + * @returns the storage + */ + getStorage(): Storage; +} diff --git a/types/amazon-cognito-auth-js/test/amazon-cognito-auth-js-tests.ts b/types/amazon-cognito-auth-js/test/amazon-cognito-auth-js-tests.ts new file mode 100644 index 0000000000..42e58185e4 --- /dev/null +++ b/types/amazon-cognito-auth-js/test/amazon-cognito-auth-js-tests.ts @@ -0,0 +1,162 @@ +import * as lib from 'amazon-cognito-auth-js'; + +const idToken: lib.CognitoIdToken = new lib.CognitoIdToken('fak3T0ken1=='); +idToken.decodePayload(); // $ExpectType object +idToken.setJwtToken('fak3T0ken2=='); // $ExpectType void +idToken.getJwtToken(); // $ExpectType string +idToken.getExpiration(); // $ExpectType number + +const refreshToken: lib.CognitoRefreshToken = new lib.CognitoRefreshToken('refreshplease=='); +refreshToken.setToken('refreshagainplease=='); // $ExpectType void +refreshToken.getToken(); // $ExpectType string + +const accessToken: lib.CognitoAccessToken = new lib.CognitoAccessToken('fak3T0ken3=='); +accessToken.decodePayload(); // $ExpectType object +accessToken.setJwtToken('fak3T0ken4=='); // $ExpectType void +accessToken.getJwtToken(); // $ExpectType string +accessToken.getExpiration(); // $ExpectType number +accessToken.getUsername(); // $ExpectType string + +const tokenScopes: lib.CognitoTokenScopes = new lib.CognitoTokenScopes(['email', 'custom1']); +tokenScopes.setTokenScopes(['openid']); // $ExpectType void +tokenScopes.getScopes(); // $ExpectType string[] + +let sessionData: lib.CognitoSessionData = {}; +let authSession: lib.CognitoAuthSession = new lib.CognitoAuthSession(sessionData); + +sessionData = { + IdToken: idToken, + RefreshToken: refreshToken, + AccessToken: accessToken, + TokenScopes: tokenScopes, + State: '/myapp/home' +}; +authSession = new lib.CognitoAuthSession(sessionData); + +authSession.setIdToken(new lib.CognitoIdToken('fak3T0ken5==')); // $ExpectType void +authSession.setRefreshToken(new lib.CognitoRefreshToken('refreshmeyetagain==')); // $ExpectType void +authSession.setAccessToken(new lib.CognitoAccessToken('fak3T0ken6==')); // $ExpectType void +authSession.setTokenScopes(new lib.CognitoTokenScopes(['email'])); // $ExpectType void +authSession.setState('/myapp/login'); // $ExpectType void +authSession.getIdToken(); // $ExpectType CognitoIdToken +authSession.getRefreshToken(); // $ExpectType CognitoRefreshToken +authSession.getAccessToken(); // $ExpectType CognitoAccessToken +authSession.getTokenScopes(); // $ExpectType CognitoTokenScopes +authSession.getState(); // $ExpectType string + +let authOptions: lib.CognitoAuthOptions = { + ClientId: '1a2b3c4d5e6f7g', + AppWebDomain: 'myapp.auth.us-east-1.amazoncognito.com', + RedirectUriSignIn: 'https://myapp.com/login', + RedirectUriSignOut: 'https://myapp.com/logout' +}; +let auth: lib.CognitoAuth = new lib.CognitoAuth(authOptions); + +authOptions = { + ClientId: '1a2b3c4d5e6f7g', + AppWebDomain: 'myapp.auth.us-east-1.amazoncognito.com', + TokenScopesArray: ['email', 'openid'], + RedirectUriSignIn: 'https://myapp.com/login', + RedirectUriSignOut: 'https://myapp.com/logout', + IdentityProvider: 'Facebook', + UserPoolId: 'us-east-1_faKE4ReAl', + AdvancedSecurityDataCollectionFlag: true +}; +auth = new lib.CognitoAuth(authOptions); + +auth.getClientId(); // $ExpectType string +auth.getAppWebDomain(); // $ExpectType string +auth.getCurrentUser(); // $ExpectType string +auth.setUser('jane.doe'); // $ExpectType void +auth.useCodeGrantFlow(); // $ExpectType void +auth.useImplicitFlow(); // $ExpectType void +auth.getSignInUserSession(); // $ExpectType CognitoAuthSession +auth.getUsername(); // $ExpectType string +auth.setUsername('john.doe'); // $ExpectType void +auth.getState(); // $ExpectType string +auth.setState('/myhost/default.htm'); // $ExpectType void +auth.getSession(); // $ExpectType void +auth.parseCognitoWebResponse('url&stuff=true'); // $ExpectType void +auth.getCodeQueryParameter(new Map()); // $ExpectType void +auth.getTokenQueryParameter(new Map()); // $ExpectType void +auth.getCachedSession(); // $ExpectType CognitoAuthSession +auth.getLastUser(); // $ExpectType string +auth.cacheTokensScopes(); // $ExpectType void +auth.compareSets(new Set(['1']), new Set(['1'])); // $ExpectType boolean +auth.getHostName('https://site.com/page?size=10'); // $ExpectType string +auth.getQueryParameters('http://site.com?1=1&2=2', '?'); // $ExpectType Map +auth.generateRandomString(5, '159erf'); // $ExpectType string +auth.clearCachedTokensScopes(); // $ExpectType void +auth.refreshSession('refreshToken=='); // $ExpectType void +// $ExpectType void +auth.makePOSTRequest({ 'Content-Type': 'application/json' }, { pool: '2' }, + 'https://auth.com/signin', + (data) => console.log(data), + (error) => console.log(error)); +auth.createCORSRequest('POST', '/myapp/login'); // $ExpectType XMLHttpRequest | XDomainRequest +auth.onFailure('request failed'); // $ExpectType void +auth.onSuccessRefreshToken('{"name":"John", "age":31}'); // $ExpectType void +auth.onSuccessExchangeForToken('{"name":"Jane", "age":30}'); // $ExpectType void +auth.launchUri('https://auth.com/login'); // $ExpectType void +auth.getSpaceSeperatedScopeString(); // $ExpectType string +auth.getFQDNSignIn(); // $ExpectType string +auth.signOut(); // $ExpectType void +auth.getFQDNSignOut(); // $ExpectType string +auth.getUserContextData(); // $ExpectType string +auth.isUserSignedIn(); // $ExpectType boolean + +const userHandler: lib.CognitoAuthUserHandler = { + onSuccess: (authSession: lib.CognitoAuthSession) => console.log(authSession), + onFailure: (error: any) => console.log(error) +}; +auth.userhandler = userHandler; + +const constants: lib.CognitoConstants = auth.getCognitoConstants(); +constants.DOMAIN_SCHEME; // $ExpectType string +constants.DOMAIN_PATH_SIGNIN; // $ExpectType string +constants.DOMAIN_PATH_TOKEN; // $ExpectType string +constants.DOMAIN_PATH_SIGNOUT; // $ExpectType string +constants.DOMAIN_QUERY_PARAM_REDIRECT_URI; // $ExpectType string +constants.DOMAIN_QUERY_PARAM_SIGNOUT_URI; // $ExpectType string +constants.DOMAIN_QUERY_PARAM_RESPONSE_TYPE; // $ExpectType string +constants.DOMAIN_QUERY_PARAM_IDENTITY_PROVIDER; // $ExpectType string +constants.DOMAIN_QUERY_PARAM_USERCONTEXTDATA; // $ExpectType string +constants.CLIENT_ID; // $ExpectType string +constants.STATE; // $ExpectType string +constants.SCOPE; // $ExpectType string +constants.TOKEN; // $ExpectType string +constants.CODE; // $ExpectType string +constants.POST; // $ExpectType string +constants.PARAMETERERROR; // $ExpectType string +constants.SCOPETYPEERROR; // $ExpectType string +constants.QUESTIONMARK; // $ExpectType string +constants.POUNDSIGN; // $ExpectType string +constants.COLONDOUBLESLASH; // $ExpectType string +constants.SLASH; // $ExpectType string +constants.AMPERSAND; // $ExpectType string +constants.EQUALSIGN; // $ExpectType string +constants.SPACE; // $ExpectType string +constants.CONTENTTYPE; // $ExpectType string +constants.CONTENTTYPEVALUE; // $ExpectType string +constants.AUTHORIZATIONCODE; // $ExpectType string +constants.IDTOKEN; // $ExpectType string +constants.ACCESSTOKEN; // $ExpectType string +constants.REFRESHTOKEN; // $ExpectType string +constants.ERROR; // $ExpectType string +constants.ERROR_DESCRIPTION; // $ExpectType string +constants.STRINGTYPE; // $ExpectType string +constants.STATELENGTH; // $ExpectType number +constants.STATEORIGINSTRING; // $ExpectType string +constants.WITHCREDENTIALS; // $ExpectType string +constants.UNDEFINED; // $ExpectType string +constants.SELF; // $ExpectType string +constants.HOSTNAMEREGEX; // $ExpectType RegExp +constants.QUERYPARAMETERREGEX1; // $ExpectType RegExp +constants.QUERYPARAMETERREGEX2; // $ExpectType RegExp +constants.HEADER['Content-Type']; // $ExpectType string + +const dateHelper: lib.DateHelper = new lib.DateHelper(); +dateHelper.getNowString(); // $ExpectType string + +const storageHelper: lib.StorageHelper = new lib.StorageHelper(); +storageHelper.getStorage(); // $ExpectType Storage diff --git a/types/amazon-cognito-auth-js/test/amazon-cognito-auth-js-umd-tests.ts b/types/amazon-cognito-auth-js/test/amazon-cognito-auth-js-umd-tests.ts new file mode 100644 index 0000000000..1e30dbbeb8 --- /dev/null +++ b/types/amazon-cognito-auth-js/test/amazon-cognito-auth-js-umd-tests.ts @@ -0,0 +1,22 @@ +AmazonCognitoIdentity.CognitoIdToken; // $ExpectType typeof CognitoIdToken +AmazonCognitoIdentity.CognitoRefreshToken; // $ExpectType typeof CognitoRefreshToken +AmazonCognitoIdentity.CognitoAccessToken; // $ExpectType typeof CognitoAccessToken +AmazonCognitoIdentity.CognitoTokenScopes; // $ExpectType typeof CognitoTokenScopes +AmazonCognitoIdentity.CognitoAuthSession; // $ExpectType typeof CognitoAuthSession +AmazonCognitoIdentity.CognitoAuth; // $ExpectType typeof CognitoAuth +AmazonCognitoIdentity.DateHelper; // $ExpectType typeof DateHelper +AmazonCognitoIdentity.StorageHelper; // $ExpectType typeof StorageHelper + +const sessionData: AmazonCognitoIdentity.CognitoSessionData = {}; +new AmazonCognitoIdentity.CognitoAuthSession(sessionData); + +const authOptions: AmazonCognitoIdentity.CognitoAuthOptions = { + ClientId: '1a2b3c4d5e6f7g', + AppWebDomain: 'myapp.auth.us-east-1.amazoncognito.com', + RedirectUriSignIn: 'https://myapp.com/login', + RedirectUriSignOut: 'https://myapp.com/logout' +}; +const auth = new AmazonCognitoIdentity.CognitoAuth(authOptions); +auth.userhandler; // $ExpectType CognitoAuthUserHandler +auth.getCognitoConstants(); // $ExpectType CognitoConstants +auth.createCORSRequest('', ''); // $ExpectType XMLHttpRequest | XDomainRequest diff --git a/types/amazon-cognito-auth-js/tsconfig.json b/types/amazon-cognito-auth-js/tsconfig.json new file mode 100644 index 0000000000..df5a9f2d73 --- /dev/null +++ b/types/amazon-cognito-auth-js/tsconfig.json @@ -0,0 +1,25 @@ +{ + "compilerOptions": { + "module": "commonjs", + "lib": [ + "dom", + "es6" + ], + "noImplicitAny": true, + "noImplicitThis": true, + "strictNullChecks": true, + "strictFunctionTypes": true, + "baseUrl": "../", + "typeRoots": [ + "../" + ], + "types": [], + "noEmit": true, + "forceConsistentCasingInFileNames": true + }, + "files": [ + "index.d.ts", + "test/amazon-cognito-auth-js-tests.ts", + "test/amazon-cognito-auth-js-umd-tests.ts" + ] +} diff --git a/types/react-native-linear-gradient/tslint.json b/types/amazon-cognito-auth-js/tslint.json similarity index 100% rename from types/react-native-linear-gradient/tslint.json rename to types/amazon-cognito-auth-js/tslint.json diff --git a/types/amazon-product-api/index.d.ts b/types/amazon-product-api/index.d.ts index 34bafd04f4..f266001632 100644 --- a/types/amazon-product-api/index.d.ts +++ b/types/amazon-product-api/index.d.ts @@ -33,6 +33,8 @@ interface IItemLookupOptions { searchIndex?: string; truncateReviewsAt?: number; variationPage?: string; + domain?: string; + request?: Function; } interface IBrowseNodeLookupOptions { diff --git a/types/amp-message/amp-message-tests.ts b/types/amp-message/amp-message-tests.ts new file mode 100644 index 0000000000..003949f3b7 --- /dev/null +++ b/types/amp-message/amp-message-tests.ts @@ -0,0 +1,57 @@ +import Message = require('amp-message'); + +// $ExpectType Message +new Message(new Buffer('aaa')); + +// $ExpectType Message +new Message([new Buffer('aaa'), new Buffer('bbb')]); + +const message = new Message([new Buffer('aaa'), new Buffer('bbb')]); + +// $ExpectType string +message.inspect(); + +// $ExpectType Buffer +message.toBuffer(); + +// $ExpectType number +message.push(new Buffer('ccc')); + +// $ExpectType Buffer | undefined +message.pop(); + +// $ExpectType Buffer | undefined +message.shift(); + +// $ExpectType number +message.unshift(new Buffer('ddd')); + +// $ExpectError +new Message(); + +// $ExpectError +new Message(1); + +// $ExpectError +new Message({}); + +// $ExpectError +new Message('aaa'); + +// $ExpectError +message.push(1); + +// $ExpectError +message.push({}); + +// $ExpectError +message.push('aaa'); + +// $ExpectError +message.unshift(1); + +// $ExpectError +message.unshift({}); + +// $ExpectError +message.unshift('aaa'); diff --git a/types/amp-message/index.d.ts b/types/amp-message/index.d.ts new file mode 100644 index 0000000000..f1ca520ae7 --- /dev/null +++ b/types/amp-message/index.d.ts @@ -0,0 +1,25 @@ +// Type definitions for amp-message 0.1 +// Project: https://github.com/visionmedia/node-amp-message +// Definitions by: Vilim Stubičan +// Definitions: https://github.com/DefinitelyTyped/DefinitelyTyped +// TypeScript Version: 2.4 + +/// + +declare class Message { + constructor(args: Buffer | Buffer[]); + + inspect(): string; + + toBuffer(): Buffer; + + push(...items: Buffer[]): number; + + pop(): Buffer | undefined; + + shift(): Buffer | undefined; + + unshift(...items: Buffer[]): number; +} + +export = Message; diff --git a/types/amp-message/tsconfig.json b/types/amp-message/tsconfig.json new file mode 100644 index 0000000000..7b1826a6d8 --- /dev/null +++ b/types/amp-message/tsconfig.json @@ -0,0 +1,23 @@ +{ + "compilerOptions": { + "module": "commonjs", + "lib": [ + "es6" + ], + "noImplicitAny": true, + "noImplicitThis": true, + "strictNullChecks": true, + "strictFunctionTypes": true, + "baseUrl": "../", + "typeRoots": [ + "../" + ], + "types": [], + "noEmit": true, + "forceConsistentCasingInFileNames": true + }, + "files": [ + "index.d.ts", + "amp-message-tests.ts" + ] +} diff --git a/types/amp-message/tslint.json b/types/amp-message/tslint.json new file mode 100644 index 0000000000..3db14f85ea --- /dev/null +++ b/types/amp-message/tslint.json @@ -0,0 +1 @@ +{ "extends": "dtslint/dt.json" } diff --git a/types/amp/amp-tests.ts b/types/amp/amp-tests.ts new file mode 100644 index 0000000000..1e17bc8507 --- /dev/null +++ b/types/amp/amp-tests.ts @@ -0,0 +1,44 @@ +import { decode, encode, Stream } from 'amp'; + +// $ExpectType Buffer[] +decode(new Buffer('something')); + +// $ExpectType Buffer +encode([new Buffer('something'), new Buffer('something')]); + +// $ExpectError +decode(''); + +// $ExpectError +decode(1); + +// $ExpectError +decode(); + +// $ExpectError +encode(''); + +// $ExpectError +encode(1); + +// $ExpectError +encode(); + +// $ExpectType Stream +new Stream({}); + +// $ExpectType Stream +new Stream({ + highWaterMark: 1, + decodeStrings: true, + objectMode: true, + destroy: (error?: Error) => { + return 'handle error'; + }, + final: (callback: (error?: Error) => void) => { + // do nothing + } +}); + +// $ExpectError +new Stream({somethingNoneExisting: true}); diff --git a/types/amp/index.d.ts b/types/amp/index.d.ts new file mode 100644 index 0000000000..99b9fc7f45 --- /dev/null +++ b/types/amp/index.d.ts @@ -0,0 +1,19 @@ +// Type definitions for amp 0.3 +// Project: https://github.com/visionmedia/node-amp +// Definitions by: Vilim Stubičan +// Definitions: https://github.com/DefinitelyTyped/DefinitelyTyped +// TypeScript Version: 2.4 + +/// + +import * as stream from 'stream'; + +export function decode(buf: Buffer): Buffer[]; + +export function encode(args: Buffer[]): Buffer; + +export class Stream extends stream.Writable { + constructor(opts: stream.WritableOptions); + + _write(chunk: any, encoding: string, fn: () => void): void; +} diff --git a/types/amp/tsconfig.json b/types/amp/tsconfig.json new file mode 100644 index 0000000000..4bb6a171ad --- /dev/null +++ b/types/amp/tsconfig.json @@ -0,0 +1,23 @@ +{ + "compilerOptions": { + "module": "commonjs", + "lib": [ + "es6" + ], + "noImplicitAny": true, + "noImplicitThis": true, + "strictNullChecks": true, + "strictFunctionTypes": true, + "baseUrl": "../", + "typeRoots": [ + "../" + ], + "types": [], + "noEmit": true, + "forceConsistentCasingInFileNames": true + }, + "files": [ + "index.d.ts", + "amp-tests.ts" + ] +} diff --git a/types/amp/tslint.json b/types/amp/tslint.json new file mode 100644 index 0000000000..3db14f85ea --- /dev/null +++ b/types/amp/tslint.json @@ -0,0 +1 @@ +{ "extends": "dtslint/dt.json" } diff --git a/types/analytics-node/analytics-node-tests.ts b/types/analytics-node/analytics-node-tests.ts index 5dfabb426c..6740aaccff 100644 --- a/types/analytics-node/analytics-node-tests.ts +++ b/types/analytics-node/analytics-node-tests.ts @@ -4,7 +4,9 @@ var analytics: Analytics; function testConfig(): void { analytics = new Analytics('YOUR_WRITE_KEY', { flushAt: 20, - flushAfter: 10000 + flushAfter: 10000, + host: "http://example.com", + enable: true }); } diff --git a/types/analytics-node/index.d.ts b/types/analytics-node/index.d.ts index a1de134195..6834087ff7 100644 --- a/types/analytics-node/index.d.ts +++ b/types/analytics-node/index.d.ts @@ -39,7 +39,9 @@ declare namespace AnalyticsNode { export class Analytics { constructor(writeKey: string, opts?: { flushAt?: number, - flushAfter?: number + flushAfter?: number, + host?: string, + enable?: boolean }); /* The identify method lets you tie a user to their actions and record diff --git a/types/angular-animate/index.d.ts b/types/angular-animate/index.d.ts index 6a51b368c8..f05ea66058 100644 --- a/types/angular-animate/index.d.ts +++ b/types/angular-animate/index.d.ts @@ -20,8 +20,11 @@ declare module 'angular' { interface IAnimateCallbackObject { eventFn?: (element: JQuery, doneFunction: Function, options: IAnimationOptions) => any; + beforeSetClass?: (element: JQuery, addedClasses: string, removedClasses: string, doneFunction: Function, options: IAnimationOptions) => any; setClass?: (element: JQuery, addedClasses: string, removedClasses: string, doneFunction: Function, options: IAnimationOptions) => any; + beforeAddClass?: (element: JQuery, addedClasses: string, doneFunction: Function, options: IAnimationOptions) => any; addClass?: (element: JQuery, addedClasses: string, doneFunction: Function, options: IAnimationOptions) => any; + beforeRemoveClass?: (element: JQuery, removedClasses: string, doneFunction: Function, options: IAnimationOptions) => any; removeClass?: (element: JQuery, removedClasses: string, doneFunction: Function, options: IAnimationOptions) => any; enter?: (element: JQuery, doneFunction: Function, options: IAnimationOptions) => any; leave?: (element: JQuery, doneFunction: Function, options: IAnimationOptions) => any; diff --git a/types/angular-material/angular-material-tests.ts b/types/angular-material/angular-material-tests.ts index ad79cff2db..f29de44222 100644 --- a/types/angular-material/angular-material-tests.ts +++ b/types/angular-material/angular-material-tests.ts @@ -8,7 +8,8 @@ myApp.config(( $mdAriaProvider: ng.material.IAriaProvider, $mdThemingProvider: ng.material.IThemingProvider, $mdIconProvider: ng.material.IIconProvider, - $mdProgressCircularProvider: ng.material.IProgressCircularProvider) => { + $mdProgressCircularProvider: ng.material.IProgressCircularProvider, + $mdDialogProvider: ng.material.IDialogProvider) => { $mdThemingProvider.alwaysWatchTheme(true); const neonRedMap: ng.material.IPalette = $mdThemingProvider.extendPalette('red', { 500: 'ff0000' @@ -56,6 +57,23 @@ myApp.config(( // Globally disables all ARIA warnings. $mdAriaProvider.disableWarnings(); + + // Add custom dialog preset + $mdDialogProvider.addPreset('testPreset', { + methods: ['entityName'], + options: () => { + return { + template: + '' + + 'This is a custom preset' + + '', + controllerAs: 'dialog', + bindToController: true, + clickOutsideToClose: true, + escapeToClose: true + }; + } + }); }); myApp.controller('BottomSheetController', ($scope: TestScope, $mdBottomSheet: ng.material.IBottomSheetService, $q: ng.IQService) => { @@ -192,6 +210,11 @@ myApp.controller('DialogController', ($scope: TestScope, $mdDialog: ng.material. onComplete: (scope, element) => { }, onRemoving: (element, removePromise) => { }, }); + + // Show custom dialog preset + $mdDialog.show( + $mdDialog['testPreset']().entityName('Product #6') + ); }); class IconDirective implements ng.IDirective { diff --git a/types/angular-material/index.d.ts b/types/angular-material/index.d.ts index d77f5ae7ce..6885916e8a 100644 --- a/types/angular-material/index.d.ts +++ b/types/angular-material/index.d.ts @@ -125,6 +125,11 @@ declare module 'angular' { } interface IDialogService { + // indexer used to call preset dialog created with $mdDialogProvider + // see: https://material.angularjs.org/latest/api/service/$mdDialog#custom-presets + // tslint:disable-next-line:ban-types + [presetName: string]: Function; + show(dialog: IDialogOptions | IAlertDialog | IConfirmDialog | IPromptDialog): IPromise; confirm(): IConfirmDialog; alert(): IAlertDialog; @@ -133,6 +138,10 @@ declare module 'angular' { cancel(response?: any): void; } + interface IDialogProvider { + addPreset(presetName: string, presetOptions: { methods?: ReadonlyArray, options: () => IDialogOptions }): IDialogProvider; + } + type IIcon = (id: string) => IPromise; // id is a unique ID or URL interface IIconProvider { @@ -223,7 +232,7 @@ declare module 'angular' { contrastDefaultColor?: string; contrastDarkColors?: string | string[]; contrastLightColors?: string | string[]; - contrastStrongLightColors?: string|string[]; + contrastStrongLightColors?: string | string[]; } interface IThemeHues { diff --git a/types/angular-meteor/index.d.ts b/types/angular-meteor/index.d.ts index c842dd2cf0..11d782ee47 100644 --- a/types/angular-meteor/index.d.ts +++ b/types/angular-meteor/index.d.ts @@ -2,7 +2,7 @@ // Project: https://github.com/Urigo/angular-meteor // Definitions by: Peter Grman // Definitions: https://github.com/DefinitelyTyped/DefinitelyTyped -// TypeScript Version: 2.3 +// TypeScript Version: 2.8 /// @@ -101,7 +101,7 @@ declare module 'angular' { * @param [autoClientSave=true] - By default, changes in the Angular object will automatically update the Meteor object. * - However if set to false, changes in the client won't be automatically propagated back to the Meteor object. */ - object(collection: Mongo.Collection, selector: Mongo.Selector|Mongo.ObjectID|string, autoClientSave?: boolean): AngularMeteorObject; + object(collection: Mongo.Collection, selector: Mongo.Selector|Mongo.ObjectID|string, autoClientSave?: boolean): AngularMeteorObject; /** * A service which is a wrapper for Meteor.subscribe. It subscribes to a Meteor.publish method in the client and returns a AngularJS promise when ready. diff --git a/types/angular-translate/index.d.ts b/types/angular-translate/index.d.ts index 69b1f63d72..719fcb5d5c 100644 --- a/types/angular-translate/index.d.ts +++ b/types/angular-translate/index.d.ts @@ -1,11 +1,9 @@ // Type definitions for Angular Translate (pascalprecht.translate module) 2.15 // Project: https://github.com/PascalPrecht/angular-translate -// Definitions by: Michel Salib +// Definitions by: Michel Salib , Gabriel Gil // Definitions: https://github.com/DefinitelyTyped/DefinitelyTyped // TypeScript Version: 2.3 -/// - declare var _: string; export = _; @@ -69,7 +67,7 @@ declare module 'angular' { versionInfo(): string; loaderCache(): any; isReady(): boolean; - onReady(): angular.IPromise; + onReady(fn?: () => void): angular.IPromise; resolveClientLocale(): string; getAvailableLanguageKeys(): string[]; } diff --git a/types/angular/angular-tests.ts b/types/angular/angular-tests.ts index ca9d2c7568..1dff1a0451 100644 --- a/types/angular/angular-tests.ts +++ b/types/angular/angular-tests.ts @@ -1138,7 +1138,8 @@ angular.module('multiSlotTranscludeExample', []) }; }); -angular.module('componentExample', []) +// $ExpectType IModule +const componentModule = angular.module('componentExample', []) .component('counter', { require: {ctrl: '^ctrl'}, bindings: { @@ -1160,6 +1161,16 @@ angular.module('componentExample', []) }, template: '', transclude: true + }) + .component({ + aThirdComponent: { + controller: class AThirdComponentController { + count: number; + }, + bindings: { + count: '=' + } + } }); interface ICopyExampleUser { diff --git a/types/angular/index.d.ts b/types/angular/index.d.ts index 4c896eb430..6dccefc926 100644 --- a/types/angular/index.d.ts +++ b/types/angular/index.d.ts @@ -196,6 +196,12 @@ declare namespace angular { * @param options A definition object passed into the component. */ component(name: string, options: IComponentOptions): IModule; + /** + * Use this method to register a component. + * + * @param object Object map of components where the keys are the names and the values are the component definition objects + */ + component(object: {[componentName: string]: IComponentOptions}): IModule; /** * Use this method to register work which needs to be performed on module loading. * @@ -1028,7 +1034,7 @@ declare namespace angular { all(values: [T1 | IPromise, T2 | IPromise, T3 | IPromise, T4 | IPromise ]): IPromise<[T1, T2, T3, T4]>; all(values: [T1 | IPromise, T2 | IPromise, T3 | IPromise]): IPromise<[T1, T2, T3]>; all(values: [T1 | IPromise, T2 | IPromise]): IPromise<[T1, T2]>; - all(promises: Array>): IPromise; + all(promises: Array>): IPromise; /** * Combines multiple promises into a single promise that is resolved when all of the input promises are resolved. * @@ -1273,6 +1279,7 @@ declare namespace angular { directive(object: {[directiveName: string]: Injectable>}): ICompileProvider; component(name: string, options: IComponentOptions): ICompileProvider; + component(object: {[componentName: string]: IComponentOptions}): ICompileProvider; aHrefSanitizationWhitelist(): RegExp; aHrefSanitizationWhitelist(regexp: RegExp): ICompileProvider; diff --git a/types/ansi-escapes/ansi-escapes-tests.ts b/types/ansi-escapes/ansi-escapes-tests.ts new file mode 100644 index 0000000000..7de77e797f --- /dev/null +++ b/types/ansi-escapes/ansi-escapes-tests.ts @@ -0,0 +1,3 @@ +import * as ansi from "ansi-escapes"; + +console.log(ansi.cursorUp(2) + ansi.cursorLeft === "\u001B[2A\u001B[1000D"); diff --git a/types/ansi-escapes/index.d.ts b/types/ansi-escapes/index.d.ts new file mode 100644 index 0000000000..519d429545 --- /dev/null +++ b/types/ansi-escapes/index.d.ts @@ -0,0 +1,57 @@ +// Type definitions for ansi-escapes 3.0 +// Project: https://github.com/sindresorhus/ansi-escapes +// Definitions by: Rong Shen +// Definitions: https://github.com/DefinitelyTyped/DefinitelyTyped + +/// + +declare namespace Ansi { + interface ImageOptions { + width?: number; + height?: number; + preserveAspectRatio?: boolean; + } + + interface Term { + setCwd(cwd: string): string; + } + + interface AnsiEscapes { + cursorTo(x: number, y?: number): string; + cursorMove(x: number, y?: number): string; + cursorUp(count: number): string; + cursorDown(count: number): string; + cursorForward(count: number): string; + cursorBackward(count: number): string; + + cursorLeft: string; + cursorSavePosition: string; + cursorRestorePosition: string; + cursorGetPosition: string; + cursorNextLine: string; + cursorPrevLine: string; + cursorHide: string; + cursorShow: string; + + eraseLines(count: number): string; + + eraseEndLine: string; + eraseStartLine: string; + eraseLine: string; + eraseDown: string; + eraseUp: string; + eraseScreen: string; + scrollUp: string; + scrollDown: string; + + clearScreen: string; + beep: string; + + link(text: string, url: string): string; + image(buf: Buffer, opts?: ImageOptions): string; + iTerm: Term; + } +} + +declare const ansiEscapes: Ansi.AnsiEscapes; +export = ansiEscapes; diff --git a/types/ansi-escapes/tsconfig.json b/types/ansi-escapes/tsconfig.json new file mode 100644 index 0000000000..210be31288 --- /dev/null +++ b/types/ansi-escapes/tsconfig.json @@ -0,0 +1,16 @@ +{ + "compilerOptions": { + "module": "commonjs", + "lib": ["es6"], + "noImplicitAny": true, + "noImplicitThis": true, + "strictNullChecks": true, + "strictFunctionTypes": true, + "baseUrl": "../", + "typeRoots": ["../"], + "types": [], + "noEmit": true, + "forceConsistentCasingInFileNames": true + }, + "files": ["index.d.ts", "ansi-escapes-tests.ts"] +} diff --git a/types/ansi-escapes/tslint.json b/types/ansi-escapes/tslint.json new file mode 100644 index 0000000000..3db14f85ea --- /dev/null +++ b/types/ansi-escapes/tslint.json @@ -0,0 +1 @@ +{ "extends": "dtslint/dt.json" } diff --git a/types/ansi-styles/ansi-styles-tests.ts b/types/ansi-styles/ansi-styles-tests.ts index 235f98dce1..d1d21719b4 100644 --- a/types/ansi-styles/ansi-styles-tests.ts +++ b/types/ansi-styles/ansi-styles-tests.ts @@ -1,53 +1,52 @@ +import { EscapeCode } from './escape-code'; +import AnsiStyles = require('ansi-styles'); -import ansi = require('ansi-styles'); +let ansiStyles = AnsiStyles as any, + nsNames = ['modifier', 'color', 'bgColor'], + namespaces = { + modifier: ['reset', 'bold', 'dim', 'italic', 'underline', 'inverse', 'hidden', 'strikethrough'], + color: ['black', 'red', 'green', 'yellow', 'blue', 'magenta', 'cyan', 'white', 'gray', + 'redBright', 'greenBright', 'yellowBright', 'blueBright', 'magentaBright', 'cyanBright', 'whiteBright'], + bgColor: ['bgBlack', 'bgRed', 'bgGreen', 'bgYellow', 'bgBlue', 'bgMagenta', 'bgCyan', + 'bgBlackBright', 'bgRedBright', 'bgGreenBright', 'bgYellowBright', 'bgBlueBright', 'bgMagentaBright', 'bgCyanBright', 'bgWhiteBright'], + } as any, + styles = [...namespaces.modifier, ...namespaces.color, ...namespaces.bgColor], + codePair = ['open', 'close'], + codeTypes = ['ansi', 'ansi256', 'ansi16m'], + colorFormats = ['ansi', 'rgb', 'hsl', 'hsv', 'hwb', 'cmyk', 'xyz', 'lab', 'lch', 'hex', 'keyword', 'ansi256', 'hcg', 'apple', 'gray'], + codesMap = 'codes'; -var styles = [ - ansi.reset, +checkStyle(ansiStyles, styles); +nsNames.forEach(ns => checkStyle(ansiStyles[ns], namespaces[ns])); - ansi.bold, - ansi.dim, - ansi.italic, - ansi.underline, - ansi.inverse, - ansi.hidden, - ansi.strikethrough, +checkIsMap(ansiStyles[codesMap], `ansiStyles.${codesMap} not a Map.`); +nsNames.forEach(ns => checkExist(ansiStyles[ns], `ansiStyles.${ns} is not exist.`)); - ansi.black, - ansi.red, - ansi.green, - ansi.yellow, - ansi.blue, - ansi.magenta, - ansi.cyan, - ansi.white, - ansi.gray, +['color', 'bgColor'].forEach(ns => checkConverter(ns, ansiStyles[ns], colorFormats)); - ansi.bgBlack, - ansi.bgRed, - ansi.bgGreen, - ansi.bgYellow, - ansi.bgBlue, - ansi.bgMagenta, - ansi.bgCyan, - ansi.bgWhite -] -for (var key in styles) { - check(key, styles[key]) +function checkStyle(namespace: any, styles: string[]) { + styles.forEach(s => checkCodePair(s, namespace[s])); +} +function checkCodePair(styleName: string, pair: any): void { + codePair.forEach(p => checkIsString(pair[p], `${styleName}.${p} is not a string.`)); } -function check(key:string, escapeCodes:ansi.EscapeCodePair): void { - if (uninitialized(escapeCodes.open)) { - throw new Error('key not found ~> ' + key + '.open') - } - if (uninitialized(escapeCodes.close)) { - throw new Error('key not found ~> ' + key + '.close') - } +function checkConverter(nsName: string, namespace: any, formats: string[]) { + formats.forEach(f => codeTypes.forEach(t => checkIsFunction(namespace[t][f], `ansiStyles.${nsName}.${t}.${f} is not a function.`))); + checkIsString(namespace.close, `${namespace}.close is not a string.`); } -function uninitialized(val:any): boolean { - return val === null || val === undefined +function checkExist(val: any, failMsg: string): void { + if (val == null) throw new Error(failMsg); +} +function checkIsString(val: any, failMsg: string): void { + if(typeof val != 'string') throw new Error(failMsg); +} +function checkIsFunction(fn: any, failMsg: string): void { + if (typeof fn != 'function') throw new Error(failMsg); +} +function checkIsMap(map: any, failMsg: string): void { + if (!(map instanceof Map)) throw new Error(failMsg); } - - diff --git a/types/ansi-styles/escape-code.d.ts b/types/ansi-styles/escape-code.d.ts new file mode 100644 index 0000000000..e9b1fe9d42 --- /dev/null +++ b/types/ansi-styles/escape-code.d.ts @@ -0,0 +1,106 @@ +import * as cssKeywords from 'color-name'; + + +export namespace EscapeCode { + export interface CodePair { + open: string; + close: string; + } + + interface Modifier { + reset: CodePair; + bold: CodePair; + dim: CodePair; + /** + * Not widely supported + */ + italic: CodePair; + underline: CodePair; + inverse: CodePair; + hidden: CodePair; + /** + * Not widely supported + */ + strikethrough: CodePair; + } + interface Color { + black: CodePair; + red: CodePair; + green: CodePair; + yellow: CodePair; + blue: CodePair; + magenta: CodePair; + cyan: CodePair; + white: CodePair; + /** + * bright black + */ + gray: CodePair; + grey: CodePair; + + redBright: CodePair; + greenBright: CodePair; + yellowBright: CodePair; + blueBright: CodePair; + magentaBright: CodePair; + cyanBright: CodePair; + whiteBright: CodePair; + } + interface BackgroundColor { + bgBlack: CodePair; + bgRed: CodePair; + bgGreen: CodePair; + bgYellow: CodePair; + bgBlue: CodePair; + bgMagenta: CodePair; + bgCyan: CodePair; + bgWhite: CodePair; + + bgBlackBright: CodePair; + bgRedBright: CodePair; + bgGreenBright: CodePair; + bgYellowBright: CodePair; + bgBlueBright: CodePair; + bgMagentaBright: CodePair; + bgCyanBright: CodePair; + bgWhiteBright: CodePair; + } + + interface Conversions { + ansi: (ansi: number) => string + rgb: (r: number, g: number, b: number) => string + hsl: (h: number, s: number, l: number) => string + hsv: (h: number, s: number, v: number) => string + hwb: (h: number, w: number, b: number) => string + cmyk: (c: number, m: number, y: number, k: number) => string + xyz: (x: number, y: number, z: number) => string + lab: (l: number, a: number, b: number) => string + lch: (l: number, c: number, h: number) => string + hex: (hex: string) => string + /** + * color keyword in css to ansi code + */ + keyword: (keyword: keyof typeof cssKeywords) => string + ansi256: (ansi256: number) => string + hcg: (h: number, c: number, g: number) => string + /** + * apple RGB to ansi code + */ + apple: (r: number, g: number, b: number) => string + gray: (grayscale: number) => string + } + interface ColorType { + /** + * 16 color ansi code + */ + ansi: Conversions + /** + * 256 color ansi code + */ + ansi256: Conversions + /** + * truecolor(16 million color) ansi code + */ + ansi16m: Conversions + } +} diff --git a/types/ansi-styles/index.d.ts b/types/ansi-styles/index.d.ts index 4522ece77a..a07ac962ab 100644 --- a/types/ansi-styles/index.d.ts +++ b/types/ansi-styles/index.d.ts @@ -1,40 +1,74 @@ -// Type definitions for ansi-styles 2.0.1 +// Type definitions for ansi-styles 3.2.1 // Project: https://github.com/sindresorhus/ansi-styles // Definitions by: bryn austin bellomy +// plylrnsdy // Definitions: https://github.com/DefinitelyTyped/DefinitelyTyped +import { EscapeCode } from './escape-code'; -export interface EscapeCodePair { - open: string; - close: string; -} -export declare var reset: EscapeCodePair; +export const reset: EscapeCode.CodePair; +export const bold: EscapeCode.CodePair; +export const dim: EscapeCode.CodePair; +/** + * Not widely supported + */ +export const italic: EscapeCode.CodePair; +export const underline: EscapeCode.CodePair; +export const inverse: EscapeCode.CodePair; +export const hidden: EscapeCode.CodePair; +/** + * Not widely supported + */ +export const strikethrough: EscapeCode.CodePair; -export declare var bold: EscapeCodePair; -export declare var dim: EscapeCodePair; -export declare var italic: EscapeCodePair; -export declare var underline: EscapeCodePair; -export declare var inverse: EscapeCodePair; -export declare var hidden: EscapeCodePair; -export declare var strikethrough: EscapeCodePair; +export const black: EscapeCode.CodePair; +export const red: EscapeCode.CodePair; +export const green: EscapeCode.CodePair; +export const yellow: EscapeCode.CodePair; +export const blue: EscapeCode.CodePair; +export const magenta: EscapeCode.CodePair; +export const cyan: EscapeCode.CodePair; +export const white: EscapeCode.CodePair; +/** + * bright black + */ +export const gray: EscapeCode.CodePair; +export const grey: EscapeCode.CodePair; -export declare var black: EscapeCodePair; -export declare var red: EscapeCodePair; -export declare var green: EscapeCodePair; -export declare var yellow: EscapeCodePair; -export declare var blue: EscapeCodePair; -export declare var magenta: EscapeCodePair; -export declare var cyan: EscapeCodePair; -export declare var white: EscapeCodePair; -export declare var gray: EscapeCodePair; +export const redBright: EscapeCode.CodePair; +export const greenBright: EscapeCode.CodePair; +export const yellowBright: EscapeCode.CodePair; +export const blueBright: EscapeCode.CodePair; +export const magentaBright: EscapeCode.CodePair; +export const cyanBright: EscapeCode.CodePair; +export const whiteBright: EscapeCode.CodePair; -export declare var bgBlack: EscapeCodePair; -export declare var bgRed: EscapeCodePair; -export declare var bgGreen: EscapeCodePair; -export declare var bgYellow: EscapeCodePair; -export declare var bgBlue: EscapeCodePair; -export declare var bgMagenta: EscapeCodePair; -export declare var bgCyan: EscapeCodePair; -export declare var bgWhite: EscapeCodePair; +export const bgBlack: EscapeCode.CodePair; +export const bgRed: EscapeCode.CodePair; +export const bgGreen: EscapeCode.CodePair; +export const bgYellow: EscapeCode.CodePair; +export const bgBlue: EscapeCode.CodePair; +export const bgMagenta: EscapeCode.CodePair; +export const bgCyan: EscapeCode.CodePair; +export const bgWhite: EscapeCode.CodePair; + +export const bgBlackBright: EscapeCode.CodePair; +export const bgRedBright: EscapeCode.CodePair; +export const bgGreenBright: EscapeCode.CodePair; +export const bgYellowBright: EscapeCode.CodePair; +export const bgBlueBright: EscapeCode.CodePair; +export const bgMagentaBright: EscapeCode.CodePair; +export const bgCyanBright: EscapeCode.CodePair; +export const bgWhiteBright: EscapeCode.CodePair; + +/** + * Raw escape codes (i.e. without the CSI escape prefix \u001B[ and render mode postfix m) are available. + * + * This is a Map with the open codes as keys and close codes as values. + */ +export const codes: Map +export const modifier: EscapeCode.Modifier +export const color: EscapeCode.Color & EscapeCode.ColorType & { close: string } +export const bgColor: EscapeCode.BackgroundColor & EscapeCode.ColorType & { close: string } diff --git a/types/aphrodite/aphrodite-tests.tsx b/types/aphrodite/aphrodite-tests.tsx index 685a9a4283..feb35c8c7c 100644 --- a/types/aphrodite/aphrodite-tests.tsx +++ b/types/aphrodite/aphrodite-tests.tsx @@ -1,5 +1,5 @@ import * as React from "react"; -import { StyleSheet, css, StyleSheetServer, StyleSheetTestUtils } from "aphrodite"; +import { StyleSheet, css, StyleSheetServer, StyleSheetTestUtils, FontFamily } from "aphrodite"; const styles = StyleSheet.create({ red: { @@ -20,7 +20,7 @@ const styles = StyleSheet.create({ } }); -const coolFont = { +const coolFont: FontFamily = { fontFamily: "CoolFont", fontStyle: "normal", fontWeight: "normal", diff --git a/types/aphrodite/index.d.ts b/types/aphrodite/index.d.ts index 00d1908d9f..a82ec2f36b 100644 --- a/types/aphrodite/index.d.ts +++ b/types/aphrodite/index.d.ts @@ -4,13 +4,30 @@ // Definitions: https://github.com/DefinitelyTyped/DefinitelyTyped // TypeScript Version: 2.6 -import * as React from "react"; +import * as CSS from "csstype"; + +type BaseCSSProperties = CSS.Properties; + +type FontFamily = + | BaseCSSProperties['fontFamily'] + | CSS.FontFace; + +type Omit = Pick; + +type CSSProperties = Omit & { + fontFamily?: FontFamily | FontFamily[]; +}; + +// For pseudo selectors and media queries +interface OpenCSSProperties extends CSSProperties { + [k: string]: CSSProperties[keyof CSSProperties] | CSSProperties; +} /** * Aphrodite style declaration */ export interface StyleDeclaration { - [key: string]: React.CSSProperties; + [key: string]: OpenCSSProperties; } interface StyleSheetStatic { diff --git a/types/aphrodite/package.json b/types/aphrodite/package.json new file mode 100644 index 0000000000..e6696d08e7 --- /dev/null +++ b/types/aphrodite/package.json @@ -0,0 +1,6 @@ +{ + "private": true, + "dependencies": { + "csstype": "^2.2.0" + } +} diff --git a/types/apicache/apicache-tests.ts b/types/apicache/apicache-tests.ts new file mode 100644 index 0000000000..1f9eb98dda --- /dev/null +++ b/types/apicache/apicache-tests.ts @@ -0,0 +1,17 @@ +import { middleware, newInstance, options } from 'apicache'; + +let cache = middleware; + +options({ + statusCodes: { + exclude: [404, 429, 500], + include: [200, 304] + } +}); + +cache = newInstance({ + statusCodes: { + exclude: [404, 429, 500], + include: [200, 304] + } +}); diff --git a/types/apicache/index.d.ts b/types/apicache/index.d.ts new file mode 100644 index 0000000000..b62fd7356d --- /dev/null +++ b/types/apicache/index.d.ts @@ -0,0 +1,77 @@ +// Type definitions for apicache 1.2 +// Project: https://github.com/kwhitley/apicache +// Definitions by: Daniel Sogl +// Definitions: https://github.com/DefinitelyTyped/DefinitelyTyped + +import { RedisClient } from 'redis'; + +export const id: number; + +/** + * clears cache target (key or group), or entire cache if no value passed, returns new index. + */ +export function clear(target: string | any[]): any; + +/** used to create a new ApiCache instance with the same options as the current one */ +export function clone(): any; + +export function getDuration(duration: string): any; + +/** + * returns current cache index [of keys] + */ +export function getIndex(): any; + +/** + * the actual middleware that will be used in your routes. duration is in the following format + * "[length] [unit]", as in "10 minutes" or "1 day". A second param is a middleware toggle function, + * accepting request and response params, and must return truthy to enable cache for the request. + * Third param is the options that will override global ones and affect this middleware only. + */ +export function middleware( + duration?: string, + toggleMiddleware?: any, + localOptions?: Options +): any; + +/** + * used to create a new ApiCache instance (by default, simply requiring this library shares a common instance) + */ +export function newInstance(config: Options): any; + +/** + * getter/setter for global options. If used as a setter, this function is + * chainable, allowing you to do things such as... say... return the middleware. + */ +export function options(options: Options): any; + +export function resetIndex(): void; + +export interface Options { + /** if true, enables console output */ + debug?: boolean; + /** should be either a number (in ms) or a string, defaults to 1 hour */ + defaultDuration?: string; + /** if false, turns off caching globally (useful on dev) */ + enabled?: boolean; + /** + * if provided, uses the [node-redis](https://github.com/NodeRedis/node_redis) client instead of [memory-cache](https://github.com/ptarjan/node-cache) + */ + redisClient?: RedisClient; + /** appendKey takes the req/res objects and returns a custom value to extend the cache key */ + appendKey?: any; + /** list of headers that should never be cached */ + headerBlacklist?: string[]; + statusCodes?: { + /** list status codes to specifically exclude (e.g. [404, 403] cache all responses unless they had a 404 or 403 status) */ + exclude?: number[]; + /** list status codes to require (e.g. [200] caches ONLY responses with a success/200 code) */ + include?: number[]; + }; + /** + * 'cache-control': 'no-cache' // example of header overwrite + */ + headers?: { + [key: string]: string; + }; +} diff --git a/types/apicache/tsconfig.json b/types/apicache/tsconfig.json new file mode 100644 index 0000000000..9ae5f1f827 --- /dev/null +++ b/types/apicache/tsconfig.json @@ -0,0 +1,16 @@ +{ + "compilerOptions": { + "module": "commonjs", + "lib": ["es6"], + "noImplicitAny": true, + "noImplicitThis": true, + "strictNullChecks": true, + "strictFunctionTypes": true, + "baseUrl": "../", + "typeRoots": ["../"], + "types": [], + "noEmit": true, + "forceConsistentCasingInFileNames": true + }, + "files": ["index.d.ts", "apicache-tests.ts"] +} diff --git a/types/apicache/tslint.json b/types/apicache/tslint.json new file mode 100644 index 0000000000..2750cc0197 --- /dev/null +++ b/types/apicache/tslint.json @@ -0,0 +1 @@ +{ "extends": "dtslint/dt.json" } \ No newline at end of file diff --git a/types/arangodb/arangodb-tests.ts b/types/arangodb/arangodb-tests.ts new file mode 100644 index 0000000000..7e0fd6383e --- /dev/null +++ b/types/arangodb/arangodb-tests.ts @@ -0,0 +1,98 @@ +import { aql, db, query } from "@arangodb"; +import { md5 } from "@arangodb/crypto"; +import { createRouter } from "@arangodb/foxx"; +import sessionsMiddleware = require("@arangodb/foxx/sessions"); +import jwtStorage = require("@arangodb/foxx/sessions/storages/jwt"); +import cookieTransport = require("@arangodb/foxx/sessions/transports/cookie"); + +console.warnStack(new Error(), "something went wrong"); + +interface User { + username: string; + password?: string; +} +const coll = module.context.collection("users")!; +coll.save({ username: "user" }); +const doc = coll.any(); +console.log(doc.username); + +const users = coll as ArangoDB.Collection; +const admin = users.firstExample({ username: "admin" })!; +users.update(admin, { password: md5("hunter2") }); +console.logLines("user", admin._key, admin.username); + +db._query(aql` + FOR u IN ${users} + RETURN u +`); + +interface Banana { + color: string; + shape: { + type: string; + coords: string[]; + }; +} + +const bananas = db._createDocumentCollection("bananas", { + waitForSync: false, + keyOptions: { + type: "autoincrement", + increment: 11, + offset: 23 + } +}) as ArangoDB.Collection; +bananas.ensureIndex({ + type: "hash", + unique: true, + fields: ["color", "shape.type"] +}); +bananas.updateByExample( + bananas.any(), + { shape: { type: "round" } }, + { mergeObjects: true } +); +bananas.ensureIndex({ + type: "geo", + fields: ["latLng"] +}); + +const router = createRouter(); +module.context.use(router); + +router.get("/", (req, res) => { + if (req.cookie("sid", { secret: "keyboardcat" })) { + res.set("content-type", "text/plain"); + res.write("Welcome back, Commander"); + } else { + res.json({ success: false }); + } +}); + +router.use((req, res, next) => { + if (req.is("json")) res.throw("too many requests"); + next(); +}); + +router.use( + sessionsMiddleware({ + storage: jwtStorage({ algorithm: "none" }), + transport: "header" + }) +); +router.use( + sessionsMiddleware({ + storage: jwtStorage({ algorithm: "HS512", secret: "tacocat" }), + transport: cookieTransport({ secret: "banana", algorithm: "sha256" }) + }) +); + +console.log( + query` + FOR u IN users + ${aql.literal( + Math.random() < 0.5 ? "FILTER u.admin" : "FILTER !u.admin" + )} + RETURN u + `.toArray() +); diff --git a/types/arangodb/index.d.ts b/types/arangodb/index.d.ts new file mode 100644 index 0000000000..5c3f56020f --- /dev/null +++ b/types/arangodb/index.d.ts @@ -0,0 +1,1896 @@ +// Type definitions for ArangoDB 3.4 +// Project: https://github.com/arangodb/arangodb +// Definitions by: Alan Plum +// Definitions: https://github.com/DefinitelyTyped/DefinitelyTyped +// TypeScript Version: 2.3 + +/// + +declare namespace ArangoDB { + type JwtAlgorithm = "HS512" | "HS384" | "HS256"; + type HashAlgorithm = + | "sha512" + | "sha384" + | "sha256" + | "sha224" + | "sha1" + | "md5"; + type HttpMethod = + | "HEAD" + | "GET" + | "POST" + | "PUT" + | "PATCH" + | "DELETE" + | "OPTIONS"; + type HttpStatus = + | "continue" + | "switching protocols" + | "processing" + | "ok" + | "created" + | "accepted" + | "non-authoritative information" + | "no content" + | "reset content" + | "partial content" + | "multi-status" + | "already reported" + | "im used" + | "multiple choices" + | "moved permanently" + | "found" + | "see other" + | "not modified" + | "use proxy" + | "(unused)" + | "temporary redirect" + | "permanent redirect" + | "bad request" + | "unauthorized" + | "payment required" + | "forbidden" + | "not found" + | "method not allowed" + | "not acceptable" + | "proxy authentication required" + | "request timeout" + | "conflict" + | "gone" + | "length required" + | "precondition failed" + | "payload too large" + | "uri too long" + | "unsupported media type" + | "range not satisfiable" + | "expectation failed" + | "i'm a teapot" + | "misdirected request" + | "unprocessable entity" + | "locked" + | "failed dependency" + | "unordered collection" + | "upgrade required" + | "precondition required" + | "too many requests" + | "request header fields too large" + | "unavailable for legal reasons" + | "internal server error" + | "not implemented" + | "bad gateway" + | "service unavailable" + | "gateway timeout" + | "http version not supported" + | "variant also negotiates" + | "insufficient storage" + | "loop detected" + | "bandwidth limit exceeded" + | "not extended" + | "network authentication required"; + type EdgeDirection = "any" | "inbound" | "outbound"; + type EngineType = "mmfiles" | "rocksdb"; + type IndexType = "hash" | "skiplist" | "fulltext" | "geo"; + type ViewType = "arangosearch"; + type KeyGeneratorType = "traditional" | "autoincrement"; + type ErrorName = + | "ERROR_NO_ERROR" + | "ERROR_FAILED" + | "ERROR_SYS_ERROR" + | "ERROR_OUT_OF_MEMORY" + | "ERROR_INTERNAL" + | "ERROR_ILLEGAL_NUMBER" + | "ERROR_NUMERIC_OVERFLOW" + | "ERROR_ILLEGAL_OPTION" + | "ERROR_DEAD_PID" + | "ERROR_NOT_IMPLEMENTED" + | "ERROR_BAD_PARAMETER" + | "ERROR_FORBIDDEN" + | "ERROR_OUT_OF_MEMORY_MMAP" + | "ERROR_CORRUPTED_CSV" + | "ERROR_FILE_NOT_FOUND" + | "ERROR_CANNOT_WRITE_FILE" + | "ERROR_CANNOT_OVERWRITE_FILE" + | "ERROR_TYPE_ERROR" + | "ERROR_LOCK_TIMEOUT" + | "ERROR_CANNOT_CREATE_DIRECTORY" + | "ERROR_CANNOT_CREATE_TEMP_FILE" + | "ERROR_REQUEST_CANCELED" + | "ERROR_DEBUG" + | "ERROR_IP_ADDRESS_INVALID" + | "ERROR_FILE_EXISTS" + | "ERROR_LOCKED" + | "ERROR_DEADLOCK" + | "ERROR_SHUTTING_DOWN" + | "ERROR_ONLY_ENTERPRISE" + | "ERROR_RESOURCE_LIMIT" + | "ERROR_ARANGO_ICU_ERROR" + | "ERROR_CANNOT_READ_FILE" + | "ERROR_HTTP_BAD_PARAMETER" + | "ERROR_HTTP_UNAUTHORIZED" + | "ERROR_HTTP_FORBIDDEN" + | "ERROR_HTTP_NOT_FOUND" + | "ERROR_HTTP_METHOD_NOT_ALLOWED" + | "ERROR_HTTP_NOT_ACCEPTABLE" + | "ERROR_HTTP_PRECONDITION_FAILED" + | "ERROR_HTTP_SERVER_ERROR" + | "ERROR_HTTP_SERVICE_UNAVAILABLE" + | "ERROR_HTTP_GATEWAY_TIMEOUT" + | "ERROR_HTTP_CORRUPTED_JSON" + | "ERROR_HTTP_SUPERFLUOUS_SUFFICES" + | "ERROR_ARANGO_ILLEGAL_STATE" + | "ERROR_ARANGO_DATAFILE_SEALED" + | "ERROR_ARANGO_READ_ONLY" + | "ERROR_ARANGO_DUPLICATE_IDENTIFIER" + | "ERROR_ARANGO_DATAFILE_UNREADABLE" + | "ERROR_ARANGO_DATAFILE_EMPTY" + | "ERROR_ARANGO_RECOVERY" + | "ERROR_ARANGO_DATAFILE_STATISTICS_NOT_FOUND" + | "ERROR_ARANGO_CORRUPTED_DATAFILE" + | "ERROR_ARANGO_ILLEGAL_PARAMETER_FILE" + | "ERROR_ARANGO_CORRUPTED_COLLECTION" + | "ERROR_ARANGO_MMAP_FAILED" + | "ERROR_ARANGO_FILESYSTEM_FULL" + | "ERROR_ARANGO_NO_JOURNAL" + | "ERROR_ARANGO_DATAFILE_ALREADY_EXISTS" + | "ERROR_ARANGO_DATADIR_LOCKED" + | "ERROR_ARANGO_COLLECTION_DIRECTORY_ALREADY_EXISTS" + | "ERROR_ARANGO_MSYNC_FAILED" + | "ERROR_ARANGO_DATADIR_UNLOCKABLE" + | "ERROR_ARANGO_SYNC_TIMEOUT" + | "ERROR_ARANGO_CONFLICT" + | "ERROR_ARANGO_DATADIR_INVALID" + | "ERROR_ARANGO_DOCUMENT_NOT_FOUND" + | "ERROR_ARANGO_DATA_SOURCE_NOT_FOUND" + | "ERROR_ARANGO_COLLECTION_PARAMETER_MISSING" + | "ERROR_ARANGO_DOCUMENT_HANDLE_BAD" + | "ERROR_ARANGO_MAXIMAL_SIZE_TOO_SMALL" + | "ERROR_ARANGO_DUPLICATE_NAME" + | "ERROR_ARANGO_ILLEGAL_NAME" + | "ERROR_ARANGO_NO_INDEX" + | "ERROR_ARANGO_UNIQUE_CONSTRAINT_VIOLATED" + | "ERROR_ARANGO_INDEX_NOT_FOUND" + | "ERROR_ARANGO_CROSS_COLLECTION_REQUEST" + | "ERROR_ARANGO_INDEX_HANDLE_BAD" + | "ERROR_ARANGO_DOCUMENT_TOO_LARGE" + | "ERROR_ARANGO_COLLECTION_NOT_UNLOADED" + | "ERROR_ARANGO_COLLECTION_TYPE_INVALID" + | "ERROR_ARANGO_VALIDATION_FAILED" + | "ERROR_ARANGO_ATTRIBUTE_PARSER_FAILED" + | "ERROR_ARANGO_DOCUMENT_KEY_BAD" + | "ERROR_ARANGO_DOCUMENT_KEY_UNEXPECTED" + | "ERROR_ARANGO_DATADIR_NOT_WRITABLE" + | "ERROR_ARANGO_OUT_OF_KEYS" + | "ERROR_ARANGO_DOCUMENT_KEY_MISSING" + | "ERROR_ARANGO_DOCUMENT_TYPE_INVALID" + | "ERROR_ARANGO_DATABASE_NOT_FOUND" + | "ERROR_ARANGO_DATABASE_NAME_INVALID" + | "ERROR_ARANGO_USE_SYSTEM_DATABASE" + | "ERROR_ARANGO_ENDPOINT_NOT_FOUND" + | "ERROR_ARANGO_INVALID_KEY_GENERATOR" + | "ERROR_ARANGO_INVALID_EDGE_ATTRIBUTE" + | "ERROR_ARANGO_INDEX_DOCUMENT_ATTRIBUTE_MISSING" + | "ERROR_ARANGO_INDEX_CREATION_FAILED" + | "ERROR_ARANGO_WRITE_THROTTLE_TIMEOUT" + | "ERROR_ARANGO_COLLECTION_TYPE_MISMATCH" + | "ERROR_ARANGO_COLLECTION_NOT_LOADED" + | "ERROR_ARANGO_DOCUMENT_REV_BAD" + | "ERROR_ARANGO_DATAFILE_FULL" + | "ERROR_ARANGO_EMPTY_DATADIR" + | "ERROR_ARANGO_TRY_AGAIN" + | "ERROR_ARANGO_BUSY" + | "ERROR_ARANGO_MERGE_IN_PROGRESS" + | "ERROR_ARANGO_IO_ERROR" + | "ERROR_REPLICATION_NO_RESPONSE" + | "ERROR_REPLICATION_INVALID_RESPONSE" + | "ERROR_REPLICATION_MASTER_ERROR" + | "ERROR_REPLICATION_MASTER_INCOMPATIBLE" + | "ERROR_REPLICATION_MASTER_CHANGE" + | "ERROR_REPLICATION_LOOP" + | "ERROR_REPLICATION_UNEXPECTED_MARKER" + | "ERROR_REPLICATION_INVALID_APPLIER_STATE" + | "ERROR_REPLICATION_UNEXPECTED_TRANSACTION" + | "ERROR_REPLICATION_INVALID_APPLIER_CONFIGURATION" + | "ERROR_REPLICATION_RUNNING" + | "ERROR_REPLICATION_APPLIER_STOPPED" + | "ERROR_REPLICATION_NO_START_TICK" + | "ERROR_REPLICATION_START_TICK_NOT_PRESENT" + | "ERROR_REPLICATION_WRONG_CHECKSUM" + | "ERROR_REPLICATION_SHARD_NONEMPTY" + | "ERROR_CLUSTER_NO_AGENCY" + | "ERROR_CLUSTER_NO_COORDINATOR_HEADER" + | "ERROR_CLUSTER_COULD_NOT_LOCK_PLAN" + | "ERROR_CLUSTER_COLLECTION_ID_EXISTS" + | "ERROR_CLUSTER_COULD_NOT_CREATE_COLLECTION_IN_PLAN" + | "ERROR_CLUSTER_COULD_NOT_READ_CURRENT_VERSION" + | "ERROR_CLUSTER_COULD_NOT_CREATE_COLLECTION" + | "ERROR_CLUSTER_TIMEOUT" + | "ERROR_CLUSTER_COULD_NOT_REMOVE_COLLECTION_IN_PLAN" + | "ERROR_CLUSTER_COULD_NOT_REMOVE_COLLECTION_IN_CURRENT" + | "ERROR_CLUSTER_COULD_NOT_CREATE_DATABASE_IN_PLAN" + | "ERROR_CLUSTER_COULD_NOT_CREATE_DATABASE" + | "ERROR_CLUSTER_COULD_NOT_REMOVE_DATABASE_IN_PLAN" + | "ERROR_CLUSTER_COULD_NOT_REMOVE_DATABASE_IN_CURRENT" + | "ERROR_CLUSTER_SHARD_GONE" + | "ERROR_CLUSTER_CONNECTION_LOST" + | "ERROR_CLUSTER_MUST_NOT_SPECIFY_KEY" + | "ERROR_CLUSTER_GOT_CONTRADICTING_ANSWERS" + | "ERROR_CLUSTER_NOT_ALL_SHARDING_ATTRIBUTES_GIVEN" + | "ERROR_CLUSTER_MUST_NOT_CHANGE_SHARDING_ATTRIBUTES" + | "ERROR_CLUSTER_UNSUPPORTED" + | "ERROR_CLUSTER_ONLY_ON_COORDINATOR" + | "ERROR_CLUSTER_READING_PLAN_AGENCY" + | "ERROR_CLUSTER_COULD_NOT_TRUNCATE_COLLECTION" + | "ERROR_CLUSTER_AQL_COMMUNICATION" + | "ERROR_ARANGO_DOCUMENT_NOT_FOUND_OR_SHARDING_ATTRIBUTES_CHANGED" + | "ERROR_CLUSTER_COULD_NOT_DETERMINE_ID" + | "ERROR_CLUSTER_ONLY_ON_DBSERVER" + | "ERROR_CLUSTER_BACKEND_UNAVAILABLE" + | "ERROR_CLUSTER_UNKNOWN_CALLBACK_ENDPOINT" + | "ERROR_CLUSTER_AGENCY_STRUCTURE_INVALID" + | "ERROR_CLUSTER_AQL_COLLECTION_OUT_OF_SYNC" + | "ERROR_CLUSTER_COULD_NOT_CREATE_INDEX_IN_PLAN" + | "ERROR_CLUSTER_COULD_NOT_DROP_INDEX_IN_PLAN" + | "ERROR_CLUSTER_CHAIN_OF_DISTRIBUTESHARDSLIKE" + | "ERROR_CLUSTER_MUST_NOT_DROP_COLL_OTHER_DISTRIBUTESHARDSLIKE" + | "ERROR_CLUSTER_UNKNOWN_DISTRIBUTESHARDSLIKE" + | "ERROR_CLUSTER_INSUFFICIENT_DBSERVERS" + | "ERROR_CLUSTER_COULD_NOT_DROP_FOLLOWER" + | "ERROR_CLUSTER_SHARD_LEADER_REFUSES_REPLICATION" + | "ERROR_CLUSTER_SHARD_FOLLOWER_REFUSES_OPERATION" + | "ERROR_CLUSTER_SHARD_LEADER_RESIGNED" + | "ERROR_CLUSTER_AGENCY_COMMUNICATION_FAILED" + | "ERROR_CLUSTER_DISTRIBUTE_SHARDS_LIKE_REPLICATION_FACTOR" + | "ERROR_CLUSTER_DISTRIBUTE_SHARDS_LIKE_NUMBER_OF_SHARDS" + | "ERROR_CLUSTER_LEADERSHIP_CHALLENGE_ONGOING" + | "ERROR_CLUSTER_NOT_LEADER" + | "ERROR_CLUSTER_COULD_NOT_CREATE_VIEW_IN_PLAN" + | "ERROR_QUERY_KILLED" + | "ERROR_QUERY_PARSE" + | "ERROR_QUERY_EMPTY" + | "ERROR_QUERY_SCRIPT" + | "ERROR_QUERY_NUMBER_OUT_OF_RANGE" + | "ERROR_QUERY_VARIABLE_NAME_INVALID" + | "ERROR_QUERY_VARIABLE_REDECLARED" + | "ERROR_QUERY_VARIABLE_NAME_UNKNOWN" + | "ERROR_QUERY_COLLECTION_LOCK_FAILED" + | "ERROR_QUERY_TOO_MANY_COLLECTIONS" + | "ERROR_QUERY_DOCUMENT_ATTRIBUTE_REDECLARED" + | "ERROR_QUERY_FUNCTION_NAME_UNKNOWN" + | "ERROR_QUERY_FUNCTION_ARGUMENT_NUMBER_MISMATCH" + | "ERROR_QUERY_FUNCTION_ARGUMENT_TYPE_MISMATCH" + | "ERROR_QUERY_INVALID_REGEX" + | "ERROR_QUERY_BIND_PARAMETERS_INVALID" + | "ERROR_QUERY_BIND_PARAMETER_MISSING" + | "ERROR_QUERY_BIND_PARAMETER_UNDECLARED" + | "ERROR_QUERY_BIND_PARAMETER_TYPE" + | "ERROR_QUERY_INVALID_LOGICAL_VALUE" + | "ERROR_QUERY_INVALID_ARITHMETIC_VALUE" + | "ERROR_QUERY_DIVISION_BY_ZERO" + | "ERROR_QUERY_ARRAY_EXPECTED" + | "ERROR_QUERY_FAIL_CALLED" + | "ERROR_QUERY_GEO_INDEX_MISSING" + | "ERROR_QUERY_FULLTEXT_INDEX_MISSING" + | "ERROR_QUERY_INVALID_DATE_VALUE" + | "ERROR_QUERY_MULTI_MODIFY" + | "ERROR_QUERY_INVALID_AGGREGATE_EXPRESSION" + | "ERROR_QUERY_COMPILE_TIME_OPTIONS" + | "ERROR_QUERY_EXCEPTION_OPTIONS" + | "ERROR_QUERY_COLLECTION_USED_IN_EXPRESSION" + | "ERROR_QUERY_DISALLOWED_DYNAMIC_CALL" + | "ERROR_QUERY_ACCESS_AFTER_MODIFICATION" + | "ERROR_QUERY_FUNCTION_INVALID_NAME" + | "ERROR_QUERY_FUNCTION_INVALID_CODE" + | "ERROR_QUERY_FUNCTION_NOT_FOUND" + | "ERROR_QUERY_FUNCTION_RUNTIME_ERROR" + | "ERROR_QUERY_BAD_JSON_PLAN" + | "ERROR_QUERY_NOT_FOUND" + | "ERROR_QUERY_IN_USE" + | "ERROR_QUERY_USER_ASSERT" + | "ERROR_QUERY_USER_WARN" + | "ERROR_CURSOR_NOT_FOUND" + | "ERROR_CURSOR_BUSY" + | "ERROR_TRANSACTION_INTERNAL" + | "ERROR_TRANSACTION_NESTED" + | "ERROR_TRANSACTION_UNREGISTERED_COLLECTION" + | "ERROR_TRANSACTION_DISALLOWED_OPERATION" + | "ERROR_TRANSACTION_ABORTED" + | "ERROR_USER_INVALID_NAME" + | "ERROR_USER_INVALID_PASSWORD" + | "ERROR_USER_DUPLICATE" + | "ERROR_USER_NOT_FOUND" + | "ERROR_USER_CHANGE_PASSWORD" + | "ERROR_USER_EXTERNAL" + | "ERROR_SERVICE_INVALID_NAME" + | "ERROR_SERVICE_INVALID_MOUNT" + | "ERROR_SERVICE_DOWNLOAD_FAILED" + | "ERROR_SERVICE_UPLOAD_FAILED" + | "ERROR_LDAP_CANNOT_INIT" + | "ERROR_LDAP_CANNOT_SET_OPTION" + | "ERROR_LDAP_CANNOT_BIND" + | "ERROR_LDAP_CANNOT_UNBIND" + | "ERROR_LDAP_CANNOT_SEARCH" + | "ERROR_LDAP_CANNOT_START_TLS" + | "ERROR_LDAP_FOUND_NO_OBJECTS" + | "ERROR_LDAP_NOT_ONE_USER_FOUND" + | "ERROR_LDAP_USER_NOT_IDENTIFIED" + | "ERROR_LDAP_INVALID_MODE" + | "ERROR_TASK_INVALID_ID" + | "ERROR_TASK_DUPLICATE_ID" + | "ERROR_TASK_NOT_FOUND" + | "ERROR_GRAPH_INVALID_GRAPH" + | "ERROR_GRAPH_COULD_NOT_CREATE_GRAPH" + | "ERROR_GRAPH_INVALID_VERTEX" + | "ERROR_GRAPH_COULD_NOT_CREATE_VERTEX" + | "ERROR_GRAPH_COULD_NOT_CHANGE_VERTEX" + | "ERROR_GRAPH_INVALID_EDGE" + | "ERROR_GRAPH_COULD_NOT_CREATE_EDGE" + | "ERROR_GRAPH_COULD_NOT_CHANGE_EDGE" + | "ERROR_GRAPH_TOO_MANY_ITERATIONS" + | "ERROR_GRAPH_INVALID_FILTER_RESULT" + | "ERROR_GRAPH_EMPTY" + | "ERROR_SESSION_UNKNOWN" + | "ERROR_SESSION_EXPIRED" + | "SIMPLE_CLIENT_UNKNOWN_ERROR" + | "SIMPLE_CLIENT_COULD_NOT_CONNECT" + | "SIMPLE_CLIENT_COULD_NOT_WRITE" + | "SIMPLE_CLIENT_COULD_NOT_READ" + | "COMMUNICATOR_REQUEST_ABORTED" + | "COMMUNICATOR_DISABLED" + | "ERROR_MALFORMED_MANIFEST_FILE" + | "ERROR_INVALID_SERVICE_MANIFEST" + | "ERROR_SERVICE_FILES_MISSING" + | "ERROR_SERVICE_FILES_OUTDATED" + | "ERROR_INVALID_FOXX_OPTIONS" + | "ERROR_INVALID_MOUNTPOINT" + | "ERROR_SERVICE_NOT_FOUND" + | "ERROR_SERVICE_NEEDS_CONFIGURATION" + | "ERROR_SERVICE_MOUNTPOINT_CONFLICT" + | "ERROR_SERVICE_MANIFEST_NOT_FOUND" + | "ERROR_SERVICE_OPTIONS_MALFORMED" + | "ERROR_SERVICE_SOURCE_NOT_FOUND" + | "ERROR_SERVICE_SOURCE_ERROR" + | "ERROR_SERVICE_UNKNOWN_SCRIPT" + | "ERROR_MODULE_NOT_FOUND" + | "ERROR_MODULE_SYNTAX_ERROR" + | "ERROR_MODULE_FAILURE" + | "ERROR_NO_SMART_COLLECTION" + | "ERROR_NO_SMART_GRAPH_ATTRIBUTE" + | "ERROR_CANNOT_DROP_SMART_COLLECTION" + | "ERROR_KEY_MUST_BE_PREFIXED_WITH_SMART_GRAPH_ATTRIBUTE" + | "ERROR_ILLEGAL_SMART_GRAPH_ATTRIBUTE" + | "ERROR_AGENCY_INQUIRY_SYNTAX" + | "ERROR_AGENCY_INFORM_MUST_BE_OBJECT" + | "ERROR_AGENCY_INFORM_MUST_CONTAIN_TERM" + | "ERROR_AGENCY_INFORM_MUST_CONTAIN_ID" + | "ERROR_AGENCY_INFORM_MUST_CONTAIN_ACTIVE" + | "ERROR_AGENCY_INFORM_MUST_CONTAIN_POOL" + | "ERROR_AGENCY_INFORM_MUST_CONTAIN_MIN_PING" + | "ERROR_AGENCY_INFORM_MUST_CONTAIN_MAX_PING" + | "ERROR_AGENCY_INFORM_MUST_CONTAIN_TIMEOUT_MULT" + | "ERROR_AGENCY_INQUIRE_CLIENT_ID_MUST_BE_STRING" + | "ERROR_AGENCY_CANNOT_REBUILD_DBS" + | "ERROR_SUPERVISION_GENERAL_FAILURE" + | "ERROR_DISPATCHER_IS_STOPPING" + | "ERROR_QUEUE_UNKNOWN" + | "ERROR_QUEUE_FULL"; + + // Collection + + type DocumentCollectionType = 2; + type EdgeCollectionType = 3; + type CollectionType = DocumentCollectionType | EdgeCollectionType; + + interface CollectionChecksum { + checksum: string; + revision: string; + } + + interface CollectionFigures { + alive: { + count: number; + size: number; + }; + dead: { + count: number; + size: number; + deletion: number; + }; + datafiles: { + count: number; + fileSize: number; + }; + journals: { + count: number; + fileSize: number; + }; + compactors: { + count: number; + fileSize: number; + }; + shapefiles: { + count: number; + fileSize: number; + }; + shapes: { + count: number; + size: number; + }; + attributes: { + count: number; + size: number; + }; + indexes: { + count: number; + size: number; + }; + lastTick: number; + uncollectedLogfileEntries: number; + documentReferences: number; + waitingFor: string; + compactionStatus: { + time: string; + message: string; + count: number; + filesCombined: number; + bytesRead: number; + bytesWritten: number; + }; + } + + interface CollectionPropertiesOptions { + waitForSync?: boolean; + journalSize?: number; + indexBuckets?: number; + replicationFactor?: number; + } + + interface CreateCollectionOptions { + waitForSync?: boolean; + journalSize?: number; + isVolatile?: boolean; + isSystem?: boolean; + keyOptions?: { + type?: KeyGeneratorType; + allowUserKeys?: boolean; + increment?: number; + offset?: number; + }; + numberOfShards?: number; + shardKeys?: string[]; + replicationFactor?: number; + } + + interface CollectionProperties { + waitForSync: boolean; + journalSize: number; + isSystem: boolean; + isVolatile: boolean; + keyOptions?: { + type: KeyGeneratorType; + allowUserKeys: boolean; + increment?: number; + offset?: number; + }; + indexBuckets: number; + numberOfShards?: number; + shardKeys?: string[]; + replicationFactor?: number; + } + + // Indexes + + interface IndexLike { + [key: string]: any; + id: string; + } + + interface IndexDescription { + type: IndexType; + fields: ReadonlyArray; + sparse?: boolean; + unique?: boolean; + deduplicate?: boolean; + } + + interface Index { + id: string; + type: IndexType; + fields: Array; + sparse: boolean; + unique: boolean; + deduplicate: boolean; + isNewlyCreated: boolean; + selectivityEstimate: number; + code: number; + } + + // Document + + interface ObjectWithId { + [key: string]: any; + _id: string; + } + + interface ObjectWithKey { + [key: string]: any; + _key: string; + } + + type DocumentLike = ObjectWithId | ObjectWithKey; + + type Patch = { [K in keyof T]?: T[K] | Patch }; + + interface DocumentMetadata { + _key: string; + _id: string; + _rev: string; + } + + interface UpdateMetadata extends DocumentMetadata { + _oldRev: string; + } + + type Document = { [K in keyof T]: T[K] } & + DocumentMetadata & { _from?: string; _to?: string } & { + [key: string]: any; + }; + type DocumentData = { [K in keyof T]: T[K] } & + Partial; + type Edge = Document & { + _from: string; + _to: string; + }; + + interface InsertResult extends DocumentMetadata { + new?: Document; + } + interface UpdateResult extends UpdateMetadata { + old?: Document; + new?: Document; + } + interface RemoveResult extends DocumentMetadata { + old?: Document; + } + + interface InsertOptions { + waitForSync?: boolean; + silent?: boolean; + returnNew?: boolean; + } + + interface ReplaceOptions extends InsertOptions { + overwrite?: boolean; + returnOld?: boolean; + } + + interface UpdateOptions extends ReplaceOptions { + keepNull?: boolean; + mergeObjects?: boolean; + } + + interface UpdateByExampleOptions { + keepNull?: boolean; + waitForSync?: boolean; + limit?: number; + mergeObjects?: boolean; + } + + interface RemoveOptions { + waitForSync?: boolean; + overwrite?: boolean; + returnOld?: boolean; + silent?: boolean; + } + + interface RemoveByExampleOptions { + waitForSync?: boolean; + limit?: number; + } + + interface IterateOptions { + limit?: number; + probability?: number; + } + + type DocumentIterator = ( + document: Document, + number: number + ) => void; + + interface Collection { + // Collection + checksum( + withRevisions?: boolean, + withData?: boolean + ): CollectionChecksum; + count(): number; + drop(options?: { isSystem?: boolean }): void; + figures(): CollectionFigures; + load(): void; + path(): string; + properties( + properties?: CollectionPropertiesOptions + ): CollectionProperties; + revision(): string; + rotate(): void; + toArray(): Array>; + truncate(): void; + type(): CollectionType; + unload(): void; + + // Indexes + dropIndex(index: string | IndexLike): boolean; + ensureIndex(description: IndexDescription): Index; + getIndexes(): Array>; + index(index: string | IndexLike): Index | null; + + // Document + all(): Cursor>; + any(): Document; + byExample(example: Partial>): Cursor>; + document(selector: string | DocumentLike): Document; + document( + selectors: ReadonlyArray + ): Array>; + exists(name: string): boolean; + firstExample(example: Partial>): Document | null; + insert(data: DocumentData, options?: InsertOptions): InsertResult; + insert( + array: ReadonlyArray>, + options?: InsertOptions + ): Array>; + insert( + from: string, + to: string, + data: DocumentData, + options?: InsertOptions + ): InsertResult; + edges( + vertex: string | ObjectWithId | ReadonlyArray + ): Array>; + inEdges( + vertex: string | ObjectWithId | ReadonlyArray + ): Array>; + outEdges( + vertex: string | ObjectWithId | ReadonlyArray + ): Array>; + iterate(iterator: DocumentIterator, options?: IterateOptions): void; + remove( + selector: string | DocumentLike, + options?: RemoveOptions + ): RemoveResult; + remove( + selectors: ReadonlyArray, + options?: RemoveOptions + ): RemoveResult[]; + removeByExample( + example: Partial>, + waitForSync?: boolean, + limit?: number + ): number; + removeByExample( + example: Partial>, + options?: RemoveByExampleOptions + ): number; + rename(newName: string): void; + replace( + selector: string | DocumentLike, + data: DocumentData, + options?: ReplaceOptions + ): UpdateResult; + replace( + selectors: ReadonlyArray, + data: ReadonlyArray>, + options?: ReplaceOptions + ): Array>; + replaceByExample( + example: Partial>, + newValue: DocumentData, + waitForSync?: boolean, + limit?: number + ): number; + replaceByExample( + example: Partial>, + newValue: DocumentData, + options?: { waitForSync?: boolean; limit?: number } + ): number; + save(data: DocumentData, options?: InsertOptions): InsertResult; + save( + array: ReadonlyArray>, + options?: InsertOptions + ): Array>; + save( + from: string, + to: string, + data: DocumentData, + options?: InsertOptions + ): InsertResult; + update( + selector: string | DocumentLike, + data: Patch>, + options?: UpdateOptions + ): UpdateResult; + update( + selectors: ReadonlyArray, + data: ReadonlyArray>>, + options?: UpdateOptions + ): Array>; + updateByExample( + example: Partial>, + newValue: Patch>, + keepNull?: boolean, + waitForSync?: boolean, + limit?: number + ): number; + updateByExample( + example: Partial>, + newValue: Patch>, + options?: UpdateByExampleOptions + ): number; + } + + // Database + + interface DatabaseUser { + username: string; + passwd?: string; + active?: boolean; + extra?: object; + } + + // AQL + + interface Query { + query: string; + bindVars?: object; + options?: QueryOptions; + } + + interface AqlLiteral { + toAQL: () => string; + } + + interface Cursor { + toArray(): T[]; + hasNext(): boolean; + next(): T; + count(count?: boolean): number; + getExtra(): QueryExtra; + setBatchSize(size: number): void; + getBatchSize(): number; + execute(batchSize?: number): void; + dispose(): void; + } + + interface Statement { + bind(name: string, value: any): void; + setBatchSize(size: number): void; + getBatchSize(): number; + execute(): Cursor; + } + + interface QueryOptions { + memoryLimit?: number; + failOnWarning?: boolean; + cache?: boolean; + count?: boolean; + fullCount?: boolean; + profile?: boolean; + maxWarningCount?: number; + maxNumberOfPlans?: number; + stream?: boolean; + // RocksDB + maxTransactionsSize?: number; + intermediateCommitSize?: number; + intermediateCommitCount?: number; + // enterprise + skipInaccessibleCollections?: boolean; + } + + interface QueryExtra { + stats: { + writesExecuted: number; + writesIgnored: number; + scannedFull: number; + scannedIndex: number; + filtered: number; + httpRequests: number; + fullCount: number; + executionTime: number; + }; + warnings: string[]; + } + + interface QueryAstNode { + type: string; + subNodes?: QueryAstNode[]; + [key: string]: any; + } + + interface ParsedQuery { + parsed: boolean; + collections: string[]; + parameters: string[]; + bindVars: string[]; + ast: QueryAstNode[]; + } + + // Views + + interface View { + // TODO + [key: string]: any; + } + type ViewProperties = object; // TODO + + // Global + + interface TransactionCollections { + read?: string | string[]; + write?: string | string[]; + allowImplicit?: boolean; + } + interface Transaction { + collections: TransactionCollections | string[]; + action: (params: object) => void | string; + waitForSync?: boolean; + lockTimeout?: number; + params?: object; + // RocksDB + maxTransactionsSize?: number; + intermediateCommitSize?: number; + intermediateCommitCount?: number; + } + + interface Database { + // Database + _createDatabase( + name: string, + options?: never, + users?: DatabaseUser[] + ): true; + _databases(): string[]; + _dropDatabase(name: string): true; + _useDatabase(name: string): Database; + + // Indexes + _index(index: string | IndexLike): Index | null; + _dropIndex(index: string | IndexLike): boolean; + + // Properties + _id(): string; + _isSystem(): boolean; + _name(): string; + _path(): string; + _version(): string; + + // Collection + _collection(name: string): Collection; + _collections(): Collection[]; + _create(name: string, properties?: CreateCollectionOptions): Collection; + _createDocumentCollection( + name: string, + properties?: CreateCollectionOptions + ): Collection; + _createEdgeCollection( + name: string, + properties?: CreateCollectionOptions + ): Collection; + _drop(name: string): void; + _truncate(name: string): void; + + // AQL + _createStatement(query: Query | string): Statement; + _query( + query: Query | string, + bindVars?: object, + options?: QueryOptions + ): Cursor; + _explain(query: Query | string): void; + _parse(query: string): ParsedQuery; + + // Document + _document(name: string): Document; + _exists(selector: string | ObjectWithId): DocumentMetadata; + _remove(selector: string | ObjectWithId): DocumentMetadata; + _replace( + selector: string | ObjectWithId, + data: object + ): DocumentMetadata; + _update( + selector: string | ObjectWithId, + data: object + ): DocumentMetadata; + + // Views + _view(name: string): View | null; + _views(): View[]; + _createView( + name: string, + type: ViewType, + properties: ViewProperties + ): View; + _dropView(name: string): void; + + // Global + _engine(): EngineType; + _engineStats(): { [key: string]: any }; + _executeTransaction(transaction: Transaction): void; + } +} + +declare namespace Foxx { + interface Session { + uid: string | null; + created: number; + data: any; + } + interface SessionStorage { + new?: () => Session; + fromClient: (sid: string) => Session | null; + forClient: (session: Session) => string | null; + } + interface SessionTransport { + get?: (req: Request) => string | null; + set?: (res: Response, sid: string) => void; + clear?: (res: Response) => void; + } + interface CollectionSessionStorage extends SessionStorage { + new: () => Session; + save: (session: Session) => Session; + clear: (session: Session) => boolean; + prune: () => string[]; + } + interface SessionsMiddleware extends DelegateMiddleware { + storage: SessionStorage; + transport: SessionTransport[]; + } + + type SimpleMiddleware = ( + req: Request, + res: Response, + next: NextFunction + ) => void; + interface DelegateMiddleware { + register: (endpoint: Endpoint) => SimpleMiddleware; + } + type Middleware = SimpleMiddleware | DelegateMiddleware; + type Handler = ((req: Request, res: Response) => void); + type NextFunction = () => void; + + interface ValidationResult { + value: T; + error: any; + } + + interface Schema { + isJoi: boolean; + validate(value: T): ValidationResult; + } + + interface Model { + schema: Schema; + fromClient?: (value: any) => any; + forClient?: (value: any) => any; + } + + interface DocumentationRouterOptions { + mount: string; + indexFile: string; + swaggerRoot: string; + before: (req: Request, res: Response) => void | false; + } + + interface MediaType { + type: string; + subtype: string; + suffix?: string; + parameters: { + charset: string; + }; + } + + interface TypeDefinition { + fromClient?: ( + body: string | Buffer, + req: Request, + type: MediaType + ) => any; + forClient?: ( + body: any + ) => { + data: string; + headers: { [key: string]: string | undefined }; + }; + } + + type Ranges = Array<{ + start: number; + end: number; + }> & { type: string }; + + type ConfigurationType = + | "integer" + | "boolean" + | "string" + | "number" + | "json" + | "password" + | "int" + | "bool"; + interface ConfigurationDefinition { + default?: any; + type?: ConfigurationType; + description?: string; + required: boolean; + } + interface DependencyDefinition { + name: string; + version: string; + description?: string; + required: boolean; + multiple: boolean; + } + interface AssetDefinition { + path: string; + gzip?: boolean; + type?: string; + } + + interface Manifest { + name?: string; + version?: string; + keywords?: string; + license?: string; + repository?: { type: string; url: string }; + author: string; + contributors?: any[]; + description: string; + thumbnail?: string; + engines?: { [key: string]: string | undefined }; + defaultDocument?: string; + lib: string; + main?: string; + configuration?: { [key: string]: ConfigurationDefinition }; + dependencies?: { [key: string]: DependencyDefinition }; + provides?: { [key: string]: string | undefined }; + files?: { [key: string]: AssetDefinition }; + scripts?: { [key: string]: string | undefined }; + tests?: string[]; + } + + interface Context { + argv: any[]; + basePath: string; + baseUrl: string; + collectionPrefix: string; + configuration: { [key: string]: any }; + dependencies: { [key: string]: any }; + isDevelopment: boolean; + isProduction: boolean; + manifest: Manifest; + mount: string; + collection(name: string): ArangoDB.Collection | null; + collectionName(name: string): string; + createDocumentationRouter( + opts?: + | Partial + | DocumentationRouterOptions["before"] + | DocumentationRouterOptions["swaggerRoot"] + ): Router; + file(name: string): Buffer; + file(name: string, encoding: string): string; + fileName(name: string): string; + registerType(type: string, def: TypeDefinition): void; + use( + path: string, + routerOrMiddleware: Router | Middleware, + name?: string + ): Endpoint; + use(routerOrMiddleware: Router | Middleware, name?: string): Endpoint; + } + + interface Request { + arangoUser: string | null; + arangoVersion: number; + baseUrl: string; + body: any; + context: Context; + database: string; + headers: { [key: string]: string | undefined }; + hostname: string; + method: ArangoDB.HttpMethod; + originalUrl: string; + path: string; + pathParams: { [key: string]: any }; + port: number; + protocol: string; + queryParams: { [key: string]: any }; + rawBody: Buffer; + remoteAddress: string; + remoteAddresses: string[]; + remotePort: number; + secure: boolean; + session?: Session; + sessionStorage?: SessionStorage; + suffix: string; + trustProxy: boolean; + url: string; + xhr: boolean; + accepts(types: string[]): string | false; + accepts(...types: string[]): string | false; + acceptsCharsets(charsets: string[]): string | false; + acceptsCharsets(...charsets: string[]): string | false; + acceptsEncodings(encodings: string[]): string | false; + acceptsEncodings(...encodings: string[]): string | false; + acceptsLanguages(languages: string[]): string | false; + acceptsLanguages(...languages: string[]): string | false; + cookie( + name: string, + options?: { secret?: string; algorithm?: ArangoDB.HashAlgorithm } + ): string | null; + get(name: string): string | undefined; + header(name: string): string | undefined; + is(types: string[]): string; + is(...types: string[]): string; + json(): any; + makeAbsolute( + path: string, + query?: string | { [key: string]: string | undefined } + ): string; + param(name: string): any; + range(size?: number): Ranges | number; + reverse(name: string, params?: object): string; + } + + interface Response { + body: Buffer | string; + context: Context; + headers: { [key: string]: any }; + statusCode: number; + attachment(filename?: string): this; + cookie( + name: string, + value: string, + options?: { + ttl?: number; + algorithm?: ArangoDB.HashAlgorithm; + secret?: string; + path?: string; + domain?: string; + secure?: boolean; + httpOnly?: boolean; + } + ): this; + download(path: string, filename?: string): this; + getHeader(name: string): string | undefined; + json(data: any): this; + redirect(status: number | ArangoDB.HttpStatus, path: string): this; + redirect(path: string): this; + removeHeader(name: string): this; + send(data: any, type?: string): this; + sendFile(path: string, options?: { lastModified: boolean }): this; + sendStatus(status: number | ArangoDB.HttpStatus): this; + setHeader(name: string, value: string): this; + set(name: string, value: string): this; + set(headers: { [name: string]: string }): this; + status(status: number | ArangoDB.HttpStatus): this; + throw( + status: number | ArangoDB.HttpStatus, + reason: string, + error: Error + ): never; + throw( + status: number | ArangoDB.HttpStatus, + reason: string, + options?: { cause?: Error; extra?: any } + ): never; + throw(status: number | ArangoDB.HttpStatus, error: Error): never; + throw( + status: number | ArangoDB.HttpStatus, + options?: { cause?: Error; extra?: any } + ): never; + type(type?: string): string; + vary(names: string[]): this; + vary(...names: string[]): this; + write(data: string | Buffer): this; + } + + interface Endpoint { + header(name: string, schema: Schema, description?: string): this; + header(name: string, description: string): this; + pathParam(name: string, schema: Schema, description?: string): this; + pathParam(name: string, description: string): this; + queryParam(name: string, schema: Schema, description?: string): this; + queryParam(name: string, description: string): this; + body( + schema: Schema | Model | [Model], + mimes?: string[], + description?: string + ): this; + body( + schemaOrMimes: Schema | Model | [Model] | string[], + description?: string + ): this; + body(description: string): this; + response( + status: number | ArangoDB.HttpStatus, + schema: Schema | Model | [Model], + mimes?: string[], + description?: string + ): this; + response( + status: number | ArangoDB.HttpStatus, + mimes: string[], + description?: string + ): this; + response( + status: number | ArangoDB.HttpStatus, + description: string + ): this; + summary(summary: string): this; + description(description: string): this; + deprecated(deprecated: boolean): this; + error(status: number | ArangoDB.HttpStatus, description: string): this; + tag(...tags: string[]): this; + } + + function route(handler: Handler, name?: string): Endpoint; + function route( + pathOrMiddleware: string | SimpleMiddleware, + handler: Handler, + name?: string + ): Endpoint; + function route( + pathOrMiddleware: string | SimpleMiddleware, + middleware: SimpleMiddleware, + handler: Handler, + name?: string + ): Endpoint; + function route( + pathOrMiddleware: string | SimpleMiddleware, + middleware1: SimpleMiddleware, + middleware2: SimpleMiddleware, + handler: Handler, + name?: string + ): Endpoint; + function route( + pathOrMiddleware: string | SimpleMiddleware, + middleware1: SimpleMiddleware, + middleware2: SimpleMiddleware, + middleware3: SimpleMiddleware, + handler: Handler, + name?: string + ): Endpoint; + function route( + pathOrMiddleware: string | SimpleMiddleware, + middleware1: SimpleMiddleware, + middleware2: SimpleMiddleware, + middleware3: SimpleMiddleware, + middleware4: SimpleMiddleware, + handler: Handler, + name?: string + ): Endpoint; + function route( + pathOrMiddleware: string | SimpleMiddleware, + middleware1: SimpleMiddleware, + middleware2: SimpleMiddleware, + middleware3: SimpleMiddleware, + middleware4: SimpleMiddleware, + middleware5: SimpleMiddleware, + handler: Handler, + name?: string + ): Endpoint; + function route( + pathOrMiddleware: string | SimpleMiddleware, + middleware1: SimpleMiddleware, + middleware2: SimpleMiddleware, + middleware3: SimpleMiddleware, + middleware4: SimpleMiddleware, + middleware5: SimpleMiddleware, + middleware6: SimpleMiddleware, + handler: Handler, + name?: string + ): Endpoint; + function route( + pathOrMiddleware: string | SimpleMiddleware, + middleware1: SimpleMiddleware, + middleware2: SimpleMiddleware, + middleware3: SimpleMiddleware, + middleware4: SimpleMiddleware, + middleware5: SimpleMiddleware, + middleware6: SimpleMiddleware, + middleware7: SimpleMiddleware, + handler: Handler, + name?: string + ): Endpoint; + function route( + pathOrMiddleware: string | SimpleMiddleware, + middleware1: SimpleMiddleware, + middleware2: SimpleMiddleware, + middleware3: SimpleMiddleware, + middleware4: SimpleMiddleware, + middleware5: SimpleMiddleware, + middleware6: SimpleMiddleware, + middleware7: SimpleMiddleware, + middleware8: SimpleMiddleware, + handler: Handler, + name?: string + ): Endpoint; + function route( + pathOrMiddleware: string | SimpleMiddleware, + middleware1: SimpleMiddleware, + middleware2: SimpleMiddleware, + middleware3: SimpleMiddleware, + middleware4: SimpleMiddleware, + middleware5: SimpleMiddleware, + middleware6: SimpleMiddleware, + middleware7: SimpleMiddleware, + middleware8: SimpleMiddleware, + middleware9: SimpleMiddleware, + handler: Handler, + name?: string + ): Endpoint; + + interface Router { + get: typeof route; + post: typeof route; + put: typeof route; + patch: typeof route; + delete: typeof route; + all: typeof route; + use( + path: string, + routerOrMiddleware: Router | Middleware, + name?: string + ): Endpoint; + use(routerOrMiddleware: Router | Middleware, name?: string): Endpoint; + } +} + +declare module "@arangodb" { + function aql(strings: TemplateStringsArray, ...args: any[]): ArangoDB.Query; + namespace aql { + function literal(value: any): ArangoDB.AqlLiteral; + } + function query( + strings: TemplateStringsArray, + ...args: any[] + ): ArangoDB.Cursor; + function time(): number; + const db: ArangoDB.Database & { + [key: string]: ArangoDB.Collection | undefined; + }; + const errors: { + [Name in ArangoDB.ErrorName]: { code: number; message: string } + }; +} + +declare module "@arangodb/foxx/router" { + function createRouter(): Foxx.Router; + export = createRouter; +} + +declare module "@arangodb/foxx/graphql" { + import { GraphQLSchema, formatError } from "graphql"; + type GraphQLModule = object; + type GraphQLFormatErrorFunction = typeof formatError; + interface GraphQLOptions { + schema: GraphQLSchema; + context?: any; + rootValue?: object; + pretty?: boolean; + formatError?: GraphQLFormatErrorFunction; + validationRules?: any[]; + graphiql?: boolean; + graphql?: GraphQLModule; + } + function createGraphQLRouter( + options: GraphQLOptions | GraphQLSchema + ): Foxx.Router; + export = createGraphQLRouter; +} + +declare module "@arangodb/foxx/sessions" { + interface SessionsOptions { + storage: Foxx.SessionStorage | string | ArangoDB.Collection; + transport: + | Foxx.SessionTransport + | Foxx.SessionTransport[] + | "cookie" + | "header"; + autoCreate?: boolean; + } + function sessionsMiddleware( + options: SessionsOptions + ): Foxx.SessionsMiddleware; + export = sessionsMiddleware; +} + +declare module "@arangodb/foxx/sessions/storages/collection" { + interface CollectionStorageOptions { + collection: string | ArangoDB.Collection; + ttl?: number; + pruneExpired?: boolean; + autoUpdate?: boolean; + } + function collectionStorage( + options: + | CollectionStorageOptions + | CollectionStorageOptions["collection"] + ): Foxx.CollectionSessionStorage; + export = collectionStorage; +} + +declare module "@arangodb/foxx/sessions/storages/jwt" { + interface SafeJwtStorageOptions { + algorithm?: ArangoDB.JwtAlgorithm; + secret: string; + ttl?: number; + verify?: boolean; + maxExp?: number; + } + interface UnsafeJwtStorageOptions { + algorithm: "none"; + ttl?: number; + verify?: boolean; + maxExp?: number; + } + function jwtStorage( + options: + | SafeJwtStorageOptions + | UnsafeJwtStorageOptions + | SafeJwtStorageOptions["secret"] + ): Foxx.SessionStorage; + export = jwtStorage; +} + +declare module "@arangodb/foxx/sessions/transports/cookie" { + interface CookieTransportOptions { + name?: string; + ttl?: number; + algorithm?: ArangoDB.HashAlgorithm; + secret?: string; + path?: string; + domain?: string; + secure?: string; + httpOnly?: string; + } + function cookieTransport( + options?: CookieTransportOptions + ): Foxx.SessionTransport; + function cookieTransport(name: string): Foxx.SessionTransport; + export = cookieTransport; +} + +declare module "@arangodb/foxx/sessions/transports/header" { + interface HeaderTransportOptions { + name?: string; + } + function headerTransport( + options?: HeaderTransportOptions + ): Foxx.SessionTransport; + function headerTransport(name: string): Foxx.SessionTransport; + export = headerTransport; +} + +declare module "@arangodb/foxx/auth" { + interface AuthData { + method: string; + salt: string; + hash: string; + } + interface Authenticator { + create(password: string): AuthData; + verify(hash?: AuthData, password?: string): boolean; + } + interface AuthOptions { + method?: ArangoDB.HashAlgorithm; + saltLength?: number; + } + function createAuth(options?: AuthOptions): Authenticator; + export = createAuth; +} + +declare module "@arangodb/foxx/oauth1" { + interface OAuth1Options { + requestTokenEndpoint: string; + authEndpoint: string; + accessTokenEndpoint: string; + activeUserEndpoint?: string; + clientId: string; + clientSecret: string; + signatureMethod?: "HMAC-SHA1" | "PLAINTEXT"; + } + interface OAuth1Client { + fetchRequestToken( + oauth_callback: string, + qs?: { [key: string]: string | undefined } + ): any; + getAuthUrl( + oauth_token: string, + qs?: { [key: string]: string | undefined } + ): string; + exchangeRequestToken( + oauth_token: string, + oauth_verifier: string, + qs?: { [key: string]: string | undefined } + ): any; + fetchActiveUser( + oauth_token: string, + oauth_token_secret: string, + qs?: { [key: string]: string | undefined } + ): any; + createSignedRequest( + method: ArangoDB.HttpMethod, + url: string, + parameters: string | { [key: string]: string | undefined } | null, + oauth_token: string, + oauth_token_secret: string + ): { + url: string; + qs: string; + headers: { accept: "application/json"; authorization: string }; + }; + } + function createOAuth1Client(options: OAuth1Options): OAuth1Client; + export = createOAuth1Client; +} + +declare module "@arangodb/foxx/oauth2" { + interface OAuth2Options { + authEndpoint: string; + tokenEndpoint: string; + refreshEndpoint?: string; + activeUserEndpoint?: string; + clientId: string; + clientSecret: string; + } + interface OAuth2Client { + getAuthUrl( + redirect_uri: string, + options?: { response_type?: string } + ): string; + exchangeGrantToken( + code: string, + redirect_uri: string, + options?: { grant_type?: string } + ): any; + fetchActiveUser(access_token: string): any; + } + function createOAuth2Client(options: OAuth2Options): OAuth2Client; + export = createOAuth2Client; +} + +declare module "@arangodb/foxx" { + function createRouter(): Foxx.Router; +} + +declare module "@arangodb/request" { + interface Response { + rawBody: Buffer; + body: string | Buffer; + json?: any; + headers: { [key: string]: string | undefined }; + status: number; + statusCode: number; + message: string; + throw(message?: string): void | never; + } + interface RequestOptions { + qs?: object; + useQuerystring?: boolean; + headers?: { [key: string]: string | undefined }; + body?: any; + json?: boolean; + form?: any; + auth?: { username: string; password?: string } | { bearer: string }; + sslProtocol?: number; + followRedirect?: boolean; + maxRedirects?: number; + encoding?: string | null; + timeout?: number; + returnBodyOnError?: boolean; + } + function method(options: { url: string } & RequestOptions): Response; + function method(url: string, options?: RequestOptions): Response; + interface Request { + ( + options: { + url: string; + method?: ArangoDB.HttpMethod; + } & RequestOptions + ): Response; + head: typeof method; + get: typeof method; + post: typeof method; + put: typeof method; + patch: typeof method; + delete: typeof method; + } + const request: Request; + export = request; +} + +declare module "@arangodb/crypto" { + function createNonce(): string; + function checkAndMarkNonce(nonce: string): void; + function rand(): number; + function genRandomAlphaNumbers(length: number): string; + function genRandomNumbers(length: number): string; + function genRandomSalt(length: number): string; + function jwtEncode( + key: string, + message: string, + algorithm: ArangoDB.JwtAlgorithm + ): string; + function jwtEncode(key: null, message: string, algorithm: "none"): string; + function jwtDecode( + key: string | null, + token: string, + noVerify?: boolean + ): string | null; + function md5(message: string): string; + function sha1(message: string): string; + function sha224(message: string): string; + function sha256(message: string): string; + function sha384(message: string): string; + function sha512(message: string): string; + function constantEquals(a: string, b: string): boolean; + function pbkdf2( + salt: string, + password: string, + iterations: number, + keyLength: number + ): string; + function hmac( + key: string, + message: string, + algorithm: ArangoDB.HashAlgorithm + ): string; +} + +declare module "@arangodb/general-graph" { + interface EdgeDefinition { + collection: string; + from: string[]; + to: string[]; + } + interface CommonNeighbors { + left: string; + right: string; + neighbors: string[]; + } + interface CountCommonNeighbors { + [key: string]: Array<{ [key: string]: number | undefined }> | undefined; + } + interface CommonProperties { + [key: string]: + | Array<{ _id: string } & { [key: string]: any }> + | undefined; + } + interface CountCommonProperties { + [key: string]: number | undefined; + } + interface Path< + A extends object = any, + B extends object = any, + E extends object = any, + V extends object = never + > { + source: ArangoDB.Document; + destination: ArangoDB.Document; + edges: Array>; + vertice: Array>; + } + interface ShortestPath { + vertices: string[]; + edges: Array>; + distance: number; + } + interface Distance { + startVertex: string; + vertex: string; + distance: number; + } + interface Eccentricity { + [key: string]: number | undefined; + } + type Closeness = Eccentricity; + type Betweenness = Eccentricity; + type Example = Array | object | string | null; + interface ConnectingEdgesOptions { + edgeExamples?: Example; + edgeCollectionRestriction?: string[] | string; + vertex1CollectionRestriction?: string[] | string; + vertex2CollectionRestriction?: string[] | string; + } + interface NeighborsOptions { + direction?: ArangoDB.EdgeDirection; + edgeExamples?: Example; + neighborExamples?: Example; + edgeCollectionRestriction?: string[] | string; + vertexCollectionRestriction?: string[] | string; + minDepth?: number; + maxDepth?: number; + } + interface CommonPropertiesOptions { + vertex1CollectionRestriction?: string[] | string; + vertex2CollectionRestriction?: string[] | string; + ignoredProperties?: string[] | string; + } + interface PathsOptions { + direction?: ArangoDB.EdgeDirection; + followCycles?: boolean; + minLength?: number; + maxLength?: number; + } + interface ShortestPathOptions { + direction?: ArangoDB.EdgeDirection; + edgeCollectionRestriction?: string[] | string; + startVertexCollectionRestriction?: string[] | string; + endVertexCollectionRestriction?: string[] | string; + weight?: string; + defaultWeight?: number; + } + type EccentricityOptions = ShortestPathOptions; + type ClosenessOptions = ShortestPathOptions; + interface BetweennessOptions { + direction?: ArangoDB.EdgeDirection; + weight?: string; + defaultWeight?: number; + } + type RadiusOptions = BetweennessOptions; + type DiameterOptions = BetweennessOptions; + interface Graph { + _extendEdgeDefinitions(edgeDefinition: EdgeDefinition): void; + _editEdgeDefinitions(edgeDefinition: EdgeDefinition): void; + _deleteEdgeDefinition( + edgeCollectionName: string, + dropCollection?: boolean + ): void; + _addVertexCollection( + orphanCollectionName: string, + createCollection?: boolean + ): void; + _orphanCollections(): string[]; + _removeVertexCollection( + orphanCollectionName: string, + dropCollection?: boolean + ): void; + _getConnectingEdges( + vertexExample1: Example, + vertexExample2: Example, + options: ConnectingEdgesOptions + ): ArangoDB.Edge; + _fromVertex(edgeId: string): ArangoDB.Document; + _toVertex(edgeId: string): ArangoDB.Document; + _neighbors( + vertexExample: Example, + options?: NeighborsOptions + ): string[]; + _commonNeighbors( + vertex1Example: Example, + vertex2Example: Example, + vertex1Options?: NeighborsOptions, + vertex2Options?: NeighborsOptions + ): CommonNeighbors[]; + _countCommonNeighbors( + vertex1Example: Example, + vertex2Example: Example, + vertex1Options?: NeighborsOptions, + vertex2Options?: NeighborsOptions + ): CountCommonNeighbors[]; + _commonProperties( + vertexExample1: Example, + vertex2Example: Example, + options?: CommonPropertiesOptions + ): CommonProperties[]; + _countCommonProperties( + vertex1Example: Example, + vertex2Example: Example, + options?: CommonPropertiesOptions + ): CountCommonProperties[]; + _paths(options?: PathsOptions): Path[]; + _shortestPath( + startVertexExample: Example, + endVertexExample: Example, + options?: ShortestPathOptions + ): ShortestPath[]; + _distanceTo( + startVertexExample: Example, + endVertexExample: Example, + options?: ShortestPathOptions + ): Distance[]; + _absoluteEccentricity( + vertexExample: Example, + options?: EccentricityOptions + ): Eccentricity; + _eccentricity( + vertexExample: Example, + options?: EccentricityOptions + ): Eccentricity; + _absoluteCloseness( + vertexExample: Example, + options?: ClosenessOptions + ): Closeness; + _closeness( + vertexExample: Example, + options?: ClosenessOptions + ): Closeness; + _absoluteBetweenness( + vertexExample: Example, + options?: BetweennessOptions + ): Betweenness; + _betweenness( + vertexExample: Example, + options?: BetweennessOptions + ): Betweenness; + _radius(vertexExample: Example, options?: RadiusOptions): number; + _diameter(vertexExample: Example, options?: DiameterOptions): number; + } + function _create( + name: string, + edgeDefinitions?: EdgeDefinition[], + orphanCollections?: string[] + ): Graph & { + [key: string]: ArangoDB.Collection | undefined; + }; + function _list(): string[]; + function _graph( + name: string + ): Graph & { + [key: string]: ArangoDB.Collection | undefined; + }; + function _drop(name: string, dropCollections?: boolean): boolean; + function _relation( + name: string, + fromVertexCollections: string[] | string, + toVertexCollections: string[] | string + ): EdgeDefinition; + function _edgeDefinitions(...relations: EdgeDefinition[]): EdgeDefinition[]; + function _extendEdgeDefinitions( + edgeDefinitions: EdgeDefinition[], + ...relations: EdgeDefinition[] + ): EdgeDefinition[]; +} + +declare module "@arangodb/locals" { + const context: Foxx.Context; +} + +interface NodeModule { + context: Foxx.Context; +} + +interface Console { + logLines(...args: any[]): void; + errorLines(...args: any[]): void; + warnLines(...args: any[]): void; + infoLines(...args: any[]): void; + debugLines(...args: any[]): void; + errorStack(err: Error, msg?: string): void; + warnStack(err: Error, msg?: string): void; + infoStack(err: Error, msg?: string): void; + debugStack(err: Error, msg?: string): void; +} diff --git a/types/arangodb/tsconfig.json b/types/arangodb/tsconfig.json new file mode 100644 index 0000000000..f778fd7c47 --- /dev/null +++ b/types/arangodb/tsconfig.json @@ -0,0 +1,16 @@ +{ + "compilerOptions": { + "module": "commonjs", + "lib": ["es6"], + "noImplicitAny": true, + "noImplicitThis": true, + "strictNullChecks": true, + "strictFunctionTypes": true, + "baseUrl": "../", + "typeRoots": ["../"], + "types": [], + "noEmit": true, + "forceConsistentCasingInFileNames": true + }, + "files": ["index.d.ts", "arangodb-tests.ts"] +} diff --git a/types/arangodb/tslint.json b/types/arangodb/tslint.json new file mode 100644 index 0000000000..3db14f85ea --- /dev/null +++ b/types/arangodb/tslint.json @@ -0,0 +1 @@ +{ "extends": "dtslint/dt.json" } diff --git a/types/arcgis-js-api/index.d.ts b/types/arcgis-js-api/index.d.ts index dadb02d265..4944b00bf2 100644 --- a/types/arcgis-js-api/index.d.ts +++ b/types/arcgis-js-api/index.d.ts @@ -1,6 +1,7 @@ -// Type definitions for ArcGIS API for JavaScript 4.6 +// Type definitions for ArcGIS API for JavaScript 4.7 // Project: http://js.arcgis.com // Definitions by: Esri +// Bjorn Svensson // Definitions: https://github.com/DefinitelyTyped/DefinitelyTyped // TypeScript Version: 2.3 @@ -163,6 +164,8 @@ declare namespace __esri { export type ElevationLayerLayerviewDestroyEventHandler = (event: ElevationLayerLayerviewDestroyEvent) => void; + export type ElevationSamplerChangedEventHandler = (event: ElevationSamplerChangedEvent) => void; + export type FeatureLayerLayerviewCreateEventHandler = (event: FeatureLayerLayerviewCreateEvent) => void; export type FeatureLayerLayerviewDestroyEventHandler = (event: FeatureLayerLayerviewDestroyEvent) => void; @@ -203,14 +206,20 @@ declare namespace __esri { export type MapNotesLayerLayerviewDestroyEventHandler = (event: MapNotesLayerLayerviewDestroyEvent) => void; + export type MapViewBlurEventHandler = (event: MapViewBlurEvent) => void; + export type MapViewClickEventHandler = (event: MapViewClickEvent) => void; export type MapViewDoubleClickEventHandler = (event: MapViewDoubleClickEvent) => void; export type MapViewDragEventHandler = (event: MapViewDragEvent) => void; + export type MapViewFocusEventHandler = (event: MapViewFocusEvent) => void; + export type MapViewHoldEventHandler = (event: MapViewHoldEvent) => void; + export type MapViewImmediateClickEventHandler = (event: MapViewImmediateClickEvent) => void; + export type MapViewKeyDownEventHandler = (event: MapViewKeyDownEvent) => void; export type MapViewKeyUpEventHandler = (event: MapViewKeyUpEvent) => void; @@ -291,7 +300,7 @@ declare namespace __esri { interface BasemapConstructor { /** - * Basemap is used for creating custom basemaps. These basemaps may be created from tiled services you publish to your own server or from tiled services published by third parties. + * Creates a new basemap object. Basemaps can be created from a [PortalItem](https://developers.arcgis.com/javascript/latest/api-reference/esri-portal-PortalItem.html), from a well known [basemap ID](https://developers.arcgis.com/javascript/latest/api-reference/esri-Basemap.html#fromId), or can be used for creating custom basemaps. These basemaps may be created from tiled services you publish to your own server, or from tiled services published by third parties. * * [Read more...](https://developers.arcgis.com/javascript/latest/api-reference/esri-Basemap.html) */ @@ -827,6 +836,12 @@ declare namespace __esri { export interface configWorkers extends Object { + /** + * The absolute url to the AMD loader used in the worker. The default url points to the AMD loader used by the API. + * + * [Read more...](https://developers.arcgis.com/javascript/latest/api-reference/esri-config.html#workers) + */ + loaderUrl?: any; /** * The configuration parameters for [the workers framework](https://developers.arcgis.com/javascript/latest/api-reference/esri-core-workers.html). * @@ -837,6 +852,12 @@ declare namespace __esri { export interface configWorkersLoaderConfig extends Object { + /** + * The AMD loader loads all code relative to the baseUrl. + * + * [Read more...](https://developers.arcgis.com/javascript/latest/api-reference/esri-config.html#workers) + */ + baseUrl?: string; /** * Determines if the specified feature capabilities are supported. * @@ -1037,7 +1058,7 @@ declare namespace __esri { export const Error: Error; - export class Evented { + interface Evented { /** * Emits an event on the instance. This method should only be used when creating subclasses of this class. * @@ -1047,7 +1068,7 @@ declare namespace __esri { * @param event The event payload. * */ - protected emit(type: string, event: any): void; + emit(type: string, event: any): void; /** * Indicates whether there is an event listener on the instance that matches the provided event name. * @@ -1069,11 +1090,96 @@ declare namespace __esri { on(type: string, listener: EventHandler): IHandle; } + interface EventedConstructor { + + + new(): Evented; + } + + export const Evented: EventedConstructor; + export type EventHandler = (event: any) => void; + interface HandleOwner extends Accessor { + /** + * Handle registry. + * + * [Read more...](https://developers.arcgis.com/javascript/latest/api-reference/esri-core-HandleOwner.html#handles) + */ + handles: void; + } + + interface HandleOwnerConstructor { + + + new(properties?: HandleOwnerProperties): HandleOwner; + } + + export const HandleOwner: HandleOwnerConstructor; + + interface HandleOwnerProperties { + /** + * Handle registry. + * + * [Read more...](https://developers.arcgis.com/javascript/latest/api-reference/esri-core-HandleOwner.html#handles) + */ + handles?: void; + } + + interface Handles extends Accessor { + /** + * Adds a group of handles. + * + * [Read more...](https://developers.arcgis.com/javascript/latest/api-reference/esri-core-Handles.html#add) + * + * @param handles An array or collection handles to group. + * @param key group handle key + * + */ + add(handles: WatchHandle | WatchHandle[] | Collection, key?: any): void; + /** + * Returns true if a group exists for the provided key, false otherwise. + * + * [Read more...](https://developers.arcgis.com/javascript/latest/api-reference/esri-core-Handles.html#has) + * + * @param key group handle key + * + */ + has(key: any): boolean; + /** + * Removes a group of handles. + * + * [Read more...](https://developers.arcgis.com/javascript/latest/api-reference/esri-core-Handles.html#remove) + * + * @param key A group key or an array or collection of group keys to remove. + * + */ + remove(key?: any): void; + /** + * Removes all handles. + * + * [Read more...](https://developers.arcgis.com/javascript/latest/api-reference/esri-core-Handles.html#removeAll) + * + * + */ + removeAll(): void; + } + + interface HandlesConstructor { + + + new(properties?: HandlesProperties): Handles; + } + + export const Handles: HandlesConstructor; + + interface HandlesProperties { + + } + interface JSONSupport { /** - * Converts an instance of [this class]() to its ArcGIS Portal JSON representation. See the [Using fromJSON()](https://developers.arcgis.com/javascript/latest/guide/using-fromjson/index.html) topic in the Guide for more information. + * Converts an instance of [this class]() to its ArcGIS portal JSON representation. See the [Using fromJSON()](https://developers.arcgis.com/javascript/latest/guide/using-fromjson/index.html) topic in the Guide for more information. * * [Read more...](https://developers.arcgis.com/javascript/latest/api-reference/esri-core-JSONSupport.html#toJSON) * @@ -1093,7 +1199,7 @@ declare namespace __esri { * * [Read more...](https://developers.arcgis.com/javascript/latest/api-reference/esri-core-JSONSupport.html#fromJSON) * - * @param json A JSON representation of the instance in the ArcGIS format. See the [ArcGIS REST API documentation](http://resources.arcgis.com/en/help/arcgis-rest-api/index.html#/Classification_objects/02r30000019z000000/) for examples of the structure of various input JSON objects. + * @param json A JSON representation of the instance in the ArcGIS format. See the [ArcGIS REST API documentation](https://developers.arcgis.com/documentation/common-data-types/overview-of-common-data-types.htm) for examples of the structure of various input JSON objects. * */ fromJSON(json: any): any; @@ -1149,11 +1255,11 @@ declare namespace __esri { readonly loadWarnings: any[]; /** - * An instance of this class is a [Promise](https://developers.arcgis.com/javascript/latest/guide/working-with-promises/index.html). Therefore `always()` may be used to execute a function if the promise is rejected or resolved. The input function will always execute no matter the response. For more information about promises, see the [Working with Promises](https://developers.arcgis.com/javascript/latest/guide/working-with-promises/index.html) guide page. + * **Deprecated at 4.7.** `always()` may be used to execute a function if creating an instance of the class is rejected or resolved. The input function will always execute no matter the response. * * [Read more...](https://developers.arcgis.com/javascript/latest/api-reference/esri-core-Loadable.html#always) * - * @param callbackOrErrback The function to execute when the promise is rejected or resolved. + * @param callbackOrErrback The function to execute when creating an instance of the class is rejected or resolved. * */ always(callbackOrErrback?: Function): IPromise; @@ -1166,7 +1272,7 @@ declare namespace __esri { */ cancelLoad(): void; /** - * An instance of this class is a [Promise](https://developers.arcgis.com/javascript/latest/guide/working-with-promises/index.html). Therefore `isFulfilled()` may be used to verify if the promise is fulfilled (either resolved or rejected). If it is fulfilled, `true` will be returned. See the [Working with Promises](https://developers.arcgis.com/javascript/latest/guide/working-with-promises/index.html) guide page for more information about promises. + * `isFulfilled()` may be used to verify if creating an instance of the class is fulfilled (either resolved or rejected). If it is fulfilled, `true` will be returned. * * [Read more...](https://developers.arcgis.com/javascript/latest/api-reference/esri-core-Loadable.html#isFulfilled) * @@ -1174,7 +1280,7 @@ declare namespace __esri { */ isFulfilled(): boolean; /** - * An instance of this class is a [Promise](https://developers.arcgis.com/javascript/latest/guide/working-with-promises/index.html). Therefore `isRejected()` may be used to verify if the promise is rejected. If it is rejected, `true` will be returned. See the [Working with Promises](https://developers.arcgis.com/javascript/latest/guide/working-with-promises/index.html) guide page for more information about promises. + * `isRejected()` may be used to verify if creating an instance of the class is rejected. If it is rejected, `true` will be returned. * * [Read more...](https://developers.arcgis.com/javascript/latest/api-reference/esri-core-Loadable.html#isRejected) * @@ -1182,7 +1288,7 @@ declare namespace __esri { */ isRejected(): boolean; /** - * An instance of this class is a [Promise](https://developers.arcgis.com/javascript/latest/guide/working-with-promises/index.html). Therefore `isResolved()` may be used to verify if the promise is resolved. If it is resolved, `true` will be returned. See the [Working with Promises](https://developers.arcgis.com/javascript/latest/guide/working-with-promises/index.html) guide page for more information about promises. + * `isResolved()` may be used to verify if creating an instance of the class is resolved. If it is resolved, `true` will be returned. * * [Read more...](https://developers.arcgis.com/javascript/latest/api-reference/esri-core-Loadable.html#isResolved) * @@ -1198,36 +1304,24 @@ declare namespace __esri { */ load(): IPromise; /** - * An instance of this class is a [Promise](https://developers.arcgis.com/javascript/latest/guide/working-with-promises/index.html). Use `otherwise()` to call a function once the promise is rejected. + * **Deprecated at 4.7.** Use `otherwise()` to call a function once creating an instance of the class is rejected. * * [Read more...](https://developers.arcgis.com/javascript/latest/api-reference/esri-core-Loadable.html#otherwise) * - * @param errback The function to execute when the promise fails. + * @param errback The function to execute when creating an instance of the class fails. * */ otherwise(errback?: Function): IPromise; /** - * An instance of this class is a [Promise](https://developers.arcgis.com/javascript/latest/guide/working-with-promises/index.html). Therefore `then()` may be leveraged once an instance of the class is created. This method takes two input parameters: a `callback` function and an `errback` function. The `callback` executes when the promise resolves (when the instance of the class loads). The `errback` executes if the promise fails. See the [Working with Promises](https://developers.arcgis.com/javascript/latest/guide/working-with-promises/index.html) guide page for additional details. - * - * [Read more...](https://developers.arcgis.com/javascript/latest/api-reference/esri-core-Loadable.html#then) - * - * @param callback The function to call when the promise resolves. - * @param errback The function to execute when the promise fails. - * @param progback The function to invoke when the promise emits a progress update. - * - */ - then(callback?: Function, errback?: Function, progback?: Function): IPromise; - /** - * An instance of this class is a [Promise](https://developers.arcgis.com/javascript/latest/guide/working-with-promises/index.html). Therefore `when()` may be leveraged once an instance of the class is created. This method takes two input parameters: a `callback` function and an `errback` function. The `callback` executes when the promise resolves (when the instance of the class loads). The `errback` executes if the promise fails. See the [Working with Promises](https://developers.arcgis.com/javascript/latest/guide/working-with-promises/index.html) guide page for additional details. + * `when()` may be leveraged once an instance of the class is created. This method takes two input parameters: a `callback` function and an `errback` function. The `callback` executes when the instance of the class loads. The `errback` executes if the instance of the class fails to load. * * [Read more...](https://developers.arcgis.com/javascript/latest/api-reference/esri-core-Loadable.html#when) * * @param callback The function to call when the promise resolves. * @param errback The function to execute when the promise fails. - * @param progback The function to invoke when the promise emits a progress update. * */ - when(callback?: Function, errback?: Function, progback?: Function): IPromise; + when(callback?: Function, errback?: Function): IPromise; } interface LoadableConstructor { @@ -1244,16 +1338,16 @@ declare namespace __esri { interface corePromise { /** - * An instance of this class is a [Promise](https://developers.arcgis.com/javascript/latest/guide/working-with-promises/index.html). Therefore `always()` may be used to execute a function if the promise is rejected or resolved. The input function will always execute no matter the response. For more information about promises, see the [Working with Promises](https://developers.arcgis.com/javascript/latest/guide/working-with-promises/index.html) guide page. + * **Deprecated at 4.7.** `always()` may be used to execute a function if creating an instance of the class is rejected or resolved. The input function will always execute no matter the response. * * [Read more...](https://developers.arcgis.com/javascript/latest/api-reference/esri-core-Promise.html#always) * - * @param callbackOrErrback The function to execute when the promise is rejected or resolved. + * @param callbackOrErrback The function to execute when creating an instance of the class is rejected or resolved. * */ always(callbackOrErrback?: Function): IPromise; /** - * An instance of this class is a [Promise](https://developers.arcgis.com/javascript/latest/guide/working-with-promises/index.html). Therefore `isFulfilled()` may be used to verify if the promise is fulfilled (either resolved or rejected). If it is fulfilled, `true` will be returned. See the [Working with Promises](https://developers.arcgis.com/javascript/latest/guide/working-with-promises/index.html) guide page for more information about promises. + * `isFulfilled()` may be used to verify if creating an instance of the class is fulfilled (either resolved or rejected). If it is fulfilled, `true` will be returned. * * [Read more...](https://developers.arcgis.com/javascript/latest/api-reference/esri-core-Promise.html#isFulfilled) * @@ -1261,7 +1355,7 @@ declare namespace __esri { */ isFulfilled(): boolean; /** - * An instance of this class is a [Promise](https://developers.arcgis.com/javascript/latest/guide/working-with-promises/index.html). Therefore `isRejected()` may be used to verify if the promise is rejected. If it is rejected, `true` will be returned. See the [Working with Promises](https://developers.arcgis.com/javascript/latest/guide/working-with-promises/index.html) guide page for more information about promises. + * `isRejected()` may be used to verify if creating an instance of the class is rejected. If it is rejected, `true` will be returned. * * [Read more...](https://developers.arcgis.com/javascript/latest/api-reference/esri-core-Promise.html#isRejected) * @@ -1269,7 +1363,7 @@ declare namespace __esri { */ isRejected(): boolean; /** - * An instance of this class is a [Promise](https://developers.arcgis.com/javascript/latest/guide/working-with-promises/index.html). Therefore `isResolved()` may be used to verify if the promise is resolved. If it is resolved, `true` will be returned. See the [Working with Promises](https://developers.arcgis.com/javascript/latest/guide/working-with-promises/index.html) guide page for more information about promises. + * `isResolved()` may be used to verify if creating an instance of the class is resolved. If it is resolved, `true` will be returned. * * [Read more...](https://developers.arcgis.com/javascript/latest/api-reference/esri-core-Promise.html#isResolved) * @@ -1277,36 +1371,24 @@ declare namespace __esri { */ isResolved(): boolean; /** - * An instance of this class is a [Promise](https://developers.arcgis.com/javascript/latest/guide/working-with-promises/index.html). Use `otherwise()` to call a function once the promise is rejected. + * **Deprecated at 4.7.** Use `otherwise()` to call a function once creating an instance of the class is rejected. * * [Read more...](https://developers.arcgis.com/javascript/latest/api-reference/esri-core-Promise.html#otherwise) * - * @param errback The function to execute when the promise fails. + * @param errback The function to execute when creating an instance of the class fails. * */ otherwise(errback?: Function): IPromise; /** - * An instance of this class is a [Promise](https://developers.arcgis.com/javascript/latest/guide/working-with-promises/index.html). Therefore `then()` may be leveraged once an instance of the class is created. This method takes two input parameters: a `callback` function and an `errback` function. The `callback` executes when the promise resolves (when the instance of the class loads). The `errback` executes if the promise fails. See the [Working with Promises](https://developers.arcgis.com/javascript/latest/guide/working-with-promises/index.html) guide page for additional details. - * - * [Read more...](https://developers.arcgis.com/javascript/latest/api-reference/esri-core-Promise.html#then) - * - * @param callback The function to call when the promise resolves. - * @param errback The function to execute when the promise fails. - * @param progback The function to invoke when the promise emits a progress update. - * - */ - then(callback?: Function, errback?: Function, progback?: Function): IPromise; - /** - * An instance of this class is a [Promise](https://developers.arcgis.com/javascript/latest/guide/working-with-promises/index.html). Therefore `when()` may be leveraged once an instance of the class is created. This method takes two input parameters: a `callback` function and an `errback` function. The `callback` executes when the promise resolves (when the instance of the class loads). The `errback` executes if the promise fails. See the [Working with Promises](https://developers.arcgis.com/javascript/latest/guide/working-with-promises/index.html) guide page for additional details. + * `when()` may be leveraged once an instance of the class is created. This method takes two input parameters: a `callback` function and an `errback` function. The `callback` executes when the instance of the class loads. The `errback` executes if the instance of the class fails to load. * * [Read more...](https://developers.arcgis.com/javascript/latest/api-reference/esri-core-Promise.html#when) * * @param callback The function to call when the promise resolves. * @param errback The function to execute when the promise fails. - * @param progback The function to invoke when the promise emits a progress update. * */ - when(callback?: Function, errback?: Function, progback?: Function): IPromise; + when(callback?: Function, errback?: Function): IPromise; } interface corePromiseConstructor { @@ -1404,6 +1486,120 @@ declare namespace __esri { export const requireUtils: requireUtils; + /** + * Various utilities and convenience functions for executing code at various phases of browser frames. The scheduling module allows you to register tasks that are executed in every animation frame. This can be used to synchronize updates with ongoing animations of the view, or to animate the view manually by adjusting the extent or camera in every frame. + * + * [Read more...](https://developers.arcgis.com/javascript/latest/api-reference/esri-core-scheduling.html) + */ + interface scheduling { + /** + * Registers a frame task. An animation frame is composed of different phases to let various actors execute code before, after, or during the rendering of [MapView](https://developers.arcgis.com/javascript/latest/api-reference/esri-views-MapView.html) or [SceneView](https://developers.arcgis.com/javascript/latest/api-reference/esri-views-SceneView.html). + * + * [Read more...](https://developers.arcgis.com/javascript/latest/api-reference/esri-core-scheduling.html#addFrameTask) + * + * @param phases The callbacks for each phase of the frame. + * + */ + addFrameTask(phases: PhaseCallbacks): FrameTaskHandle; + /** + * Schedules the execution of a `callback` function at the next web browser tick. Unlike [addFrameTask](https://developers.arcgis.com/javascript/latest/api-reference/esri-core-scheduling.html#addFrameTask), a scheduled `callback` will only run once. Scheduling a task for the next execution tick can be useful when you want to throttle/accumulate functionality over a single javascript execution context. + * + * [Read more...](https://developers.arcgis.com/javascript/latest/api-reference/esri-core-scheduling.html#schedule) + * + * @param callback The function to call at the next tick. + * + */ + schedule(callback: Function): any; + } + + export const scheduling: scheduling; + + /** + * An object to remove or pause a frame task registered with [addFrameTask()](https://developers.arcgis.com/javascript/latest/api-reference/esri-core-scheduling.html#addFrameTask). + * + * [Read more...](https://developers.arcgis.com/javascript/latest/api-reference/esri-core-scheduling.html#FrameTaskHandle) + */ + export interface FrameTaskHandle extends Object { + /** + * Pause the execution the frame task at every frame. + * + * [Read more...](https://developers.arcgis.com/javascript/latest/api-reference/esri-core-scheduling.html#FrameTaskHandle) + * + * + */ + pause(): void; + /** + * Resumes the execution the frame task. + * + * [Read more...](https://developers.arcgis.com/javascript/latest/api-reference/esri-core-scheduling.html#FrameTaskHandle) + * + * + */ + resume(): void; + /** + * Removes the frame task. + * + * [Read more...](https://developers.arcgis.com/javascript/latest/api-reference/esri-core-scheduling.html#FrameTaskHandle) + * + * + */ + remove(): void; + } + + export type PhaseCallback = (event: PhaseEvent) => void; + + /** + * A set of [callbacks](https://developers.arcgis.com/javascript/latest/api-reference/esri-core-scheduling.html#PhaseCallback) that will be called at specific phases of the animation frame. + * + * [Read more...](https://developers.arcgis.com/javascript/latest/api-reference/esri-core-scheduling.html#PhaseCallbacks) + */ + export interface PhaseCallbacks extends Object { + /** + * A callback called before rendering. + * + * [Read more...](https://developers.arcgis.com/javascript/latest/api-reference/esri-core-scheduling.html#PhaseCallbacks) + */ + prepare?: PhaseCallback; + /** + * A callback to execute rendering logic. + * + * [Read more...](https://developers.arcgis.com/javascript/latest/api-reference/esri-core-scheduling.html#PhaseCallbacks) + */ + render?: PhaseCallback; + /** + * A callback to execute state update logic. + * + * [Read more...](https://developers.arcgis.com/javascript/latest/api-reference/esri-core-scheduling.html#PhaseCallbacks) + */ + update?: PhaseCallback; + } + + /** + * An object with timing information. + * + * [Read more...](https://developers.arcgis.com/javascript/latest/api-reference/esri-core-scheduling.html#PhaseEvent) + */ + export interface PhaseEvent extends Object { + /** + * The absolute time at the start of the current animation frame. + * + * [Read more...](https://developers.arcgis.com/javascript/latest/api-reference/esri-core-scheduling.html#PhaseEvent) + */ + time: number; + /** + * The elapsed time since the last animation frame. + * + * [Read more...](https://developers.arcgis.com/javascript/latest/api-reference/esri-core-scheduling.html#PhaseEvent) + */ + deltaTime: number; + /** + * The amount of time spent within the current animation frame. This can be used for budgeting (e.g. some tasks may already have run). + * + * [Read more...](https://developers.arcgis.com/javascript/latest/api-reference/esri-core-scheduling.html#PhaseEvent) + */ + elapsedFrameTime: number; + } + interface urlUtils { /** @@ -1701,15 +1897,29 @@ declare namespace __esri { * * [Read more...](https://developers.arcgis.com/javascript/latest/api-reference/esri-core-workers.html#open) * - * @param client The instance of the client which will be using the [Connection](https://developers.arcgis.com/javascript/latest/api-reference/esri-core-workers-Connection.html). * @param modulePath A fully qualified URL to a script to execute with the workers framework. + * @param options Worker options. See properties below for object specifications. + * @param options.client The objects defining the API accessible from the module. + * @param options.strategy + * Indicates how to load the module. See the table below for a list of possible values. + * + * Possible Value | Description + * ---------------|------------ + * distributed | The module is loaded in each available worker. Each call to [Connection](https://developers.arcgis.com/javascript/latest/api-reference/esri-core-workers-Connection.html#invoke) will be targeting an available worker. Use this strategy if the module doesn't maintain information between invocations (stateless). + * dedicated | The module is loaded in one worker. Each call to [Connection](https://developers.arcgis.com/javascript/latest/api-reference/esri-core-workers-Connection.html#invoke) will be targeting a same worker. Use this strategy if the module maintains information from previous invocations or communication between main and worker threads needs to be stateful. + * local | The module is loaded in the main thread. Use this strategy if when using the worker framework API while disabling the use of workers. * */ - open(client: any, modulePath: string): IPromise; + open(modulePath: string, options?: workersOpenOptions): IPromise; } export const workers: workers; + /** + * The Connection class is used to access code loaded into a separate thread via the [workers framework](https://developers.arcgis.com/javascript/latest/api-reference/esri-core-workers.html). + * + * [Read more...](https://developers.arcgis.com/javascript/latest/api-reference/esri-core-workers-Connection.html) + */ interface Connection { /** * A convenient method that broadcasts a message to all workers. Use this method if it is mandatory that all workers need to have a piece of information which is critical for them to process additional requests. @@ -1718,10 +1928,10 @@ declare namespace __esri { * * @param methodName The name of the method to invoke on all workers. * @param data The object which contains all required parameters to be passed to the method. The data passed between the main thread and the workers framework are copied, not shared. Objects are serialized and de-serialized on both ends. - * @param buffers An array of [transferable](https://developer.mozilla.org/en-US/docs/Web/API/Transferable) buffers. Each buffer in the array should have a corresponding entry in the data object. Transferable objects are transferred from one context to another with a zero-copy operation, which results in a big performance improvement when sending large data sets. + * @param transferList An array of [Transferable](https://developer.mozilla.org/en-US/docs/Web/API/Transferable) objects. Transferable objects are transferred from one context to another with a zero-copy operation, which results in a big performance improvement when sending large data sets. * */ - broadcast(methodName: string, data?: any, buffers?: ArrayBuffer[]): IPromise; + broadcast(methodName: string, data?: any, transferList?: any[]): IPromise; /** * Closes the existing connection instance to workers. Notify all workers to destroy the connection instance and unload the connection module. * @@ -1737,25 +1947,39 @@ declare namespace __esri { * * @param methodName The name of the method to be invoked in the script. * @param data The object which contains all required parameters to be passed to the method. The data passed between the main thread and the workers framework are copied, not shared. Objects are serialized and de-serialized on both ends. - * @param buffers An array of [transferable](https://developer.mozilla.org/en-US/docs/Web/API/Transferable) buffers. Each buffer in the array should have a corresponding entry in the data object. Transferable objects are transferred from one context to another with a zero-copy operation, which results in a big performance improvement when sending large data sets. + * @param transferList An array of [Transferable](https://developer.mozilla.org/en-US/docs/Web/API/Transferable) objects. Each transferable object in the array should have a corresponding entry in the data object. Transferable objects are transferred from one context to another with a zero-copy operation, which results in a big performance improvement when sending large data sets. * */ - invoke(methodName: string, data?: any, buffers?: ArrayBuffer[]): IPromise; + invoke(methodName: string, data?: any, transferList?: any[]): IPromise; } - interface ConnectionConstructor { + export const Connection: Connection; + + + export interface workersOpenOptions extends Object { /** - * The Connection class is used to access code loaded into a separate thread via the [workers framework](https://developers.arcgis.com/javascript/latest/api-reference/esri-core-workers.html). + * The objects defining the API accessible from the module. * - * [Read more...](https://developers.arcgis.com/javascript/latest/api-reference/esri-core-workers-Connection.html) + * [Read more...](https://developers.arcgis.com/javascript/latest/api-reference/esri-core-workers.html#open) */ - - - new(client: any, id: number): Connection; + client?: any; + /** + * Indicates how to load the module. See the table below for a list of possible values. + * + * Possible Value | Description + * ---------------|------------ + * distributed | The module is loaded in each available worker. Each call to [Connection](https://developers.arcgis.com/javascript/latest/api-reference/esri-core-workers-Connection.html#invoke) will be targeting an available worker. Use this strategy if the module doesn't maintain information between invocations (stateless). + * dedicated | The module is loaded in one worker. Each call to [Connection](https://developers.arcgis.com/javascript/latest/api-reference/esri-core-workers-Connection.html#invoke) will be targeting a same worker. Use this strategy if the module maintains information from previous invocations or communication between main and worker threads needs to be stateful. + * local | The module is loaded in the main thread. Use this strategy if when using the worker framework API while disabling the use of workers. + * + * + * [Read more...](https://developers.arcgis.com/javascript/latest/api-reference/esri-core-workers.html#open) + * + * @default distributed + */ + strategy?: any; } - export const Connection: ConnectionConstructor; - /** * A convenience module for importing [Geometry](https://developers.arcgis.com/javascript/latest/api-reference/esri-geometry-Geometry.html) classes when developing with [TypeScript](https://developers.arcgis.com/javascript/latest/guide/typescript-setup/index.html). For example, rather than importing geometries one at a time like this: * @@ -1867,6 +2091,213 @@ declare namespace __esri { radiusUnit?: string; } + /** + * Converts between [points](https://developers.arcgis.com/javascript/latest/api-reference/esri-geometry-Point.html) and formatted coordinates notation strings such as: + * * decimal degrees + * * degrees, minutes, and seconds + * * U.S. National Grid (USNG) + * * Military Grid Reference System (MGRS). + * + * [Read more...](https://developers.arcgis.com/javascript/latest/api-reference/esri-geometry-coordinateFormatter.html) + */ + interface coordinateFormatter { + /** + * Parses coordinates in latitude/longitude notation, and returns a [Point](https://developers.arcgis.com/javascript/latest/api-reference/esri-geometry-Point.html) representing that location. The coordinates may use decimal degrees, degrees and decimal minutes, or degrees, minutes, and seconds format. The spatial reference provided must have an ellipsoid and datum matching those used by the source of the latitude/longitude string. If no spatial reference is provided, it is assumed the latitude/longitude coordinates are in WGS84. **Supported characters** + * + * | Symbol | Character | Name | Unicode number | HTML code | + * | --- | --- | --- | --- | --- | + * | Degree | * | Asterisk | U+002A | &#42; | + * | | ^ | Circumflex Accent | U+005E | &#94;| + * | | ~ | Tilde | U+007E | &#126; | + * | | ° | Degree Sign | U+00B0 | &#176; | + * | Minute | ' | Apostrophe | U+0027 | &#39; | + * | | ′ | Prime | U+2032 | &#8242; | + * | Second | " | Quotation Mark | U+0022 | &#34; | + * + * The latitude/longitude string may contain leading and trailing whitespace, and may also contain a space, comma, or vertical bar symbol to separate the latitude from the longitude. It may also contain the characters 'N', 'S', 'E' and 'W', or use a minus (-) symbol to indicate the hemisphere of each value. Latitude/longitude notation examples: + * * 55 56 39.123N 003 09 43.034W + * * 55°56′39″N 3°09′43″W + * * 55~56.65205', -003~09.71723' + * * 55.9442008* | -3.1619539* + * + * [Read more...](https://developers.arcgis.com/javascript/latest/api-reference/esri-geometry-coordinateFormatter.html#fromLatitudeLongitude) + * + * @param coordinates The latitude/longitude notation string for the coordinates. + * @param spatialReference A spatial reference object representing a [geographic coordinate system](https://developers.arcgis.com/rest/services-reference/geographic-coordinate-systems.htm). If `null`, WGS84 will be used. + * + */ + fromLatitudeLongitude(coordinates: string, spatialReference?: SpatialReference): Point; + /** + * Parses coordinates in Military Grid Reference System (MGRS) notation, and returns a [Point](https://developers.arcgis.com/javascript/latest/api-reference/esri-geometry-Point.html) representing that location. The spatial reference provided must have an ellipsoid and datum matching those used by the source of the MGRS string. If no spatial reference is provided, it is assumed the MGRS string is referenced to WGS84. Note that the choice between zone 01 and 60 has no impact when reading from an MGRS notation string. The MGRS string can contain leading and trailing whitespace and can have whitespace between the grid zone designator, the 100km square identifier, and the numerical eastings and northings. MGRS notation examples: + * * 30UVG898998 + * * 30UVG 89885 99877 + * + * [Read more...](https://developers.arcgis.com/javascript/latest/api-reference/esri-geometry-coordinateFormatter.html#fromMgrs) + * + * @param coordinates The MGRS notation string for the coordinates. + * @param spatialReference A spatial reference object representing a [geographic coordinate system](https://developers.arcgis.com/rest/services-reference/geographic-coordinate-systems.htm) referenced by the MGRS coordinates. If `null`, WGS84 will be used. + * @param conversionMode The mode used by the given MGRS coordinates. **Known values**: automatic | new-180-in-zone-01 | new-180-in-zone-60 | old-180-in-zone-01 | old-180-in-zone-60 + * + */ + fromMgrs(coordinates: string, spatialReference: SpatialReference, conversionMode: string): Point; + /** + * Parses coordinates in United States National Grid (USNG) notation, and returns a [Point](https://developers.arcgis.com/javascript/latest/api-reference/esri-geometry-Point.html) representing that location. The spatial reference provided must have an ellipsoid and datum matching those used by the source of the USNG string. If no spatial reference is provided and the USNG string is suffixed with "(NAD 27)", it is assumed the USNG string is referenced to NAD 27. If no spatial reference is provided and no such suffix exists, it is assumed the USNG string is referenced to WGS84. USNG notation examples: + * * 13TFJ 23 59 + * * 13TFJ2374159574 + * + * [Read more...](https://developers.arcgis.com/javascript/latest/api-reference/esri-geometry-coordinateFormatter.html#fromUsng) + * + * @param coordinates The USNG notation string for the coordinates. + * @param spatialReference A spatial reference object representing a [geographic coordinate system](https://developers.arcgis.com/rest/services-reference/geographic-coordinate-systems.htm) that the USNG coordinates are in. If `null`, WGS84 will be used. + * + */ + fromUsng(coordinates: string, spatialReference?: SpatialReference): Point; + /** + * Parses coordinates in Universal Transverse Mercator (UTM) notation, and returns a [Point](https://developers.arcgis.com/javascript/latest/api-reference/esri-geometry-Point.html) representing that location. The spatial reference provided must have an ellipsoid and datum matching those used by the source of the UTM string. If no spatial reference is provided, it is assumed the UTM string is referenced to WGS84. The UTM string can contain leading and trailing whitespace and can have whitespace between the zone and latitude designator and the numerical eastings and northings. UTM notation examples: + * * 30U 489885 6199877 + * * 30U4898856199877 + * * 30N 489885 6199877 (using N/S indicator) + * + * [Read more...](https://developers.arcgis.com/javascript/latest/api-reference/esri-geometry-coordinateFormatter.html#fromUtm) + * + * @param coordinates The UTM notation string for the coordinates. + * @param spatialReference A spatial reference object representing a [geographic coordinate system](https://developers.arcgis.com/rest/services-reference/geographic-coordinate-systems.htm) that the UTM coordinates are in. If `null`, WGS84 will be used. + * @param conversionMode The latitude notation scheme used by the given UTM coordinates, either a latitudinal band, or a hemisphere designator. **Known values**: latitude-band-indicators | north-south-indicators + * + */ + fromUtm(coordinates: string, spatialReference: SpatialReference, conversionMode: string): Point; + /** + * Indicates if all dependencies of this module have been loaded. + * + * [Read more...](https://developers.arcgis.com/javascript/latest/api-reference/esri-geometry-coordinateFormatter.html#isLoaded) + * + * + */ + isLoaded(): boolean; + /** + * Indicates if this module is supported in the current browser. The browser must support [WebAssembly](https://caniuse.com/#feat=wasm). + * + * [Read more...](https://developers.arcgis.com/javascript/latest/api-reference/esri-geometry-coordinateFormatter.html#isSupported) + * + * + */ + isSupported(): boolean; + /** + * Load this module's dependencies. + * + * [Read more...](https://developers.arcgis.com/javascript/latest/api-reference/esri-geometry-coordinateFormatter.html#load) + * + * + */ + load(): IPromise; + /** + * Returns formatted coordinates in latitude/longitude notation representing the given point's location. The latitude/longitude string will contain a space separating the latitude from the longitude value, and the characters 'N' or 'S', and 'E' and 'W', to indicate the hemisphere of each value. The string will also contain spaces separating the components (degrees, minutes, seconds) of each value. The precision of the output is controlled by both the `format` and `decimalPlaces` parameters. For example: + * + * | Decimal places | format | Example output | Angular precision | Approximate precision | + * | --- | --- | --- | --- | --- | + * | 0 | dd | 056N 0003W | 1deg | 100km | + * | 1 | dd | 55.9N 003.2W | 0.1deg | 10km | + * | 2 | dd | 55.94N 003.16W | 0.01deg | 1km | + * | 3 | dd | 55.944N 003.162W | 0.001deg | 100m | + * | 0 | ddm | 55 057N 003 010W | 1min | 2km | + * | 1 | ddm | 55 56.7N 003 09.7W | 0.1min | 200m | + * | 2 | ddm | 55 56.65N 003 09.72W | 0.01min | 20m | + * | 3 | ddm | 55 56.650N 003 09.717W | 0.001min | 2m | + * | 0 | dms | 55 56 039N 003 09 043W | 1sec | 30m | + * | 1 | dms | 55 56 39.1N 003 09 43.0W | 0.1sec| 3m | + * | 2 | dms | 55 56 39.12N 003 09 43.03W | 0.01sec | 300mm | + * | 3 | dms | 55 56 39.123N 003 09 43.034W | 0.001sec | 30mm | + * + * + * [Read more...](https://developers.arcgis.com/javascript/latest/api-reference/esri-geometry-coordinateFormatter.html#toLatitudeLongitude) + * + * @param point The location to be represented as a formatted latitude/longitude string. The point's [spatial reference](https://developers.arcgis.com/javascript/latest/api-reference/esri-geometry-Point.html#spatialReference) should either be WGS84 or another [geographic coordinate system](https://developers.arcgis.com/rest/services-reference/geographic-coordinate-systems.htm). + * @param format The mode to use when formatting the latitude/longitude string. **Known values**: dd | ddm | dms + * @param decimalPlaces The number of decimal places to use, it should be an integer from 0 to 16. + * + */ + toLatitudeLongitude(point: Point, format: string, decimalPlaces?: number): string; + /** + * Returns formatted coordinates in Military Grid Reference System (MGRS) notation representing the given point's location. Note that the choice between zone 01 and 60 has an impact only when generating the MGRS notation string for a point with longitude of exactly 180deg. The precision value controls the number of digits used to represent each numerical easting and northing value within the MGRS string. For example: + * + * | precision | add_spaces | Example output | Approximate precision | + * | --- | --- | --- | --- | + * | 0 | false | 30UVG | 100km | + * | 1 | false | 30UVG89 | 10km | + * | 2 | false | 30UVG8999 | 1km | + * | 3 | false | 30UVG898998 | 100m | + * | 4 | false | 30UVG89889988 | 10m | + * | 5 | false | 30UVG8988499881 | 1m | + * | 0 | true | 30U VG | 100km | + * | 1 | true | 30U VG 8 9 | 10m | + * | 2 | true | 30U VG 89 99 | 1km | + * | 3 | true | 30U VG 898 998 | 100m | + * | 4 | true | 30U VG 8988 9988 | 10m | + * | 5 | true | 30U VG 89884 99881 | 1m | + * + * + * [Read more...](https://developers.arcgis.com/javascript/latest/api-reference/esri-geometry-coordinateFormatter.html#toMgrs) + * + * @param point The location to be represented in MGRS notation. The point's [spatial reference](https://developers.arcgis.com/javascript/latest/api-reference/esri-geometry-Point.html#spatialReference) should either be WGS84 or another [geographic coordinate system](https://developers.arcgis.com/rest/services-reference/geographic-coordinate-systems.htm) + * @param conversionMode The mode to use for the returned MGRS notation string. **Known values**: automatic | new-180-in-zone-01 | new-180-in-zone-60 | old-180-in-zone-01 | old-180-in-zone-60 + * @param precision The precision with which to represent the coordinates, it should be an integer from 0 to 8. + * @param addSpaces If `false`, the generated string will contain no spaces. If `true`, a space separates the grid zone designator, the 100km square identifier, and the numerical easting and northing values. + * + */ + toMgrs(point: Point, conversionMode: string, precision?: number, addSpaces?: boolean): string; + /** + * Returns formatted coordinates in United States National Grid (USNG) notation representing the given point's location. The precision value controls the number of digits used to represent each numerical easting and northing value within the USNG string. For example: + * + * | precision | add_spaces | Example output | Approximate precision | + * | --- | --- | --- | --- | + * | 0 | false | 13TFJ | 100km | + * | 1 | false | 13TFJ25 | 10km | + * | 2 | false | 13TFJ2359 | 1km | + * | 3 | false | 13TFJ237595 | 100m | + * | 4 | false | 13TFJ23745951 | 10m | + * | 5 | false | 13TFJ2374359512 | 1m | + * | 0 | true | 13T FJ | 100km | + * | 1 | true | 13T FJ 2 5 | 10m | + * | 2 | true | 13T FJ 23 59 | 1km | + * | 3 | true | 13T FJ 237 595 | 100m | + * | 4 | true | 13T FJ 2374 5951 | 10m | + * | 5 | true | 13T FJ 23743 59512 | 1m | + * | 4* | false | 13TFJ23795929 (NAD 27) | 10m | + * | 2* | true | 13T FJ 23 59 (NAD 27) | 1km | + * * *When the point's spatial reference is based on NAD 27.* + * + * + * [Read more...](https://developers.arcgis.com/javascript/latest/api-reference/esri-geometry-coordinateFormatter.html#toUsng) + * + * @param point The location to be represented in USNG notation. The point's [spatial reference](https://developers.arcgis.com/javascript/latest/api-reference/esri-geometry-Point.html#spatialReference) should either be WGS84 or another [geographic coordinate system](https://developers.arcgis.com/rest/services-reference/geographic-coordinate-systems.htm). + * @param precision The precision with which to represent the coordinates, it should be an integer from 0 to 8. + * @param addSpaces If `false`, the generated string will contain no spaces. If `true`, a space separates the grid zone designator, the 100km square identifier, and the numerical easting and northing values. + * + */ + toUsng(point: Point, precision?: number, addSpaces?: boolean): string; + /** + * Returns formatted coordinates in Universal Transverse Mercator (UTM) notation representing the given point's location. Example output for a point in the southern hemisphere: + * + * | conversionMode | add_spaces | Example output | + * | --- | --- | --- | + * | latitude-band-indicators | false | 30U4898846199881 | + * | latitude-band-indicators | true | 30U 489884 6199881 | + * | north-south-indicators | false | 30N4898846199881 | + * | north-south-indicators | true | 30N 489884 6199881 | + * + * + * [Read more...](https://developers.arcgis.com/javascript/latest/api-reference/esri-geometry-coordinateFormatter.html#toUtm) + * + * @param point The location to be represented in UTM notation. The point's [spatial reference](https://developers.arcgis.com/javascript/latest/api-reference/esri-geometry-Point.html#spatialReference) should either be WGS84 or another [geographic coordinate system](https://developers.arcgis.com/rest/services-reference/geographic-coordinate-systems.htm) + * @param conversionMode The latitude notation scheme to use in the returned UTM notation string, either a latitudinal band, or a hemisphere designator. **Known values**: latitude-band-indicators | north-south-indicators + * @param addSpaces If `false`, the generated string will contain no spaces. If `true`, a space separates the UTM zone and latitude designator and each numerical easting and northing value. + * + */ + toUtm(point: Point, conversionMode: string, addSpaces?: boolean): string; + } + + export const coordinateFormatter: coordinateFormatter; + interface Extent extends Geometry { /** * The center point of the extent in map units. @@ -2165,7 +2596,7 @@ declare namespace __esri { */ spatialReference: SpatialReference; /** - * The geometry type. **Possible Values:** point | multipoint | polyline | polygon | extent + * The geometry type. **Possible Values:** point | multipoint | polyline | polygon | extent | mesh * * [Read more...](https://developers.arcgis.com/javascript/latest/api-reference/esri-geometry-Geometry.html#type) */ @@ -2218,7 +2649,7 @@ declare namespace __esri { interface geometryEngine { /** - * Creates planar (or Euclidean) buffer polygons at a specified distance around the input geometries. The GeometryEngine has two methods for buffering geometries client-side: buffer and [geodesicBuffer](https://developers.arcgis.com/javascript/latest/api-reference/esri-geometry-geometryEngine.html#geodesicBuffer). Use caution when deciding which method to use. As a general rule, use [geodesicBuffer](https://developers.arcgis.com/javascript/latest/api-reference/esri-geometry-geometryEngine.html#geodesicBuffer) if the input geometries have a spatial reference of either WGS84 (wkid: 4326) or [Web Mercator](https://developers.arcgis.com/javascript/latest/api-reference/esri-geometry-SpatialReference.html#isWebMercator). Only use buffer (this method) when attempting to buffer geometries with a [projected coordinate system](http://resources.arcgis.com/en/help/arcgis-rest-api/index.html#/Projected_coordinate_systems/02r3000000vt000000/) other than Web Mercator. If you need to buffer geometries with a [geographic coordinate system](http://resources.arcgis.com/en/help/arcgis-rest-api/index.html#/Geographic_coordinate_systems/02r300000105000000/) other than WGS84 (wkid: 4326), use [GeometryService.buffer()](https://developers.arcgis.com/javascript/latest/api-reference/esri-tasks-GeometryService.html#buffer). + * Creates planar (or Euclidean) buffer polygons at a specified distance around the input geometries. The GeometryEngine has two methods for buffering geometries client-side: buffer and [geodesicBuffer](https://developers.arcgis.com/javascript/latest/api-reference/esri-geometry-geometryEngine.html#geodesicBuffer). Use caution when deciding which method to use. As a general rule, use [geodesicBuffer](https://developers.arcgis.com/javascript/latest/api-reference/esri-geometry-geometryEngine.html#geodesicBuffer) if the input geometries have a spatial reference of either WGS84 (wkid: 4326) or [Web Mercator](https://developers.arcgis.com/javascript/latest/api-reference/esri-geometry-SpatialReference.html#isWebMercator). Only use buffer (this method) when attempting to buffer geometries with a [projected coordinate system](https://developers.arcgis.com/rest/services-reference/projected-coordinate-systems.htm) other than Web Mercator. If you need to buffer geometries with a [geographic coordinate system](https://developers.arcgis.com/rest/services-reference/geographic-coordinate-systems.htm) other than WGS84 (wkid: 4326), use [GeometryService.buffer()](https://developers.arcgis.com/javascript/latest/api-reference/esri-tasks-GeometryService.html#buffer). * * [Read more...](https://developers.arcgis.com/javascript/latest/api-reference/esri-geometry-geometryEngine.html#buffer) * @@ -2384,7 +2815,7 @@ declare namespace __esri { */ geodesicArea(geometry: Polygon, unit: string | number): number; /** - * Creates geodesic buffer polygons at a specified distance around the input geometries. When calculating distances, this method takes the curvature of the earth into account, which provides highly accurate results when dealing with very large geometries and/or geometries that spatially vary on a global scale where one projected coordinate system could not accurately plot coordinates and measure distances for all the geometries. This method only works with WGS84 (wkid: 4326) and [Web Mercator](https://developers.arcgis.com/javascript/latest/api-reference/esri-geometry-SpatialReference.html#isWebMercator) spatial references. In general, if your input geometries are assigned one of those two spatial references, you should always use geodesicBuffer() to obtain the most accurate results for those geometries. If needing to buffer points assigned a [projected coordinate system other than Web Mercator](http://resources.arcgis.com/en/help/arcgis-rest-api/index.html#/Projected_coordinate_systems/02r3000000vt000000/), use [buffer()](https://developers.arcgis.com/javascript/latest/api-reference/esri-geometry-geometryEngine.html#buffer) instead. If the input geometries have a [geographic coordinate system](http://resources.arcgis.com/en/help/arcgis-rest-api/index.html#/Geographic_coordinate_systems/02r300000105000000/) other than WGS84 (wkid: 4326), use [GeometryService.buffer()](https://developers.arcgis.com/javascript/latest/api-reference/esri-tasks-GeometryService.html#buffer). + * Creates geodesic buffer polygons at a specified distance around the input geometries. When calculating distances, this method takes the curvature of the earth into account, which provides highly accurate results when dealing with very large geometries and/or geometries that spatially vary on a global scale where one projected coordinate system could not accurately plot coordinates and measure distances for all the geometries. This method only works with WGS84 (wkid: 4326) and [Web Mercator](https://developers.arcgis.com/javascript/latest/api-reference/esri-geometry-SpatialReference.html#isWebMercator) spatial references. In general, if your input geometries are assigned one of those two spatial references, you should always use geodesicBuffer() to obtain the most accurate results for those geometries. If needing to buffer points assigned a [projected coordinate system other than Web Mercator](https://developers.arcgis.com/rest/services-reference/projected-coordinate-systems.htm), use [buffer()](https://developers.arcgis.com/javascript/latest/api-reference/esri-geometry-geometryEngine.html#buffer) instead. If the input geometries have a [geographic coordinate system](https://developers.arcgis.com/rest/services-reference/geographic-coordinate-systems.htm) other than WGS84 (wkid: 4326), use [GeometryService.buffer()](https://developers.arcgis.com/javascript/latest/api-reference/esri-tasks-GeometryService.html#buffer). * * [Read more...](https://developers.arcgis.com/javascript/latest/api-reference/esri-geometry-geometryEngine.html#geodesicBuffer) * @@ -2636,7 +3067,7 @@ declare namespace __esri { interface geometryEngineAsync { /** - * Creates planar (or Euclidean) buffer polygons at a specified distance around the input geometries. The GeometryEngine has two methods for buffering geometries client-side: buffer and [geodesicBuffer](https://developers.arcgis.com/javascript/latest/api-reference/esri-geometry-geometryEngineAsync.html#geodesicBuffer). Use caution when deciding which method to use. As a general rule, use [geodesicBuffer](https://developers.arcgis.com/javascript/latest/api-reference/esri-geometry-geometryEngineAsync.html#geodesicBuffer) if the input geometries have a spatial reference of either WGS84 (wkid: 4326) or [Web Mercator](https://developers.arcgis.com/javascript/latest/api-reference/esri-geometry-SpatialReference.html#isWebMercator). Only use buffer (this method) when attempting to buffer geometries with a [projected coordinate system](http://resources.arcgis.com/en/help/arcgis-rest-api/index.html#/Projected_coordinate_systems/02r3000000vt000000/) other than Web Mercator. If you need to buffer geometries with a [geographic coordinate system](http://resources.arcgis.com/en/help/arcgis-rest-api/index.html#/Geographic_coordinate_systems/02r300000105000000/) other than WGS84 (wkid: 4326), use [GeometryService.buffer()](https://developers.arcgis.com/javascript/latest/api-reference/esri-tasks-GeometryService.html#buffer). + * Creates planar (or Euclidean) buffer polygons at a specified distance around the input geometries. The GeometryEngine has two methods for buffering geometries client-side: buffer and [geodesicBuffer](https://developers.arcgis.com/javascript/latest/api-reference/esri-geometry-geometryEngineAsync.html#geodesicBuffer). Use caution when deciding which method to use. As a general rule, use [geodesicBuffer](https://developers.arcgis.com/javascript/latest/api-reference/esri-geometry-geometryEngineAsync.html#geodesicBuffer) if the input geometries have a spatial reference of either WGS84 (wkid: 4326) or [Web Mercator](https://developers.arcgis.com/javascript/latest/api-reference/esri-geometry-SpatialReference.html#isWebMercator). Only use buffer (this method) when attempting to buffer geometries with a [projected coordinate system](https://developers.arcgis.com/rest/services-reference/projected-coordinate-systems.htm) other than Web Mercator. If you need to buffer geometries with a [geographic coordinate system](https://developers.arcgis.com/rest/services-reference/geographic-coordinate-systems.htm) other than WGS84 (wkid: 4326), use [GeometryService.buffer()](https://developers.arcgis.com/javascript/latest/api-reference/esri-tasks-GeometryService.html#buffer). * * [Read more...](https://developers.arcgis.com/javascript/latest/api-reference/esri-geometry-geometryEngineAsync.html#buffer) * @@ -2802,7 +3233,7 @@ declare namespace __esri { */ geodesicArea(geometry: Polygon, unit: string | number): IPromise; /** - * Creates geodesic buffer polygons at a specified distance around the input geometries. When calculating distances, this method takes the curvature of the earth into account, which provides highly accurate results when dealing with very large geometries and/or geometries that spatially vary on a global scale where one projected coordinate system could not accurately plot coordinates and measure distances for all the geometries. This method only works with WGS84 (wkid: 4326) and [Web Mercator](https://developers.arcgis.com/javascript/latest/api-reference/esri-geometry-SpatialReference.html#isWebMercator) spatial references. In general, if your input geometries are assigned one of those two spatial references, you should always use geodesicBuffer() to obtain the most accurate results for those geometries. If needing to buffer points assigned a [projected coordinate system other than Web Mercator](http://resources.arcgis.com/en/help/arcgis-rest-api/index.html#/Projected_coordinate_systems/02r3000000vt000000/), use [buffer()](https://developers.arcgis.com/javascript/latest/api-reference/esri-geometry-geometryEngineAsync.html#buffer) instead. If the input geometries have a [geographic coordinate system](http://resources.arcgis.com/en/help/arcgis-rest-api/index.html#/Geographic_coordinate_systems/02r300000105000000/) other than WGS84 (wkid: 4326), use [GeometryService.buffer()](https://developers.arcgis.com/javascript/latest/api-reference/esri-tasks-GeometryService.html#buffer). + * Creates geodesic buffer polygons at a specified distance around the input geometries. When calculating distances, this method takes the curvature of the earth into account, which provides highly accurate results when dealing with very large geometries and/or geometries that spatially vary on a global scale where one projected coordinate system could not accurately plot coordinates and measure distances for all the geometries. This method only works with WGS84 (wkid: 4326) and [Web Mercator](https://developers.arcgis.com/javascript/latest/api-reference/esri-geometry-SpatialReference.html#isWebMercator) spatial references. In general, if your input geometries are assigned one of those two spatial references, you should always use geodesicBuffer() to obtain the most accurate results for those geometries. If needing to buffer points assigned a [projected coordinate system other than Web Mercator](https://developers.arcgis.com/rest/services-reference/projected-coordinate-systems.htm), use [buffer()](https://developers.arcgis.com/javascript/latest/api-reference/esri-geometry-geometryEngineAsync.html#buffer) instead. If the input geometries have a [geographic coordinate system](https://developers.arcgis.com/rest/services-reference/geographic-coordinate-systems.htm) other than WGS84 (wkid: 4326), use [GeometryService.buffer()](https://developers.arcgis.com/javascript/latest/api-reference/esri-tasks-GeometryService.html#buffer). * * [Read more...](https://developers.arcgis.com/javascript/latest/api-reference/esri-geometry-geometryEngineAsync.html#geodesicBuffer) * @@ -3085,6 +3516,538 @@ declare namespace __esri { vertCRS?: string; } + interface Mesh extends Geometry { + /** + * An array of mesh components that can be used to apply materials to different regions of the same mesh. There are three common usage patterns for components. 1. **Specify a material for the whole mesh.** In this case, use a single component with only a material (leaving faces as `null`). 2. **Reuse vertex attributes.** When modeling continuous surfaces, it can be convenient to only specify vertices once and then simply refer to them. In this case, use a single component with faces set to index the vertex attributes that form triangles. 3. **Specify multiple materials for the same mesh.** In this case, use multiple components with faces that determine to which region of the mesh the material of the component applies. + * + * [Read more...](https://developers.arcgis.com/javascript/latest/api-reference/esri-geometry-Mesh.html#components) + */ + components: MeshComponent[]; + /** + * For Mesh, the type is always `mesh`. + * + * [Read more...](https://developers.arcgis.com/javascript/latest/api-reference/esri-geometry-Mesh.html#type) + */ + readonly type: "mesh"; + /** + * Object describing the attributes of each vertex of the mesh. Vertex attributes are flat numerical arrays that describe the position (mandatory), normal (used for lighting calculations and shading) and uv (used for mapping material images to the mesh surface) for each vertex. Vertex attributes can be addressed by indices specified in the components [faces](https://developers.arcgis.com/javascript/latest/api-reference/esri-geometry-support-MeshComponent.html#faces) property. If the mesh does not contain any components, or if a component does not specify any faces, then the vertex attributes are interpreted as if each consecutive vertex triple makes up a triangle. + * + * [Read more...](https://developers.arcgis.com/javascript/latest/api-reference/esri-geometry-Mesh.html#vertexAttributes) + */ + vertexAttributes: MeshVertexAttributes; + + /** + * Adds a component to the mesh. + * + * [Read more...](https://developers.arcgis.com/javascript/latest/api-reference/esri-geometry-Mesh.html#addComponent) + * + * @param component The component to add. + * + */ + addComponent(component: MeshComponent): void; + /** + * Centers the mesh at the specified location without changing its scale. The mesh will be modified in place. To modify a copy of the mesh instead, use [clone()](https://developers.arcgis.com/javascript/latest/api-reference/esri-geometry-Mesh.html#clone) before calling [centerAt()](https://developers.arcgis.com/javascript/latest/api-reference/esri-geometry-Mesh.html#centerAt). + * + * [Read more...](https://developers.arcgis.com/javascript/latest/api-reference/esri-geometry-Mesh.html#centerAt) + * + * @param location The location at which to center the mesh. + * @param params Additional parameters. + * @param params.geographic Indicates whether to georeference relative to the globe or the projected coordinate system (PCS). This parameter is only relevant for spatial references that can be used in both local and global viewing modes (currently only WebMercator). This parameter defaults to `true` for WebMercator and WGS84, and `false` for any other PCS. When true, the offset applied to center the mesh is applied in a Cartesian system with respect to the local coordinate system on the globe and is specified in meters. + * @param params.origin The origin at which to center. If not specified, the mesh will be centered at the mesh extent center. + * + */ + centerAt(location: Point, params?: MeshCenterAtParams): Mesh; + /** + * Creates a deep clone of the Mesh object. + * + * [Read more...](https://developers.arcgis.com/javascript/latest/api-reference/esri-geometry-Mesh.html#clone) + * + * + */ + clone(): Mesh; + /** + * Offsets the mesh geometry by the specified distance in x, y, and z. The units of x, y, and z are the units of the spatial reference. When the offset is applied geographically (default for either WGS84 or WebMercator), then the offsets are interpreted in meters. The mesh will be modified in place. To modify a copy of the mesh instead, use [clone()](https://developers.arcgis.com/javascript/latest/api-reference/esri-geometry-Mesh.html#clone) before calling [offset()](https://developers.arcgis.com/javascript/latest/api-reference/esri-geometry-Mesh.html#offset). + * + * [Read more...](https://developers.arcgis.com/javascript/latest/api-reference/esri-geometry-Mesh.html#offset) + * + * @param dx The amount to offset the geometry in the x direction. + * @param dy The amount to offset the geometry in the y direction. + * @param dz The amount to offset the geometry in the z direction. + * @param params Additional parameters. + * @param params.geographic Whether to georeference relative to the globe or the projected coordinate system (PCS). This parameter is only relevant for spatial references that can be used in both local and global viewing modes (currently only WebMercator). This parameter defaults to `true` for WebMercator and WGS84, and `false` for any other PCS. When true, the offset is applied in a Cartesian system with respect to the local coordinate system on the globe and is specified in meters. + * + */ + offset(dx: number, dy: number, dz: number, params?: MeshOffsetParams): Mesh; + /** + * Removes a component from the mesh. + * + * [Read more...](https://developers.arcgis.com/javascript/latest/api-reference/esri-geometry-Mesh.html#removeComponent) + * + * @param component The component to remove. + * + */ + removeComponent(component: MeshComponent): void; + /** + * Rotates the mesh geometry around its x, y and z axis (in that order). For each rotation angle, the rotation direction is clockwise when looking in the direction of the respective axis. The mesh will be modified in place. To modify a copy of the mesh instead, use [clone()](https://developers.arcgis.com/javascript/latest/api-reference/esri-geometry-Mesh.html#clone) before calling [rotate()](https://developers.arcgis.com/javascript/latest/api-reference/esri-geometry-Mesh.html#rotate). + * + * [Read more...](https://developers.arcgis.com/javascript/latest/api-reference/esri-geometry-Mesh.html#rotate) + * + * @param angleX The angle by which to rotate around the x-axis (in degrees). + * @param angleY The angle by which to rotate around the y-axis (in degrees). + * @param angleZ The angle by which to rotate around the z-axis (in degrees). + * @param params Additional parameters. + * @param params.geographic Whether to georeference relative to the globe or the projected coordinate system (PCS). This parameter is only relevant for spatial references that can be used in both local and global viewing modes (currently only WebMercator). This parameter defaults to `true` for WebMercator and WGS84, and `false` for any other PCS. When true, the rotation is applied in a Cartesian system with respect to the local coordinate system on the globe and is specified in meters. + * @param params.origin The origin around which to rotate. If not specified, the mesh will be rotated around the mesh extent center. + * + */ + rotate(angleX: number, angleY: number, angleZ: number, params?: MeshRotateParams): Mesh; + /** + * Notifies that any cached values that depend on vertex attributes need to be recalculated. Use this method after modifying the vertex attributes in place so that values that depend on them (such as the calculation of the extent) are recalculated accordingly. + * + * [Read more...](https://developers.arcgis.com/javascript/latest/api-reference/esri-geometry-Mesh.html#vertexAttributesChanged) + * + * + */ + vertexAttributesChanged(): void; + } + + interface MeshConstructor { + /** + * A mesh is a general, client-side 3D [geometry](https://developers.arcgis.com/javascript/latest/api-reference/esri-geometry-Geometry.html) type composed of [vertices with attributes](https://developers.arcgis.com/javascript/latest/api-reference/esri-geometry-Mesh.html#vertexAttributes). The vertices include geographic position, normals that affect lighting/shading and uv coordinates that can be used to map images to the mesh. Vertices are combined into 3D primitives to render the mesh in the scene (only triangle primitives are currently supported). + * + * [Read more...](https://developers.arcgis.com/javascript/latest/api-reference/esri-geometry-Mesh.html) + */ + + new(properties?: MeshProperties): Mesh; + + + /** + * Creates a mesh representing a box. The spatial reference of the resulting mesh is the same as the location where it is placed. **Box UV coordinate space** The box geometry will have UV coordinates generated according to the following scheme: + * + * [Read more...](https://developers.arcgis.com/javascript/latest/api-reference/esri-geometry-Mesh.html#createBox) + * + * @param location The location bottom center of the box. + * @param params Additional parameters. + * @param params.size A uniform size value or an object containing individual values width, height and depth. The unit of the size values is derived from the spatial reference of the provided location. + * @param params.geographic Whether to georeference relative to the globe or the projected coordinate system (PCS). This parameter is only relevant for spatial references that can be used in both local and global viewing modes (currently only WebMercator). This parameter defaults to `true` for WebMercator and WGS84, and `false` for any other PCS. When true, the mesh is created in a Cartesian system with respect to the local coordinate system on the globe and sizes are specified in meters. + * @param params.material The material to be used for the mesh. + * @param params.imageFace The face for generating image uv coordinates. By default, a single set of unwrapped UV coordinates are generated for all the faces. By setting the `imageFace` parameter to one of `east`, `west`, `north`, `south`, `up` or `down`, the specified face will have full sized UV coordinates while the other faces will pertain their regular unwrapped UV coordinates. This is useful for applying an image only to a single face of the box. The provided `material` parameter will be applied to the specified `imageFace`. The resulting mesh will have two components, the first contains the selected image face and the second contains the other faces of the box. + * + */ + createBox(location: Point, params?: MeshCreateBoxParams): Mesh; + /** + * Creates a mesh representing a cylinder. The spatial reference of the resulting mesh is the same as the location where it is placed. **Cylinder UV coordinate space** The cylinder geometry will have UV coordinates generated according to the following scheme (example is shown for 8 vertices cylinder): + * + * [Read more...](https://developers.arcgis.com/javascript/latest/api-reference/esri-geometry-Mesh.html#createCylinder) + * + * @param location The location of the bottom center of the cylinder. + * @param params Additional parameters. + * @param params.size A uniform size value or an object containing individual values width, height and depth. The unit of the size values is derived from the spatial reference of the provided location. + * @param params.geographic Whether to georeference relative to the globe or the projected coordinate system (PCS). This parameter is only relevant for spatial references that can be used in both local and global viewing modes (currently only WebMercator). This parameter defaults to `true` for WebMercator and WGS84, and `false` for any other PCS. When true, the mesh is created in a Cartesian system with respect to the local coordinate system on the globe and sizes are specified in meters. + * @param params.densificationFactor The additional number of subdivisions for generating the mesh representing a cylinder. A densificationFactor parameter of 0 will generate a default of 16 vertices to approximate the cylinder. A densificationFactor of 1 will generate 32 vertices, etc. The larger the densificationFactor, the better the mesh will approximate a perfect cylinder (at the cost of processing and rendering performance). + * @param params.material The material to be used for the mesh. + * + */ + createCylinder(location: Point, params?: MeshCreateCylinderParams): Mesh; + /** + * Creates a new mesh geometry from a polygon geometry. The resulting mesh contains only a position vertex attribute and a single component with faces. The default shading will be set to `flat`. The spatial reference of the resulting mesh is the same as the input polygon. The resulting mesh will not contain any uv nor normal vertex attributes. + * + * [Read more...](https://developers.arcgis.com/javascript/latest/api-reference/esri-geometry-Mesh.html#createFromPolygon) + * + * @param polygon The input polygon. + * @param params Optional parameters. + * @param params.material The material to be used for the mesh. + * + */ + createFromPolygon(polygon: Polygon, params?: MeshCreateFromPolygonParams): Mesh; + /** + * Creates a mesh representing a plane. The spatial reference of the resulting mesh is the same as the location where it is placed. A plane consists of two triangles and may be conveniently oriented at creation time. **Plane UV coordinate space** The plane geometry will have UV coordinates generated according to the following scheme: + * + * [Read more...](https://developers.arcgis.com/javascript/latest/api-reference/esri-geometry-Mesh.html#createPlane) + * + * @param location The location of the bottom center of the plane. + * @param params Additional parameters. + * @param params.size A uniform size value or an object containing individual values width and height. The unit of the size values is derived from the spatial reference of the provided location. + * @param params.facing Direction the plane is facing. Possible values are `east`, `west`, `north`, `south`, `up` and `down`. Defaults to `up`, + * @param params.geographic Whether to georeference relative to the globe or the projected coordinate system (PCS). This parameter is only relevant for spatial references that can be used in both local and global viewing modes (currently only WebMercator). This parameter defaults to `true` for WebMercator and WGS84, and `false` for any other PCS. When true, the mesh is created in a Cartesian system with respect to the local coordinate system on the globe and sizes are specified in meters. + * @param params.material The material to be used for the mesh. + * + */ + createPlane(location: Point, params?: MeshCreatePlaneParams): Mesh; + /** + * Creates a mesh representing a sphere. The spatial reference of the resulting mesh is the same as the location where it is placed. **Sphere UV coordinate space** The sphere geometry will have UV coordinates generated according to the following scheme (example is shown for 8x8 vertices sphere): + * + * [Read more...](https://developers.arcgis.com/javascript/latest/api-reference/esri-geometry-Mesh.html#createSphere) + * + * @param location The location of the bottom center of the sphere. + * @param params Additional parameters. + * @param params.size A uniform size value or an object containing individual values width, height and depth. The unit of the size values is derived from the spatial reference of the provided location. + * @param params.geographic Indicates whether to georeference relative to the globe or the projected coordinate system (PCS). This parameter is only relevant for spatial references that can be used in both local and global viewing modes (currently only WebMercator). This parameter defaults to `true` for WebMercator and WGS84, and `false` for any other PCS. When true, the mesh is created in a Cartesian system with respect to the local coordinate system on the globe and sizes are specified in meters. + * @param params.densificationFactor The additional number of subdivisions for generating the mesh representing a sphere. A densificationFactor parameter of 0 will generate a default of 16-by-16 vertices to approximate the sphere. A densificationFactor of 1 will generate 32-by-32 vertices, etc. The larger the densificationFactor, the better the mesh will approximate a perfect sphere (at the cost of processing and rendering performance). + * @param params.material The material to be used for the mesh. + * + */ + createSphere(location: Point, params?: MeshCreateSphereParams): Mesh; + + fromJSON(json: any): Mesh; + } + + export const Mesh: MeshConstructor; + + interface MeshProperties extends GeometryProperties { + /** + * An array of mesh components that can be used to apply materials to different regions of the same mesh. There are three common usage patterns for components. 1. **Specify a material for the whole mesh.** In this case, use a single component with only a material (leaving faces as `null`). 2. **Reuse vertex attributes.** When modeling continuous surfaces, it can be convenient to only specify vertices once and then simply refer to them. In this case, use a single component with faces set to index the vertex attributes that form triangles. 3. **Specify multiple materials for the same mesh.** In this case, use multiple components with faces that determine to which region of the mesh the material of the component applies. + * + * [Read more...](https://developers.arcgis.com/javascript/latest/api-reference/esri-geometry-Mesh.html#components) + */ + components?: MeshComponentProperties[]; + /** + * Object describing the attributes of each vertex of the mesh. Vertex attributes are flat numerical arrays that describe the position (mandatory), normal (used for lighting calculations and shading) and uv (used for mapping material images to the mesh surface) for each vertex. Vertex attributes can be addressed by indices specified in the components [faces](https://developers.arcgis.com/javascript/latest/api-reference/esri-geometry-support-MeshComponent.html#faces) property. If the mesh does not contain any components, or if a component does not specify any faces, then the vertex attributes are interpreted as if each consecutive vertex triple makes up a triangle. + * + * [Read more...](https://developers.arcgis.com/javascript/latest/api-reference/esri-geometry-Mesh.html#vertexAttributes) + */ + vertexAttributes?: MeshVertexAttributesProperties; + } + + + export interface MeshCenterAtParams extends Object { + /** + * Indicates whether to georeference relative to the globe or the projected coordinate system (PCS). This parameter is only relevant for spatial references that can be used in both local and global viewing modes (currently only WebMercator). This parameter defaults to `true` for WebMercator and WGS84, and `false` for any other PCS. When true, the offset applied to center the mesh is applied in a Cartesian system with respect to the local coordinate system on the globe and is specified in meters. + * + * [Read more...](https://developers.arcgis.com/javascript/latest/api-reference/esri-geometry-Mesh.html#centerAt) + */ + geographic?: boolean; + /** + * The origin at which to center. If not specified, the mesh will be centered at the mesh extent center. + * + * [Read more...](https://developers.arcgis.com/javascript/latest/api-reference/esri-geometry-Mesh.html#centerAt) + */ + origin?: Point; + } + + + export interface MeshCreateBoxParams extends Object { + /** + * A uniform size value or an object containing individual values width, height and depth. The unit of the size values is derived from the spatial reference of the provided location. + * + * [Read more...](https://developers.arcgis.com/javascript/latest/api-reference/esri-geometry-Mesh.html#createBox) + */ + size?: number | MeshCreateBoxParamsSize; + /** + * Whether to georeference relative to the globe or the projected coordinate system (PCS). This parameter is only relevant for spatial references that can be used in both local and global viewing modes (currently only WebMercator). This parameter defaults to `true` for WebMercator and WGS84, and `false` for any other PCS. When true, the mesh is created in a Cartesian system with respect to the local coordinate system on the globe and sizes are specified in meters. + * + * [Read more...](https://developers.arcgis.com/javascript/latest/api-reference/esri-geometry-Mesh.html#createBox) + */ + geographic?: boolean; + /** + * The material to be used for the mesh. + * + * [Read more...](https://developers.arcgis.com/javascript/latest/api-reference/esri-geometry-Mesh.html#createBox) + */ + material?: MeshCreateBoxParamsMaterial; + /** + * The face for generating image uv coordinates. By default, a single set of unwrapped UV coordinates are generated for all the faces. By setting the `imageFace` parameter to one of `east`, `west`, `north`, `south`, `up` or `down`, the specified face will have full sized UV coordinates while the other faces will pertain their regular unwrapped UV coordinates. This is useful for applying an image only to a single face of the box. The provided `material` parameter will be applied to the specified `imageFace`. The resulting mesh will have two components, the first contains the selected image face and the second contains the other faces of the box. + * + * [Read more...](https://developers.arcgis.com/javascript/latest/api-reference/esri-geometry-Mesh.html#createBox) + */ + imageFace?: string; + } + + + export interface MeshCreateBoxParamsMaterial extends Object { + /** + * The material color. + * + * [Read more...](https://developers.arcgis.com/javascript/latest/api-reference/esri-geometry-Mesh.html#createBox) + */ + color?: ValueMeshColor | ImageMeshColor | string | HTMLImageElement | HTMLCanvasElement | number[]; + } + + + export interface MeshCreateBoxParamsSize extends Object { + /** + * The width of the created mesh. + * + * [Read more...](https://developers.arcgis.com/javascript/latest/api-reference/esri-geometry-Mesh.html#createBox) + */ + width?: number; + /** + * The depth of the created mesh. + * + * [Read more...](https://developers.arcgis.com/javascript/latest/api-reference/esri-geometry-Mesh.html#createBox) + */ + depth?: number; + /** + * The height of the created mesh. + * + * [Read more...](https://developers.arcgis.com/javascript/latest/api-reference/esri-geometry-Mesh.html#createBox) + */ + height?: number; + } + + + export interface MeshCreateCylinderParams extends Object { + /** + * A uniform size value or an object containing individual values width, height and depth. The unit of the size values is derived from the spatial reference of the provided location. + * + * [Read more...](https://developers.arcgis.com/javascript/latest/api-reference/esri-geometry-Mesh.html#createCylinder) + */ + size?: number | MeshCreateCylinderParamsSize; + /** + * Whether to georeference relative to the globe or the projected coordinate system (PCS). This parameter is only relevant for spatial references that can be used in both local and global viewing modes (currently only WebMercator). This parameter defaults to `true` for WebMercator and WGS84, and `false` for any other PCS. When true, the mesh is created in a Cartesian system with respect to the local coordinate system on the globe and sizes are specified in meters. + * + * [Read more...](https://developers.arcgis.com/javascript/latest/api-reference/esri-geometry-Mesh.html#createCylinder) + */ + geographic?: boolean; + /** + * The additional number of subdivisions for generating the mesh representing a cylinder. A densificationFactor parameter of 0 will generate a default of 16 vertices to approximate the cylinder. A densificationFactor of 1 will generate 32 vertices, etc. The larger the densificationFactor, the better the mesh will approximate a perfect cylinder (at the cost of processing and rendering performance). + * + * [Read more...](https://developers.arcgis.com/javascript/latest/api-reference/esri-geometry-Mesh.html#createCylinder) + */ + densificationFactor?: number; + /** + * The material to be used for the mesh. + * + * [Read more...](https://developers.arcgis.com/javascript/latest/api-reference/esri-geometry-Mesh.html#createCylinder) + */ + material?: MeshCreateCylinderParamsMaterial; + } + + + export interface MeshCreateCylinderParamsMaterial extends Object { + /** + * The material color. + * + * [Read more...](https://developers.arcgis.com/javascript/latest/api-reference/esri-geometry-Mesh.html#createCylinder) + */ + color: ValueMeshColor | ImageMeshColor | string | HTMLImageElement | HTMLCanvasElement | number[]; + } + + + export interface MeshCreateCylinderParamsSize extends Object { + /** + * The width of the created mesh. + * + * [Read more...](https://developers.arcgis.com/javascript/latest/api-reference/esri-geometry-Mesh.html#createCylinder) + */ + width?: number; + /** + * The depth of the created mesh. + * + * [Read more...](https://developers.arcgis.com/javascript/latest/api-reference/esri-geometry-Mesh.html#createCylinder) + */ + depth?: number; + /** + * The height of the created mesh. + * + * [Read more...](https://developers.arcgis.com/javascript/latest/api-reference/esri-geometry-Mesh.html#createCylinder) + */ + height?: number; + } + + + export interface MeshCreateFromPolygonParams extends Object { + /** + * The material to be used for the mesh. + * + * [Read more...](https://developers.arcgis.com/javascript/latest/api-reference/esri-geometry-Mesh.html#createFromPolygon) + */ + material?: MeshCreateFromPolygonParamsMaterial; + } + + + export interface MeshCreateFromPolygonParamsMaterial extends Object { + /** + * The material color. + * + * [Read more...](https://developers.arcgis.com/javascript/latest/api-reference/esri-geometry-Mesh.html#createFromPolygon) + */ + color?: ValueMeshColor | ImageMeshColor | string | HTMLImageElement | HTMLCanvasElement | number[]; + } + + + export interface MeshCreatePlaneParams extends Object { + /** + * A uniform size value or an object containing individual values width and height. The unit of the size values is derived from the spatial reference of the provided location. + * + * [Read more...](https://developers.arcgis.com/javascript/latest/api-reference/esri-geometry-Mesh.html#createPlane) + */ + size?: number | MeshCreatePlaneParamsSize; + /** + * Direction the plane is facing. Possible values are `east`, `west`, `north`, `south`, `up` and `down`. Defaults to `up`, + * + * [Read more...](https://developers.arcgis.com/javascript/latest/api-reference/esri-geometry-Mesh.html#createPlane) + */ + facing?: string; + /** + * Whether to georeference relative to the globe or the projected coordinate system (PCS). This parameter is only relevant for spatial references that can be used in both local and global viewing modes (currently only WebMercator). This parameter defaults to `true` for WebMercator and WGS84, and `false` for any other PCS. When true, the mesh is created in a Cartesian system with respect to the local coordinate system on the globe and sizes are specified in meters. + * + * [Read more...](https://developers.arcgis.com/javascript/latest/api-reference/esri-geometry-Mesh.html#createPlane) + */ + geographic?: boolean; + /** + * The material to be used for the mesh. + * + * [Read more...](https://developers.arcgis.com/javascript/latest/api-reference/esri-geometry-Mesh.html#createPlane) + */ + material?: MeshCreatePlaneParamsMaterial; + } + + + export interface MeshCreatePlaneParamsMaterial extends Object { + /** + * The material color. + * + * [Read more...](https://developers.arcgis.com/javascript/latest/api-reference/esri-geometry-Mesh.html#createPlane) + */ + color?: ValueMeshColor | ImageMeshColor | string | HTMLImageElement | HTMLCanvasElement | number[]; + } + + + export interface MeshCreatePlaneParamsSize extends Object { + /** + * The width of the created mesh. + * + * [Read more...](https://developers.arcgis.com/javascript/latest/api-reference/esri-geometry-Mesh.html#createPlane) + */ + width?: number; + /** + * The height of the created mesh. + * + * [Read more...](https://developers.arcgis.com/javascript/latest/api-reference/esri-geometry-Mesh.html#createPlane) + */ + height?: number; + } + + + export interface MeshCreateSphereParams extends Object { + /** + * A uniform size value or an object containing individual values width, height and depth. The unit of the size values is derived from the spatial reference of the provided location. + * + * [Read more...](https://developers.arcgis.com/javascript/latest/api-reference/esri-geometry-Mesh.html#createSphere) + */ + size?: number | MeshCreateSphereParamsSize; + /** + * Indicates whether to georeference relative to the globe or the projected coordinate system (PCS). This parameter is only relevant for spatial references that can be used in both local and global viewing modes (currently only WebMercator). This parameter defaults to `true` for WebMercator and WGS84, and `false` for any other PCS. When true, the mesh is created in a Cartesian system with respect to the local coordinate system on the globe and sizes are specified in meters. + * + * [Read more...](https://developers.arcgis.com/javascript/latest/api-reference/esri-geometry-Mesh.html#createSphere) + */ + geographic?: boolean; + /** + * The additional number of subdivisions for generating the mesh representing a sphere. A densificationFactor parameter of 0 will generate a default of 16-by-16 vertices to approximate the sphere. A densificationFactor of 1 will generate 32-by-32 vertices, etc. The larger the densificationFactor, the better the mesh will approximate a perfect sphere (at the cost of processing and rendering performance). + * + * [Read more...](https://developers.arcgis.com/javascript/latest/api-reference/esri-geometry-Mesh.html#createSphere) + */ + densificationFactor?: number; + /** + * The material to be used for the mesh. + * + * [Read more...](https://developers.arcgis.com/javascript/latest/api-reference/esri-geometry-Mesh.html#createSphere) + */ + material?: MeshCreateSphereParamsMaterial; + } + + + export interface MeshCreateSphereParamsMaterial extends Object { + /** + * The material color. + * + * [Read more...](https://developers.arcgis.com/javascript/latest/api-reference/esri-geometry-Mesh.html#createSphere) + */ + color?: ValueMeshColor | ImageMeshColor | string | HTMLImageElement | HTMLCanvasElement | number[]; + } + + + export interface MeshCreateSphereParamsSize extends Object { + /** + * The width of the created mesh. + * + * [Read more...](https://developers.arcgis.com/javascript/latest/api-reference/esri-geometry-Mesh.html#createSphere) + */ + width?: number; + /** + * The depth of the created mesh. + * + * [Read more...](https://developers.arcgis.com/javascript/latest/api-reference/esri-geometry-Mesh.html#createSphere) + */ + depth?: number; + /** + * The height of the created mesh. + * + * [Read more...](https://developers.arcgis.com/javascript/latest/api-reference/esri-geometry-Mesh.html#createSphere) + */ + height?: number; + } + + + export interface MeshOffsetParams extends Object { + /** + * Whether to georeference relative to the globe or the projected coordinate system (PCS). This parameter is only relevant for spatial references that can be used in both local and global viewing modes (currently only WebMercator). This parameter defaults to `true` for WebMercator and WGS84, and `false` for any other PCS. When true, the offset is applied in a Cartesian system with respect to the local coordinate system on the globe and is specified in meters. + * + * [Read more...](https://developers.arcgis.com/javascript/latest/api-reference/esri-geometry-Mesh.html#offset) + */ + geographic?: boolean; + } + + + export interface MeshRotateParams extends Object { + /** + * Whether to georeference relative to the globe or the projected coordinate system (PCS). This parameter is only relevant for spatial references that can be used in both local and global viewing modes (currently only WebMercator). This parameter defaults to `true` for WebMercator and WGS84, and `false` for any other PCS. When true, the rotation is applied in a Cartesian system with respect to the local coordinate system on the globe and is specified in meters. + * + * [Read more...](https://developers.arcgis.com/javascript/latest/api-reference/esri-geometry-Mesh.html#rotate) + */ + geographic?: boolean; + /** + * The origin around which to rotate. If not specified, the mesh will be rotated around the mesh extent center. + * + * [Read more...](https://developers.arcgis.com/javascript/latest/api-reference/esri-geometry-Mesh.html#rotate) + */ + origin?: Point; + } + + + export interface MeshVertexAttributesProperties extends Object { + /** + * A flat array of vertex positions. Vertex positions have x, y and z coordinates and they should be in the spatial reference system of the geometry. + * + * [Read more...](https://developers.arcgis.com/javascript/latest/api-reference/esri-geometry-Mesh.html#vertexAttributes) + */ + position?: Float64Array | number[] | Float32Array; + /** + * A flat array of vertex uv coordinates (2 elements per vertex). + * + * [Read more...](https://developers.arcgis.com/javascript/latest/api-reference/esri-geometry-Mesh.html#vertexAttributes) + */ + uv?: Float32Array | number[] | Float64Array; + /** + * A flat array of the vertex normals (3 elements per vertex). + * + * [Read more...](https://developers.arcgis.com/javascript/latest/api-reference/esri-geometry-Mesh.html#vertexAttributes) + */ + normal?: Float32Array | number[] | Uint32Array; + } + + export interface MeshVertexAttributes extends AnonymousAccessor { + /** + * A flat array of vertex positions. Vertex positions have x, y and z coordinates and they should be in the spatial reference system of the geometry. + * + * [Read more...](https://developers.arcgis.com/javascript/latest/api-reference/esri-geometry-Mesh.html#vertexAttributes) + */ + position: Float64Array; + /** + * A flat array of vertex uv coordinates (2 elements per vertex). + * + * [Read more...](https://developers.arcgis.com/javascript/latest/api-reference/esri-geometry-Mesh.html#vertexAttributes) + */ + uv?: Float32Array; + /** + * A flat array of the vertex normals (3 elements per vertex). + * + * [Read more...](https://developers.arcgis.com/javascript/latest/api-reference/esri-geometry-Mesh.html#vertexAttributes) + */ + normal?: Float32Array; + } + interface Multipoint extends Geometry { /** * An array of points. @@ -3620,6 +4583,80 @@ declare namespace __esri { paths?: number[][][]; } + /** + * A client-side projection engine for converting geometries from one [SpatialReference](https://developers.arcgis.com/javascript/latest/api-reference/esri-geometry-SpatialReference.html) to another. When projecting geometries the starting spatial reference must be specified on the input geometry. You can specify a specific geographic (datum) transformation for the [project](https://developers.arcgis.com/javascript/latest/api-reference/esri-geometry-projection.html#project) operation, or accept the default transformation if one is needed. + * + * [Read more...](https://developers.arcgis.com/javascript/latest/api-reference/esri-geometry-projection.html) + */ + interface projection { + /** + * Returns the default geographic transformation used to convert the geometry from the input spatial reference to the output spatial reference. The default transformation is used when [projecting geometries](https://developers.arcgis.com/javascript/latest/api-reference/esri-geometry-projection.html#project) where the datum transformation is required but not specified in the `geographicTransformation` parameter. + * > **Known Limitations** + * * This method returns equation-based geographic transformations only. + * * Geographic transformations are returned with their maximum number of [steps](https://developers.arcgis.com/javascript/latest/api-reference/esri-geometry-support-GeographicTransformation.html#steps). Currently, number of steps is limited to 2. + * + * [Read more...](https://developers.arcgis.com/javascript/latest/api-reference/esri-geometry-projection.html#getTransformation) + * + * @param inSpatialReference The input spatial reference from which to project geometries. This is the spatial reference of the input geometries. + * @param outSpatialReference The spatial reference to which you are converting the geometries. + * @param extent An extent used to determine the suitability of the returned transformation. The extent will be re-projected to the `inSpatialReference` if it has a different spatial reference. + * + */ + getTransformation(inSpatialReference: SpatialReference | SpatialReferenceProperties, outSpatialReference: SpatialReference, extent?: Extent): GeographicTransformation; + /** + * Returns a list of all geographic transformations suitable to convert geometries from the input spatial reference to the specified output spatial reference. The list is ordered in descending order by suitability, with the most suitable being first in the list. + * > **Known Limitations** + * * This method returns all the suitable equation-based geographic transformations. + * * Geographic transformations are returned with their maximum number of [steps](https://developers.arcgis.com/javascript/latest/api-reference/esri-geometry-support-GeographicTransformation.html#steps). Currently, number of steps is limited to 2. + * + * [Read more...](https://developers.arcgis.com/javascript/latest/api-reference/esri-geometry-projection.html#getTransformations) + * + * @param inSpatialReference The spatial reference that the geometries are currently using. + * @param outSpatialReference The spatial reference to which you are converting the geometries to. + * @param extent An extent used to determine the suitability of the returned transformations. The extent will be re-projected to the input spatial reference if necessary. + * + */ + getTransformations(inSpatialReference: SpatialReference | SpatialReferenceProperties, outSpatialReference: SpatialReference, extent?: Extent): GeographicTransformation[]; + /** + * Indicates if all dependencies of this module have been loaded. + * + * [Read more...](https://developers.arcgis.com/javascript/latest/api-reference/esri-geometry-projection.html#isLoaded) + * + * + */ + isLoaded(): boolean; + /** + * Indicates if this module is supported in the browser. The browser must support [WebAssembly](https://caniuse.com/#feat=wasm). + * + * [Read more...](https://developers.arcgis.com/javascript/latest/api-reference/esri-geometry-projection.html#isSupported) + * + * + */ + isSupported(): boolean; + /** + * Loads this module's dependencies. This method must be called before [projecting](https://developers.arcgis.com/javascript/latest/api-reference/esri-geometry-projection.html#project) geometries. + * + * [Read more...](https://developers.arcgis.com/javascript/latest/api-reference/esri-geometry-projection.html#load) + * + * + */ + load(): IPromise; + /** + * Projects a geometry or an array of geometries to the specified output spatial reference. A default geographic transformation is used if not explicitly provided, but required. Use the [getTransformation()](https://developers.arcgis.com/javascript/latest/api-reference/esri-geometry-projection.html#getTransformation) method to find out which transformation is used by default for the given input and output spatial references. Note that you must [load](https://developers.arcgis.com/javascript/latest/api-reference/esri-geometry-projection.html#load) this module before attempting to project geometries. + * > **Known Limitations** This method uses the spatial reference of the first geometry as an input spatial reference. Therefore all geometries in the array must have the same spatial reference. + * + * [Read more...](https://developers.arcgis.com/javascript/latest/api-reference/esri-geometry-projection.html#project) + * + * @param geometry The geometry or geometries to project. + * @param outSpatialReference The spatial reference to which you are converting the geometries' coordinates. + * @param geographicTransformation The geographic transformation used to transform the geometries. Specify this parameter to project a geometry when the default transformation is not appropriate for your requirements. + * + */ + project(geometry: Geometry | Geometry[], outSpatialReference: SpatialReference | SpatialReferenceProperties, geographicTransformation?: GeographicTransformation): Geometry | Geometry[]; + } + + export const projection: projection; + interface ScreenPoint extends Accessor { /** * X-coordinate in pixels relative to the top-left corner of the view. @@ -3701,7 +4738,7 @@ declare namespace __esri { */ readonly isWrappable: boolean; /** - * The well-known ID of a spatial reference. See [Projected Coordinate Systems](http://resources.arcgis.com/en/help/arcgis-rest-api/index.html#/Projected_coordinate_systems/02r3000000vt000000/) and [Geographic Coordinate Systems](http://resources.arcgis.com/en/help/arcgis-rest-api/index.html#/Geographic_coordinate_systems/02r300000105000000/) for the list of supported spatial references. + * The well-known ID of a spatial reference. See [Projected Coordinate Systems](https://developers.arcgis.com/rest/services-reference/projected-coordinate-systems.htm) and [Geographic Coordinate Systems](https://developers.arcgis.com/rest/services-reference/geographic-coordinate-systems.htm) for the list of supported spatial references. * * [Read more...](https://developers.arcgis.com/javascript/latest/api-reference/esri-geometry-SpatialReference.html#wkid) */ @@ -3758,7 +4795,7 @@ declare namespace __esri { interface SpatialReferenceProperties { /** - * The well-known ID of a spatial reference. See [Projected Coordinate Systems](http://resources.arcgis.com/en/help/arcgis-rest-api/index.html#/Projected_coordinate_systems/02r3000000vt000000/) and [Geographic Coordinate Systems](http://resources.arcgis.com/en/help/arcgis-rest-api/index.html#/Geographic_coordinate_systems/02r300000105000000/) for the list of supported spatial references. + * The well-known ID of a spatial reference. See [Projected Coordinate Systems](https://developers.arcgis.com/rest/services-reference/projected-coordinate-systems.htm) and [Geographic Coordinate Systems](https://developers.arcgis.com/rest/services-reference/geographic-coordinate-systems.htm) for the list of supported spatial references. * * [Read more...](https://developers.arcgis.com/javascript/latest/api-reference/esri-geometry-SpatialReference.html#wkid) */ @@ -3771,6 +4808,123 @@ declare namespace __esri { wkt?: string; } + interface GeographicTransformation { + /** + * Geographic transformation steps. Each step represents a geographic transformation that will be used in the process of transforming coordinates from one geographic coordinate system to another. + * + * [Read more...](https://developers.arcgis.com/javascript/latest/api-reference/esri-geometry-support-GeographicTransformation.html#steps) + */ + steps: GeographicTransformationStep[]; + + /** + * Returns the inverse of the geographic transformation calling this method or `null` if the transformation is not invertible. The inverse of a transformation converts coordinates using the same method and parameters, but in the opposite direction of the original object. For example if the original object represents the `NAD_1983_HARN_To_NAD_1983_NSRS2007_1` transformation, then the inverse will transform from `NAD 83 (NSRS 2007)` to `NAD 83 (HARN)`. + * + * [Read more...](https://developers.arcgis.com/javascript/latest/api-reference/esri-geometry-support-GeographicTransformation.html#getInverse) + * + * + */ + getInverse(): GeographicTransformation; + } + + interface GeographicTransformationConstructor { + /** + * Projecting your data between coordinate systems sometimes requires transforming between geographic coordinate systems. Geographic transformations are used to transform coordinates between spatial references that have different geographic coordinate systems, and thus different datums. Using the most suitable transformation ensures the best possible accuracy when converting geometries from one spatial reference to another. + * + * [Read more...](https://developers.arcgis.com/javascript/latest/api-reference/esri-geometry-support-GeographicTransformation.html) + */ + + + new(properties?: any): GeographicTransformation; + } + + export const GeographicTransformation: GeographicTransformationConstructor; + + interface GeographicTransformationStep { + /** + * Indicates with the geographic transformation is inverted. + * + * [Read more...](https://developers.arcgis.com/javascript/latest/api-reference/esri-geometry-support-GeographicTransformationStep.html#isInverse) + * + * @default false + */ + isInverse: boolean; + /** + * The well-known id (wkid) hat represents a known geographic transformation. See [Geographic datum transformations](https://developers.arcgis.com/java/10-2/guide/datum-transformations.htm#ESRI_SECTION1_7635FE2A60E6449898D5AD0ADE2CA0C3) for the list of supported equation-based geographic transformations. + * + * [Read more...](https://developers.arcgis.com/javascript/latest/api-reference/esri-geometry-support-GeographicTransformationStep.html#wkid) + */ + wkid: number; + /** + * The well-known text (wkt) that represents a known geographic transformation. See [Geographic datum transformations](https://developers.arcgis.com/java/10-2/guide/datum-transformations.htm#ESRI_SECTION1_7635FE2A60E6449898D5AD0ADE2CA0C3) for the list of supported equation-based geographic transformations. + * + * [Read more...](https://developers.arcgis.com/javascript/latest/api-reference/esri-geometry-support-GeographicTransformationStep.html#wkt) + */ + wkt: string; + + /** + * Gets the inverse of the geographic transformation step used to call this method or `null` if the transformation step is not invertible. The inverse of a transformation converts coordinates using the same method and parameters, but in the opposite direction of the original object. For example if the original object represents the `NAD_1983_HARN_To_NAD_1983_NSRS2007_1` transformation, then the inverse will transform from `NAD 83 (NSRS 2007)` to `NAD 83 (HARN)`. + * + * [Read more...](https://developers.arcgis.com/javascript/latest/api-reference/esri-geometry-support-GeographicTransformationStep.html#getInverse) + * + * + */ + getInverse(): GeographicTransformationStep; + } + + interface GeographicTransformationStepConstructor { + + + + new(properties?: any): GeographicTransformationStep; + } + + export const GeographicTransformationStep: GeographicTransformationStepConstructor; + + interface ImageMeshColor extends Accessor { + /** + * For ImageMeshColor the type is always `image`. + * + * [Read more...](https://developers.arcgis.com/javascript/latest/api-reference/esri-geometry-support-ImageMeshColor.html#type) + */ + readonly type: "image"; + /** + * The url to the image resource. This can either be a remote url (absolute or relative) or a data url. + * + * [Read more...](https://developers.arcgis.com/javascript/latest/api-reference/esri-geometry-support-ImageMeshColor.html#url) + */ + url: string; + + /** + * Creates a deep clone. + * + * [Read more...](https://developers.arcgis.com/javascript/latest/api-reference/esri-geometry-support-ImageMeshColor.html#clone) + * + * + */ + clone(): ImageMeshColor; + } + + interface ImageMeshColorConstructor { + /** + * ImageMeshColor is a type of mesh color that represents an image mapped to the mesh by its uv vertex attributes. ImageMeshColor instances can be used with the [MeshComponent.material.color](https://developers.arcgis.com/javascript/latest/api-reference/esri-geometry-support-MeshComponent.html#material) property. + * + * [Read more...](https://developers.arcgis.com/javascript/latest/api-reference/esri-geometry-support-ImageMeshColor.html) + */ + + new(properties?: ImageMeshColorProperties): ImageMeshColor; + } + + export const ImageMeshColor: ImageMeshColorConstructor; + + interface ImageMeshColorProperties { + /** + * The url to the image resource. This can either be a remote url (absolute or relative) or a data url. + * + * [Read more...](https://developers.arcgis.com/javascript/latest/api-reference/esri-geometry-support-ImageMeshColor.html#url) + */ + url?: string; + } + interface jsonUtils { /** @@ -3778,7 +4932,7 @@ declare namespace __esri { * * [Read more...](https://developers.arcgis.com/javascript/latest/api-reference/esri-geometry-support-jsonUtils.html#fromJSON) * - * @param json A JSON representation of the instance in the ArcGIS format. See the [ArcGIS REST API documentation](http://resources.arcgis.com/en/help/arcgis-rest-api/index.html#/Geometry_objects/02r3000000n1000000/) for examples of the structure of various input JSON objects. + * @param json A JSON representation of the instance in the ArcGIS format. See the [ArcGIS REST API documentation](https://developers.arcgis.com/documentation/common-data-types/overview-of-common-data-types.htm) for examples of the structure of various input JSON objects. * */ fromJSON(json: any): Geometry; @@ -3795,6 +4949,200 @@ declare namespace __esri { export const jsonUtils: jsonUtils; + interface MeshComponent extends Accessor { + /** + * A flat array of indices that refer to vertices in the [vertexAttributes](https://developers.arcgis.com/javascript/latest/api-reference/esri-geometry-Mesh.html#vertexAttributes) of the mesh to which the component belongs. Each triple of indices defines a triangle to render (i.e. the faces array must always have a length that is a multiple of 3). Note that the indices refer to **vertices** and not to the index of the first coordinate of a vertex in the [vertexAttributes.position](https://developers.arcgis.com/javascript/latest/api-reference/esri-geometry-Mesh.html#vertexAttributes) array. If faces is `null`, then all the vertices in the mesh will be rendered as triangles for this component. + * + * [Read more...](https://developers.arcgis.com/javascript/latest/api-reference/esri-geometry-support-MeshComponent.html#faces) + */ + faces: Uint32Array; + /** + * The material determines how the component is visualized. Materials specify a color that may either be a single color value (a [ValueMeshColor](https://developers.arcgis.com/javascript/latest/api-reference/esri-geometry-support-ValueMeshColor.html)) or an image ( an [ImageMeshColor](https://developers.arcgis.com/javascript/latest/api-reference/esri-geometry-support-ImageMeshColor.html)), which is mapped to the uv coordinate specified for each vertex in the mesh vertex attributes. The material property supports a number of convenience autocast types, including hex color strings and well known color strings (autocasts to [ValueMeshColor](https://developers.arcgis.com/javascript/latest/api-reference/esri-geometry-support-ValueMeshColor.html)), or strings representing urls, HTMLImageElements or HTMLCanvasElements (autocasts to [ImageMeshColor](https://developers.arcgis.com/javascript/latest/api-reference/esri-geometry-support-ImageMeshColor.html)). + * + * [Read more...](https://developers.arcgis.com/javascript/latest/api-reference/esri-geometry-support-MeshComponent.html#material) + */ + material: MeshComponentMaterial; + /** + * Specifies the type of normals used for lighting. This determines whether the object has a smooth or an angular appearance. The following shading types are supported: + * + * | Type | Description | + * |------|-------------| + * | source | Shading uses the normals as defined in the vertex attributes. If no normals are defined, then shading defaults back to `flat` | + * | flat | Shading uses normals created per triangle face. This type of shading is good for objects with sharp edges such as boxes. | + * | smooth | Shading uses per-vertex normals that average the normals of all the faces a vertex is a part of. This type of shading is good for meshes that approximate curved surfaces such as spheres. | + * + * + * [Read more...](https://developers.arcgis.com/javascript/latest/api-reference/esri-geometry-support-MeshComponent.html#shading) + */ + shading: string; + + /** + * Creates a deep clone. + * + * [Read more...](https://developers.arcgis.com/javascript/latest/api-reference/esri-geometry-support-MeshComponent.html#clone) + * + * + */ + clone(): MeshComponent; + } + + interface MeshComponentConstructor { + /** + * The MeshComponent class is used to apply one or more materials to a single [Mesh](https://developers.arcgis.com/javascript/latest/api-reference/esri-geometry-Mesh.html). The [faces](https://developers.arcgis.com/javascript/latest/api-reference/esri-geometry-support-MeshComponent.html#faces) property is a flat array of indices in the mesh [vertexAttributes](https://developers.arcgis.com/javascript/latest/api-reference/esri-geometry-Mesh.html#vertexAttributes) and defines the region of vertices in the mesh on which to apply the material. Each triple of values in the flat array of indices specifies a triangle to be rendered. + * + * [Read more...](https://developers.arcgis.com/javascript/latest/api-reference/esri-geometry-support-MeshComponent.html) + */ + + new(properties?: MeshComponentProperties): MeshComponent; + } + + export const MeshComponent: MeshComponentConstructor; + + interface MeshComponentProperties { + /** + * A flat array of indices that refer to vertices in the [vertexAttributes](https://developers.arcgis.com/javascript/latest/api-reference/esri-geometry-Mesh.html#vertexAttributes) of the mesh to which the component belongs. Each triple of indices defines a triangle to render (i.e. the faces array must always have a length that is a multiple of 3). Note that the indices refer to **vertices** and not to the index of the first coordinate of a vertex in the [vertexAttributes.position](https://developers.arcgis.com/javascript/latest/api-reference/esri-geometry-Mesh.html#vertexAttributes) array. If faces is `null`, then all the vertices in the mesh will be rendered as triangles for this component. + * + * [Read more...](https://developers.arcgis.com/javascript/latest/api-reference/esri-geometry-support-MeshComponent.html#faces) + */ + faces?: Uint32Array | number[] | Uint16Array; + /** + * The material determines how the component is visualized. Materials specify a color that may either be a single color value (a [ValueMeshColor](https://developers.arcgis.com/javascript/latest/api-reference/esri-geometry-support-ValueMeshColor.html)) or an image ( an [ImageMeshColor](https://developers.arcgis.com/javascript/latest/api-reference/esri-geometry-support-ImageMeshColor.html)), which is mapped to the uv coordinate specified for each vertex in the mesh vertex attributes. The material property supports a number of convenience autocast types, including hex color strings and well known color strings (autocasts to [ValueMeshColor](https://developers.arcgis.com/javascript/latest/api-reference/esri-geometry-support-ValueMeshColor.html)), or strings representing urls, HTMLImageElements or HTMLCanvasElements (autocasts to [ImageMeshColor](https://developers.arcgis.com/javascript/latest/api-reference/esri-geometry-support-ImageMeshColor.html)). + * + * [Read more...](https://developers.arcgis.com/javascript/latest/api-reference/esri-geometry-support-MeshComponent.html#material) + */ + material?: MeshComponentMaterialProperties; + /** + * Specifies the type of normals used for lighting. This determines whether the object has a smooth or an angular appearance. The following shading types are supported: + * + * | Type | Description | + * |------|-------------| + * | source | Shading uses the normals as defined in the vertex attributes. If no normals are defined, then shading defaults back to `flat` | + * | flat | Shading uses normals created per triangle face. This type of shading is good for objects with sharp edges such as boxes. | + * | smooth | Shading uses per-vertex normals that average the normals of all the faces a vertex is a part of. This type of shading is good for meshes that approximate curved surfaces such as spheres. | + * + * + * [Read more...](https://developers.arcgis.com/javascript/latest/api-reference/esri-geometry-support-MeshComponent.html#shading) + */ + shading?: string; + } + + + export interface MeshComponentMaterialProperties extends Object { + /** + * the material color. + * + * [Read more...](https://developers.arcgis.com/javascript/latest/api-reference/esri-geometry-support-MeshComponent.html#material) + */ + color?: ValueMeshColorProperties | ImageMeshColorProperties; + } + + export interface MeshComponentMaterial extends AnonymousAccessor { + /** + * the material color. + * + * [Read more...](https://developers.arcgis.com/javascript/latest/api-reference/esri-geometry-support-MeshComponent.html#material) + */ + color: ValueMeshColor | ImageMeshColor; + } + + + interface meshUtils { + /** + * Creates a mesh geometry by sampling elevation data from an elevation service on a regular grid. + * + * [Read more...](https://developers.arcgis.com/javascript/latest/api-reference/esri-geometry-support-meshUtils.html#createFromElevation) + * + * @param source The source from which to query the elevation data. + * @param extent The extent from which to create the mesh. + * @param params Optional parameters. + * @param params.material The material. + * @param params.demResolution Controls the horizontal resolution (cell size) in meters from which elevation data is sampled (defaults to `auto`). See [ElevationLayer.queryElevation](https://developers.arcgis.com/javascript/latest/api-reference/esri-layers-ElevationLayer.html#queryElevation) for more details on the different settings. + * + */ + createFromElevation(source: ElevationLayer | Ground | ElevationSampler, extent: Extent, params?: meshUtilsCreateFromElevationParams): IPromise; + /** + * Georeferences vertices specified in a Cartesian coordinate system. This is useful when converting general 3D model meshes not typically georeferenced. This method operates on mesh vertex attributes and will convert positions and normals (if specified) from a local (0, 0, 0) Cartesian system to the properly georeferenced coordinates at the specified location. + * + * [Read more...](https://developers.arcgis.com/javascript/latest/api-reference/esri-geometry-support-meshUtils.html#georeference) + * + * @param vertexAttributes The position and normal buffers to georeference. + * @param location The location at which to georeference the position and normal buffers. + * @param params Optional parameters. + * @param params.geographic Indicates whether to georeference relative to the globe or the projected coordinate system. + * + */ + georeference(vertexAttributes: VertexAttributes, location: Point, params?: meshUtilsGeoreferenceParams): VertexAttributes; + /** + * Merges multiple meshes into a single mesh. All mesh geometries must be in the same spatial reference. + * + * [Read more...](https://developers.arcgis.com/javascript/latest/api-reference/esri-geometry-support-meshUtils.html#merge) + * + * @param geometries One or more meshes. + * + */ + merge(geometries: Mesh[]): Mesh; + } + + export const meshUtils: meshUtils; + + /** + * Represents the position and normal vertex attribute buffers of a mesh. + * + * [Read more...](https://developers.arcgis.com/javascript/latest/api-reference/esri-geometry-support-meshUtils.html#VertexAttributes) + */ + export interface VertexAttributes extends Object { + /** + * The position buffer. + * + * [Read more...](https://developers.arcgis.com/javascript/latest/api-reference/esri-geometry-support-meshUtils.html#VertexAttributes) + */ + position: Float64Array; + /** + * The normal buffer. + * + * [Read more...](https://developers.arcgis.com/javascript/latest/api-reference/esri-geometry-support-meshUtils.html#VertexAttributes) + */ + normal?: Float32Array; + } + + + export interface meshUtilsCreateFromElevationParams extends Object { + /** + * The material. + * + * [Read more...](https://developers.arcgis.com/javascript/latest/api-reference/esri-geometry-support-meshUtils.html#createFromElevation) + */ + material?: meshUtilsCreateFromElevationParamsMaterial; + /** + * Controls the horizontal resolution (cell size) in meters from which elevation data is sampled (defaults to `auto`). See [ElevationLayer.queryElevation](https://developers.arcgis.com/javascript/latest/api-reference/esri-layers-ElevationLayer.html#queryElevation) for more details on the different settings. + * + * [Read more...](https://developers.arcgis.com/javascript/latest/api-reference/esri-geometry-support-meshUtils.html#createFromElevation) + * + * @default auto + */ + demResolution?: number | string; + } + + + export interface meshUtilsCreateFromElevationParamsMaterial extends Object { + /** + * The material color. + * + * [Read more...](https://developers.arcgis.com/javascript/latest/api-reference/esri-geometry-support-meshUtils.html#createFromElevation) + */ + color?: ValueMeshColor | ImageMeshColor | string | HTMLImageElement | HTMLCanvasElement | number[]; + } + + + export interface meshUtilsGeoreferenceParams extends Object { + /** + * Indicates whether to georeference relative to the globe or the projected coordinate system. + * + * [Read more...](https://developers.arcgis.com/javascript/latest/api-reference/esri-geometry-support-meshUtils.html#georeference) + */ + geographic?: boolean; + } + interface normalizeUtils { /** @@ -3811,6 +5159,51 @@ declare namespace __esri { export const normalizeUtils: normalizeUtils; + interface ValueMeshColor extends Accessor { + /** + * For ValueMeshColor the type is always `value`. + * + * [Read more...](https://developers.arcgis.com/javascript/latest/api-reference/esri-geometry-support-ValueMeshColor.html#type) + */ + readonly type: "value"; + /** + * The color value. + * + * [Read more...](https://developers.arcgis.com/javascript/latest/api-reference/esri-geometry-support-ValueMeshColor.html#value) + */ + value: Color; + + /** + * Creates a deep clone. + * + * [Read more...](https://developers.arcgis.com/javascript/latest/api-reference/esri-geometry-support-ValueMeshColor.html#clone) + * + * + */ + clone(): ValueMeshColor; + } + + interface ValueMeshColorConstructor { + /** + * ValueMeshColor is a type of mesh color that represents a single uniform color to be applied to a mesh component. ValueMeshColor instances can be used with the [MeshComponent.material.color](https://developers.arcgis.com/javascript/latest/api-reference/esri-geometry-support-MeshComponent.html#material) property. + * + * [Read more...](https://developers.arcgis.com/javascript/latest/api-reference/esri-geometry-support-ValueMeshColor.html) + */ + + new(properties?: ValueMeshColorProperties): ValueMeshColor; + } + + export const ValueMeshColor: ValueMeshColorConstructor; + + interface ValueMeshColorProperties { + /** + * The color value. + * + * [Read more...](https://developers.arcgis.com/javascript/latest/api-reference/esri-geometry-support-ValueMeshColor.html#value) + */ + value?: Color | number[] | string; + } + interface webMercatorUtils { /** @@ -4025,6 +5418,17 @@ declare namespace __esri { * */ clone(): Ground; + /** + * Creates an elevation sampler for the given extent by querying the ground layers for elevation data and caching it so values may be sampled quickly afterwards. The sampler uses the elevation data from the first layer that has data available. For getting elevation data from a specific layer use [ElevationLayer.createElevationSampler()](https://developers.arcgis.com/javascript/latest/api-reference/esri-layers-ElevationLayer.html#createElevationSampler). + * + * [Read more...](https://developers.arcgis.com/javascript/latest/api-reference/esri-Ground.html#createElevationSampler) + * + * @param extent The extent for which to create the sampler. + * @param options Additional sampler options. + * @param options.noDataValue The value to use when there is no data available. + * + */ + createElevationSampler(extent: Extent, options?: GroundCreateElevationSamplerOptions): IPromise; /** * Queries the ground layer services for elevation values for the given geometry. The returned result contains a copy of the geometry with z-values sampled from elevation data from the first layer that has data available. * @@ -4089,6 +5493,18 @@ declare namespace __esri { } + export interface GroundCreateElevationSamplerOptions extends Object { + /** + * The value to use when there is no data available. + * + * [Read more...](https://developers.arcgis.com/javascript/latest/api-reference/esri-Ground.html#createElevationSampler) + * + * @default 0 + */ + noDataValue?: number; + } + + export interface GroundQueryElevationOptions extends Object { /** * Indicates whether to return additional sample information for each sampled coordinate. @@ -4248,7 +5664,7 @@ declare namespace __esri { dialog: any; /** - * When accessing secure resources via Oauth 2.0 from ArcGIS.com or one of its sub-domains the IdentityManager redirects the user to the ArcGIS.com or Portal for ArcGIS sign-in page. Once the user successfully logs in they are redirected back to the application. Use this method if the application needs to execute custom logic before the page is redirected. The IdentityManager calls the custom handler function with an object containing redirection properties. + * Once a user successfully logs in, they are redirected back to the application. Use this method if the application needs to execute custom logic before the page is redirected. The IdentityManager calls the custom handler function with an object containing redirection properties. * * [Read more...](https://developers.arcgis.com/javascript/latest/api-reference/esri-identity-IdentityManager.html#setOAuthRedirectionHandler) * @@ -4269,11 +5685,7 @@ declare namespace __esri { on(name: "credential-create", eventHandler: IdentityManagerCredentialCreateEventHandler): IHandle; - on(name: "credential-create", modifiers: string[], eventHandler: IdentityManagerCredentialCreateEventHandler): IHandle; - on(name: "credentials-destroy", eventHandler: IdentityManagerCredentialsDestroyEventHandler): IHandle; - - on(name: "credentials-destroy", modifiers: string[], eventHandler: IdentityManagerCredentialsDestroyEventHandler): IHandle; } interface IdentityManagerConstructor { @@ -4307,6 +5719,14 @@ declare namespace __esri { * @default 60 */ tokenValidity: number; + /** + * If your application is on the same domain as *.arcgis.com or ArcGIS Enterprise Server, the IdentityManager will redirect the user to its sign-in page. For instance, let's say an application accesses secure resources from ArcGIS.com or one of its subdomains. Once the application attempts to access this resource, the IdentityManager redirects the user to the ArcGIS.com sign-in page. Once a user successfully logs in, they are redirected back to the application. The same holds true if the application accesses secure resources from ArcGIS Enterprise as the IdentityManager will redirect the user to its sign-in page. If you do not wish for the application to automatically redirect, set this property to `false`. (Please note that this is not a common scenario. For most, using the OAuth sign-in behavior should handle most of their authentication needs.) + * + * [Read more...](https://developers.arcgis.com/javascript/latest/api-reference/esri-identity-IdentityManagerBase.html#useSignInPage) + * + * @default true + */ + useSignInPage: boolean; /** * Returns the [Credential](https://developers.arcgis.com/javascript/latest/api-reference/esri-identity-Credential.html) if the user has already signed in to access the given resource. If the user has not signed in, then the promise will be rejected and its error callback will be called. @@ -4457,7 +5877,7 @@ declare namespace __esri { */ setProtocolErrorHandler(handlerFunction: IdentityManagerBaseSetProtocolErrorHandlerHandlerFunction): void; /** - * When accessing secure resources from ArcGIS.com or one of its subdomains, the IdentityManager redirects the user to the ArcGIS.com sign-in page. Once the user successfully logs in they are redirected back to the application. Use this method if the application needs to execute custom logic before the page is redirected by creating a custom redirection handler. The IdentityManager calls the custom handler function with an object containing the redirection properties. + * If your application is on the same domain as *.arcgis.com or ArcGIS Enterprise Server, the IdentityManager will redirect the user to its sign-in page. For instance, let's say an application accesses secure resources from ArcGIS.com or one of its subdomains. Once the application attempts to access this resource, the IdentityManager redirects the user to the ArcGIS.com sign-in page. Once a user successfully logs in, they are redirected back to the application. The same holds true if the application accesses secure resources from ArcGIS Enterprise as the IdentityManager will redirect the user to its sign-in page. Use this method if the application needs to execute custom logic before the page is redirected by creating a custom redirection handler. The IdentityManager calls the custom handler function with an object containing the redirection properties. * * [Read more...](https://developers.arcgis.com/javascript/latest/api-reference/esri-identity-IdentityManagerBase.html#setRedirectionHandler) * @@ -4735,7 +6155,7 @@ declare namespace __esri { */ popupWindowFeatures: string; /** - * The ArcGIS for Portal URL. + * The ArcGIS Enterprise portal URL. * * [Read more...](https://developers.arcgis.com/javascript/latest/api-reference/esri-identity-OAuthInfo.html#portalUrl) * @@ -4827,7 +6247,7 @@ declare namespace __esri { */ popupWindowFeatures?: string; /** - * The ArcGIS for Portal URL. + * The ArcGIS Enterprise portal URL. * * [Read more...](https://developers.arcgis.com/javascript/latest/api-reference/esri-identity-OAuthInfo.html#portalUrl) * @@ -4969,11 +6389,7 @@ declare namespace __esri { on(name: "layerview-create", eventHandler: BaseDynamicLayerLayerviewCreateEventHandler): IHandle; - on(name: "layerview-create", modifiers: string[], eventHandler: BaseDynamicLayerLayerviewCreateEventHandler): IHandle; - on(name: "layerview-destroy", eventHandler: BaseDynamicLayerLayerviewDestroyEventHandler): IHandle; - - on(name: "layerview-destroy", modifiers: string[], eventHandler: BaseDynamicLayerLayerviewDestroyEventHandler): IHandle; } interface BaseDynamicLayerConstructor { @@ -5072,11 +6488,7 @@ declare namespace __esri { on(name: "layerview-create", eventHandler: BaseElevationLayerLayerviewCreateEventHandler): IHandle; - on(name: "layerview-create", modifiers: string[], eventHandler: BaseElevationLayerLayerviewCreateEventHandler): IHandle; - on(name: "layerview-destroy", eventHandler: BaseElevationLayerLayerviewDestroyEventHandler): IHandle; - - on(name: "layerview-destroy", modifiers: string[], eventHandler: BaseElevationLayerLayerviewDestroyEventHandler): IHandle; } interface BaseElevationLayerConstructor { @@ -5243,11 +6655,7 @@ declare namespace __esri { on(name: "layerview-create", eventHandler: BaseTileLayerLayerviewCreateEventHandler): IHandle; - on(name: "layerview-create", modifiers: string[], eventHandler: BaseTileLayerLayerviewCreateEventHandler): IHandle; - on(name: "layerview-destroy", eventHandler: BaseTileLayerLayerviewDestroyEventHandler): IHandle; - - on(name: "layerview-destroy", modifiers: string[], eventHandler: BaseTileLayerLayerviewDestroyEventHandler): IHandle; } interface BaseTileLayerConstructor { @@ -5310,6 +6718,12 @@ declare namespace __esri { * [Read more...](https://developers.arcgis.com/javascript/latest/api-reference/esri-layers-CSVLayer.html#copyright) */ copyright: string; + /** + * The SQL where clause used to filter features on the client. Only the features that satisfy the definition expression are displayed in the [View](https://developers.arcgis.com/javascript/latest/api-reference/esri-views-View.html). Setting a definition expression is useful when the dataset is large and you don't want to bring all features to the client for analysis. Definition expressions may be set when a layer is constructed prior to it loading in the view or after it has been added to the map. If the definition expression is set after the layer has been added to the map, the view will automatically refresh itself to display the features that satisfy the new definition expression. + * + * [Read more...](https://developers.arcgis.com/javascript/latest/api-reference/esri-layers-CSVLayer.html#definitionExpression) + */ + definitionExpression: string; /** * The column delimiter. See the table below for possible values. * @@ -5430,6 +6844,15 @@ declare namespace __esri { * @default true */ screenSizePerspectiveEnabled: boolean; + /** + * The spatial reference of the layer. The default value is WGS84. This property can be set explicitly to project the longitude and latitude coordinates when the layer parses the CSV file. While not required, explicitly setting the spatial reference of the layer will improve the performance when projecting to a spatial reference other than the one used by the coordinates in the raw data. + * > **Known Limitations** The browser must support [WebAssembly](https://caniuse.com/#feat=wasm) if a spatial reference other than WGS84 or Web Mercator is specified. + * + * [Read more...](https://developers.arcgis.com/javascript/latest/api-reference/esri-layers-CSVLayer.html#spatialReference) + * + * @default SpatialReference.WGS84 + */ + spatialReference: SpatialReference; /** * The URL of the CSV file. * @@ -5437,14 +6860,83 @@ declare namespace __esri { */ url: string; + /** + * Executes a [Query](https://developers.arcgis.com/javascript/latest/api-reference/esri-tasks-support-Query.html) against the CSV data and returns the [Extent](https://developers.arcgis.com/javascript/latest/api-reference/esri-geometry-Extent.html) of features that satisfy the query. If no parameters are specified, then the extent and count of all features satisfying the layer's configuration/filters are returned. + * > **Capabilities and Limitations** The following lists capabilities with some limitations when executing a query: + * * Use [where](https://developers.arcgis.com/javascript/latest/api-reference/esri-tasks-support-Query.html#where) to query based on a SQL where clause. + * * You can perform spatial queries using the [geometry](https://developers.arcgis.com/javascript/latest/api-reference/esri-tasks-support-Query.html#geometry) and [spatialRelationship](https://developers.arcgis.com/javascript/latest/api-reference/esri-tasks-support-Query.html#spatialRelationship) parameters with the following limitations: + * * The `geometry` parameter only supports [Polygon](https://developers.arcgis.com/javascript/latest/api-reference/esri-geometry-Polygon.html) and [Extent](https://developers.arcgis.com/javascript/latest/api-reference/esri-geometry-Extent.html) geometries. + * * The only supported `spatialRelationship` is `intersects`. + * * The `distance` and `units` parameters are not supported. + * * You can query fields for statistics using onStatisticField. However, + * * SQL expressions cannot be used in `outFields` nor `onStatisticField` (in the `outStatistics` param). + * * The `orderByField` param is not supported. + * + * [Read more...](https://developers.arcgis.com/javascript/latest/api-reference/esri-layers-CSVLayer.html#queryExtent) + * + * @param params Specifies the attributes and spatial filter of the query. When no parameters are passed to this method, all features in the client are returned. To only return features visible in the view, set the `geometry` parameter in the query object to the view's extent. + * + */ + queryExtent(params?: Query | QueryProperties): IPromise; + /** + * Executes a [Query](https://developers.arcgis.com/javascript/latest/api-reference/esri-tasks-support-Query.html) against the CSV data and returns the number of features that satisfy the query. If no parameters are specified, then the total number of features satisfying the layer's configuration/filters is returned. + * > **Capabilities and Limitations** The following lists capabilities with some limitations when executing a query: + * * Use [where](https://developers.arcgis.com/javascript/latest/api-reference/esri-tasks-support-Query.html#where) to query based on a SQL where clause. + * * You can perform spatial queries using the [geometry](https://developers.arcgis.com/javascript/latest/api-reference/esri-tasks-support-Query.html#geometry) and [spatialRelationship](https://developers.arcgis.com/javascript/latest/api-reference/esri-tasks-support-Query.html#spatialRelationship) parameters with the following limitations: + * * The `geometry` parameter only supports [Polygon](https://developers.arcgis.com/javascript/latest/api-reference/esri-geometry-Polygon.html) and [Extent](https://developers.arcgis.com/javascript/latest/api-reference/esri-geometry-Extent.html) geometries. + * * The only supported `spatialRelationship` is `intersects`. + * * The `distance` and `units` parameters are not supported. + * * You can query fields for statistics using onStatisticField. However, + * * SQL expressions cannot be used in `outFields` nor `onStatisticField` (in the `outStatistics` param). + * * The `orderByField` param is not supported. + * + * [Read more...](https://developers.arcgis.com/javascript/latest/api-reference/esri-layers-CSVLayer.html#queryFeatureCount) + * + * @param params Specifies the attributes and spatial filter of the query. When no parameters are passed to this method, all features in the client are returned. To only return features visible in the view, set the `geometry` parameter in the query object to the view's extent. + * + */ + queryFeatureCount(params?: Query | QueryProperties): IPromise; + /** + * Executes a [Query](https://developers.arcgis.com/javascript/latest/api-reference/esri-tasks-support-Query.html) against the CSV data and returns a [FeatureSet](https://developers.arcgis.com/javascript/latest/api-reference/esri-tasks-support-FeatureSet.html), which can be accessed using the `.then()` method once the promise resolves. A [FeatureSet](https://developers.arcgis.com/javascript/latest/api-reference/esri-tasks-support-FeatureSet.html) contains an array of [Graphic](https://developers.arcgis.com/javascript/latest/api-reference/esri-Graphic.html) features, which can be added to the [view's graphics](https://developers.arcgis.com/javascript/latest/api-reference/esri-views-View.html#graphics). This array will not be populated if zero results are found. + * > **Capabilities and Limitations** The following lists capabilities with some limitations when executing a query: + * * Use [where](https://developers.arcgis.com/javascript/latest/api-reference/esri-tasks-support-Query.html#where) to query based on a SQL where clause. + * * You can perform spatial queries using the [geometry](https://developers.arcgis.com/javascript/latest/api-reference/esri-tasks-support-Query.html#geometry) and [spatialRelationship](https://developers.arcgis.com/javascript/latest/api-reference/esri-tasks-support-Query.html#spatialRelationship) parameters with the following limitations: + * * The `geometry` parameter only supports [Polygon](https://developers.arcgis.com/javascript/latest/api-reference/esri-geometry-Polygon.html) and [Extent](https://developers.arcgis.com/javascript/latest/api-reference/esri-geometry-Extent.html) geometries. + * * The only supported `spatialRelationship` is `intersects`. + * * The `distance` and `units` parameters are not supported. + * * You can query fields for statistics using onStatisticField. However, + * * SQL expressions cannot be used in `outFields` nor `onStatisticField` (in the `outStatistics` param). + * * The `orderByField` param is not supported. + * + * [Read more...](https://developers.arcgis.com/javascript/latest/api-reference/esri-layers-CSVLayer.html#queryFeatures) + * + * @param params Specifies the attributes and spatial filter of the query. When no parameters are passed to this method, all features in the client are returned. To only return features visible in the view, set the `geometry` parameter in the query object to the view's extent. + * + */ + queryFeatures(params?: Query | QueryProperties): IPromise; + /** + * Executes a [Query](https://developers.arcgis.com/javascript/latest/api-reference/esri-tasks-support-Query.html) against the CSV data and returns an array of Object IDs for features that satisfy the input query. If no parameters are specified, then the Object IDs of all features satisfying the layer's configuration/filters are returned. + * > **Capabilities and Limitations** The following lists capabilities with some limitations when executing a query: + * * Use [where](https://developers.arcgis.com/javascript/latest/api-reference/esri-tasks-support-Query.html#where) to query based on a SQL where clause. + * * You can perform spatial queries using the [geometry](https://developers.arcgis.com/javascript/latest/api-reference/esri-tasks-support-Query.html#geometry) and [spatialRelationship](https://developers.arcgis.com/javascript/latest/api-reference/esri-tasks-support-Query.html#spatialRelationship) parameters with the following limitations: + * * The `geometry` parameter only supports [Polygon](https://developers.arcgis.com/javascript/latest/api-reference/esri-geometry-Polygon.html) and [Extent](https://developers.arcgis.com/javascript/latest/api-reference/esri-geometry-Extent.html) geometries. + * * The only supported `spatialRelationship` is `intersects`. + * * The `distance` and `units` parameters are not supported. + * * You can query fields for statistics using onStatisticField. However, + * * SQL expressions cannot be used in `outFields` nor `onStatisticField` (in the `outStatistics` param). + * * The `orderByField` param is not supported. + * + * [Read more...](https://developers.arcgis.com/javascript/latest/api-reference/esri-layers-CSVLayer.html#queryObjectIds) + * + * @param params Specifies the attributes and spatial filter of the query. When no parameters are passed to this method, all features in the client are returned. To only return features visible in the view, set the `geometry` parameter in the query object to the view's extent. + * + */ + queryObjectIds(params?: Query | QueryProperties): IPromise; + on(name: "layerview-create", eventHandler: CSVLayerLayerviewCreateEventHandler): IHandle; - on(name: "layerview-create", modifiers: string[], eventHandler: CSVLayerLayerviewCreateEventHandler): IHandle; - on(name: "layerview-destroy", eventHandler: CSVLayerLayerviewDestroyEventHandler): IHandle; - - on(name: "layerview-destroy", modifiers: string[], eventHandler: CSVLayerLayerviewDestroyEventHandler): IHandle; } interface CSVLayerConstructor { @@ -5466,6 +6958,12 @@ declare namespace __esri { * [Read more...](https://developers.arcgis.com/javascript/latest/api-reference/esri-layers-CSVLayer.html#copyright) */ copyright?: string; + /** + * The SQL where clause used to filter features on the client. Only the features that satisfy the definition expression are displayed in the [View](https://developers.arcgis.com/javascript/latest/api-reference/esri-views-View.html). Setting a definition expression is useful when the dataset is large and you don't want to bring all features to the client for analysis. Definition expressions may be set when a layer is constructed prior to it loading in the view or after it has been added to the map. If the definition expression is set after the layer has been added to the map, the view will automatically refresh itself to display the features that satisfy the new definition expression. + * + * [Read more...](https://developers.arcgis.com/javascript/latest/api-reference/esri-layers-CSVLayer.html#definitionExpression) + */ + definitionExpression?: string; /** * The column delimiter. See the table below for possible values. * @@ -5586,6 +7084,15 @@ declare namespace __esri { * @default true */ screenSizePerspectiveEnabled?: boolean; + /** + * The spatial reference of the layer. The default value is WGS84. This property can be set explicitly to project the longitude and latitude coordinates when the layer parses the CSV file. While not required, explicitly setting the spatial reference of the layer will improve the performance when projecting to a spatial reference other than the one used by the coordinates in the raw data. + * > **Known Limitations** The browser must support [WebAssembly](https://caniuse.com/#feat=wasm) if a spatial reference other than WGS84 or Web Mercator is specified. + * + * [Read more...](https://developers.arcgis.com/javascript/latest/api-reference/esri-layers-CSVLayer.html#spatialReference) + * + * @default SpatialReference.WGS84 + */ + spatialReference?: SpatialReferenceProperties; /** * The URL of the CSV file. * @@ -5601,10 +7108,11 @@ declare namespace __esri { * * Mode | Description * ------|------------ - * on-the-ground | Graphics are draped on the terrain surface. This is the default value for [Point](https://developers.arcgis.com/javascript/latest/api-reference/esri-geometry-Point.html) - * geometries rendered with [ObjectSymbol3DLayers](https://developers.arcgis.com/javascript/latest/api-reference/esri-symbols-ObjectSymbol3DLayer.html). - * relative-to-ground | Graphics are placed at an elevation relative to the terrain surface. The graphic's elevation is determined - * by summing up the terrain elevation and the result of `featureExpressionInfo` (if defined). This is the default value for [Point](https://developers.arcgis.com/javascript/latest/api-reference/esri-geometry-Point.html) geometries rendered with [IconSymbol3DLayers](https://developers.arcgis.com/javascript/latest/api-reference/esri-symbols-IconSymbol3DLayer.html). absolute-height | Graphics are placed at an absolute height above sea level. This height is determined by the result of `featureExpressionInfo` (if defined). This mode doesn't take the elevation of the terrain into account. relative-to-scene | Graphics are aligned to buildings and other objects part of 3D Object [SceneLayers](https://developers.arcgis.com/javascript/latest/api-reference/esri-layers-SceneLayer.html) or [IntegratedMeshLayers](https://developers.arcgis.com/javascript/latest/api-reference/esri-layers-IntegratedMeshLayer.html), depending on which has higher elevation. If the graphic is not directly above a building or any other feature, it is aligned to the terrain surface elevation. If defined, the result of `featureExpressionInfo` is added to the 3D Object/terrain surface elevation. + * on-the-ground | Graphics are draped on the terrain surface. This is the default value for [Point](https://developers.arcgis.com/javascript/latest/api-reference/esri-geometry-Point.html) geometries rendered with [ObjectSymbol3DLayers](https://developers.arcgis.com/javascript/latest/api-reference/esri-symbols-ObjectSymbol3DLayer.html). + * relative-to-ground | Graphics are placed at an elevation relative to the terrain surface. The graphic's elevation is determined by summing up the terrain elevation and the result of `featureExpressionInfo` (if defined). This is the default value for [Point](https://developers.arcgis.com/javascript/latest/api-reference/esri-geometry-Point.html) geometries rendered with [IconSymbol3DLayers](https://developers.arcgis.com/javascript/latest/api-reference/esri-symbols-IconSymbol3DLayer.html). + * absolute-height | Graphics are placed at an absolute height above sea level. This height is determined by the result of `featureExpressionInfo` (if defined). This mode doesn't take the elevation of the terrain into account. + * relative-to-scene | Graphics are aligned to buildings and other objects part of 3D Object [SceneLayers](https://developers.arcgis.com/javascript/latest/api-reference/esri-layers-SceneLayer.html) or [IntegratedMeshLayers](https://developers.arcgis.com/javascript/latest/api-reference/esri-layers-IntegratedMeshLayer.html), depending on which has higher elevation. If the graphic is not directly above a building or any other feature, it is aligned to the terrain surface elevation. If defined, the result of `featureExpressionInfo` is added to the 3D Object/terrain surface elevation. + * * * [Read more...](https://developers.arcgis.com/javascript/latest/api-reference/esri-layers-CSVLayer.html#elevationInfo) */ @@ -5642,7 +7150,7 @@ declare namespace __esri { export interface CSVLayerFeatureReduction extends Object { /** - * Type of the decluttering method. The only supported type at the moment is `"selection"`. In this method, some of the overlapping features are hidden such that none of the remaining features intersect on screen. Label deconfliction also respects this option and hides labels that would overlap with the features of this layer. + * Type of the decluttering method. The only supported type at the moment is `selection`. In this method, some of the overlapping features are hidden such that none of the remaining features intersect on screen. Label deconfliction also respects this option and hides labels that would overlap with the features of this layer. * * [Read more...](https://developers.arcgis.com/javascript/latest/api-reference/esri-layers-CSVLayer.html#featureReduction) */ @@ -5687,7 +7195,7 @@ declare namespace __esri { * @param height The height of the view in pixels. * @param options The parameter options is an object with the following properties. * @param options.allowImageDataAccess Indicates if the access to the pixels of the image is required. - * @param options.rotation The rotation in degrees of the exported image. Available since ArcGIS for Server 10.3. + * @param options.rotation The rotation in degrees of the exported image. Available since ArcGIS Server 10.3. * @param options.pixelRatio The ratio of the resolution in physical pixels of the image to the resolution it will be displayed at. * */ @@ -5702,7 +7210,7 @@ declare namespace __esri { * @param height The height of the view in pixels. * @param options The parameter options is an object with the following properties. * @param options.pixelRatio The ratio of the resolution in physical pixels of the image to the resolution it will be displayed at. - * @param options.rotation The rotation in degrees of the exported image. Available since ArcGIS for Server 10.3. + * @param options.rotation The rotation in degrees of the exported image. Available since ArcGIS Server 10.3. * */ getImageUrl(extent: Extent, width: number, height: number, options?: DynamicLayerGetImageUrlOptions): IPromise | string; @@ -5740,7 +7248,7 @@ declare namespace __esri { */ allowImageDataAccess?: boolean; /** - * The rotation in degrees of the exported image. Available since ArcGIS for Server 10.3. + * The rotation in degrees of the exported image. Available since ArcGIS Server 10.3. * * [Read more...](https://developers.arcgis.com/javascript/latest/api-reference/esri-layers-DynamicLayer.html#fetchImage) */ @@ -5762,7 +7270,7 @@ declare namespace __esri { */ pixelRatio?: number; /** - * The rotation in degrees of the exported image. Available since ArcGIS for Server 10.3. + * The rotation in degrees of the exported image. Available since ArcGIS Server 10.3. * * [Read more...](https://developers.arcgis.com/javascript/latest/api-reference/esri-layers-DynamicLayer.html#getImageUrl) */ @@ -5777,6 +7285,18 @@ declare namespace __esri { */ url: string; + /** + * Creates an elevation sampler for the given [Extent](https://developers.arcgis.com/javascript/latest/api-reference/esri-geometry-Extent.html) by querying the service layer for elevation data and caching it so values may be sampled quickly afterwards. The resolution of the cached data can be set using the `demResolution` option. In many cases, `auto` demResolution can be used to get high quality elevation samples without the need to know exactly where the data in the service is located. This is particularly useful for services which combine elevation data from many sources (such as the world elevation service). If more control, or higher quality samples are required, use either `finest-contiguous` or a fixed `{number}` resolution. + * + * [Read more...](https://developers.arcgis.com/javascript/latest/api-reference/esri-layers-ElevationLayer.html#createElevationSampler) + * + * @param extent The extent for which to create the sampler. + * @param options Additional query options. See the table below. + * @param options.demResolution Controls the horizontal resolution (cell size) in meters from which elevation data is sampled (defaults to `auto`). See [ElevationLayer](https://developers.arcgis.com/javascript/latest/api-reference/esri-layers-ElevationLayer.html#queryElevation) for more details. + * @param options.noDataValue The value to use when there is no data available. + * + */ + createElevationSampler(extent: Extent, options?: ElevationLayerCreateElevationSamplerOptions): IPromise; /** * Requests a tile from the service and decodes the data into a linear array of elevation values. The returned promise resolves with a plain object describing the obtained elevation data for the tile. The object has the following properties: * @@ -5809,7 +7329,7 @@ declare namespace __esri { * * demResolution | Description * -----------------------|------------- - * `auto` | Automatically chooses an appropriate resolution for each coordinate of the input geometry. The current implementation will try to use the finest available resolution given that the total required number of tile requests does not exceed a certain maximum amount (currently 100). Note that this may result in values being sampled from different resolutions. + * `auto` | Automatically chooses an appropriate resolution for each coordinate of the input geometry. The current implementation will try to use the finest available resolution given that the total required number of tile requests does not exceed a certain maximum amount (currently 20). Note that this may result in values being sampled from different resolutions. * `finest-contiguous` | Sample elevation from the finest available resolution (cell size) across the entire geometry. * `{number}` | Sample elevation from the resolution closest to the specified resolution (in meters). * @param options.returnSampleInfo Indicates whether to return additional sample information for each coordinate. @@ -5821,11 +7341,7 @@ declare namespace __esri { on(name: "layerview-create", eventHandler: ElevationLayerLayerviewCreateEventHandler): IHandle; - on(name: "layerview-create", modifiers: string[], eventHandler: ElevationLayerLayerviewCreateEventHandler): IHandle; - on(name: "layerview-destroy", eventHandler: ElevationLayerLayerviewDestroyEventHandler): IHandle; - - on(name: "layerview-destroy", modifiers: string[], eventHandler: ElevationLayerLayerviewDestroyEventHandler): IHandle; } interface ElevationLayerConstructor { @@ -5852,13 +7368,33 @@ declare namespace __esri { } + export interface ElevationLayerCreateElevationSamplerOptions extends Object { + /** + * Controls the horizontal resolution (cell size) in meters from which elevation data is sampled (defaults to `auto`). See [ElevationLayer](https://developers.arcgis.com/javascript/latest/api-reference/esri-layers-ElevationLayer.html#queryElevation) for more details. + * + * [Read more...](https://developers.arcgis.com/javascript/latest/api-reference/esri-layers-ElevationLayer.html#createElevationSampler) + * + * @default auto + */ + demResolution?: number | string; + /** + * The value to use when there is no data available. + * + * [Read more...](https://developers.arcgis.com/javascript/latest/api-reference/esri-layers-ElevationLayer.html#createElevationSampler) + * + * @default 0 + */ + noDataValue?: number; + } + + export interface ElevationLayerQueryElevationOptions extends Object { /** * Controls the horizontal resolution (cell size) in meters from which elevation data is sampled (defaults to `auto`). See the table below for more details on the different settings. * * demResolution | Description * -----------------------|------------- - * `auto` | Automatically chooses an appropriate resolution for each coordinate of the input geometry. The current implementation will try to use the finest available resolution given that the total required number of tile requests does not exceed a certain maximum amount (currently 100). Note that this may result in values being sampled from different resolutions. + * `auto` | Automatically chooses an appropriate resolution for each coordinate of the input geometry. The current implementation will try to use the finest available resolution given that the total required number of tile requests does not exceed a certain maximum amount (currently 20). Note that this may result in values being sampled from different resolutions. * `finest-contiguous` | Sample elevation from the finest available resolution (cell size) across the entire geometry. * `{number}` | Sample elevation from the resolution closest to the specified resolution (in meters). * @@ -5962,6 +7498,12 @@ declare namespace __esri { * [Read more...](https://developers.arcgis.com/javascript/latest/api-reference/esri-layers-FeatureLayer.html#displayField) */ displayField: string; + /** + * An object that allows you to create a dynamic layer with data either from map service sublayers or data from a registered workspace. See [DynamicMapLayer](https://developers.arcgis.com/javascript/latest/api-reference/esri-layers-support-Sublayer.html#DynamicMapLayer) for creating dynamic layers from map service layers for on the fly rendering, labeling, and filtering (definition expressions). To create dynamic layers from other sources in registered workspaces such as tables and table joins, see [DynamicDataLayer](https://developers.arcgis.com/javascript/latest/api-reference/esri-layers-support-Sublayer.html#DynamicDataLayer). If you already have a [Sublayer](https://developers.arcgis.com/javascript/latest/api-reference/esri-layers-support-Sublayer.html) instance, you can call the [createFeatureLayer()](https://developers.arcgis.com/javascript/latest/api-reference/esri-layers-support-Sublayer.html#createFeatureLayer) method on the Sublayer to construct the layer for you. This only applies to map services with [dynamic layers](https://enterprise.arcgis.com/en/server/latest/publish-services/linux/about-dynamic-layers.htm) enabled. Therefore, the [url](https://developers.arcgis.com/javascript/latest/api-reference/esri-layers-FeatureLayer.html#url) of the FeatureLayer instance must point to a map service url ending with `/dynamicLayer`. + * + * [Read more...](https://developers.arcgis.com/javascript/latest/api-reference/esri-layers-FeatureLayer.html#dynamicDataSource) + */ + dynamicDataSource: DynamicMapLayer | DynamicDataLayer; /** * Specifies how graphics are placed on the vertical axis (z). This property may only be used in a [SceneView](https://developers.arcgis.com/javascript/latest/api-reference/esri-views-SceneView.html). See the [ElevationInfo sample](https://developers.arcgis.com/javascript/latest/sample-code/scene-elevationinfo/index.html) for an example of how this property may be used. * @@ -5987,7 +7529,7 @@ declare namespace __esri { */ readonly gdbVersion: string; /** - * The geometry type of features in the layer. All features must be of the same type. This property is read-only when the layer is created from a [url](https://developers.arcgis.com/javascript/latest/api-reference/esri-layers-FeatureLayer.html#url). However, when creating a FeatureLayer from client-side graphics, this property must be specified in the layer's constructor along with the [source](https://developers.arcgis.com/javascript/latest/api-reference/esri-layers-FeatureLayer.html#source), [spatialReference](https://developers.arcgis.com/javascript/latest/api-reference/esri-layers-FeatureLayer.html#spatialReference), [fields](https://developers.arcgis.com/javascript/latest/api-reference/esri-layers-FeatureLayer.html#fields), and [objectIdField](https://developers.arcgis.com/javascript/latest/api-reference/esri-layers-FeatureLayer.html#objectIdField) properties. **Possible Values:** point | mulitpoint | polyline | polygon | extent + * The geometry type of features in the layer. All features must be of the same type. This property is read-only when the layer is created from a [url](https://developers.arcgis.com/javascript/latest/api-reference/esri-layers-FeatureLayer.html#url). However, when creating a FeatureLayer from client-side graphics, this property must be specified in the layer's constructor along with the [source](https://developers.arcgis.com/javascript/latest/api-reference/esri-layers-FeatureLayer.html#source), [spatialReference](https://developers.arcgis.com/javascript/latest/api-reference/esri-layers-FeatureLayer.html#spatialReference), [fields](https://developers.arcgis.com/javascript/latest/api-reference/esri-layers-FeatureLayer.html#fields), and [objectIdField](https://developers.arcgis.com/javascript/latest/api-reference/esri-layers-FeatureLayer.html#objectIdField) properties. **Possible Values:** point | mulitpoint | polyline | polygon | extent | mesh * * [Read more...](https://developers.arcgis.com/javascript/latest/api-reference/esri-layers-FeatureLayer.html#geometryType) */ @@ -6016,6 +7558,12 @@ declare namespace __esri { * @default false */ readonly hasZ: boolean; + /** + * The historic moment to query. If historicMoment is not specified, the query will apply to the current features. + * + * [Read more...](https://developers.arcgis.com/javascript/latest/api-reference/esri-layers-FeatureLayer.html#historicMoment) + */ + historicMoment: Date; /** * The label definition for this layer, specified as an array of [LabelClass](https://developers.arcgis.com/javascript/latest/api-reference/esri-layers-support-LabelClass.html). Use this property to specify labeling properties for the layer such as label expression, placement, and size. For labels to display in the view, the [labelsVisible](https://developers.arcgis.com/javascript/latest/api-reference/esri-layers-FeatureLayer.html#labelsVisible) property of this layer must be set to `true`. * > **Known Limitations** There is no support for labeling in 2D. Labeling is only supported in 3D [SceneViews](https://developers.arcgis.com/javascript/latest/api-reference/esri-views-SceneView.html). Each graphic can have only one label. Multiple [Label classes](esri-layers-support-LabelClass.html) with different [where](esri-layers-support-LabelClass.html#where) clauses can be used to have different label styles on different features that belong to the same layer (for example blue labels for lakes and green labels for parks). @@ -6137,7 +7685,7 @@ declare namespace __esri { * * [Read more...](https://developers.arcgis.com/javascript/latest/api-reference/esri-layers-FeatureLayer.html#typeIdField) */ - typeIdField: string; + readonly typeIdField: string; /** * An array of subtypes defined in the feature service exposed by ArcGIS REST API. Each item includes information about the type, such as the type ID, name, and definition expression. * @@ -6145,7 +7693,7 @@ declare namespace __esri { */ types: FeatureType[]; /** - * The URL of the REST endpoint of the layer or service. The URL may either point to a resource on ArcGIS for Server, Portal for ArcGIS, or ArcGIS Online. If the url points directly to a service, then the layer must be specified in the [layerId](https://developers.arcgis.com/javascript/latest/api-reference/esri-layers-FeatureLayer.html#layerId) property. If no [layerId](https://developers.arcgis.com/javascript/latest/api-reference/esri-layers-FeatureLayer.html#layerId) is given, then the first layer in the service will be loaded. + * The URL of the REST endpoint of the layer or service. The URL may either point to a resource on ArcGIS Enterprise or ArcGIS Online. If the url points directly to a service, then the layer must be specified in the [layerId](https://developers.arcgis.com/javascript/latest/api-reference/esri-layers-FeatureLayer.html#layerId) property. If no [layerId](https://developers.arcgis.com/javascript/latest/api-reference/esri-layers-FeatureLayer.html#layerId) is given, then the first layer in the service will be loaded. * * [Read more...](https://developers.arcgis.com/javascript/latest/api-reference/esri-layers-FeatureLayer.html#url) */ @@ -6158,7 +7706,7 @@ declare namespace __esri { readonly version: number; /** - * Applies edits to features in a feature layer. New features can be created and existing features can be updated or deleted. Feature geometries and/or attributes may be modified. Only applicable to layers in a [feature service](http://resources.arcgis.com/en/help/arcgis-rest-api/index.html#/Feature_Service/02r3000000z2000000/). + * Applies edits to features in a feature layer. New features can be created and existing features can be updated or deleted. Feature geometries and/or attributes may be modified. Only applicable to layers in a [feature service](https://developers.arcgis.com/rest/services-reference/feature-service.htm). * * [Read more...](https://developers.arcgis.com/javascript/latest/api-reference/esri-layers-FeatureLayer.html#applyEdits) * @@ -6177,6 +7725,15 @@ declare namespace __esri { * */ createQuery(): Query; + /** + * Returns a [FeatureType](https://developers.arcgis.com/javascript/latest/api-reference/esri-layers-support-FeatureType.html) describing the feature's type. This is applicable if the layer containing the feature has a [typeIdField](https://developers.arcgis.com/javascript/latest/api-reference/esri-layers-FeatureLayer.html#typeIdField). + * + * [Read more...](https://developers.arcgis.com/javascript/latest/api-reference/esri-layers-FeatureLayer.html#getFeatureType) + * + * @param feature A feature from this layer. + * + */ + getFeatureType(feature: Graphic): FeatureType; /** * Returns the [Domain](https://developers.arcgis.com/javascript/latest/api-reference/esri-layers-support-Domain.html) associated with the given field name. The domain can be either a [CodedValueDomain](https://developers.arcgis.com/javascript/latest/api-reference/esri-layers-support-CodedValueDomain.html) or [RangeDomain](https://developers.arcgis.com/javascript/latest/api-reference/esri-layers-support-RangeDomain.html). * @@ -6198,6 +7755,15 @@ declare namespace __esri { * */ queryExtent(params?: Query | QueryProperties): IPromise; + /** + * Query information about attachments associated with a specified feature. + * + * [Read more...](https://developers.arcgis.com/javascript/latest/api-reference/esri-layers-FeatureLayer.html#queryFeatureAttachments) + * + * @param feature The feature to query. + * + */ + queryFeatureAttachments(feature: Graphic): IPromise; /** * Executes a [Query](https://developers.arcgis.com/javascript/latest/api-reference/esri-tasks-support-Query.html) against the feature service and returns the number of features that satisfy the query. If no parameters are specified, then the total number of features satisfying the layer's configuration/filters is returned. * > To query for the count of features/graphics available to or visible in the [View](https://developers.arcgis.com/javascript/latest/api-reference/esri-views-View.html) on the client rather than making a server-side query, you must use the [FeatureLayerView.queryFeatureCount()](https://developers.arcgis.com/javascript/latest/api-reference/esri-views-layers-FeatureLayerView.html#queryFeatureCount) method. @@ -6232,16 +7798,12 @@ declare namespace __esri { on(name: "layerview-create", eventHandler: FeatureLayerLayerviewCreateEventHandler): IHandle; - on(name: "layerview-create", modifiers: string[], eventHandler: FeatureLayerLayerviewCreateEventHandler): IHandle; - on(name: "layerview-destroy", eventHandler: FeatureLayerLayerviewDestroyEventHandler): IHandle; - - on(name: "layerview-destroy", modifiers: string[], eventHandler: FeatureLayerLayerviewDestroyEventHandler): IHandle; } interface FeatureLayerConstructor { /** - * A FeatureLayer is a single layer that can be created from a [Map Service](http://server.arcgis.com/en/server/latest/publish-services/windows/what-is-a-map-service.htm) or [Feature Service](http://server.arcgis.com/en/server/latest/publish-services/windows/what-is-a-feature-service-.htm); ArcGIS Online or ArcGIS for Portal items; or from an array of client-side graphics. It is composed of discrete features, each of which has a [Geometry](https://developers.arcgis.com/javascript/latest/api-reference/esri-geometry-Geometry.html) that allows it to be rendered in either a 2D [MapView](https://developers.arcgis.com/javascript/latest/api-reference/esri-views-MapView.html) or 3D [SceneView](https://developers.arcgis.com/javascript/latest/api-reference/esri-views-SceneView.html) as a [graphic](https://developers.arcgis.com/javascript/latest/api-reference/esri-Graphic.html) with spatial context. Features also contain data [attributes](https://developers.arcgis.com/javascript/latest/api-reference/esri-Graphic.html#attributes) that provide additional information about the real-world feature it represents; attributes may be viewed in [popup](https://developers.arcgis.com/javascript/latest/api-reference/esri-layers-FeatureLayer.html#popupTemplate) windows and used for [rendering](https://developers.arcgis.com/javascript/latest/api-reference/esri-renderers-Renderer.html) the layer. FeatureLayers may be [queried](https://developers.arcgis.com/javascript/latest/api-reference/esri-layers-FeatureLayer.html#queryFeatures), [analyzed](https://developers.arcgis.com/javascript/latest/api-reference/esri-geometry-geometryEngine.html), and [rendered](https://developers.arcgis.com/javascript/latest/api-reference/esri-layers-FeatureLayer.html#renderer) to visualize data in a spatial context. + * A FeatureLayer is a single layer that can be created from a [Map Service](http://server.arcgis.com/en/server/latest/publish-services/windows/what-is-a-map-service.htm) or [Feature Service](http://server.arcgis.com/en/server/latest/publish-services/windows/what-is-a-feature-service-.htm); ArcGIS Online or ArcGIS Enterprise portal items; or from an array of client-side graphics. It is composed of discrete features, each of which has a [Geometry](https://developers.arcgis.com/javascript/latest/api-reference/esri-geometry-Geometry.html) that allows it to be rendered in either a 2D [MapView](https://developers.arcgis.com/javascript/latest/api-reference/esri-views-MapView.html) or 3D [SceneView](https://developers.arcgis.com/javascript/latest/api-reference/esri-views-SceneView.html) as a [graphic](https://developers.arcgis.com/javascript/latest/api-reference/esri-Graphic.html) with spatial context. Features also contain data [attributes](https://developers.arcgis.com/javascript/latest/api-reference/esri-Graphic.html#attributes) that provide additional information about the real-world feature it represents; attributes may be viewed in [popup](https://developers.arcgis.com/javascript/latest/api-reference/esri-layers-FeatureLayer.html#popupTemplate) windows and used for [rendering](https://developers.arcgis.com/javascript/latest/api-reference/esri-renderers-Renderer.html) the layer. FeatureLayers may be [queried](https://developers.arcgis.com/javascript/latest/api-reference/esri-layers-FeatureLayer.html#queryFeatures), [analyzed](https://developers.arcgis.com/javascript/latest/api-reference/esri-geometry-geometryEngine.html), and [rendered](https://developers.arcgis.com/javascript/latest/api-reference/esri-layers-FeatureLayer.html#renderer) to visualize data in a spatial context. * * [Read more...](https://developers.arcgis.com/javascript/latest/api-reference/esri-layers-FeatureLayer.html) */ @@ -6273,6 +7835,12 @@ declare namespace __esri { * [Read more...](https://developers.arcgis.com/javascript/latest/api-reference/esri-layers-FeatureLayer.html#displayField) */ displayField?: string; + /** + * An object that allows you to create a dynamic layer with data either from map service sublayers or data from a registered workspace. See [DynamicMapLayer](https://developers.arcgis.com/javascript/latest/api-reference/esri-layers-support-Sublayer.html#DynamicMapLayer) for creating dynamic layers from map service layers for on the fly rendering, labeling, and filtering (definition expressions). To create dynamic layers from other sources in registered workspaces such as tables and table joins, see [DynamicDataLayer](https://developers.arcgis.com/javascript/latest/api-reference/esri-layers-support-Sublayer.html#DynamicDataLayer). If you already have a [Sublayer](https://developers.arcgis.com/javascript/latest/api-reference/esri-layers-support-Sublayer.html) instance, you can call the [createFeatureLayer()](https://developers.arcgis.com/javascript/latest/api-reference/esri-layers-support-Sublayer.html#createFeatureLayer) method on the Sublayer to construct the layer for you. This only applies to map services with [dynamic layers](https://enterprise.arcgis.com/en/server/latest/publish-services/linux/about-dynamic-layers.htm) enabled. Therefore, the [url](https://developers.arcgis.com/javascript/latest/api-reference/esri-layers-FeatureLayer.html#url) of the FeatureLayer instance must point to a map service url ending with `/dynamicLayer`. + * + * [Read more...](https://developers.arcgis.com/javascript/latest/api-reference/esri-layers-FeatureLayer.html#dynamicDataSource) + */ + dynamicDataSource?: DynamicMapLayer | DynamicDataLayer; /** * Specifies how graphics are placed on the vertical axis (z). This property may only be used in a [SceneView](https://developers.arcgis.com/javascript/latest/api-reference/esri-views-SceneView.html). See the [ElevationInfo sample](https://developers.arcgis.com/javascript/latest/sample-code/scene-elevationinfo/index.html) for an example of how this property may be used. * @@ -6292,11 +7860,17 @@ declare namespace __esri { */ fields?: FieldProperties[]; /** - * The geometry type of features in the layer. All features must be of the same type. This property is read-only when the layer is created from a [url](https://developers.arcgis.com/javascript/latest/api-reference/esri-layers-FeatureLayer.html#url). However, when creating a FeatureLayer from client-side graphics, this property must be specified in the layer's constructor along with the [source](https://developers.arcgis.com/javascript/latest/api-reference/esri-layers-FeatureLayer.html#source), [spatialReference](https://developers.arcgis.com/javascript/latest/api-reference/esri-layers-FeatureLayer.html#spatialReference), [fields](https://developers.arcgis.com/javascript/latest/api-reference/esri-layers-FeatureLayer.html#fields), and [objectIdField](https://developers.arcgis.com/javascript/latest/api-reference/esri-layers-FeatureLayer.html#objectIdField) properties. **Possible Values:** point | mulitpoint | polyline | polygon | extent + * The geometry type of features in the layer. All features must be of the same type. This property is read-only when the layer is created from a [url](https://developers.arcgis.com/javascript/latest/api-reference/esri-layers-FeatureLayer.html#url). However, when creating a FeatureLayer from client-side graphics, this property must be specified in the layer's constructor along with the [source](https://developers.arcgis.com/javascript/latest/api-reference/esri-layers-FeatureLayer.html#source), [spatialReference](https://developers.arcgis.com/javascript/latest/api-reference/esri-layers-FeatureLayer.html#spatialReference), [fields](https://developers.arcgis.com/javascript/latest/api-reference/esri-layers-FeatureLayer.html#fields), and [objectIdField](https://developers.arcgis.com/javascript/latest/api-reference/esri-layers-FeatureLayer.html#objectIdField) properties. **Possible Values:** point | mulitpoint | polyline | polygon | extent | mesh * * [Read more...](https://developers.arcgis.com/javascript/latest/api-reference/esri-layers-FeatureLayer.html#geometryType) */ geometryType?: string; + /** + * The historic moment to query. If historicMoment is not specified, the query will apply to the current features. + * + * [Read more...](https://developers.arcgis.com/javascript/latest/api-reference/esri-layers-FeatureLayer.html#historicMoment) + */ + historicMoment?: DateProperties; /** * The label definition for this layer, specified as an array of [LabelClass](https://developers.arcgis.com/javascript/latest/api-reference/esri-layers-support-LabelClass.html). Use this property to specify labeling properties for the layer such as label expression, placement, and size. For labels to display in the view, the [labelsVisible](https://developers.arcgis.com/javascript/latest/api-reference/esri-layers-FeatureLayer.html#labelsVisible) property of this layer must be set to `true`. * > **Known Limitations** There is no support for labeling in 2D. Labeling is only supported in 3D [SceneViews](https://developers.arcgis.com/javascript/latest/api-reference/esri-views-SceneView.html). Each graphic can have only one label. Multiple [Label classes](esri-layers-support-LabelClass.html) with different [where](esri-layers-support-LabelClass.html#where) clauses can be used to have different label styles on different features that belong to the same layer (for example blue labels for lakes and green labels for parks). @@ -6407,12 +7981,6 @@ declare namespace __esri { * [Read more...](https://developers.arcgis.com/javascript/latest/api-reference/esri-layers-FeatureLayer.html#templates) */ templates?: FeatureTemplateProperties[]; - /** - * The name of the field holding the type ID or subtypes for the features. See [ArcGIS Pro subtypes document](https://pro.arcgis.com/en/pro-app/help/data/geodatabases/overview/an-overview-of-subtypes.htm). - * - * [Read more...](https://developers.arcgis.com/javascript/latest/api-reference/esri-layers-FeatureLayer.html#typeIdField) - */ - typeIdField?: string; /** * An array of subtypes defined in the feature service exposed by ArcGIS REST API. Each item includes information about the type, such as the type ID, name, and definition expression. * @@ -6420,13 +7988,59 @@ declare namespace __esri { */ types?: FeatureTypeProperties[]; /** - * The URL of the REST endpoint of the layer or service. The URL may either point to a resource on ArcGIS for Server, Portal for ArcGIS, or ArcGIS Online. If the url points directly to a service, then the layer must be specified in the [layerId](https://developers.arcgis.com/javascript/latest/api-reference/esri-layers-FeatureLayer.html#layerId) property. If no [layerId](https://developers.arcgis.com/javascript/latest/api-reference/esri-layers-FeatureLayer.html#layerId) is given, then the first layer in the service will be loaded. + * The URL of the REST endpoint of the layer or service. The URL may either point to a resource on ArcGIS Enterprise or ArcGIS Online. If the url points directly to a service, then the layer must be specified in the [layerId](https://developers.arcgis.com/javascript/latest/api-reference/esri-layers-FeatureLayer.html#layerId) property. If no [layerId](https://developers.arcgis.com/javascript/latest/api-reference/esri-layers-FeatureLayer.html#layerId) is given, then the first layer in the service will be loaded. * * [Read more...](https://developers.arcgis.com/javascript/latest/api-reference/esri-layers-FeatureLayer.html#url) */ url?: string; } + + export interface AttachmentInfo extends Object { + /** + * The content type of the attachment. For example, `image/jpeg`. + * + * [Read more...](https://developers.arcgis.com/javascript/latest/api-reference/esri-layers-FeatureLayer.html#AttachmentInfo) + */ + contentType: string; + /** + * The identifier for the attachment. + * + * [Read more...](https://developers.arcgis.com/javascript/latest/api-reference/esri-layers-FeatureLayer.html#AttachmentInfo) + */ + id: number; + /** + * Keywords for the attachment. + * + * [Read more...](https://developers.arcgis.com/javascript/latest/api-reference/esri-layers-FeatureLayer.html#AttachmentInfo) + */ + keywords: string; + /** + * The name of the attachment. + * + * [Read more...](https://developers.arcgis.com/javascript/latest/api-reference/esri-layers-FeatureLayer.html#AttachmentInfo) + */ + name: string; + /** + * The parent object id of the attachment. + * + * [Read more...](https://developers.arcgis.com/javascript/latest/api-reference/esri-layers-FeatureLayer.html#AttachmentInfo) + */ + parentObjectId: number; + /** + * The size of the attachment. + * + * [Read more...](https://developers.arcgis.com/javascript/latest/api-reference/esri-layers-FeatureLayer.html#AttachmentInfo) + */ + size: number; + /** + * The URL of the attachment. + * + * [Read more...](https://developers.arcgis.com/javascript/latest/api-reference/esri-layers-FeatureLayer.html#AttachmentInfo) + */ + url: string; + } + /** * FeatureEditResult represents the result of adding, updating or deleting a feature. * @@ -6576,7 +8190,7 @@ declare namespace __esri { */ supportsUpdateWithoutM: boolean; /** - * Indicates if the layer supports uploading attachments by [UploadId](http://resources.arcgis.com/en/help/arcgis-rest-api/index.html#/Item/02r3000000vq000000/). + * Indicates if the layer supports uploading attachments by [UploadId](https://developers.arcgis.com/rest/services-reference/item.htm). * * [Read more...](https://developers.arcgis.com/javascript/latest/api-reference/esri-layers-FeatureLayer.html#capabilities) */ @@ -6610,7 +8224,7 @@ declare namespace __esri { */ supportsEditing: boolean; /** - * Indicates if values of one or more field values in the layer can be updated. See the [Calculate REST operation](http://resources.arcgis.com/en/help/arcgis-rest-api/index.html#/Calculate_Feature_Service_Layer/02r30000029n000000/) document for more information. + * Indicates if values of one or more field values in the layer can be updated. See the [Calculate REST operation](https://developers.arcgis.com/rest/services-reference/calculate-feature-service-layer-.htm) document for more information. * * [Read more...](https://developers.arcgis.com/javascript/latest/api-reference/esri-layers-FeatureLayer.html#capabilities) */ @@ -6627,6 +8241,12 @@ declare namespace __esri { * [Read more...](https://developers.arcgis.com/javascript/latest/api-reference/esri-layers-FeatureLayer.html#capabilities) */ supportsValidateSql: boolean; + /** + * Indicates if resized attachments are supported in the feature layer. This is useful for showing thumbnails in [Popups](https://developers.arcgis.com/javascript/latest/api-reference/esri-widgets-Popup.html). + * + * [Read more...](https://developers.arcgis.com/javascript/latest/api-reference/esri-layers-FeatureLayer.html#capabilities) + */ + supportsResizeAttachments: boolean; } @@ -6703,6 +8323,12 @@ declare namespace __esri { * [Read more...](https://developers.arcgis.com/javascript/latest/api-reference/esri-layers-FeatureLayer.html#capabilities) */ supportsStatistics: boolean; + /** + * Indicates if the layer supports historic moment query. Requires ArcGIS Server service 10.5 or greater. + * + * [Read more...](https://developers.arcgis.com/javascript/latest/api-reference/esri-layers-FeatureLayer.html#capabilities) + */ + supportsHistoricMoment: boolean; } @@ -6852,11 +8478,7 @@ declare namespace __esri { on(name: "layerview-create", eventHandler: GeoRSSLayerLayerviewCreateEventHandler): IHandle; - on(name: "layerview-create", modifiers: string[], eventHandler: GeoRSSLayerLayerviewCreateEventHandler): IHandle; - on(name: "layerview-destroy", eventHandler: GeoRSSLayerLayerviewDestroyEventHandler): IHandle; - - on(name: "layerview-destroy", modifiers: string[], eventHandler: GeoRSSLayerLayerviewDestroyEventHandler): IHandle; } interface GeoRSSLayerConstructor { @@ -6983,11 +8605,7 @@ declare namespace __esri { on(name: "layerview-create", eventHandler: GraphicsLayerLayerviewCreateEventHandler): IHandle; - on(name: "layerview-create", modifiers: string[], eventHandler: GraphicsLayerLayerviewCreateEventHandler): IHandle; - on(name: "layerview-destroy", eventHandler: GraphicsLayerLayerviewDestroyEventHandler): IHandle; - - on(name: "layerview-destroy", modifiers: string[], eventHandler: GraphicsLayerLayerviewDestroyEventHandler): IHandle; } interface GraphicsLayerConstructor { @@ -7103,11 +8721,7 @@ declare namespace __esri { on(name: "layerview-create", eventHandler: GroupLayerLayerviewCreateEventHandler): IHandle; - on(name: "layerview-create", modifiers: string[], eventHandler: GroupLayerLayerviewCreateEventHandler): IHandle; - on(name: "layerview-destroy", eventHandler: GroupLayerLayerviewDestroyEventHandler): IHandle; - - on(name: "layerview-destroy", modifiers: string[], eventHandler: GroupLayerLayerviewDestroyEventHandler): IHandle; } interface GroupLayerConstructor { @@ -7194,11 +8808,7 @@ declare namespace __esri { on(name: "layerview-create", eventHandler: ImageryLayerLayerviewCreateEventHandler): IHandle; - on(name: "layerview-create", modifiers: string[], eventHandler: ImageryLayerLayerviewCreateEventHandler): IHandle; - on(name: "layerview-destroy", eventHandler: ImageryLayerLayerviewDestroyEventHandler): IHandle; - - on(name: "layerview-destroy", modifiers: string[], eventHandler: ImageryLayerLayerviewDestroyEventHandler): IHandle; } interface ImageryLayerConstructor { @@ -7263,11 +8873,7 @@ declare namespace __esri { on(name: "layerview-create", eventHandler: IntegratedMeshLayerLayerviewCreateEventHandler): IHandle; - on(name: "layerview-create", modifiers: string[], eventHandler: IntegratedMeshLayerLayerviewCreateEventHandler): IHandle; - on(name: "layerview-destroy", eventHandler: IntegratedMeshLayerLayerviewDestroyEventHandler): IHandle; - - on(name: "layerview-destroy", modifiers: string[], eventHandler: IntegratedMeshLayerLayerviewDestroyEventHandler): IHandle; } interface IntegratedMeshLayerConstructor { @@ -7355,11 +8961,7 @@ declare namespace __esri { on(name: "layerview-create", eventHandler: KMLLayerLayerviewCreateEventHandler): IHandle; - on(name: "layerview-create", modifiers: string[], eventHandler: KMLLayerLayerviewCreateEventHandler): IHandle; - on(name: "layerview-destroy", eventHandler: KMLLayerLayerviewDestroyEventHandler): IHandle; - - on(name: "layerview-destroy", modifiers: string[], eventHandler: KMLLayerLayerviewDestroyEventHandler): IHandle; } interface KMLLayerConstructor { @@ -7502,12 +9104,12 @@ declare namespace __esri { */ fromArcGISServerUrl(params: LayerFromArcGISServerUrlParams): IPromise; /** - * Creates a new layer instance of the appropriate layer class from an ArcGIS Online or ArcGIS for Portal [portal item](https://developers.arcgis.com/javascript/latest/api-reference/esri-portal-PortalItem.html). If the item points to a feature service with multiple layers, then a [GroupLayer](https://developers.arcgis.com/javascript/latest/api-reference/esri-layers-GroupLayer.html) is created. If the item points to a service with a single layer, then it resolves to a layer of the same type of class as the service. See also: [isLayer](https://developers.arcgis.com/javascript/latest/api-reference/esri-portal-PortalItem.html#isLayer) + * Creates a new layer instance of the appropriate layer class from an ArcGIS Online or ArcGIS Enterprise [portal item](https://developers.arcgis.com/javascript/latest/api-reference/esri-portal-PortalItem.html). If the item points to a feature service with multiple layers, then a [GroupLayer](https://developers.arcgis.com/javascript/latest/api-reference/esri-layers-GroupLayer.html) is created. If the item points to a service with a single layer, then it resolves to a layer of the same type of class as the service. See also: [isLayer](https://developers.arcgis.com/javascript/latest/api-reference/esri-portal-PortalItem.html#isLayer) * * [Read more...](https://developers.arcgis.com/javascript/latest/api-reference/esri-layers-Layer.html#fromPortalItem) * * @param params The parameters for loading the portal item. - * @param params.portalItem The object representing an ArcGIS Online or ArcGIS for Portal item from which to load the layer. + * @param params.portalItem The object representing an ArcGIS Online or ArcGIS Enterprise portal item from which to load the layer. * */ fromPortalItem(params: LayerFromPortalItemParams): IPromise; @@ -7586,7 +9188,7 @@ declare namespace __esri { export interface LayerFromPortalItemParams extends Object { /** - * The object representing an ArcGIS Online or ArcGIS for Portal item from which to load the layer. + * The object representing an ArcGIS Online or ArcGIS Enterprise portal item from which to load the layer. * * [Read more...](https://developers.arcgis.com/javascript/latest/api-reference/esri-layers-Layer.html#fromPortalItem) */ @@ -7597,11 +9199,7 @@ declare namespace __esri { on(name: "layerview-create", eventHandler: MapImageLayerLayerviewCreateEventHandler): IHandle; - on(name: "layerview-create", modifiers: string[], eventHandler: MapImageLayerLayerviewCreateEventHandler): IHandle; - on(name: "layerview-destroy", eventHandler: MapImageLayerLayerviewDestroyEventHandler): IHandle; - - on(name: "layerview-destroy", modifiers: string[], eventHandler: MapImageLayerLayerviewDestroyEventHandler): IHandle; } interface MapImageLayerConstructor { @@ -7640,11 +9238,7 @@ declare namespace __esri { on(name: "layerview-create", eventHandler: MapNotesLayerLayerviewCreateEventHandler): IHandle; - on(name: "layerview-create", modifiers: string[], eventHandler: MapNotesLayerLayerviewCreateEventHandler): IHandle; - on(name: "layerview-destroy", eventHandler: MapNotesLayerLayerviewDestroyEventHandler): IHandle; - - on(name: "layerview-destroy", modifiers: string[], eventHandler: MapNotesLayerLayerviewDestroyEventHandler): IHandle; } interface MapNotesLayerConstructor { @@ -7692,12 +9286,12 @@ declare namespace __esri { * * [Read more...](https://developers.arcgis.com/javascript/latest/api-reference/esri-layers-mixins-ArcGISCachedService.html#fromJSON) * - * @param json A JSON representation of the instance in the ArcGIS format. See the [ArcGIS REST API documentation](http://resources.arcgis.com/en/help/arcgis-rest-api/index.html#/Classification_objects/02r30000019z000000/) for examples of the structure of various input JSON objects. + * @param json A JSON representation of the instance in the ArcGIS format. See the [ArcGIS REST API documentation](https://developers.arcgis.com/documentation/common-data-types/overview-of-common-data-types.htm) for examples of the structure of various input JSON objects. * */ fromJSON(json: any): any; /** - * Converts an instance of [this class]() to its ArcGIS Portal JSON representation. See the [Using fromJSON()](https://developers.arcgis.com/javascript/latest/guide/using-fromjson/index.html) topic in the Guide for more information. + * Converts an instance of [this class]() to its ArcGIS portal JSON representation. See the [Using fromJSON()](https://developers.arcgis.com/javascript/latest/guide/using-fromjson/index.html) topic in the Guide for more information. * * [Read more...](https://developers.arcgis.com/javascript/latest/api-reference/esri-layers-mixins-ArcGISCachedService.html#toJSON) * @@ -7803,7 +9397,7 @@ declare namespace __esri { */ findSublayerById(id: number): Sublayer; /** - * Gets the parameters of the exported image to use when calling the [export REST operation](http://resources.arcgis.com/en/help/arcgis-rest-api/index.html#/Export_Map/02r3000000v7000000/). + * Gets the parameters of the exported image to use when calling the [export REST operation](https://developers.arcgis.com/rest/services-reference/export-map.htm). * * [Read more...](https://developers.arcgis.com/javascript/latest/api-reference/esri-layers-mixins-ArcGISDynamicMapService.html#getExportImageParameters) * @@ -7811,7 +9405,7 @@ declare namespace __esri { * @param width The width of the exported image * @param height The height of the exported image * @param options The parameter options is an object with the following properties. - * @param options.rotation The rotation in degrees of the exported image. Available since ArcGIS for Server 10.3. + * @param options.rotation The rotation in degrees of the exported image. Available since ArcGIS Server 10.3. * */ getExportImageParameters(extent: Extent, width: number, height: number, options?: ArcGISDynamicMapServiceGetExportImageParametersOptions): any; @@ -7883,7 +9477,7 @@ declare namespace __esri { export interface ArcGISDynamicMapServiceGetExportImageParametersOptions extends Object { /** - * The rotation in degrees of the exported image. Available since ArcGIS for Server 10.3. + * The rotation in degrees of the exported image. Available since ArcGIS Server 10.3. * * [Read more...](https://developers.arcgis.com/javascript/latest/api-reference/esri-layers-mixins-ArcGISDynamicMapService.html#getExportImageParameters) */ @@ -8028,7 +9622,7 @@ declare namespace __esri { */ readonly spatialReference: SpatialReference; /** - * The URL to the REST endpoint of the layer. The URL may either point to a resource on ArcGIS for Server, Portal for ArcGIS, or ArcGIS Online. + * The URL to the REST endpoint of the layer. The URL may either point to a resource on ArcGIS Enterprise or ArcGIS Online. * * [Read more...](https://developers.arcgis.com/javascript/latest/api-reference/esri-layers-mixins-ArcGISImageService.html#url) */ @@ -8041,7 +9635,7 @@ declare namespace __esri { readonly version: number; /** - * Returns an image using the [export REST operation](http://resources.arcgis.com/en/help/arcgis-rest-api/index.html#/Export_Image/02r3000000wm000000/) that displays data from an [ImageryLayer](https://developers.arcgis.com/javascript/latest/api-reference/esri-layers-ImageryLayer.html). + * Returns an image using the [export REST operation](https://developers.arcgis.com/rest/services-reference/export-image.htm) that displays data from an [ImageryLayer](https://developers.arcgis.com/javascript/latest/api-reference/esri-layers-ImageryLayer.html). * * [Read more...](https://developers.arcgis.com/javascript/latest/api-reference/esri-layers-mixins-ArcGISImageService.html#fetchImage) * @@ -8051,23 +9645,6 @@ declare namespace __esri { * */ fetchImage(extent: Extent, width: number, height: number): IPromise; - /** - * Creates a new instance of [this class]() and initializes it with values from a JSON object generated from a product in the ArcGIS platform. The object passed into the input `json` parameter often comes from a response to a query operation in the REST API or a [toJSON()](http://pro.arcgis.com/en/pro-app/tool-reference/conversion/features-to-json.htm) method from another ArcGIS product. See the [Using fromJSON()](https://developers.arcgis.com/javascript/latest/guide/using-fromjson/index.html) topic in the Guide for details and examples of when and how to use this function. - * - * [Read more...](https://developers.arcgis.com/javascript/latest/api-reference/esri-layers-mixins-ArcGISImageService.html#fromJSON) - * - * @param json A JSON representation of the instance in the ArcGIS format. See the [ArcGIS REST API documentation](http://resources.arcgis.com/en/help/arcgis-rest-api/index.html#/Classification_objects/02r30000019z000000/) for examples of the structure of various input JSON objects. - * - */ - fromJSON(json: any): any; - /** - * Converts an instance of [this class]() to its ArcGIS Portal JSON representation. See the [Using fromJSON()](https://developers.arcgis.com/javascript/latest/guide/using-fromjson/index.html) topic in the Guide for more information. - * - * [Read more...](https://developers.arcgis.com/javascript/latest/api-reference/esri-layers-mixins-ArcGISImageService.html#toJSON) - * - * - */ - toJSON(): any; } interface ArcGISImageServiceConstructor { @@ -8212,7 +9789,7 @@ declare namespace __esri { */ renderingRule?: RasterFunctionProperties; /** - * The URL to the REST endpoint of the layer. The URL may either point to a resource on ArcGIS for Server, Portal for ArcGIS, or ArcGIS Online. + * The URL to the REST endpoint of the layer. The URL may either point to a resource on ArcGIS Enterprise or ArcGIS Online. * * [Read more...](https://developers.arcgis.com/javascript/latest/api-reference/esri-layers-mixins-ArcGISImageService.html#url) */ @@ -8301,8 +9878,7 @@ declare namespace __esri { interface RefreshableLayer { /** - * Refresh interval of the layer in minutes. Minimum refresh interval is 0.1 minute (6 seconds). Value of `0` indicates no refresh. - * > **Known Limitations** Refreshing is only supported in 2D [MapViews](https://developers.arcgis.com/javascript/latest/api-reference/esri-views-MapView.html). + * Refresh interval of the layer in minutes. Minimum refresh interval is 0.1 minute (6 seconds). Value of `0` indicates no refresh. * * [Read more...](https://developers.arcgis.com/javascript/latest/api-reference/esri-layers-mixins-RefreshableLayer.html#refreshInterval) * @@ -8311,8 +9887,7 @@ declare namespace __esri { refreshInterval: number; /** - * Fetches all the data for the layer. - * > **Known Limitations** Refreshing is only supported in 2D [MapViews](https://developers.arcgis.com/javascript/latest/api-reference/esri-views-MapView.html). + * Fetches all the data for the layer. * * [Read more...](https://developers.arcgis.com/javascript/latest/api-reference/esri-layers-mixins-RefreshableLayer.html#refresh) * @@ -8331,8 +9906,7 @@ declare namespace __esri { interface RefreshableLayerProperties { /** - * Refresh interval of the layer in minutes. Minimum refresh interval is 0.1 minute (6 seconds). Value of `0` indicates no refresh. - * > **Known Limitations** Refreshing is only supported in 2D [MapViews](https://developers.arcgis.com/javascript/latest/api-reference/esri-views-MapView.html). + * Refresh interval of the layer in minutes. Minimum refresh interval is 0.1 minute (6 seconds). Value of `0` indicates no refresh. * * [Read more...](https://developers.arcgis.com/javascript/latest/api-reference/esri-layers-mixins-RefreshableLayer.html#refreshInterval) * @@ -8418,7 +9992,7 @@ declare namespace __esri { */ readonly token: string; /** - * The URL of the REST endpoint of the layer or scene service. The URL may either point to a resource on ArcGIS Server, Portal for ArcGIS, or ArcGIS Online. The layer may be specified using the [layerId](https://developers.arcgis.com/javascript/latest/api-reference/esri-layers-mixins-SceneService.html#layerId) property when the url points directly to a service and not a specific layer. If [layerId](https://developers.arcgis.com/javascript/latest/api-reference/esri-layers-mixins-SceneService.html#layerId) is not specified, then it will default to the first layer in the service. + * The URL of the REST endpoint of the layer or scene service. The URL may either point to a resource on ArcGIS Enterprise or ArcGIS Online. The layer may be specified using the [layerId](https://developers.arcgis.com/javascript/latest/api-reference/esri-layers-mixins-SceneService.html#layerId) property when the url points directly to a service and not a specific layer. If [layerId](https://developers.arcgis.com/javascript/latest/api-reference/esri-layers-mixins-SceneService.html#layerId) is not specified, then it will default to the first layer in the service. * * [Read more...](https://developers.arcgis.com/javascript/latest/api-reference/esri-layers-mixins-SceneService.html#url) */ @@ -8466,7 +10040,7 @@ declare namespace __esri { */ spatialReference?: SpatialReferenceProperties; /** - * The URL of the REST endpoint of the layer or scene service. The URL may either point to a resource on ArcGIS Server, Portal for ArcGIS, or ArcGIS Online. The layer may be specified using the [layerId](https://developers.arcgis.com/javascript/latest/api-reference/esri-layers-mixins-SceneService.html#layerId) property when the url points directly to a service and not a specific layer. If [layerId](https://developers.arcgis.com/javascript/latest/api-reference/esri-layers-mixins-SceneService.html#layerId) is not specified, then it will default to the first layer in the service. + * The URL of the REST endpoint of the layer or scene service. The URL may either point to a resource on ArcGIS Enterprise or ArcGIS Online. The layer may be specified using the [layerId](https://developers.arcgis.com/javascript/latest/api-reference/esri-layers-mixins-SceneService.html#layerId) property when the url points directly to a service and not a specific layer. If [layerId](https://developers.arcgis.com/javascript/latest/api-reference/esri-layers-mixins-SceneService.html#layerId) is not specified, then it will default to the first layer in the service. * * [Read more...](https://developers.arcgis.com/javascript/latest/api-reference/esri-layers-mixins-SceneService.html#url) */ @@ -8499,19 +10073,11 @@ declare namespace __esri { on(name: "layerview-create", eventHandler: OpenStreetMapLayerLayerviewCreateEventHandler): IHandle; - on(name: "layerview-create", modifiers: string[], eventHandler: OpenStreetMapLayerLayerviewCreateEventHandler): IHandle; - on(name: "layerview-destroy", eventHandler: OpenStreetMapLayerLayerviewDestroyEventHandler): IHandle; - - on(name: "layerview-destroy", modifiers: string[], eventHandler: OpenStreetMapLayerLayerviewDestroyEventHandler): IHandle; } interface OpenStreetMapLayerConstructor { - /** - * Allows you to use [basemaps](http://wiki.openstreetmap.org/wiki/List_of_OSM-based_services) from [OpenStreetMap](http://www.openstreetmap.org/). Set the [tileservers](https://developers.arcgis.com/javascript/latest/api-reference/esri-layers-OpenStreetMapLayer.html#tileServers) property to change which OpenStreetMap tiles you want to use. - * - * [Read more...](https://developers.arcgis.com/javascript/latest/api-reference/esri-layers-OpenStreetMapLayer.html) - */ + new(properties?: OpenStreetMapLayerProperties): OpenStreetMapLayer; @@ -8569,11 +10135,7 @@ declare namespace __esri { on(name: "layerview-create", eventHandler: PointCloudLayerLayerviewCreateEventHandler): IHandle; - on(name: "layerview-create", modifiers: string[], eventHandler: PointCloudLayerLayerviewCreateEventHandler): IHandle; - on(name: "layerview-destroy", eventHandler: PointCloudLayerLayerviewDestroyEventHandler): IHandle; - - on(name: "layerview-destroy", modifiers: string[], eventHandler: PointCloudLayerLayerviewDestroyEventHandler): IHandle; } interface PointCloudLayerConstructor { @@ -8819,11 +10381,7 @@ declare namespace __esri { on(name: "layerview-create", eventHandler: SceneLayerLayerviewCreateEventHandler): IHandle; - on(name: "layerview-create", modifiers: string[], eventHandler: SceneLayerLayerviewCreateEventHandler): IHandle; - on(name: "layerview-destroy", eventHandler: SceneLayerLayerviewDestroyEventHandler): IHandle; - - on(name: "layerview-destroy", modifiers: string[], eventHandler: SceneLayerLayerviewDestroyEventHandler): IHandle; } interface SceneLayerConstructor { @@ -9030,11 +10588,7 @@ declare namespace __esri { on(name: "layerview-create", eventHandler: StreamLayerLayerviewCreateEventHandler): IHandle; - on(name: "layerview-create", modifiers: string[], eventHandler: StreamLayerLayerviewCreateEventHandler): IHandle; - on(name: "layerview-destroy", eventHandler: StreamLayerLayerviewDestroyEventHandler): IHandle; - - on(name: "layerview-destroy", modifiers: string[], eventHandler: StreamLayerLayerviewDestroyEventHandler): IHandle; } interface StreamLayerConstructor { @@ -9285,6 +10839,46 @@ declare namespace __esri { type?: string; } + interface ElevationSampler { + /** + * Registers an event handler on the instance. Call this method to hook an event with a listener. See the [Events summary table](https://developers.arcgis.com/javascript/latest/api-reference/esri-layers-support-ElevationSampler.html#events-summary) for a list of listened events. + * + * [Read more...](https://developers.arcgis.com/javascript/latest/api-reference/esri-layers-support-ElevationSampler.html#on) + * + * @param type The name of the event or the events to listen for. + * @param handler? The function to call when the event is fired, if modifiers were specified. + * + */ + on(type: string | string[], handler?: Function): any; + /** + * Query elevation for a [Point](https://developers.arcgis.com/javascript/latest/api-reference/esri-geometry-Point.html), [Polyline](https://developers.arcgis.com/javascript/latest/api-reference/esri-geometry-Polyline.html) or [Multipoint](https://developers.arcgis.com/javascript/latest/api-reference/esri-geometry-Multipoint.html) geometry. A query will return a new geometry for which the z-values for each coordinate in the geometry are obtained from the elevation sampler. If the geometry used for the query is outside of the elevation sampler extent, then the returned geometry has `0` as z-values. + * + * [Read more...](https://developers.arcgis.com/javascript/latest/api-reference/esri-layers-support-ElevationSampler.html#queryElevation) + * + * @param geometry The geometry to use for sampling elevation data. + * + */ + queryElevation(geometry: Point | Multipoint | Polyline): Point | Multipoint | Polyline; + + + on(name: "changed", eventHandler: ElevationSamplerChangedEventHandler): IHandle; + } + + interface ElevationSamplerConstructor { + /** + * A cache of elevation values created from an elevation service or the [GroundView](https://developers.arcgis.com/javascript/latest/api-reference/esri-views-GroundView.html) used for synchronously querying elevation information for geometries. This class does not have a constructor. You can create an instance of this class by using [ElevationLayer.createElevationSampler()](https://developers.arcgis.com/javascript/latest/api-reference/esri-layers-ElevationLayer.html#createElevationSampler) or [Ground.createElevationSampler()](https://developers.arcgis.com/javascript/latest/api-reference/esri-Ground.html#createElevationSampler) methods. The elevation sampler created from the [Ground](https://developers.arcgis.com/javascript/latest/api-reference/esri-Ground.html) will sample data from the first elevation layer that has data available. To control the layer used for elevation sampling and the sampling resolution, use [ElevationLayer.createElevationSampler()](https://developers.arcgis.com/javascript/latest/api-reference/esri-layers-ElevationLayer.html#createElevationSampler). + * + * [Read more...](https://developers.arcgis.com/javascript/latest/api-reference/esri-layers-support-ElevationSampler.html) + */ + + new(): ElevationSampler; + } + + export const ElevationSampler: ElevationSamplerConstructor; + + export interface ElevationSamplerChangedEvent { + } + interface FeatureTemplate extends Accessor, JSONSupport { /** * Description of the feature template. @@ -9622,7 +11216,7 @@ declare namespace __esri { width: number; /** - * Converts an instance of [this class]() to its ArcGIS Portal JSON representation. See the [Using fromJSON()](https://developers.arcgis.com/javascript/latest/guide/using-fromjson/index.html) topic in the Guide for more information. + * Converts an instance of [this class]() to its ArcGIS portal JSON representation. See the [Using fromJSON()](https://developers.arcgis.com/javascript/latest/guide/using-fromjson/index.html) topic in the Guide for more information. * * [Read more...](https://developers.arcgis.com/javascript/latest/api-reference/esri-layers-support-ImageParameters.html#toJSON) * @@ -9840,7 +11434,11 @@ declare namespace __esri { labelExpressionInfo: LabelClassLabelExpressionInfo; /** * The position of the label. Known values are based on the feature type. This property requires a value for labels to be visible. **Known Values (Points):** above-center | above-left | above-right | below-center | below-left | below-right | center-center | center-left | center-right **Known Values (Polylines):** above-after | above-along | above-before | above-start | above-end | below-after | below-along | below-before | below-start | below-end | center-after | center-along | center-before | center-start | center-end **Known Values (Polygons):** always-horizontal - * > **Known Limitations** Currently, if the label has a [line callout](https://developers.arcgis.com/javascript/latest/api-reference/esri-symbols-callouts-LineCallout3D.html) then only "above-center" is supported. + * > **Known Limitations** + * * Currently, if the label has a [line callout](https://developers.arcgis.com/javascript/latest/api-reference/esri-symbols-callouts-LineCallout3D.html) then only "above-center" is supported. + * * 3D layers only support label placement for [Points](https://developers.arcgis.com/javascript/latest/api-reference/esri-geometry-Point.html). + * + * * * [Read more...](https://developers.arcgis.com/javascript/latest/api-reference/esri-layers-support-LabelClass.html#labelPlacement) */ @@ -9919,7 +11517,11 @@ declare namespace __esri { labelExpressionInfo?: LabelClassLabelExpressionInfo; /** * The position of the label. Known values are based on the feature type. This property requires a value for labels to be visible. **Known Values (Points):** above-center | above-left | above-right | below-center | below-left | below-right | center-center | center-left | center-right **Known Values (Polylines):** above-after | above-along | above-before | above-start | above-end | below-after | below-along | below-before | below-start | below-end | center-after | center-along | center-before | center-start | center-end **Known Values (Polygons):** always-horizontal - * > **Known Limitations** Currently, if the label has a [line callout](https://developers.arcgis.com/javascript/latest/api-reference/esri-symbols-callouts-LineCallout3D.html) then only "above-center" is supported. + * > **Known Limitations** + * * Currently, if the label has a [line callout](https://developers.arcgis.com/javascript/latest/api-reference/esri-symbols-callouts-LineCallout3D.html) then only "above-center" is supported. + * * 3D layers only support label placement for [Points](https://developers.arcgis.com/javascript/latest/api-reference/esri-geometry-Point.html). + * + * * * [Read more...](https://developers.arcgis.com/javascript/latest/api-reference/esri-layers-support-LabelClass.html#labelPlacement) */ @@ -10494,13 +12096,13 @@ declare namespace __esri { interface RasterFunction extends Accessor, JSONSupport { /** - * The arguments for the raster function. The structure depends on the function specified. See [raster functions](http://resources.arcgis.com/en/help/arcgis-rest-api/#/Raster_Function_Objects/02r3000000rv000000/) for a list of functions and their arguments. + * The arguments for the raster function. The structure depends on the function specified. See [raster functions](https://developers.arcgis.com/documentation/common-data-types/raster-function-objects.htm) for a list of functions and their arguments. * * [Read more...](https://developers.arcgis.com/javascript/latest/api-reference/esri-layers-support-RasterFunction.html#functionArguments) */ functionArguments: any; /** - * The raster function name. See [raster functions](http://resources.arcgis.com/en/help/arcgis-rest-api/#/Raster_Function_Objects/02r3000000rv000000/) for a list of functions and their arguments. + * The raster function name. See [raster functions](https://developers.arcgis.com/documentation/common-data-types/raster-function-objects.htm) for a list of functions and their arguments. * * [Read more...](https://developers.arcgis.com/javascript/latest/api-reference/esri-layers-support-RasterFunction.html#functionName) */ @@ -10523,7 +12125,7 @@ declare namespace __esri { interface RasterFunctionConstructor { /** - * Specifies processing to be done to the image service. See [raster functions](http://resources.arcgis.com/en/help/arcgis-rest-api/#/Raster_Function_Objects/02r3000000rv000000/) for a list of functions and their [arguments](https://developers.arcgis.com/javascript/latest/api-reference/esri-layers-support-RasterFunction.html#functionArguments). The following image shows a landcover ImageryLayer rendered with two chained client-side raster functions used to reclass pixel values (Remap) and assign each pixel a new color (Colormap). + * Specifies processing to be done to the image service. See [raster functions](https://developers.arcgis.com/documentation/common-data-types/raster-function-objects.htm) for a list of functions and their [arguments](https://developers.arcgis.com/javascript/latest/api-reference/esri-layers-support-RasterFunction.html#functionArguments). The following image shows a landcover ImageryLayer rendered with two chained client-side raster functions used to reclass pixel values (Remap) and assign each pixel a new color (Colormap). * * [Read more...](https://developers.arcgis.com/javascript/latest/api-reference/esri-layers-support-RasterFunction.html) */ @@ -10537,13 +12139,13 @@ declare namespace __esri { interface RasterFunctionProperties { /** - * The arguments for the raster function. The structure depends on the function specified. See [raster functions](http://resources.arcgis.com/en/help/arcgis-rest-api/#/Raster_Function_Objects/02r3000000rv000000/) for a list of functions and their arguments. + * The arguments for the raster function. The structure depends on the function specified. See [raster functions](https://developers.arcgis.com/documentation/common-data-types/raster-function-objects.htm) for a list of functions and their arguments. * * [Read more...](https://developers.arcgis.com/javascript/latest/api-reference/esri-layers-support-RasterFunction.html#functionArguments) */ functionArguments?: any; /** - * The raster function name. See [raster functions](http://resources.arcgis.com/en/help/arcgis-rest-api/#/Raster_Function_Objects/02r3000000rv000000/) for a list of functions and their arguments. + * The raster function name. See [raster functions](https://developers.arcgis.com/documentation/common-data-types/raster-function-objects.htm) for a list of functions and their arguments. * * [Read more...](https://developers.arcgis.com/javascript/latest/api-reference/esri-layers-support-RasterFunction.html#functionName) */ @@ -10564,6 +12166,112 @@ declare namespace __esri { variableName?: any; } + interface Relationship extends Accessor { + /** + * The cardinality which specifies the number of objects in the origin [FeatureLayer](https://developers.arcgis.com/javascript/latest/api-reference/esri-layers-FeatureLayer.html) related to the number of objects in the destination [FeatureLayer](https://developers.arcgis.com/javascript/latest/api-reference/esri-layers-FeatureLayer.html). A relationship can have one of three cardinalities: + * * "one-to-one" + * * "one-to-many" + * * "many-to-many" + * + * + * Please see the [Desktop help](http://desktop.arcgis.com/en/arcmap/10.3/manage-data/relationships/relationship-class-properties.htm#GUID-989CB1D1-AC51-4A4C-8D9D-0AB9E647FFFD) for additional information on cardinality. + * + * [Read more...](https://developers.arcgis.com/javascript/latest/api-reference/esri-layers-support-Relationship.html#cardinality) + * + * @default null + */ + cardinality: string; + /** + * The unique ID for the relationship. These ids for the relationships the [FeatureLayer](https://developers.arcgis.com/javascript/latest/api-reference/esri-layers-FeatureLayer.html) participates in are listed in the ArcGIS Services directory. + * + * [Read more...](https://developers.arcgis.com/javascript/latest/api-reference/esri-layers-support-Relationship.html#id) + * + * @default null + */ + id: number; + /** + * The field used to establish the relate within the [FeatureLayer](https://developers.arcgis.com/javascript/latest/api-reference/esri-layers-FeatureLayer.html). + * + * [Read more...](https://developers.arcgis.com/javascript/latest/api-reference/esri-layers-support-Relationship.html#keyField) + * + * @default null + */ + keyField: string; + /** + * The name of the relationship. + * + * [Read more...](https://developers.arcgis.com/javascript/latest/api-reference/esri-layers-support-Relationship.html#name) + * + * @default null + */ + name: string; + /** + * The unique ID of the related [FeatureLayer](https://developers.arcgis.com/javascript/latest/api-reference/esri-layers-FeatureLayer.html). + * + * [Read more...](https://developers.arcgis.com/javascript/latest/api-reference/esri-layers-support-Relationship.html#relatedTableId) + * + * @default null + */ + relatedTableId: number; + } + + interface RelationshipConstructor { + + + new(properties?: RelationshipProperties): Relationship; + } + + export const Relationship: RelationshipConstructor; + + interface RelationshipProperties { + /** + * The cardinality which specifies the number of objects in the origin [FeatureLayer](https://developers.arcgis.com/javascript/latest/api-reference/esri-layers-FeatureLayer.html) related to the number of objects in the destination [FeatureLayer](https://developers.arcgis.com/javascript/latest/api-reference/esri-layers-FeatureLayer.html). A relationship can have one of three cardinalities: + * * "one-to-one" + * * "one-to-many" + * * "many-to-many" + * + * + * Please see the [Desktop help](http://desktop.arcgis.com/en/arcmap/10.3/manage-data/relationships/relationship-class-properties.htm#GUID-989CB1D1-AC51-4A4C-8D9D-0AB9E647FFFD) for additional information on cardinality. + * + * [Read more...](https://developers.arcgis.com/javascript/latest/api-reference/esri-layers-support-Relationship.html#cardinality) + * + * @default null + */ + cardinality?: string; + /** + * The unique ID for the relationship. These ids for the relationships the [FeatureLayer](https://developers.arcgis.com/javascript/latest/api-reference/esri-layers-FeatureLayer.html) participates in are listed in the ArcGIS Services directory. + * + * [Read more...](https://developers.arcgis.com/javascript/latest/api-reference/esri-layers-support-Relationship.html#id) + * + * @default null + */ + id?: number; + /** + * The field used to establish the relate within the [FeatureLayer](https://developers.arcgis.com/javascript/latest/api-reference/esri-layers-FeatureLayer.html). + * + * [Read more...](https://developers.arcgis.com/javascript/latest/api-reference/esri-layers-support-Relationship.html#keyField) + * + * @default null + */ + keyField?: string; + /** + * The name of the relationship. + * + * [Read more...](https://developers.arcgis.com/javascript/latest/api-reference/esri-layers-support-Relationship.html#name) + * + * @default null + */ + name?: string; + /** + * The unique ID of the related [FeatureLayer](https://developers.arcgis.com/javascript/latest/api-reference/esri-layers-FeatureLayer.html). + * + * [Read more...](https://developers.arcgis.com/javascript/latest/api-reference/esri-layers-support-Relationship.html#relatedTableId) + * + * @default null + */ + relatedTableId?: number; + } + interface Sublayer extends Accessor { /** * A SQL where clause used to filter features in the image. Only the features that satisfy the definition expression are displayed in the [View](https://developers.arcgis.com/javascript/latest/api-reference/esri-views-View.html). Definition expressions may be set when a sublayer is constructed prior to it loading in the view or after it has been added to the MapImageLayer. @@ -10648,7 +12356,17 @@ declare namespace __esri { */ opacity: number; /** - * The popup template for the sublayer. When set, the `popupTemplate` allows users to access attributes and display their values in the [view's popup](https://developers.arcgis.com/javascript/latest/api-reference/esri-views-View.html#popup) when the user clicks the image. Sublayers with a [RasterDataSource](https://developers.arcgis.com/javascript/latest/api-reference/esri-layers-support-Sublayer.html#RasterDataSource) cannot be queried and therefore do not support [PopupTemplate](https://developers.arcgis.com/javascript/latest/api-reference/esri-PopupTemplate.html). + * Indicates whether to display popups when features in the layer are clicked. + * + * [Read more...](https://developers.arcgis.com/javascript/latest/api-reference/esri-layers-support-Sublayer.html#popupEnabled) + * + * @default true + */ + popupEnabled: boolean; + /** + * The popup template for the sublayer. When set, the `popupTemplate` allows users to access attributes and display their values in the [view's popup](https://developers.arcgis.com/javascript/latest/api-reference/esri-views-View.html#popup) when the user clicks the image. Sublayers with a [RasterDataSource](https://developers.arcgis.com/javascript/latest/api-reference/esri-layers-support-Sublayer.html#RasterDataSource) cannot be queried and therefore do not support [PopupTemplate](https://developers.arcgis.com/javascript/latest/api-reference/esri-PopupTemplate.html). + * > **Known Limitations** + * * [Arcade](https://developers.arcgis.com/javascript/latest/guide/arcade/index.html) expressions are not supported in PopupTemplates set on MapImageLayer sublayers unless they reference ArcGIS Enterprise 10.6.1 map services (or later) created from ArcGIS Pro. * * [Read more...](https://developers.arcgis.com/javascript/latest/api-reference/esri-layers-support-Sublayer.html#popupTemplate) */ @@ -10657,7 +12375,7 @@ declare namespace __esri { * The renderer to apply to the sublayer. This value overrides the renderer read from the map service. * > **Known Limitations** * * [3D symbols](https://developers.arcgis.com/javascript/latest/api-reference/esri-symbols-Symbol3D.html) are not supported in renderers set on MapImageLayer sublayers. - * * [visual variables](https://developers.arcgis.com/javascript/latest/api-reference/esri-renderers-SimpleRenderer.html#visualVariables) are not supported in renderers set on MapImageLayer sublayers. + * * [Visual variables](https://developers.arcgis.com/javascript/latest/api-reference/esri-renderers-SimpleRenderer.html#visualVariables) and [Arcade](https://developers.arcgis.com/javascript/latest/guide/arcade/index.html) expressions are not supported in renderers set on MapImageLayer sublayers unless they reference ArcGIS Enterprise 10.6.1 map services (or later) created from ArcGIS Pro. * * [Read more...](https://developers.arcgis.com/javascript/latest/api-reference/esri-layers-support-Sublayer.html#renderer) */ @@ -10701,6 +12419,14 @@ declare namespace __esri { * */ clone(): Sublayer; + /** + * A convenient method for creating a [FeatureLayer](https://developers.arcgis.com/javascript/latest/api-reference/esri-layers-FeatureLayer.html) instance based on the Sublayer's configuration, including [dynamic sources](https://enterprise.arcgis.com/en/server/latest/publish-services/linux/about-dynamic-layers.htm). This allows you to take advantage of FeatureLayer capabilities not supported in Sublayer, such as the [Smart Mapping creator functions](https://developers.arcgis.com/javascript/latest/api-reference/esri-renderers-smartMapping-creators-color.html). + * + * [Read more...](https://developers.arcgis.com/javascript/latest/api-reference/esri-layers-support-Sublayer.html#createFeatureLayer) + * + * + */ + createFeatureLayer(): FeatureLayer; /** * Creates a [Query](https://developers.arcgis.com/javascript/latest/api-reference/esri-tasks-support-Query.html) object with default values representing the layer's state, including filters (definition expression) on the layer's features. * @@ -10816,7 +12542,17 @@ declare namespace __esri { */ opacity?: number; /** - * The popup template for the sublayer. When set, the `popupTemplate` allows users to access attributes and display their values in the [view's popup](https://developers.arcgis.com/javascript/latest/api-reference/esri-views-View.html#popup) when the user clicks the image. Sublayers with a [RasterDataSource](https://developers.arcgis.com/javascript/latest/api-reference/esri-layers-support-Sublayer.html#RasterDataSource) cannot be queried and therefore do not support [PopupTemplate](https://developers.arcgis.com/javascript/latest/api-reference/esri-PopupTemplate.html). + * Indicates whether to display popups when features in the layer are clicked. + * + * [Read more...](https://developers.arcgis.com/javascript/latest/api-reference/esri-layers-support-Sublayer.html#popupEnabled) + * + * @default true + */ + popupEnabled?: boolean; + /** + * The popup template for the sublayer. When set, the `popupTemplate` allows users to access attributes and display their values in the [view's popup](https://developers.arcgis.com/javascript/latest/api-reference/esri-views-View.html#popup) when the user clicks the image. Sublayers with a [RasterDataSource](https://developers.arcgis.com/javascript/latest/api-reference/esri-layers-support-Sublayer.html#RasterDataSource) cannot be queried and therefore do not support [PopupTemplate](https://developers.arcgis.com/javascript/latest/api-reference/esri-PopupTemplate.html). + * > **Known Limitations** + * * [Arcade](https://developers.arcgis.com/javascript/latest/guide/arcade/index.html) expressions are not supported in PopupTemplates set on MapImageLayer sublayers unless they reference ArcGIS Enterprise 10.6.1 map services (or later) created from ArcGIS Pro. * * [Read more...](https://developers.arcgis.com/javascript/latest/api-reference/esri-layers-support-Sublayer.html#popupTemplate) */ @@ -10825,7 +12561,7 @@ declare namespace __esri { * The renderer to apply to the sublayer. This value overrides the renderer read from the map service. * > **Known Limitations** * * [3D symbols](https://developers.arcgis.com/javascript/latest/api-reference/esri-symbols-Symbol3D.html) are not supported in renderers set on MapImageLayer sublayers. - * * [visual variables](https://developers.arcgis.com/javascript/latest/api-reference/esri-renderers-SimpleRenderer.html#visualVariables) are not supported in renderers set on MapImageLayer sublayers. + * * [Visual variables](https://developers.arcgis.com/javascript/latest/api-reference/esri-renderers-SimpleRenderer.html#visualVariables) and [Arcade](https://developers.arcgis.com/javascript/latest/guide/arcade/index.html) expressions are not supported in renderers set on MapImageLayer sublayers unless they reference ArcGIS Enterprise 10.6.1 map services (or later) created from ArcGIS Pro. * * [Read more...](https://developers.arcgis.com/javascript/latest/api-reference/esri-layers-support-Sublayer.html#renderer) */ @@ -11801,7 +13537,7 @@ declare namespace __esri { */ tileServers: string[]; /** - * The URL of the REST endpoint of the layer. The URL may either point to a resource on ArcGIS for Server, Portal for ArcGIS, or ArcGIS Online. + * The URL of the REST endpoint of the layer. The URL may either point to a resource on ArcGIS Enterprise or ArcGIS Online. * * [Read more...](https://developers.arcgis.com/javascript/latest/api-reference/esri-layers-TileLayer.html#url) */ @@ -11835,11 +13571,7 @@ declare namespace __esri { on(name: "layerview-create", eventHandler: TileLayerLayerviewCreateEventHandler): IHandle; - on(name: "layerview-create", modifiers: string[], eventHandler: TileLayerLayerviewCreateEventHandler): IHandle; - on(name: "layerview-destroy", eventHandler: TileLayerLayerviewDestroyEventHandler): IHandle; - - on(name: "layerview-destroy", modifiers: string[], eventHandler: TileLayerLayerviewDestroyEventHandler): IHandle; } interface TileLayerConstructor { @@ -11872,7 +13604,7 @@ declare namespace __esri { */ tileServers?: string[]; /** - * The URL of the REST endpoint of the layer. The URL may either point to a resource on ArcGIS for Server, Portal for ArcGIS, or ArcGIS Online. + * The URL of the REST endpoint of the layer. The URL may either point to a resource on ArcGIS Enterprise or ArcGIS Online. * * [Read more...](https://developers.arcgis.com/javascript/latest/api-reference/esri-layers-TileLayer.html#url) */ @@ -11907,11 +13639,7 @@ declare namespace __esri { on(name: "layerview-create", eventHandler: UnknownLayerLayerviewCreateEventHandler): IHandle; - on(name: "layerview-create", modifiers: string[], eventHandler: UnknownLayerLayerviewCreateEventHandler): IHandle; - on(name: "layerview-destroy", eventHandler: UnknownLayerLayerviewDestroyEventHandler): IHandle; - - on(name: "layerview-destroy", modifiers: string[], eventHandler: UnknownLayerLayerviewDestroyEventHandler): IHandle; } interface UnknownLayerConstructor { @@ -11948,11 +13676,7 @@ declare namespace __esri { on(name: "layerview-create", eventHandler: UnsupportedLayerLayerviewCreateEventHandler): IHandle; - on(name: "layerview-create", modifiers: string[], eventHandler: UnsupportedLayerLayerviewCreateEventHandler): IHandle; - on(name: "layerview-destroy", eventHandler: UnsupportedLayerLayerviewDestroyEventHandler): IHandle; - - on(name: "layerview-destroy", modifiers: string[], eventHandler: UnsupportedLayerLayerviewDestroyEventHandler): IHandle; } interface UnsupportedLayerConstructor { @@ -12032,11 +13756,7 @@ declare namespace __esri { on(name: "layerview-create", eventHandler: VectorTileLayerLayerviewCreateEventHandler): IHandle; - on(name: "layerview-create", modifiers: string[], eventHandler: VectorTileLayerLayerviewCreateEventHandler): IHandle; - on(name: "layerview-destroy", eventHandler: VectorTileLayerLayerviewDestroyEventHandler): IHandle; - - on(name: "layerview-destroy", modifiers: string[], eventHandler: VectorTileLayerLayerviewDestroyEventHandler): IHandle; } interface VectorTileLayerConstructor { @@ -12165,11 +13885,7 @@ declare namespace __esri { on(name: "layerview-create", eventHandler: WebTileLayerLayerviewCreateEventHandler): IHandle; - on(name: "layerview-create", modifiers: string[], eventHandler: WebTileLayerLayerviewCreateEventHandler): IHandle; - on(name: "layerview-destroy", eventHandler: WebTileLayerLayerviewDestroyEventHandler): IHandle; - - on(name: "layerview-destroy", modifiers: string[], eventHandler: WebTileLayerLayerviewDestroyEventHandler): IHandle; } interface WebTileLayerConstructor { @@ -12367,11 +14083,7 @@ declare namespace __esri { on(name: "layerview-create", eventHandler: WMSLayerLayerviewCreateEventHandler): IHandle; - on(name: "layerview-create", modifiers: string[], eventHandler: WMSLayerLayerviewCreateEventHandler): IHandle; - on(name: "layerview-destroy", eventHandler: WMSLayerLayerviewDestroyEventHandler): IHandle; - - on(name: "layerview-destroy", modifiers: string[], eventHandler: WMSLayerLayerviewDestroyEventHandler): IHandle; } interface WMSLayerConstructor { @@ -12598,11 +14310,7 @@ declare namespace __esri { on(name: "layerview-create", eventHandler: WMTSLayerLayerviewCreateEventHandler): IHandle; - on(name: "layerview-create", modifiers: string[], eventHandler: WMTSLayerLayerviewCreateEventHandler): IHandle; - on(name: "layerview-destroy", eventHandler: WMTSLayerLayerviewDestroyEventHandler): IHandle; - - on(name: "layerview-destroy", modifiers: string[], eventHandler: WMTSLayerLayerviewDestroyEventHandler): IHandle; } interface WMTSLayerConstructor { @@ -12959,7 +14667,7 @@ declare namespace __esri { } /** - * It is possible to set media elements such as charts and/or images within the PopupTemplate's content. This content is set within the mediaInfos. You will need to reference a dijit stylesheet and reference its class within the `` HTML div. You can see this in the [Multiple popup elements sample](https://developers.arcgis.com/javascript/latest/sample-code/popup-multipleelements/index.html). ![popuptemplate-media-element](https://developers.arcgis.com/javascript/latest/assets/img/apiref/widgets/popuptemplate-media-element.png) The object specification for the media popup element is provided below. + * It is possible to set media elements such as charts and/or images within the PopupTemplate's content. This content is set within the mediaInfos. ![popuptemplate-media-element](https://developers.arcgis.com/javascript/latest/assets/img/apiref/widgets/popuptemplate-media-element.png) The object specification for the media popup element is provided below. * * [Read more...](https://developers.arcgis.com/javascript/latest/api-reference/esri-PopupTemplate.html#media) */ @@ -13330,6 +15038,14 @@ declare namespace __esri { * [Read more...](https://developers.arcgis.com/javascript/latest/api-reference/esri-portal-Portal.html#description) */ description: string; + /** + * Boolean value indicating whether to opt-in to the [Esri User Experience Improvement (EUEI) program](https://doc.arcgis.com/en/arcgis-online/reference/faq.htm#ESRI_QUESTIONANSWER_AED97F28DCD84F7682623C2FA9E5CE49). + * + * [Read more...](https://developers.arcgis.com/javascript/latest/api-reference/esri-portal-Portal.html#eueiEnabled) + * + * @default false + */ + eueiEnabled: boolean; /** * The featured groups for the portal. Returns an array of objects that provide access to the owner and title for each featured group. Each item in this array has the following specification: * @@ -13595,7 +15311,7 @@ declare namespace __esri { interface PortalConstructor { /** - * The Portal class is part of the [ArcGIS Portal API](http://server.arcgis.com/en/portal/) which provides a way to build applications that work with content from [ArcGIS Online](http://www.arcgis.com/home/) or an [ArcGIS Portal API](http://server.arcgis.com/en/portal/). [ArcGIS Portal API](http://server.arcgis.com/en/portal/) is software from Esri that customers can deploy either on-premises or in the cloud. [ArcGIS Online](http://www.arcgis.com/home/) is Esri's Software as a Service offering that represents GIS as a Service and is implemented using the same technology as ArcGIS Portal. + * The Portal class is part of the [ArcGIS Enterprise portal](https://enterprise.arcgis.com/en/portal/) that provides a way to build applications that work with content from [ArcGIS Online](http://www.arcgis.com/home/) or an [ArcGIS Enterprise portal](https://enterprise.arcgis.com/en/portal/). [ArcGIS Enterprise](https://enterprise.arcgis.com/en/portal/) is software from Esri that customers can deploy either on-premises or in the cloud. [ArcGIS Online](http://www.arcgis.com/home/) is Esri's Software as a Service offering that represents GIS as a Service and is implemented using the same technology as ArcGIS Enterprise. * * [Read more...](https://developers.arcgis.com/javascript/latest/api-reference/esri-portal-Portal.html) */ @@ -13779,6 +15495,14 @@ declare namespace __esri { * [Read more...](https://developers.arcgis.com/javascript/latest/api-reference/esri-portal-Portal.html#description) */ description?: string; + /** + * Boolean value indicating whether to opt-in to the [Esri User Experience Improvement (EUEI) program](https://doc.arcgis.com/en/arcgis-online/reference/faq.htm#ESRI_QUESTIONANSWER_AED97F28DCD84F7682623C2FA9E5CE49). + * + * [Read more...](https://developers.arcgis.com/javascript/latest/api-reference/esri-portal-Portal.html#eueiEnabled) + * + * @default false + */ + eueiEnabled?: boolean; /** * The featured groups for the portal. Returns an array of objects that provide access to the owner and title for each featured group. Each item in this array has the following specification: * @@ -14138,7 +15862,7 @@ declare namespace __esri { readonly url: string; /** - * Fetches the current members of the group. This method is only available to members or administrators of the group. View the ArcGIS Portal API REST documentation for the [Group Users](http://resources.arcgis.com/en/help/arcgis-rest-api/index.html#/Group_Users/02r30000006p000000/) for more details. + * Fetches the current members of the group. This method is only available to members or administrators of the group. View the ArcGIS REST API documentation for the [Group Users](https://developers.arcgis.com/rest/users-groups-and-items/group-users.htm) for more details. * * [Read more...](https://developers.arcgis.com/javascript/latest/api-reference/esri-portal-PortalGroup.html#fetchMembers) * @@ -14405,7 +16129,7 @@ declare namespace __esri { */ title: string; /** - * The GIS content type of this item. Example types include Web Map, Map Service, Shapefile, and Web Mapping Application. See the [ArcGIS REST API Items and Items Types Reference](http://resources.arcgis.com/en/help/arcgis-rest-api/index.html#/Items_and_item_types/02r3000000ms000000/) to get an understanding of the item type hierarchy. + * The GIS content type of this item. Example types include Web Map, Map Service, Shapefile, and Web Mapping Application. See the [ArcGIS REST API Items and Items Types Reference](https://developers.arcgis.com/rest/users-groups-and-items/items-and-item-types.htm) to get an understanding of the item type hierarchy. * * [Read more...](https://developers.arcgis.com/javascript/latest/api-reference/esri-portal-PortalItem.html#type) */ @@ -14463,7 +16187,7 @@ declare namespace __esri { * [Read more...](https://developers.arcgis.com/javascript/latest/api-reference/esri-portal-PortalItem.html#fetchRelatedItems) * * @param params See the object specifications table below for the parameters that may be passed as properties in this object. - * @param params.relationshipType The type of relationship between the two items. See [Relationship types](http://resources.arcgis.com/en/help/arcgis-rest-api/index.html#//02r3000000mm000000) for a complete listing of types. + * @param params.relationshipType The type of relationship between the two items. See [Relationship types](https://developers.arcgis.com/rest/users-groups-and-items/relationship-types.htm) for a complete listing of types. * @param params.direction The direction of the relationship. Can either be `forward` (from origin to destination) or `reverse` (from destination to origin). **Possible Values:** forward | reverse * */ @@ -14631,7 +16355,7 @@ declare namespace __esri { */ title?: string; /** - * The GIS content type of this item. Example types include Web Map, Map Service, Shapefile, and Web Mapping Application. See the [ArcGIS REST API Items and Items Types Reference](http://resources.arcgis.com/en/help/arcgis-rest-api/index.html#/Items_and_item_types/02r3000000ms000000/) to get an understanding of the item type hierarchy. + * The GIS content type of this item. Example types include Web Map, Map Service, Shapefile, and Web Mapping Application. See the [ArcGIS REST API Items and Items Types Reference](https://developers.arcgis.com/rest/users-groups-and-items/items-and-item-types.htm) to get an understanding of the item type hierarchy. * * [Read more...](https://developers.arcgis.com/javascript/latest/api-reference/esri-portal-PortalItem.html#type) */ @@ -14653,7 +16377,7 @@ declare namespace __esri { export interface PortalItemFetchRelatedItemsParams extends Object { /** - * The type of relationship between the two items. See [Relationship types](http://resources.arcgis.com/en/help/arcgis-rest-api/index.html#//02r3000000mm000000) for a complete listing of types. + * The type of relationship between the two items. See [Relationship types](https://developers.arcgis.com/rest/users-groups-and-items/relationship-types.htm) for a complete listing of types. * * [Read more...](https://developers.arcgis.com/javascript/latest/api-reference/esri-portal-PortalItem.html#fetchRelatedItems) */ @@ -14702,7 +16426,7 @@ declare namespace __esri { */ num: number; /** - * The query string used for the search. View the [ArcGIS REST API Search Reference](http://resources.arcgis.com/en/help/arcgis-rest-api/index.html#//02r3000000mn000000) for details on constructing a valid query. + * The query string used for the search. View the [ArcGIS REST API Search Reference](https://developers.arcgis.com/rest/users-groups-and-items/search-reference.htm) for details on constructing a valid query. * * [Read more...](https://developers.arcgis.com/javascript/latest/api-reference/esri-portal-PortalQueryParams.html#query) */ @@ -14785,7 +16509,7 @@ declare namespace __esri { */ num?: number; /** - * The query string used for the search. View the [ArcGIS REST API Search Reference](http://resources.arcgis.com/en/help/arcgis-rest-api/index.html#//02r3000000mn000000) for details on constructing a valid query. + * The query string used for the search. View the [ArcGIS REST API Search Reference](https://developers.arcgis.com/rest/users-groups-and-items/search-reference.htm) for details on constructing a valid query. * * [Read more...](https://developers.arcgis.com/javascript/latest/api-reference/esri-portal-PortalQueryParams.html#query) */ @@ -15263,24 +16987,13 @@ declare namespace __esri { * * [Read more...](https://developers.arcgis.com/javascript/latest/api-reference/esri-renderers-ClassBreaksRenderer.html#backgroundFillSymbol) */ - backgroundFillSymbol: FillSymbol; + backgroundFillSymbol: FillSymbol | PolygonSymbol3D; /** * Each element in the array is an object that provides information about a class break associated with the renderer. Each object has the following specification: * * [Read more...](https://developers.arcgis.com/javascript/latest/api-reference/esri-renderers-ClassBreaksRenderer.html#classBreakInfos) */ classBreakInfos: ClassBreaksRendererClassBreakInfos[]; - /** - * The classification method used to generate class breaks if the renderer was generated with either of the two following methods: - * * [colorRendererCreator.createClassBreaksRenderer()](https://developers.arcgis.com/javascript/latest/api-reference/esri-renderers-smartMapping-creators-color.html#createClassBreaksRenderer) - * * [sizeRendererCreator.createClassBreaksRenderer()](https://developers.arcgis.com/javascript/latest/api-reference/esri-renderers-smartMapping-creators-size.html#createClassBreaksRenderer) - * - * - * **Known Values:** equal-interval | natural-breaks | quantile | standard-deviation - * - * [Read more...](https://developers.arcgis.com/javascript/latest/api-reference/esri-renderers-ClassBreaksRenderer.html#classificationMethod) - */ - classificationMethod: string; /** * The default symbol assigned to features with a value not matched to a given break. If `null`, unmatched features will not be assigned a symbol. * > **Known Limitations** SceneLayers with a `mesh` [geometryType](https://developers.arcgis.com/javascript/latest/api-reference/esri-layers-SceneLayer.html#geometryType) will display unmatching features with a generic symbol even if the `defaultSymbol` is `null`. @@ -15413,24 +17126,13 @@ declare namespace __esri { * * [Read more...](https://developers.arcgis.com/javascript/latest/api-reference/esri-renderers-ClassBreaksRenderer.html#backgroundFillSymbol) */ - backgroundFillSymbol?: FillSymbolProperties; + backgroundFillSymbol?: FillSymbolProperties | PolygonSymbol3DProperties; /** * Each element in the array is an object that provides information about a class break associated with the renderer. Each object has the following specification: * * [Read more...](https://developers.arcgis.com/javascript/latest/api-reference/esri-renderers-ClassBreaksRenderer.html#classBreakInfos) */ classBreakInfos?: ClassBreaksRendererClassBreakInfos[]; - /** - * The classification method used to generate class breaks if the renderer was generated with either of the two following methods: - * * [colorRendererCreator.createClassBreaksRenderer()](https://developers.arcgis.com/javascript/latest/api-reference/esri-renderers-smartMapping-creators-color.html#createClassBreaksRenderer) - * * [sizeRendererCreator.createClassBreaksRenderer()](https://developers.arcgis.com/javascript/latest/api-reference/esri-renderers-smartMapping-creators-size.html#createClassBreaksRenderer) - * - * - * **Known Values:** equal-interval | natural-breaks | quantile | standard-deviation - * - * [Read more...](https://developers.arcgis.com/javascript/latest/api-reference/esri-renderers-ClassBreaksRenderer.html#classificationMethod) - */ - classificationMethod?: string; /** * The default symbol assigned to features with a value not matched to a given break. If `null`, unmatched features will not be assigned a symbol. * > **Known Limitations** SceneLayers with a `mesh` [geometryType](https://developers.arcgis.com/javascript/latest/api-reference/esri-layers-SceneLayer.html#geometryType) will display unmatching features with a generic symbol even if the `defaultSymbol` is `null`. @@ -16915,13 +18617,13 @@ declare namespace __esri { */ interface color { /** - * Generates a [ClassBreaksRenderer](https://developers.arcgis.com/javascript/latest/api-reference/esri-renderers-ClassBreaksRenderer.html) that may be applied directly to the layer used to call this method. The resulting renderer defines the symbol color of each feature based on the value of the given `field` value. A default color scheme is determined based on the given `basemap`. Depending on the `classificationMethod`, class breaks (or data ranges) are generated based on the statistics of the data. Each feature is assigned a color based on the class break in which the value of the `field` falls. In most cases you will provide a `layer`, `basemap`, `field`, and `classificationMethod` to generate this renderer. This is a scenario in which the statistics of the data aren't well known and the user doesn't know what colors to use in the visualization. The other options are provided for convenience for more involved custom visualization authoring applications. + * Generates a [ClassBreaksRenderer](https://developers.arcgis.com/javascript/latest/api-reference/esri-renderers-ClassBreaksRenderer.html) that may be applied directly to the layer used to call this method. The resulting renderer defines the symbol color of each feature based on the value of the given `field` value. A default color scheme is determined based on the given `basemap`. Depending on the `classificationMethod`, class breaks (or data ranges) are generated based on the statistics of the data. Each feature is assigned a color based on the class break in which the value of the `field` falls. In most cases you will provide a `layer`, `basemap`, `field`, and `classificationMethod` to generate this renderer. This is a scenario in which the statistics of the data aren't well known and the user doesn't know what colors to use in the visualization. You can also use a `valueExpression` instead of a `field` to visualize features based on a value returned from a script executed at runtime. The other options are provided for convenience for more involved custom visualization authoring applications. * * [Read more...](https://developers.arcgis.com/javascript/latest/api-reference/esri-renderers-smartMapping-creators-color.html#createClassBreaksRenderer) * * @param params Input parameters for generating a classed color visualization based on data returned from a given field or expression. See the table below for details of each parameter. * @param params.layer The layer for which the visualization is generated. - * @param params.field The name of the field whose data will be queried for statistics and classified. + * @param params.field The name of the field whose data will be queried for statistics and classified. This property is ignored if a `valueExpression` is used. * @param params.normalizationField The name of the field to normalize the values of the given `field`. Providing a normalization field helps minimize some visualization errors and standardizes the data so all features are visualized with minimal bias due to area differences or count variation. This option is commonly used when visualizing densities. * @param params.normalizationType With the exception of `log` normalization, data normalization creates a ratio by dividing two values. When comparing attribute values between features, normalization minimizes the effect of varying map areas and the number of observations. For example, dividing the 18 to 30 year old population by the area of a polygon feature yields a density value that can be compared evenly with other features, regardless of their size. * Indicates how the data is normalized. The data value obtained from the `field` is normalized in one of the following ways before it is compared with the class breaks. See the table below for a list of possible values. @@ -16933,7 +18635,7 @@ declare namespace __esri { * percent-of-total | Divides the data value by the sum of all data values then multiplies by 100. Use `normalizationTotal` to define the total value by which to normalize. This value is set by default if the `normalizationTotal` is provided. * * @param params.normalizationTotal When `normalizationType` is `percent-of-total`, this property contains the total of all data values. - * @param params.basemap The [named string](https://developers.arcgis.com/javascript/latest/api-reference/esri-Map.html#basemap) of the Esri basemap or basemap object that will be paired with the output visualization. + * @param params.basemap The [named string](https://developers.arcgis.com/javascript/latest/api-reference/esri-Map.html#basemap) or basemap object of the Esri basemap that will be paired with the output visualization. * @param params.classificationMethod * The classification method used for generating breaks. See the table below for a list of possible values. * @@ -16946,11 +18648,15 @@ declare namespace __esri { * @param params.standardDeviationInterval If a `standard-deviation` classification method is used, then this indicates the interval by which to generate class breaks. **Possible Values:** 1 | 0.5 | 0.33 | 0.25 * @param params.numClasses The number of class breaks to generate. This is ignored if a `standard-deviation` classification method is specified. * @param params.colorScheme In authoring apps, the user may select a pre-defined color scheme. Pass the scheme object to this property to avoid getting one based on the `basemap`. + * @param params.valueExpression An [Arcade](https://developers.arcgis.com/javascript/latest/guide/arcade/index.html) expression that returns a number. This expression can reference field values using the `$feature` global variable. This property overrides the `field` property and therefore is used instead of an input `field` value. + * @param params.valueExpressionTitle Text describing the value returned from the `valueExpression`. This is used by the [Legend](https://developers.arcgis.com/javascript/latest/api-reference/esri-widgets-Legend.html) widget. + * @param params.sqlExpression A SQL expression evaluating to a number. This option only applies to service-based FeatureLayers. + * @param params.sqlWhere A SQL where clause used to filter features for the statistics query. For example, this is useful in situations where you want to avoid dividing by zero as is the case with creating a predominance visualization. * @param params.legendOptions Provides options for setting a title to describe a field instead of using the field name. This title will represent the field in the [Legend](https://developers.arcgis.com/javascript/latest/api-reference/esri-widgets-Legend.html). * @param params.minValue A minimum value set by the user. Use this in conjunction with `maxValue` to generate class breaks between lower and upper bounds. This will be the lower bound of the lowest class break. * @param params.maxValue A maximum value set by the user. Use this in conjunction with `minValue` to generate class breaks between lower and upper bounds. This will be the upper bound of the highest class break. * @param params.defaultSymbolEnabled Enables the `defaultSymbol` on the renderer and assigns it to features with no value and features that do not fall within the configured data range. - * @param params.view The SceneView instance in which the visualization will be rendered. This parameter is required if `symbolType = "3d-volumetric"`, but isn't required for layers with a `mesh` geometry type. + * @param params.view The view instance in which the visualization will be rendered. A [SceneView](https://developers.arcgis.com/javascript/latest/api-reference/esri-views-SceneView.html) is required if `symbolType = "3d-volumetric"` or `3d-volumetric-uniform`. The relevant SceneView or [MapView](https://developers.arcgis.com/javascript/latest/api-reference/esri-views-MapView.html) is required when a `valueExpression` is specified. * @param params.symbolType * The type of symbol to generate. This depends on the view in which you are working and the desired visualization. This parameter does not need to be specified for layers with a `mesh` geometry type. Known values are described below. * @@ -16971,15 +18677,15 @@ declare namespace __esri { */ createClassBreaksRenderer(params: colorCreateClassBreaksRendererParams): IPromise; /** - * Generates a [Renderer](https://developers.arcgis.com/javascript/latest/api-reference/esri-renderers-Renderer.html) that may be applied directly to the layer used to call this method. The renderer contains a continuous color visual variable that maps optimal colors based on the indicated basemap to specific stop values based on queried statistics from the indicated field or expression. In most cases you will provide a `layer`, `basemap`, `field`, and `theme` to generate this renderer. This is a scenario in which the statistics of the data aren't well known and the user doesn't know what colors to use in the visualization. The other options are provided for convenience for more involved custom visualization authoring applications. For example, if you already generated statistics in another operation, you can pass the statistics object to the `statistics` parameter to avoid making an extra call to the server. + * Generates a [Renderer](https://developers.arcgis.com/javascript/latest/api-reference/esri-renderers-Renderer.html) that may be applied directly to the layer used to call this method. The renderer contains a continuous color visual variable that maps optimal colors based on the indicated basemap to specific stop values based on queried statistics from the indicated field or expression. In most cases you will provide a `layer`, `basemap`, `field`, and `theme` to generate this renderer. This is a scenario in which the statistics of the data aren't well known and the user doesn't know what colors to use in the visualization. You can also use a `valueExpression` instead of a `field` to visualize features based on a value returned from a script executed at runtime. The other options are provided for convenience for more involved custom visualization authoring applications. For example, if you already generated statistics in another operation, you can pass the statistics object to the `statistics` parameter to avoid making an extra call to the server. * * [Read more...](https://developers.arcgis.com/javascript/latest/api-reference/esri-renderers-smartMapping-creators-color.html#createContinuousRenderer) * * @param params Input parameters for generating a continuous color visualization based on data returned from a given field or expression. See the table below for details of each parameter. * @param params.layer The layer for which the visualization is generated. - * @param params.field The name of the field whose data will be queried for statistics and used for the basis of the data-driven visualization. + * @param params.field The name of the field whose data will be queried for statistics and used for the basis of the data-driven visualization. This property is ignored if a `valueExpression` is used. * @param params.normalizationField The name of the field to normalize the values of the given `field`. Providing a normalization field helps minimize some visualization errors and standardizes the data so all features are visualized with minimal bias due to area differences or count variation. This option is commonly used when visualizing densities. - * @param params.basemap The [named string](https://developers.arcgis.com/javascript/latest/api-reference/esri-Map.html#basemap) of the Esri basemap or basemap object that will be paired with the output visualization. + * @param params.basemap The [named string](https://developers.arcgis.com/javascript/latest/api-reference/esri-Map.html#basemap) or basemap object of the Esri basemap that will be paired with the output visualization. * @param params.theme * Determines which values will be emphasized in the continuous ramp and the map. Valid values are listed below. * @@ -16990,12 +18696,16 @@ declare namespace __esri { * | centered-on | Values centered around a given point (e.g. the average) are emphasized with strong colors while other values are visualized with weak colors. | ![centered-on](https://developers.arcgis.com/javascript/latest/assets/img/apiref/renderers/sm-centered-on.png) | * | extremes | High and low values are emphasized with strong colors. All others are visualized with weak colors. | ![extremes](https://developers.arcgis.com/javascript/latest/assets/img/apiref/renderers/sm-extremes.png) | * @param params.colorScheme In authoring apps, the user may select a pre-defined color scheme. Pass the scheme object to this property to avoid getting one based on a `theme` and the `basemap`. + * @param params.valueExpression An [Arcade](https://developers.arcgis.com/javascript/latest/guide/arcade/index.html) expression that returns a number. This expression can reference field values using the `$feature` global variable. This property overrides the `field` property and therefore is used instead of an input `field` value. + * @param params.valueExpressionTitle Text describing the value returned from the `valueExpression`. This is used by the [Legend](https://developers.arcgis.com/javascript/latest/api-reference/esri-widgets-Legend.html) widget. + * @param params.sqlExpression A SQL expression evaluating to a number. This parameter is only supported for service-based FeatureLayers. + * @param params.sqlWhere A SQL where clause used to filter features for the statistics query. For example, this is useful in situations where you want to avoid dividing by zero as is the case with creating a predominance visualization. * @param params.legendOptions Provides options for setting a title to a field when an expression is provided instead of a field name. This title will represent the field in the [Legend](https://developers.arcgis.com/javascript/latest/api-reference/esri-widgets-Legend.html). * @param params.statistics A statistics object generated from the [summaryStatistics](https://developers.arcgis.com/javascript/latest/api-reference/esri-renderers-smartMapping-statistics-summaryStatistics.html) function. If statistics for the field have already been generated, then pass the object here to avoid making a second statistics query to the server. * @param params.minValue A custom minimum value set by the user. Use this in conjunction with `maxValue` to generate statistics between lower and upper bounds. This will be the lowest stop in the returned color visual variable. * @param params.maxValue A custom maximum value set by the user. Use this in conjunction with `minValue` to generate statistics between lower and upper bounds. This will be the uppermost stop in the returned color visual variable. * @param params.defaultSymbolEnabled Enables the `defaultSymbol` on the renderer and assigns it to features with no value and features that do not fall within the configured data range. - * @param params.view The SceneView instance in which the visualization will be rendered. This parameter is required if `symbolType = "3d-volumetric"`, but isn't required for layers with a `mesh` geometry type. + * @param params.view The view instance in which the visualization will be rendered. A [SceneView](https://developers.arcgis.com/javascript/latest/api-reference/esri-views-SceneView.html) is required if `symbolType = "3d-volumetric"` or `3d-volumetric-uniform`. The relevant SceneView or [MapView](https://developers.arcgis.com/javascript/latest/api-reference/esri-views-MapView.html) is required when a `valueExpression` is specified. * @param params.symbolType * The type of symbol to generate. This depends on the view in which you are working and the desired visualization. This parameter does not need to be specified for layers with a `mesh` geometry type. Known values are described below. * @@ -17023,7 +18733,7 @@ declare namespace __esri { * @param params Input parameters for generating a renderer based on the given field of the input layer. See the table below for details of each parameter. * @param params.layer The layer for which the visualization is generated. * @param params.field The name of the field whose data will be queried for statistics and used for the basis of the data-driven visualization. The only field names used for this renderer type are `elevation` and `intensity`. - * @param params.basemap The [named string](https://developers.arcgis.com/javascript/latest/api-reference/esri-Map.html#basemap) of the Esri basemap or basemap object that will be paired with the output visualization. + * @param params.basemap The [named string](https://developers.arcgis.com/javascript/latest/api-reference/esri-Map.html#basemap) or basemap object of the Esri basemap that will be paired with the output visualization. * @param params.size The size of each point expressed as a percentage. This value will determine point sizes scaled based on the given `density` of points. When the value is `100%`, the size of each point is set so that it minimizes the number of gaps between neighboring points. Any value above `100%` will allow for points to overlap neighboring points scaled to the given value. Values below `100%` scale point sizes smaller so there appear to be more gaps between points. * @param params.density The number of points per inch in the view. * @param params.colorScheme In authoring apps, the user may select a pre-defined color scheme. Pass the scheme object to this property to avoid getting one based on the `basemap`. @@ -17044,15 +18754,15 @@ declare namespace __esri { */ createPCTrueColorRenderer(params: colorCreatePCTrueColorRendererParams): IPromise; /** - * This method generates a color visual variable with default stops that are optimally chosen based on the statistics queried for the indicated field or expression and colors based on the input basemap. There are two different ways this method may be called. The most common case is by providing a `layer`, `basemap`, `field`, and `theme`. This is the scenario where the statistics of the data aren't well known and the user doesn't know what colors to use. The other options are provided for convenience for more involved custom visualization authoring applications. For example, if you already generated statistics in another operation, you can pass the object in the `statistics` parameter to avoid making an extra call to the server. You can also provide a `colorScheme` if you don't want one picked for you. In this case the `basemap` and `theme` options would be ignored. + * This method generates a color visual variable with default stops that are optimally chosen based on the statistics queried for the indicated field or expression and colors based on the input basemap. There are two different ways this method may be called. The most common case is by providing a `layer`, `basemap`, `field`, and `theme`. This is the scenario where the statistics of the data aren't well known and the user doesn't know what colors to use. You can optionally use a `valueExpression` instead of a field to visualize features based on a numeric value returned from a script executed at runtime. The other options are provided for convenience for more involved custom visualization authoring applications. For example, if you already generated statistics in another operation, you can pass the object in the `statistics` parameter to avoid making an extra call to the server. You can also provide a `colorScheme` if you don't want one picked for you. In this case the `basemap` and `theme` options would be ignored. * * [Read more...](https://developers.arcgis.com/javascript/latest/api-reference/esri-renderers-smartMapping-creators-color.html#createVisualVariable) * * @param params Input parameters for generating a color visual variable based on data returned from a given field or expression. See the table below for details of each parameter. * @param params.layer The layer for which the visual variable is generated. - * @param params.field The name of the field whose data will be queried for statistics and used for the basis of the data-driven visualization. + * @param params.field The name of the field whose data will be queried for statistics and used for the basis of the data-driven visualization. This property is ignored if a `valueExpression` is used. * @param params.normalizationField The name of the field to normalize the values of the given `field`. Providing a normalization field helps minimize some visualization errors and standardizes the data so all features are visualized with minimal bias due to area differences or count variation. This option is commonly used when visualizing densities. - * @param params.basemap The [named string](https://developers.arcgis.com/javascript/latest/api-reference/esri-Map.html#basemap) of the Esri basemap or basemap object that will be paired with the output visualization. + * @param params.basemap The [named string](https://developers.arcgis.com/javascript/latest/api-reference/esri-Map.html#basemap) or basemap object of the Esri basemap that will be paired with the output visualization. * @param params.theme * Determines which values will be emphasized in the continuous ramp and the map. Valid values are listed below. * @@ -17063,11 +18773,15 @@ declare namespace __esri { * | centered-on | Values centered around a given point (e.g. the average) are emphasized with strong colors while other values are visualized with weak colors. | ![centered-on](https://developers.arcgis.com/javascript/latest/assets/img/apiref/renderers/sm-centered-on.png) | * | extremes | High and low values are emphasized with strong colors. All others are visualized with weak colors. | ![extremes](https://developers.arcgis.com/javascript/latest/assets/img/apiref/renderers/sm-extremes.png) | * @param params.colorScheme In authoring apps, the user may select a pre-defined color scheme. Pass the scheme object to this property to avoid getting one based on a `theme` and the `basemap`. + * @param params.valueExpression An [Arcade](https://developers.arcgis.com/javascript/latest/guide/arcade/index.html) expression that returns a number. This expression can reference field values using the `$feature` global variable. This property overrides the `field` property and therefore is used instead of an input `field` value. + * @param params.valueExpressionTitle Text describing the value returned from the `valueExpression`. This is used by the [Legend](https://developers.arcgis.com/javascript/latest/api-reference/esri-widgets-Legend.html) widget. + * @param params.sqlExpression A SQL expression evaluating to a number. This parameter only applies to service-based FeatureLayers. + * @param params.sqlWhere A SQL where clause used to filter features for the statistics query. For example, this is useful in situations where you want to avoid dividing by zero as is the case with creating a predominance visualization. * @param params.legendOptions Provides options for setting a title to a field when an expression is provided instead of a field name. This title will represent the field in the [Legend](https://developers.arcgis.com/javascript/latest/api-reference/esri-widgets-Legend.html). * @param params.statistics A statistics object generated from the [summaryStatistics](https://developers.arcgis.com/javascript/latest/api-reference/esri-renderers-smartMapping-statistics-summaryStatistics.html) function. If statistics for the field have already been generated, then pass the object here to avoid making a second statistics query to the server. * @param params.minValue A custom minimum value set by the user. Use this in conjunction with `maxValue` to generate statistics between lower and upper bounds. This will be the lowest stop in the returned color visual variable. * @param params.maxValue A custom maximum value set by the user. Use this in conjunction with `minValue` to generate statistics between lower and upper bounds. This will be the uppermost stop in the returned color visual variable. - * @param params.view The SceneView instance in which the visualization will be rendered. This property is only applicable to generating visualizations with 3D symbols, except for layers with a `mesh` geometry type. + * @param params.view When generating 3D symbols (except for layers with a `mesh` geometry type), a [SceneView](https://developers.arcgis.com/javascript/latest/api-reference/esri-views-SceneView.html) instance is required. The relevant SceneView or [MapView](https://developers.arcgis.com/javascript/latest/api-reference/esri-views-MapView.html) is required when a `valueExpression` is specified. * @param params.worldScale Indicates if the size units of the symbols will be in meters. This should be `true` when generating visualizations with 3D volumetric symbology, except for layers with a `mesh` geometry type. A `view` must be provided if this property is set to `true`. * */ @@ -17121,13 +18835,13 @@ declare namespace __esri { * * [Read more...](https://developers.arcgis.com/javascript/latest/api-reference/esri-renderers-smartMapping-creators-color.html#createClassBreaksRenderer) */ - layer: FeatureLayer | SceneLayer; + layer: FeatureLayer | SceneLayer | CSVLayer; /** - * The name of the field whose data will be queried for statistics and classified. + * The name of the field whose data will be queried for statistics and classified. This property is ignored if a `valueExpression` is used. * * [Read more...](https://developers.arcgis.com/javascript/latest/api-reference/esri-renderers-smartMapping-creators-color.html#createClassBreaksRenderer) */ - field: string; + field?: string; /** * The name of the field to normalize the values of the given `field`. Providing a normalization field helps minimize some visualization errors and standardizes the data so all features are visualized with minimal bias due to area differences or count variation. This option is commonly used when visualizing densities. * @@ -17155,7 +18869,7 @@ declare namespace __esri { */ normalizationTotal?: number; /** - * The [named string](https://developers.arcgis.com/javascript/latest/api-reference/esri-Map.html#basemap) of the Esri basemap or basemap object that will be paired with the output visualization. + * The [named string](https://developers.arcgis.com/javascript/latest/api-reference/esri-Map.html#basemap) or basemap object of the Esri basemap that will be paired with the output visualization. * * [Read more...](https://developers.arcgis.com/javascript/latest/api-reference/esri-renderers-smartMapping-creators-color.html#createClassBreaksRenderer) * @@ -17200,6 +18914,30 @@ declare namespace __esri { * [Read more...](https://developers.arcgis.com/javascript/latest/api-reference/esri-renderers-smartMapping-creators-color.html#createClassBreaksRenderer) */ colorScheme?: ColorScheme; + /** + * An [Arcade](https://developers.arcgis.com/javascript/latest/guide/arcade/index.html) expression that returns a number. This expression can reference field values using the `$feature` global variable. This property overrides the `field` property and therefore is used instead of an input `field` value. + * + * [Read more...](https://developers.arcgis.com/javascript/latest/api-reference/esri-renderers-smartMapping-creators-color.html#createClassBreaksRenderer) + */ + valueExpression?: string; + /** + * Text describing the value returned from the `valueExpression`. This is used by the [Legend](https://developers.arcgis.com/javascript/latest/api-reference/esri-widgets-Legend.html) widget. + * + * [Read more...](https://developers.arcgis.com/javascript/latest/api-reference/esri-renderers-smartMapping-creators-color.html#createClassBreaksRenderer) + */ + valueExpressionTitle?: string; + /** + * A SQL expression evaluating to a number. This option only applies to service-based FeatureLayers. + * + * [Read more...](https://developers.arcgis.com/javascript/latest/api-reference/esri-renderers-smartMapping-creators-color.html#createClassBreaksRenderer) + */ + sqlExpression?: string; + /** + * A SQL where clause used to filter features for the statistics query. For example, this is useful in situations where you want to avoid dividing by zero as is the case with creating a predominance visualization. + * + * [Read more...](https://developers.arcgis.com/javascript/latest/api-reference/esri-renderers-smartMapping-creators-color.html#createClassBreaksRenderer) + */ + sqlWhere?: string; /** * Provides options for setting a title to describe a field instead of using the field name. This title will represent the field in the [Legend](https://developers.arcgis.com/javascript/latest/api-reference/esri-widgets-Legend.html). * @@ -17227,11 +18965,11 @@ declare namespace __esri { */ defaultSymbolEnabled?: boolean; /** - * The SceneView instance in which the visualization will be rendered. This parameter is required if `symbolType = "3d-volumetric"`, but isn't required for layers with a `mesh` geometry type. + * The view instance in which the visualization will be rendered. A [SceneView](https://developers.arcgis.com/javascript/latest/api-reference/esri-views-SceneView.html) is required if `symbolType = "3d-volumetric"` or `3d-volumetric-uniform`. The relevant SceneView or [MapView](https://developers.arcgis.com/javascript/latest/api-reference/esri-views-MapView.html) is required when a `valueExpression` is specified. * * [Read more...](https://developers.arcgis.com/javascript/latest/api-reference/esri-renderers-smartMapping-creators-color.html#createClassBreaksRenderer) */ - view?: SceneView; + view?: View; /** * The type of symbol to generate. This depends on the view in which you are working and the desired visualization. This parameter does not need to be specified for layers with a `mesh` geometry type. Known values are described below. * @@ -17281,13 +19019,13 @@ declare namespace __esri { * * [Read more...](https://developers.arcgis.com/javascript/latest/api-reference/esri-renderers-smartMapping-creators-color.html#createContinuousRenderer) */ - layer: FeatureLayer | SceneLayer; + layer: FeatureLayer | SceneLayer | CSVLayer; /** - * The name of the field whose data will be queried for statistics and used for the basis of the data-driven visualization. + * The name of the field whose data will be queried for statistics and used for the basis of the data-driven visualization. This property is ignored if a `valueExpression` is used. * * [Read more...](https://developers.arcgis.com/javascript/latest/api-reference/esri-renderers-smartMapping-creators-color.html#createContinuousRenderer) */ - field: string; + field?: string; /** * The name of the field to normalize the values of the given `field`. Providing a normalization field helps minimize some visualization errors and standardizes the data so all features are visualized with minimal bias due to area differences or count variation. This option is commonly used when visualizing densities. * @@ -17295,7 +19033,7 @@ declare namespace __esri { */ normalizationField?: string; /** - * The [named string](https://developers.arcgis.com/javascript/latest/api-reference/esri-Map.html#basemap) of the Esri basemap or basemap object that will be paired with the output visualization. + * The [named string](https://developers.arcgis.com/javascript/latest/api-reference/esri-Map.html#basemap) or basemap object of the Esri basemap that will be paired with the output visualization. * * [Read more...](https://developers.arcgis.com/javascript/latest/api-reference/esri-renderers-smartMapping-creators-color.html#createContinuousRenderer) * @@ -17322,6 +19060,30 @@ declare namespace __esri { * [Read more...](https://developers.arcgis.com/javascript/latest/api-reference/esri-renderers-smartMapping-creators-color.html#createContinuousRenderer) */ colorScheme?: ColorScheme; + /** + * An [Arcade](https://developers.arcgis.com/javascript/latest/guide/arcade/index.html) expression that returns a number. This expression can reference field values using the `$feature` global variable. This property overrides the `field` property and therefore is used instead of an input `field` value. + * + * [Read more...](https://developers.arcgis.com/javascript/latest/api-reference/esri-renderers-smartMapping-creators-color.html#createContinuousRenderer) + */ + valueExpression?: string; + /** + * Text describing the value returned from the `valueExpression`. This is used by the [Legend](https://developers.arcgis.com/javascript/latest/api-reference/esri-widgets-Legend.html) widget. + * + * [Read more...](https://developers.arcgis.com/javascript/latest/api-reference/esri-renderers-smartMapping-creators-color.html#createContinuousRenderer) + */ + valueExpressionTitle?: string; + /** + * A SQL expression evaluating to a number. This parameter is only supported for service-based FeatureLayers. + * + * [Read more...](https://developers.arcgis.com/javascript/latest/api-reference/esri-renderers-smartMapping-creators-color.html#createContinuousRenderer) + */ + sqlExpression?: string; + /** + * A SQL where clause used to filter features for the statistics query. For example, this is useful in situations where you want to avoid dividing by zero as is the case with creating a predominance visualization. + * + * [Read more...](https://developers.arcgis.com/javascript/latest/api-reference/esri-renderers-smartMapping-creators-color.html#createContinuousRenderer) + */ + sqlWhere?: string; /** * Provides options for setting a title to a field when an expression is provided instead of a field name. This title will represent the field in the [Legend](https://developers.arcgis.com/javascript/latest/api-reference/esri-widgets-Legend.html). * @@ -17355,11 +19117,11 @@ declare namespace __esri { */ defaultSymbolEnabled?: boolean; /** - * The SceneView instance in which the visualization will be rendered. This parameter is required if `symbolType = "3d-volumetric"`, but isn't required for layers with a `mesh` geometry type. + * The view instance in which the visualization will be rendered. A [SceneView](https://developers.arcgis.com/javascript/latest/api-reference/esri-views-SceneView.html) is required if `symbolType = "3d-volumetric"` or `3d-volumetric-uniform`. The relevant SceneView or [MapView](https://developers.arcgis.com/javascript/latest/api-reference/esri-views-MapView.html) is required when a `valueExpression` is specified. * * [Read more...](https://developers.arcgis.com/javascript/latest/api-reference/esri-renderers-smartMapping-creators-color.html#createContinuousRenderer) */ - view?: SceneView; + view?: View; /** * The type of symbol to generate. This depends on the view in which you are working and the desired visualization. This parameter does not need to be specified for layers with a `mesh` geometry type. Known values are described below. * @@ -17423,7 +19185,7 @@ declare namespace __esri { */ field: string; /** - * The [named string](https://developers.arcgis.com/javascript/latest/api-reference/esri-Map.html#basemap) of the Esri basemap or basemap object that will be paired with the output visualization. + * The [named string](https://developers.arcgis.com/javascript/latest/api-reference/esri-Map.html#basemap) or basemap object of the Esri basemap that will be paired with the output visualization. * * [Read more...](https://developers.arcgis.com/javascript/latest/api-reference/esri-renderers-smartMapping-creators-color.html#createPCContinuousRenderer) * @@ -17493,13 +19255,13 @@ declare namespace __esri { * * [Read more...](https://developers.arcgis.com/javascript/latest/api-reference/esri-renderers-smartMapping-creators-color.html#createVisualVariable) */ - layer: FeatureLayer | SceneLayer; + layer: FeatureLayer | SceneLayer | CSVLayer; /** - * The name of the field whose data will be queried for statistics and used for the basis of the data-driven visualization. + * The name of the field whose data will be queried for statistics and used for the basis of the data-driven visualization. This property is ignored if a `valueExpression` is used. * * [Read more...](https://developers.arcgis.com/javascript/latest/api-reference/esri-renderers-smartMapping-creators-color.html#createVisualVariable) */ - field: string; + field?: string; /** * The name of the field to normalize the values of the given `field`. Providing a normalization field helps minimize some visualization errors and standardizes the data so all features are visualized with minimal bias due to area differences or count variation. This option is commonly used when visualizing densities. * @@ -17507,7 +19269,7 @@ declare namespace __esri { */ normalizationField?: string; /** - * The [named string](https://developers.arcgis.com/javascript/latest/api-reference/esri-Map.html#basemap) of the Esri basemap or basemap object that will be paired with the output visualization. + * The [named string](https://developers.arcgis.com/javascript/latest/api-reference/esri-Map.html#basemap) or basemap object of the Esri basemap that will be paired with the output visualization. * * [Read more...](https://developers.arcgis.com/javascript/latest/api-reference/esri-renderers-smartMapping-creators-color.html#createVisualVariable) * @@ -17534,6 +19296,30 @@ declare namespace __esri { * [Read more...](https://developers.arcgis.com/javascript/latest/api-reference/esri-renderers-smartMapping-creators-color.html#createVisualVariable) */ colorScheme?: ColorScheme; + /** + * An [Arcade](https://developers.arcgis.com/javascript/latest/guide/arcade/index.html) expression that returns a number. This expression can reference field values using the `$feature` global variable. This property overrides the `field` property and therefore is used instead of an input `field` value. + * + * [Read more...](https://developers.arcgis.com/javascript/latest/api-reference/esri-renderers-smartMapping-creators-color.html#createVisualVariable) + */ + valueExpression?: string; + /** + * Text describing the value returned from the `valueExpression`. This is used by the [Legend](https://developers.arcgis.com/javascript/latest/api-reference/esri-widgets-Legend.html) widget. + * + * [Read more...](https://developers.arcgis.com/javascript/latest/api-reference/esri-renderers-smartMapping-creators-color.html#createVisualVariable) + */ + valueExpressionTitle?: string; + /** + * A SQL expression evaluating to a number. This parameter only applies to service-based FeatureLayers. + * + * [Read more...](https://developers.arcgis.com/javascript/latest/api-reference/esri-renderers-smartMapping-creators-color.html#createVisualVariable) + */ + sqlExpression?: string; + /** + * A SQL where clause used to filter features for the statistics query. For example, this is useful in situations where you want to avoid dividing by zero as is the case with creating a predominance visualization. + * + * [Read more...](https://developers.arcgis.com/javascript/latest/api-reference/esri-renderers-smartMapping-creators-color.html#createVisualVariable) + */ + sqlWhere?: string; /** * Provides options for setting a title to a field when an expression is provided instead of a field name. This title will represent the field in the [Legend](https://developers.arcgis.com/javascript/latest/api-reference/esri-widgets-Legend.html). * @@ -17559,11 +19345,11 @@ declare namespace __esri { */ maxValue?: number; /** - * The SceneView instance in which the visualization will be rendered. This property is only applicable to generating visualizations with 3D symbols, except for layers with a `mesh` geometry type. + * When generating 3D symbols (except for layers with a `mesh` geometry type), a [SceneView](https://developers.arcgis.com/javascript/latest/api-reference/esri-views-SceneView.html) instance is required. The relevant SceneView or [MapView](https://developers.arcgis.com/javascript/latest/api-reference/esri-views-MapView.html) is required when a `valueExpression` is specified. * * [Read more...](https://developers.arcgis.com/javascript/latest/api-reference/esri-renderers-smartMapping-creators-color.html#createVisualVariable) */ - view?: SceneView; + view?: View; /** * Indicates if the size units of the symbols will be in meters. This should be `true` when generating visualizations with 3D volumetric symbology, except for layers with a `mesh` geometry type. A `view` must be provided if this property is set to `true`. * @@ -17741,7 +19527,7 @@ declare namespace __esri { * * @param params Input parameters for generating a location-based visualization. See the table below for details of each parameter. * @param params.layer The layer for which the visualization is generated. - * @param params.basemap The [named string](https://developers.arcgis.com/javascript/latest/api-reference/esri-Map.html#basemap) of the Esri basemap or basemap object that will be paired with the output visualization. + * @param params.basemap The [named string](https://developers.arcgis.com/javascript/latest/api-reference/esri-Map.html#basemap) or basemap object of the Esri basemap that will be paired with the output visualization. * @param params.locationScheme In authoring apps, the user may select a pre-defined location scheme. Pass the scheme object to this property to avoid getting one based on the `basemap`. * @param params.view The SceneView instance in which the visualization will be rendered. This parameter is required if `symbolType = "3d-volumetric"`, except for layers with a `mesh` geometryType. * @param params.symbolType @@ -17774,9 +19560,9 @@ declare namespace __esri { * * [Read more...](https://developers.arcgis.com/javascript/latest/api-reference/esri-renderers-smartMapping-creators-location.html#createRenderer) */ - layer: FeatureLayer | SceneLayer; + layer: FeatureLayer | SceneLayer | CSVLayer; /** - * The [named string](https://developers.arcgis.com/javascript/latest/api-reference/esri-Map.html#basemap) of the Esri basemap or basemap object that will be paired with the output visualization. + * The [named string](https://developers.arcgis.com/javascript/latest/api-reference/esri-Map.html#basemap) or basemap object of the Esri basemap that will be paired with the output visualization. * * [Read more...](https://developers.arcgis.com/javascript/latest/api-reference/esri-renderers-smartMapping-creators-location.html#createRenderer) * @@ -17860,18 +19646,23 @@ declare namespace __esri { */ interface opacity { /** - * This method generates an opacity visual variable with default alpha values optimally mapped to data values based on the statistics queried for the indicated field or expression. There are several ways this method may be called. The most common case is by providing a `layer` and a `field`. This is the scenario where the statistics of the data aren't well known and the user doesn't know the which alpha values to map to data values. The other options are provided for convenience for more involved custom visualization authoring applications. For example, if you already generated statistics in another operation, you can pass the stats in the `statistics` parameter to avoid making an extra call to the server. + * This method generates an opacity visual variable with default alpha values optimally mapped to data values based on the statistics queried for the indicated field or expression. There are several ways this method may be called. The most common case is by providing a `layer` and a `field`. This is the scenario where the statistics of the data aren't well known and the user doesn't know the which alpha values to map to data values. You can optionally use a `valueExpression` instead of a field to visualize features based on a numeric value returned from a script executed at runtime. The other options are provided for convenience for more involved custom visualization authoring applications. For example, if you already generated statistics in another operation, you can pass the stats in the `statistics` parameter to avoid making an extra call to the server. * * [Read more...](https://developers.arcgis.com/javascript/latest/api-reference/esri-renderers-smartMapping-creators-opacity.html#createVisualVariable) * * @param params Input parameters for generating an opacity visual variable based on data returned from a given field or expression. See the table below for details of each parameter. * @param params.layer The layer for which the visual variable is generated. - * @param params.field The name of the field whose data will be queried for statistics and used for the basis of the data-driven visualization. + * @param params.field The name of the field whose data will be queried for statistics and used for the basis of the data-driven visualization. This property is ignored if a `valueExpression` is used. * @param params.normalizationField The name of the field to normalize the values of the given `field`. Providing a normalization field helps minimize some visualization errors and standardizes the data so all features are visualized with minimal bias due to area differences or count variation. This option is commonly used when visualizing densities. + * @param params.valueExpression An [Arcade](https://developers.arcgis.com/javascript/latest/guide/arcade/index.html) expression that returns a number. This expression can reference field values using the `$feature` global variable. This property overrides the `field` property and therefore is used instead of an input `field` value. + * @param params.valueExpressionTitle Text describing the value returned from the `valueExpression`. This is used by the [Legend](https://developers.arcgis.com/javascript/latest/api-reference/esri-widgets-Legend.html) widget. + * @param params.sqlExpression A SQL expression evaluating to a number. This parameter is only supported for service-based FeatureLayers. + * @param params.sqlWhere A SQL where clause used to filter features for the statistics query. For example, this is useful in situations where you want to avoid dividing by zero as is the case with creating a predominance visualization. * @param params.legendOptions Provides options for setting a title to a field when an expression is provided instead of a field name. This title will represent the field in the [Legend](https://developers.arcgis.com/javascript/latest/api-reference/esri-widgets-Legend.html). * @param params.statistics A statistics object generated from the [summaryStatistics](https://developers.arcgis.com/javascript/latest/api-reference/esri-renderers-smartMapping-statistics-summaryStatistics.html) function. If statistics for the field have already been generated, then pass the object here to avoid making a second statistics query to the server. * @param params.minValue A custom minimum value set by the user. Use this in conjunction with `maxValue` to generate statistics between lower and upper bounds. This will be the lowest stop in the returned visual variable. * @param params.maxValue A custom maximum value set by the user. Use this in conjunction with `minValue` to generate statistics between lower and upper bounds. This will be the uppermost stop in the returned visual variable. + * @param params.view A [SceneView](https://developers.arcgis.com/javascript/latest/api-reference/esri-views-SceneView.html) or [MapView](https://developers.arcgis.com/javascript/latest/api-reference/esri-views-MapView.html) instance is required when a `valueExpression` is specified. * */ createVisualVariable(params: opacityCreateVisualVariableParams): IPromise; @@ -17886,19 +19677,43 @@ declare namespace __esri { * * [Read more...](https://developers.arcgis.com/javascript/latest/api-reference/esri-renderers-smartMapping-creators-opacity.html#createVisualVariable) */ - layer: FeatureLayer | SceneLayer; + layer: FeatureLayer | SceneLayer | CSVLayer; /** - * The name of the field whose data will be queried for statistics and used for the basis of the data-driven visualization. + * The name of the field whose data will be queried for statistics and used for the basis of the data-driven visualization. This property is ignored if a `valueExpression` is used. * * [Read more...](https://developers.arcgis.com/javascript/latest/api-reference/esri-renderers-smartMapping-creators-opacity.html#createVisualVariable) */ - field: string; + field?: string; /** * The name of the field to normalize the values of the given `field`. Providing a normalization field helps minimize some visualization errors and standardizes the data so all features are visualized with minimal bias due to area differences or count variation. This option is commonly used when visualizing densities. * * [Read more...](https://developers.arcgis.com/javascript/latest/api-reference/esri-renderers-smartMapping-creators-opacity.html#createVisualVariable) */ normalizationField?: string; + /** + * An [Arcade](https://developers.arcgis.com/javascript/latest/guide/arcade/index.html) expression that returns a number. This expression can reference field values using the `$feature` global variable. This property overrides the `field` property and therefore is used instead of an input `field` value. + * + * [Read more...](https://developers.arcgis.com/javascript/latest/api-reference/esri-renderers-smartMapping-creators-opacity.html#createVisualVariable) + */ + valueExpression?: string; + /** + * Text describing the value returned from the `valueExpression`. This is used by the [Legend](https://developers.arcgis.com/javascript/latest/api-reference/esri-widgets-Legend.html) widget. + * + * [Read more...](https://developers.arcgis.com/javascript/latest/api-reference/esri-renderers-smartMapping-creators-opacity.html#createVisualVariable) + */ + valueExpressionTitle?: string; + /** + * A SQL expression evaluating to a number. This parameter is only supported for service-based FeatureLayers. + * + * [Read more...](https://developers.arcgis.com/javascript/latest/api-reference/esri-renderers-smartMapping-creators-opacity.html#createVisualVariable) + */ + sqlExpression?: string; + /** + * A SQL where clause used to filter features for the statistics query. For example, this is useful in situations where you want to avoid dividing by zero as is the case with creating a predominance visualization. + * + * [Read more...](https://developers.arcgis.com/javascript/latest/api-reference/esri-renderers-smartMapping-creators-opacity.html#createVisualVariable) + */ + sqlWhere?: string; /** * Provides options for setting a title to a field when an expression is provided instead of a field name. This title will represent the field in the [Legend](https://developers.arcgis.com/javascript/latest/api-reference/esri-widgets-Legend.html). * @@ -17923,6 +19738,12 @@ declare namespace __esri { * [Read more...](https://developers.arcgis.com/javascript/latest/api-reference/esri-renderers-smartMapping-creators-opacity.html#createVisualVariable) */ maxValue?: number; + /** + * A [SceneView](https://developers.arcgis.com/javascript/latest/api-reference/esri-views-SceneView.html) or [MapView](https://developers.arcgis.com/javascript/latest/api-reference/esri-views-MapView.html) instance is required when a `valueExpression` is specified. + * + * [Read more...](https://developers.arcgis.com/javascript/latest/api-reference/esri-renderers-smartMapping-creators-opacity.html#createVisualVariable) + */ + view?: View; } @@ -17974,14 +19795,14 @@ declare namespace __esri { */ interface size { /** - * Generates a [ClassBreaksRenderer](https://developers.arcgis.com/javascript/latest/api-reference/esri-renderers-ClassBreaksRenderer.html) that may be applied directly to the layer used to call this method. The resulting renderer defines the symbol size of each feature based on the value of the given `field` value. A default size scheme is determined based on the given `basemap`. Depending on the `classificationMethod`, class breaks (or data ranges) are generated based on the statistics of the data. Each feature is assigned a color based on the class break in which the value of the `field` falls. In most cases you will provide a `layer`, `basemap`, `field`, and `classificationMethod` to generate this renderer. This is a scenario in which the statistics of the data aren't well known and the user doesn't know what sizes to use in the visualization. The other options are provided for convenience for more involved custom visualization authoring applications. + * Generates a [ClassBreaksRenderer](https://developers.arcgis.com/javascript/latest/api-reference/esri-renderers-ClassBreaksRenderer.html) that may be applied directly to the layer used to call this method. The resulting renderer defines the symbol size of each feature based on the value of the given `field` value. A default size scheme is determined based on the given `basemap`. Depending on the `classificationMethod`, class breaks (or data ranges) are generated based on the statistics of the data. Each feature is assigned a color based on the class break in which the value of the `field` falls. In most cases you will provide a `layer`, `basemap`, `field`, and `classificationMethod` to generate this renderer. This is a scenario in which the statistics of the data aren't well known and the user doesn't know what sizes to use in the visualization. You can also use a `valueExpression` instead of a `field` to visualize features based on a value returned from a script executed at runtime. The other options are provided for convenience for more involved custom visualization authoring applications. * * [Read more...](https://developers.arcgis.com/javascript/latest/api-reference/esri-renderers-smartMapping-creators-size.html#createClassBreaksRenderer) * * @param params Input parameters for generating a classed size visualization based on data returned from a given field or expression. See the table below for details of each parameter. * @param params.layer The layer for which the visualization is generated. - * @param params.basemap The [named string](https://developers.arcgis.com/javascript/latest/api-reference/esri-Map.html#basemap) of the Esri basemap or basemap object that will be paired with the output visualization. - * @param params.field The name of the field whose data will be queried for statistics and classified. + * @param params.basemap The [named string](https://developers.arcgis.com/javascript/latest/api-reference/esri-Map.html#basemap) or basemap object of the Esri basemap that will be paired with the output visualization. + * @param params.field The name of the field whose data will be queried for statistics and classified. This property is ignored if a `valueExpression` is used. * @param params.normalizationField The name of the field to normalize the values of the given `field`. Providing a normalization field helps minimize some visualization errors and standardizes the data so all features are visualized with minimal bias due to area differences or count variation. This option is commonly used when visualizing densities. * @param params.normalizationType With the exception of `log` normalization, data normalization creates a ratio by dividing two values. When comparing attribute values between features, normalization minimizes the effect of varying map areas and the number of observations. For example, dividing the 18 to 30 year old population by the area of a polygon feature yields a density value that can be compared evenly with other features, regardless of their size. * Indicates how the data is normalized. The data value obtained from the `field` is normalized in one of the following ways before it is compared with the class breaks. See the table below for a list of possible values. @@ -18005,11 +19826,15 @@ declare namespace __esri { * @param params.standardDeviationInterval If a `standard-deviation` classification method is used, then this indicates the interval by which to generate class breaks. **Possible Values:** 1 | 0.5 | 0.33 | 0.25 * @param params.numClasses The number of class breaks to generate. This is ignored if a `standard-deviation` classification method is specified. * @param params.sizeScheme In authoring apps, the user may select a pre-defined size scheme. Pass the scheme object to this property to avoid getting one based on the `basemap`. + * @param params.valueExpression An [Arcade](https://developers.arcgis.com/javascript/latest/guide/arcade/index.html) expression that returns a number. This expression can reference field values using the `$feature` global variable. This property overrides the `field` property and therefore is used instead of an input `field` value. + * @param params.valueExpressionTitle Text describing the value returned from the `valueExpression`. This is used by the [Legend](https://developers.arcgis.com/javascript/latest/api-reference/esri-widgets-Legend.html) widget. + * @param params.sqlExpression A SQL expression evaluating to a number. This parameter is only supported for service-based FeatureLayers. + * @param params.sqlWhere A SQL where clause used to filter features for the statistics query. For example, this is useful in situations where you want to avoid dividing by zero as is the case with creating a predominance visualization. * @param params.legendOptions Provides options for setting a title to describe a field instead of using the field name. This title will represent the field in the [Legend](https://developers.arcgis.com/javascript/latest/api-reference/esri-widgets-Legend.html). * @param params.minValue A minimum value set by the user. Use this in conjunction with `maxValue` to generate class breaks between lower and upper bounds. This will be the lower bound of the lowest class break. * @param params.maxValue A maximum value set by the user. Use this in conjunction with `minValue` to generate class breaks between lower and upper bounds. This will be the upper bound of the highest class break. * @param params.defaultSymbolEnabled Enables the `defaultSymbol` on the renderer and assigns it to features with no value and features that do not fall within the configured data range. - * @param params.view The SceneView instance in which the visualization will be rendered. This parameter is required if `symbolType = "3d-volumetric" or "3d-volumetric-uniform"`. + * @param params.view The view instance in which the visualization will be rendered. A [SceneView](https://developers.arcgis.com/javascript/latest/api-reference/esri-views-SceneView.html) is required if `symbolType = "3d-volumetric"` or `3d-volumetric-uniform`. The relevant SceneView or [MapView](https://developers.arcgis.com/javascript/latest/api-reference/esri-views-MapView.html) is required when a `valueExpression` is specified. * @param params.symbolType * The type of symbol to generate. This depends on the view in which you are working and the desired visualization. Known values are described below. * @@ -18023,22 +19848,26 @@ declare namespace __esri { */ createClassBreaksRenderer(params: sizeCreateClassBreaksRendererParams): IPromise; /** - * Generates a [Renderer](https://developers.arcgis.com/javascript/latest/api-reference/esri-renderers-Renderer.html) that may be applied directly to the layer used to call this method. The renderer contains a continuous size visual variable that maps marker sizes to specific stop values based on queried statistics from the indicated field or expression. In most cases you will provide a `layer`, `basemap`, and `field` to generate this renderer. This is a scenario in which the statistics of the data aren't well known and the user doesn't know what colors to use in the visualization. The other options are provided for convenience for more involved custom visualization authoring applications. For example, if you already generated statistics in another operation, you can pass the statistics object to the `statistics` parameter to avoid making an extra call to the server. + * Generates a [Renderer](https://developers.arcgis.com/javascript/latest/api-reference/esri-renderers-Renderer.html) that may be applied directly to the layer used to call this method. The renderer contains a continuous size visual variable that maps marker sizes to specific stop values based on queried statistics from the indicated field or expression. In most cases you will provide a `layer`, `basemap`, and `field` to generate this renderer. This is a scenario in which the statistics of the data aren't well known and the user doesn't know what colors to use in the visualization. You can also use a `valueExpression` instead of a `field` to visualize features based on a value returned from a script executed at runtime. The other options are provided for convenience for more involved custom visualization authoring applications. For example, if you already generated statistics in another operation, you can pass the statistics object to the `statistics` parameter to avoid making an extra call to the server. * * [Read more...](https://developers.arcgis.com/javascript/latest/api-reference/esri-renderers-smartMapping-creators-size.html#createContinuousRenderer) * * @param params Input parameters for generating size visual variables based on data returned from a given field or expression. See the table below for details of each parameter. * @param params.layer The layer for which the renderer is generated. - * @param params.field The name of the field whose data will be queried for statistics and used for the basis of the data-driven visualization. + * @param params.field The name of the field whose data will be queried for statistics and used for the basis of the data-driven visualization. This property is ignored if a `valueExpression` is used. * @param params.normalizationField The name of the field to normalize the values of the given `field`. Providing a normalization field helps minimize some visualization errors and standardizes the data so all features are visualized with minimal bias due to area differences or count variation. This option is commonly used when visualizing densities. - * @param params.basemap The [named string](https://developers.arcgis.com/javascript/latest/api-reference/esri-Map.html#basemap) of the Esri basemap or basemap object that will be paired with the output visualization. + * @param params.basemap The [named string](https://developers.arcgis.com/javascript/latest/api-reference/esri-Map.html#basemap) or basemap object of the Esri basemap that will be paired with the output visualization. * @param params.sizeScheme In authoring apps, the user may select a pre-defined size scheme. Pass the scheme object to this property to avoid getting one based on the `basemap`. + * @param params.valueExpression An [Arcade](https://developers.arcgis.com/javascript/latest/guide/arcade/index.html) expression that returns a number. This expression can reference field values using the `$feature` global variable. This property overrides the `field` property and therefore is used instead of an input `field` value. + * @param params.valueExpressionTitle Text describing the value returned from the `valueExpression`. This is used by the [Legend](https://developers.arcgis.com/javascript/latest/api-reference/esri-widgets-Legend.html) widget. + * @param params.sqlExpression A SQL expression evaluating to a number. This parameter is only supported for service-based FeatureLayers. + * @param params.sqlWhere A SQL where clause used to filter features for the statistics query. For example, this is useful in situations where you want to avoid dividing by zero as is the case with creating a predominance visualization. * @param params.legendOptions Provides options for setting a title to a field when an expression is provided instead of a field name. This title will represent the field in the [Legend](https://developers.arcgis.com/javascript/latest/api-reference/esri-widgets-Legend.html). * @param params.statistics A statistics object generated from the [summaryStatistics](https://developers.arcgis.com/javascript/latest/api-reference/esri-renderers-smartMapping-statistics-summaryStatistics.html) function. If statistics for the field have already been generated, then pass the object here to avoid making a second statistics query to the server. * @param params.minValue A custom minimum value set by the user. Use this in conjunction with `maxValue` to generate statistics between lower and upper bounds. This will be the lowest stop in the returned size visual variable. * @param params.maxValue A custom maximum value set by the user. Use this in conjunction with `minValue` to generate statistics between lower and upper bounds. This will be the uppermost stop in the returned size visual variable. * @param params.defaultSymbolEnabled Enables the `defaultSymbol` on the renderer and assigns it to features with no value and features that do not fall within the configured data range. - * @param params.view The SceneView instance in which the visualization will be rendered. This parameter is required if `symbolType = "3d-volumetric" or "3d-volumetric-uniform"`. + * @param params.view The view instance in which the visualization will be rendered. A [SceneView](https://developers.arcgis.com/javascript/latest/api-reference/esri-views-SceneView.html) is required if `symbolType = "3d-volumetric"` or `3d-volumetric-uniform`. The relevant SceneView or [MapView](https://developers.arcgis.com/javascript/latest/api-reference/esri-views-MapView.html) is required when a `valueExpression` is specified. * @param params.symbolType * The type of symbol to generate. This depends on the view in which you are working and the desired visualization. Known values are described below. * @@ -18052,21 +19881,25 @@ declare namespace __esri { */ createContinuousRenderer(params: sizeCreateContinuousRendererParams): IPromise; /** - * This method generates an array of size visual variables with default stops that are optimally chosen based on the statistics queried for the indicated field or expression and mapped to appropriate sizes. There are two different ways this method may be called. The most common case is by providing a `layer`, `basemap`, and `field`. This is the scenario where the statistics of the data aren't well known and the user doesn't know what colors to use. The other options are provided for convenience for more involved custom visualization authoring applications. For example, if you already generated statistics in another operation, you can pass the object in the `statistics` parameter to avoid making an extra call to the server. You can also provide a `colorScheme` if you don't want one picked for you. In this case the `basemap` and `theme` options would be ignored. The resulting array of visual variables will contain exactly one size visual variable unless the `axis` parameter is set to "height". + * This method generates an array of size visual variables with default stops that are optimally chosen based on the statistics queried for the indicated field or expression and mapped to appropriate sizes. There are two different ways this method may be called. The most common case is by providing a `layer`, `basemap`, and `field`. This is the scenario where the statistics of the data aren't well known and the user doesn't know what colors to use. You can optionally use a `valueExpression` instead of a field to visualize features based on a numeric value returned from a script executed at runtime. The other options are provided for convenience for more involved custom visualization authoring applications. For example, if you already generated statistics in another operation, you can pass the object in the `statistics` parameter to avoid making an extra call to the server. You can also provide a `colorScheme` if you don't want one picked for you. In this case the `basemap` and `theme` options would be ignored. The resulting array of visual variables will contain exactly one size visual variable unless the `axis` parameter is set to "height". * * [Read more...](https://developers.arcgis.com/javascript/latest/api-reference/esri-renderers-smartMapping-creators-size.html#createVisualVariables) * * @param params Input parameters for generating size visual variables based on data returned from a given field or expression. See the table below for details of each parameter. * @param params.layer The layer for which the visual variables are generated. - * @param params.field The name of the field whose data will be queried for statistics and used for the basis of the data-driven visualization. + * @param params.field The name of the field whose data will be queried for statistics and used for the basis of the data-driven visualization. This property is ignored if a `valueExpression` is used. * @param params.normalizationField The name of the field to normalize the values of the given `field`. Providing a normalization field helps minimize some visualization errors and standardizes the data so all features are visualized with minimal bias due to area differences or count variation. This option is commonly used when visualizing densities. - * @param params.basemap The [named string](https://developers.arcgis.com/javascript/latest/api-reference/esri-Map.html#basemap) of the Esri basemap or basemap object that will be paired with the output visualization. + * @param params.basemap The [named string](https://developers.arcgis.com/javascript/latest/api-reference/esri-Map.html#basemap) or basemap object of the Esri basemap that will be paired with the output visualization. * @param params.sizeScheme In authoring apps, the user may select a pre-defined size scheme. Pass the scheme object to this property to avoid getting one based on the `basemap`. + * @param params.valueExpression An [Arcade](https://developers.arcgis.com/javascript/latest/guide/arcade/index.html) expression that returns a number. This expression can reference field values using the `$feature` global variable. This property overrides the `field` property and therefore is used instead of an input `field` value. + * @param params.valueExpressionTitle Text describing the value returned from the `valueExpression`. This is used by the [Legend](https://developers.arcgis.com/javascript/latest/api-reference/esri-widgets-Legend.html) widget. + * @param params.sqlExpression A SQL expression evaluating to a number. This parameter is only supported for service-based FeatureLayers. + * @param params.sqlWhere A SQL where clause used to filter features for the statistics query. For example, this is useful in situations where you want to avoid dividing by zero as is the case with creating a predominance visualization. * @param params.legendOptions Provides options for setting a title to a field when an expression is provided instead of a field name. This title will represent the field in the [Legend](https://developers.arcgis.com/javascript/latest/api-reference/esri-widgets-Legend.html). * @param params.statistics A statistics object generated from the [summaryStatistics](https://developers.arcgis.com/javascript/latest/api-reference/esri-renderers-smartMapping-statistics-summaryStatistics.html) function. If statistics for the field have already been generated, then pass the object here to avoid making a second statistics query to the server. * @param params.minValue A custom minimum value set by the user. Use this in conjunction with `maxValue` to generate statistics between lower and upper bounds. This will be the lowest stop in the returned size visual variable. * @param params.maxValue A custom maximum value set by the user. Use this in conjunction with `minValue` to generate statistics between lower and upper bounds. This will be the uppermost stop in the returned size visual variable. - * @param params.view The SceneView instance in which the visualization will be rendered. This property is only applicable to generating visualizations with 3D symbols. + * @param params.view When generating 3D symbols, a [SceneView](https://developers.arcgis.com/javascript/latest/api-reference/esri-views-SceneView.html) instance is required. The relevant SceneView or [MapView](https://developers.arcgis.com/javascript/latest/api-reference/esri-views-MapView.html) is required when a `valueExpression` is specified. * @param params.worldScale Indicates if the size units of the symbols will be in meters. This should be `true` when generating visualizations with 3D volumetric symbology. A `view` must be provided if this property is set to `true`. * @param params.axis When set to `all`, a single size variable that scales uniformly in all dimensions is generated. When set to `height`, the result contains two size visual variables: the first one sizes the height according to the field statistics, while the second defines a constant size for width and depth. **Possible Values:** all | height * @@ -18165,9 +19998,9 @@ declare namespace __esri { * * [Read more...](https://developers.arcgis.com/javascript/latest/api-reference/esri-renderers-smartMapping-creators-size.html#createClassBreaksRenderer) */ - layer: FeatureLayer | SceneLayer; + layer: FeatureLayer | SceneLayer | CSVLayer; /** - * The [named string](https://developers.arcgis.com/javascript/latest/api-reference/esri-Map.html#basemap) of the Esri basemap or basemap object that will be paired with the output visualization. + * The [named string](https://developers.arcgis.com/javascript/latest/api-reference/esri-Map.html#basemap) or basemap object of the Esri basemap that will be paired with the output visualization. * * [Read more...](https://developers.arcgis.com/javascript/latest/api-reference/esri-renderers-smartMapping-creators-size.html#createClassBreaksRenderer) * @@ -18175,7 +20008,7 @@ declare namespace __esri { */ basemap?: string | Basemap; /** - * The name of the field whose data will be queried for statistics and classified. + * The name of the field whose data will be queried for statistics and classified. This property is ignored if a `valueExpression` is used. * * [Read more...](https://developers.arcgis.com/javascript/latest/api-reference/esri-renderers-smartMapping-creators-size.html#createClassBreaksRenderer) */ @@ -18244,6 +20077,30 @@ declare namespace __esri { * [Read more...](https://developers.arcgis.com/javascript/latest/api-reference/esri-renderers-smartMapping-creators-size.html#createClassBreaksRenderer) */ sizeScheme?: PointSizeScheme | PolylineSizeScheme | PolygonSizeScheme; + /** + * An [Arcade](https://developers.arcgis.com/javascript/latest/guide/arcade/index.html) expression that returns a number. This expression can reference field values using the `$feature` global variable. This property overrides the `field` property and therefore is used instead of an input `field` value. + * + * [Read more...](https://developers.arcgis.com/javascript/latest/api-reference/esri-renderers-smartMapping-creators-size.html#createClassBreaksRenderer) + */ + valueExpression?: string; + /** + * Text describing the value returned from the `valueExpression`. This is used by the [Legend](https://developers.arcgis.com/javascript/latest/api-reference/esri-widgets-Legend.html) widget. + * + * [Read more...](https://developers.arcgis.com/javascript/latest/api-reference/esri-renderers-smartMapping-creators-size.html#createClassBreaksRenderer) + */ + valueExpressionTitle?: string; + /** + * A SQL expression evaluating to a number. This parameter is only supported for service-based FeatureLayers. + * + * [Read more...](https://developers.arcgis.com/javascript/latest/api-reference/esri-renderers-smartMapping-creators-size.html#createClassBreaksRenderer) + */ + sqlExpression?: string; + /** + * A SQL where clause used to filter features for the statistics query. For example, this is useful in situations where you want to avoid dividing by zero as is the case with creating a predominance visualization. + * + * [Read more...](https://developers.arcgis.com/javascript/latest/api-reference/esri-renderers-smartMapping-creators-size.html#createClassBreaksRenderer) + */ + sqlWhere?: string; /** * Provides options for setting a title to describe a field instead of using the field name. This title will represent the field in the [Legend](https://developers.arcgis.com/javascript/latest/api-reference/esri-widgets-Legend.html). * @@ -18271,11 +20128,11 @@ declare namespace __esri { */ defaultSymbolEnabled?: boolean; /** - * The SceneView instance in which the visualization will be rendered. This parameter is required if `symbolType = "3d-volumetric" or "3d-volumetric-uniform"`. + * The view instance in which the visualization will be rendered. A [SceneView](https://developers.arcgis.com/javascript/latest/api-reference/esri-views-SceneView.html) is required if `symbolType = "3d-volumetric"` or `3d-volumetric-uniform`. The relevant SceneView or [MapView](https://developers.arcgis.com/javascript/latest/api-reference/esri-views-MapView.html) is required when a `valueExpression` is specified. * * [Read more...](https://developers.arcgis.com/javascript/latest/api-reference/esri-renderers-smartMapping-creators-size.html#createClassBreaksRenderer) */ - view?: SceneView; + view?: View; /** * The type of symbol to generate. This depends on the view in which you are working and the desired visualization. Known values are described below. * @@ -18311,13 +20168,13 @@ declare namespace __esri { * * [Read more...](https://developers.arcgis.com/javascript/latest/api-reference/esri-renderers-smartMapping-creators-size.html#createContinuousRenderer) */ - layer: FeatureLayer | SceneLayer; + layer: FeatureLayer | SceneLayer | CSVLayer; /** - * The name of the field whose data will be queried for statistics and used for the basis of the data-driven visualization. + * The name of the field whose data will be queried for statistics and used for the basis of the data-driven visualization. This property is ignored if a `valueExpression` is used. * * [Read more...](https://developers.arcgis.com/javascript/latest/api-reference/esri-renderers-smartMapping-creators-size.html#createContinuousRenderer) */ - field: string; + field?: string; /** * The name of the field to normalize the values of the given `field`. Providing a normalization field helps minimize some visualization errors and standardizes the data so all features are visualized with minimal bias due to area differences or count variation. This option is commonly used when visualizing densities. * @@ -18325,7 +20182,7 @@ declare namespace __esri { */ normalizationField?: string; /** - * The [named string](https://developers.arcgis.com/javascript/latest/api-reference/esri-Map.html#basemap) of the Esri basemap or basemap object that will be paired with the output visualization. + * The [named string](https://developers.arcgis.com/javascript/latest/api-reference/esri-Map.html#basemap) or basemap object of the Esri basemap that will be paired with the output visualization. * * [Read more...](https://developers.arcgis.com/javascript/latest/api-reference/esri-renderers-smartMapping-creators-size.html#createContinuousRenderer) * @@ -18338,6 +20195,30 @@ declare namespace __esri { * [Read more...](https://developers.arcgis.com/javascript/latest/api-reference/esri-renderers-smartMapping-creators-size.html#createContinuousRenderer) */ sizeScheme?: PointSizeScheme | PolylineSizeScheme | PolygonSizeScheme; + /** + * An [Arcade](https://developers.arcgis.com/javascript/latest/guide/arcade/index.html) expression that returns a number. This expression can reference field values using the `$feature` global variable. This property overrides the `field` property and therefore is used instead of an input `field` value. + * + * [Read more...](https://developers.arcgis.com/javascript/latest/api-reference/esri-renderers-smartMapping-creators-size.html#createContinuousRenderer) + */ + valueExpression?: string; + /** + * Text describing the value returned from the `valueExpression`. This is used by the [Legend](https://developers.arcgis.com/javascript/latest/api-reference/esri-widgets-Legend.html) widget. + * + * [Read more...](https://developers.arcgis.com/javascript/latest/api-reference/esri-renderers-smartMapping-creators-size.html#createContinuousRenderer) + */ + valueExpressionTitle?: string; + /** + * A SQL expression evaluating to a number. This parameter is only supported for service-based FeatureLayers. + * + * [Read more...](https://developers.arcgis.com/javascript/latest/api-reference/esri-renderers-smartMapping-creators-size.html#createContinuousRenderer) + */ + sqlExpression?: string; + /** + * A SQL where clause used to filter features for the statistics query. For example, this is useful in situations where you want to avoid dividing by zero as is the case with creating a predominance visualization. + * + * [Read more...](https://developers.arcgis.com/javascript/latest/api-reference/esri-renderers-smartMapping-creators-size.html#createContinuousRenderer) + */ + sqlWhere?: string; /** * Provides options for setting a title to a field when an expression is provided instead of a field name. This title will represent the field in the [Legend](https://developers.arcgis.com/javascript/latest/api-reference/esri-widgets-Legend.html). * @@ -18371,11 +20252,11 @@ declare namespace __esri { */ defaultSymbolEnabled?: boolean; /** - * The SceneView instance in which the visualization will be rendered. This parameter is required if `symbolType = "3d-volumetric" or "3d-volumetric-uniform"`. + * The view instance in which the visualization will be rendered. A [SceneView](https://developers.arcgis.com/javascript/latest/api-reference/esri-views-SceneView.html) is required if `symbolType = "3d-volumetric"` or `3d-volumetric-uniform`. The relevant SceneView or [MapView](https://developers.arcgis.com/javascript/latest/api-reference/esri-views-MapView.html) is required when a `valueExpression` is specified. * * [Read more...](https://developers.arcgis.com/javascript/latest/api-reference/esri-renderers-smartMapping-creators-size.html#createContinuousRenderer) */ - view?: SceneView; + view?: View; /** * The type of symbol to generate. This depends on the view in which you are working and the desired visualization. Known values are described below. * @@ -18417,9 +20298,9 @@ declare namespace __esri { * * [Read more...](https://developers.arcgis.com/javascript/latest/api-reference/esri-renderers-smartMapping-creators-size.html#createVisualVariables) */ - layer: FeatureLayer | SceneLayer; + layer: FeatureLayer | SceneLayer | CSVLayer; /** - * The name of the field whose data will be queried for statistics and used for the basis of the data-driven visualization. + * The name of the field whose data will be queried for statistics and used for the basis of the data-driven visualization. This property is ignored if a `valueExpression` is used. * * [Read more...](https://developers.arcgis.com/javascript/latest/api-reference/esri-renderers-smartMapping-creators-size.html#createVisualVariables) */ @@ -18431,7 +20312,7 @@ declare namespace __esri { */ normalizationField?: string; /** - * The [named string](https://developers.arcgis.com/javascript/latest/api-reference/esri-Map.html#basemap) of the Esri basemap or basemap object that will be paired with the output visualization. + * The [named string](https://developers.arcgis.com/javascript/latest/api-reference/esri-Map.html#basemap) or basemap object of the Esri basemap that will be paired with the output visualization. * * [Read more...](https://developers.arcgis.com/javascript/latest/api-reference/esri-renderers-smartMapping-creators-size.html#createVisualVariables) * @@ -18444,6 +20325,30 @@ declare namespace __esri { * [Read more...](https://developers.arcgis.com/javascript/latest/api-reference/esri-renderers-smartMapping-creators-size.html#createVisualVariables) */ sizeScheme?: PointSizeScheme | PolylineSizeScheme | PolygonSizeScheme; + /** + * An [Arcade](https://developers.arcgis.com/javascript/latest/guide/arcade/index.html) expression that returns a number. This expression can reference field values using the `$feature` global variable. This property overrides the `field` property and therefore is used instead of an input `field` value. + * + * [Read more...](https://developers.arcgis.com/javascript/latest/api-reference/esri-renderers-smartMapping-creators-size.html#createVisualVariables) + */ + valueExpression?: string; + /** + * Text describing the value returned from the `valueExpression`. This is used by the [Legend](https://developers.arcgis.com/javascript/latest/api-reference/esri-widgets-Legend.html) widget. + * + * [Read more...](https://developers.arcgis.com/javascript/latest/api-reference/esri-renderers-smartMapping-creators-size.html#createVisualVariables) + */ + valueExpressionTitle?: string; + /** + * A SQL expression evaluating to a number. This parameter is only supported for service-based FeatureLayers. + * + * [Read more...](https://developers.arcgis.com/javascript/latest/api-reference/esri-renderers-smartMapping-creators-size.html#createVisualVariables) + */ + sqlExpression?: string; + /** + * A SQL where clause used to filter features for the statistics query. For example, this is useful in situations where you want to avoid dividing by zero as is the case with creating a predominance visualization. + * + * [Read more...](https://developers.arcgis.com/javascript/latest/api-reference/esri-renderers-smartMapping-creators-size.html#createVisualVariables) + */ + sqlWhere?: string; /** * Provides options for setting a title to a field when an expression is provided instead of a field name. This title will represent the field in the [Legend](https://developers.arcgis.com/javascript/latest/api-reference/esri-widgets-Legend.html). * @@ -18469,11 +20374,11 @@ declare namespace __esri { */ maxValue?: number; /** - * The SceneView instance in which the visualization will be rendered. This property is only applicable to generating visualizations with 3D symbols. + * When generating 3D symbols, a [SceneView](https://developers.arcgis.com/javascript/latest/api-reference/esri-views-SceneView.html) instance is required. The relevant SceneView or [MapView](https://developers.arcgis.com/javascript/latest/api-reference/esri-views-MapView.html) is required when a `valueExpression` is specified. * * [Read more...](https://developers.arcgis.com/javascript/latest/api-reference/esri-renderers-smartMapping-creators-size.html#createVisualVariables) */ - view?: SceneView; + view?: View; /** * Indicates if the size units of the symbols will be in meters. This should be `true` when generating visualizations with 3D volumetric symbology. A `view` must be provided if this property is set to `true`. * @@ -18572,14 +20477,14 @@ declare namespace __esri { */ createPCClassRenderer(params: typeCreatePCClassRendererParams): IPromise; /** - * Generates a [Renderer](https://developers.arcgis.com/javascript/latest/api-reference/esri-renderers-Renderer.html) that may be applied directly to a [Layer](https://developers.arcgis.com/javascript/latest/api-reference/esri-layers-Layer.html) that supports renderers. The renderer contains unique symbols representing a string or a numeric value returned from the indicated field. In most cases you will provide a `layer`, `basemap`, and `field` to generate this renderer. This is a scenario in which the values of the field aren't well known and the user doesn't know which colors to use in the visualization. + * Generates a [Renderer](https://developers.arcgis.com/javascript/latest/api-reference/esri-renderers-Renderer.html) that may be applied directly to a [Layer](https://developers.arcgis.com/javascript/latest/api-reference/esri-layers-Layer.html) that supports renderers. The renderer contains unique symbols representing a string or a numeric value returned from the indicated field. In most cases you will provide a `layer`, `basemap`, and `field` to generate this renderer. This is a scenario in which the values of the field aren't well known and the user doesn't know which colors to use in the visualization. You can also use a `valueExpression` instead of a `field` to visualize features based on a value returned from a script executed at runtime. * * [Read more...](https://developers.arcgis.com/javascript/latest/api-reference/esri-renderers-smartMapping-creators-type.html#createRenderer) * * @param params Input parameters for generating symbols to represent unique types based on data returned from a given field. See the table below for details of each parameter. * @param params.layer The layer for which the renderer is generated. - * @param params.field The name of the field from which to extract unique values that will be used for the basis of the data-driven visualization. - * @param params.basemap The [named string](https://developers.arcgis.com/javascript/latest/api-reference/esri-Map.html#basemap) of the Esri basemap or basemap object that will be paired with the output visualization. + * @param params.field The name of the field from which to extract unique values that will be used for the basis of the data-driven visualization. This property is ignored if a `valueExpression` is used. + * @param params.basemap The [named string](https://developers.arcgis.com/javascript/latest/api-reference/esri-Map.html#basemap) or basemap object of the Esri basemap that will be paired with the output visualization. * @param params.numTypes The number of types (or categories) displayed by the renderer. Use `-1` to display all returned types. * @param params.sortBy * Indicates how values should be sorted in the [Legend](https://developers.arcgis.com/javascript/latest/api-reference/esri-widgets-Legend.html). See the table below for information about values that may be passed to this parameter. @@ -18591,9 +20496,11 @@ declare namespace __esri { * * **Known Values:** count | value * @param params.typeScheme In authoring apps, the user may select a pre-defined type scheme. Pass the scheme object to this property to avoid getting one based on the `basemap`. + * @param params.valueExpression An [Arcade](https://developers.arcgis.com/javascript/latest/guide/arcade/index.html) expression that returns a number or a string. This expression can reference field values using the `$feature` global variable. This property overrides the `field` property and therefore is used instead of an input `field` value. + * @param params.valueExpressionTitle Text describing the value returned from the `valueExpression`. This is used by the [Legend](https://developers.arcgis.com/javascript/latest/api-reference/esri-widgets-Legend.html) widget. * @param params.legendOptions Provides options for setting a title to a field that will override the field alias defined in the service. This title will represent the field in the [Legend](https://developers.arcgis.com/javascript/latest/api-reference/esri-widgets-Legend.html). * @param params.defaultSymbolEnabled Enables the `defaultSymbol` on the renderer and assigns it to features with no value. - * @param params.view The SceneView instance in which the visualization will be rendered. This parameter is required if `symbolType = "3d-volumetric" or "3d-volumetric-uniform"`, except for layers with a `mesh` geometry type. + * @param params.view The view instance in which the visualization will be rendered. A [SceneView](https://developers.arcgis.com/javascript/latest/api-reference/esri-views-SceneView.html) is required if `symbolType = "3d-volumetric"` or `3d-volumetric-uniform`. The relevant SceneView or [MapView](https://developers.arcgis.com/javascript/latest/api-reference/esri-views-MapView.html) is required when a `valueExpression` is specified. * @param params.symbolType * The type of symbol to generate. This depends on the view in which you are working and the desired visualization. This parameter can be ignored for layers with a `mesh` geometry type. Known values are described below. * @@ -18722,15 +20629,15 @@ declare namespace __esri { * * [Read more...](https://developers.arcgis.com/javascript/latest/api-reference/esri-renderers-smartMapping-creators-type.html#createRenderer) */ - layer: FeatureLayer | SceneLayer; + layer: FeatureLayer | SceneLayer | CSVLayer; /** - * The name of the field from which to extract unique values that will be used for the basis of the data-driven visualization. + * The name of the field from which to extract unique values that will be used for the basis of the data-driven visualization. This property is ignored if a `valueExpression` is used. * * [Read more...](https://developers.arcgis.com/javascript/latest/api-reference/esri-renderers-smartMapping-creators-type.html#createRenderer) */ - field: string; + field?: string; /** - * The [named string](https://developers.arcgis.com/javascript/latest/api-reference/esri-Map.html#basemap) of the Esri basemap or basemap object that will be paired with the output visualization. + * The [named string](https://developers.arcgis.com/javascript/latest/api-reference/esri-Map.html#basemap) or basemap object of the Esri basemap that will be paired with the output visualization. * * [Read more...](https://developers.arcgis.com/javascript/latest/api-reference/esri-renderers-smartMapping-creators-type.html#createRenderer) * @@ -18767,6 +20674,18 @@ declare namespace __esri { * [Read more...](https://developers.arcgis.com/javascript/latest/api-reference/esri-renderers-smartMapping-creators-type.html#createRenderer) */ typeScheme?: PointTypeScheme | PolylineTypeScheme | PolygonTypeScheme | MeshTypeScheme; + /** + * An [Arcade](https://developers.arcgis.com/javascript/latest/guide/arcade/index.html) expression that returns a number or a string. This expression can reference field values using the `$feature` global variable. This property overrides the `field` property and therefore is used instead of an input `field` value. + * + * [Read more...](https://developers.arcgis.com/javascript/latest/api-reference/esri-renderers-smartMapping-creators-type.html#createRenderer) + */ + valueExpression?: string; + /** + * Text describing the value returned from the `valueExpression`. This is used by the [Legend](https://developers.arcgis.com/javascript/latest/api-reference/esri-widgets-Legend.html) widget. + * + * [Read more...](https://developers.arcgis.com/javascript/latest/api-reference/esri-renderers-smartMapping-creators-type.html#createRenderer) + */ + valueExpressionTitle?: string; /** * Provides options for setting a title to a field that will override the field alias defined in the service. This title will represent the field in the [Legend](https://developers.arcgis.com/javascript/latest/api-reference/esri-widgets-Legend.html). * @@ -18780,11 +20699,11 @@ declare namespace __esri { */ defaultSymbolEnabled?: boolean; /** - * The SceneView instance in which the visualization will be rendered. This parameter is required if `symbolType = "3d-volumetric" or "3d-volumetric-uniform"`, except for layers with a `mesh` geometry type. + * The view instance in which the visualization will be rendered. A [SceneView](https://developers.arcgis.com/javascript/latest/api-reference/esri-views-SceneView.html) is required if `symbolType = "3d-volumetric"` or `3d-volumetric-uniform`. The relevant SceneView or [MapView](https://developers.arcgis.com/javascript/latest/api-reference/esri-views-MapView.html) is required when a `valueExpression` is specified. * * [Read more...](https://developers.arcgis.com/javascript/latest/api-reference/esri-renderers-smartMapping-creators-type.html#createRenderer) */ - view?: SceneView; + view?: View; /** * The type of symbol to generate. This depends on the view in which you are working and the desired visualization. This parameter can be ignored for layers with a `mesh` geometry type. Known values are described below. * @@ -18869,22 +20788,26 @@ declare namespace __esri { */ interface univariateColorSize { /** - * Generates a [Renderer](https://developers.arcgis.com/javascript/latest/api-reference/esri-renderers-Renderer.html) that may be applied directly to a [Layer](https://developers.arcgis.com/javascript/latest/api-reference/esri-layers-Layer.html). The renderer contains continuous color and size visual variables that map symbols with optimal colors and sizes based on the indicated basemap to specific stop values based on queried statistics from the indicated field or expression. In most cases you will provide a `layer`, `basemap`, `field`, and `theme` to generate this renderer. This is a scenario in which the statistics of the data aren't well known and the user doesn't know what colors and sizes to use in the visualization. The other options are provided for convenience for more involved custom visualization authoring applications. For example, if you already generated statistics in another operation, you can pass the statistics object to the `statistics` parameter to avoid making an extra call to the server. + * Generates a [Renderer](https://developers.arcgis.com/javascript/latest/api-reference/esri-renderers-Renderer.html) that may be applied directly to a [Layer](https://developers.arcgis.com/javascript/latest/api-reference/esri-layers-Layer.html). The renderer contains continuous color and size visual variables that map symbols with optimal colors and sizes based on the indicated basemap to specific stop values based on queried statistics from the indicated field or expression. In most cases you will provide a `layer`, `basemap`, `field`, and `theme` to generate this renderer. This is a scenario in which the statistics of the data aren't well known and the user doesn't know what colors and sizes to use in the visualization. You can also use a `valueExpression` instead of a `field` to visualize features based on a value returned from a script executed at runtime. The other options are provided for convenience for more involved custom visualization authoring applications. For example, if you already generated statistics in another operation, you can pass the statistics object to the `statistics` parameter to avoid making an extra call to the server. * * [Read more...](https://developers.arcgis.com/javascript/latest/api-reference/esri-renderers-smartMapping-creators-univariateColorSize.html#createContinuousRenderer) * * @param params See the table below for details of each parameter that may be passed to this method. * @param params.layer The layer for which the visual variable is generated. - * @param params.basemap The [named string](https://developers.arcgis.com/javascript/latest/api-reference/esri-Map.html#basemap) of the Esri basemap or basemap object that will be paired with the output visualization. - * @param params.field The name of the field whose data will be queried for statistics and used for the basis of the data-driven visualization. + * @param params.basemap The [named string](https://developers.arcgis.com/javascript/latest/api-reference/esri-Map.html#basemap) or basemap object of the Esri basemap that will be paired with the output visualization. + * @param params.field The name of the field whose data will be queried for statistics and used for the basis of the data-driven visualization. This property is ignored if a `valueExpression` is used. * @param params.normalizationField The name of the field to normalize the values of the given `field`. Providing a normalization field helps minimize some visualization errors and standardizes the data so all features are visualized with minimal bias due to area differences or count variation. This option is commonly used when visualizing densities. + * @param params.valueExpression An [Arcade](https://developers.arcgis.com/javascript/latest/guide/arcade/index.html) expression that returns a number. This expression can reference field values using the `$feature` global variable. This property overrides the `field` property and therefore is used instead of an input `field` value. + * @param params.valueExpressionTitle Text describing the value returned from the `valueExpression`. This is used by the [Legend](https://developers.arcgis.com/javascript/latest/api-reference/esri-widgets-Legend.html) widget. + * @param params.sqlExpression A SQL expression evaluating to a number. This parameter is only supported for service-based FeatureLayers. + * @param params.sqlWhere A SQL where clause used to filter features for the statistics query. For example, this is useful in situations where you want to avoid dividing by zero as is the case with creating a predominance visualization. * @param params.statistics A statistics object generated from the [summaryStatistics](https://developers.arcgis.com/javascript/latest/api-reference/esri-renderers-smartMapping-statistics-summaryStatistics.html) function. If statistics for the field have already been generated, then pass the object here to avoid making a second statistics query to the server. * @param params.minValue A custom minimum value set by the user. Use this in conjunction with `maxValue` to generate statistics between lower and upper bounds. This will be the lowest stop in the returned visual variables. * @param params.maxValue A custom maximum value set by the user. Use this in conjunction with `minValue` to generate statistics between lower and upper bounds. This will be the uppermost stop in the returned visual variables. * @param params.defaultSymbolEnabled Enables the `defaultSymbol` on the renderer and assigns it to features with no value and features that do not fall within the configured data range. * @param params.colorOptions Options for configuring the color portion of the visualization. * @param params.sizeOptions Options for configuring the size portion of the visualization. - * @param params.view The SceneView instance in which the visualization will be rendered. This parameter is required if `symbolType = "3d-volumetric" or "3d-volumetric-uniform"`. + * @param params.view The view instance in which the visualization will be rendered. A [SceneView](https://developers.arcgis.com/javascript/latest/api-reference/esri-views-SceneView.html) is required if `symbolType = "3d-volumetric"` or `3d-volumetric-uniform`. The relevant SceneView or [MapView](https://developers.arcgis.com/javascript/latest/api-reference/esri-views-MapView.html) is required when a `valueExpression` is specified. * @param params.symbolType * The type of symbol to generate. This depends on the view in which you are working and the desired visualization. Known values are described below. * @@ -18898,21 +20821,25 @@ declare namespace __esri { */ createContinuousRenderer(params: univariateColorSizeCreateContinuousRendererParams): IPromise; /** - * This method generates color and size visual variables, both based on the same given field or expression. These visual variables are generated with default stops that are optimally chosen based on the statistics queried for the indicated field or expression and colors based on the input basemap. There are two different ways this method may be called. The most common case is by providing a `layer`, `basemap`, and `field`. This is the scenario where the statistics of the data aren't well known and the user doesn't know what colors to use. The other options are provided for convenience for more involved custom visualization authoring applications. For example, if you already generated statistics in another operation, you can pass the object in the `statistics` parameter to avoid making an extra call to the server. You can also provide a `colorScheme` and/or a `sizeScheme` if you don't want one picked for you. In this case the `basemap` and `theme` options would be ignored. The resulting array of visual variables will contain one color visual variable, and one or two size visual variables depending on the value of the `sizeOptions.axis` parameter. + * This method generates color and size visual variables, both based on the same given field or expression. These visual variables are generated with default stops that are optimally chosen based on the statistics queried for the indicated field or expression and colors based on the input basemap. There are two different ways this method may be called. The most common case is by providing a `layer`, `basemap`, and `field`. This is the scenario where the statistics of the data aren't well known and the user doesn't know what colors to use. You can optionally use a `valueExpression` instead of a field to visualize features based on a numeric value returned from a script executed at runtime. The other options are provided for convenience for more involved custom visualization authoring applications. For example, if you already generated statistics in another operation, you can pass the object in the `statistics` parameter to avoid making an extra call to the server. You can also provide a `colorScheme` and/or a `sizeScheme` if you don't want one picked for you. In this case the `basemap` and `theme` options would be ignored. The resulting array of visual variables will contain one color visual variable, and one or two size visual variables depending on the value of the `sizeOptions.axis` parameter. * * [Read more...](https://developers.arcgis.com/javascript/latest/api-reference/esri-renderers-smartMapping-creators-univariateColorSize.html#createVisualVariables) * * @param params Input parameters for generating color and size visual variables based on data returned from a given field or expression. See the table below for details of each parameter. * @param params.layer The layer for which the visual variable is generated. - * @param params.basemap The [named string](https://developers.arcgis.com/javascript/latest/api-reference/esri-Map.html#basemap) of the Esri basemap or basemap object that will be paired with the output visualization. - * @param params.field The name of the field whose data will be queried for statistics and used for the basis of the data-driven visualization. + * @param params.basemap The [named string](https://developers.arcgis.com/javascript/latest/api-reference/esri-Map.html#basemap) or basemap object of the Esri basemap that will be paired with the output visualization. + * @param params.field The name of the field whose data will be queried for statistics and used for the basis of the data-driven visualization. This property is ignored if a `valueExpression` is used. * @param params.normalizationField The name of the field to normalize the values of the given `field`. Providing a normalization field helps minimize some visualization errors and standardizes the data so all features are visualized with minimal bias due to area differences or count variation. This option is commonly used when visualizing densities. + * @param params.valueExpression An [Arcade](https://developers.arcgis.com/javascript/latest/guide/arcade/index.html) expression that returns a number. This expression can reference field values using the `$feature` global variable. This property overrides the `field` property and therefore is used instead of an input `field` value. + * @param params.valueExpressionTitle Text describing the value returned from the `valueExpression`. This is used by the [Legend](https://developers.arcgis.com/javascript/latest/api-reference/esri-widgets-Legend.html) widget. + * @param params.sqlExpression A SQL expression evaluating to a number. This parameter is only supported for service based FeatureLayers. + * @param params.sqlWhere A SQL where clause used to filter features for the statistics query. For example, this is useful in situations where you want to avoid dividing by zero as is the case with creating a predominance visualization. * @param params.statistics A statistics object generated from the [summaryStatistics](https://developers.arcgis.com/javascript/latest/api-reference/esri-renderers-smartMapping-statistics-summaryStatistics.html) function. If statistics for the field have already been generated, then pass the object here to avoid making a second statistics query to the server. * @param params.minValue A custom minimum value set by the user. Use this in conjunction with `maxValue` to generate statistics between lower and upper bounds. This will be the lowest stop in the returned visual variables. * @param params.maxValue A custom maximum value set by the user. Use this in conjunction with `minValue` to generate statistics between lower and upper bounds. This will be the uppermost stop in the returned visual variables. * @param params.colorOptions Options for configuring the color portion of the visualization. * @param params.sizeOptions Options for configuring the size portion of the visualization. - * @param params.view The SceneView instance in which the visualization will be rendered. This property is only applicable to generating visualizations with 3D symbols. + * @param params.view When generating 3D symbols, a [SceneView](https://developers.arcgis.com/javascript/latest/api-reference/esri-views-SceneView.html) instance is required. The relevant SceneView or [MapView](https://developers.arcgis.com/javascript/latest/api-reference/esri-views-MapView.html) is required when a `valueExpression` is specified. * @param params.worldScale Indicates if the size units of the symbols will be in meters. This should be `true` when generating visualizations with 3D volumetric symbology. A `view` must be provided if this property is set to `true`. * */ @@ -18972,9 +20899,9 @@ declare namespace __esri { * * [Read more...](https://developers.arcgis.com/javascript/latest/api-reference/esri-renderers-smartMapping-creators-univariateColorSize.html#createContinuousRenderer) */ - layer: FeatureLayer | SceneLayer; + layer: FeatureLayer | SceneLayer | CSVLayer; /** - * The [named string](https://developers.arcgis.com/javascript/latest/api-reference/esri-Map.html#basemap) of the Esri basemap or basemap object that will be paired with the output visualization. + * The [named string](https://developers.arcgis.com/javascript/latest/api-reference/esri-Map.html#basemap) or basemap object of the Esri basemap that will be paired with the output visualization. * * [Read more...](https://developers.arcgis.com/javascript/latest/api-reference/esri-renderers-smartMapping-creators-univariateColorSize.html#createContinuousRenderer) * @@ -18982,17 +20909,41 @@ declare namespace __esri { */ basemap?: string | Basemap; /** - * The name of the field whose data will be queried for statistics and used for the basis of the data-driven visualization. + * The name of the field whose data will be queried for statistics and used for the basis of the data-driven visualization. This property is ignored if a `valueExpression` is used. * * [Read more...](https://developers.arcgis.com/javascript/latest/api-reference/esri-renderers-smartMapping-creators-univariateColorSize.html#createContinuousRenderer) */ - field: string; + field?: string; /** * The name of the field to normalize the values of the given `field`. Providing a normalization field helps minimize some visualization errors and standardizes the data so all features are visualized with minimal bias due to area differences or count variation. This option is commonly used when visualizing densities. * * [Read more...](https://developers.arcgis.com/javascript/latest/api-reference/esri-renderers-smartMapping-creators-univariateColorSize.html#createContinuousRenderer) */ normalizationField?: string; + /** + * An [Arcade](https://developers.arcgis.com/javascript/latest/guide/arcade/index.html) expression that returns a number. This expression can reference field values using the `$feature` global variable. This property overrides the `field` property and therefore is used instead of an input `field` value. + * + * [Read more...](https://developers.arcgis.com/javascript/latest/api-reference/esri-renderers-smartMapping-creators-univariateColorSize.html#createContinuousRenderer) + */ + valueExpression?: string; + /** + * Text describing the value returned from the `valueExpression`. This is used by the [Legend](https://developers.arcgis.com/javascript/latest/api-reference/esri-widgets-Legend.html) widget. + * + * [Read more...](https://developers.arcgis.com/javascript/latest/api-reference/esri-renderers-smartMapping-creators-univariateColorSize.html#createContinuousRenderer) + */ + valueExpressionTitle?: string; + /** + * A SQL expression evaluating to a number. This parameter is only supported for service-based FeatureLayers. + * + * [Read more...](https://developers.arcgis.com/javascript/latest/api-reference/esri-renderers-smartMapping-creators-univariateColorSize.html#createContinuousRenderer) + */ + sqlExpression?: string; + /** + * A SQL where clause used to filter features for the statistics query. For example, this is useful in situations where you want to avoid dividing by zero as is the case with creating a predominance visualization. + * + * [Read more...](https://developers.arcgis.com/javascript/latest/api-reference/esri-renderers-smartMapping-creators-univariateColorSize.html#createContinuousRenderer) + */ + sqlWhere?: string; /** * A statistics object generated from the [summaryStatistics](https://developers.arcgis.com/javascript/latest/api-reference/esri-renderers-smartMapping-statistics-summaryStatistics.html) function. If statistics for the field have already been generated, then pass the object here to avoid making a second statistics query to the server. * @@ -19030,11 +20981,11 @@ declare namespace __esri { */ sizeOptions?: univariateColorSizeCreateContinuousRendererParamsSizeOptions; /** - * The SceneView instance in which the visualization will be rendered. This parameter is required if `symbolType = "3d-volumetric" or "3d-volumetric-uniform"`. + * The view instance in which the visualization will be rendered. A [SceneView](https://developers.arcgis.com/javascript/latest/api-reference/esri-views-SceneView.html) is required if `symbolType = "3d-volumetric"` or `3d-volumetric-uniform`. The relevant SceneView or [MapView](https://developers.arcgis.com/javascript/latest/api-reference/esri-views-MapView.html) is required when a `valueExpression` is specified. * * [Read more...](https://developers.arcgis.com/javascript/latest/api-reference/esri-renderers-smartMapping-creators-univariateColorSize.html#createContinuousRenderer) */ - view?: SceneView; + view?: View; /** * The type of symbol to generate. This depends on the view in which you are working and the desired visualization. Known values are described below. * @@ -19126,9 +21077,9 @@ declare namespace __esri { * * [Read more...](https://developers.arcgis.com/javascript/latest/api-reference/esri-renderers-smartMapping-creators-univariateColorSize.html#createVisualVariables) */ - layer: FeatureLayer | SceneLayer; + layer: FeatureLayer | SceneLayer | CSVLayer; /** - * The [named string](https://developers.arcgis.com/javascript/latest/api-reference/esri-Map.html#basemap) of the Esri basemap or basemap object that will be paired with the output visualization. + * The [named string](https://developers.arcgis.com/javascript/latest/api-reference/esri-Map.html#basemap) or basemap object of the Esri basemap that will be paired with the output visualization. * * [Read more...](https://developers.arcgis.com/javascript/latest/api-reference/esri-renderers-smartMapping-creators-univariateColorSize.html#createVisualVariables) * @@ -19136,17 +21087,41 @@ declare namespace __esri { */ basemap?: string | Basemap; /** - * The name of the field whose data will be queried for statistics and used for the basis of the data-driven visualization. + * The name of the field whose data will be queried for statistics and used for the basis of the data-driven visualization. This property is ignored if a `valueExpression` is used. * * [Read more...](https://developers.arcgis.com/javascript/latest/api-reference/esri-renderers-smartMapping-creators-univariateColorSize.html#createVisualVariables) */ - field: string; + field?: string; /** * The name of the field to normalize the values of the given `field`. Providing a normalization field helps minimize some visualization errors and standardizes the data so all features are visualized with minimal bias due to area differences or count variation. This option is commonly used when visualizing densities. * * [Read more...](https://developers.arcgis.com/javascript/latest/api-reference/esri-renderers-smartMapping-creators-univariateColorSize.html#createVisualVariables) */ normalizationField?: string; + /** + * An [Arcade](https://developers.arcgis.com/javascript/latest/guide/arcade/index.html) expression that returns a number. This expression can reference field values using the `$feature` global variable. This property overrides the `field` property and therefore is used instead of an input `field` value. + * + * [Read more...](https://developers.arcgis.com/javascript/latest/api-reference/esri-renderers-smartMapping-creators-univariateColorSize.html#createVisualVariables) + */ + valueExpression?: string; + /** + * Text describing the value returned from the `valueExpression`. This is used by the [Legend](https://developers.arcgis.com/javascript/latest/api-reference/esri-widgets-Legend.html) widget. + * + * [Read more...](https://developers.arcgis.com/javascript/latest/api-reference/esri-renderers-smartMapping-creators-univariateColorSize.html#createVisualVariables) + */ + valueExpressionTitle?: string; + /** + * A SQL expression evaluating to a number. This parameter is only supported for service based FeatureLayers. + * + * [Read more...](https://developers.arcgis.com/javascript/latest/api-reference/esri-renderers-smartMapping-creators-univariateColorSize.html#createVisualVariables) + */ + sqlExpression?: string; + /** + * A SQL where clause used to filter features for the statistics query. For example, this is useful in situations where you want to avoid dividing by zero as is the case with creating a predominance visualization. + * + * [Read more...](https://developers.arcgis.com/javascript/latest/api-reference/esri-renderers-smartMapping-creators-univariateColorSize.html#createVisualVariables) + */ + sqlWhere?: string; /** * A statistics object generated from the [summaryStatistics](https://developers.arcgis.com/javascript/latest/api-reference/esri-renderers-smartMapping-statistics-summaryStatistics.html) function. If statistics for the field have already been generated, then pass the object here to avoid making a second statistics query to the server. * @@ -19178,11 +21153,11 @@ declare namespace __esri { */ sizeOptions?: univariateColorSizeCreateVisualVariablesParamsSizeOptions; /** - * The SceneView instance in which the visualization will be rendered. This property is only applicable to generating visualizations with 3D symbols. + * When generating 3D symbols, a [SceneView](https://developers.arcgis.com/javascript/latest/api-reference/esri-views-SceneView.html) instance is required. The relevant SceneView or [MapView](https://developers.arcgis.com/javascript/latest/api-reference/esri-views-MapView.html) is required when a `valueExpression` is specified. * * [Read more...](https://developers.arcgis.com/javascript/latest/api-reference/esri-renderers-smartMapping-creators-univariateColorSize.html#createVisualVariables) */ - view?: SceneView; + view?: View; /** * Indicates if the size units of the symbols will be in meters. This should be `true` when generating visualizations with 3D volumetric symbology. A `view` must be provided if this property is set to `true`. * @@ -19380,7 +21355,7 @@ declare namespace __esri { */ interface classBreaks { /** - * Generates class breaks for an input field of a [FeatureLayer](https://developers.arcgis.com/javascript/latest/api-reference/esri-layers-FeatureLayer.html) based on a given classification method and normalization type. + * Generates class breaks for an input field (or expression) of a [FeatureLayer](https://developers.arcgis.com/javascript/latest/api-reference/esri-layers-FeatureLayer.html) based on a given classification method and normalization type. * * [Read more...](https://developers.arcgis.com/javascript/latest/api-reference/esri-renderers-smartMapping-statistics-classBreaks.html#classBreaks) * @@ -19401,6 +21376,11 @@ declare namespace __esri { * @param params.minValue The minimum bounding value for the class breaks definition. Use this in conjunction with `maxValue` to generate class breaks between lower and upper bounds. * @param params.maxValue The maximum bounding value for the class breaks definition. Use this in conjunction with `minValue` to generate class breaks between lower and upper bounds. * @param params.numClasses Indicates the number of classes to generate for the class breaks definition. + * @param params.valueExpression An [Arcade](https://developers.arcgis.com/javascript/latest/guide/arcade/index.html) expression that returns a number. This expression can reference field values using the `$feature` global variable. This property overrides the `field` property and therefore is used instead of an input `field` value. + * @param params.sqlExpression A SQL expression evaluating to a number. This parameter only applies to service-based FeatureLayers. + * @param params.sqlWhere A SQL where clause used to filter features for the statistics query. For example, this is useful in situations where you want to avoid dividing by zero as is the case with creating a predominance visualization. + * @param params.view A [SceneView](https://developers.arcgis.com/javascript/latest/api-reference/esri-views-SceneView.html) or [MapView](https://developers.arcgis.com/javascript/latest/api-reference/esri-views-MapView.html) instance is required when a `valueExpression` is specified. + * @param params.features A subset of features for which to generate the class breaks. * */ classBreaks(params: classBreaksClassBreaksParams): IPromise; @@ -19417,7 +21397,7 @@ declare namespace __esri { * * [Read more...](https://developers.arcgis.com/javascript/latest/api-reference/esri-renderers-smartMapping-statistics-classBreaks.html#classBreaks) */ - layer: FeatureLayer | SceneLayer; + layer: FeatureLayer | SceneLayer | CSVLayer | PointCloudLayer; /** * The class breaks will be generated based on values of this field. If a field is provided, the values from the given field from all features will be queried in the service. * @@ -19468,6 +21448,36 @@ declare namespace __esri { * [Read more...](https://developers.arcgis.com/javascript/latest/api-reference/esri-renderers-smartMapping-statistics-classBreaks.html#classBreaks) */ numClasses?: number; + /** + * An [Arcade](https://developers.arcgis.com/javascript/latest/guide/arcade/index.html) expression that returns a number. This expression can reference field values using the `$feature` global variable. This property overrides the `field` property and therefore is used instead of an input `field` value. + * + * [Read more...](https://developers.arcgis.com/javascript/latest/api-reference/esri-renderers-smartMapping-statistics-classBreaks.html#classBreaks) + */ + valueExpression?: string; + /** + * A SQL expression evaluating to a number. This parameter only applies to service-based FeatureLayers. + * + * [Read more...](https://developers.arcgis.com/javascript/latest/api-reference/esri-renderers-smartMapping-statistics-classBreaks.html#classBreaks) + */ + sqlExpression?: string; + /** + * A SQL where clause used to filter features for the statistics query. For example, this is useful in situations where you want to avoid dividing by zero as is the case with creating a predominance visualization. + * + * [Read more...](https://developers.arcgis.com/javascript/latest/api-reference/esri-renderers-smartMapping-statistics-classBreaks.html#classBreaks) + */ + sqlWhere?: string; + /** + * A [SceneView](https://developers.arcgis.com/javascript/latest/api-reference/esri-views-SceneView.html) or [MapView](https://developers.arcgis.com/javascript/latest/api-reference/esri-views-MapView.html) instance is required when a `valueExpression` is specified. + * + * [Read more...](https://developers.arcgis.com/javascript/latest/api-reference/esri-renderers-smartMapping-statistics-classBreaks.html#classBreaks) + */ + view?: View; + /** + * A subset of features for which to generate the class breaks. + * + * [Read more...](https://developers.arcgis.com/javascript/latest/api-reference/esri-renderers-smartMapping-statistics-classBreaks.html#classBreaks) + */ + features?: Graphic[]; } /** @@ -19537,7 +21547,7 @@ declare namespace __esri { * * @param params See the table below for details on parameters that may be passed to this function. * @param params.layer The layer for which to generate a histogram. - * @param params.field The name of the numeric field for which the histogram will be generated. + * @param params.field The name of the numeric field for which the histogram will be generated. This property is ignored if a `valueExpression` is used. * @param params.normalizationField The field by which to normalize the values returned from the given `field`. * @param params.classificationMethod * The method for classifying the data. See the table below for a list of possible values. @@ -19552,6 +21562,11 @@ declare namespace __esri { * @param params.minValue The minimum bounding value for the histogram. Use this in conjunction with `maxValue` to generate a histogram between custom lower and upper bounds. * @param params.maxValue The maximum bounding value for the histogram. Use this in conjunction with `minValue` to generate a histogram between custom lower and upper bounds. * @param params.numBins Indicates the number of classes to generate for the histogram. + * @param params.valueExpression An [Arcade](https://developers.arcgis.com/javascript/latest/guide/arcade/index.html) expression that returns a number. This expression can reference field values using the `$feature` global variable. This property overrides the `field` property and therefore is used instead of an input `field` value. + * @param params.sqlExpression A SQL expression evaluating to a number. This parameter only applies to service-based FeatureLayers. + * @param params.sqlWhere A SQL where clause used to filter features for the statistics query. For example, this is useful in situations where you want to avoid dividing by zero as is the case with creating a predominance visualization. + * @param params.view A [SceneView](https://developers.arcgis.com/javascript/latest/api-reference/esri-views-SceneView.html) or [MapView](https://developers.arcgis.com/javascript/latest/api-reference/esri-views-MapView.html) instance is required when a `valueExpression` is specified. + * @param params.features A subset of features for which to generate the histogram. * */ histogram(params: histogramHistogramParams): IPromise; @@ -19568,9 +21583,9 @@ declare namespace __esri { * * [Read more...](https://developers.arcgis.com/javascript/latest/api-reference/esri-renderers-smartMapping-statistics-histogram.html#histogram) */ - layer: FeatureLayer | SceneLayer | PointCloudLayer; + layer: FeatureLayer | SceneLayer | CSVLayer | PointCloudLayer; /** - * The name of the numeric field for which the histogram will be generated. + * The name of the numeric field for which the histogram will be generated. This property is ignored if a `valueExpression` is used. * * [Read more...](https://developers.arcgis.com/javascript/latest/api-reference/esri-renderers-smartMapping-statistics-histogram.html#histogram) */ @@ -19621,6 +21636,36 @@ declare namespace __esri { * @default 10 */ numBins?: number; + /** + * An [Arcade](https://developers.arcgis.com/javascript/latest/guide/arcade/index.html) expression that returns a number. This expression can reference field values using the `$feature` global variable. This property overrides the `field` property and therefore is used instead of an input `field` value. + * + * [Read more...](https://developers.arcgis.com/javascript/latest/api-reference/esri-renderers-smartMapping-statistics-histogram.html#histogram) + */ + valueExpression?: string; + /** + * A SQL expression evaluating to a number. This parameter only applies to service-based FeatureLayers. + * + * [Read more...](https://developers.arcgis.com/javascript/latest/api-reference/esri-renderers-smartMapping-statistics-histogram.html#histogram) + */ + sqlExpression?: string; + /** + * A SQL where clause used to filter features for the statistics query. For example, this is useful in situations where you want to avoid dividing by zero as is the case with creating a predominance visualization. + * + * [Read more...](https://developers.arcgis.com/javascript/latest/api-reference/esri-renderers-smartMapping-statistics-histogram.html#histogram) + */ + sqlWhere?: string; + /** + * A [SceneView](https://developers.arcgis.com/javascript/latest/api-reference/esri-views-SceneView.html) or [MapView](https://developers.arcgis.com/javascript/latest/api-reference/esri-views-MapView.html) instance is required when a `valueExpression` is specified. + * + * [Read more...](https://developers.arcgis.com/javascript/latest/api-reference/esri-renderers-smartMapping-statistics-histogram.html#histogram) + */ + view?: View; + /** + * A subset of features for which to generate the histogram. + * + * [Read more...](https://developers.arcgis.com/javascript/latest/api-reference/esri-renderers-smartMapping-statistics-histogram.html#histogram) + */ + features?: Graphic[]; } /** @@ -19678,17 +21723,21 @@ declare namespace __esri { */ interface summaryStatistics { /** - * Returns an object containing various statistics describing a set of values returned from a field in a [Layer](https://developers.arcgis.com/javascript/latest/api-reference/esri-layers-Layer.html). + * Returns an object containing various statistics describing a set of values returned from a field (or expression) in a [Layer](https://developers.arcgis.com/javascript/latest/api-reference/esri-layers-Layer.html). * * [Read more...](https://developers.arcgis.com/javascript/latest/api-reference/esri-renderers-smartMapping-statistics-summaryStatistics.html#summaryStatistics) * * @param params See the table below for details of each parameter. * @param params.layer The layer from which to generate statistics for the given `field`. - * @param params.field The name of the numeric field for which the summary statistics will be generated. + * @param params.field The name of the numeric field for which the summary statistics will be generated. This property is ignored if a `valueExpression` is used. + * @param params.valueExpression An [Arcade](https://developers.arcgis.com/javascript/latest/guide/arcade/index.html) expression that returns a number. This expression can reference field values using the `$feature` global variable. This property overrides the `field` property and therefore is used instead of an input `field` value. + * @param params.sqlExpression A SQL expression evaluating to a number. This parameter only applies to service-based FeatureLayers. + * @param params.sqlWhere A SQL where clause used to filter features for the statistics query. For example, this is useful in situations where you want to avoid dividing by zero as is the case with creating a predominance visualization. * @param params.normalizationField The field by which to normalize the values returned from the given `field`. - * @param params.features If the FeatureLayer is constructed with client-side graphics or you would like to calculate statistics based on a subset of features, then pass the features in this parameter. * @param params.minValue The minimum bounding value for the statistics calculation. Use this in conjunction with `maxValue` to generate statistics between lower and upper bounds. * @param params.maxValue The maximum bounding value for the statistics calculation. Use this in conjunction with `minValue` to generate statistics between lower and upper bounds. + * @param params.view A [SceneView](https://developers.arcgis.com/javascript/latest/api-reference/esri-views-SceneView.html) or [MapView](https://developers.arcgis.com/javascript/latest/api-reference/esri-views-MapView.html) instance is required when a `valueExpression` is specified. + * @param params.features A subset of features for which to calculate the statistics. * */ summaryStatistics(params: summaryStatisticsSummaryStatisticsParams): IPromise; @@ -19705,7 +21754,7 @@ declare namespace __esri { */ export interface SummaryStatisticsResult extends Object { /** - * The average of all values returned from the field. + * The average of all values returned from the field or expression. * * [Read more...](https://developers.arcgis.com/javascript/latest/api-reference/esri-renderers-smartMapping-statistics-summaryStatistics.html#SummaryStatisticsResult) */ @@ -19717,31 +21766,31 @@ declare namespace __esri { */ count: number; /** - * The maximum of all values returned from the field. + * The maximum of all values returned from the field or expression. * * [Read more...](https://developers.arcgis.com/javascript/latest/api-reference/esri-renderers-smartMapping-statistics-summaryStatistics.html#SummaryStatisticsResult) */ max: number; /** - * The minimum of all values returned from the field. + * The minimum of all values returned from the field or expression. * * [Read more...](https://developers.arcgis.com/javascript/latest/api-reference/esri-renderers-smartMapping-statistics-summaryStatistics.html#SummaryStatisticsResult) */ min: number; /** - * The standard deviation calculated from values returned from the field. + * The standard deviation calculated from values returned from the field or expression. * * [Read more...](https://developers.arcgis.com/javascript/latest/api-reference/esri-renderers-smartMapping-statistics-summaryStatistics.html#SummaryStatisticsResult) */ stddev: number; /** - * The sum of all values returned from the field. + * The sum of all values returned from the field or expression. * * [Read more...](https://developers.arcgis.com/javascript/latest/api-reference/esri-renderers-smartMapping-statistics-summaryStatistics.html#SummaryStatisticsResult) */ sum: number; /** - * The calculated variance from all values returned from the field. + * The calculated variance from all values returned from the field or expression. * * [Read more...](https://developers.arcgis.com/javascript/latest/api-reference/esri-renderers-smartMapping-statistics-summaryStatistics.html#SummaryStatisticsResult) */ @@ -19755,25 +21804,37 @@ declare namespace __esri { * * [Read more...](https://developers.arcgis.com/javascript/latest/api-reference/esri-renderers-smartMapping-statistics-summaryStatistics.html#summaryStatistics) */ - layer: FeatureLayer | SceneLayer | PointCloudLayer; + layer: FeatureLayer | SceneLayer | CSVLayer | PointCloudLayer; /** - * The name of the numeric field for which the summary statistics will be generated. + * The name of the numeric field for which the summary statistics will be generated. This property is ignored if a `valueExpression` is used. * * [Read more...](https://developers.arcgis.com/javascript/latest/api-reference/esri-renderers-smartMapping-statistics-summaryStatistics.html#summaryStatistics) */ field?: string; + /** + * An [Arcade](https://developers.arcgis.com/javascript/latest/guide/arcade/index.html) expression that returns a number. This expression can reference field values using the `$feature` global variable. This property overrides the `field` property and therefore is used instead of an input `field` value. + * + * [Read more...](https://developers.arcgis.com/javascript/latest/api-reference/esri-renderers-smartMapping-statistics-summaryStatistics.html#summaryStatistics) + */ + valueExpression?: string; + /** + * A SQL expression evaluating to a number. This parameter only applies to service-based FeatureLayers. + * + * [Read more...](https://developers.arcgis.com/javascript/latest/api-reference/esri-renderers-smartMapping-statistics-summaryStatistics.html#summaryStatistics) + */ + sqlExpression?: string; + /** + * A SQL where clause used to filter features for the statistics query. For example, this is useful in situations where you want to avoid dividing by zero as is the case with creating a predominance visualization. + * + * [Read more...](https://developers.arcgis.com/javascript/latest/api-reference/esri-renderers-smartMapping-statistics-summaryStatistics.html#summaryStatistics) + */ + sqlWhere?: string; /** * The field by which to normalize the values returned from the given `field`. * * [Read more...](https://developers.arcgis.com/javascript/latest/api-reference/esri-renderers-smartMapping-statistics-summaryStatistics.html#summaryStatistics) */ normalizationField?: string; - /** - * If the FeatureLayer is constructed with client-side graphics or you would like to calculate statistics based on a subset of features, then pass the features in this parameter. - * - * [Read more...](https://developers.arcgis.com/javascript/latest/api-reference/esri-renderers-smartMapping-statistics-summaryStatistics.html#summaryStatistics) - */ - features?: Graphic[]; /** * The minimum bounding value for the statistics calculation. Use this in conjunction with `maxValue` to generate statistics between lower and upper bounds. * @@ -19786,6 +21847,18 @@ declare namespace __esri { * [Read more...](https://developers.arcgis.com/javascript/latest/api-reference/esri-renderers-smartMapping-statistics-summaryStatistics.html#summaryStatistics) */ maxValue?: number; + /** + * A [SceneView](https://developers.arcgis.com/javascript/latest/api-reference/esri-views-SceneView.html) or [MapView](https://developers.arcgis.com/javascript/latest/api-reference/esri-views-MapView.html) instance is required when a `valueExpression` is specified. + * + * [Read more...](https://developers.arcgis.com/javascript/latest/api-reference/esri-renderers-smartMapping-statistics-summaryStatistics.html#summaryStatistics) + */ + view?: View; + /** + * A subset of features for which to calculate the statistics. + * + * [Read more...](https://developers.arcgis.com/javascript/latest/api-reference/esri-renderers-smartMapping-statistics-summaryStatistics.html#summaryStatistics) + */ + features?: Graphic[]; } /** @@ -19795,15 +21868,19 @@ declare namespace __esri { */ interface uniqueValues { /** - * Returns an object containing an array of unique values queried from a given field in a [Layer](https://developers.arcgis.com/javascript/latest/api-reference/esri-layers-Layer.html) along with the total count of features that belong to the given category. + * Returns an object containing an array of unique values queried from a given field (or values returned from an expression) in a [Layer](https://developers.arcgis.com/javascript/latest/api-reference/esri-layers-Layer.html) along with the total count of features that belong to the given category. * * [Read more...](https://developers.arcgis.com/javascript/latest/api-reference/esri-renderers-smartMapping-statistics-uniqueValues.html#uniqueValues) * * @param params See the table below for details of each parameter. * @param params.layer The layer from which to query for unique values. - * @param params.field The name of the numeric or string field from which the unique values will be obtained. - * @param params.features If the `layer` is a FeatureLayer constructed with client-side graphics or you would like to calculate statistics based on a subset of features, then pass the features in this parameter. + * @param params.field The name of the numeric or string field from which the unique values will be obtained. This property is ignored if a `valueExpression` is used. + * @param params.valueExpression An [Arcade](https://developers.arcgis.com/javascript/latest/guide/arcade/index.html) expression that returns a number or string. This expression can reference field values using the `$feature` global variable. This property overrides the `field` property and therefore is used instead of an input `field` value. + * @param params.sqlExpression A SQL expression evaluating to a number or string. This parameter only applies to service-based FeatureLayers. + * @param params.sqlWhere A SQL where clause used to filter features for the statistics query. For example, this is useful in situations where you want to avoid dividing by zero as is the case with creating a predominance visualization. * @param params.returnAllCodedValues Indicates that all domain codes should be returned if the given field has domain values. + * @param params.view A [SceneView](https://developers.arcgis.com/javascript/latest/api-reference/esri-views-SceneView.html) or [MapView](https://developers.arcgis.com/javascript/latest/api-reference/esri-views-MapView.html) instance is required when a `valueExpression` is specified. + * @param params.features A subset of features for which to generate the unique values. * */ uniqueValues(params: uniqueValuesUniqueValuesParams): IPromise; @@ -19834,25 +21911,49 @@ declare namespace __esri { * * [Read more...](https://developers.arcgis.com/javascript/latest/api-reference/esri-renderers-smartMapping-statistics-uniqueValues.html#uniqueValues) */ - layer: FeatureLayer | SceneLayer | PointCloudLayer; + layer: FeatureLayer | SceneLayer | CSVLayer | PointCloudLayer; /** - * The name of the numeric or string field from which the unique values will be obtained. + * The name of the numeric or string field from which the unique values will be obtained. This property is ignored if a `valueExpression` is used. * * [Read more...](https://developers.arcgis.com/javascript/latest/api-reference/esri-renderers-smartMapping-statistics-uniqueValues.html#uniqueValues) */ - field: string; + field?: string; /** - * If the `layer` is a FeatureLayer constructed with client-side graphics or you would like to calculate statistics based on a subset of features, then pass the features in this parameter. + * An [Arcade](https://developers.arcgis.com/javascript/latest/guide/arcade/index.html) expression that returns a number or string. This expression can reference field values using the `$feature` global variable. This property overrides the `field` property and therefore is used instead of an input `field` value. * * [Read more...](https://developers.arcgis.com/javascript/latest/api-reference/esri-renderers-smartMapping-statistics-uniqueValues.html#uniqueValues) */ - features?: Graphic[]; + valueExpression?: string; + /** + * A SQL expression evaluating to a number or string. This parameter only applies to service-based FeatureLayers. + * + * [Read more...](https://developers.arcgis.com/javascript/latest/api-reference/esri-renderers-smartMapping-statistics-uniqueValues.html#uniqueValues) + */ + sqlExpression?: string; + /** + * A SQL where clause used to filter features for the statistics query. For example, this is useful in situations where you want to avoid dividing by zero as is the case with creating a predominance visualization. + * + * [Read more...](https://developers.arcgis.com/javascript/latest/api-reference/esri-renderers-smartMapping-statistics-uniqueValues.html#uniqueValues) + */ + sqlWhere?: string; /** * Indicates that all domain codes should be returned if the given field has domain values. * * [Read more...](https://developers.arcgis.com/javascript/latest/api-reference/esri-renderers-smartMapping-statistics-uniqueValues.html#uniqueValues) */ returnAllCodedValues?: boolean; + /** + * A [SceneView](https://developers.arcgis.com/javascript/latest/api-reference/esri-views-SceneView.html) or [MapView](https://developers.arcgis.com/javascript/latest/api-reference/esri-views-MapView.html) instance is required when a `valueExpression` is specified. + * + * [Read more...](https://developers.arcgis.com/javascript/latest/api-reference/esri-renderers-smartMapping-statistics-uniqueValues.html#uniqueValues) + */ + view?: View; + /** + * A subset of features for which to generate the unique values. + * + * [Read more...](https://developers.arcgis.com/javascript/latest/api-reference/esri-renderers-smartMapping-statistics-uniqueValues.html#uniqueValues) + */ + features?: Graphic[]; } @@ -20940,7 +23041,7 @@ declare namespace __esri { * * [Read more...](https://developers.arcgis.com/javascript/latest/api-reference/esri-renderers-support-jsonUtils.html#fromJSON) * - * @param json A JSON representation of the instance in the ArcGIS format. See the [ArcGIS REST API documentation](http://resources.arcgis.com/en/help/arcgis-rest-api/index.html#/Renderer_objects/02r30000019t000000/) for examples of the structure of various input JSON objects. + * @param json A JSON representation of the instance in the ArcGIS format. See the [ArcGIS REST API documentation](https://developers.arcgis.com/documentation/common-data-types/renderer-objects.htm) for examples of the structure of various input JSON objects. * */ fromJSON(json: any): Renderer; @@ -20949,6 +23050,12 @@ declare namespace __esri { export const supportJsonUtils: supportJsonUtils; interface UniqueValueRenderer extends Renderer, VisualVariablesMixin { + /** + * This property is only relevant When symbolizing polygon features with marker symbols (or [IconSymbol3DLayer](https://developers.arcgis.com/javascript/latest/api-reference/esri-symbols-IconSymbol3DLayer.html)) in the [uniqueValueInfos](https://developers.arcgis.com/javascript/latest/api-reference/esri-renderers-UniqueValueRenderer.html#uniqueValueInfos) of this renderer. This is usually done when adding a [SizeVisualVariable](https://developers.arcgis.com/javascript/latest/api-reference/esri-renderers-Renderer.html#SizeVisualVariable) to the [visualVariables](https://developers.arcgis.com/javascript/latest/api-reference/esri-renderers-UniqueValueRenderer.html#visualVariables)) in a bivariate visualization (color indicates a type-based value and size indicates the value of a separate numeric field). Use this property to set a background [FillSymbol](https://developers.arcgis.com/javascript/latest/api-reference/esri-symbols-FillSymbol.html) (or [PolygonSymbol3D](https://developers.arcgis.com/javascript/latest/api-reference/esri-symbols-PolygonSymbol3D.html) if visualizing data in 3D) to visualize the boundaries of each polygon. + * + * [Read more...](https://developers.arcgis.com/javascript/latest/api-reference/esri-renderers-UniqueValueRenderer.html#backgroundFillSymbol) + */ + backgroundFillSymbol: FillSymbol | PolygonSymbol3D; /** * Label used in the [Legend](https://developers.arcgis.com/javascript/latest/api-reference/esri-widgets-Legend.html) to describe features assigned the [default symbol](https://developers.arcgis.com/javascript/latest/api-reference/esri-renderers-UniqueValueRenderer.html#defaultSymbol). The [default symbol](https://developers.arcgis.com/javascript/latest/api-reference/esri-renderers-UniqueValueRenderer.html#defaultSymbol) is used to draw all features with unspecified, unmatched values. * @@ -21113,6 +23220,12 @@ declare namespace __esri { export const UniqueValueRenderer: UniqueValueRendererConstructor; interface UniqueValueRendererProperties extends RendererProperties, VisualVariablesMixinProperties { + /** + * This property is only relevant When symbolizing polygon features with marker symbols (or [IconSymbol3DLayer](https://developers.arcgis.com/javascript/latest/api-reference/esri-symbols-IconSymbol3DLayer.html)) in the [uniqueValueInfos](https://developers.arcgis.com/javascript/latest/api-reference/esri-renderers-UniqueValueRenderer.html#uniqueValueInfos) of this renderer. This is usually done when adding a [SizeVisualVariable](https://developers.arcgis.com/javascript/latest/api-reference/esri-renderers-Renderer.html#SizeVisualVariable) to the [visualVariables](https://developers.arcgis.com/javascript/latest/api-reference/esri-renderers-UniqueValueRenderer.html#visualVariables)) in a bivariate visualization (color indicates a type-based value and size indicates the value of a separate numeric field). Use this property to set a background [FillSymbol](https://developers.arcgis.com/javascript/latest/api-reference/esri-symbols-FillSymbol.html) (or [PolygonSymbol3D](https://developers.arcgis.com/javascript/latest/api-reference/esri-symbols-PolygonSymbol3D.html) if visualizing data in 3D) to visualize the boundaries of each polygon. + * + * [Read more...](https://developers.arcgis.com/javascript/latest/api-reference/esri-renderers-UniqueValueRenderer.html#backgroundFillSymbol) + */ + backgroundFillSymbol?: FillSymbolProperties | PolygonSymbol3DProperties; /** * Label used in the [Legend](https://developers.arcgis.com/javascript/latest/api-reference/esri-widgets-Legend.html) to describe features assigned the [default symbol](https://developers.arcgis.com/javascript/latest/api-reference/esri-renderers-UniqueValueRenderer.html#defaultSymbol). The [default symbol](https://developers.arcgis.com/javascript/latest/api-reference/esri-renderers-UniqueValueRenderer.html#defaultSymbol) is used to draw all features with unspecified, unmatched values. * @@ -21816,7 +23929,172 @@ declare namespace __esri { color?: Color; } + interface Edges3D extends Accessor, JSONSupport { + /** + * The color of the edges. This can be autocast with a named string, hex string, array of rgb or rgba values, an object with `r`, `g`, `b`, and `a` properties, or a [Color](https://developers.arcgis.com/javascript/latest/api-reference/esri-Color.html) object. + * + * [Read more...](https://developers.arcgis.com/javascript/latest/api-reference/esri-symbols-edges-Edges3D.html#color) + * + * @default black + */ + color: Color; + /** + * A size in points by which to extend edges beyond their original end points. + * + * [Read more...](https://developers.arcgis.com/javascript/latest/api-reference/esri-symbols-edges-Edges3D.html#extensionLength) + * + * @default "0" + */ + extensionLength: number; + /** + * The size of the edges in points. This value may be autocast with a string expressing size in points or pixels (e.g. `12px`). + * + * [Read more...](https://developers.arcgis.com/javascript/latest/api-reference/esri-symbols-edges-Edges3D.html#size) + * + * @default 1px + */ + size: number; + + /** + * Creates a deep clone of the edges. + * + * [Read more...](https://developers.arcgis.com/javascript/latest/api-reference/esri-symbols-edges-Edges3D.html#clone) + * + * + */ + clone(): Edges3D; + } + + interface Edges3DConstructor { + /** + * Edges3D is the base class for symbol classes that add edge rendering visualization to existing symbols. Edge rendering visualization is specific for 3D visualizations and can only be applied to [FillSymbol3DLayer](https://developers.arcgis.com/javascript/latest/api-reference/esri-symbols-FillSymbol3DLayer.html) on [MeshSymbol3D](https://developers.arcgis.com/javascript/latest/api-reference/esri-symbols-MeshSymbol3D.html) or [ExtrudeSymbol3DLayer](https://developers.arcgis.com/javascript/latest/api-reference/esri-symbols-ExtrudeSymbol3DLayer.html) on [PolygonSymbol3D](https://developers.arcgis.com/javascript/latest/api-reference/esri-symbols-PolygonSymbol3D.html). + * + * [Read more...](https://developers.arcgis.com/javascript/latest/api-reference/esri-symbols-edges-Edges3D.html) + */ + + new(properties?: Edges3DProperties): Edges3D; + + fromJSON(json: any): Edges3D; + } + + export const Edges3D: Edges3DConstructor; + + interface Edges3DProperties { + /** + * The color of the edges. This can be autocast with a named string, hex string, array of rgb or rgba values, an object with `r`, `g`, `b`, and `a` properties, or a [Color](https://developers.arcgis.com/javascript/latest/api-reference/esri-Color.html) object. + * + * [Read more...](https://developers.arcgis.com/javascript/latest/api-reference/esri-symbols-edges-Edges3D.html#color) + * + * @default black + */ + color?: Color | number[] | string; + /** + * A size in points by which to extend edges beyond their original end points. + * + * [Read more...](https://developers.arcgis.com/javascript/latest/api-reference/esri-symbols-edges-Edges3D.html#extensionLength) + * + * @default "0" + */ + extensionLength?: number | string; + /** + * The size of the edges in points. This value may be autocast with a string expressing size in points or pixels (e.g. `12px`). + * + * [Read more...](https://developers.arcgis.com/javascript/latest/api-reference/esri-symbols-edges-Edges3D.html#size) + * + * @default 1px + */ + size?: number | string; + } + + interface SketchEdges3D extends Edges3D { + /** + * For SketchEdges3D the type is always `sketch`. + * + * [Read more...](https://developers.arcgis.com/javascript/latest/api-reference/esri-symbols-edges-SketchEdges3D.html#type) + */ + type: "sketch"; + + /** + * Creates a deep clone of the object. + * + * [Read more...](https://developers.arcgis.com/javascript/latest/api-reference/esri-symbols-edges-SketchEdges3D.html#clone) + * + * + */ + clone(): SketchEdges3D; + } + + interface SketchEdges3DConstructor { + /** + * SketchEdges3D is a symbol type that visualizes edges of [3D Object SceneLayers](https://developers.arcgis.com/javascript/latest/api-reference/esri-layers-SceneLayer.html), extruded polygons or mesh geometries with a sketched line. It can be used to emphasize the form of 3D objects and to improve the three-dimensional spatial understanding. A sketched line aims to look like a hand-drawn line. In architecture this is useful for visualizing planned urban projects. + * + * [Read more...](https://developers.arcgis.com/javascript/latest/api-reference/esri-symbols-edges-SketchEdges3D.html) + */ + + new(properties?: SketchEdges3DProperties): SketchEdges3D; + + fromJSON(json: any): SketchEdges3D; + } + + export const SketchEdges3D: SketchEdges3DConstructor; + + interface SketchEdges3DProperties extends Edges3DProperties { + /** + * For SketchEdges3D the type is always `sketch`. + * + * [Read more...](https://developers.arcgis.com/javascript/latest/api-reference/esri-symbols-edges-SketchEdges3D.html#type) + */ + type?: "sketch"; + } + + interface SolidEdges3D extends Edges3D { + /** + * For SolidEdges3D the type is always `solid`. + * + * [Read more...](https://developers.arcgis.com/javascript/latest/api-reference/esri-symbols-edges-SolidEdges3D.html#type) + */ + type: "solid"; + + /** + * Creates a deep clone of the object. + * + * [Read more...](https://developers.arcgis.com/javascript/latest/api-reference/esri-symbols-edges-SolidEdges3D.html#clone) + * + * + */ + clone(): SolidEdges3D; + } + + interface SolidEdges3DConstructor { + /** + * SolidEdges3D is a symbol type that visualizes edges of [3D Object SceneLayers](https://developers.arcgis.com/javascript/latest/api-reference/esri-layers-SceneLayer.html), extruded polygons or mesh geometries with a solid line. It can be used to emphasize the form of 3D objects and to improve the three-dimensional spatial understanding. + * + * [Read more...](https://developers.arcgis.com/javascript/latest/api-reference/esri-symbols-edges-SolidEdges3D.html) + */ + + new(properties?: SolidEdges3DProperties): SolidEdges3D; + + fromJSON(json: any): SolidEdges3D; + } + + export const SolidEdges3D: SolidEdges3DConstructor; + + interface SolidEdges3DProperties extends Edges3DProperties { + /** + * For SolidEdges3D the type is always `solid`. + * + * [Read more...](https://developers.arcgis.com/javascript/latest/api-reference/esri-symbols-edges-SolidEdges3D.html#type) + */ + type?: "solid"; + } + interface ExtrudeSymbol3DLayer extends Symbol3DLayer { + /** + * Sets the contour edges on polygons symbolized with ExtrudeSymbol3DLayer. + * + * [Read more...](https://developers.arcgis.com/javascript/latest/api-reference/esri-symbols-ExtrudeSymbol3DLayer.html#edges) + */ + edges: Edges3D; /** * The height of the extrusion in meters. Negative values will extrude the polygon surface downward towards or below the ground. * @@ -21857,6 +24135,12 @@ declare namespace __esri { export const ExtrudeSymbol3DLayer: ExtrudeSymbol3DLayerConstructor; interface ExtrudeSymbol3DLayerProperties extends Symbol3DLayerProperties { + /** + * Sets the contour edges on polygons symbolized with ExtrudeSymbol3DLayer. + * + * [Read more...](https://developers.arcgis.com/javascript/latest/api-reference/esri-symbols-ExtrudeSymbol3DLayer.html#edges) + */ + edges?: Edges3DProperties; /** * The height of the extrusion in meters. Negative values will extrude the polygon surface downward towards or below the ground. * @@ -21901,7 +24185,13 @@ declare namespace __esri { interface FillSymbol3DLayer extends Symbol3DLayer { /** - * The outline used to draw a line around the filled geometry. + * Sets the contour edges on 3D Objects. This is only applicable for [MeshSymbol3D](https://developers.arcgis.com/javascript/latest/api-reference/esri-symbols-MeshSymbol3D.html). ![symbol3D-edges-solid](https://developers.arcgis.com/javascript/latest/assets/img/apiref/symbols/symbol3d-edges-solid-2.png) + * + * [Read more...](https://developers.arcgis.com/javascript/latest/api-reference/esri-symbols-FillSymbol3DLayer.html#edges) + */ + edges: Edges3D; + /** + * The outline used to draw a line around the filled geometry. This property is not supported in [MeshSymbol3D](https://developers.arcgis.com/javascript/latest/api-reference/esri-symbols-MeshSymbol3D.html) symbol layers. * * [Read more...](https://developers.arcgis.com/javascript/latest/api-reference/esri-symbols-FillSymbol3DLayer.html#outline) */ @@ -21939,7 +24229,13 @@ declare namespace __esri { interface FillSymbol3DLayerProperties extends Symbol3DLayerProperties { /** - * The outline used to draw a line around the filled geometry. + * Sets the contour edges on 3D Objects. This is only applicable for [MeshSymbol3D](https://developers.arcgis.com/javascript/latest/api-reference/esri-symbols-MeshSymbol3D.html). ![symbol3D-edges-solid](https://developers.arcgis.com/javascript/latest/assets/img/apiref/symbols/symbol3d-edges-solid-2.png) + * + * [Read more...](https://developers.arcgis.com/javascript/latest/api-reference/esri-symbols-FillSymbol3DLayer.html#edges) + */ + edges?: Edges3DProperties; + /** + * The outline used to draw a line around the filled geometry. This property is not supported in [MeshSymbol3D](https://developers.arcgis.com/javascript/latest/api-reference/esri-symbols-MeshSymbol3D.html) symbol layers. * * [Read more...](https://developers.arcgis.com/javascript/latest/api-reference/esri-symbols-FillSymbol3DLayer.html#outline) */ @@ -22361,7 +24657,7 @@ declare namespace __esri { * * [Read more...](https://developers.arcgis.com/javascript/latest/api-reference/esri-symbols-LineSymbol3DLayer.html#size) * - * @default 0.75 + * @default "1px" */ size: number; /** @@ -22401,7 +24697,7 @@ declare namespace __esri { * * [Read more...](https://developers.arcgis.com/javascript/latest/api-reference/esri-symbols-LineSymbol3DLayer.html#size) * - * @default 0.75 + * @default "1px" */ size?: number | string; } @@ -23483,7 +25779,7 @@ declare namespace __esri { * * [Read more...](https://developers.arcgis.com/javascript/latest/api-reference/esri-symbols-support-jsonUtils.html#fromJSON) * - * @param json A JSON representation of the instance in the ArcGIS format. See the [ArcGIS REST API documentation](http://resources.arcgis.com/en/help/arcgis-rest-api/index.html#/Symbol_Objects/02r3000000n5000000/) for examples of the structure of various input JSON objects. + * @param json A JSON representation of the instance in the ArcGIS format. See the [ArcGIS REST API documentation](https://developers.arcgis.com/documentation/common-data-types/symbol-objects.htm) for examples of the structure of various input JSON objects. * */ fromJSON(json: any): Symbol; @@ -23593,7 +25889,7 @@ declare namespace __esri { * * [Read more...](https://developers.arcgis.com/javascript/latest/api-reference/esri-symbols-Symbol3D.html#styleOrigin) */ - readonly styleOrigin: Symbol3DStyleOrigin; + styleOrigin: Symbol3DStyleOrigin; /** * A Collection of [Symbol3DLayer](https://developers.arcgis.com/javascript/latest/api-reference/esri-symbols-Symbol3DLayer.html) objects used to visualize the graphic or feature. Individual symbol layers may be autocast as objects and specified using the `type` property. * @@ -23617,6 +25913,12 @@ declare namespace __esri { export const Symbol3D: Symbol3DConstructor; interface Symbol3DProperties extends SymbolProperties { + /** + * The origin of the style from which the symbol was originally referenced. A reference to the style origin can be either by styleName or by styleUrl (but not both). This information is part of the WebScene persistence model and may be used to understand where a symbol was originally sourced from. It does not affect actual appearance or rendering of the symbol. + * + * [Read more...](https://developers.arcgis.com/javascript/latest/api-reference/esri-symbols-Symbol3D.html#styleOrigin) + */ + styleOrigin?: Symbol3DStyleOrigin; /** * A Collection of [Symbol3DLayer](https://developers.arcgis.com/javascript/latest/api-reference/esri-symbols-Symbol3DLayer.html) objects used to visualize the graphic or feature. Individual symbol layers may be autocast as objects and specified using the `type` property. * @@ -24376,8 +26678,8 @@ declare namespace __esri { * @param params See the object specifications table below for the structure of the `params` object. * @param params.strings An array of formatted strings as specified by `conversionType`. Example: `["01N AA 66021 00000" , "11S NT 00000 62155" , "31U BT 94071 65288"]` * @param params.sr The spatial reference or well-known ID to convert the input string coordinates to. - * @param params.conversionType The converstion type of the input strings. **Possible Values:** mrgs | usng | utm | geo-ref | gars | dms | ddm | dd - * @param params.conversionMode Conversion options for mrgs, utm and gars conversion types. See the [ArcGIS REST API documentation](http://resources.arcgis.com/en/help/arcgis-rest-api/index.html#//02r30000026z000000) for valid values and their descriptions. + * @param params.conversionType The conversion type of the input strings. **Possible Values:** mrgs | usng | utm | geo-ref | gars | dms | ddm | dd + * @param params.conversionMode Conversion options for mrgs, utm and gars conversion types. See the [ArcGIS REST API documentation](https://developers.arcgis.com/rest/services-reference/from-geocoordinatestring.htm) for valid values and their descriptions. * @param requestOptions Additional [options](https://developers.arcgis.com/javascript/latest/api-reference/esri-request.html#esriRequest) to be used for the data request (will override requestOptions defined during construction). * */ @@ -24483,8 +26785,8 @@ declare namespace __esri { * @param params.sr The spatial reference (or WKID of the spatial reference) of the XY-coordinates to be converted. * @param params.coordinates An array of XY-coordinates (in JSON format) to be converted. * @param params.conversionType The conversion type of the input strings. **Possible values:** mgrs | usng | utm | geo-ref | gars | dms | ddm | dd - * @param params.conversionMode Conversion options for mgrs and utm conversion types. See the [ArcGIS REST API documentation](http://resources.arcgis.com/en/help/arcgis-rest-api/index.html#//02r30000026w000000) for valid conversion modes and their descriptions. - * @param params.numOfDigits The number of digits to output for each of the numerical portions in the string. The default value depends of `conversionType`. See the [ArcGIS REST API documentation](http://resources.arcgis.com/en/help/arcgis-rest-api/index.html#//02r30000026z000000) for default values. + * @param params.conversionMode Conversion options for mgrs and utm conversion types. See the [ArcGIS REST API documentation](https://developers.arcgis.com/rest/services-reference/to-geocoordinatestring.htm) for valid conversion modes and their descriptions. + * @param params.numOfDigits The number of digits to output for each of the numerical portions in the string. The default value depends of `conversionType`. See the [ArcGIS REST API documentation](https://developers.arcgis.com/rest/services-reference/from-geocoordinatestring.htm) for default values. * @param params.rounding If `true`, then numeric portions of the string are rounded to the nearest whole magnitude as specified by `numOfDigits`. Otherwise, numeric portions of the string are truncated. The rounding parameter applies only to conversion types `mgrs`, `usng` and `geo-ref`. * @param params.addSpaces If `true`, then spaces are added between components of the string. The `addSpaces` parameter applies only to conversion types `mgrs`, `usng` and `utm`. The default value for `mgrs` is `false` , while the default value for both `usng` and `utm` is `true`. * @param requestOptions Additional [options](https://developers.arcgis.com/javascript/latest/api-reference/esri-request.html#esriRequest) to be used for the data request (will override requestOptions defined during construction). @@ -24544,7 +26846,7 @@ declare namespace __esri { */ sr: SpatialReference | string; /** - * The converstion type of the input strings. **Possible Values:** mrgs | usng | utm | geo-ref | gars | dms | ddm | dd + * The conversion type of the input strings. **Possible Values:** mrgs | usng | utm | geo-ref | gars | dms | ddm | dd * * [Read more...](https://developers.arcgis.com/javascript/latest/api-reference/esri-tasks-GeometryService.html#fromGeoCoordinateString) * @@ -24552,7 +26854,7 @@ declare namespace __esri { */ conversionType?: string; /** - * Conversion options for mrgs, utm and gars conversion types. See the [ArcGIS REST API documentation](http://resources.arcgis.com/en/help/arcgis-rest-api/index.html#//02r30000026z000000) for valid values and their descriptions. + * Conversion options for mrgs, utm and gars conversion types. See the [ArcGIS REST API documentation](https://developers.arcgis.com/rest/services-reference/from-geocoordinatestring.htm) for valid values and their descriptions. * * [Read more...](https://developers.arcgis.com/javascript/latest/api-reference/esri-tasks-GeometryService.html#fromGeoCoordinateString) */ @@ -24580,13 +26882,13 @@ declare namespace __esri { */ conversionType: string; /** - * Conversion options for mgrs and utm conversion types. See the [ArcGIS REST API documentation](http://resources.arcgis.com/en/help/arcgis-rest-api/index.html#//02r30000026w000000) for valid conversion modes and their descriptions. + * Conversion options for mgrs and utm conversion types. See the [ArcGIS REST API documentation](https://developers.arcgis.com/rest/services-reference/to-geocoordinatestring.htm) for valid conversion modes and their descriptions. * * [Read more...](https://developers.arcgis.com/javascript/latest/api-reference/esri-tasks-GeometryService.html#toGeoCoordinateString) */ conversionMode?: string; /** - * The number of digits to output for each of the numerical portions in the string. The default value depends of `conversionType`. See the [ArcGIS REST API documentation](http://resources.arcgis.com/en/help/arcgis-rest-api/index.html#//02r30000026z000000) for default values. + * The number of digits to output for each of the numerical portions in the string. The default value depends of `conversionType`. See the [ArcGIS REST API documentation](https://developers.arcgis.com/rest/services-reference/from-geocoordinatestring.htm) for default values. * * [Read more...](https://developers.arcgis.com/javascript/latest/api-reference/esri-tasks-GeometryService.html#toGeoCoordinateString) */ @@ -24847,7 +27149,7 @@ declare namespace __esri { */ countryCode: string; /** - * The spatial reference of the output geometries. If not specified, the output geometries are in the spatial reference of the input geometries when performing a reverse geocode and in the default spatial reference returned by the service if finding locations by address. If `processSpatialReference` is specified and `outSpatialReference` is not specified, the output geometries are in the spatial reference of the process spatial reference. + * The spatial reference of the output geometries. If not specified, the output geometries are in the spatial reference of the input geometries when performing a reverse geocode and in the default spatial reference returned by the service if finding locations by address. * * [Read more...](https://developers.arcgis.com/javascript/latest/api-reference/esri-tasks-Locator.html#outSpatialReference) */ @@ -24879,7 +27181,7 @@ declare namespace __esri { * * @param params Specify at least the address and optionally other properties. See the object specifications table below. * @param params.address visit the ArcGIS Online Geocoding Service help for more details on the World Geocoder. - * The address argument is data object that contains properties representing the various address fields accepted by the corresponding geocode service. These fields are listed in the addressFields property of the associated geocode service resource. For example, if the *addressFields* of a geocode service resource includes fields with the following names: Street, City, State and Zone, then the address argument is of the form: + * The address argument is data object that contains properties representing the various address fields accepted by the corresponding geocode service. These fields are listed in the addressFields property of the associated geocode service resource. For example, if the *addressFields* of a geocode service resource includes fields with the following names: Street, City, State and Zone, then the address argument is of the form: * ```js * { * Street: "1234 W Main St", @@ -24887,14 +27189,16 @@ declare namespace __esri { * State: "WA", * Zone: "99027" * } + * * ``` * * Locators published using ArcGIS 10 or later support a single line address field, which * can be specified using the following syntax where field_name is the name of the single * line address field. You can find this name by viewing the help or services directory for * your locator services. Common values are *SingleLine* and *SingleLineFieldName*: + * * ```js - * var address = { "field_name": "380 New York St, Redlands, CA 92373" }; + * var address = { "field_name": "380 New York St, Redlands, CA 92373" }; * ``` * The Services Directory can be used to find out the required and optional address fields * and the correct names for the input name fields. If you are using the World Geocoding Service @@ -24907,7 +27211,7 @@ declare namespace __esri { * @param params.maxLocations Maximum results to return from the query. * @param params.outFields The list of fields included in the returned result set. This list is a comma delimited list of field names. If you specify the shape field in the list of return fields, it is ignored. For non-intersection addresses you can specify the candidate fields as defined in the geocode service. For intersection addresses you can specify the intersection candidate fields. * @param params.searchExtent Defines the extent within which the geocode server will search. Requires ArcGIS Server version 10.1 or greater. - * @param requestOptions Additional [options](https://developers.arcgis.com/javascript/latest/api-reference/esri-request.html#esriRequest) to be used for the data request (will override requestOptions defined during construction). + * @param requestOptions Additional [options](https://developers.arcgis.com/javascript/latest/api-reference/esri-request.html#esriRequest) to be used for the data request (will override `requestOptions` defined during construction). * */ addressToLocations(params: LocatorAddressToLocationsParams, requestOptions?: any): IPromise; @@ -24964,7 +27268,7 @@ declare namespace __esri { */ countryCode?: string; /** - * The spatial reference of the output geometries. If not specified, the output geometries are in the spatial reference of the input geometries when performing a reverse geocode and in the default spatial reference returned by the service if finding locations by address. If `processSpatialReference` is specified and `outSpatialReference` is not specified, the output geometries are in the spatial reference of the process spatial reference. + * The spatial reference of the output geometries. If not specified, the output geometries are in the spatial reference of the input geometries when performing a reverse geocode and in the default spatial reference returned by the service if finding locations by address. * * [Read more...](https://developers.arcgis.com/javascript/latest/api-reference/esri-tasks-Locator.html#outSpatialReference) */ @@ -25002,7 +27306,7 @@ declare namespace __esri { export interface LocatorAddressToLocationsParams extends Object { /** - * The address argument is data object that contains properties representing the various address fields accepted by the corresponding geocode service. These fields are listed in the addressFields property of the associated geocode service resource. For example, if the *addressFields* of a geocode service resource includes fields with the following names: Street, City, State and Zone, then the address argument is of the form: + * The address argument is data object that contains properties representing the various address fields accepted by the corresponding geocode service. These fields are listed in the addressFields property of the associated geocode service resource. For example, if the *addressFields* of a geocode service resource includes fields with the following names: Street, City, State and Zone, then the address argument is of the form: * ```js * { * Street: "1234 W Main St", @@ -25010,14 +27314,16 @@ declare namespace __esri { * State: "WA", * Zone: "99027" * } + * * ``` * * Locators published using ArcGIS 10 or later support a single line address field, which * can be specified using the following syntax where field_name is the name of the single * line address field. You can find this name by viewing the help or services directory for * your locator services. Common values are *SingleLine* and *SingleLineFieldName*: + * * ```js - * var address = { "field_name": "380 New York St, Redlands, CA 92373" }; + * var address = { "field_name": "380 New York St, Redlands, CA 92373" }; * ``` * The Services Directory can be used to find out the required and optional address fields * and the correct names for the input name fields. If you are using the World Geocoding Service @@ -25168,7 +27474,7 @@ declare namespace __esri { interface PrintTaskConstructor { /** - * The PrintTask generates a printer-ready version of the map using an [Export Web Map Task](http://resources.arcgis.com/en/help/arcgis-rest-api/index.html#/Export_Web_Map_Task/02r3000001m3000000/) available with ArGIS Server 10.1 and later. This class is used when you want to have more granular control over the user interface, for example, if you want to provide users the ability to define what appears on the printed page. + * The PrintTask generates a printer-ready version of the map using an [Export Web Map Task](https://developers.arcgis.com/rest/services-reference/export-web-map-task.htm) available with ArGIS Server 10.1 and later. This class is used when you want to have more granular control over the user interface, for example, if you want to provide users the ability to define what appears on the printed page. * * [Read more...](https://developers.arcgis.com/javascript/latest/api-reference/esri-tasks-PrintTask.html) */ @@ -25202,21 +27508,21 @@ declare namespace __esri { * * [Read more...](https://developers.arcgis.com/javascript/latest/api-reference/esri-tasks-QueryTask.html#execute) * - * @param params Specifies the attributes and spatial filter of the query. + * @param query Specifies the attributes and spatial filter of the query. * @param requestOptions Additional [options](https://developers.arcgis.com/javascript/latest/api-reference/esri-request.html#esriRequest) to be used for the data request (will override requestOptions defined during construction). * */ - execute(params: Query | QueryProperties, requestOptions?: any): IPromise; + execute(query: Query | QueryProperties, requestOptions?: any): IPromise; /** * Gets a count of the number of features that satisfy the input query. Valid only for layers published using ArcGIS Server 10 SP1 or greater. Layers published with earlier versions of ArcGIS Server return an error to the `errback` param of `.then()`. * * [Read more...](https://developers.arcgis.com/javascript/latest/api-reference/esri-tasks-QueryTask.html#executeForCount) * - * @param params Specifies the attributes and spatial filter of the query. + * @param query Specifies the attributes and spatial filter of the query. * @param requestOptions Additional [options](https://developers.arcgis.com/javascript/latest/api-reference/esri-request.html#esriRequest) to be used for the data request (will override requestOptions defined during construction). * */ - executeForCount(params: Query | QueryProperties, requestOptions?: any): IPromise; + executeForCount(query: Query | QueryProperties, requestOptions?: any): IPromise; /** * Gets the extent of the features that satisfy the input query. The count of features that satisfy the input query is returned upon resolution as well. Valid only for [hosted feature services](http://doc.arcgis.com/en/arcgis-online/share-maps/hosted-web-layers.htm) on [arcgis.com](http://arcgis.com) and for ArcGIS Server 10.3.1 and later. * @@ -25226,27 +27532,27 @@ declare namespace __esri { * @param requestOptions Additional [options](https://developers.arcgis.com/javascript/latest/api-reference/esri-request.html#esriRequest) to be used for the data request (will override requestOptions defined during construction). * */ - executeForExtent(params: Query | QueryProperties, requestOptions?: any): IPromise; + executeForExtent(params: Query, requestOptions?: any): IPromise; /** * Executes a [Query](https://developers.arcgis.com/javascript/latest/api-reference/esri-tasks-support-Query.html) against an ArcGIS Server map layer. The result is an array of the object IDs of features that satisfy the input query. * * [Read more...](https://developers.arcgis.com/javascript/latest/api-reference/esri-tasks-QueryTask.html#executeForIds) * - * @param params Specifies the attributes and spatial filter of the query. + * @param query Specifies the attributes and spatial filter of the query. * @param requestOptions Additional [options](https://developers.arcgis.com/javascript/latest/api-reference/esri-request.html#esriRequest) to be used for the data request (will override requestOptions defined during construction). * */ - executeForIds(params: Query | QueryProperties, requestOptions?: any): IPromise; + executeForIds(query: Query | QueryProperties, requestOptions?: any): IPromise; /** * Executes a [RelationshipQuery](https://developers.arcgis.com/javascript/latest/api-reference/esri-tasks-support-RelationshipQuery.html) against an ArcGIS Server map layer (or table). If the query is successful, the result is returned as a [FeatureSet](https://developers.arcgis.com/javascript/latest/api-reference/esri-tasks-support-FeatureSet.html), which can be accessed using the `.then()` method. * * [Read more...](https://developers.arcgis.com/javascript/latest/api-reference/esri-tasks-QueryTask.html#executeRelationshipQuery) * - * @param params Specifies the attributes and spatial filter of the query. + * @param relationshipQuery Specifies the attributes and spatial filter of the query. * @param requestOptions Additional [options](https://developers.arcgis.com/javascript/latest/api-reference/esri-request.html#esriRequest) to be used for the data request (will override requestOptions defined during construction). * */ - executeRelationshipQuery(params: RelationshipQuery, requestOptions?: any): IPromise; + executeRelationshipQuery(relationshipQuery: RelationshipQuery | RelationshipQueryProperties, requestOptions?: any): IPromise; } interface QueryTaskConstructor { @@ -25438,7 +27744,7 @@ declare namespace __esri { polygons: Polygon[]; /** - * Converts an instance of [this class]() to its ArcGIS Portal JSON representation. See the [Using fromJSON()](https://developers.arcgis.com/javascript/latest/guide/using-fromjson/index.html) topic in the Guide for more information. + * Converts an instance of [this class]() to its ArcGIS portal JSON representation. See the [Using fromJSON()](https://developers.arcgis.com/javascript/latest/guide/using-fromjson/index.html) topic in the Guide for more information. * * [Read more...](https://developers.arcgis.com/javascript/latest/api-reference/esri-tasks-support-AreasAndLengthsParameters.html#toJSON) * @@ -25534,7 +27840,7 @@ declare namespace __esri { unit: string; /** - * Converts an instance of [this class]() to its ArcGIS Portal JSON representation. See the [Using fromJSON()](https://developers.arcgis.com/javascript/latest/guide/using-fromjson/index.html) topic in the Guide for more information. + * Converts an instance of [this class]() to its ArcGIS portal JSON representation. See the [Using fromJSON()](https://developers.arcgis.com/javascript/latest/guide/using-fromjson/index.html) topic in the Guide for more information. * * [Read more...](https://developers.arcgis.com/javascript/latest/api-reference/esri-tasks-support-BufferParameters.html#toJSON) * @@ -25800,7 +28106,7 @@ declare namespace __esri { */ timeOfDayUsage: string; /** - * Options for traveling to or from the facility. Default values are defined by the newtork layer. See NATravelDirection for a list of valid values. + * Options for traveling to or from the facility. Default values are defined by the network layer. See NATravelDirection for a list of valid values. * * [Read more...](https://developers.arcgis.com/javascript/latest/api-reference/esri-tasks-support-ClosestFacilityParameters.html#travelDirection) */ @@ -25815,7 +28121,7 @@ declare namespace __esri { useHierarchy: boolean; /** - * Converts an instance of [this class]() to its ArcGIS Portal JSON representation. See the [Using fromJSON()](https://developers.arcgis.com/javascript/latest/guide/using-fromjson/index.html) topic in the Guide for more information. + * Converts an instance of [this class]() to its ArcGIS portal JSON representation. See the [Using fromJSON()](https://developers.arcgis.com/javascript/latest/guide/using-fromjson/index.html) topic in the Guide for more information. * * [Read more...](https://developers.arcgis.com/javascript/latest/api-reference/esri-tasks-support-ClosestFacilityParameters.html#toJSON) * @@ -26040,7 +28346,7 @@ declare namespace __esri { */ timeOfDayUsage?: string; /** - * Options for traveling to or from the facility. Default values are defined by the newtork layer. See NATravelDirection for a list of valid values. + * Options for traveling to or from the facility. Default values are defined by the network layer. See NATravelDirection for a list of valid values. * * [Read more...](https://developers.arcgis.com/javascript/latest/api-reference/esri-tasks-support-ClosestFacilityParameters.html#travelDirection) */ @@ -26273,7 +28579,7 @@ declare namespace __esri { where: string; /** - * Converts an instance of [this class]() to its ArcGIS Portal JSON representation. See the [Using fromJSON()](https://developers.arcgis.com/javascript/latest/guide/using-fromjson/index.html) topic in the Guide for more information. + * Converts an instance of [this class]() to its ArcGIS portal JSON representation. See the [Using fromJSON()](https://developers.arcgis.com/javascript/latest/guide/using-fromjson/index.html) topic in the Guide for more information. * * [Read more...](https://developers.arcgis.com/javascript/latest/api-reference/esri-tasks-support-DataLayer.html#toJSON) * @@ -26405,7 +28711,7 @@ declare namespace __esri { maxSegmentLength: number; /** - * Converts an instance of [this class]() to its ArcGIS Portal JSON representation. See the [Using fromJSON()](https://developers.arcgis.com/javascript/latest/guide/using-fromjson/index.html) topic in the Guide for more information. + * Converts an instance of [this class]() to its ArcGIS portal JSON representation. See the [Using fromJSON()](https://developers.arcgis.com/javascript/latest/guide/using-fromjson/index.html) topic in the Guide for more information. * * [Read more...](https://developers.arcgis.com/javascript/latest/api-reference/esri-tasks-support-DensifyParameters.html#toJSON) * @@ -26592,7 +28898,7 @@ declare namespace __esri { geometry2: Geometry[]; /** - * Converts an instance of [this class]() to its ArcGIS Portal JSON representation. See the [Using fromJSON()](https://developers.arcgis.com/javascript/latest/guide/using-fromjson/index.html) topic in the Guide for more information. + * Converts an instance of [this class]() to its ArcGIS portal JSON representation. See the [Using fromJSON()](https://developers.arcgis.com/javascript/latest/guide/using-fromjson/index.html) topic in the Guide for more information. * * [Read more...](https://developers.arcgis.com/javascript/latest/api-reference/esri-tasks-support-DistanceParameters.html#toJSON) * @@ -26779,7 +29085,7 @@ declare namespace __esri { searchText: string; /** - * Converts an instance of [this class]() to its ArcGIS Portal JSON representation. See the [Using fromJSON()](https://developers.arcgis.com/javascript/latest/guide/using-fromjson/index.html) topic in the Guide for more information. + * Converts an instance of [this class]() to its ArcGIS portal JSON representation. See the [Using fromJSON()](https://developers.arcgis.com/javascript/latest/guide/using-fromjson/index.html) topic in the Guide for more information. * * [Read more...](https://developers.arcgis.com/javascript/latest/api-reference/esri-tasks-support-FindParameters.html#toJSON) * @@ -26960,7 +29266,7 @@ declare namespace __esri { maxDeviation: number; /** - * Converts an instance of [this class]() to its ArcGIS Portal JSON representation. See the [Using fromJSON()](https://developers.arcgis.com/javascript/latest/guide/using-fromjson/index.html) topic in the Guide for more information. + * Converts an instance of [this class]() to its ArcGIS portal JSON representation. See the [Using fromJSON()](https://developers.arcgis.com/javascript/latest/guide/using-fromjson/index.html) topic in the Guide for more information. * * [Read more...](https://developers.arcgis.com/javascript/latest/api-reference/esri-tasks-support-GeneralizeParameters.html#toJSON) * @@ -27100,6 +29406,14 @@ declare namespace __esri { * [Read more...](https://developers.arcgis.com/javascript/latest/api-reference/esri-tasks-support-IdentifyParameters.html#maxAllowableOffset) */ maxAllowableOffset: number; + /** + * If `true`, field names will be returned instead of field aliases. Requires ArcGIS Server service 10.5 or greater. + * + * [Read more...](https://developers.arcgis.com/javascript/latest/api-reference/esri-tasks-support-IdentifyParameters.html#returnFieldName) + * + * @default false + */ + returnFieldName: boolean; /** * If `true`, the result set includes the geometry associated with each result. * @@ -27108,6 +29422,30 @@ declare namespace __esri { * @default false */ returnGeometry: boolean; + /** + * When `true`, indicates that M values will be returned. + * + * [Read more...](https://developers.arcgis.com/javascript/latest/api-reference/esri-tasks-support-IdentifyParameters.html#returnM) + * + * @default false + */ + returnM: boolean; + /** + * If `true`, the values in the result will not be formatted i.e. numbers will returned as is and dates will be returned as epoch values. Requires ArcGIS Server service 10.5 or greater. + * + * [Read more...](https://developers.arcgis.com/javascript/latest/api-reference/esri-tasks-support-IdentifyParameters.html#returnUnformattedValues) + * + * @default false + */ + returnUnformattedValues: boolean; + /** + * When `true`, indicates that M values will be returned. + * + * [Read more...](https://developers.arcgis.com/javascript/latest/api-reference/esri-tasks-support-IdentifyParameters.html#returnZ) + * + * @default false + */ + returnZ: boolean; /** * The spatial reference of the input and output geometries as well as of the [mapExtent](https://developers.arcgis.com/javascript/latest/api-reference/esri-tasks-support-IdentifyParameters.html#mapExtent). If the spatial reference is not specified, the geometry and the extent are assumed to be in the spatial reference of the view, and the output geometries will also be in the spatial reference of the view. * @@ -27130,7 +29468,7 @@ declare namespace __esri { width: number; /** - * Converts an instance of [this class]() to its ArcGIS Portal JSON representation. See the [Using fromJSON()](https://developers.arcgis.com/javascript/latest/guide/using-fromjson/index.html) topic in the Guide for more information. + * Converts an instance of [this class]() to its ArcGIS portal JSON representation. See the [Using fromJSON()](https://developers.arcgis.com/javascript/latest/guide/using-fromjson/index.html) topic in the Guide for more information. * * [Read more...](https://developers.arcgis.com/javascript/latest/api-reference/esri-tasks-support-IdentifyParameters.html#toJSON) * @@ -27209,6 +29547,14 @@ declare namespace __esri { * [Read more...](https://developers.arcgis.com/javascript/latest/api-reference/esri-tasks-support-IdentifyParameters.html#maxAllowableOffset) */ maxAllowableOffset?: number; + /** + * If `true`, field names will be returned instead of field aliases. Requires ArcGIS Server service 10.5 or greater. + * + * [Read more...](https://developers.arcgis.com/javascript/latest/api-reference/esri-tasks-support-IdentifyParameters.html#returnFieldName) + * + * @default false + */ + returnFieldName?: boolean; /** * If `true`, the result set includes the geometry associated with each result. * @@ -27217,6 +29563,30 @@ declare namespace __esri { * @default false */ returnGeometry?: boolean; + /** + * When `true`, indicates that M values will be returned. + * + * [Read more...](https://developers.arcgis.com/javascript/latest/api-reference/esri-tasks-support-IdentifyParameters.html#returnM) + * + * @default false + */ + returnM?: boolean; + /** + * If `true`, the values in the result will not be formatted i.e. numbers will returned as is and dates will be returned as epoch values. Requires ArcGIS Server service 10.5 or greater. + * + * [Read more...](https://developers.arcgis.com/javascript/latest/api-reference/esri-tasks-support-IdentifyParameters.html#returnUnformattedValues) + * + * @default false + */ + returnUnformattedValues?: boolean; + /** + * When `true`, indicates that M values will be returned. + * + * [Read more...](https://developers.arcgis.com/javascript/latest/api-reference/esri-tasks-support-IdentifyParameters.html#returnZ) + * + * @default false + */ + returnZ?: boolean; /** * The spatial reference of the input and output geometries as well as of the [mapExtent](https://developers.arcgis.com/javascript/latest/api-reference/esri-tasks-support-IdentifyParameters.html#mapExtent). If the spatial reference is not specified, the geometry and the extent are assumed to be in the spatial reference of the view, and the output geometries will also be in the spatial reference of the view. * @@ -27364,7 +29734,7 @@ declare namespace __esri { returnGeometry: boolean; /** - * Converts an instance of [this class]() to its ArcGIS Portal JSON representation. See the [Using fromJSON()](https://developers.arcgis.com/javascript/latest/guide/using-fromjson/index.html) topic in the Guide for more information. + * Converts an instance of [this class]() to its ArcGIS portal JSON representation. See the [Using fromJSON()](https://developers.arcgis.com/javascript/latest/guide/using-fromjson/index.html) topic in the Guide for more information. * * [Read more...](https://developers.arcgis.com/javascript/latest/api-reference/esri-tasks-support-ImageServiceIdentifyParameters.html#toJSON) * @@ -27678,7 +30048,7 @@ declare namespace __esri { polylines: Polyline[]; /** - * Converts an instance of [this class]() to its ArcGIS Portal JSON representation. See the [Using fromJSON()](https://developers.arcgis.com/javascript/latest/guide/using-fromjson/index.html) topic in the Guide for more information. + * Converts an instance of [this class]() to its ArcGIS portal JSON representation. See the [Using fromJSON()](https://developers.arcgis.com/javascript/latest/guide/using-fromjson/index.html) topic in the Guide for more information. * * [Read more...](https://developers.arcgis.com/javascript/latest/api-reference/esri-tasks-support-LengthsParameters.html#toJSON) * @@ -27853,7 +30223,7 @@ declare namespace __esri { offsetUnit: string; /** - * Converts an instance of [this class]() to its ArcGIS Portal JSON representation. See the [Using fromJSON()](https://developers.arcgis.com/javascript/latest/guide/using-fromjson/index.html) topic in the Guide for more information. + * Converts an instance of [this class]() to its ArcGIS portal JSON representation. See the [Using fromJSON()](https://developers.arcgis.com/javascript/latest/guide/using-fromjson/index.html) topic in the Guide for more information. * * [Read more...](https://developers.arcgis.com/javascript/latest/api-reference/esri-tasks-support-OffsetParameters.html#toJSON) * @@ -28073,14 +30443,14 @@ declare namespace __esri { * Value | Description * | --- | --- * map-only | Map does not contain any layout elements. Only map image is printed. - * a3-landscape | 16.54 x 11.69 in - * a3-portrait | 11.69 x 16.54 in - * a4-landscape | 11.69 x 8.27 in - * a4-portrait | 8.27 × 11.69 in - * letter-ansi-a-landscape | 11.0 x 8.5 in - * letter-ansi-a-portrait | 8.5 x 11.0 in - * tabloid-ansi-b-landscape| 17.0 x 11.0 in - * tabloid-ansi-b-portrait | 11.0 x 17.0 in + * a3-landscape | A3 Landscape + * a3-portrait | A3 Portrait + * a4-landscape | A4 Landscape + * a4-portrait | A4 Portrait + * letter-ansi-a-landscape | Letter ANSI A Landscape + * letter-ansi-a-portrait | Letter ANSI A Portrait + * tabloid-ansi-b-landscape| Tabloid ANSI B Landscape + * tabloid-ansi-b-portrait | Tabloid ANSI B Portrait * * * [Read more...](https://developers.arcgis.com/javascript/latest/api-reference/esri-tasks-support-PrintTemplate.html#layout) @@ -28157,14 +30527,14 @@ declare namespace __esri { * Value | Description * | --- | --- * map-only | Map does not contain any layout elements. Only map image is printed. - * a3-landscape | 16.54 x 11.69 in - * a3-portrait | 11.69 x 16.54 in - * a4-landscape | 11.69 x 8.27 in - * a4-portrait | 8.27 × 11.69 in - * letter-ansi-a-landscape | 11.0 x 8.5 in - * letter-ansi-a-portrait | 8.5 x 11.0 in - * tabloid-ansi-b-landscape| 17.0 x 11.0 in - * tabloid-ansi-b-portrait | 11.0 x 17.0 in + * a3-landscape | A3 Landscape + * a3-portrait | A3 Portrait + * a4-landscape | A4 Landscape + * a4-portrait | A4 Portrait + * letter-ansi-a-landscape | Letter ANSI A Landscape + * letter-ansi-a-portrait | Letter ANSI A Portrait + * tabloid-ansi-b-landscape| Tabloid ANSI B Landscape + * tabloid-ansi-b-portrait | Tabloid ANSI B Portrait * * * [Read more...](https://developers.arcgis.com/javascript/latest/api-reference/esri-tasks-support-PrintTemplate.html#layout) @@ -28219,7 +30589,7 @@ declare namespace __esri { */ height?: number; /** - * Resolution in dots per inch. Default value is 96. + * Resolution in dots per inch. If modified when `layout = 'map-only'`, the `width` and `height` will also need to be modified proportional to the `dpi` change. Default value is 96. * * [Read more...](https://developers.arcgis.com/javascript/latest/api-reference/esri-tasks-support-PrintTemplate.html#exportOptions) */ @@ -28288,7 +30658,7 @@ declare namespace __esri { */ outSR: SpatialReference; /** - * The well-known id {wkid:number} or well-known text {wkt:string} of the datum transformation to be applied to the projected geometries. See [Datum transformations](http://resources.arcgis.com/en/help/arcgis-rest-api/index.html#//02r3000000r8000000) for a list of valid datum transformations that may be used here. If a transformation is specified, a value must also be specified in the [transformForward](https://developers.arcgis.com/javascript/latest/api-reference/esri-tasks-support-ProjectParameters.html#transformForward) property. + * The well-known id {wkid:number} or well-known text {wkt:string} of the datum transformation to be applied to the projected geometries. See [Datum transformations](https://developers.arcgis.com/rest/services-reference/datum-transformations.htm) for a list of valid datum transformations that may be used here. If a transformation is specified, a value must also be specified in the [transformForward](https://developers.arcgis.com/javascript/latest/api-reference/esri-tasks-support-ProjectParameters.html#transformForward) property. * * [Read more...](https://developers.arcgis.com/javascript/latest/api-reference/esri-tasks-support-ProjectParameters.html#transformation) */ @@ -28301,7 +30671,7 @@ declare namespace __esri { transformForward: boolean; /** - * Converts an instance of [this class]() to its ArcGIS Portal JSON representation. See the [Using fromJSON()](https://developers.arcgis.com/javascript/latest/guide/using-fromjson/index.html) topic in the Guide for more information. + * Converts an instance of [this class]() to its ArcGIS portal JSON representation. See the [Using fromJSON()](https://developers.arcgis.com/javascript/latest/guide/using-fromjson/index.html) topic in the Guide for more information. * * [Read more...](https://developers.arcgis.com/javascript/latest/api-reference/esri-tasks-support-ProjectParameters.html#toJSON) * @@ -28338,7 +30708,7 @@ declare namespace __esri { */ outSR?: SpatialReferenceProperties; /** - * The well-known id {wkid:number} or well-known text {wkt:string} of the datum transformation to be applied to the projected geometries. See [Datum transformations](http://resources.arcgis.com/en/help/arcgis-rest-api/index.html#//02r3000000r8000000) for a list of valid datum transformations that may be used here. If a transformation is specified, a value must also be specified in the [transformForward](https://developers.arcgis.com/javascript/latest/api-reference/esri-tasks-support-ProjectParameters.html#transformForward) property. + * The well-known id {wkid:number} or well-known text {wkt:string} of the datum transformation to be applied to the projected geometries. See [Datum transformations](https://developers.arcgis.com/rest/services-reference/datum-transformations.htm) for a list of valid datum transformations that may be used here. If a transformation is specified, a value must also be specified in the [transformForward](https://developers.arcgis.com/javascript/latest/api-reference/esri-tasks-support-ProjectParameters.html#transformForward) property. * * [Read more...](https://developers.arcgis.com/javascript/latest/api-reference/esri-tasks-support-ProjectParameters.html#transformation) */ @@ -28354,7 +30724,7 @@ declare namespace __esri { export interface ProjectParametersTransformation extends Object { /** - * The well-known ID of the datum transformation to apply to the projection. [List of valid IDs for Datum transformations](http://resources.arcgis.com/en/help/arcgis-rest-api/index.html#//02r3000000r8000000). + * The well-known ID of the datum transformation to apply to the projection. [List of valid IDs for Datum transformations](https://developers.arcgis.com/rest/services-reference/datum-transformations.htm). * * [Read more...](https://developers.arcgis.com/javascript/latest/api-reference/esri-tasks-support-ProjectParameters.html#transformation) */ @@ -28369,11 +30739,23 @@ declare namespace __esri { interface Query extends Accessor, JSONSupport { /** - * Buffer distance for input geometries. The distance unit is specified by [units property](https://developers.arcgis.com/javascript/latest/api-reference/esri-tasks-support-Query.html#units). Query results will include features within the distance specified of the [geometry](https://developers.arcgis.com/javascript/latest/api-reference/esri-tasks-support-Query.html#geometry) of the query. This parameter only applies if [supportsQueryWithDistance](http://resources.arcgis.com/en/help/arcgis-rest-api/index.html#/Query_Feature_Service_Layer/02r3000000r1000000/) is `true`. + * Datum transformation used for projecting geometries in the query results when [outSpatialReference](https://developers.arcgis.com/javascript/latest/api-reference/esri-tasks-support-Query.html#outSpatialReference) is different than the layer's spatial reference. Requires ArcGIS Server service 10.5 or greater. + * + * [Read more...](https://developers.arcgis.com/javascript/latest/api-reference/esri-tasks-support-Query.html#datumTransformation) + */ + datumTransformation: number; + /** + * Buffer distance for input geometries. The distance unit is specified by [units property](https://developers.arcgis.com/javascript/latest/api-reference/esri-tasks-support-Query.html#units). Query results will include features within the distance specified of the [geometry](https://developers.arcgis.com/javascript/latest/api-reference/esri-tasks-support-Query.html#geometry) of the query. This parameter only applies if [supportsQueryWithDistance](https://developers.arcgis.com/rest/services-reference/query-feature-service-layer-.htm) is `true`. * * [Read more...](https://developers.arcgis.com/javascript/latest/api-reference/esri-tasks-support-Query.html#distance) */ distance: number; + /** + * Specify the geodatabase version to display. + * + * [Read more...](https://developers.arcgis.com/javascript/latest/api-reference/esri-tasks-support-Query.html#gdbVersion) + */ + gdbVersion: string; /** * The geometry to apply to the spatial filter. The spatial relationship as specified by `spatialRelationship` is applied to this geometry while performing the query. The valid geometry types are [Extent](https://developers.arcgis.com/javascript/latest/api-reference/esri-geometry-Extent.html), [Point](https://developers.arcgis.com/javascript/latest/api-reference/esri-geometry-Point.html), [Multipoint](https://developers.arcgis.com/javascript/latest/api-reference/esri-geometry-Multipoint.html), [Polyline](https://developers.arcgis.com/javascript/latest/api-reference/esri-geometry-Polyline.html), or [Polygon](https://developers.arcgis.com/javascript/latest/api-reference/esri-geometry-Polygon.html). * @@ -28392,6 +30774,12 @@ declare namespace __esri { * [Read more...](https://developers.arcgis.com/javascript/latest/api-reference/esri-tasks-support-Query.html#groupByFieldsForStatistics) */ groupByFieldsForStatistics: string[]; + /** + * The historic moment to query. This parameter applies only if the `supportsQueryWithHistoricMoment` property of the layers being queried is set to `true`. This setting is provided in the layer resource. + * + * [Read more...](https://developers.arcgis.com/javascript/latest/api-reference/esri-tasks-support-Query.html#historicMoment) + */ + historicMoment: Date; /** * The maximum allowable offset used for generalizing geometries returned by the query operation. The offset is in the units of `outSpatialReference`. If `outSpatialReference` is not defined, the spatial reference of the map is used. * @@ -28405,7 +30793,7 @@ declare namespace __esri { */ multipatchOption: string; /** - * Number of features to retrieve. Should be used in conjunction with [start property](https://developers.arcgis.com/javascript/latest/api-reference/esri-tasks-support-Query.html#start). Use this to implement paging and retrieve "pages" of results when querying. If not provided, but an instance of Query has a start property. + * Number of features to retrieve. Should be used in conjunction with [start property](https://developers.arcgis.com/javascript/latest/api-reference/esri-tasks-support-Query.html#start). Use this to implement paging and retrieve "pages" of results when querying. If not provided, but an instance of Query has a `start` property, then the default value of `num` is 10. If neither `num` nor `start` properties are provided, then the default value of `num` is equal to the **Max Record Count** of the service, which can be found at the REST endpoint of the FeatureLayer. * * [Read more...](https://developers.arcgis.com/javascript/latest/api-reference/esri-tasks-support-Query.html#num) */ @@ -28440,6 +30828,12 @@ declare namespace __esri { * [Read more...](https://developers.arcgis.com/javascript/latest/api-reference/esri-tasks-support-Query.html#outStatistics) */ outStatistics: StatisticDefinition[]; + /** + * Filters features from the layer based on pre-authored parameterized filters. When value is not specified for any parameter in a request, the default value, that is assigned during authoring time, gets used. Requires ArcGIS Server service 10.5 or greater. + * + * [Read more...](https://developers.arcgis.com/javascript/latest/api-reference/esri-tasks-support-Query.html#parameterValues) + */ + parameterValues: QueryParameterValues[]; /** * Specify the pixel level to be identified on the X and Y axis. Defaults to the base resolution of the dataset if not specified. Applicable only to Image Service layers. * @@ -28452,6 +30846,12 @@ declare namespace __esri { * [Read more...](https://developers.arcgis.com/javascript/latest/api-reference/esri-tasks-support-Query.html#quantizationParameters) */ quantizationParameters: QueryQuantizationParameters; + /** + * Filters features from the layer that are within the specified range values. Requires ArcGIS Server service 10.5 or greater. + * + * [Read more...](https://developers.arcgis.com/javascript/latest/api-reference/esri-tasks-support-Query.html#rangeValues) + */ + rangeValues: QueryRangeValues[]; /** * The string describes the spatial relationship to be tested when the spatial relationship is `relation`. The [Relational functions for ST_Geometry](https://desktop.arcgis.com/en/arcmap/latest/manage-data/using-sql-with-gdbs/relational-functions-for-st-geometry.htm) topic has additional details. * @@ -28527,6 +30927,14 @@ declare namespace __esri { * @default intersects */ spatialRelationship: string; + /** + * This parameter can be either standard SQL92 `standard` or it can use the native SQL of the underlying datastore `native`. See the [ArcGIS REST API documentation](https://developers.arcgis.com/rest/services-reference/query-feature-service-.htm) for more information. **Known Values:** none | standard | native + * + * [Read more...](https://developers.arcgis.com/javascript/latest/api-reference/esri-tasks-support-Query.html#sqlFormat) + * + * @default none + */ + sqlFormat: string; /** * Zero-based index indicating where to begin retrieving features. Should be used in conjunction with [num](https://developers.arcgis.com/javascript/latest/api-reference/esri-tasks-support-Query.html#num). Use this to implement paging and retrieve "pages" of results when querying. Features are sorted ascending by object ID by default. * @@ -28542,7 +30950,7 @@ declare namespace __esri { */ text: string; /** - * The unit for calculating the buffer distance. if unit is not specified, the unit is derived from the geometry spatial reference. If the geometry spatial reference is not specified, the unit is derived from the feature service spatial reference. This parameter only applies if [supportsQueryWithDistance](http://resources.arcgis.com/en/help/arcgis-rest-api/index.html#/Query_Feature_Service_Layer/02r3000000r1000000/) is `true`. **Known Values:** feet | miles | nautical-miles | us-nautical-miles | meters | kilometers + * The unit for calculating the buffer distance. if unit is not specified, the unit is derived from the geometry spatial reference. If the geometry spatial reference is not specified, the unit is derived from the feature service spatial reference. This parameter only applies if [supportsQueryWithDistance](https://developers.arcgis.com/rest/services-reference/query-feature-service-layer-.htm) is `true`. **Known Values:** feet | miles | nautical-miles | us-nautical-miles | meters | kilometers * * [Read more...](https://developers.arcgis.com/javascript/latest/api-reference/esri-tasks-support-Query.html#units) */ @@ -28580,11 +30988,23 @@ declare namespace __esri { interface QueryProperties { /** - * Buffer distance for input geometries. The distance unit is specified by [units property](https://developers.arcgis.com/javascript/latest/api-reference/esri-tasks-support-Query.html#units). Query results will include features within the distance specified of the [geometry](https://developers.arcgis.com/javascript/latest/api-reference/esri-tasks-support-Query.html#geometry) of the query. This parameter only applies if [supportsQueryWithDistance](http://resources.arcgis.com/en/help/arcgis-rest-api/index.html#/Query_Feature_Service_Layer/02r3000000r1000000/) is `true`. + * Datum transformation used for projecting geometries in the query results when [outSpatialReference](https://developers.arcgis.com/javascript/latest/api-reference/esri-tasks-support-Query.html#outSpatialReference) is different than the layer's spatial reference. Requires ArcGIS Server service 10.5 or greater. + * + * [Read more...](https://developers.arcgis.com/javascript/latest/api-reference/esri-tasks-support-Query.html#datumTransformation) + */ + datumTransformation?: number; + /** + * Buffer distance for input geometries. The distance unit is specified by [units property](https://developers.arcgis.com/javascript/latest/api-reference/esri-tasks-support-Query.html#units). Query results will include features within the distance specified of the [geometry](https://developers.arcgis.com/javascript/latest/api-reference/esri-tasks-support-Query.html#geometry) of the query. This parameter only applies if [supportsQueryWithDistance](https://developers.arcgis.com/rest/services-reference/query-feature-service-layer-.htm) is `true`. * * [Read more...](https://developers.arcgis.com/javascript/latest/api-reference/esri-tasks-support-Query.html#distance) */ distance?: number; + /** + * Specify the geodatabase version to display. + * + * [Read more...](https://developers.arcgis.com/javascript/latest/api-reference/esri-tasks-support-Query.html#gdbVersion) + */ + gdbVersion?: string; /** * The geometry to apply to the spatial filter. The spatial relationship as specified by `spatialRelationship` is applied to this geometry while performing the query. The valid geometry types are [Extent](https://developers.arcgis.com/javascript/latest/api-reference/esri-geometry-Extent.html), [Point](https://developers.arcgis.com/javascript/latest/api-reference/esri-geometry-Point.html), [Multipoint](https://developers.arcgis.com/javascript/latest/api-reference/esri-geometry-Multipoint.html), [Polyline](https://developers.arcgis.com/javascript/latest/api-reference/esri-geometry-Polyline.html), or [Polygon](https://developers.arcgis.com/javascript/latest/api-reference/esri-geometry-Polygon.html). * @@ -28603,6 +31023,12 @@ declare namespace __esri { * [Read more...](https://developers.arcgis.com/javascript/latest/api-reference/esri-tasks-support-Query.html#groupByFieldsForStatistics) */ groupByFieldsForStatistics?: string[]; + /** + * The historic moment to query. This parameter applies only if the `supportsQueryWithHistoricMoment` property of the layers being queried is set to `true`. This setting is provided in the layer resource. + * + * [Read more...](https://developers.arcgis.com/javascript/latest/api-reference/esri-tasks-support-Query.html#historicMoment) + */ + historicMoment?: DateProperties; /** * The maximum allowable offset used for generalizing geometries returned by the query operation. The offset is in the units of `outSpatialReference`. If `outSpatialReference` is not defined, the spatial reference of the map is used. * @@ -28616,7 +31042,7 @@ declare namespace __esri { */ multipatchOption?: string; /** - * Number of features to retrieve. Should be used in conjunction with [start property](https://developers.arcgis.com/javascript/latest/api-reference/esri-tasks-support-Query.html#start). Use this to implement paging and retrieve "pages" of results when querying. If not provided, but an instance of Query has a start property. + * Number of features to retrieve. Should be used in conjunction with [start property](https://developers.arcgis.com/javascript/latest/api-reference/esri-tasks-support-Query.html#start). Use this to implement paging and retrieve "pages" of results when querying. If not provided, but an instance of Query has a `start` property, then the default value of `num` is 10. If neither `num` nor `start` properties are provided, then the default value of `num` is equal to the **Max Record Count** of the service, which can be found at the REST endpoint of the FeatureLayer. * * [Read more...](https://developers.arcgis.com/javascript/latest/api-reference/esri-tasks-support-Query.html#num) */ @@ -28651,6 +31077,12 @@ declare namespace __esri { * [Read more...](https://developers.arcgis.com/javascript/latest/api-reference/esri-tasks-support-Query.html#outStatistics) */ outStatistics?: StatisticDefinitionProperties[]; + /** + * Filters features from the layer based on pre-authored parameterized filters. When value is not specified for any parameter in a request, the default value, that is assigned during authoring time, gets used. Requires ArcGIS Server service 10.5 or greater. + * + * [Read more...](https://developers.arcgis.com/javascript/latest/api-reference/esri-tasks-support-Query.html#parameterValues) + */ + parameterValues?: QueryParameterValues[]; /** * Specify the pixel level to be identified on the X and Y axis. Defaults to the base resolution of the dataset if not specified. Applicable only to Image Service layers. * @@ -28663,6 +31095,12 @@ declare namespace __esri { * [Read more...](https://developers.arcgis.com/javascript/latest/api-reference/esri-tasks-support-Query.html#quantizationParameters) */ quantizationParameters?: QueryQuantizationParameters; + /** + * Filters features from the layer that are within the specified range values. Requires ArcGIS Server service 10.5 or greater. + * + * [Read more...](https://developers.arcgis.com/javascript/latest/api-reference/esri-tasks-support-Query.html#rangeValues) + */ + rangeValues?: QueryRangeValues[]; /** * The string describes the spatial relationship to be tested when the spatial relationship is `relation`. The [Relational functions for ST_Geometry](https://desktop.arcgis.com/en/arcmap/latest/manage-data/using-sql-with-gdbs/relational-functions-for-st-geometry.htm) topic has additional details. * @@ -28738,6 +31176,14 @@ declare namespace __esri { * @default intersects */ spatialRelationship?: string; + /** + * This parameter can be either standard SQL92 `standard` or it can use the native SQL of the underlying datastore `native`. See the [ArcGIS REST API documentation](https://developers.arcgis.com/rest/services-reference/query-feature-service-.htm) for more information. **Known Values:** none | standard | native + * + * [Read more...](https://developers.arcgis.com/javascript/latest/api-reference/esri-tasks-support-Query.html#sqlFormat) + * + * @default none + */ + sqlFormat?: string; /** * Zero-based index indicating where to begin retrieving features. Should be used in conjunction with [num](https://developers.arcgis.com/javascript/latest/api-reference/esri-tasks-support-Query.html#num). Use this to implement paging and retrieve "pages" of results when querying. Features are sorted ascending by object ID by default. * @@ -28753,7 +31199,7 @@ declare namespace __esri { */ text?: string; /** - * The unit for calculating the buffer distance. if unit is not specified, the unit is derived from the geometry spatial reference. If the geometry spatial reference is not specified, the unit is derived from the feature service spatial reference. This parameter only applies if [supportsQueryWithDistance](http://resources.arcgis.com/en/help/arcgis-rest-api/index.html#/Query_Feature_Service_Layer/02r3000000r1000000/) is `true`. **Known Values:** feet | miles | nautical-miles | us-nautical-miles | meters | kilometers + * The unit for calculating the buffer distance. if unit is not specified, the unit is derived from the geometry spatial reference. If the geometry spatial reference is not specified, the unit is derived from the feature service spatial reference. This parameter only applies if [supportsQueryWithDistance](https://developers.arcgis.com/rest/services-reference/query-feature-service-layer-.htm) is `true`. **Known Values:** feet | miles | nautical-miles | us-nautical-miles | meters | kilometers * * [Read more...](https://developers.arcgis.com/javascript/latest/api-reference/esri-tasks-support-Query.html#units) */ @@ -28767,6 +31213,22 @@ declare namespace __esri { } + export interface QueryParameterValues extends Object { + /** + * The parameter name. + * + * [Read more...](https://developers.arcgis.com/javascript/latest/api-reference/esri-tasks-support-Query.html#parameterValues) + */ + name: string; + /** + * Single value or array of values. + * + * [Read more...](https://developers.arcgis.com/javascript/latest/api-reference/esri-tasks-support-Query.html#parameterValues) + */ + value: string | string[] | number | number[] | Date | Date[]; + } + + export interface QueryQuantizationParameters extends Object { /** * An extent defining the quantization grid bounds. Its [SpatialReference](https://developers.arcgis.com/javascript/latest/api-reference/esri-geometry-SpatialReference.html) matches the input geometry spatial reference if one is specified for the query. Otherwise, the extent will be in the layer's spatial reference. @@ -28796,6 +31258,22 @@ declare namespace __esri { tolerance?: number; } + + export interface QueryRangeValues extends Object { + /** + * The range id. + * + * [Read more...](https://developers.arcgis.com/javascript/latest/api-reference/esri-tasks-support-Query.html#rangeValues) + */ + name: string; + /** + * Single value or value range. + * + * [Read more...](https://developers.arcgis.com/javascript/latest/api-reference/esri-tasks-support-Query.html#rangeValues) + */ + values: number | number[]; + } + interface RasterData extends Accessor, JSONSupport { /** * Specifies the format of the raster data, such as "jpg", "tif", etc. @@ -28891,7 +31369,7 @@ declare namespace __esri { relationParameter: string; /** - * Converts an instance of [this class]() to its ArcGIS Portal JSON representation. See the [Using fromJSON()](https://developers.arcgis.com/javascript/latest/guide/using-fromjson/index.html) topic in the Guide for more information. + * Converts an instance of [this class]() to its ArcGIS portal JSON representation. See the [Using fromJSON()](https://developers.arcgis.com/javascript/latest/guide/using-fromjson/index.html) topic in the Guide for more information. * * [Read more...](https://developers.arcgis.com/javascript/latest/api-reference/esri-tasks-support-RelationParameters.html#toJSON) * @@ -28951,13 +31429,19 @@ declare namespace __esri { relationParameter?: string; } - interface RelationshipQuery extends Accessor { + interface RelationshipQuery extends Accessor, JSONSupport { /** * The definition expression to be applied to the related table or layer. Only records that fit the definition expression and are in the list of `objectIds` will be returned. * * [Read more...](https://developers.arcgis.com/javascript/latest/api-reference/esri-tasks-support-RelationshipQuery.html#definitionExpression) */ definitionExpression: string; + /** + * Specify the geodatabase version to display. + * + * [Read more...](https://developers.arcgis.com/javascript/latest/api-reference/esri-tasks-support-RelationshipQuery.html#gdbVersion) + */ + gdbVersion: string; /** * Specify the number of decimal places for the geometries returned by the query operation. * @@ -28965,19 +31449,25 @@ declare namespace __esri { */ geometryPrecision: number; /** - * The maximum allowable offset used for generalizing geometries returned by the query operation. The offset is in the units of the `outSpatialReference`. If `outSpatialReference` is not defined, the spatial reference of the map is used. + * The historic moment to query. This parameter applies only if the `supportsHistoricMoment` property of the layers being queried is set to `true`. + * + * [Read more...](https://developers.arcgis.com/javascript/latest/api-reference/esri-tasks-support-RelationshipQuery.html#historicMoment) + */ + historicMoment: Date; + /** + * The maximum allowable offset used for generalizing geometries returned by the query operation. The offset is in the units of `outSpatialReference`. If `outSpatialReference` is not defined, the spatial reference of the map is used. * * [Read more...](https://developers.arcgis.com/javascript/latest/api-reference/esri-tasks-support-RelationshipQuery.html#maxAllowableOffset) */ maxAllowableOffset: number; /** - * A comma delimited list of `ObjectIds` for the features in the layer/table that you want to query. + * A comma delimited list of ObjectIds for the features in the layer/table being queried. * * [Read more...](https://developers.arcgis.com/javascript/latest/api-reference/esri-tasks-support-RelationshipQuery.html#objectIds) */ objectIds: number[]; /** - * Attribute fields to include in the [FeatureSet](https://developers.arcgis.com/javascript/latest/api-reference/esri-tasks-support-FeatureSet.html). Fields must exist in the map layer. You must list the actual field names rather than the alias names. Returned fields are also the actual field names. However, you are able to use the alias names when you display the results. You can set field alias names in the map document. When you specify the output fields, you should limit the fields to only those you expect to use in the query or the results. The fewer fields you include, the faster the response will be. Each query must have access to the Shape and ObjectId fields for a layer, but your list of fields does not need to include these two fields. + * Attribute fields to include in the FeatureSet. Fields must exist in the map layer. You must list actual field names rather than the alias names. You are, however, able to use the alias names when you display the results. You can set field alias names in the map document. When specifying the output fields, you should limit the fields to only those you expect to use in the query or the results. The fewer fields you include, the faster the response will be. Each query must have access to the Shape and ObjectId fields for a layer. However, your list of fields does not need to include these two fields. * * [Read more...](https://developers.arcgis.com/javascript/latest/api-reference/esri-tasks-support-RelationshipQuery.html#outFields) */ @@ -28998,23 +31488,27 @@ declare namespace __esri { * If `true`, each feature in the [FeatureSet](https://developers.arcgis.com/javascript/latest/api-reference/esri-tasks-support-FeatureSet.html) includes the geometry. Set to `false` (default) if you do not plan to include highlighted features on a map since the geometry makes up a significant portion of the response. * * [Read more...](https://developers.arcgis.com/javascript/latest/api-reference/esri-tasks-support-RelationshipQuery.html#returnGeometry) + * + * @default false */ returnGeometry: boolean; /** - * Converts an instance of [this class]() to its ArcGIS Portal JSON representation. See the [Using fromJSON()](https://developers.arcgis.com/javascript/latest/guide/using-fromjson/index.html) topic in the Guide for more information. + * Creates a deep clone of RelationshipQuery object. * - * [Read more...](https://developers.arcgis.com/javascript/latest/api-reference/esri-tasks-support-RelationshipQuery.html#toJSON) + * [Read more...](https://developers.arcgis.com/javascript/latest/api-reference/esri-tasks-support-RelationshipQuery.html#clone) * * */ - toJSON(): any; + clone(): RelationshipQuery; } interface RelationshipQueryConstructor { new(properties?: RelationshipQueryProperties): RelationshipQuery; + + fromJSON(json: any): RelationshipQuery; } export const RelationshipQuery: RelationshipQueryConstructor; @@ -29026,6 +31520,12 @@ declare namespace __esri { * [Read more...](https://developers.arcgis.com/javascript/latest/api-reference/esri-tasks-support-RelationshipQuery.html#definitionExpression) */ definitionExpression?: string; + /** + * Specify the geodatabase version to display. + * + * [Read more...](https://developers.arcgis.com/javascript/latest/api-reference/esri-tasks-support-RelationshipQuery.html#gdbVersion) + */ + gdbVersion?: string; /** * Specify the number of decimal places for the geometries returned by the query operation. * @@ -29033,19 +31533,25 @@ declare namespace __esri { */ geometryPrecision?: number; /** - * The maximum allowable offset used for generalizing geometries returned by the query operation. The offset is in the units of the `outSpatialReference`. If `outSpatialReference` is not defined, the spatial reference of the map is used. + * The historic moment to query. This parameter applies only if the `supportsHistoricMoment` property of the layers being queried is set to `true`. + * + * [Read more...](https://developers.arcgis.com/javascript/latest/api-reference/esri-tasks-support-RelationshipQuery.html#historicMoment) + */ + historicMoment?: DateProperties; + /** + * The maximum allowable offset used for generalizing geometries returned by the query operation. The offset is in the units of `outSpatialReference`. If `outSpatialReference` is not defined, the spatial reference of the map is used. * * [Read more...](https://developers.arcgis.com/javascript/latest/api-reference/esri-tasks-support-RelationshipQuery.html#maxAllowableOffset) */ maxAllowableOffset?: number; /** - * A comma delimited list of `ObjectIds` for the features in the layer/table that you want to query. + * A comma delimited list of ObjectIds for the features in the layer/table being queried. * * [Read more...](https://developers.arcgis.com/javascript/latest/api-reference/esri-tasks-support-RelationshipQuery.html#objectIds) */ objectIds?: number[]; /** - * Attribute fields to include in the [FeatureSet](https://developers.arcgis.com/javascript/latest/api-reference/esri-tasks-support-FeatureSet.html). Fields must exist in the map layer. You must list the actual field names rather than the alias names. Returned fields are also the actual field names. However, you are able to use the alias names when you display the results. You can set field alias names in the map document. When you specify the output fields, you should limit the fields to only those you expect to use in the query or the results. The fewer fields you include, the faster the response will be. Each query must have access to the Shape and ObjectId fields for a layer, but your list of fields does not need to include these two fields. + * Attribute fields to include in the FeatureSet. Fields must exist in the map layer. You must list actual field names rather than the alias names. You are, however, able to use the alias names when you display the results. You can set field alias names in the map document. When specifying the output fields, you should limit the fields to only those you expect to use in the query or the results. The fewer fields you include, the faster the response will be. Each query must have access to the Shape and ObjectId fields for a layer. However, your list of fields does not need to include these two fields. * * [Read more...](https://developers.arcgis.com/javascript/latest/api-reference/esri-tasks-support-RelationshipQuery.html#outFields) */ @@ -29066,6 +31572,8 @@ declare namespace __esri { * If `true`, each feature in the [FeatureSet](https://developers.arcgis.com/javascript/latest/api-reference/esri-tasks-support-FeatureSet.html) includes the geometry. Set to `false` (default) if you do not plan to include highlighted features on a map since the geometry makes up a significant portion of the response. * * [Read more...](https://developers.arcgis.com/javascript/latest/api-reference/esri-tasks-support-RelationshipQuery.html#returnGeometry) + * + * @default false */ returnGeometry?: boolean; } @@ -29305,7 +31813,7 @@ declare namespace __esri { useTimeWindows: boolean; /** - * Converts an instance of [this class]() to its ArcGIS Portal JSON representation. See the [Using fromJSON()](https://developers.arcgis.com/javascript/latest/guide/using-fromjson/index.html) topic in the Guide for more information. + * Converts an instance of [this class]() to its ArcGIS portal JSON representation. See the [Using fromJSON()](https://developers.arcgis.com/javascript/latest/guide/using-fromjson/index.html) topic in the Guide for more information. * * [Read more...](https://developers.arcgis.com/javascript/latest/api-reference/esri-tasks-support-RouteParameters.html#toJSON) * @@ -29720,7 +32228,7 @@ declare namespace __esri { * none | No lines are returned * straight | Only returns straight lines * true-shape | Return the true shape of the lines - * true-shape-with-measure | Return the true shape of the lines with their measurments + * true-shape-with-measure | Return the true shape of the lines with their measurements * * * [Read more...](https://developers.arcgis.com/javascript/latest/api-reference/esri-tasks-support-ServiceAreaParameters.html#outputLines) @@ -29886,7 +32394,7 @@ declare namespace __esri { useHierarchy: boolean; /** - * Converts an instance of [this class]() to its ArcGIS Portal JSON representation. See the [Using fromJSON()](https://developers.arcgis.com/javascript/latest/guide/using-fromjson/index.html) topic in the Guide for more information. + * Converts an instance of [this class]() to its ArcGIS portal JSON representation. See the [Using fromJSON()](https://developers.arcgis.com/javascript/latest/guide/using-fromjson/index.html) topic in the Guide for more information. * * [Read more...](https://developers.arcgis.com/javascript/latest/api-reference/esri-tasks-support-ServiceAreaParameters.html#toJSON) * @@ -29980,7 +32488,7 @@ declare namespace __esri { * none | No lines are returned * straight | Only returns straight lines * true-shape | Return the true shape of the lines - * true-shape-with-measure | Return the true shape of the lines with their measurments + * true-shape-with-measure | Return the true shape of the lines with their measurements * * * [Read more...](https://developers.arcgis.com/javascript/latest/api-reference/esri-tasks-support-ServiceAreaParameters.html#outputLines) @@ -30335,7 +32843,7 @@ declare namespace __esri { trimExtendTo: Polyline; /** - * Converts an instance of [this class]() to its ArcGIS Portal JSON representation. See the [Using fromJSON()](https://developers.arcgis.com/javascript/latest/guide/using-fromjson/index.html) topic in the Guide for more information. + * Converts an instance of [this class]() to its ArcGIS portal JSON representation. See the [Using fromJSON()](https://developers.arcgis.com/javascript/latest/guide/using-fromjson/index.html) topic in the Guide for more information. * * [Read more...](https://developers.arcgis.com/javascript/latest/api-reference/esri-tasks-support-TrimExtendParameters.html#toJSON) * @@ -31525,7 +34033,7 @@ declare namespace __esri { * * [Read more...](https://developers.arcgis.com/javascript/latest/api-reference/esri-tasks-workflow-JobTask.html#createJobs) * - * @param params The parameters to be used for job creation, parameters defined in the job type can be overritten. The jobTypeId and user are required parameters when creating a job. + * @param params The parameters to be used for job creation, parameters defined in the job type can be overwritten. The jobTypeId and user are required parameters when creating a job. * @param requestOptions Additional [options](https://developers.arcgis.com/javascript/latest/api-reference/esri-request.html#esriRequest) to be used for the data request (will override requestOptions defined during construction). * */ @@ -31894,7 +34402,7 @@ declare namespace __esri { */ message: string; /** - * The name of the activity that occured. + * The name of the activity that occurred. * * [Read more...](https://developers.arcgis.com/javascript/latest/api-reference/esri-tasks-workflow-JobTask.html#ActivityType) */ @@ -32220,7 +34728,7 @@ declare namespace __esri { */ parentJobId: number; /** - * The name of the geodatabase version that will be the parent version of the new job's version. By default it'll be the parent version of the data workspace. + * The name of the geodatabase version that will be the parent version of the new job's version. By default it will be the parent version of the data workspace. * * [Read more...](https://developers.arcgis.com/javascript/latest/api-reference/esri-tasks-workflow-JobTask.html#JobCreationParameters) */ @@ -32392,7 +34900,7 @@ declare namespace __esri { */ parentJobId: number; /** - * The name of the geodatabase version that is the parent version of the job's version. By default it'll be the parent version of the data workspace. + * The name of the geodatabase version that is the parent version of the job's version. By default it will be the parent version of the data workspace. * * [Read more...](https://developers.arcgis.com/javascript/latest/api-reference/esri-tasks-workflow-JobTask.html#JobInfo) */ @@ -33110,7 +35618,7 @@ declare namespace __esri { */ parentJobId: number; /** - * The name of the geodatabase version that will be the parent version of the new job's version. By default it'll be the parent version of the data workspace. + * The name of the geodatabase version that will be the parent version of the new job's version. By default it will be the parent version of the data workspace. * * [Read more...](https://developers.arcgis.com/javascript/latest/api-reference/esri-tasks-workflow-JobTask.html#JobUpdateParameters) */ @@ -33524,7 +36032,7 @@ declare namespace __esri { */ export interface ChangeRuleMatch extends Object { /** - * The time the change occured to the data. + * The time the change occurred to the data. * * [Read more...](https://developers.arcgis.com/javascript/latest/api-reference/esri-tasks-workflow-NotificationTask.html#ChangeRuleMatch) */ @@ -34520,7 +37028,7 @@ declare namespace __esri { } /** - * Step retpresents the properties of a step that is used in a job's workflow. + * Step represents the properties of a step that is used in a job's workflow. * * [Read more...](https://developers.arcgis.com/javascript/latest/api-reference/esri-tasks-workflow-WorkflowTask.html#Step) */ @@ -34838,7 +37346,7 @@ declare namespace __esri { } /** - * WorkflowPathDisplayDetails represents properties of a workflow's path properties like location, destination steps, postion on the workflow canvas. + * WorkflowPathDisplayDetails represents properties of a workflow's path properties like location, destination steps, position on the workflow canvas. * * [Read more...](https://developers.arcgis.com/javascript/latest/api-reference/esri-tasks-workflow-WorkflowTask.html#WorkflowPathDisplayDetails) */ @@ -34890,7 +37398,7 @@ declare namespace __esri { * * Name | Type | Description * ---------|--------|------------- - * isDefault | Boolean | Indicates whehter this is the default path(only path) from the source step. + * isDefault | Boolean | Indicates whether this is the default path(only path) from the source step. * numReturnValues | Number[] | The number of possible return values for the path. * returnValueX | Number[] | The return values associated with the path. * @@ -35297,11 +37805,11 @@ declare namespace __esri { interface Draw extends Accessor { /** - * A reference to the active draw action. An instance of the draw action is created when [create()](https://developers.arcgis.com/javascript/latest/api-reference/esri-views-2d-draw-Draw.html#create) method is called. + * A reference to the active [draw action](https://developers.arcgis.com/javascript/latest/api-reference/esri-views-2d-draw-DrawAction.html). An instance of the draw action is created when [create()](https://developers.arcgis.com/javascript/latest/api-reference/esri-views-2d-draw-Draw.html#create) method is called. * * [Read more...](https://developers.arcgis.com/javascript/latest/api-reference/esri-views-2d-draw-Draw.html#activeAction) */ - activeAction: PointDrawAction | MultipointDrawAction | PolygonDrawAction | PolylineDrawAction; + activeAction: DrawAction; /** * A reference to the [MapView](https://developers.arcgis.com/javascript/latest/api-reference/esri-views-MapView.html). Set this to link the draw to a specific view. * @@ -35309,15 +37817,41 @@ declare namespace __esri { */ view: MapView; + /** + * Complete the current active drawing. + * + * [Read more...](https://developers.arcgis.com/javascript/latest/api-reference/esri-views-2d-draw-Draw.html#complete) + * + * + */ + complete(): void; /** * Creates an instance of the requested draw action. * * [Read more...](https://developers.arcgis.com/javascript/latest/api-reference/esri-views-2d-draw-Draw.html#create) * - * @param drawAction Name of the draw action to create. See the table below for a list of known values and type of draw action it creates. **Known Values:** point | multipoint | polyline | polygon + * @param drawAction + * Name of the [draw action](https://developers.arcgis.com/javascript/latest/api-reference/esri-views-2d-draw-DrawAction.html) to create. See the table below for a list of known values and type of draw action it creates. **Known Values:** point | multipoint | polyline | polygon | rectangle | circle | ellipse + * + * Geometry type | Draw action instance + * ------------- | -------------------- + * point | [PointDrawAction](https://developers.arcgis.com/javascript/latest/api-reference/esri-views-2d-draw-PointDrawAction.html) + * multipoint | [MultipointDrawAction](https://developers.arcgis.com/javascript/latest/api-reference/esri-views-2d-draw-MultipointDrawAction.html) + * polyline | [PolylineDrawAction](https://developers.arcgis.com/javascript/latest/api-reference/esri-views-2d-draw-PolylineDrawAction.html) + * polygon | [PolygonDrawAction](https://developers.arcgis.com/javascript/latest/api-reference/esri-views-2d-draw-PolygonDrawAction.html) + * rectangle, circle, ellipse | [SegmentDrawAction](https://developers.arcgis.com/javascript/latest/api-reference/esri-views-2d-draw-SegmentDrawAction.html) + * @param drawOptions Object of the drawing options for the geometry to be created. + * @param drawOptions.mode + * The drawing mode. The drawing mode only applies when creating `polygon` and `polyline` geometries. **Known Values:** + * + * Value | Description | + * ----- | ----------- | + * hybrid | Vertices are added while the pointer is clicked or dragged. + * freehand | Vertices are added while the pointer is dragged. + * click | Vertices are added when the pointer is clicked. * */ - create(drawAction: string): PointDrawAction | MultipointDrawAction | PolylineDrawAction | PolygonDrawAction; + create(drawAction: string, drawOptions: DrawCreateDrawOptions): DrawAction; /** * Resets the drawing by clearing the active action. * @@ -35342,11 +37876,11 @@ declare namespace __esri { interface DrawProperties { /** - * A reference to the active draw action. An instance of the draw action is created when [create()](https://developers.arcgis.com/javascript/latest/api-reference/esri-views-2d-draw-Draw.html#create) method is called. + * A reference to the active [draw action](https://developers.arcgis.com/javascript/latest/api-reference/esri-views-2d-draw-DrawAction.html). An instance of the draw action is created when [create()](https://developers.arcgis.com/javascript/latest/api-reference/esri-views-2d-draw-Draw.html#create) method is called. * * [Read more...](https://developers.arcgis.com/javascript/latest/api-reference/esri-views-2d-draw-Draw.html#activeAction) */ - activeAction?: PointDrawActionProperties | MultipointDrawActionProperties | PolygonDrawActionProperties | PolylineDrawActionProperties; + activeAction?: DrawActionProperties; /** * A reference to the [MapView](https://developers.arcgis.com/javascript/latest/api-reference/esri-views-MapView.html). Set this to link the draw to a specific view. * @@ -35355,36 +37889,96 @@ declare namespace __esri { view?: MapViewProperties; } - interface MultipointDrawAction extends Accessor, Evented { + + export interface DrawCreateDrawOptions extends Object { + /** + * The drawing mode. The drawing mode only applies when creating `polygon` and `polyline` geometries. **Known Values:** + * + * Value | Description | + * ----- | ----------- | + * hybrid | Vertices are added while the pointer is clicked or dragged. + * freehand | Vertices are added while the pointer is dragged. + * click | Vertices are added when the pointer is clicked. + * + * + * [Read more...](https://developers.arcgis.com/javascript/latest/api-reference/esri-views-2d-draw-Draw.html#create) + * + * @default hybrid + */ + mode?: string; + } + + interface DrawAction extends Accessor, Evented { + /** + * A reference to the [MapView](https://developers.arcgis.com/javascript/latest/api-reference/esri-views-MapView.html). + * + * [Read more...](https://developers.arcgis.com/javascript/latest/api-reference/esri-views-2d-draw-DrawAction.html#view) + */ + view: MapView; + + /** + * Indicates if the [redo()](https://developers.arcgis.com/javascript/latest/api-reference/esri-views-2d-draw-DrawAction.html#redo) method can be called on the action instance. + * + * [Read more...](https://developers.arcgis.com/javascript/latest/api-reference/esri-views-2d-draw-DrawAction.html#canRedo) + * + * + */ + canRedo(): boolean; + /** + * Indicates if the [undo()](https://developers.arcgis.com/javascript/latest/api-reference/esri-views-2d-draw-DrawAction.html#undo) method can be called on the action instance. + * + * [Read more...](https://developers.arcgis.com/javascript/latest/api-reference/esri-views-2d-draw-DrawAction.html#canUndo) + * + * + */ + canUndo(): boolean; + /** + * Incrementally redo actions recorded in the stack. Call [canRedo()](https://developers.arcgis.com/javascript/latest/api-reference/esri-views-2d-draw-DrawAction.html#canRedo) prior to calling this method to check if this method can be called on the action instance. Calling this method will fire the [vertex-add](https://developers.arcgis.com/javascript/latest/api-reference/esri-views-2d-draw-DrawAction.html#event:vertex-add) or [vertex-remove](https://developers.arcgis.com/javascript/latest/api-reference/esri-views-2d-draw-DrawAction.html#event:vertex-remove) events depending on the last action. + * + * [Read more...](https://developers.arcgis.com/javascript/latest/api-reference/esri-views-2d-draw-DrawAction.html#redo) + * + * + */ + redo(): void; + /** + * Incrementally undo actions recorded in the stack. Call [canUndo()](https://developers.arcgis.com/javascript/latest/api-reference/esri-views-2d-draw-DrawAction.html#canUndo) prior to calling this method to check if this method can be called on the action instance. Calling this method will fire the [vertex-add](https://developers.arcgis.com/javascript/latest/api-reference/esri-views-2d-draw-DrawAction.html#event:vertex-add) or [vertex-remove](https://developers.arcgis.com/javascript/latest/api-reference/esri-views-2d-draw-DrawAction.html#event:vertex-remove) events depending on the last action. + * + * [Read more...](https://developers.arcgis.com/javascript/latest/api-reference/esri-views-2d-draw-DrawAction.html#undo) + * + * + */ + undo(): void; + } + + interface DrawActionConstructor { + /** + * DrawAction is the base class for all draw actions. DrawActions use the view events to generate a set of coordinates to create new geometries. Each serves a different purpose, allowing you to create a different type geometry such as [point](https://developers.arcgis.com/javascript/latest/api-reference/esri-geometry-Point.html), [multipoint](https://developers.arcgis.com/javascript/latest/api-reference/esri-geometry-Multipoint.html), [polyline](https://developers.arcgis.com/javascript/latest/api-reference/esri-geometry-Polyline.html), and [polygon](https://developers.arcgis.com/javascript/latest/api-reference/esri-geometry-Polygon.html). + * + * [Read more...](https://developers.arcgis.com/javascript/latest/api-reference/esri-views-2d-draw-DrawAction.html) + */ + + new(properties?: DrawActionProperties): DrawAction; + } + + export const DrawAction: DrawActionConstructor; + + interface DrawActionProperties { + /** + * A reference to the [MapView](https://developers.arcgis.com/javascript/latest/api-reference/esri-views-MapView.html). + * + * [Read more...](https://developers.arcgis.com/javascript/latest/api-reference/esri-views-2d-draw-DrawAction.html#view) + */ + view?: MapViewProperties; + } + + interface MultipointDrawAction extends DrawAction { /** * Two-dimensional array of numbers representing the coordinates of each vertex that comprises the drawn geometry. * * [Read more...](https://developers.arcgis.com/javascript/latest/api-reference/esri-views-2d-draw-MultipointDrawAction.html#vertices) */ readonly vertices: number[][]; - /** - * A reference to the [MapView](https://developers.arcgis.com/javascript/latest/api-reference/esri-views-MapView.html). - * - * [Read more...](https://developers.arcgis.com/javascript/latest/api-reference/esri-views-2d-draw-MultipointDrawAction.html#view) - */ - view: MapView; - /** - * Indicates if the [redo()](https://developers.arcgis.com/javascript/latest/api-reference/esri-views-2d-draw-MultipointDrawAction.html#redo) method can be called on the action instance. - * - * [Read more...](https://developers.arcgis.com/javascript/latest/api-reference/esri-views-2d-draw-MultipointDrawAction.html#canRedo) - * - * - */ - canRedo(): boolean; - /** - * Indicates if the [undo()](https://developers.arcgis.com/javascript/latest/api-reference/esri-views-2d-draw-MultipointDrawAction.html#undo) method can be called on the action instance. - * - * [Read more...](https://developers.arcgis.com/javascript/latest/api-reference/esri-views-2d-draw-MultipointDrawAction.html#canUndo) - * - * - */ - canUndo(): boolean; /** * Completes drawing the [multipoint](https://developers.arcgis.com/javascript/latest/api-reference/esri-geometry-Multipoint.html) geometry and fires the [draw-complete](https://developers.arcgis.com/javascript/latest/api-reference/esri-views-2d-draw-MultipointDrawAction.html#event:draw-complete) event. Call this method if the drawing logic needs to be completed other than by double-clicking or pressing the "C" key. * @@ -35393,39 +37987,19 @@ declare namespace __esri { * */ complete(): void; - /** - * Incrementally redo actions recorded in the stack. Call [canRedo()](https://developers.arcgis.com/javascript/latest/api-reference/esri-views-2d-draw-MultipointDrawAction.html#canRedo) prior to calling this method to check if this method can be called on the action instance. Calling this method will fire the [vertex-add](https://developers.arcgis.com/javascript/latest/api-reference/esri-views-2d-draw-MultipointDrawAction.html#event:vertex-add) or [vertex-remove](https://developers.arcgis.com/javascript/latest/api-reference/esri-views-2d-draw-MultipointDrawAction.html#event:vertex-remove) event depending on the last action. - * - * [Read more...](https://developers.arcgis.com/javascript/latest/api-reference/esri-views-2d-draw-MultipointDrawAction.html#redo) - * - * - */ - redo(): void; - /** - * Incrementally undo actions recorded in the stack. Call [canUndo()](https://developers.arcgis.com/javascript/latest/api-reference/esri-views-2d-draw-MultipointDrawAction.html#canUndo) prior to calling this method to check if this method can be called on the action instance. Calling this method will fire the [vertex-add](https://developers.arcgis.com/javascript/latest/api-reference/esri-views-2d-draw-MultipointDrawAction.html#event:vertex-add) or [vertex-remove](https://developers.arcgis.com/javascript/latest/api-reference/esri-views-2d-draw-MultipointDrawAction.html#event:vertex-remove) event depending on the last action. - * - * [Read more...](https://developers.arcgis.com/javascript/latest/api-reference/esri-views-2d-draw-MultipointDrawAction.html#undo) - * - * - */ - undo(): void; on(name: "cursor-update", eventHandler: MultipointDrawActionCursorUpdateEventHandler): IHandle; - on(name: "cursor-update", modifiers: string[], eventHandler: MultipointDrawActionCursorUpdateEventHandler): IHandle; - on(name: "vertex-add", eventHandler: MultipointDrawActionVertexAddEventHandler): IHandle; - on(name: "vertex-add", modifiers: string[], eventHandler: MultipointDrawActionVertexAddEventHandler): IHandle; - on(name: "vertex-remove", eventHandler: MultipointDrawActionVertexRemoveEventHandler): IHandle; - on(name: "vertex-remove", modifiers: string[], eventHandler: MultipointDrawActionVertexRemoveEventHandler): IHandle; - on(name: "draw-complete", eventHandler: MultipointDrawActionDrawCompleteEventHandler): IHandle; - on(name: "draw-complete", modifiers: string[], eventHandler: MultipointDrawActionDrawCompleteEventHandler): IHandle; + on(name: "undo", eventHandler: MultipointDrawActionUndoEventHandler): IHandle; + + on(name: "redo", eventHandler: MultipointDrawActionRedoEventHandler): IHandle; } interface MultipointDrawActionConstructor { @@ -35436,13 +38010,8 @@ declare namespace __esri { export const MultipointDrawAction: MultipointDrawActionConstructor; - interface MultipointDrawActionProperties { - /** - * A reference to the [MapView](https://developers.arcgis.com/javascript/latest/api-reference/esri-views-MapView.html). - * - * [Read more...](https://developers.arcgis.com/javascript/latest/api-reference/esri-views-2d-draw-MultipointDrawAction.html#view) - */ - view?: MapViewProperties; + interface MultipointDrawActionProperties extends DrawActionProperties { + } export interface MultipointDrawActionCursorUpdateEvent { @@ -35469,6 +38038,32 @@ declare namespace __esri { vertices: number[][]; } + export interface MultipointDrawActionRedoEvent { + + defaultPrevented: boolean; + + preventDefault: Function; + + type: string; + + vertexIndex: number; + + vertices: number[][]; + } + + export interface MultipointDrawActionUndoEvent { + + defaultPrevented: boolean; + + preventDefault: Function; + + type: string; + + vertexIndex: number; + + vertices: number[][]; + } + export interface MultipointDrawActionVertexAddEvent { defaultPrevented: boolean; @@ -35495,19 +38090,13 @@ declare namespace __esri { vertices: number[][]; } - interface PointDrawAction extends Accessor, Evented { + interface PointDrawAction extends DrawAction { /** * An array of x,y coordinates for the [point](https://developers.arcgis.com/javascript/latest/api-reference/esri-geometry-Point.html) geometry. * * [Read more...](https://developers.arcgis.com/javascript/latest/api-reference/esri-views-2d-draw-PointDrawAction.html#coordinates) */ - coordinates: number[]; - /** - * A reference to the [MapView](https://developers.arcgis.com/javascript/latest/api-reference/esri-views-MapView.html). - * - * [Read more...](https://developers.arcgis.com/javascript/latest/api-reference/esri-views-2d-draw-PointDrawAction.html#view) - */ - view: MapView; + readonly coordinates: number[]; /** * Completes drawing the [point](https://developers.arcgis.com/javascript/latest/api-reference/esri-geometry-Point.html) geometry and fires the [draw-complete](https://developers.arcgis.com/javascript/latest/api-reference/esri-views-2d-draw-PointDrawAction.html#event:draw-complete) event. Call this method if the drawing logic needs to be completed other than by double-clicking or pressing the "C" key. @@ -35521,11 +38110,7 @@ declare namespace __esri { on(name: "cursor-update", eventHandler: PointDrawActionCursorUpdateEventHandler): IHandle; - on(name: "cursor-update", modifiers: string[], eventHandler: PointDrawActionCursorUpdateEventHandler): IHandle; - on(name: "draw-complete", eventHandler: PointDrawActionDrawCompleteEventHandler): IHandle; - - on(name: "draw-complete", modifiers: string[], eventHandler: PointDrawActionDrawCompleteEventHandler): IHandle; } interface PointDrawActionConstructor { @@ -35536,19 +38121,8 @@ declare namespace __esri { export const PointDrawAction: PointDrawActionConstructor; - interface PointDrawActionProperties { - /** - * An array of x,y coordinates for the [point](https://developers.arcgis.com/javascript/latest/api-reference/esri-geometry-Point.html) geometry. - * - * [Read more...](https://developers.arcgis.com/javascript/latest/api-reference/esri-views-2d-draw-PointDrawAction.html#coordinates) - */ - coordinates?: number[]; - /** - * A reference to the [MapView](https://developers.arcgis.com/javascript/latest/api-reference/esri-views-MapView.html). - * - * [Read more...](https://developers.arcgis.com/javascript/latest/api-reference/esri-views-2d-draw-PointDrawAction.html#view) - */ - view?: MapViewProperties; + interface PointDrawActionProperties extends DrawActionProperties { + } export interface PointDrawActionCursorUpdateEvent { @@ -35573,36 +38147,29 @@ declare namespace __esri { type: string; } - interface PolygonDrawAction extends Accessor, Evented { + interface PolygonDrawAction extends DrawAction { + /** + * The drawing mode. **Known Values:** + * + * Value | Description | + * ----- | ----------- | + * hybrid | Vertices are added while the pointer is clicked or dragged. + * freehand | Vertices are added while the pointer is dragged. + * click | Vertices are added when the pointer is clicked. + * + * + * [Read more...](https://developers.arcgis.com/javascript/latest/api-reference/esri-views-2d-draw-PolygonDrawAction.html#mode) + * + * @default hybrid + */ + mode: string; /** * Two-dimensional array of numbers representing the coordinates of each vertex comprising the geometry being drawn. * * [Read more...](https://developers.arcgis.com/javascript/latest/api-reference/esri-views-2d-draw-PolygonDrawAction.html#vertices) */ readonly vertices: number[][]; - /** - * A reference to the [MapView](https://developers.arcgis.com/javascript/latest/api-reference/esri-views-MapView.html). - * - * [Read more...](https://developers.arcgis.com/javascript/latest/api-reference/esri-views-2d-draw-PolygonDrawAction.html#view) - */ - view: MapView; - /** - * Indicates if the [redo()](https://developers.arcgis.com/javascript/latest/api-reference/esri-views-2d-draw-PolygonDrawAction.html#redo) method can be called on the action instance. - * - * [Read more...](https://developers.arcgis.com/javascript/latest/api-reference/esri-views-2d-draw-PolygonDrawAction.html#canRedo) - * - * - */ - canRedo(): boolean; - /** - * Indicates if the [undo()](https://developers.arcgis.com/javascript/latest/api-reference/esri-views-2d-draw-PolygonDrawAction.html#undo) method can be called on the action instance. - * - * [Read more...](https://developers.arcgis.com/javascript/latest/api-reference/esri-views-2d-draw-PolygonDrawAction.html#canUndo) - * - * - */ - canUndo(): boolean; /** * Completes drawing the polygon geometry and fires the [draw-complete](https://developers.arcgis.com/javascript/latest/api-reference/esri-views-2d-draw-PolygonDrawAction.html#event:draw-complete) event. Call this method if the drawing logic needs to be completed other than by double-clicking or pressing the "C" key. * @@ -35611,39 +38178,19 @@ declare namespace __esri { * */ complete(): void; - /** - * Incrementally redo actions recorded in the stack. Call [canRedo()](https://developers.arcgis.com/javascript/latest/api-reference/esri-views-2d-draw-PolygonDrawAction.html#canRedo) prior to calling this method to check if this method can be called on the action instance. Calling this method will fire the [vertex-add](https://developers.arcgis.com/javascript/latest/api-reference/esri-views-2d-draw-PolygonDrawAction.html#event:vertex-add) or [vertex-remove](https://developers.arcgis.com/javascript/latest/api-reference/esri-views-2d-draw-PolygonDrawAction.html#event:vertex-remove) events depending on the last action. - * - * [Read more...](https://developers.arcgis.com/javascript/latest/api-reference/esri-views-2d-draw-PolygonDrawAction.html#redo) - * - * - */ - redo(): void; - /** - * Incrementally undo actions recorded in the stack. Call [canUndo()](https://developers.arcgis.com/javascript/latest/api-reference/esri-views-2d-draw-PolygonDrawAction.html#canUndo) prior to calling this method to check if this method can be called on the action instance. Calling this method will fire the [vertex-add](https://developers.arcgis.com/javascript/latest/api-reference/esri-views-2d-draw-PolygonDrawAction.html#event:vertex-add) or [vertex-remove](https://developers.arcgis.com/javascript/latest/api-reference/esri-views-2d-draw-PolygonDrawAction.html#event:vertex-remove) events depending on the last action. - * - * [Read more...](https://developers.arcgis.com/javascript/latest/api-reference/esri-views-2d-draw-PolygonDrawAction.html#undo) - * - * - */ - undo(): void; on(name: "cursor-update", eventHandler: PolygonDrawActionCursorUpdateEventHandler): IHandle; - on(name: "cursor-update", modifiers: string[], eventHandler: PolygonDrawActionCursorUpdateEventHandler): IHandle; - on(name: "vertex-add", eventHandler: PolygonDrawActionVertexAddEventHandler): IHandle; - on(name: "vertex-add", modifiers: string[], eventHandler: PolygonDrawActionVertexAddEventHandler): IHandle; - on(name: "vertex-remove", eventHandler: PolygonDrawActionVertexRemoveEventHandler): IHandle; - on(name: "vertex-remove", modifiers: string[], eventHandler: PolygonDrawActionVertexRemoveEventHandler): IHandle; - on(name: "draw-complete", eventHandler: PolygonDrawActionDrawCompleteEventHandler): IHandle; - on(name: "draw-complete", modifiers: string[], eventHandler: PolygonDrawActionDrawCompleteEventHandler): IHandle; + on(name: "undo", eventHandler: PolygonDrawActionUndoEventHandler): IHandle; + + on(name: "redo", eventHandler: PolygonDrawActionRedoEventHandler): IHandle; } interface PolygonDrawActionConstructor { @@ -35654,13 +38201,22 @@ declare namespace __esri { export const PolygonDrawAction: PolygonDrawActionConstructor; - interface PolygonDrawActionProperties { + interface PolygonDrawActionProperties extends DrawActionProperties { /** - * A reference to the [MapView](https://developers.arcgis.com/javascript/latest/api-reference/esri-views-MapView.html). + * The drawing mode. **Known Values:** * - * [Read more...](https://developers.arcgis.com/javascript/latest/api-reference/esri-views-2d-draw-PolygonDrawAction.html#view) + * Value | Description | + * ----- | ----------- | + * hybrid | Vertices are added while the pointer is clicked or dragged. + * freehand | Vertices are added while the pointer is dragged. + * click | Vertices are added when the pointer is clicked. + * + * + * [Read more...](https://developers.arcgis.com/javascript/latest/api-reference/esri-views-2d-draw-PolygonDrawAction.html#mode) + * + * @default hybrid */ - view?: MapViewProperties; + mode?: string; } export interface PolygonDrawActionCursorUpdateEvent { @@ -35687,6 +38243,32 @@ declare namespace __esri { vertices: number[][]; } + export interface PolygonDrawActionRedoEvent { + + defaultPrevented: boolean; + + preventDefault: Function; + + type: string; + + vertexIndex: number; + + vertices: number[][]; + } + + export interface PolygonDrawActionUndoEvent { + + defaultPrevented: boolean; + + preventDefault: Function; + + type: string; + + vertexIndex: number; + + vertices: number[][]; + } + export interface PolygonDrawActionVertexAddEvent { defaultPrevented: boolean; @@ -35713,36 +38295,29 @@ declare namespace __esri { vertices: number[][]; } - interface PolylineDrawAction extends Accessor, Evented { + interface PolylineDrawAction extends DrawAction { + /** + * The drawing mode. **Known Values:** + * + * Value | Description | + * ----- | ----------- | + * hybrid | Vertices are added while the pointer is clicked or dragged. + * freehand | Vertices are added while the pointer is dragged. + * click | Vertices are added when the pointer is clicked. + * + * + * [Read more...](https://developers.arcgis.com/javascript/latest/api-reference/esri-views-2d-draw-PolylineDrawAction.html#mode) + * + * @default hybrid + */ + mode: string; /** * Two-dimensional array of numbers representing the coordinates of each vertex that comprising the drawn geometry. * * [Read more...](https://developers.arcgis.com/javascript/latest/api-reference/esri-views-2d-draw-PolylineDrawAction.html#vertices) */ readonly vertices: number[][]; - /** - * A reference to the [MapView](https://developers.arcgis.com/javascript/latest/api-reference/esri-views-MapView.html). - * - * [Read more...](https://developers.arcgis.com/javascript/latest/api-reference/esri-views-2d-draw-PolylineDrawAction.html#view) - */ - view: MapView; - /** - * Indicates if the [redo()](https://developers.arcgis.com/javascript/latest/api-reference/esri-views-2d-draw-PolylineDrawAction.html#redo) method can be called on the action instance. - * - * [Read more...](https://developers.arcgis.com/javascript/latest/api-reference/esri-views-2d-draw-PolylineDrawAction.html#canRedo) - * - * - */ - canRedo(): boolean; - /** - * Indicates if the [undo()](https://developers.arcgis.com/javascript/latest/api-reference/esri-views-2d-draw-PolylineDrawAction.html#undo) method can be called on the action instance. - * - * [Read more...](https://developers.arcgis.com/javascript/latest/api-reference/esri-views-2d-draw-PolylineDrawAction.html#canUndo) - * - * - */ - canUndo(): boolean; /** * Completes drawing the polyline geometry and fires the [draw-complete](https://developers.arcgis.com/javascript/latest/api-reference/esri-views-2d-draw-PolylineDrawAction.html#event:draw-complete) event. Call this method if the drawing logic needs to be completed other than by double-clicking or pressing the "C" key. * @@ -35751,39 +38326,19 @@ declare namespace __esri { * */ complete(): void; - /** - * Incrementally redo actions recorded in the stack. Call [canRedo()](https://developers.arcgis.com/javascript/latest/api-reference/esri-views-2d-draw-PolylineDrawAction.html#canRedo) prior to calling this method to check if this method can be called on the action instance. Calling this method will fire the [vertex-add](https://developers.arcgis.com/javascript/latest/api-reference/esri-views-2d-draw-PolylineDrawAction.html#event:vertex-add) or [vertex-remove](https://developers.arcgis.com/javascript/latest/api-reference/esri-views-2d-draw-PolylineDrawAction.html#event:vertex-remove) event depending on the last action. - * - * [Read more...](https://developers.arcgis.com/javascript/latest/api-reference/esri-views-2d-draw-PolylineDrawAction.html#redo) - * - * - */ - redo(): void; - /** - * Incrementally undo actions recorded in the stack. Call [canUndo()](https://developers.arcgis.com/javascript/latest/api-reference/esri-views-2d-draw-PolylineDrawAction.html#canUndo) prior to calling this method to check if this method can be called on the action instance. Calling this method will fire the [vertex-add](https://developers.arcgis.com/javascript/latest/api-reference/esri-views-2d-draw-PolylineDrawAction.html#event:vertex-add) or [vertex-remove](https://developers.arcgis.com/javascript/latest/api-reference/esri-views-2d-draw-PolylineDrawAction.html#event:vertex-remove) event depending on the last action. - * - * [Read more...](https://developers.arcgis.com/javascript/latest/api-reference/esri-views-2d-draw-PolylineDrawAction.html#undo) - * - * - */ - undo(): void; on(name: "cursor-update", eventHandler: PolylineDrawActionCursorUpdateEventHandler): IHandle; - on(name: "cursor-update", modifiers: string[], eventHandler: PolylineDrawActionCursorUpdateEventHandler): IHandle; - on(name: "vertex-add", eventHandler: PolylineDrawActionVertexAddEventHandler): IHandle; - on(name: "vertex-add", modifiers: string[], eventHandler: PolylineDrawActionVertexAddEventHandler): IHandle; - on(name: "vertex-remove", eventHandler: PolylineDrawActionVertexRemoveEventHandler): IHandle; - on(name: "vertex-remove", modifiers: string[], eventHandler: PolylineDrawActionVertexRemoveEventHandler): IHandle; - on(name: "draw-complete", eventHandler: PolylineDrawActionDrawCompleteEventHandler): IHandle; - on(name: "draw-complete", modifiers: string[], eventHandler: PolylineDrawActionDrawCompleteEventHandler): IHandle; + on(name: "undo", eventHandler: PolylineDrawActionUndoEventHandler): IHandle; + + on(name: "redo", eventHandler: PolylineDrawActionRedoEventHandler): IHandle; } interface PolylineDrawActionConstructor { @@ -35794,13 +38349,22 @@ declare namespace __esri { export const PolylineDrawAction: PolylineDrawActionConstructor; - interface PolylineDrawActionProperties { + interface PolylineDrawActionProperties extends DrawActionProperties { /** - * A reference to the [MapView](https://developers.arcgis.com/javascript/latest/api-reference/esri-views-MapView.html). + * The drawing mode. **Known Values:** * - * [Read more...](https://developers.arcgis.com/javascript/latest/api-reference/esri-views-2d-draw-PolylineDrawAction.html#view) + * Value | Description | + * ----- | ----------- | + * hybrid | Vertices are added while the pointer is clicked or dragged. + * freehand | Vertices are added while the pointer is dragged. + * click | Vertices are added when the pointer is clicked. + * + * + * [Read more...](https://developers.arcgis.com/javascript/latest/api-reference/esri-views-2d-draw-PolylineDrawAction.html#mode) + * + * @default hybrid */ - view?: MapViewProperties; + mode?: string; } export interface PolylineDrawActionCursorUpdateEvent { @@ -35827,6 +38391,32 @@ declare namespace __esri { vertices: number[][]; } + export interface PolylineDrawActionRedoEvent { + + defaultPrevented: boolean; + + preventDefault: Function; + + type: string; + + vertexIndex: number; + + vertices: number[][]; + } + + export interface PolylineDrawActionUndoEvent { + + defaultPrevented: boolean; + + preventDefault: Function; + + type: string; + + vertexIndex: number; + + vertices: number[][]; + } + export interface PolylineDrawActionVertexAddEvent { defaultPrevented: boolean; @@ -35853,6 +38443,80 @@ declare namespace __esri { vertices: number[][]; } + interface SegmentDrawAction extends DrawAction { + /** + * Two-dimensional array of numbers representing the coordinates of each vertex comprising the geometry being drawn. + * + * [Read more...](https://developers.arcgis.com/javascript/latest/api-reference/esri-views-2d-draw-SegmentDrawAction.html#vertices) + */ + readonly vertices: number[][]; + + /** + * Completes drawing the polygon geometry and fires the [draw-complete](https://developers.arcgis.com/javascript/latest/api-reference/esri-views-2d-draw-SegmentDrawAction.html#event:draw-complete) event. Call this method if the drawing logic needs to be completed other than by double-clicking or pressing the "C" key. + * + * [Read more...](https://developers.arcgis.com/javascript/latest/api-reference/esri-views-2d-draw-SegmentDrawAction.html#complete) + * + * + */ + complete(): void; + + + on(name: "cursor-update", eventHandler: SegmentDrawActionCursorUpdateEventHandler): IHandle; + + on(name: "draw-complete", eventHandler: SegmentDrawActionDrawCompleteEventHandler): IHandle; + + on(name: "vertex-add", eventHandler: SegmentDrawActionVertexAddEventHandler): IHandle; + } + + interface SegmentDrawActionConstructor { + + + new(properties?: SegmentDrawActionProperties): SegmentDrawAction; + } + + export const SegmentDrawAction: SegmentDrawActionConstructor; + + interface SegmentDrawActionProperties extends DrawActionProperties { + + } + + export interface SegmentDrawActionCursorUpdateEvent { + + defaultPrevented: boolean; + + preventDefault: Function; + + type: string; + + vertexIndex: number; + + vertices: number[][]; + } + + export interface SegmentDrawActionDrawCompleteEvent { + + defaultPrevented: boolean; + + preventDefault: Function; + + type: string; + + vertices: number[][]; + } + + export interface SegmentDrawActionVertexAddEvent { + + defaultPrevented: boolean; + + preventDefault: Function; + + type: string; + + vertexIndex: number; + + vertices: number[][]; + } + /** * map/scene on screen. The ArcGIS API for JavaScript offers a low-level interface to access the SceneView's WebGL context, and thus enables creating custom visualizations that interact with the scene the same way as built-in layers. Developers can either write WebGL code directly, or integrate with third-party WebGL libraries. * @@ -35966,7 +38630,7 @@ declare namespace __esri { * * [Read more...](https://developers.arcgis.com/javascript/latest/api-reference/esri-views-3d-externalRenderers.html#ColorAndIntensity) */ - color: any; + color: ArrayLike; /** * Scalar intensity value by which the color should be scaled for compositing. * @@ -35985,26 +38649,20 @@ declare namespace __esri { * Typically called once after adding the external renderer to a view, or whenever the [SceneView](https://developers.arcgis.com/javascript/latest/api-reference/esri-views-SceneView.html) becomes [ready](https://developers.arcgis.com/javascript/latest/api-reference/esri-views-SceneView.html#ready). It may be called again if the ready state cycles, for example when a different [Map](https://developers.arcgis.com/javascript/latest/api-reference/esri-Map.html) is assigned to the view. Receives a single parameter of type [RenderContext](https://developers.arcgis.com/javascript/latest/api-reference/esri-views-3d-externalRenderers.html#RenderContext). * * [Read more...](https://developers.arcgis.com/javascript/latest/api-reference/esri-views-3d-externalRenderers.html#ExternalRenderer) - * - * */ - setup(): void; + setup?: RenderContextCallback; /** * Called in every frame to execute the state update and draw calls. Receives a single parameter of type [RenderContext](https://developers.arcgis.com/javascript/latest/api-reference/esri-views-3d-externalRenderers.html#RenderContext). * * [Read more...](https://developers.arcgis.com/javascript/latest/api-reference/esri-views-3d-externalRenderers.html#ExternalRenderer) - * - * */ - render(): void; + render?: RenderContextCallback; /** * Called when the external renderer is removed from a view, or when the [ready](https://developers.arcgis.com/javascript/latest/api-reference/esri-views-SceneView.html#ready) state of the view turns false. Receives a single parameter of type [RenderContext](https://developers.arcgis.com/javascript/latest/api-reference/esri-views-3d-externalRenderers.html#RenderContext). * * [Read more...](https://developers.arcgis.com/javascript/latest/api-reference/esri-views-3d-externalRenderers.html#ExternalRenderer) - * - * */ - dispose(): void; + dispose?: RenderContextCallback; } /** @@ -36018,37 +38676,37 @@ declare namespace __esri { * * [Read more...](https://developers.arcgis.com/javascript/latest/api-reference/esri-views-3d-externalRenderers.html#RenderCamera) */ - viewMatrix: any; + viewMatrix: ArrayLike; /** * The inverse transpose of `viewMatrix`, used to transform normals from world space to camera space. * * [Read more...](https://developers.arcgis.com/javascript/latest/api-reference/esri-views-3d-externalRenderers.html#RenderCamera) */ - viewInverseTransposeMatrix: any; + viewInverseTransposeMatrix: ArrayLike; /** * A 4x4 matrix that defines the perspective projection transformation. * * [Read more...](https://developers.arcgis.com/javascript/latest/api-reference/esri-views-3d-externalRenderers.html#RenderCamera) */ - projectionMatrix: any; + projectionMatrix: ArrayLike; /** * The position of the camera in the internal Cartesian rendering coordinate system. * * [Read more...](https://developers.arcgis.com/javascript/latest/api-reference/esri-views-3d-externalRenderers.html#RenderCamera) */ - eye: any; + eye: ArrayLike; /** * The camera target ("look at") position in the internal Cartesian rendering coordinate system. * * [Read more...](https://developers.arcgis.com/javascript/latest/api-reference/esri-views-3d-externalRenderers.html#RenderCamera) */ - center: any; + center: ArrayLike; /** * The camera up vector. * * [Read more...](https://developers.arcgis.com/javascript/latest/api-reference/esri-views-3d-externalRenderers.html#RenderCamera) */ - up: any; + up: ArrayLike; /** * The distance to the near plane. * @@ -36086,7 +38744,7 @@ declare namespace __esri { * * [Read more...](https://developers.arcgis.com/javascript/latest/api-reference/esri-views-3d-externalRenderers.html#RenderContext) */ - gl: any; + gl: WebGLRenderingContext; /** * The camera used to render the current frame. * @@ -36118,6 +38776,8 @@ declare namespace __esri { bindRenderTarget(): void; } + export type RenderContextCallback = (context: RenderContext) => void; + /** * Describes the lighting used by [SceneView](https://developers.arcgis.com/javascript/latest/api-reference/esri-views-SceneView.html), derived from its sun lighting model. It consists of a directional Lambertian (`diffuse`) and a constant (`ambient`) term, which should be treated in the sense of the [Phong Reflection Model](https://en.wikipedia.org/wiki/Phong_reflection_model). * @@ -36129,7 +38789,7 @@ declare namespace __esri { * * [Read more...](https://developers.arcgis.com/javascript/latest/api-reference/esri-views-3d-externalRenderers.html#SunLight) */ - direction: any; + direction: ArrayLike; /** * The diffuse light color and intensity. * @@ -36146,22 +38806,23 @@ declare namespace __esri { interface BreakpointsOwner { /** - * A convenience property used for defining the breakpoints on the [height](https://developers.arcgis.com/javascript/latest/api-reference/esri-views-BreakpointsOwner.html#height) and [width](https://developers.arcgis.com/javascript/latest/api-reference/esri-views-BreakpointsOwner.html#width) of the view. The sizes specified here determine the values of the [widthBreakpoint](https://developers.arcgis.com/javascript/latest/api-reference/esri-views-BreakpointsOwner.html#widthBreakpoint) and [heightBreakpoint](https://developers.arcgis.com/javascript/latest/api-reference/esri-views-BreakpointsOwner.html#heightBreakpoint) properties depending on the view's size. Setting up breakpoints can aid in responsive app design. It does this by watching width and height breakpoints. This is helpful as it removes the need for multiple [`@media` calls](https://developer.mozilla.org/en-US/docs/Web/CSS/Media_Queries). Instead of listening for the view's size and/or resizes property, you can set up a watch handler for either the [widthBreakpoint](https://developers.arcgis.com/javascript/latest/api-reference/esri-views-BreakpointsOwner.html#widthBreakpoint) or [heightBreakpoint](https://developers.arcgis.com/javascript/latest/api-reference/esri-views-BreakpointsOwner.html#heightBreakpoint) properties of the view. + * A convenience property used for defining the breakpoints on the [height](https://developers.arcgis.com/javascript/latest/api-reference/esri-views-BreakpointsOwner.html#height) and [width](https://developers.arcgis.com/javascript/latest/api-reference/esri-views-BreakpointsOwner.html#width) of the view. The sizes specified here determine the values of the [widthBreakpoint](https://developers.arcgis.com/javascript/latest/api-reference/esri-views-BreakpointsOwner.html#widthBreakpoint) and [heightBreakpoint](https://developers.arcgis.com/javascript/latest/api-reference/esri-views-BreakpointsOwner.html#heightBreakpoint) properties depending on the view's size. Setting up breakpoints can aid in responsive app design. It does this by watching width and height breakpoints. This is helpful as it removes the need for multiple [`@media` calls](https://developer.mozilla.org/en-US/docs/Web/CSS/Media_Queries). Instead of listening for the view's size and/or resizes property, you can set up a watch handler for either the [widthBreakpoint](https://developers.arcgis.com/javascript/latest/api-reference/esri-views-BreakpointsOwner.html#widthBreakpoint) or [heightBreakpoint](https://developers.arcgis.com/javascript/latest/api-reference/esri-views-BreakpointsOwner.html#heightBreakpoint) properties of the view. + * > Please refer to the [styling guide](https://developers.arcgis.com/javascript/latest/guide/styling/index.html#view-size-css-classes) for additional information on working with this. * * [Read more...](https://developers.arcgis.com/javascript/latest/api-reference/esri-views-BreakpointsOwner.html#breakpoints) */ breakpoints: BreakpointsOwnerBreakpoints; /** - * A convenience property indicating the general size of the view's height. This value is determined based on where the view's [height](https://developers.arcgis.com/javascript/latest/api-reference/esri-views-BreakpointsOwner.html#height) falls in the ranges defined in the [breakpoints](https://developers.arcgis.com/javascript/latest/api-reference/esri-views-BreakpointsOwner.html#breakpoints) property. See the table below for a list of possible values. + * A convenience property indicating the general size of the view's height. This value is determined based on where the view's [height](https://developers.arcgis.com/javascript/latest/api-reference/esri-views-BreakpointsOwner.html#height) falls in the ranges defined in the [breakpoints](https://developers.arcgis.com/javascript/latest/api-reference/esri-views-BreakpointsOwner.html#breakpoints) property. See the table below for a list of possible values. Use the [breakpoints](https://developers.arcgis.com/javascript/latest/api-reference/esri-views-BreakpointsOwner.html#breakpoints) property to override the default thresholds. * > Please refer to the [styling guide](https://developers.arcgis.com/javascript/latest/guide/styling/index.html#view-size-css-classes) for additional information on working with this. * - * Possible Value | Description - * ---------------|------------ - * xsmall | The [height](https://developers.arcgis.com/javascript/latest/api-reference/esri-views-BreakpointsOwner.html#height) of the view is smaller than the value set in the `xsmall` [breakpoint](https://developers.arcgis.com/javascript/latest/api-reference/esri-views-BreakpointsOwner.html#breakpoints). - * small | The [height](https://developers.arcgis.com/javascript/latest/api-reference/esri-views-BreakpointsOwner.html#height) of the view is between the values set in the `xsmall` and `small` [breakpoints](https://developers.arcgis.com/javascript/latest/api-reference/esri-views-BreakpointsOwner.html#breakpoints). - * medium | The [height](https://developers.arcgis.com/javascript/latest/api-reference/esri-views-BreakpointsOwner.html#height) of the view is between the values set in the `small` and `medium` [breakpoints](https://developers.arcgis.com/javascript/latest/api-reference/esri-views-BreakpointsOwner.html#breakpoints). - * large | The [height](https://developers.arcgis.com/javascript/latest/api-reference/esri-views-BreakpointsOwner.html#height) of the view is between the values set in the `medium` and `large` [breakpoints](https://developers.arcgis.com/javascript/latest/api-reference/esri-views-BreakpointsOwner.html#breakpoints). - * xlarge | The [height](https://developers.arcgis.com/javascript/latest/api-reference/esri-views-BreakpointsOwner.html#height) of the view is larger than the value set in the `large` [breakpoint](https://developers.arcgis.com/javascript/latest/api-reference/esri-views-BreakpointsOwner.html#breakpoints). + * Possible Value | Description | Default thresholds (pixels) + * ---------------|-------------|---------------------------- + * xsmall | The [height](https://developers.arcgis.com/javascript/latest/api-reference/esri-views-BreakpointsOwner.html#height) of the view is smaller than the value set in the `xsmall` [breakpoint](https://developers.arcgis.com/javascript/latest/api-reference/esri-views-BreakpointsOwner.html#breakpoints). | < 545 + * small | The [height](https://developers.arcgis.com/javascript/latest/api-reference/esri-views-BreakpointsOwner.html#height) of the view is between the values set in the `xsmall` and `small` [breakpoints](https://developers.arcgis.com/javascript/latest/api-reference/esri-views-BreakpointsOwner.html#breakpoints). | 545 - 768 + * medium | The [height](https://developers.arcgis.com/javascript/latest/api-reference/esri-views-BreakpointsOwner.html#height) of the view is between the values set in the `small` and `medium` [breakpoints](https://developers.arcgis.com/javascript/latest/api-reference/esri-views-BreakpointsOwner.html#breakpoints). | 769 - 992 + * large | The [height](https://developers.arcgis.com/javascript/latest/api-reference/esri-views-BreakpointsOwner.html#height) of the view is between the values set in the `medium` and `large` [breakpoints](https://developers.arcgis.com/javascript/latest/api-reference/esri-views-BreakpointsOwner.html#breakpoints). | 993 - 1200 + * xlarge | The [height](https://developers.arcgis.com/javascript/latest/api-reference/esri-views-BreakpointsOwner.html#height) of the view is larger than the value set in the `large` [breakpoint](https://developers.arcgis.com/javascript/latest/api-reference/esri-views-BreakpointsOwner.html#breakpoints). | > 1200 * * * [Read more...](https://developers.arcgis.com/javascript/latest/api-reference/esri-views-BreakpointsOwner.html#heightBreakpoint) @@ -36181,16 +38842,16 @@ declare namespace __esri { */ readonly orientation: string; /** - * A convenience property indicating the general size of the view's width. This value is determined based on where the view's [width](https://developers.arcgis.com/javascript/latest/api-reference/esri-views-BreakpointsOwner.html#width) falls in the ranges defined in the [breakpoints](https://developers.arcgis.com/javascript/latest/api-reference/esri-views-BreakpointsOwner.html#breakpoints) property. See the table below for a list of possible values. + * A convenience property indicating the general size of the view's width. This value is determined based on where the view's [width](https://developers.arcgis.com/javascript/latest/api-reference/esri-views-BreakpointsOwner.html#width) falls in the ranges defined in the [breakpoints](https://developers.arcgis.com/javascript/latest/api-reference/esri-views-BreakpointsOwner.html#breakpoints) property. See the table below for a list of possible values. Use the [breakpoints](https://developers.arcgis.com/javascript/latest/api-reference/esri-views-BreakpointsOwner.html#breakpoints) property to override the default thresholds. * > Please refer to the [styling guide](https://developers.arcgis.com/javascript/latest/guide/styling/index.html#view-size-css-classes) for additional information on working with this. * - * Possible Value | Description - * ---------------|------------ - * xsmall | The [width](https://developers.arcgis.com/javascript/latest/api-reference/esri-views-BreakpointsOwner.html#width) of the view is smaller than the value set in the `xsmall` [breakpoint](https://developers.arcgis.com/javascript/latest/api-reference/esri-views-BreakpointsOwner.html#breakpoints). - * small | The [width](https://developers.arcgis.com/javascript/latest/api-reference/esri-views-BreakpointsOwner.html#width) of the view is between the values set in the `xsmall` and `small` [breakpoints](https://developers.arcgis.com/javascript/latest/api-reference/esri-views-BreakpointsOwner.html#breakpoints). - * medium | The [width](https://developers.arcgis.com/javascript/latest/api-reference/esri-views-BreakpointsOwner.html#width) of the view is between the values set in the `small` and `medium` [breakpoints](https://developers.arcgis.com/javascript/latest/api-reference/esri-views-BreakpointsOwner.html#breakpoints). - * large | The [width](https://developers.arcgis.com/javascript/latest/api-reference/esri-views-BreakpointsOwner.html#width) of the view is between the values set in the `medium` and `large` [breakpoints](https://developers.arcgis.com/javascript/latest/api-reference/esri-views-BreakpointsOwner.html#breakpoints). - * xlarge | The [width](https://developers.arcgis.com/javascript/latest/api-reference/esri-views-BreakpointsOwner.html#width) of the view is larger than the value set in the `large` [breakpoint](https://developers.arcgis.com/javascript/latest/api-reference/esri-views-BreakpointsOwner.html#breakpoints). + * Possible Value | Description | Default thresholds (pixels) + * ---------------|-------------|------------------- + * xsmall | The [width](https://developers.arcgis.com/javascript/latest/api-reference/esri-views-BreakpointsOwner.html#width) of the view is smaller than the value set in the `xsmall` [breakpoint](https://developers.arcgis.com/javascript/latest/api-reference/esri-views-BreakpointsOwner.html#breakpoints). | < 545 + * small | The [width](https://developers.arcgis.com/javascript/latest/api-reference/esri-views-BreakpointsOwner.html#width) of the view is between the values set in the `xsmall` and `small` [breakpoints](https://developers.arcgis.com/javascript/latest/api-reference/esri-views-BreakpointsOwner.html#breakpoints). | 545 - 768 + * medium | The [width](https://developers.arcgis.com/javascript/latest/api-reference/esri-views-BreakpointsOwner.html#width) of the view is between the values set in the `small` and `medium` [breakpoints](https://developers.arcgis.com/javascript/latest/api-reference/esri-views-BreakpointsOwner.html#breakpoints). | 769 - 992 + * large | The [width](https://developers.arcgis.com/javascript/latest/api-reference/esri-views-BreakpointsOwner.html#width) of the view is between the values set in the `medium` and `large` [breakpoints](https://developers.arcgis.com/javascript/latest/api-reference/esri-views-BreakpointsOwner.html#breakpoints). | 993 - 1200 + * xlarge | The [width](https://developers.arcgis.com/javascript/latest/api-reference/esri-views-BreakpointsOwner.html#width) of the view is larger than the value set in the `large` [breakpoint](https://developers.arcgis.com/javascript/latest/api-reference/esri-views-BreakpointsOwner.html#breakpoints). | > 1200 * * * [Read more...](https://developers.arcgis.com/javascript/latest/api-reference/esri-views-BreakpointsOwner.html#widthBreakpoint) @@ -36208,38 +38869,39 @@ declare namespace __esri { interface BreakpointsOwnerProperties { /** - * A convenience property used for defining the breakpoints on the [height](https://developers.arcgis.com/javascript/latest/api-reference/esri-views-BreakpointsOwner.html#height) and [width](https://developers.arcgis.com/javascript/latest/api-reference/esri-views-BreakpointsOwner.html#width) of the view. The sizes specified here determine the values of the [widthBreakpoint](https://developers.arcgis.com/javascript/latest/api-reference/esri-views-BreakpointsOwner.html#widthBreakpoint) and [heightBreakpoint](https://developers.arcgis.com/javascript/latest/api-reference/esri-views-BreakpointsOwner.html#heightBreakpoint) properties depending on the view's size. Setting up breakpoints can aid in responsive app design. It does this by watching width and height breakpoints. This is helpful as it removes the need for multiple [`@media` calls](https://developer.mozilla.org/en-US/docs/Web/CSS/Media_Queries). Instead of listening for the view's size and/or resizes property, you can set up a watch handler for either the [widthBreakpoint](https://developers.arcgis.com/javascript/latest/api-reference/esri-views-BreakpointsOwner.html#widthBreakpoint) or [heightBreakpoint](https://developers.arcgis.com/javascript/latest/api-reference/esri-views-BreakpointsOwner.html#heightBreakpoint) properties of the view. + * A convenience property used for defining the breakpoints on the [height](https://developers.arcgis.com/javascript/latest/api-reference/esri-views-BreakpointsOwner.html#height) and [width](https://developers.arcgis.com/javascript/latest/api-reference/esri-views-BreakpointsOwner.html#width) of the view. The sizes specified here determine the values of the [widthBreakpoint](https://developers.arcgis.com/javascript/latest/api-reference/esri-views-BreakpointsOwner.html#widthBreakpoint) and [heightBreakpoint](https://developers.arcgis.com/javascript/latest/api-reference/esri-views-BreakpointsOwner.html#heightBreakpoint) properties depending on the view's size. Setting up breakpoints can aid in responsive app design. It does this by watching width and height breakpoints. This is helpful as it removes the need for multiple [`@media` calls](https://developer.mozilla.org/en-US/docs/Web/CSS/Media_Queries). Instead of listening for the view's size and/or resizes property, you can set up a watch handler for either the [widthBreakpoint](https://developers.arcgis.com/javascript/latest/api-reference/esri-views-BreakpointsOwner.html#widthBreakpoint) or [heightBreakpoint](https://developers.arcgis.com/javascript/latest/api-reference/esri-views-BreakpointsOwner.html#heightBreakpoint) properties of the view. + * > Please refer to the [styling guide](https://developers.arcgis.com/javascript/latest/guide/styling/index.html#view-size-css-classes) for additional information on working with this. * * [Read more...](https://developers.arcgis.com/javascript/latest/api-reference/esri-views-BreakpointsOwner.html#breakpoints) */ breakpoints?: BreakpointsOwnerBreakpoints; /** - * A convenience property indicating the general size of the view's height. This value is determined based on where the view's [height](https://developers.arcgis.com/javascript/latest/api-reference/esri-views-BreakpointsOwner.html#height) falls in the ranges defined in the [breakpoints](https://developers.arcgis.com/javascript/latest/api-reference/esri-views-BreakpointsOwner.html#breakpoints) property. See the table below for a list of possible values. + * A convenience property indicating the general size of the view's height. This value is determined based on where the view's [height](https://developers.arcgis.com/javascript/latest/api-reference/esri-views-BreakpointsOwner.html#height) falls in the ranges defined in the [breakpoints](https://developers.arcgis.com/javascript/latest/api-reference/esri-views-BreakpointsOwner.html#breakpoints) property. See the table below for a list of possible values. Use the [breakpoints](https://developers.arcgis.com/javascript/latest/api-reference/esri-views-BreakpointsOwner.html#breakpoints) property to override the default thresholds. * > Please refer to the [styling guide](https://developers.arcgis.com/javascript/latest/guide/styling/index.html#view-size-css-classes) for additional information on working with this. * - * Possible Value | Description - * ---------------|------------ - * xsmall | The [height](https://developers.arcgis.com/javascript/latest/api-reference/esri-views-BreakpointsOwner.html#height) of the view is smaller than the value set in the `xsmall` [breakpoint](https://developers.arcgis.com/javascript/latest/api-reference/esri-views-BreakpointsOwner.html#breakpoints). - * small | The [height](https://developers.arcgis.com/javascript/latest/api-reference/esri-views-BreakpointsOwner.html#height) of the view is between the values set in the `xsmall` and `small` [breakpoints](https://developers.arcgis.com/javascript/latest/api-reference/esri-views-BreakpointsOwner.html#breakpoints). - * medium | The [height](https://developers.arcgis.com/javascript/latest/api-reference/esri-views-BreakpointsOwner.html#height) of the view is between the values set in the `small` and `medium` [breakpoints](https://developers.arcgis.com/javascript/latest/api-reference/esri-views-BreakpointsOwner.html#breakpoints). - * large | The [height](https://developers.arcgis.com/javascript/latest/api-reference/esri-views-BreakpointsOwner.html#height) of the view is between the values set in the `medium` and `large` [breakpoints](https://developers.arcgis.com/javascript/latest/api-reference/esri-views-BreakpointsOwner.html#breakpoints). - * xlarge | The [height](https://developers.arcgis.com/javascript/latest/api-reference/esri-views-BreakpointsOwner.html#height) of the view is larger than the value set in the `large` [breakpoint](https://developers.arcgis.com/javascript/latest/api-reference/esri-views-BreakpointsOwner.html#breakpoints). + * Possible Value | Description | Default thresholds (pixels) + * ---------------|-------------|---------------------------- + * xsmall | The [height](https://developers.arcgis.com/javascript/latest/api-reference/esri-views-BreakpointsOwner.html#height) of the view is smaller than the value set in the `xsmall` [breakpoint](https://developers.arcgis.com/javascript/latest/api-reference/esri-views-BreakpointsOwner.html#breakpoints). | < 545 + * small | The [height](https://developers.arcgis.com/javascript/latest/api-reference/esri-views-BreakpointsOwner.html#height) of the view is between the values set in the `xsmall` and `small` [breakpoints](https://developers.arcgis.com/javascript/latest/api-reference/esri-views-BreakpointsOwner.html#breakpoints). | 545 - 768 + * medium | The [height](https://developers.arcgis.com/javascript/latest/api-reference/esri-views-BreakpointsOwner.html#height) of the view is between the values set in the `small` and `medium` [breakpoints](https://developers.arcgis.com/javascript/latest/api-reference/esri-views-BreakpointsOwner.html#breakpoints). | 769 - 992 + * large | The [height](https://developers.arcgis.com/javascript/latest/api-reference/esri-views-BreakpointsOwner.html#height) of the view is between the values set in the `medium` and `large` [breakpoints](https://developers.arcgis.com/javascript/latest/api-reference/esri-views-BreakpointsOwner.html#breakpoints). | 993 - 1200 + * xlarge | The [height](https://developers.arcgis.com/javascript/latest/api-reference/esri-views-BreakpointsOwner.html#height) of the view is larger than the value set in the `large` [breakpoint](https://developers.arcgis.com/javascript/latest/api-reference/esri-views-BreakpointsOwner.html#breakpoints). | > 1200 * * * [Read more...](https://developers.arcgis.com/javascript/latest/api-reference/esri-views-BreakpointsOwner.html#heightBreakpoint) */ heightBreakpoint?: string; /** - * A convenience property indicating the general size of the view's width. This value is determined based on where the view's [width](https://developers.arcgis.com/javascript/latest/api-reference/esri-views-BreakpointsOwner.html#width) falls in the ranges defined in the [breakpoints](https://developers.arcgis.com/javascript/latest/api-reference/esri-views-BreakpointsOwner.html#breakpoints) property. See the table below for a list of possible values. + * A convenience property indicating the general size of the view's width. This value is determined based on where the view's [width](https://developers.arcgis.com/javascript/latest/api-reference/esri-views-BreakpointsOwner.html#width) falls in the ranges defined in the [breakpoints](https://developers.arcgis.com/javascript/latest/api-reference/esri-views-BreakpointsOwner.html#breakpoints) property. See the table below for a list of possible values. Use the [breakpoints](https://developers.arcgis.com/javascript/latest/api-reference/esri-views-BreakpointsOwner.html#breakpoints) property to override the default thresholds. * > Please refer to the [styling guide](https://developers.arcgis.com/javascript/latest/guide/styling/index.html#view-size-css-classes) for additional information on working with this. * - * Possible Value | Description - * ---------------|------------ - * xsmall | The [width](https://developers.arcgis.com/javascript/latest/api-reference/esri-views-BreakpointsOwner.html#width) of the view is smaller than the value set in the `xsmall` [breakpoint](https://developers.arcgis.com/javascript/latest/api-reference/esri-views-BreakpointsOwner.html#breakpoints). - * small | The [width](https://developers.arcgis.com/javascript/latest/api-reference/esri-views-BreakpointsOwner.html#width) of the view is between the values set in the `xsmall` and `small` [breakpoints](https://developers.arcgis.com/javascript/latest/api-reference/esri-views-BreakpointsOwner.html#breakpoints). - * medium | The [width](https://developers.arcgis.com/javascript/latest/api-reference/esri-views-BreakpointsOwner.html#width) of the view is between the values set in the `small` and `medium` [breakpoints](https://developers.arcgis.com/javascript/latest/api-reference/esri-views-BreakpointsOwner.html#breakpoints). - * large | The [width](https://developers.arcgis.com/javascript/latest/api-reference/esri-views-BreakpointsOwner.html#width) of the view is between the values set in the `medium` and `large` [breakpoints](https://developers.arcgis.com/javascript/latest/api-reference/esri-views-BreakpointsOwner.html#breakpoints). - * xlarge | The [width](https://developers.arcgis.com/javascript/latest/api-reference/esri-views-BreakpointsOwner.html#width) of the view is larger than the value set in the `large` [breakpoint](https://developers.arcgis.com/javascript/latest/api-reference/esri-views-BreakpointsOwner.html#breakpoints). + * Possible Value | Description | Default thresholds (pixels) + * ---------------|-------------|------------------- + * xsmall | The [width](https://developers.arcgis.com/javascript/latest/api-reference/esri-views-BreakpointsOwner.html#width) of the view is smaller than the value set in the `xsmall` [breakpoint](https://developers.arcgis.com/javascript/latest/api-reference/esri-views-BreakpointsOwner.html#breakpoints). | < 545 + * small | The [width](https://developers.arcgis.com/javascript/latest/api-reference/esri-views-BreakpointsOwner.html#width) of the view is between the values set in the `xsmall` and `small` [breakpoints](https://developers.arcgis.com/javascript/latest/api-reference/esri-views-BreakpointsOwner.html#breakpoints). | 545 - 768 + * medium | The [width](https://developers.arcgis.com/javascript/latest/api-reference/esri-views-BreakpointsOwner.html#width) of the view is between the values set in the `small` and `medium` [breakpoints](https://developers.arcgis.com/javascript/latest/api-reference/esri-views-BreakpointsOwner.html#breakpoints). | 769 - 992 + * large | The [width](https://developers.arcgis.com/javascript/latest/api-reference/esri-views-BreakpointsOwner.html#width) of the view is between the values set in the `medium` and `large` [breakpoints](https://developers.arcgis.com/javascript/latest/api-reference/esri-views-BreakpointsOwner.html#breakpoints). | 993 - 1200 + * xlarge | The [width](https://developers.arcgis.com/javascript/latest/api-reference/esri-views-BreakpointsOwner.html#width) of the view is larger than the value set in the `large` [breakpoint](https://developers.arcgis.com/javascript/latest/api-reference/esri-views-BreakpointsOwner.html#breakpoints). | > 1200 * * * [Read more...](https://developers.arcgis.com/javascript/latest/api-reference/esri-views-BreakpointsOwner.html#widthBreakpoint) @@ -36281,6 +38943,12 @@ declare namespace __esri { * @default 1200 */ large?: number; + /** + * Sets the `xlarge` breakpoint in pixels used by [widthBreakpoint](https://developers.arcgis.com/javascript/latest/api-reference/esri-views-BreakpointsOwner.html#widthBreakpoint) and [heightBreakpoint](https://developers.arcgis.com/javascript/latest/api-reference/esri-views-BreakpointsOwner.html#heightBreakpoint). If the view's [height](https://developers.arcgis.com/javascript/latest/api-reference/esri-views-BreakpointsOwner.html#height) or [width](https://developers.arcgis.com/javascript/latest/api-reference/esri-views-BreakpointsOwner.html#width) is greater than the value of the `large` property, then the value of [widthBreakpoint](https://developers.arcgis.com/javascript/latest/api-reference/esri-views-BreakpointsOwner.html#widthBreakpoint) or [heightBreakpoint](https://developers.arcgis.com/javascript/latest/api-reference/esri-views-BreakpointsOwner.html#heightBreakpoint) will be `xlarge`. + * + * [Read more...](https://developers.arcgis.com/javascript/latest/api-reference/esri-views-BreakpointsOwner.html#breakpoints) + */ + xlarge?: number; } interface DOMContainer { @@ -36289,7 +38957,13 @@ declare namespace __esri { * * [Read more...](https://developers.arcgis.com/javascript/latest/api-reference/esri-views-DOMContainer.html#container) */ - container: HTMLDivElement | string; + container: HTMLDivElement; + /** + * Indicates if the browser focus is on the view. + * + * [Read more...](https://developers.arcgis.com/javascript/latest/api-reference/esri-views-DOMContainer.html#focused) + */ + readonly focused: boolean; /** * The height of the view in pixels read from the view container element. The view container needs to have a height greater than 0 to be displayed. * @@ -36371,53 +39045,112 @@ declare namespace __esri { ui?: DefaultUIProperties; } + interface GroundView extends Accessor { + /** + * An elevation sampler that may be used to sample and query elevation values from the ground surface that is currently being displayed. The elevation sampler is not supported for [MapView](https://developers.arcgis.com/javascript/latest/api-reference/esri-views-MapView.html) and may be `null` while the ground surface display is being initialized. The resolution of the sampled values depends on the ground elevation display resolution (high resolution close to the camera, low resolution far away from the camera). Because of the dynamic nature of the display resolution, the [demResolution](https://developers.arcgis.com/javascript/latest/api-reference/esri-layers-support-ElevationSampler.html#demResolution) property of the returned sampler will always return `{ min: -1, max: -1 }. If higher or more consistent sample resolution is required, then consider creating a sampler at the desired resolution using ElevationLayer.createSampler or Ground.createSampler. + * + * [Read more...](https://developers.arcgis.com/javascript/latest/api-reference/esri-views-GroundView.html#elevationSampler) + */ + readonly elevationSampler: ElevationSampler; + /** + * A collection containing a hierarchical list of all the created [LayerViews](https://developers.arcgis.com/javascript/latest/api-reference/esri-views-layers-LayerView.html) of the [layers](https://developers.arcgis.com/javascript/latest/api-reference/esri-Ground.html#layers) in the ground. + * + * [Read more...](https://developers.arcgis.com/javascript/latest/api-reference/esri-views-GroundView.html#layerViews) + */ + readonly layerViews: Collection; + /** + * Value is `true` when any of the ground layer views are updating. + * + * [Read more...](https://developers.arcgis.com/javascript/latest/api-reference/esri-views-GroundView.html#updating) + * + * @default false + */ + readonly updating: boolean; + } + + interface GroundViewConstructor { + + + new(properties?: GroundViewProperties): GroundView; + } + + export const GroundView: GroundViewConstructor; + + interface GroundViewProperties { + + } + interface CSVLayerView extends LayerView { /** * Highlights the given feature(s). - * > **Known Limitations** Currently the highlight method is only supported in a [SceneView](https://developers.arcgis.com/javascript/latest/api-reference/esri-views-SceneView.html). + * > **Known Limitations** In 2D [MapViews](https://developers.arcgis.com/javascript/latest/api-reference/esri-views-MapView.html) this method is only supported for [CSVLayers](https://developers.arcgis.com/javascript/latest/api-reference/esri-layers-CSVLayer.html) that have opted in to [WebGL rendering](esri-layers-FeatureLayer.html#webgl-rendering). * * [Read more...](https://developers.arcgis.com/javascript/latest/api-reference/esri-views-layers-CSVLayerView.html#highlight) * - * @param target The feature(s) to highlight. + * @param target The feature(s) to highlight. When passing a graphic or array of graphics, each feature must have a valid `objectID`. You may alternatively pass one or more objectIDs as a single number or an array. * */ - highlight(target?: Graphic | Graphic[]): any; + highlight(target?: Graphic | Graphic[] | number | number[]): any; /** - * Executes a [Query](https://developers.arcgis.com/javascript/latest/api-reference/esri-tasks-support-Query.html) against features available for drawing in the layer view and returns the [Extent](https://developers.arcgis.com/javascript/latest/api-reference/esri-geometry-Extent.html) of features that satisfy the query. + * Executes a [Query](https://developers.arcgis.com/javascript/latest/api-reference/esri-tasks-support-Query.html) against features available for drawing in the layer view and returns the [Extent](https://developers.arcgis.com/javascript/latest/api-reference/esri-geometry-Extent.html) of features that satisfy the query. + * > **Known Limitations** **3D [SceneView](https://developers.arcgis.com/javascript/latest/api-reference/esri-views-SceneView.html) limitations** Queries with `outStatistics` and any other parameter involving statistics are not supported. **SVG limitations (default)** Only the `geometry` , `objectIds`, and `spatialRelationship` properties are supported in the query object. Spatial queries only support [Extent](https://developers.arcgis.com/javascript/latest/api-reference/esri-geometry-Extent.html) geometries with `spatialRelationship = 'intersects'`. **WebGL limitations** + * * Polyline, and Point geometries are not supported in the `geometry` query parameter. + * * SQL expressions cannot be used in `outFields` nor `onStatisticField` (in the `outStatistics` param). + * * The following Query parameters are currently not supported: + * * `orderByField` + * * `distance` and `units` * * [Read more...](https://developers.arcgis.com/javascript/latest/api-reference/esri-views-layers-CSVLayerView.html#queryExtent) * - * @param params Specifies the attributes and spatial filter of the query. Only the [geometry](https://developers.arcgis.com/javascript/latest/api-reference/esri-tasks-support-Query.html#geometry), [objectIds](https://developers.arcgis.com/javascript/latest/api-reference/esri-tasks-support-Query.html#objectIds), and [spatialRelationship](https://developers.arcgis.com/javascript/latest/api-reference/esri-tasks-support-Query.html#spatialRelationship) properties should be specified. Adding any other properties will return an error. If specifying a spatialRelationship, note that `intersects` is the only supported operation. If query parameters are not provided, the extent and count of all features available for drawing are returned. + * @param params Specifies the attributes and spatial filter of the query. When no parameters are passed to this method, all features in the client are returned. To only return features visible in the view, set the `geometry` parameter in the query object to the view's extent. * */ - queryExtent(params?: Query): IPromise; + queryExtent(params?: Query | QueryProperties): IPromise; /** - * Executes a [Query](https://developers.arcgis.com/javascript/latest/api-reference/esri-tasks-support-Query.html) against features available for drawing in the layer view and returns the number of features that satisfy the query. If query parameters are not provided, the count of all features available for drawing is returned. + * Executes a [Query](https://developers.arcgis.com/javascript/latest/api-reference/esri-tasks-support-Query.html) against features available for drawing in the layer view and returns the number of features that satisfy the query. If query parameters are not provided, the count of all features available for drawing is returned. + * > **Known Limitations** **3D [SceneView](https://developers.arcgis.com/javascript/latest/api-reference/esri-views-SceneView.html) limitations** Queries with `outStatistics` and any other parameter involving statistics are not supported. **SVG limitations (default)** Only the `geometry` , `objectIds`, and `spatialRelationship` properties are supported in the query object. Spatial queries only support [Extent](https://developers.arcgis.com/javascript/latest/api-reference/esri-geometry-Extent.html) geometries with `spatialRelationship = 'intersects'`. **WebGL limitations** + * * Polyline, and Point geometries are not supported in the `geometry` query parameter. + * * SQL expressions cannot be used in `outFields` nor `onStatisticField` (in the `outStatistics` param). + * * The following Query parameters are currently not supported: + * * `orderByField` + * * `distance` and `units` * * [Read more...](https://developers.arcgis.com/javascript/latest/api-reference/esri-views-layers-CSVLayerView.html#queryFeatureCount) * - * @param params Specifies the attributes and spatial filter of the query. Only the [geometry](https://developers.arcgis.com/javascript/latest/api-reference/esri-tasks-support-Query.html#geometry), [objectIds](https://developers.arcgis.com/javascript/latest/api-reference/esri-tasks-support-Query.html#objectIds), and [spatialRelationship](https://developers.arcgis.com/javascript/latest/api-reference/esri-tasks-support-Query.html#spatialRelationship) properties should be specified. Adding any other properties will return an error. If specifying a spatialRelationship, note that `intersects` is the only supported operation. If query parameters are not provided, the count of all features available for drawing is returned. + * @param params Specifies the attributes and spatial filter of the query. When no parameters are passed to this method, all features in the client are returned. To only return features visible in the view, set the `geometry` parameter in the query object to the view's extent. * */ - queryFeatureCount(params?: Query): IPromise; + queryFeatureCount(params?: Query | QueryProperties): IPromise; /** - * Executes a [Query](https://developers.arcgis.com/javascript/latest/api-reference/esri-tasks-support-Query.html) against features available for drawing in the layer view and returns an array of [Graphic[]](https://developers.arcgis.com/javascript/latest/api-reference/esri-Graphic.html). If query parameters are not provided, all features available for drawing are returned. + * Executes a [Query](https://developers.arcgis.com/javascript/latest/api-reference/esri-tasks-support-Query.html) against features available for drawing in the layer view and returns an array of [Graphic[]](https://developers.arcgis.com/javascript/latest/api-reference/esri-Graphic.html). If query parameters are not provided, all features available for drawing are returned. + * > **Known Limitations** **3D [SceneView](https://developers.arcgis.com/javascript/latest/api-reference/esri-views-SceneView.html) limitations** Queries with `outStatistics` and any other parameter involving statistics are not supported. **SVG limitations (default)** Only the `geometry` , `objectIds`, and `spatialRelationship` properties are supported in the query object. Spatial queries only support [Extent](https://developers.arcgis.com/javascript/latest/api-reference/esri-geometry-Extent.html) geometries with `spatialRelationship = 'intersects'`. **WebGL limitations** + * * Polyline, and Point geometries are not supported in the `geometry` query parameter. + * * SQL expressions cannot be used in `outFields` nor `onStatisticField` (in the `outStatistics` param). + * * The following Query parameters are currently not supported: + * * `orderByField` + * * `distance` and `units` * * [Read more...](https://developers.arcgis.com/javascript/latest/api-reference/esri-views-layers-CSVLayerView.html#queryFeatures) * - * @param params Specifies the attributes and spatial filter of the query. Only the [geometry](https://developers.arcgis.com/javascript/latest/api-reference/esri-tasks-support-Query.html#geometry), [objectIds](https://developers.arcgis.com/javascript/latest/api-reference/esri-tasks-support-Query.html#objectIds), and [spatialRelationship](https://developers.arcgis.com/javascript/latest/api-reference/esri-tasks-support-Query.html#spatialRelationship) properties should be specified. Adding any other properties will return an error. If specifying a spatialRelationship, note that `intersects` is the only supported operation. If specifying a [geometry](https://developers.arcgis.com/javascript/latest/api-reference/esri-tasks-support-Query.html#geometry) parameter, note that [extent](https://developers.arcgis.com/javascript/latest/api-reference/esri-geometry-Extent.html) is the only supported geometry. If query parameters are not provided, all features available for drawing are returned. + * @param params Specifies the attributes and spatial filter of the query. When no parameters are passed to this method, all features in the client are returned. To only return features visible in the view, set the `geometry` parameter in the query object to the view's extent. * */ - queryFeatures(params?: Query): IPromise; + queryFeatures(params?: Query | QueryProperties): IPromise; /** - * Executes a [Query](https://developers.arcgis.com/javascript/latest/api-reference/esri-tasks-support-Query.html) against features available for drawing in the layer view and returns array of the ObjectIDs of features that satisfy the input query. If query parameters are not provided, the ObjectIDs of all features available for drawing are returned. + * Executes a [Query](https://developers.arcgis.com/javascript/latest/api-reference/esri-tasks-support-Query.html) against features available for drawing in the layer view and returns array of the ObjectIDs of features that satisfy the input query. If query parameters are not provided, the ObjectIDs of all features available for drawing are returned. + * > **Known Limitations** **3D [SceneView](https://developers.arcgis.com/javascript/latest/api-reference/esri-views-SceneView.html) limitations** Queries with `outStatistics` and any other parameter involving statistics are not supported. **SVG limitations (default)** Only the `geometry` , `objectIds`, and `spatialRelationship` properties are supported in the query object. Spatial queries only support [Extent](https://developers.arcgis.com/javascript/latest/api-reference/esri-geometry-Extent.html) geometries with `spatialRelationship = 'intersects'`. **WebGL limitations** + * * Polyline, and Point geometries are not supported in the `geometry` query parameter. + * * SQL expressions cannot be used in `outFields` nor `onStatisticField` (in the `outStatistics` param). + * * The following Query parameters are currently not supported: + * * `orderByField` + * * `distance` and `units` * * [Read more...](https://developers.arcgis.com/javascript/latest/api-reference/esri-views-layers-CSVLayerView.html#queryObjectIds) * - * @param params Specifies the attributes and spatial filter of the query. Only the [geometry](https://developers.arcgis.com/javascript/latest/api-reference/esri-tasks-support-Query.html#geometry), [objectIds](https://developers.arcgis.com/javascript/latest/api-reference/esri-tasks-support-Query.html#objectIds), and [spatialRelationship](https://developers.arcgis.com/javascript/latest/api-reference/esri-tasks-support-Query.html#spatialRelationship) properties should be specified. Adding any other properties will return an error. If specifying a spatialRelationship, note that `intersects` is the only supported operation. If query parameters are not provided, the ObjectIDs of all features available for drawing are returned. + * @param params Specifies the attributes and spatial filter of the query. When no parameters are passed to this method, all features in the client are returned. To only return features visible in the view, set the `geometry` parameter in the query object to the view's extent. * */ - queryObjectIds(params?: Query): IPromise; + queryObjectIds(params?: Query | QueryProperties): IPromise; } interface CSVLayerViewConstructor { @@ -36444,45 +39177,77 @@ declare namespace __esri { */ highlight(target?: Graphic | Graphic[] | number | number[]): any; /** - * Executes a [Query](https://developers.arcgis.com/javascript/latest/api-reference/esri-tasks-support-Query.html) against features available for drawing in the layer view and returns the [Extent](https://developers.arcgis.com/javascript/latest/api-reference/esri-geometry-Extent.html) of features that satisfy the query. Valid only for [hosted feature services](http://doc.arcgis.com/en/arcgis-online/share-maps/hosted-web-layers.htm) on [arcgis.com](http://arcgis.com) and for ArcGIS Server 10.3.1 and later. If query parameters are not provided, the extent and count of all features available for drawing are returned. - * > To query for the extent of features directly from a Feature Service rather than those visible in the view, you must use the [FeatureLayer.queryExtent()](https://developers.arcgis.com/javascript/latest/api-reference/esri-layers-FeatureLayer.html#queryExtent) method. + * Executes a [Query](https://developers.arcgis.com/javascript/latest/api-reference/esri-tasks-support-Query.html) against features available for drawing in the layer view and returns the [Extent](https://developers.arcgis.com/javascript/latest/api-reference/esri-geometry-Extent.html) of features that satisfy the query. Valid only for [hosted feature services](http://doc.arcgis.com/en/arcgis-online/share-maps/hosted-web-layers.htm) on [arcgis.com](http://arcgis.com) and for ArcGIS Server 10.3.1 and later. If query parameters are not provided, the extent and count of all features available for drawing are returned. To query for the extent of features directly from a Feature Service rather than those visible in the view, you must use the [FeatureLayer.queryExtent()](https://developers.arcgis.com/javascript/latest/api-reference/esri-layers-FeatureLayer.html#queryExtent) method. + * > **Known Limitations** **3D [SceneView](https://developers.arcgis.com/javascript/latest/api-reference/esri-views-SceneView.html) limitations** Queries with `outStatistics` and any other parameter involving statistics are not supported. **SVG limitations (default)** Only the `geometry` , `objectIds`, and `spatialRelationship` properties are supported in the query object. Spatial queries only support [Extent](https://developers.arcgis.com/javascript/latest/api-reference/esri-geometry-Extent.html) geometries with `spatialRelationship = 'intersects'`. **WebGL limitations** + * * For spatial queries: + * * [Extent](https://developers.arcgis.com/javascript/latest/api-reference/esri-geometry-Extent.html) geometries with `spatialRelationship = 'intersects'` can be used to query against layers of any geometry type. + * * [Polygon](https://developers.arcgis.com/javascript/latest/api-reference/esri-geometry-Polygon.html) geometries with `spatialRelationship = 'intersects'` can only be used to query against point layers. + * * Polyline, and Point geometries are not supported. + * * SQL expressions cannot be used in `outFields` nor `onStatisticField` (in the `outStatistics` param) + * * The following Query parameters are currently not supported: + * * `orderByField` + * * `distance` and `units` * * [Read more...](https://developers.arcgis.com/javascript/latest/api-reference/esri-views-layers-FeatureLayerView.html#queryExtent) * - * @param params Specifies the attributes and spatial filter of the query. Only the [geometry](https://developers.arcgis.com/javascript/latest/api-reference/esri-tasks-support-Query.html#geometry), [objectIds](https://developers.arcgis.com/javascript/latest/api-reference/esri-tasks-support-Query.html#objectIds), and [spatialRelationship](https://developers.arcgis.com/javascript/latest/api-reference/esri-tasks-support-Query.html#spatialRelationship) properties should be specified. Adding any other properties will return an error. If specifying a spatialRelationship, note that `intersects` is the only supported operation. If query parameters are not provided, the extent and count of all features available for drawing are returned. + * @param params Specifies the attributes and spatial filter of the query. When no parameters are passed to this method, all features in the client are returned. To only return features visible in the view, set the `geometry` parameter in the query object to the view's extent. * */ - queryExtent(params?: Query): IPromise; + queryExtent(params?: Query | QueryProperties): IPromise; /** - * Executes a [Query](https://developers.arcgis.com/javascript/latest/api-reference/esri-tasks-support-Query.html) against features available for drawing in the layer view and returns the number of features that satisfy the query. If query parameters are not provided, the count of all features available for drawing is returned. - * > To query for the count of features directly from a Feature Service rather than those visible in the view, you must use the [FeatureLayer.queryFeatureCount()](https://developers.arcgis.com/javascript/latest/api-reference/esri-layers-FeatureLayer.html#queryFeatureCount) method. + * Executes a [Query](https://developers.arcgis.com/javascript/latest/api-reference/esri-tasks-support-Query.html) against features available for drawing in the layer view and returns the number of features that satisfy the query. If query parameters are not provided, the count of all features available for drawing is returned. To query for the count of features directly from a Feature Service rather than those visible in the view, you must use the [FeatureLayer.queryFeatureCount()](https://developers.arcgis.com/javascript/latest/api-reference/esri-layers-FeatureLayer.html#queryFeatureCount) method. + * > **Known Limitations** **3D [SceneView](https://developers.arcgis.com/javascript/latest/api-reference/esri-views-SceneView.html) limitations** Queries with `outStatistics` and any other parameter involving statistics are not supported. **SVG limitations (default)** Only the `geometry` , `objectIds`, and `spatialRelationship` properties are supported in the query object. Spatial queries only support [Extent](https://developers.arcgis.com/javascript/latest/api-reference/esri-geometry-Extent.html) geometries with `spatialRelationship = 'intersects'`. **WebGL limitations** + * * For spatial queries: + * * [Extent](https://developers.arcgis.com/javascript/latest/api-reference/esri-geometry-Extent.html) geometries with `spatialRelationship = 'intersects'` can be used to query against layers of any geometry type. + * * [Polygon](https://developers.arcgis.com/javascript/latest/api-reference/esri-geometry-Polygon.html) geometries with `spatialRelationship = 'intersects'` can only be used to query against point layers. + * * Polyline, and Point geometries are not supported. + * * SQL expressions cannot be used in `outFields` nor `onStatisticField` (in the `outStatistics` param) + * * The following Query parameters are currently not supported: + * * `orderByField` + * * `distance` and `units` * * [Read more...](https://developers.arcgis.com/javascript/latest/api-reference/esri-views-layers-FeatureLayerView.html#queryFeatureCount) * - * @param params Specifies the attributes and spatial filter of the query. Only the [geometry](https://developers.arcgis.com/javascript/latest/api-reference/esri-tasks-support-Query.html#geometry), [objectIds](https://developers.arcgis.com/javascript/latest/api-reference/esri-tasks-support-Query.html#objectIds), and [spatialRelationship](https://developers.arcgis.com/javascript/latest/api-reference/esri-tasks-support-Query.html#spatialRelationship) properties should be specified. Adding any other properties will return an error. If specifying a spatialRelationship, note that `intersects` is the only supported operation. If query parameters are not provided, the count of all features available for drawing is returned. + * @param params Specifies the attributes and spatial filter of the query. When no parameters are passed to this method, all features in the client are returned. To only return features visible in the view, set the `geometry` parameter in the query object to the view's extent. * */ - queryFeatureCount(params?: Query): IPromise; + queryFeatureCount(params?: Query | QueryProperties): IPromise; /** - * Executes a [Query](https://developers.arcgis.com/javascript/latest/api-reference/esri-tasks-support-Query.html) against features available for drawing in the layer view and returns an array of [Graphic[]](https://developers.arcgis.com/javascript/latest/api-reference/esri-Graphic.html). If query parameters are not provided, all features available for drawing are returned. - * > To execute a query against all the features in a Feature Service rather than only those visible in the view, you must use the [FeatureLayer.queryFeatures()](https://developers.arcgis.com/javascript/latest/api-reference/esri-layers-FeatureLayer.html#queryFeatures) method. + * Executes a [Query](https://developers.arcgis.com/javascript/latest/api-reference/esri-tasks-support-Query.html) against features available for drawing in the layer view and returns an array of [Graphic[]](https://developers.arcgis.com/javascript/latest/api-reference/esri-Graphic.html). If query parameters are not provided, all features available for drawing are returned. To execute a query against all the features in a Feature Service rather than only those in the client, you must use the [FeatureLayer.queryFeatures()](https://developers.arcgis.com/javascript/latest/api-reference/esri-layers-FeatureLayer.html#queryFeatures) method. + * > **Known Limitations** **3D [SceneView](https://developers.arcgis.com/javascript/latest/api-reference/esri-views-SceneView.html) limitations** Queries with `outStatistics` and any other parameter involving statistics are not supported. **SVG limitations (default)** Only the `geometry` , `objectIds`, and `spatialRelationship` properties are supported in the query object. Spatial queries only support [Extent](https://developers.arcgis.com/javascript/latest/api-reference/esri-geometry-Extent.html) geometries with `spatialRelationship = 'intersects'`. **WebGL limitations** + * * For spatial queries: + * * [Extent](https://developers.arcgis.com/javascript/latest/api-reference/esri-geometry-Extent.html) geometries with `spatialRelationship = 'intersects'` can be used to query against layers of any geometry type. + * * [Polygon](https://developers.arcgis.com/javascript/latest/api-reference/esri-geometry-Polygon.html) geometries with `spatialRelationship = 'intersects'` can only be used to query against point layers. + * * Polyline, and Point geometries are not supported. + * * SQL expressions cannot be used in `outFields` nor `onStatisticField` (in the `outStatistics` param). + * * The following Query parameters are currently not supported: + * * `orderByField` + * * `distance` and `units` * * [Read more...](https://developers.arcgis.com/javascript/latest/api-reference/esri-views-layers-FeatureLayerView.html#queryFeatures) * - * @param params Specifies the attributes and spatial filter of the query. Only the [geometry](https://developers.arcgis.com/javascript/latest/api-reference/esri-tasks-support-Query.html#geometry), [objectIds](https://developers.arcgis.com/javascript/latest/api-reference/esri-tasks-support-Query.html#objectIds), and [spatialRelationship](https://developers.arcgis.com/javascript/latest/api-reference/esri-tasks-support-Query.html#spatialRelationship) properties should be specified. Adding any other properties will return an error. If specifying a spatialRelationship, note that `intersects` is the only supported operation. If specifying a [geometry](https://developers.arcgis.com/javascript/latest/api-reference/esri-tasks-support-Query.html#geometry) parameter, note that [extent](https://developers.arcgis.com/javascript/latest/api-reference/esri-geometry-Extent.html) is the only supported geometry. If query parameters are not provided, all features available for drawing are returned. + * @param params Specifies the attributes and spatial filter of the query. When no parameters are passed to this method, all features in the client are returned. To only return features visible in the view, set the `geometry` parameter in the query object to the view's extent. * */ - queryFeatures(params?: Query): IPromise; + queryFeatures(params?: Query | QueryProperties): IPromise; /** - * Executes a [Query](https://developers.arcgis.com/javascript/latest/api-reference/esri-tasks-support-Query.html) against features available for drawing in the layer view and returns array of the ObjectIDs of features that satisfy the input query. If query parameters are not provided, the ObjectIDs of all features available for drawing are returned. - * > To query for ObjectIDs of features directly from a Feature Service rather than those visible in the view, you must use the [FeatureLayer.queryObjectIds()](https://developers.arcgis.com/javascript/latest/api-reference/esri-layers-FeatureLayer.html#queryObjectIds) method. + * Executes a [Query](https://developers.arcgis.com/javascript/latest/api-reference/esri-tasks-support-Query.html) against features available for drawing in the layer view and returns array of the ObjectIDs of features that satisfy the input query. If query parameters are not provided, the ObjectIDs of all features available for drawing are returned. To query for ObjectIDs of features directly from a Feature Service rather than those visible in the view, you must use the [FeatureLayer.queryObjectIds()](https://developers.arcgis.com/javascript/latest/api-reference/esri-layers-FeatureLayer.html#queryObjectIds) method. + * > **Known Limitations** **3D [SceneView](https://developers.arcgis.com/javascript/latest/api-reference/esri-views-SceneView.html) limitations** Queries with `outStatistics` and any other parameter involving statistics are not supported. **SVG limitations (default)** Only the `geometry` , `objectIds`, and `spatialRelationship` properties are supported in the query object. Spatial queries only support [Extent](https://developers.arcgis.com/javascript/latest/api-reference/esri-geometry-Extent.html) geometries with `spatialRelationship = 'intersects'`. **WebGL limitations** + * * For spatial queries: + * * [Extent](https://developers.arcgis.com/javascript/latest/api-reference/esri-geometry-Extent.html) geometries with `spatialRelationship = 'intersects'` can be used to query against layers of any geometry type. + * * [Polygon](https://developers.arcgis.com/javascript/latest/api-reference/esri-geometry-Polygon.html) geometries with `spatialRelationship = 'intersects'` can only be used to query against point layers. + * * Polyline, and Point geometries are not supported. + * * SQL expressions cannot be used in `outFields` nor `onStatisticField` (in the `outStatistics` param). + * * The following Query parameters are currently not supported: + * * `orderByField` + * * `distance` and `units` * * [Read more...](https://developers.arcgis.com/javascript/latest/api-reference/esri-views-layers-FeatureLayerView.html#queryObjectIds) * - * @param params Specifies the attributes and spatial filter of the query. Only the [geometry](https://developers.arcgis.com/javascript/latest/api-reference/esri-tasks-support-Query.html#geometry), [objectIds](https://developers.arcgis.com/javascript/latest/api-reference/esri-tasks-support-Query.html#objectIds), and [spatialRelationship](https://developers.arcgis.com/javascript/latest/api-reference/esri-tasks-support-Query.html#spatialRelationship) properties should be specified. Adding any other properties will return an error. If specifying a spatialRelationship, note that `intersects` is the only supported operation. If query parameters are not provided, the ObjectIDs of all features available for drawing are returned. + * @param params Specifies the attributes and spatial filter of the query. When no parameters are passed to this method, all features in the client are returned. To only return features visible in the view, set the `geometry` parameter in the query object to the view's extent. * */ - queryObjectIds(params?: Query): IPromise; + queryObjectIds(params?: Query | QueryProperties): IPromise; } interface FeatureLayerViewConstructor { @@ -36721,7 +39486,7 @@ declare namespace __esri { * * [Read more...](https://developers.arcgis.com/javascript/latest/api-reference/esri-views-layers-SceneLayerView.html#queryExtent) * - * @param params Specifies the attributes of the query. Only the [objectIds](https://developers.arcgis.com/javascript/latest/api-reference/esri-tasks-support-Query.html#objectIds) property should be specified. Adding any other properties will return an error. If query parameters are not provided, the extent and count of all loaded features are returned. + * @param params Specifies the attributes of the query. Only the[objectIds](https://developers.arcgis.com/javascript/latest/api-reference/esri-tasks-support-Query.html#objectIds), [num](https://developers.arcgis.com/javascript/latest/api-reference/esri-tasks-support-Query.html#num) and [start](https://developers.arcgis.com/javascript/latest/api-reference/esri-tasks-support-Query.html#start) properties should be specified. Adding any other properties will return an error. If query parameters are not provided, all loaded features are returned. * */ queryExtent(params?: Query): IPromise; @@ -36731,17 +39496,17 @@ declare namespace __esri { * * [Read more...](https://developers.arcgis.com/javascript/latest/api-reference/esri-views-layers-SceneLayerView.html#queryFeatureCount) * - * @param params Specifies the attributes of the query. Only the [objectIds](https://developers.arcgis.com/javascript/latest/api-reference/esri-tasks-support-Query.html#objectIds) property should be specified. Adding any other properties will return an error. If query parameters are not provided, the count of all loaded features is returned. + * @param params Specifies the attributes of the query. Only the[objectIds](https://developers.arcgis.com/javascript/latest/api-reference/esri-tasks-support-Query.html#objectIds), [num](https://developers.arcgis.com/javascript/latest/api-reference/esri-tasks-support-Query.html#num) and [start](https://developers.arcgis.com/javascript/latest/api-reference/esri-tasks-support-Query.html#start) properties should be specified. Adding any other properties will return an error. If query parameters are not provided, all loaded features are returned. * */ queryFeatureCount(params?: Query): IPromise; /** - * Executes a [Query](https://developers.arcgis.com/javascript/latest/api-reference/esri-tasks-support-Query.html) against features in the layer view and returns a [FeatureSet](https://developers.arcgis.com/javascript/latest/api-reference/esri-tasks-support-FeatureSet.html). If query parameters are not provided, all loaded features are returned. This method is not yet supported when the associated scene layer has a [geometryType](https://developers.arcgis.com/javascript/latest/api-reference/esri-layers-SceneLayer.html#geometryType) of `point`. Read more about queries in the Query section of the [SceneLayer](https://developers.arcgis.com/javascript/latest/api-reference/esri-layers-SceneLayer.html) class description. + * Executes a [Query](https://developers.arcgis.com/javascript/latest/api-reference/esri-tasks-support-Query.html) against features in the layer view and returns a [FeatureSet](https://developers.arcgis.com/javascript/latest/api-reference/esri-tasks-support-FeatureSet.html). If query parameters are not provided, all loaded features are returned. This method is not yet supported when the associated scene layer has a [geometryType](https://developers.arcgis.com/javascript/latest/api-reference/esri-layers-SceneLayer.html#geometryType) of `point`. Read more about queries in the Query section of the [SceneLayer](https://developers.arcgis.com/javascript/latest/api-reference/esri-layers-SceneLayer.html) class description. Querying more than 10.000 features returns an error, unless num is specified in the Query. * > To execute a query against all the features in a Scene Service rather than only those loaded for the current view, you must use the [SceneLayer.queryFeatures()](https://developers.arcgis.com/javascript/latest/api-reference/esri-layers-SceneLayer.html#queryFeatures) method. * * [Read more...](https://developers.arcgis.com/javascript/latest/api-reference/esri-views-layers-SceneLayerView.html#queryFeatures) * - * @param params Specifies the attributes of the query. Only the [outFields](https://developers.arcgis.com/javascript/latest/api-reference/esri-tasks-support-Query.html#outFields) and [objectIds](https://developers.arcgis.com/javascript/latest/api-reference/esri-tasks-support-Query.html#objectIds) properties should be specified. Adding any other properties will return an error. If query parameters are not provided, all loaded features are returned. + * @param params Specifies the attributes of the query. Only the [outFields](https://developers.arcgis.com/javascript/latest/api-reference/esri-tasks-support-Query.html#outFields), [objectIds](https://developers.arcgis.com/javascript/latest/api-reference/esri-tasks-support-Query.html#objectIds), [num](https://developers.arcgis.com/javascript/latest/api-reference/esri-tasks-support-Query.html#num) and [start](https://developers.arcgis.com/javascript/latest/api-reference/esri-tasks-support-Query.html#start) properties should be specified. Adding any other properties will return an error. If query parameters are not provided, all loaded features are returned. * */ queryFeatures(params?: Query): IPromise; @@ -36751,7 +39516,7 @@ declare namespace __esri { * * [Read more...](https://developers.arcgis.com/javascript/latest/api-reference/esri-views-layers-SceneLayerView.html#queryObjectIds) * - * @param params Specifies the attributes of the query. Only the [objectIds](https://developers.arcgis.com/javascript/latest/api-reference/esri-tasks-support-Query.html#objectIds) property should be specified. Adding any other properties will return an error. If query parameters are not provided, the ObjectIDs of all loaded features are returned. + * @param params Specifies the attributes of the query. Only the[objectIds](https://developers.arcgis.com/javascript/latest/api-reference/esri-tasks-support-Query.html#objectIds), [num](https://developers.arcgis.com/javascript/latest/api-reference/esri-tasks-support-Query.html#num) and [start](https://developers.arcgis.com/javascript/latest/api-reference/esri-tasks-support-Query.html#start) properties should be specified. Adding any other properties will return an error. If query parameters are not provided, all loaded features are returned. * */ queryObjectIds(params?: Query): IPromise; @@ -36829,8 +39594,6 @@ declare namespace __esri { on(name: "data-received", eventHandler: StreamLayerViewDataReceivedEventHandler): IHandle; - - on(name: "data-received", modifiers: string[], eventHandler: StreamLayerViewDataReceivedEventHandler): IHandle; } interface StreamLayerViewConstructor { @@ -36912,7 +39675,7 @@ declare namespace __esri { extent: Extent; /** * Options for configuring the highlight. Use the highlight method on the appropriate [LayerView](https://developers.arcgis.com/javascript/latest/api-reference/esri-views-layers-LayerView.html) to highlight a feature. - * > **Known Limitations** Only [FeatureLayers](https://developers.arcgis.com/javascript/latest/api-reference/esri-layers-FeatureLayer.html) renderered with [WebGL](esri-layers-FeatureLayer.html#webgl-rendering) support highlight. See [FeatureLayerView.highlight()](https://developers.arcgis.com/javascript/latest/api-reference/esri-views-layers-FeatureLayerView.html#highlight) for details of how to highlight features. + * > **Known Limitations** Only [FeatureLayers](https://developers.arcgis.com/javascript/latest/api-reference/esri-layers-FeatureLayer.html) rendered with [WebGL](esri-layers-FeatureLayer.html#webgl-rendering) support highlight. See [FeatureLayerView.highlight()](https://developers.arcgis.com/javascript/latest/api-reference/esri-views-layers-FeatureLayerView.html#highlight) for details of how to highlight features. * * [Read more...](https://developers.arcgis.com/javascript/latest/api-reference/esri-views-MapView.html#highlightOptions) */ @@ -36990,10 +39753,9 @@ declare namespace __esri { * * [Read more...](https://developers.arcgis.com/javascript/latest/api-reference/esri-views-MapView.html#hasEventListener) * - * @param type The name of the event. * */ - hasEventListener(type: string): boolean; + hasEventListener(): void; /** * Returns the topmost feature from each layer that intersects the specified screen coordinates. The following layer types will return a result if a hit is made on an intersecting feature: [GraphicsLayer](https://developers.arcgis.com/javascript/latest/api-reference/esri-layers-GraphicsLayer.html), [FeatureLayer](https://developers.arcgis.com/javascript/latest/api-reference/esri-layers-FeatureLayer.html), [CSVLayer](https://developers.arcgis.com/javascript/latest/api-reference/esri-layers-CSVLayer.html), [GeoRSSLayer](https://developers.arcgis.com/javascript/latest/api-reference/esri-layers-GeoRSSLayer.html), [KMLLayer](https://developers.arcgis.com/javascript/latest/api-reference/esri-layers-KMLLayer.html), and [StreamLayer](https://developers.arcgis.com/javascript/latest/api-reference/esri-layers-StreamLayer.html). At 4.6 and later, a hit test will always return a result from [VectorTileLayer](https://developers.arcgis.com/javascript/latest/api-reference/esri-layers-VectorTileLayer.html). However, the result will only indicate the ID and the name of the layer within the [vector tile style](https://doc.arcgis.com/en/arcgis-online/reference/tile-layers.htm#ESRI_SECTION1_8F68399EB47B48FF9EF46719FCC96978) that intersects the screen point. Detailed attribute and spatial information about the actual feature represented in the layer is not returned. HitTest results returned from VectorTileLayers are primarily used for [Vector tile style editor applications](https://maps.esri.com/jg/VectorBasemapStyleEditor/index.html). * @@ -37059,6 +39821,10 @@ declare namespace __esri { on(name: "double-click", modifiers: string[], eventHandler: MapViewDoubleClickEventHandler): IHandle; + on(name: "immediate-click", eventHandler: MapViewImmediateClickEventHandler): IHandle; + + on(name: "immediate-click", modifiers: string[], eventHandler: MapViewImmediateClickEventHandler): IHandle; + on(name: "hold", eventHandler: MapViewHoldEventHandler): IHandle; on(name: "hold", modifiers: string[], eventHandler: MapViewHoldEventHandler): IHandle; @@ -37098,6 +39864,14 @@ declare namespace __esri { on(name: "pointer-leave", eventHandler: MapViewPointerLeaveEventHandler): IHandle; on(name: "pointer-leave", modifiers: string[], eventHandler: MapViewPointerLeaveEventHandler): IHandle; + + on(name: "focus", eventHandler: MapViewFocusEventHandler): IHandle; + + on(name: "focus", modifiers: string[], eventHandler: MapViewFocusEventHandler): IHandle; + + on(name: "blur", eventHandler: MapViewBlurEventHandler): IHandle; + + on(name: "blur", modifiers: string[], eventHandler: MapViewBlurEventHandler): IHandle; } interface MapViewConstructor { @@ -37135,7 +39909,7 @@ declare namespace __esri { extent?: ExtentProperties; /** * Options for configuring the highlight. Use the highlight method on the appropriate [LayerView](https://developers.arcgis.com/javascript/latest/api-reference/esri-views-layers-LayerView.html) to highlight a feature. - * > **Known Limitations** Only [FeatureLayers](https://developers.arcgis.com/javascript/latest/api-reference/esri-layers-FeatureLayer.html) renderered with [WebGL](esri-layers-FeatureLayer.html#webgl-rendering) support highlight. See [FeatureLayerView.highlight()](https://developers.arcgis.com/javascript/latest/api-reference/esri-views-layers-FeatureLayerView.html#highlight) for details of how to highlight features. + * > **Known Limitations** Only [FeatureLayers](https://developers.arcgis.com/javascript/latest/api-reference/esri-layers-FeatureLayer.html) rendered with [WebGL](esri-layers-FeatureLayer.html#webgl-rendering) support highlight. See [FeatureLayerView.highlight()](https://developers.arcgis.com/javascript/latest/api-reference/esri-views-layers-FeatureLayerView.html#highlight) for details of how to highlight features. * * [Read more...](https://developers.arcgis.com/javascript/latest/api-reference/esri-views-MapView.html#highlightOptions) */ @@ -37176,10 +39950,19 @@ declare namespace __esri { zoom?: number; } + export interface MapViewBlurEvent { + + native: any; + + target: View; + } + export interface MapViewClickEvent { button: number; + buttons: number; + mapPoint: Point; native: any; @@ -37199,6 +39982,8 @@ declare namespace __esri { button: number; + buttons: number; + mapPoint: Point; native: any; @@ -37218,10 +40003,18 @@ declare namespace __esri { action: string; + angle: number; + + button: number; + + buttons: number; + native: any; origin: MapViewDragEventOrigin; + radius: number; + stopPropagation: Function; timestamp: number; @@ -37233,6 +40026,13 @@ declare namespace __esri { y: number; } + export interface MapViewFocusEvent { + + native: any; + + target: View; + } + /** * Object specification for the result of the [hitTest()](https://developers.arcgis.com/javascript/latest/api-reference/esri-views-MapView.html#hitTest) method. * @@ -37251,6 +40051,29 @@ declare namespace __esri { button: number; + buttons: number; + + mapPoint: Point; + + native: any; + + stopPropagation: Function; + + timestamp: number; + + type: string; + + x: number; + + y: number; + } + + export interface MapViewImmediateClickEvent { + + button: number; + + buttons: number; + mapPoint: Point; native: any; @@ -37546,6 +40369,10 @@ declare namespace __esri { export interface MapViewPointerDownEvent { + button: number; + + buttons: number; + native: any; pointerId: number; @@ -37565,6 +40392,10 @@ declare namespace __esri { export interface MapViewPointerEnterEvent { + button: number; + + buttons: number; + native: any; pointerId: number; @@ -37584,6 +40415,10 @@ declare namespace __esri { export interface MapViewPointerLeaveEvent { + button: number; + + buttons: number; + native: any; pointerId: number; @@ -37603,6 +40438,10 @@ declare namespace __esri { export interface MapViewPointerMoveEvent { + button: number; + + buttons: number; + native: any; pointerId: number; @@ -37622,6 +40461,10 @@ declare namespace __esri { export interface MapViewPointerUpEvent { + button: number; + + buttons: number; + native: any; pointerId: number; @@ -37661,7 +40504,7 @@ declare namespace __esri { export interface HitTestResultResults extends Object { /** - * A graphic representing a feature in the view that intersects the input screen coordinates. If the graphic comes from a layer with an applied [Renderer](https://developers.arcgis.com/javascript/latest/api-reference/esri-renderers-Renderer.html), then the [symbol](https://developers.arcgis.com/javascript/latest/api-reference/esri-Graphic.html#symbol) property will be empty. Other properties may be empty based on the context in which the graphic is fetched. If the result comes from a [VectorTileLayer](https://developers.arcgis.com/javascript/latest/api-reference/esri-layers-VectorTileLayer.html) then a static graphic is returned with two `attributes`: `layerId` and `layerName`. These correspond to the name and id of the style-layer in the [vector tile style](http://resources.arcgis.com/en/help/arcgis-rest-api/index.html#/Vector_Tile_Style/02r3000002nv000000/). + * A graphic representing a feature in the view that intersects the input screen coordinates. If the graphic comes from a layer with an applied [Renderer](https://developers.arcgis.com/javascript/latest/api-reference/esri-renderers-Renderer.html), then the [symbol](https://developers.arcgis.com/javascript/latest/api-reference/esri-Graphic.html#symbol) property will be empty. Other properties may be empty based on the context in which the graphic is fetched. If the result comes from a [VectorTileLayer](https://developers.arcgis.com/javascript/latest/api-reference/esri-layers-VectorTileLayer.html) then a static graphic is returned with two `attributes`: `layerId` and `layerName`. These correspond to the name and id of the style-layer in the [vector tile style](https://developers.arcgis.com/rest/services-reference/vector-tile-style.htm). * * [Read more...](https://developers.arcgis.com/javascript/latest/api-reference/esri-views-MapView.html#HitTestResult) */ @@ -37704,7 +40547,7 @@ declare namespace __esri { /** * Specifies various properties of the environment's visualization in the view. The SceneView will redraw automatically when any property of environment changes. * ```js - * var view = new SceneView({ + * const view = new SceneView({ * map: map, * container: "viewDiv" * }); @@ -37735,15 +40578,15 @@ declare namespace __esri { */ highlightOptions: SceneViewHighlightOptions; /** - * SceneView can draw scenes in two different quality modes: `high` and `low`. Using the `low` quality profile significantly increases performance on slower browsers and devices by reducing the visual quality in the following aspects: + * SceneView can draw scenes in three different quality modes: `high`, `medium` and `low`. The `low` quality profile significantly increases performance on slower browsers and devices by reducing the memory limit and the visual quality in the following aspects: * * Map resolution * * Scene layer detail level * * Anti-aliasing (edge smoothing) * * - * The default value is based on the detected browser: - * * `low` for Internet Explorer 11 and Safari - * * `high` for any other browser + * The high and medium quality profiles only differ in the maximum amount of memory which the view is allowed to use. A higher memory limit improves quality in complex web scenes with many layers, but can have a negative impact on drawing performance and stability. The default value is based on the detected browser: + * * `low` for Internet Explorer 11 and certain mobile devices + * * `medium` for any other browser * * * Overriding the default value is best done in the constructor (see example below). If the value is modified after construction, only a subset of the quality aspects are affected. @@ -37829,10 +40672,9 @@ declare namespace __esri { * * [Read more...](https://developers.arcgis.com/javascript/latest/api-reference/esri-views-SceneView.html#hasEventListener) * - * @param type The name of the event. * */ - hasEventListener(type: string): boolean; + hasEventListener(): void; /** * Returns the topmost feature from each layer that intersects the specified screen coordinates. The following layer types will return a result if a hit is made on an intersecting feature: [GraphicsLayer](https://developers.arcgis.com/javascript/latest/api-reference/esri-layers-GraphicsLayer.html), [FeatureLayer](https://developers.arcgis.com/javascript/latest/api-reference/esri-layers-FeatureLayer.html), [CSVLayer](https://developers.arcgis.com/javascript/latest/api-reference/esri-layers-CSVLayer.html), [GeoRSSLayer](https://developers.arcgis.com/javascript/latest/api-reference/esri-layers-GeoRSSLayer.html), [KMLLayer](https://developers.arcgis.com/javascript/latest/api-reference/esri-layers-KMLLayer.html), and [StreamLayer](https://developers.arcgis.com/javascript/latest/api-reference/esri-layers-StreamLayer.html). Draped graphics (i.e. graphics in layers where the [elevation mode](https://developers.arcgis.com/javascript/latest/api-reference/esri-layers-FeatureLayer.html#elevationInfo) is `on-the-ground`) are currently **not** returned from this method, even when they intersect the input screen point. When the ground surface is hit, but no graphic is found, then the result of hitTest will be a single object with its mapPoint set to the point on the surface that was hit, but its graphic will be set to `null`. * @@ -37899,6 +40741,10 @@ declare namespace __esri { on(name: "double-click", modifiers: string[], eventHandler: SceneViewDoubleClickEventHandler): IHandle; + on(name: "immediate-click", eventHandler: SceneViewImmediateClickEventHandler): IHandle; + + on(name: "immediate-click", modifiers: string[], eventHandler: SceneViewImmediateClickEventHandler): IHandle; + on(name: "hold", eventHandler: SceneViewHoldEventHandler): IHandle; on(name: "hold", modifiers: string[], eventHandler: SceneViewHoldEventHandler): IHandle; @@ -37938,6 +40784,14 @@ declare namespace __esri { on(name: "pointer-leave", eventHandler: SceneViewPointerLeaveEventHandler): IHandle; on(name: "pointer-leave", modifiers: string[], eventHandler: SceneViewPointerLeaveEventHandler): IHandle; + + on(name: "focus", eventHandler: SceneViewFocusEventHandler): IHandle; + + on(name: "focus", modifiers: string[], eventHandler: SceneViewFocusEventHandler): IHandle; + + on(name: "blur", eventHandler: SceneViewBlurEventHandler): IHandle; + + on(name: "blur", modifiers: string[], eventHandler: SceneViewBlurEventHandler): IHandle; } interface SceneViewConstructor { @@ -37982,7 +40836,7 @@ declare namespace __esri { /** * Specifies various properties of the environment's visualization in the view. The SceneView will redraw automatically when any property of environment changes. * ```js - * var view = new SceneView({ + * const view = new SceneView({ * map: map, * container: "viewDiv" * }); @@ -38013,15 +40867,15 @@ declare namespace __esri { */ highlightOptions?: SceneViewHighlightOptionsProperties; /** - * SceneView can draw scenes in two different quality modes: `high` and `low`. Using the `low` quality profile significantly increases performance on slower browsers and devices by reducing the visual quality in the following aspects: + * SceneView can draw scenes in three different quality modes: `high`, `medium` and `low`. The `low` quality profile significantly increases performance on slower browsers and devices by reducing the memory limit and the visual quality in the following aspects: * * Map resolution * * Scene layer detail level * * Anti-aliasing (edge smoothing) * * - * The default value is based on the detected browser: - * * `low` for Internet Explorer 11 and Safari - * * `high` for any other browser + * The high and medium quality profiles only differ in the maximum amount of memory which the view is allowed to use. A higher memory limit improves quality in complex web scenes with many layers, but can have a negative impact on drawing performance and stability. The default value is based on the detected browser: + * * `low` for Internet Explorer 11 and certain mobile devices + * * `medium` for any other browser * * * Overriding the default value is best done in the constructor (see example below). If the value is modified after construction, only a subset of the quality aspects are affected. @@ -38064,10 +40918,19 @@ declare namespace __esri { zoom?: number; } + export interface SceneViewBlurEvent { + + native: any; + + target: View; + } + export interface SceneViewClickEvent { button: number; + buttons: number; + mapPoint: Point; native: any; @@ -38087,6 +40950,8 @@ declare namespace __esri { button: number; + buttons: number; + mapPoint: Point; native: any; @@ -38106,10 +40971,18 @@ declare namespace __esri { action: string; + angle: number; + + button: number; + + buttons: number; + native: any; origin: SceneViewDragEventOrigin; + radius: number; + stopPropagation: Function; timestamp: number; @@ -38123,6 +40996,13 @@ declare namespace __esri { export type EasingFunction = (t: number, duration: number) => number; + export interface SceneViewFocusEvent { + + native: any; + + target: View; + } + /** * Object specification for the result of the [hitTest()](https://developers.arcgis.com/javascript/latest/api-reference/esri-views-SceneView.html#hitTest) method. * @@ -38141,6 +41021,29 @@ declare namespace __esri { button: number; + buttons: number; + + mapPoint: Point; + + native: any; + + stopPropagation: Function; + + timestamp: number; + + type: string; + + x: number; + + y: number; + } + + export interface SceneViewImmediateClickEvent { + + button: number; + + buttons: number; + mapPoint: Point; native: any; @@ -38215,6 +41118,10 @@ declare namespace __esri { export interface SceneViewPointerDownEvent { + button: number; + + buttons: number; + native: any; pointerId: number; @@ -38234,6 +41141,10 @@ declare namespace __esri { export interface SceneViewPointerEnterEvent { + button: number; + + buttons: number; + native: any; pointerId: number; @@ -38253,6 +41164,10 @@ declare namespace __esri { export interface SceneViewPointerLeaveEvent { + button: number; + + buttons: number; + native: any; pointerId: number; @@ -38272,6 +41187,10 @@ declare namespace __esri { export interface SceneViewPointerMoveEvent { + button: number; + + buttons: number; + native: any; pointerId: number; @@ -38291,6 +41210,10 @@ declare namespace __esri { export interface SceneViewPointerUpEvent { + button: number; + + buttons: number; + native: any; pointerId: number; @@ -38903,7 +41826,7 @@ declare namespace __esri { interface UI extends Accessor { /** - * The HTML Element that contains the the view. + * The HTML Element that contains the view. * * [Read more...](https://developers.arcgis.com/javascript/latest/api-reference/esri-views-ui-UI.html#container) */ @@ -38996,7 +41919,7 @@ declare namespace __esri { interface UIProperties { /** - * The HTML Element that contains the the view. + * The HTML Element that contains the view. * * [Read more...](https://developers.arcgis.com/javascript/latest/api-reference/esri-views-ui-UI.html#container) */ @@ -39090,6 +42013,12 @@ declare namespace __esri { * [Read more...](https://developers.arcgis.com/javascript/latest/api-reference/esri-views-View.html#graphics) */ graphics: Collection; + /** + * The view for the ground of the map. + * + * [Read more...](https://developers.arcgis.com/javascript/latest/api-reference/esri-views-View.html#groundView) + */ + readonly groundView: GroundView; /** * Indication whether the view is being interacted with (for example when panning). * @@ -39133,7 +42062,7 @@ declare namespace __esri { */ readonly ready: boolean; /** - * The spatial reference of the view. This indicates the [Projected Coordinate System](http://resources.arcgis.com/en/help/arcgis-rest-api/index.html#/Projected_coordinate_systems/02r3000000vt000000/) or the [Geographic Coordinate System](http://resources.arcgis.com/en/help/arcgis-rest-api/index.html#/Geographic_coordinate_systems/02r300000105000000/) used to locate geographic features in the map. In a [SceneView](https://developers.arcgis.com/javascript/latest/api-reference/esri-views-SceneView.html) the following [supported coordinate systems](esri-views-SceneView.html#supported-coordinate-systems) are available. The spatial reference can either be set explicitly or automatically derived from the following: + * The spatial reference of the view. This indicates the [Projected Coordinate System](https://developers.arcgis.com/rest/services-reference/projected-coordinate-systems.htm) or the [Geographic Coordinate System](https://developers.arcgis.com/rest/services-reference/geographic-coordinate-systems.htm) used to locate geographic features in the map. In a [SceneView](https://developers.arcgis.com/javascript/latest/api-reference/esri-views-SceneView.html) the following [supported coordinate systems](esri-views-SceneView.html#supported-coordinate-systems) are available. The spatial reference can either be set explicitly or automatically derived from the following: * * In the case of a [SceneView](https://developers.arcgis.com/javascript/latest/api-reference/esri-views-SceneView.html), if the [map](https://developers.arcgis.com/javascript/latest/api-reference/esri-views-SceneView.html#map) is a [WebScene](https://developers.arcgis.com/javascript/latest/api-reference/esri-WebScene.html) instance, the [WebScene.initialViewProperties.spatialReference](https://developers.arcgis.com/javascript/latest/api-reference/esri-WebScene.html#initialViewProperties) is used. * * In all other cases, the spatial reference is derived from the first layer that loads in this order: * * [map.basemap.baseLayers](https://developers.arcgis.com/javascript/latest/api-reference/esri-Basemap.html#baseLayers) @@ -39234,7 +42163,7 @@ declare namespace __esri { */ padding?: ViewPadding; /** - * The spatial reference of the view. This indicates the [Projected Coordinate System](http://resources.arcgis.com/en/help/arcgis-rest-api/index.html#/Projected_coordinate_systems/02r3000000vt000000/) or the [Geographic Coordinate System](http://resources.arcgis.com/en/help/arcgis-rest-api/index.html#/Geographic_coordinate_systems/02r300000105000000/) used to locate geographic features in the map. In a [SceneView](https://developers.arcgis.com/javascript/latest/api-reference/esri-views-SceneView.html) the following [supported coordinate systems](esri-views-SceneView.html#supported-coordinate-systems) are available. The spatial reference can either be set explicitly or automatically derived from the following: + * The spatial reference of the view. This indicates the [Projected Coordinate System](https://developers.arcgis.com/rest/services-reference/projected-coordinate-systems.htm) or the [Geographic Coordinate System](https://developers.arcgis.com/rest/services-reference/geographic-coordinate-systems.htm) used to locate geographic features in the map. In a [SceneView](https://developers.arcgis.com/javascript/latest/api-reference/esri-views-SceneView.html) the following [supported coordinate systems](esri-views-SceneView.html#supported-coordinate-systems) are available. The spatial reference can either be set explicitly or automatically derived from the following: * * In the case of a [SceneView](https://developers.arcgis.com/javascript/latest/api-reference/esri-views-SceneView.html), if the [map](https://developers.arcgis.com/javascript/latest/api-reference/esri-views-SceneView.html#map) is a [WebScene](https://developers.arcgis.com/javascript/latest/api-reference/esri-WebScene.html) instance, the [WebScene.initialViewProperties.spatialReference](https://developers.arcgis.com/javascript/latest/api-reference/esri-WebScene.html#initialViewProperties) is used. * * In all other cases, the spatial reference is derived from the first layer that loads in this order: * * [map.basemap.baseLayers](https://developers.arcgis.com/javascript/latest/api-reference/esri-Basemap.html#baseLayers) @@ -39428,7 +42357,7 @@ declare namespace __esri { interface WebMapConstructor { /** - * Loads a [WebMap](https://doc.arcgis.com/en/arcgis-online/create-maps/make-your-first-map.htm) from [ArcGIS Online](https://www.arcgis.com/home/) or [Portal for ArcGIS](http://server.arcgis.com/en/portal/) into a [MapView](https://developers.arcgis.com/javascript/latest/api-reference/esri-views-MapView.html). + * Loads a [WebMap](https://doc.arcgis.com/en/arcgis-online/create-maps/make-your-first-map.htm) from [ArcGIS Online](https://www.arcgis.com/home/) or [ArcGIS Enterprise portal](https://enterprise.arcgis.com/en/portal/latest/administer/windows/what-is-portal-for-arcgis-.htm) into a [MapView](https://developers.arcgis.com/javascript/latest/api-reference/esri-views-MapView.html). * * [Read more...](https://developers.arcgis.com/javascript/latest/api-reference/esri-WebMap.html) */ @@ -39485,7 +42414,7 @@ declare namespace __esri { interface InitialViewProperties extends Accessor, corePromise { /** - * The spatial reference of the [WebMap](https://developers.arcgis.com/javascript/latest/api-reference/esri-WebMap.html). This indicates the [Projected Coordinate System](http://resources.arcgis.com/en/help/arcgis-rest-api/index.html#/Projected_coordinate_systems/02r3000000vt000000/) or the [Geographic Coordinate System](http://resources.arcgis.com/en/help/arcgis-rest-api/index.html#/Geographic_coordinate_systems/02r300000105000000/) used to locate geographic features in the map. + * The spatial reference of the [WebMap](https://developers.arcgis.com/javascript/latest/api-reference/esri-WebMap.html). This indicates the [Projected Coordinate System](https://developers.arcgis.com/rest/services-reference/projected-coordinate-systems.htm) or the [Geographic Coordinate System](https://developers.arcgis.com/rest/services-reference/geographic-coordinate-systems.htm) used to locate geographic features in the map. * * [Read more...](https://developers.arcgis.com/javascript/latest/api-reference/esri-webmap-InitialViewProperties.html#spatialReference) */ @@ -39517,7 +42446,7 @@ declare namespace __esri { interface InitialViewPropertiesProperties { /** - * The spatial reference of the [WebMap](https://developers.arcgis.com/javascript/latest/api-reference/esri-WebMap.html). This indicates the [Projected Coordinate System](http://resources.arcgis.com/en/help/arcgis-rest-api/index.html#/Projected_coordinate_systems/02r3000000vt000000/) or the [Geographic Coordinate System](http://resources.arcgis.com/en/help/arcgis-rest-api/index.html#/Geographic_coordinate_systems/02r300000105000000/) used to locate geographic features in the map. + * The spatial reference of the [WebMap](https://developers.arcgis.com/javascript/latest/api-reference/esri-WebMap.html). This indicates the [Projected Coordinate System](https://developers.arcgis.com/rest/services-reference/projected-coordinate-systems.htm) or the [Geographic Coordinate System](https://developers.arcgis.com/rest/services-reference/geographic-coordinate-systems.htm) used to locate geographic features in the map. * * [Read more...](https://developers.arcgis.com/javascript/latest/api-reference/esri-webmap-InitialViewProperties.html#spatialReference) */ @@ -39547,6 +42476,12 @@ declare namespace __esri { } interface WebScene extends Map, corePromise { + /** + * Configuration of application and UI elements. + * + * [Read more...](https://developers.arcgis.com/javascript/latest/api-reference/esri-WebScene.html#applicationProperties) + */ + applicationProperties: ApplicationProperties; /** * *This property only applies to local scenes.* Represents an optional clipping area used to define the bounds or [Extent](https://developers.arcgis.com/javascript/latest/api-reference/esri-geometry-Extent.html) of a local scene. If defined, only data (including the basemap) within the area will be displayed. Set the [clippingEnabled](https://developers.arcgis.com/javascript/latest/api-reference/esri-WebScene.html#clippingEnabled) property to `true` to apply the specified clippingArea to the view. * @@ -39655,7 +42590,7 @@ declare namespace __esri { */ saveAs(portalItem: PortalItem | PortalItemProperties, options?: WebSceneSaveAsOptions): IPromise; /** - * Converts an instance of [this class]() to its ArcGIS Portal JSON representation. See the [Using fromJSON()](https://developers.arcgis.com/javascript/latest/guide/using-fromjson/index.html) topic in the Guide and the [web scene specification](https://developers.arcgis.com/web-scene-specification/) for more information. + * Converts an instance of [this class]() to its ArcGIS portal JSON representation. See the [Using fromJSON()](https://developers.arcgis.com/javascript/latest/guide/using-fromjson/index.html) topic in the Guide and the [web scene specification](https://developers.arcgis.com/web-scene-specification/) for more information. * * [Read more...](https://developers.arcgis.com/javascript/latest/api-reference/esri-WebScene.html#toJSON) * @@ -39700,6 +42635,12 @@ declare namespace __esri { export const WebScene: WebSceneConstructor; interface WebSceneProperties extends MapProperties { + /** + * Configuration of application and UI elements. + * + * [Read more...](https://developers.arcgis.com/javascript/latest/api-reference/esri-WebScene.html#applicationProperties) + */ + applicationProperties?: ApplicationPropertiesProperties; /** * *This property only applies to local scenes.* Represents an optional clipping area used to define the bounds or [Extent](https://developers.arcgis.com/javascript/latest/api-reference/esri-geometry-Extent.html) of a local scene. If defined, only data (including the basemap) within the area will be displayed. Set the [clippingEnabled](https://developers.arcgis.com/javascript/latest/api-reference/esri-WebScene.html#clippingEnabled) property to `true` to apply the specified clippingArea to the view. * @@ -39740,6 +42681,253 @@ declare namespace __esri { presentation?: PresentationProperties; } + interface ApplicationProperties extends Accessor { + /** + * View-specific properties of application and UI elements. + * + * [Read more...](https://developers.arcgis.com/javascript/latest/api-reference/esri-webscene-ApplicationProperties.html#viewing) + */ + viewing: Viewing; + + /** + * Creates a deep clone of this object. + * + * [Read more...](https://developers.arcgis.com/javascript/latest/api-reference/esri-webscene-ApplicationProperties.html#clone) + * + * + */ + clone(): ApplicationProperties; + } + + interface ApplicationPropertiesConstructor { + + + new(properties?: ApplicationPropertiesProperties): ApplicationProperties; + } + + export const ApplicationProperties: ApplicationPropertiesConstructor; + + interface ApplicationPropertiesProperties { + /** + * View-specific properties of application and UI elements. + * + * [Read more...](https://developers.arcgis.com/javascript/latest/api-reference/esri-webscene-ApplicationProperties.html#viewing) + */ + viewing?: ViewingProperties; + } + + interface Search extends Accessor { + /** + * Whether search functionality is enabled in the web scene. + * + * [Read more...](https://developers.arcgis.com/javascript/latest/api-reference/esri-webscene-applicationProperties-Search.html#enabled) + */ + enabled: boolean; + /** + * The hint provided with the search dialog. + * + * [Read more...](https://developers.arcgis.com/javascript/latest/api-reference/esri-webscene-applicationProperties-Search.html#hintText) + */ + hintText: string; + /** + * A collection of layers to be included in search. + * + * [Read more...](https://developers.arcgis.com/javascript/latest/api-reference/esri-webscene-applicationProperties-Search.html#layers) + */ + layers: Collection; + + /** + * Creates a deep clone of this object. + * + * [Read more...](https://developers.arcgis.com/javascript/latest/api-reference/esri-webscene-applicationProperties-Search.html#clone) + * + * + */ + clone(): Search; + } + + interface SearchConstructor { + + + new(properties?: SearchProperties): Search; + } + + export const Search: SearchConstructor; + + interface SearchProperties { + /** + * Whether search functionality is enabled in the web scene. + * + * [Read more...](https://developers.arcgis.com/javascript/latest/api-reference/esri-webscene-applicationProperties-Search.html#enabled) + */ + enabled?: boolean; + /** + * The hint provided with the search dialog. + * + * [Read more...](https://developers.arcgis.com/javascript/latest/api-reference/esri-webscene-applicationProperties-Search.html#hintText) + */ + hintText?: string; + /** + * A collection of layers to be included in search. + * + * [Read more...](https://developers.arcgis.com/javascript/latest/api-reference/esri-webscene-applicationProperties-Search.html#layers) + */ + layers?: CollectionProperties; + } + + interface SearchLayer extends Accessor { + /** + * The field to use for search. + * + * [Read more...](https://developers.arcgis.com/javascript/latest/api-reference/esri-webscene-applicationProperties-SearchLayer.html#field) + */ + field: SearchLayerField; + /** + * The id of the layer. + * + * [Read more...](https://developers.arcgis.com/javascript/latest/api-reference/esri-webscene-applicationProperties-SearchLayer.html#id) + */ + id: string; + /** + * The sub layer index. + * + * [Read more...](https://developers.arcgis.com/javascript/latest/api-reference/esri-webscene-applicationProperties-SearchLayer.html#subLayer) + */ + subLayer: number; + + /** + * Creates a deep clone of this object. + * + * [Read more...](https://developers.arcgis.com/javascript/latest/api-reference/esri-webscene-applicationProperties-SearchLayer.html#clone) + * + * + */ + clone(): SearchLayer; + } + + interface SearchLayerConstructor { + + + new(properties?: SearchLayerProperties): SearchLayer; + } + + export const SearchLayer: SearchLayerConstructor; + + interface SearchLayerProperties { + /** + * The field to use for search. + * + * [Read more...](https://developers.arcgis.com/javascript/latest/api-reference/esri-webscene-applicationProperties-SearchLayer.html#field) + */ + field?: SearchLayerFieldProperties; + /** + * The id of the layer. + * + * [Read more...](https://developers.arcgis.com/javascript/latest/api-reference/esri-webscene-applicationProperties-SearchLayer.html#id) + */ + id?: string; + /** + * The sub layer index. + * + * [Read more...](https://developers.arcgis.com/javascript/latest/api-reference/esri-webscene-applicationProperties-SearchLayer.html#subLayer) + */ + subLayer?: number; + } + + interface SearchLayerField extends Accessor { + /** + * Whether or not the field is an exact match. + * + * [Read more...](https://developers.arcgis.com/javascript/latest/api-reference/esri-webscene-applicationProperties-SearchLayerField.html#exactMatch) + */ + exactMatch: boolean; + /** + * The name of the field. + * + * [Read more...](https://developers.arcgis.com/javascript/latest/api-reference/esri-webscene-applicationProperties-SearchLayerField.html#name) + */ + name: string; + /** + * The data type of the field. **Possible Values:** small-integer | integer | single | double | long | string | date | oid | geometry | blob | raster | guid | global-id | xml + * + * [Read more...](https://developers.arcgis.com/javascript/latest/api-reference/esri-webscene-applicationProperties-SearchLayerField.html#type) + */ + type: string; + + /** + * Creates a deep clone of this object. + * + * [Read more...](https://developers.arcgis.com/javascript/latest/api-reference/esri-webscene-applicationProperties-SearchLayerField.html#clone) + * + * + */ + clone(): SearchLayerField; + } + + interface SearchLayerFieldConstructor { + + + new(properties?: SearchLayerFieldProperties): SearchLayerField; + } + + export const SearchLayerField: SearchLayerFieldConstructor; + + interface SearchLayerFieldProperties { + /** + * Whether or not the field is an exact match. + * + * [Read more...](https://developers.arcgis.com/javascript/latest/api-reference/esri-webscene-applicationProperties-SearchLayerField.html#exactMatch) + */ + exactMatch?: boolean; + /** + * The name of the field. + * + * [Read more...](https://developers.arcgis.com/javascript/latest/api-reference/esri-webscene-applicationProperties-SearchLayerField.html#name) + */ + name?: string; + /** + * The data type of the field. **Possible Values:** small-integer | integer | single | double | long | string | date | oid | geometry | blob | raster | guid | global-id | xml + * + * [Read more...](https://developers.arcgis.com/javascript/latest/api-reference/esri-webscene-applicationProperties-SearchLayerField.html#type) + */ + type?: string; + } + + interface Viewing extends Accessor { + /** + * An object specifying the search parameters set within the web scene. + * + * [Read more...](https://developers.arcgis.com/javascript/latest/api-reference/esri-webscene-applicationProperties-Viewing.html#search) + */ + search: Search; + + /** + * Creates a deep clone of this object. + * + * [Read more...](https://developers.arcgis.com/javascript/latest/api-reference/esri-webscene-applicationProperties-Viewing.html#clone) + * + * + */ + clone(): Viewing; + } + + interface ViewingConstructor { + + + new(properties?: ViewingProperties): Viewing; + } + + export const Viewing: ViewingConstructor; + + interface ViewingProperties { + /** + * An object specifying the search parameters set within the web scene. + * + * [Read more...](https://developers.arcgis.com/javascript/latest/api-reference/esri-webscene-applicationProperties-Viewing.html#search) + */ + search?: SearchProperties; + } + interface Environment extends Accessor { /** * Settings for defining the lighting of the scene. @@ -39783,7 +42971,7 @@ declare namespace __esri { */ environment: Environment; /** - * The spatial reference of the [WebScene](https://developers.arcgis.com/javascript/latest/api-reference/esri-WebScene.html). This indicates the [Projected Coordinate System](http://resources.arcgis.com/en/help/arcgis-rest-api/index.html#/Projected_coordinate_systems/02r3000000vt000000/) or the [Geographic Coordinate System](http://resources.arcgis.com/en/help/arcgis-rest-api/index.html#/Geographic_coordinate_systems/02r300000105000000/) used to locate geographic features in the map. In a [SceneView](https://developers.arcgis.com/javascript/latest/api-reference/esri-views-SceneView.html) the following [supported coordinate systems](esri-views-SceneView.html#supported-coordinate-systems) are available. + * The spatial reference of the [WebScene](https://developers.arcgis.com/javascript/latest/api-reference/esri-WebScene.html). This indicates the [Projected Coordinate System](https://developers.arcgis.com/rest/services-reference/projected-coordinate-systems.htm) or the [Geographic Coordinate System](https://developers.arcgis.com/rest/services-reference/geographic-coordinate-systems.htm) used to locate geographic features in the map. In a [SceneView](https://developers.arcgis.com/javascript/latest/api-reference/esri-views-SceneView.html) the following [supported coordinate systems](esri-views-SceneView.html#supported-coordinate-systems) are available. * * [Read more...](https://developers.arcgis.com/javascript/latest/api-reference/esri-webscene-InitialViewProperties.html#spatialReference) */ @@ -39829,7 +43017,7 @@ declare namespace __esri { */ environment?: EnvironmentProperties; /** - * The spatial reference of the [WebScene](https://developers.arcgis.com/javascript/latest/api-reference/esri-WebScene.html). This indicates the [Projected Coordinate System](http://resources.arcgis.com/en/help/arcgis-rest-api/index.html#/Projected_coordinate_systems/02r3000000vt000000/) or the [Geographic Coordinate System](http://resources.arcgis.com/en/help/arcgis-rest-api/index.html#/Geographic_coordinate_systems/02r300000105000000/) used to locate geographic features in the map. In a [SceneView](https://developers.arcgis.com/javascript/latest/api-reference/esri-views-SceneView.html) the following [supported coordinate systems](esri-views-SceneView.html#supported-coordinate-systems) are available. + * The spatial reference of the [WebScene](https://developers.arcgis.com/javascript/latest/api-reference/esri-WebScene.html). This indicates the [Projected Coordinate System](https://developers.arcgis.com/rest/services-reference/projected-coordinate-systems.htm) or the [Geographic Coordinate System](https://developers.arcgis.com/rest/services-reference/geographic-coordinate-systems.htm) used to locate geographic features in the map. In a [SceneView](https://developers.arcgis.com/javascript/latest/api-reference/esri-views-SceneView.html) the following [supported coordinate systems](esri-views-SceneView.html#supported-coordinate-systems) are available. * * [Read more...](https://developers.arcgis.com/javascript/latest/api-reference/esri-webscene-InitialViewProperties.html#spatialReference) */ @@ -39868,7 +43056,7 @@ declare namespace __esri { */ directShadowsEnabled: boolean; /** - * The UTC timezone offset in hours that should be displayed in the UI to represent the date. This value does not have an impact on the actual lighting of the scene. + * The UTC time zone offset in hours that should be displayed in the UI to represent the date. This value does not have an impact on the actual lighting of the scene. * * [Read more...](https://developers.arcgis.com/javascript/latest/api-reference/esri-webscene-Lighting.html#displayUTCOffset) * @@ -39912,7 +43100,7 @@ declare namespace __esri { */ directShadowsEnabled?: boolean; /** - * The UTC timezone offset in hours that should be displayed in the UI to represent the date. This value does not have an impact on the actual lighting of the scene. + * The UTC time zone offset in hours that should be displayed in the UI to represent the date. This value does not have an impact on the actual lighting of the scene. * * [Read more...](https://developers.arcgis.com/javascript/latest/api-reference/esri-webscene-Lighting.html#displayUTCOffset) * @@ -40112,7 +43300,7 @@ declare namespace __esri { * * [Read more...](https://developers.arcgis.com/javascript/latest/api-reference/esri-webscene-Slide.html#description) */ - description?: SlideDescriptionProperties; + description?: SlideDescriptionProperties | string; /** * Represents settings that affect the environment in which the WebScene is displayed (such as lighting). * @@ -40130,13 +43318,13 @@ declare namespace __esri { * * [Read more...](https://developers.arcgis.com/javascript/latest/api-reference/esri-webscene-Slide.html#thumbnail) */ - thumbnail?: SlideThumbnailProperties; + thumbnail?: SlideThumbnailProperties | string; /** * The title of the slide. * * [Read more...](https://developers.arcgis.com/javascript/latest/api-reference/esri-webscene-Slide.html#title) */ - title?: SlideTitleProperties; + title?: SlideTitleProperties | string; /** * The viewpoint of the slide. This acts like a bookmark, saving a predefined location or point of view from which to view the scene. * @@ -40422,6 +43610,184 @@ declare namespace __esri { viewpointExcluded?: boolean; } + interface AreaMeasurement3D extends Widget { + /** + * List of unit options in the widget drop down list. + * + * [Read more...](https://developers.arcgis.com/javascript/latest/api-reference/esri-widgets-AreaMeasurement3D.html#unitOptions) + * + * @default ["metric", "imperial", "square-inches", "square-feet", "square-yards", "square-miles", "square-us-feet", "square-meters", "square-kilometers", "acres", "ares", "hectares"] + */ + unitOptions: string[]; + /** + * A reference to the [SceneView](https://developers.arcgis.com/javascript/latest/api-reference/esri-views-SceneView.html). Set this to link the widget to a specific view. + * + * [Read more...](https://developers.arcgis.com/javascript/latest/api-reference/esri-widgets-AreaMeasurement3D.html#view) + */ + view: SceneView; + /** + * The view model for this widget. This is a class that contains all the logic (properties and methods) that controls this widget's behavior. See the [AreaMeasurement3DViewModel](https://developers.arcgis.com/javascript/latest/api-reference/esri-widgets-AreaMeasurement3D-AreaMeasurement3DViewModel.html) class to access all properties and methods on the widget. + * + * [Read more...](https://developers.arcgis.com/javascript/latest/api-reference/esri-widgets-AreaMeasurement3D.html#viewModel) + */ + viewModel: AreaMeasurement3DViewModel; + + /** + * *This method is primarily used by developers when implementing custom widgets.* It must be implemented by subclasses for rendering. + * + * [Read more...](https://developers.arcgis.com/javascript/latest/api-reference/esri-widgets-AreaMeasurement3D.html#render) + * + * + */ + render(): any; + } + + interface AreaMeasurement3DConstructor { + /** + * The AreaMeasurement3D widget calculates and displays the area and perimeter of a polygon. This widget can be used in a [SceneView](https://developers.arcgis.com/javascript/latest/api-reference/esri-views-SceneView.html) to measure the area and perimeter of a polygon. + * + * [Read more...](https://developers.arcgis.com/javascript/latest/api-reference/esri-widgets-AreaMeasurement3D.html) + */ + + new(properties?: AreaMeasurement3DProperties): AreaMeasurement3D; + } + + export const AreaMeasurement3D: AreaMeasurement3DConstructor; + + interface AreaMeasurement3DProperties extends WidgetProperties { + /** + * List of unit options in the widget drop down list. + * + * [Read more...](https://developers.arcgis.com/javascript/latest/api-reference/esri-widgets-AreaMeasurement3D.html#unitOptions) + * + * @default ["metric", "imperial", "square-inches", "square-feet", "square-yards", "square-miles", "square-us-feet", "square-meters", "square-kilometers", "acres", "ares", "hectares"] + */ + unitOptions?: string[]; + /** + * A reference to the [SceneView](https://developers.arcgis.com/javascript/latest/api-reference/esri-views-SceneView.html). Set this to link the widget to a specific view. + * + * [Read more...](https://developers.arcgis.com/javascript/latest/api-reference/esri-widgets-AreaMeasurement3D.html#view) + */ + view?: SceneViewProperties; + /** + * The view model for this widget. This is a class that contains all the logic (properties and methods) that controls this widget's behavior. See the [AreaMeasurement3DViewModel](https://developers.arcgis.com/javascript/latest/api-reference/esri-widgets-AreaMeasurement3D-AreaMeasurement3DViewModel.html) class to access all properties and methods on the widget. + * + * [Read more...](https://developers.arcgis.com/javascript/latest/api-reference/esri-widgets-AreaMeasurement3D.html#viewModel) + */ + viewModel?: AreaMeasurement3DViewModel; + } + + interface AreaMeasurement3DViewModel { + /** + * The current measurement of the area. + * + * [Read more...](https://developers.arcgis.com/javascript/latest/api-reference/esri-widgets-AreaMeasurement3D-AreaMeasurement3DViewModel.html#measurement) + */ + readonly measurement: AreaMeasurement3DViewModelMeasurement; + /** + * The view model's state. + * + * Value | Description + * ------------|------------- + * disabled | not ready yet + * ready | ready for measuring + * measuring | currently measuring + * + * + * [Read more...](https://developers.arcgis.com/javascript/latest/api-reference/esri-widgets-AreaMeasurement3D-AreaMeasurement3DViewModel.html#state) + * + * @default disabled + */ + readonly state: string; + /** + * Unit system (imperial, metric) or specific unit used for displaying the distance values. **Known Values:** imperial | metric | square-inches | square-feet | square-yards | square-miles | square-meters | square-kilometers | square-us-feet | acres | ares | hectares + * + * [Read more...](https://developers.arcgis.com/javascript/latest/api-reference/esri-widgets-AreaMeasurement3D-AreaMeasurement3DViewModel.html#unit) + */ + unit: string; + /** + * List of unit systems (imperial, metric) and specific units for displaying the area values. + * + * [Read more...](https://developers.arcgis.com/javascript/latest/api-reference/esri-widgets-AreaMeasurement3D-AreaMeasurement3DViewModel.html#unitOptions) + * + * @default ["metric", "imperial", "square-inches", "square-feet", "square-yards", "square-miles", "square-us-feet", "square-meters", "square-kilometers", "acres", "ares", "hectares"] + */ + unitOptions: string[]; + /** + * The view from which the widget will operate. + * + * [Read more...](https://developers.arcgis.com/javascript/latest/api-reference/esri-widgets-AreaMeasurement3D-AreaMeasurement3DViewModel.html#view) + */ + view: SceneView; + + /** + * Clears the current measurement. + * + * [Read more...](https://developers.arcgis.com/javascript/latest/api-reference/esri-widgets-AreaMeasurement3D-AreaMeasurement3DViewModel.html#clearMeasurement) + * + * + */ + clearMeasurement(): void; + } + + interface AreaMeasurement3DViewModelConstructor { + + + + new(properties?: any): AreaMeasurement3DViewModel; + } + + export const AreaMeasurement3DViewModel: AreaMeasurement3DViewModelConstructor; + + + export interface AreaMeasurement3DViewModelMeasurement extends Object { + /** + * Describes the mode in which the measurement was taken. In `euclidean` mode, the area and perimeter length are computed from a flat polygon with straight segments on the perimeter in the [ECEF](https://en.wikipedia.org/wiki/ECEF) coordinate system. In `geodesic` mode, the area and perimeter length are computed from a geodesic polygon on the WGS84 ellipsoid. **Known Values:** euclidean | geodesic + * + * [Read more...](https://developers.arcgis.com/javascript/latest/api-reference/esri-widgets-AreaMeasurement3D-AreaMeasurement3DViewModel.html#measurement) + */ + measurementMode: string; + /** + * The area of the polygon. + * + * [Read more...](https://developers.arcgis.com/javascript/latest/api-reference/esri-widgets-AreaMeasurement3D-AreaMeasurement3DViewModel.html#measurement) + */ + area: MeasurementValue; + /** + * The perimeter length of the polygon. + * + * [Read more...](https://developers.arcgis.com/javascript/latest/api-reference/esri-widgets-AreaMeasurement3D-AreaMeasurement3DViewModel.html#measurement) + */ + perimeterLength: MeasurementValue; + } + + /** + * Measurement value. + * + * [Read more...](https://developers.arcgis.com/javascript/latest/api-reference/esri-widgets-AreaMeasurement3D-AreaMeasurement3DViewModel.html#MeasurementValue) + */ + export interface MeasurementValue extends Object { + /** + * Textual representation of the measured value. + * + * [Read more...](https://developers.arcgis.com/javascript/latest/api-reference/esri-widgets-AreaMeasurement3D-AreaMeasurement3DViewModel.html#MeasurementValue) + */ + text: string; + /** + * State of the measured value. + * + * Value | Description + * ------------|------------- + * available | measured value is available + * unavailable | measured value is not available due an incomplete measurement + * invalid | measured value is not available due to an invalid measurement configuration (e.g. self-intersecting polygon) + * + * + * [Read more...](https://developers.arcgis.com/javascript/latest/api-reference/esri-widgets-AreaMeasurement3D-AreaMeasurement3DViewModel.html#MeasurementValue) + */ + state: string; + } + interface Attribution extends Widget { /** * Full attribution text. @@ -40429,6 +43795,12 @@ declare namespace __esri { * [Read more...](https://developers.arcgis.com/javascript/latest/api-reference/esri-widgets-Attribution.html#attributionText) */ readonly attributionText: string; + /** + * The widget's default icon font. + * + * [Read more...](https://developers.arcgis.com/javascript/latest/api-reference/esri-widgets-Attribution.html#iconClass) + */ + readonly iconClass: string; /** * Text used to split attribution by [layers](https://developers.arcgis.com/javascript/latest/api-reference/esri-layers-Layer.html) * @@ -40437,6 +43809,12 @@ declare namespace __esri { * @default | */ itemDelimiter: string; + /** + * The widget's default label. + * + * [Read more...](https://developers.arcgis.com/javascript/latest/api-reference/esri-widgets-Attribution.html#label) + */ + readonly label: string; /** * A reference to the [MapView](https://developers.arcgis.com/javascript/latest/api-reference/esri-views-MapView.html) or [SceneView](https://developers.arcgis.com/javascript/latest/api-reference/esri-views-SceneView.html). Set this to link the widget to a specific view. * @@ -40497,11 +43875,11 @@ declare namespace __esri { interface AttributionViewModel { /** - * Array of attribution items. + * A collection of [AttributionItem](https://developers.arcgis.com/javascript/latest/api-reference/esri-widgets-Attribution-AttributionViewModel.html#AttributionItem)s. * * [Read more...](https://developers.arcgis.com/javascript/latest/api-reference/esri-widgets-Attribution-AttributionViewModel.html#items) */ - readonly items: AttributionItem[]; + readonly items: Collection; /** * The view model's state. **Known Values:** ready | disabled * @@ -40532,23 +43910,23 @@ declare namespace __esri { export const AttributionViewModel: AttributionViewModelConstructor; /** - * The following properties define an attribution item that contains the attribution text for a set of layers. + * The following properties define an attribution item that contains the attribution text for a layer. * * [Read more...](https://developers.arcgis.com/javascript/latest/api-reference/esri-widgets-Attribution-AttributionViewModel.html#AttributionItem) */ export interface AttributionItem extends Object { /** - * The attribution text for one or more layers. + * The attribution text. * * [Read more...](https://developers.arcgis.com/javascript/latest/api-reference/esri-widgets-Attribution-AttributionViewModel.html#AttributionItem) */ - text: boolean; + text: string; /** - * The associated layers that share the attribution text. + * The layer that has the attribution text. * * [Read more...](https://developers.arcgis.com/javascript/latest/api-reference/esri-widgets-Attribution-AttributionViewModel.html#AttributionItem) */ - layers: Layer[]; + layer: Layer; } interface BasemapGallery extends Widget { @@ -40558,6 +43936,18 @@ declare namespace __esri { * [Read more...](https://developers.arcgis.com/javascript/latest/api-reference/esri-widgets-BasemapGallery.html#activeBasemap) */ activeBasemap: Basemap; + /** + * The widget's default icon font. + * + * [Read more...](https://developers.arcgis.com/javascript/latest/api-reference/esri-widgets-BasemapGallery.html#iconClass) + */ + iconClass: string; + /** + * The widget's default label. + * + * [Read more...](https://developers.arcgis.com/javascript/latest/api-reference/esri-widgets-BasemapGallery.html#label) + */ + readonly label: string; /** * The source for basemaps that the widget will display. This property can be autocast with an array or [Collection](https://developers.arcgis.com/javascript/latest/api-reference/esri-core-Collection.html) of [Basemap](https://developers.arcgis.com/javascript/latest/api-reference/esri-Basemap.html)s, a [Portal](https://developers.arcgis.com/javascript/latest/api-reference/esri-portal-Portal.html) instance, or a URL to a portal instance. The default source is a [PortalBasemapsSource](https://developers.arcgis.com/javascript/latest/api-reference/esri-widgets-BasemapGallery-support-PortalBasemapsSource.html) that points to the default portal instance set in [esriConfig.portalUrl](https://developers.arcgis.com/javascript/latest/api-reference/esri-config.html#portalUrl). * @@ -40606,6 +43996,12 @@ declare namespace __esri { * [Read more...](https://developers.arcgis.com/javascript/latest/api-reference/esri-widgets-BasemapGallery.html#activeBasemap) */ activeBasemap?: BasemapProperties; + /** + * The widget's default icon font. + * + * [Read more...](https://developers.arcgis.com/javascript/latest/api-reference/esri-widgets-BasemapGallery.html#iconClass) + */ + iconClass?: string; /** * The source for basemaps that the widget will display. This property can be autocast with an array or [Collection](https://developers.arcgis.com/javascript/latest/api-reference/esri-core-Collection.html) of [Basemap](https://developers.arcgis.com/javascript/latest/api-reference/esri-Basemap.html)s, a [Portal](https://developers.arcgis.com/javascript/latest/api-reference/esri-portal-Portal.html) instance, or a URL to a portal instance. The default source is a [PortalBasemapsSource](https://developers.arcgis.com/javascript/latest/api-reference/esri-widgets-BasemapGallery-support-PortalBasemapsSource.html) that points to the default portal instance set in [esriConfig.portalUrl](https://developers.arcgis.com/javascript/latest/api-reference/esri-config.html#portalUrl). * @@ -40692,7 +44088,7 @@ declare namespace __esri { * * [Read more...](https://developers.arcgis.com/javascript/latest/api-reference/esri-widgets-BasemapGallery-BasemapGalleryViewModel.html#items) */ - items?: CollectionProperties; + items?: CollectionProperties; /** * The source for basemaps that the widget will display. This property can be autocast with an array or [Collection](https://developers.arcgis.com/javascript/latest/api-reference/esri-core-Collection.html) of [Basemap](https://developers.arcgis.com/javascript/latest/api-reference/esri-Basemap.html)s, a [Portal](https://developers.arcgis.com/javascript/latest/api-reference/esri-portal-Portal.html) instance or a URL to a portal instance. The default source is a [PortalBasemapsSource](https://developers.arcgis.com/javascript/latest/api-reference/esri-widgets-BasemapGallery-support-PortalBasemapsSource.html) that points to the default portal instance set in [esriConfig.portalUrl](https://developers.arcgis.com/javascript/latest/api-reference/esri-config.html#portalUrl). * @@ -40707,8 +44103,7 @@ declare namespace __esri { view?: MapViewProperties | SceneViewProperties; } - - interface BasemapGalleryItem { + interface BasemapGalleryItem extends Accessor { /** * The item's associated basemap. * @@ -40737,7 +44132,28 @@ declare namespace __esri { view: MapView | SceneView; } - export const BasemapGalleryItem: BasemapGalleryItem; + interface BasemapGalleryItemConstructor { + + + new(properties?: BasemapGalleryItemProperties): BasemapGalleryItem; + } + + export const BasemapGalleryItem: BasemapGalleryItemConstructor; + + interface BasemapGalleryItemProperties { + /** + * The item's associated basemap. + * + * [Read more...](https://developers.arcgis.com/javascript/latest/api-reference/esri-widgets-BasemapGallery-support-BasemapGalleryItem.html#basemap) + */ + basemap?: BasemapProperties; + /** + * The view associated with this item. + * + * [Read more...](https://developers.arcgis.com/javascript/latest/api-reference/esri-widgets-BasemapGallery-support-BasemapGalleryItem.html#view) + */ + view?: MapViewProperties | SceneViewProperties; + } interface LocalBasemapsSource extends Accessor { /** @@ -41266,6 +44682,18 @@ declare namespace __esri { } interface Compass extends Widget { + /** + * The widget's default icon font. + * + * [Read more...](https://developers.arcgis.com/javascript/latest/api-reference/esri-widgets-Compass.html#iconClass) + */ + readonly iconClass: string; + /** + * The widget's default label. + * + * [Read more...](https://developers.arcgis.com/javascript/latest/api-reference/esri-widgets-Compass.html#label) + */ + readonly label: string; /** * The view in which the Compass obtains and indicates camera [heading](https://developers.arcgis.com/javascript/latest/api-reference/esri-Camera.html#heading), using a (SceneView) or rotation (MapView). * @@ -41387,7 +44815,529 @@ declare namespace __esri { view?: MapViewProperties | SceneViewProperties; } + interface CoordinateConversion extends Widget { + /** + * A [Collection](https://developers.arcgis.com/javascript/latest/api-reference/esri-core-Collection.html) containing every [Conversion](https://developers.arcgis.com/javascript/latest/api-reference/esri-widgets-CoordinateConversion-support-Conversion.html) that the widget is currently displaying. + * + * [Read more...](https://developers.arcgis.com/javascript/latest/api-reference/esri-widgets-CoordinateConversion.html#conversions) + */ + conversions: Collection; + /** + * Describes the location of the coordinates currently displayed by the widget as a [Point](https://developers.arcgis.com/javascript/latest/api-reference/esri-geometry-Point.html). Setting this property will update all [conversions](https://developers.arcgis.com/javascript/latest/api-reference/esri-widgets-CoordinateConversion.html#conversions). + * + * [Read more...](https://developers.arcgis.com/javascript/latest/api-reference/esri-widgets-CoordinateConversion.html#currentLocation) + */ + currentLocation: Point; + /** + * A [Collection](https://developers.arcgis.com/javascript/latest/api-reference/esri-core-Collection.html) containing every [Format](https://developers.arcgis.com/javascript/latest/api-reference/esri-widgets-CoordinateConversion-support-Format.html) that the widget is capable of displaying. The default formats are `basemap`, `dd`, `ddm`, `dms`, `mgrs`, `usng`, `utm`, and `xy`. + * + * [Read more...](https://developers.arcgis.com/javascript/latest/api-reference/esri-widgets-CoordinateConversion.html#formats) + */ + formats: Collection; + /** + * Describes the current mode of the widget. **Known Values:** live | capture + * * While in `live` mode, the widget will update as the cursor moves. + * * While in `capture` mode, the widget will update on mouse click and display a graphic marking the current location. + * + * [Read more...](https://developers.arcgis.com/javascript/latest/api-reference/esri-widgets-CoordinateConversion.html#mode) + * + * @default live + */ + mode: string; + /** + * If this property is set to `true`, multiple conversions can be displayed. For a simpler experience with only one conversion at a time, this property can be set to `false`. + * + * [Read more...](https://developers.arcgis.com/javascript/latest/api-reference/esri-widgets-CoordinateConversion.html#multipleConversions) + * + * @default true + */ + multipleConversions: boolean; + /** + * Determines whether the widget should expand up or down. If set to `auto` the widget will be oriented based on its position in the view. **Known Values:** auto | expand-up | expand-down + * + * [Read more...](https://developers.arcgis.com/javascript/latest/api-reference/esri-widgets-CoordinateConversion.html#orientation) + * + * @default auto + */ + orientation: string; + /** + * The number of milliseconds of delay before conversion requests will be sent to the [GeometryService](https://developers.arcgis.com/javascript/latest/api-reference/esri-tasks-GeometryService.html). This only affects conversions that cannot be performed in the browser. + * + * [Read more...](https://developers.arcgis.com/javascript/latest/api-reference/esri-widgets-CoordinateConversion.html#requestDelay) + * + * @default 300 + */ + requestDelay: number; + /** + * A reference to the [MapView](https://developers.arcgis.com/javascript/latest/api-reference/esri-views-MapView.html) or [SceneView](https://developers.arcgis.com/javascript/latest/api-reference/esri-views-SceneView.html). Set this to link the widget to a specific view. + * + * [Read more...](https://developers.arcgis.com/javascript/latest/api-reference/esri-widgets-CoordinateConversion.html#view) + */ + view: MapView | SceneView; + /** + * The view model for this widget. The view model contains the logic that controls the Coordinate Widget's behavior. See the [CoordinateConversionViewModel](https://developers.arcgis.com/javascript/latest/api-reference/esri-widgets-CoordinateConversion-CoordinateConversionViewModel.html) class to access all properties and methods on the widget. + * + * [Read more...](https://developers.arcgis.com/javascript/latest/api-reference/esri-widgets-CoordinateConversion.html#viewModel) + */ + viewModel: CoordinateConversionViewModel; + + /** + * *This method is primarily used by developers when implementing custom widgets.* It must be implemented by subclasses for rendering. + * + * [Read more...](https://developers.arcgis.com/javascript/latest/api-reference/esri-widgets-CoordinateConversion.html#render) + * + * + */ + render(): any; + /** + * Attempt to convert a string into a [Point](https://developers.arcgis.com/javascript/latest/api-reference/esri-geometry-Point.html). The format of the string must be specified. A [Collection](https://developers.arcgis.com/javascript/latest/api-reference/esri-core-Collection.html) of available formats can be obtained from the [formats](https://developers.arcgis.com/javascript/latest/api-reference/esri-widgets-CoordinateConversion.html#formats) property. + * + * [Read more...](https://developers.arcgis.com/javascript/latest/api-reference/esri-widgets-CoordinateConversion.html#reverseConvert) + * + * @param coordinate The coordinate string. + * @param format Specifies the format of the input coordinate. + * + */ + reverseConvert(coordinate: string, format: Format): IPromise; + } + + interface CoordinateConversionConstructor { + /** + * The CoordinateConversion widget provides a way to display user cursor position either as map coordinates or as any of several popular coordinate notations. Additionally, the widget provides a way to convert user input coordinates into a [Point](https://developers.arcgis.com/javascript/latest/api-reference/esri-geometry-Point.html). + * + * [Read more...](https://developers.arcgis.com/javascript/latest/api-reference/esri-widgets-CoordinateConversion.html) + */ + + new(properties?: CoordinateConversionProperties): CoordinateConversion; + } + + export const CoordinateConversion: CoordinateConversionConstructor; + + interface CoordinateConversionProperties extends WidgetProperties { + /** + * A [Collection](https://developers.arcgis.com/javascript/latest/api-reference/esri-core-Collection.html) containing every [Conversion](https://developers.arcgis.com/javascript/latest/api-reference/esri-widgets-CoordinateConversion-support-Conversion.html) that the widget is currently displaying. + * + * [Read more...](https://developers.arcgis.com/javascript/latest/api-reference/esri-widgets-CoordinateConversion.html#conversions) + */ + conversions?: CollectionProperties; + /** + * Describes the location of the coordinates currently displayed by the widget as a [Point](https://developers.arcgis.com/javascript/latest/api-reference/esri-geometry-Point.html). Setting this property will update all [conversions](https://developers.arcgis.com/javascript/latest/api-reference/esri-widgets-CoordinateConversion.html#conversions). + * + * [Read more...](https://developers.arcgis.com/javascript/latest/api-reference/esri-widgets-CoordinateConversion.html#currentLocation) + */ + currentLocation?: PointProperties; + /** + * A [Collection](https://developers.arcgis.com/javascript/latest/api-reference/esri-core-Collection.html) containing every [Format](https://developers.arcgis.com/javascript/latest/api-reference/esri-widgets-CoordinateConversion-support-Format.html) that the widget is capable of displaying. The default formats are `basemap`, `dd`, `ddm`, `dms`, `mgrs`, `usng`, `utm`, and `xy`. + * + * [Read more...](https://developers.arcgis.com/javascript/latest/api-reference/esri-widgets-CoordinateConversion.html#formats) + */ + formats?: CollectionProperties; + /** + * Describes the current mode of the widget. **Known Values:** live | capture + * * While in `live` mode, the widget will update as the cursor moves. + * * While in `capture` mode, the widget will update on mouse click and display a graphic marking the current location. + * + * [Read more...](https://developers.arcgis.com/javascript/latest/api-reference/esri-widgets-CoordinateConversion.html#mode) + * + * @default live + */ + mode?: string; + /** + * If this property is set to `true`, multiple conversions can be displayed. For a simpler experience with only one conversion at a time, this property can be set to `false`. + * + * [Read more...](https://developers.arcgis.com/javascript/latest/api-reference/esri-widgets-CoordinateConversion.html#multipleConversions) + * + * @default true + */ + multipleConversions?: boolean; + /** + * Determines whether the widget should expand up or down. If set to `auto` the widget will be oriented based on its position in the view. **Known Values:** auto | expand-up | expand-down + * + * [Read more...](https://developers.arcgis.com/javascript/latest/api-reference/esri-widgets-CoordinateConversion.html#orientation) + * + * @default auto + */ + orientation?: string; + /** + * The number of milliseconds of delay before conversion requests will be sent to the [GeometryService](https://developers.arcgis.com/javascript/latest/api-reference/esri-tasks-GeometryService.html). This only affects conversions that cannot be performed in the browser. + * + * [Read more...](https://developers.arcgis.com/javascript/latest/api-reference/esri-widgets-CoordinateConversion.html#requestDelay) + * + * @default 300 + */ + requestDelay?: number; + /** + * A reference to the [MapView](https://developers.arcgis.com/javascript/latest/api-reference/esri-views-MapView.html) or [SceneView](https://developers.arcgis.com/javascript/latest/api-reference/esri-views-SceneView.html). Set this to link the widget to a specific view. + * + * [Read more...](https://developers.arcgis.com/javascript/latest/api-reference/esri-widgets-CoordinateConversion.html#view) + */ + view?: MapViewProperties | SceneViewProperties; + /** + * The view model for this widget. The view model contains the logic that controls the Coordinate Widget's behavior. See the [CoordinateConversionViewModel](https://developers.arcgis.com/javascript/latest/api-reference/esri-widgets-CoordinateConversion-CoordinateConversionViewModel.html) class to access all properties and methods on the widget. + * + * [Read more...](https://developers.arcgis.com/javascript/latest/api-reference/esri-widgets-CoordinateConversion.html#viewModel) + */ + viewModel?: CoordinateConversionViewModelProperties; + } + + interface CoordinateConversionViewModel extends Accessor { + /** + * A [Collection](https://developers.arcgis.com/javascript/latest/api-reference/esri-core-Collection.html) containing every [Conversion](https://developers.arcgis.com/javascript/latest/api-reference/esri-widgets-CoordinateConversion-support-Conversion.html) that the widget is currently displaying. + * + * [Read more...](https://developers.arcgis.com/javascript/latest/api-reference/esri-widgets-CoordinateConversion-CoordinateConversionViewModel.html#conversions) + */ + conversions: Collection; + /** + * Describes the location of the coordinates currently displayed by the widget as a [Point](https://developers.arcgis.com/javascript/latest/api-reference/esri-geometry-Point.html). Setting this property will update all [conversions](https://developers.arcgis.com/javascript/latest/api-reference/esri-widgets-CoordinateConversion-CoordinateConversionViewModel.html#conversions). + * + * [Read more...](https://developers.arcgis.com/javascript/latest/api-reference/esri-widgets-CoordinateConversion-CoordinateConversionViewModel.html#currentLocation) + */ + currentLocation: Point; + /** + * A [Collection](https://developers.arcgis.com/javascript/latest/api-reference/esri-core-Collection.html) containing every [Format](https://developers.arcgis.com/javascript/latest/api-reference/esri-widgets-CoordinateConversion-support-Format.html) that the widget is capable of displaying. The default formats are `basemap`, `dd`, `ddm`, `dms`, `mgrs`, `usng`, `utm`, and `xy`. + * + * [Read more...](https://developers.arcgis.com/javascript/latest/api-reference/esri-widgets-CoordinateConversion-CoordinateConversionViewModel.html#formats) + */ + formats: Collection; + /** + * This symbol is used to visualize the location currently described by the widget when `capture` mode is active. + * + * [Read more...](https://developers.arcgis.com/javascript/latest/api-reference/esri-widgets-CoordinateConversion-CoordinateConversionViewModel.html#locationSymbol) + */ + locationSymbol: SimpleMarkerSymbol | PictureMarkerSymbol; + /** + * Describes the current mode of the widget. **Known Values:** live | capture + * * While in `live` mode, the widget will update as the cursor moves. + * * While in `capture` mode, the widget will update on mouse click and display a graphic marking the current location. + * + * [Read more...](https://developers.arcgis.com/javascript/latest/api-reference/esri-widgets-CoordinateConversion-CoordinateConversionViewModel.html#mode) + * + * @default live + */ + mode: string; + /** + * The number of milliseconds of delay before conversion requests will be sent to the [GeometryService](https://developers.arcgis.com/javascript/latest/api-reference/esri-tasks-GeometryService.html). This only affects conversions that cannot be performed in the browser. + * + * [Read more...](https://developers.arcgis.com/javascript/latest/api-reference/esri-widgets-CoordinateConversion-CoordinateConversionViewModel.html#requestDelay) + * + * @default 300 + */ + requestDelay: number; + /** + * The view model's state. **Known Values:** ready | loading | disabled + * + * [Read more...](https://developers.arcgis.com/javascript/latest/api-reference/esri-widgets-CoordinateConversion-CoordinateConversionViewModel.html#state) + * + * @default disabled + */ + readonly state: string; + /** + * A reference to the [MapView](https://developers.arcgis.com/javascript/latest/api-reference/esri-views-MapView.html) or [SceneView](https://developers.arcgis.com/javascript/latest/api-reference/esri-views-SceneView.html). Set this to link the widget to a specific view. + * + * [Read more...](https://developers.arcgis.com/javascript/latest/api-reference/esri-widgets-CoordinateConversion-CoordinateConversionViewModel.html#view) + */ + view: MapView | SceneView; + + /** + * Attempt to convert a point into a [Position](https://developers.arcgis.com/javascript/latest/api-reference/esri-widgets-CoordinateConversion-CoordinateConversionViewModel.html#Position). + * + * [Read more...](https://developers.arcgis.com/javascript/latest/api-reference/esri-widgets-CoordinateConversion-CoordinateConversionViewModel.html#convert) + * + * @param point The point to convert. + * @param format The format that describes how the point should be converted. + * + */ + convert(point: Point, format: Format): IPromise; + /** + * Attempt to convert a string into a [Point](https://developers.arcgis.com/javascript/latest/api-reference/esri-geometry-Point.html). The format of the string must be specified. A [Collection](https://developers.arcgis.com/javascript/latest/api-reference/esri-core-Collection.html) of available formats can be obtained from the [formats](https://developers.arcgis.com/javascript/latest/api-reference/esri-widgets-CoordinateConversion-CoordinateConversionViewModel.html#formats) property. + * + * [Read more...](https://developers.arcgis.com/javascript/latest/api-reference/esri-widgets-CoordinateConversion-CoordinateConversionViewModel.html#reverseConvert) + * + * @param coordinate The coordinate string. + * @param format Specifies the format of the input coordinate. + * + */ + reverseConvert(coordinate: string, format: Format): IPromise; + /** + * Update the input conversions based on the input point. + * + * [Read more...](https://developers.arcgis.com/javascript/latest/api-reference/esri-widgets-CoordinateConversion-CoordinateConversionViewModel.html#updateConversions) + * + * @param location A point that will be used to update each input conversion. + * @param conversions An array of [Conversions](esri-widgets-CoordinateConversion-support-Conversion.html) to be updated. + * + */ + updateConversions(location: Point, conversions: Conversion[]): IPromise; + } + + interface CoordinateConversionViewModelConstructor { + + + new(properties?: CoordinateConversionViewModelProperties): CoordinateConversionViewModel; + } + + export const CoordinateConversionViewModel: CoordinateConversionViewModelConstructor; + + interface CoordinateConversionViewModelProperties { + /** + * A [Collection](https://developers.arcgis.com/javascript/latest/api-reference/esri-core-Collection.html) containing every [Conversion](https://developers.arcgis.com/javascript/latest/api-reference/esri-widgets-CoordinateConversion-support-Conversion.html) that the widget is currently displaying. + * + * [Read more...](https://developers.arcgis.com/javascript/latest/api-reference/esri-widgets-CoordinateConversion-CoordinateConversionViewModel.html#conversions) + */ + conversions?: CollectionProperties; + /** + * Describes the location of the coordinates currently displayed by the widget as a [Point](https://developers.arcgis.com/javascript/latest/api-reference/esri-geometry-Point.html). Setting this property will update all [conversions](https://developers.arcgis.com/javascript/latest/api-reference/esri-widgets-CoordinateConversion-CoordinateConversionViewModel.html#conversions). + * + * [Read more...](https://developers.arcgis.com/javascript/latest/api-reference/esri-widgets-CoordinateConversion-CoordinateConversionViewModel.html#currentLocation) + */ + currentLocation?: PointProperties; + /** + * A [Collection](https://developers.arcgis.com/javascript/latest/api-reference/esri-core-Collection.html) containing every [Format](https://developers.arcgis.com/javascript/latest/api-reference/esri-widgets-CoordinateConversion-support-Format.html) that the widget is capable of displaying. The default formats are `basemap`, `dd`, `ddm`, `dms`, `mgrs`, `usng`, `utm`, and `xy`. + * + * [Read more...](https://developers.arcgis.com/javascript/latest/api-reference/esri-widgets-CoordinateConversion-CoordinateConversionViewModel.html#formats) + */ + formats?: CollectionProperties; + /** + * This symbol is used to visualize the location currently described by the widget when `capture` mode is active. + * + * [Read more...](https://developers.arcgis.com/javascript/latest/api-reference/esri-widgets-CoordinateConversion-CoordinateConversionViewModel.html#locationSymbol) + */ + locationSymbol?: SimpleMarkerSymbolProperties | PictureMarkerSymbolProperties; + /** + * Describes the current mode of the widget. **Known Values:** live | capture + * * While in `live` mode, the widget will update as the cursor moves. + * * While in `capture` mode, the widget will update on mouse click and display a graphic marking the current location. + * + * [Read more...](https://developers.arcgis.com/javascript/latest/api-reference/esri-widgets-CoordinateConversion-CoordinateConversionViewModel.html#mode) + * + * @default live + */ + mode?: string; + /** + * The number of milliseconds of delay before conversion requests will be sent to the [GeometryService](https://developers.arcgis.com/javascript/latest/api-reference/esri-tasks-GeometryService.html). This only affects conversions that cannot be performed in the browser. + * + * [Read more...](https://developers.arcgis.com/javascript/latest/api-reference/esri-widgets-CoordinateConversion-CoordinateConversionViewModel.html#requestDelay) + * + * @default 300 + */ + requestDelay?: number; + /** + * A reference to the [MapView](https://developers.arcgis.com/javascript/latest/api-reference/esri-views-MapView.html) or [SceneView](https://developers.arcgis.com/javascript/latest/api-reference/esri-views-SceneView.html). Set this to link the widget to a specific view. + * + * [Read more...](https://developers.arcgis.com/javascript/latest/api-reference/esri-widgets-CoordinateConversion-CoordinateConversionViewModel.html#view) + */ + view?: MapViewProperties | SceneViewProperties; + } + + /** + * Describes a point in terms of a location, a [Point](https://developers.arcgis.com/javascript/latest/api-reference/esri-geometry-Point.html), and a coordinate, a string. + * + * [Read more...](https://developers.arcgis.com/javascript/latest/api-reference/esri-widgets-CoordinateConversion-CoordinateConversionViewModel.html#Position) + */ + export interface Position extends Object { + /** + * A point geometry representing the location described by the conversion. + * + * [Read more...](https://developers.arcgis.com/javascript/latest/api-reference/esri-widgets-CoordinateConversion-CoordinateConversionViewModel.html#Position) + */ + location: Point; + /** + * A string representing the location. + * + * [Read more...](https://developers.arcgis.com/javascript/latest/api-reference/esri-widgets-CoordinateConversion-CoordinateConversionViewModel.html#Position) + */ + coordinate: string; + } + + + interface Conversion { + /** + * A formatted string based on the current [position](https://developers.arcgis.com/javascript/latest/api-reference/esri-widgets-CoordinateConversion-support-Conversion.html#position) and display information on the [format](https://developers.arcgis.com/javascript/latest/api-reference/esri-widgets-CoordinateConversion-support-Conversion.html#format). + * + * [Read more...](https://developers.arcgis.com/javascript/latest/api-reference/esri-widgets-CoordinateConversion-support-Conversion.html#displayCoordinate) + */ + readonly displayCoordinate: string; + /** + * The [Format](https://developers.arcgis.com/javascript/latest/api-reference/esri-widgets-CoordinateConversion-support-Format.html) for this conversion. The Format contains information detailing how the Conversion should be performed and how it will be displayed. + * + * [Read more...](https://developers.arcgis.com/javascript/latest/api-reference/esri-widgets-CoordinateConversion-support-Conversion.html#format) + */ + format: Format; + /** + * The position property contains the location information for this conversion. + * + * [Read more...](https://developers.arcgis.com/javascript/latest/api-reference/esri-widgets-CoordinateConversion-support-Conversion.html#position) + */ + position: ConversionPosition; + } + + export const Conversion: Conversion; + + /** + * Describes a point in terms of a location, a [Point](https://developers.arcgis.com/javascript/latest/api-reference/esri-geometry-Point.html), and a coordinate, a string. + * + * [Read more...](https://developers.arcgis.com/javascript/latest/api-reference/esri-widgets-CoordinateConversion-support-Conversion.html#Position) + */ + export interface ConversionPosition extends Object { + /** + * A point geometry representing the location described by the conversion. + * + * [Read more...](https://developers.arcgis.com/javascript/latest/api-reference/esri-widgets-CoordinateConversion-support-Conversion.html#Position) + */ + location: Point; + /** + * A string representing the location. + * + * [Read more...](https://developers.arcgis.com/javascript/latest/api-reference/esri-widgets-CoordinateConversion-support-Conversion.html#Position) + */ + coordinate: string; + } + + + interface Format { + /** + * Contains information that describes how this Format should be converted. This property should only be set when creating a custom Format. + * + * [Read more...](https://developers.arcgis.com/javascript/latest/api-reference/esri-widgets-CoordinateConversion-support-Format.html#conversionInfo) + * + * @default null + */ + conversionInfo: ConversionInfo; + /** + * A array of [Coordinate Segments](https://developers.arcgis.com/javascript/latest/api-reference/esri-widgets-CoordinateConversion-support-Format.html#CoordinateSegment). Each segment represents a section of the Format's coordinate. + * + * [Read more...](https://developers.arcgis.com/javascript/latest/api-reference/esri-widgets-CoordinateConversion-support-Format.html#coordinateSegments) + * + * @default null + */ + coordinateSegments: CoordinateSegment[]; + /** + * A string that serves as a pattern describing how this Format should be displayed. The pattern should contain all of aliases specified by the Format's [coordinateSegments property](https://developers.arcgis.com/javascript/latest/api-reference/esri-widgets-CoordinateConversion-support-Format.html#coordinateSegments). + * + * [Read more...](https://developers.arcgis.com/javascript/latest/api-reference/esri-widgets-CoordinateConversion-support-Format.html#currentPattern) + * + * @default null + */ + currentPattern: string; + /** + * The default pattern describing how this Format should be displayed. See [currentPattern](https://developers.arcgis.com/javascript/latest/api-reference/esri-widgets-CoordinateConversion-support-Format.html#currentPattern). + * + * [Read more...](https://developers.arcgis.com/javascript/latest/api-reference/esri-widgets-CoordinateConversion-support-Format.html#defaultPattern) + * + * @default null + */ + defaultPattern: string; + /** + * The name of the coordinate. A [CoordinateConversion](https://developers.arcgis.com/javascript/latest/api-reference/esri-widgets-CoordinateConversion.html) widget should not contain multiple Formats with the same name. + * + * [Read more...](https://developers.arcgis.com/javascript/latest/api-reference/esri-widgets-CoordinateConversion-support-Format.html#name) + * + * @default null + */ + name: string; + } + + export const Format: Format; + + /** + * Information describing how a Format should be projected. Used to define custom Formats. 1. If the conversion can be performed synchronously, a convert function should be defined. 2. If the conversion cannot be performed synchronously, a convertDeferred function should be defined. 3. Alternatively, a [SpatialReference](https://developers.arcgis.com/javascript/latest/api-reference/esri-geometry-SpatialReference.html) can be provided, and the Format will project to this Spatial Reference. + * + * [Read more...](https://developers.arcgis.com/javascript/latest/api-reference/esri-widgets-CoordinateConversion-support-Format.html#ConversionInfo) + */ + export interface ConversionInfo extends Object { + /** + * The SpatialReference to project to. + * + * [Read more...](https://developers.arcgis.com/javascript/latest/api-reference/esri-widgets-CoordinateConversion-support-Format.html#ConversionInfo) + */ + spatialReference?: SpatialReference; + + /** + * A function that takes a point and returns a [position](https://developers.arcgis.com/javascript/latest/api-reference/esri-widgets-CoordinateConversion-support-Format.html#Position). + * + * [Read more...](https://developers.arcgis.com/javascript/latest/api-reference/esri-widgets-CoordinateConversion-support-Format.html#ConversionInfo) + * + * + */ + convert(): void; + /** + * A function that takes a point and returns a promise that resolves into a [position](https://developers.arcgis.com/javascript/latest/api-reference/esri-widgets-CoordinateConversion-support-Format.html#Position). + * + * [Read more...](https://developers.arcgis.com/javascript/latest/api-reference/esri-widgets-CoordinateConversion-support-Format.html#ConversionInfo) + * + * + */ + convertDeferred(): void; + /** + * A function that takes a string and returns a Point. + * + * [Read more...](https://developers.arcgis.com/javascript/latest/api-reference/esri-widgets-CoordinateConversion-support-Format.html#ConversionInfo) + * + * + */ + reverseConvert(): void; + } + + /** + * A coordinate segment represents one piece of a coordinate string. + * > A MGRS coordinate, for example `30UVG898998`, is described by four segments: 1. Alias `Z`, the gridzone: `30U` 2. Alias `S`, the 100,000 meter square designator: `VG` 3. Alias `X`, the easting (x coordinate with respect to the 10,000 meter square): `898` 4. Alias `Y`, the northing (y coordinate with respect to the 10,000 meter square): `998` + * + * [Read more...](https://developers.arcgis.com/javascript/latest/api-reference/esri-widgets-CoordinateConversion-support-Format.html#CoordinateSegment) + */ + export interface CoordinateSegment extends Object { + /** + * A string that provides the name for this segment of a coordinate string. + * + * [Read more...](https://developers.arcgis.com/javascript/latest/api-reference/esri-widgets-CoordinateConversion-support-Format.html#CoordinateSegment) + */ + alias: string; + /** + * A string that describes the role of this segment. + * + * [Read more...](https://developers.arcgis.com/javascript/latest/api-reference/esri-widgets-CoordinateConversion-support-Format.html#CoordinateSegment) + */ + description: string; + /** + * A regular expression that should extract this segment from the complete coordinate. + * + * [Read more...](https://developers.arcgis.com/javascript/latest/api-reference/esri-widgets-CoordinateConversion-support-Format.html#CoordinateSegment) + */ + searchPattern: RegExp; + } + + /** + * Describes a point in terms of a location, a [Point](https://developers.arcgis.com/javascript/latest/api-reference/esri-geometry-Point.html), and a coordinate, a string. + * + * [Read more...](https://developers.arcgis.com/javascript/latest/api-reference/esri-widgets-CoordinateConversion-support-Format.html#Position) + */ + export interface FormatPosition extends Object { + /** + * A point geometry representing the location described by the conversion. + * + * [Read more...](https://developers.arcgis.com/javascript/latest/api-reference/esri-widgets-CoordinateConversion-support-Format.html#Position) + */ + location: Point; + /** + * A string representing the location. + * + * [Read more...](https://developers.arcgis.com/javascript/latest/api-reference/esri-widgets-CoordinateConversion-support-Format.html#Position) + */ + coordinate: string; + } + interface Directions extends Widget { + /** + * The widget's default icon font. + * + * [Read more...](https://developers.arcgis.com/javascript/latest/api-reference/esri-widgets-Directions.html#iconClass) + */ + readonly iconClass: string; + /** + * The widget's default label. + * + * [Read more...](https://developers.arcgis.com/javascript/latest/api-reference/esri-widgets-Directions.html#label) + */ + readonly label: string; /** * The maximum number of stops allowed for routing. * @@ -41411,9 +45361,11 @@ declare namespace __esri { */ routeSymbol: SimpleLineSymbol; /** - * This property controls the default properties for [Searching](https://developers.arcgis.com/javascript/latest/api-reference/esri-widgets-Search.html). These properties can be configured per application. + * Controls the default properties used when [searching](https://developers.arcgis.com/javascript/latest/api-reference/esri-widgets-Search.html). Note that the default `searchProperties` differ slightly from the [Search widget](https://developers.arcgis.com/javascript/latest/api-reference/esri-widgets-Search.html). * * [Read more...](https://developers.arcgis.com/javascript/latest/api-reference/esri-widgets-Directions.html#searchProperties) + * + * @default null */ searchProperties: DirectionsSearchProperties; /** @@ -41497,9 +45449,11 @@ declare namespace __esri { */ routeSymbol?: SimpleLineSymbolProperties; /** - * This property controls the default properties for [Searching](https://developers.arcgis.com/javascript/latest/api-reference/esri-widgets-Search.html). These properties can be configured per application. + * Controls the default properties used when [searching](https://developers.arcgis.com/javascript/latest/api-reference/esri-widgets-Search.html). Note that the default `searchProperties` differ slightly from the [Search widget](https://developers.arcgis.com/javascript/latest/api-reference/esri-widgets-Search.html). * * [Read more...](https://developers.arcgis.com/javascript/latest/api-reference/esri-widgets-Directions.html#searchProperties) + * + * @default null */ searchProperties?: DirectionsSearchProperties; /** @@ -41845,7 +45799,7 @@ declare namespace __esri { */ impedanceAttributeName: string; /** - * Name of the travel mode. Users of ArcGIS Online or Portal for ArcGIS can define custom travel modes inside their Organization settings. Authors of stand alone Network Analysis Services can define their own travel modes inside a network dataset. + * Name of the travel mode. Users of ArcGIS Online or ArcGIS Enterprise can define custom travel modes inside their Organization settings. Authors of stand alone Network Analysis Services can define their own travel modes inside a network dataset. * * [Read more...](https://developers.arcgis.com/javascript/latest/api-reference/esri-widgets-Directions-DirectionsViewModel.html#selectedTravelMode) */ @@ -41933,7 +45887,7 @@ declare namespace __esri { */ impedanceAttributeName?: string; /** - * Name of the travel mode. Users of ArcGIS Online or Portal for ArcGIS can define custom travel modes inside their Organization settings. Authors of stand alone Network Analysis Services can define their own travel modes inside a network dataset. + * Name of the travel mode. Users of ArcGIS Online or ArcGIS Enterprise can define custom travel modes inside their Organization settings. Authors of stand alone Network Analysis Services can define their own travel modes inside a network dataset. * * [Read more...](https://developers.arcgis.com/javascript/latest/api-reference/esri-widgets-Directions-DirectionsViewModel.html#TravelMode) */ @@ -42091,12 +46045,26 @@ declare namespace __esri { } interface DirectLineMeasurement3D extends Widget { + /** + * List of unit options in the widget drop down list. + * + * [Read more...](https://developers.arcgis.com/javascript/latest/api-reference/esri-widgets-DirectLineMeasurement3D.html#unitOptions) + * + * @default ["metric", "imperial", "inches", "feet", "yards", "miles", "nautical-miles", "us-feet", "meters", "kilometers"] + */ + unitOptions: string[]; /** * A reference to the [SceneView](https://developers.arcgis.com/javascript/latest/api-reference/esri-views-SceneView.html). Set this to link the widget to a specific view. * * [Read more...](https://developers.arcgis.com/javascript/latest/api-reference/esri-widgets-DirectLineMeasurement3D.html#view) */ view: SceneView; + /** + * The view model for this widget. This is a class that contains all the logic (properties and methods) that controls this widget's behavior. See the [DirectLineMeasurement3DViewModel](https://developers.arcgis.com/javascript/latest/api-reference/esri-widgets-DirectLineMeasurement3D-DirectLineMeasurement3DViewModel.html) class to access all properties and methods on the widget. + * + * [Read more...](https://developers.arcgis.com/javascript/latest/api-reference/esri-widgets-DirectLineMeasurement3D.html#viewModel) + */ + viewModel: DirectLineMeasurement3DViewModel; /** * *This method is primarily used by developers when implementing custom widgets.* It must be implemented by subclasses for rendering. @@ -42121,12 +46089,142 @@ declare namespace __esri { export const DirectLineMeasurement3D: DirectLineMeasurement3DConstructor; interface DirectLineMeasurement3DProperties extends WidgetProperties { + /** + * List of unit options in the widget drop down list. + * + * [Read more...](https://developers.arcgis.com/javascript/latest/api-reference/esri-widgets-DirectLineMeasurement3D.html#unitOptions) + * + * @default ["metric", "imperial", "inches", "feet", "yards", "miles", "nautical-miles", "us-feet", "meters", "kilometers"] + */ + unitOptions?: string[]; /** * A reference to the [SceneView](https://developers.arcgis.com/javascript/latest/api-reference/esri-views-SceneView.html). Set this to link the widget to a specific view. * * [Read more...](https://developers.arcgis.com/javascript/latest/api-reference/esri-widgets-DirectLineMeasurement3D.html#view) */ view?: SceneViewProperties; + /** + * The view model for this widget. This is a class that contains all the logic (properties and methods) that controls this widget's behavior. See the [DirectLineMeasurement3DViewModel](https://developers.arcgis.com/javascript/latest/api-reference/esri-widgets-DirectLineMeasurement3D-DirectLineMeasurement3DViewModel.html) class to access all properties and methods on the widget. + * + * [Read more...](https://developers.arcgis.com/javascript/latest/api-reference/esri-widgets-DirectLineMeasurement3D.html#viewModel) + */ + viewModel?: DirectLineMeasurement3DViewModel; + } + + interface DirectLineMeasurement3DViewModel { + /** + * The current measurement calculated between the two points. + * + * [Read more...](https://developers.arcgis.com/javascript/latest/api-reference/esri-widgets-DirectLineMeasurement3D-DirectLineMeasurement3DViewModel.html#measurement) + */ + readonly measurement: DirectLineMeasurement3DViewModelMeasurement; + /** + * The view model's state. + * + * Value | Description + * ------------|------------- + * disabled | not ready yet + * ready | ready for measuring + * measuring | currently measuring + * + * + * [Read more...](https://developers.arcgis.com/javascript/latest/api-reference/esri-widgets-DirectLineMeasurement3D-DirectLineMeasurement3DViewModel.html#state) + * + * @default disabled + */ + readonly state: string; + /** + * Unit system (imperial, metric) or specific unit used for displaying the distance values. **Known Values:** imperial | metric | inches | feet | yards | miles | nautical-miles | meters | kilometers | us-feet + * + * [Read more...](https://developers.arcgis.com/javascript/latest/api-reference/esri-widgets-DirectLineMeasurement3D-DirectLineMeasurement3DViewModel.html#unit) + */ + unit: string; + /** + * List of unit systems (imperial, metric) and specific units for displaying the distance values. + * + * [Read more...](https://developers.arcgis.com/javascript/latest/api-reference/esri-widgets-DirectLineMeasurement3D-DirectLineMeasurement3DViewModel.html#unitOptions) + * + * @default ["metric", "imperial", "inches", "feet", "yards", "miles", "nautical-miles", "us-feet", "meters", "kilometers"] + */ + unitOptions: string[]; + /** + * The view from which the widget will operate. + * + * [Read more...](https://developers.arcgis.com/javascript/latest/api-reference/esri-widgets-DirectLineMeasurement3D-DirectLineMeasurement3DViewModel.html#view) + */ + view: SceneView; + + /** + * Clears the current measurement. + * + * [Read more...](https://developers.arcgis.com/javascript/latest/api-reference/esri-widgets-DirectLineMeasurement3D-DirectLineMeasurement3DViewModel.html#clearMeasurement) + * + * + */ + clearMeasurement(): void; + } + + interface DirectLineMeasurement3DViewModelConstructor { + + + + new(properties?: any): DirectLineMeasurement3DViewModel; + } + + export const DirectLineMeasurement3DViewModel: DirectLineMeasurement3DViewModelConstructor; + + + export interface DirectLineMeasurement3DViewModelMeasurement extends Object { + /** + * Describes the mode in which the measurement was taken. In `euclidean` mode, the distances are measured as straight lines in the [ECEF](https://en.wikipedia.org/wiki/ECEF) coordinate system. In `geodesic` mode, the distances are measured as geodesic lines on the WGS84 ellipsoid. **Known Values:** euclidean | geodesic + * + * [Read more...](https://developers.arcgis.com/javascript/latest/api-reference/esri-widgets-DirectLineMeasurement3D-DirectLineMeasurement3DViewModel.html#measurement) + */ + measurementMode: string; + /** + * The direct distance between the two points. + * + * [Read more...](https://developers.arcgis.com/javascript/latest/api-reference/esri-widgets-DirectLineMeasurement3D-DirectLineMeasurement3DViewModel.html#measurement) + */ + directDistance: DirectLineMeasurement3DViewModelMeasurementValue; + /** + * The horizontal distance between the two points. + * + * [Read more...](https://developers.arcgis.com/javascript/latest/api-reference/esri-widgets-DirectLineMeasurement3D-DirectLineMeasurement3DViewModel.html#measurement) + */ + horizontalDistance: DirectLineMeasurement3DViewModelMeasurementValue; + /** + * The vertical distance between the two points. + * + * [Read more...](https://developers.arcgis.com/javascript/latest/api-reference/esri-widgets-DirectLineMeasurement3D-DirectLineMeasurement3DViewModel.html#measurement) + */ + verticalDistance: DirectLineMeasurement3DViewModelMeasurementValue; + } + + /** + * Measurement value. + * + * [Read more...](https://developers.arcgis.com/javascript/latest/api-reference/esri-widgets-DirectLineMeasurement3D-DirectLineMeasurement3DViewModel.html#MeasurementValue) + */ + export interface DirectLineMeasurement3DViewModelMeasurementValue extends Object { + /** + * Textual representation of the measured value. + * + * [Read more...](https://developers.arcgis.com/javascript/latest/api-reference/esri-widgets-DirectLineMeasurement3D-DirectLineMeasurement3DViewModel.html#MeasurementValue) + */ + text: string; + /** + * State of the measured value. + * + * Value | Description + * ------------|------------- + * available | measured value is available + * unavailable | measured value is not available due an incomplete measurement or because the value is not available for the given measurement configuration (e.g. direct distance is unavailable in `geodesic` mode) + * + * + * [Read more...](https://developers.arcgis.com/javascript/latest/api-reference/esri-widgets-DirectLineMeasurement3D-DirectLineMeasurement3DViewModel.html#MeasurementValue) + */ + state: string; } interface Expand extends Widget { @@ -42192,6 +46290,21 @@ declare namespace __esri { * [Read more...](https://developers.arcgis.com/javascript/latest/api-reference/esri-widgets-Expand.html#iconNumber) */ iconNumber: number; + /** + * The mode in which the widget displays. These modes are listed below. + * + * mode | description + * ---------------|------------ + * auto | This is the default mode. It is responsive to browser size changes and will update based on whether the widget is viewed in a desktop or mobile application. + * floating | Use this mode if you wish to always display the widget as floating regardless of browser size. + * drawer | Use this mode if you wish to always display the widget in a panel regardless of browser size. + * + * + * [Read more...](https://developers.arcgis.com/javascript/latest/api-reference/esri-widgets-Expand.html#mode) + * + * @default "auto" + */ + mode: string; /** * A reference to the [MapView](https://developers.arcgis.com/javascript/latest/api-reference/esri-views-MapView.html) or [SceneView](https://developers.arcgis.com/javascript/latest/api-reference/esri-views-SceneView.html). Set this to link the widget to a specific view. * @@ -42302,6 +46415,21 @@ declare namespace __esri { * [Read more...](https://developers.arcgis.com/javascript/latest/api-reference/esri-widgets-Expand.html#iconNumber) */ iconNumber?: number; + /** + * The mode in which the widget displays. These modes are listed below. + * + * mode | description + * ---------------|------------ + * auto | This is the default mode. It is responsive to browser size changes and will update based on whether the widget is viewed in a desktop or mobile application. + * floating | Use this mode if you wish to always display the widget as floating regardless of browser size. + * drawer | Use this mode if you wish to always display the widget in a panel regardless of browser size. + * + * + * [Read more...](https://developers.arcgis.com/javascript/latest/api-reference/esri-widgets-Expand.html#mode) + * + * @default "auto" + */ + mode?: string; /** * A reference to the [MapView](https://developers.arcgis.com/javascript/latest/api-reference/esri-views-MapView.html) or [SceneView](https://developers.arcgis.com/javascript/latest/api-reference/esri-views-SceneView.html). Set this to link the widget to a specific view. * @@ -42386,6 +46514,205 @@ declare namespace __esri { view?: MapViewProperties | SceneViewProperties; } + interface Feature extends Widget { + /** + * The [Graphic](https://developers.arcgis.com/javascript/latest/api-reference/esri-Graphic.html) used to represent the feature. + * + * [Read more...](https://developers.arcgis.com/javascript/latest/api-reference/esri-widgets-Feature.html#graphic) + * + * @default null + */ + graphic: Graphic; + /** + * The title for the feature. + * + * [Read more...](https://developers.arcgis.com/javascript/latest/api-reference/esri-widgets-Feature.html#title) + * + * @default null + */ + readonly title: string; + /** + * A reference to the [MapView](https://developers.arcgis.com/javascript/latest/api-reference/esri-views-MapView.html) or [SceneView](https://developers.arcgis.com/javascript/latest/api-reference/esri-views-SceneView.html). Set this to link the widget to a specific view. + * + * [Read more...](https://developers.arcgis.com/javascript/latest/api-reference/esri-widgets-Feature.html#view) + * + * @default null + */ + view: MapView | SceneView; + /** + * The view model for this widget. This is a class that contains all the logic (properties and methods) that controls this widget's behavior. See the [FeatureViewModel](https://developers.arcgis.com/javascript/latest/api-reference/esri-widgets-Feature-FeatureViewModel.html) class to access all properties and methods on the widget. + * + * [Read more...](https://developers.arcgis.com/javascript/latest/api-reference/esri-widgets-Feature.html#viewModel) + */ + viewModel: FeatureViewModel; + + /** + * Paginates to a specified [media](esri-PopupTemplate.html#media) info object. For example, you may have [media](esri-PopupTemplate.html#media) content which contains multiple `mediaInfos`. This method allows you to specify the index of the `mediaInfos` you wish to display. + * + * [Read more...](https://developers.arcgis.com/javascript/latest/api-reference/esri-widgets-Feature.html#goToMedia) + * + * @param contentElementIndex The index position of the [media](esri-PopupTemplate.html#media) content element to be updated. + * @param mediaInfoIndex The index position of the [media](esri-PopupTemplate.html#media) info object you wish to display. + * + */ + goToMedia(contentElementIndex: number, mediaInfoIndex: number): void; + /** + * Paginates to the next [media](esri-PopupTemplate.html#media) info. + * + * [Read more...](https://developers.arcgis.com/javascript/latest/api-reference/esri-widgets-Feature.html#nextMedia) + * + * @param contentElementIndex The index position of the [media](esri-PopupTemplate.html#media) content element. + * + */ + nextMedia(contentElementIndex: number): void; + /** + * Paginates to the previous [media](esri-PopupTemplate.html#media) info in the specified [media](esri-PopupTemplate.html#media) content element. + * + * [Read more...](https://developers.arcgis.com/javascript/latest/api-reference/esri-widgets-Feature.html#previousMedia) + * + * @param contentElementIndex The index position of the [media](esri-PopupTemplate.html#media) content element. + * + */ + previousMedia(contentElementIndex: number): void; + /** + * *This method is primarily used by developers when implementing custom widgets.* It must be implemented by subclasses for rendering. + * + * [Read more...](https://developers.arcgis.com/javascript/latest/api-reference/esri-widgets-Feature.html#render) + * + * + */ + render(): any; + } + + interface FeatureConstructor { + + + new(properties?: FeatureProperties): Feature; + } + + export const Feature: FeatureConstructor; + + interface FeatureProperties extends WidgetProperties { + /** + * The [Graphic](https://developers.arcgis.com/javascript/latest/api-reference/esri-Graphic.html) used to represent the feature. + * + * [Read more...](https://developers.arcgis.com/javascript/latest/api-reference/esri-widgets-Feature.html#graphic) + * + * @default null + */ + graphic?: GraphicProperties; + /** + * A reference to the [MapView](https://developers.arcgis.com/javascript/latest/api-reference/esri-views-MapView.html) or [SceneView](https://developers.arcgis.com/javascript/latest/api-reference/esri-views-SceneView.html). Set this to link the widget to a specific view. + * + * [Read more...](https://developers.arcgis.com/javascript/latest/api-reference/esri-widgets-Feature.html#view) + * + * @default null + */ + view?: MapViewProperties | SceneViewProperties; + /** + * The view model for this widget. This is a class that contains all the logic (properties and methods) that controls this widget's behavior. See the [FeatureViewModel](https://developers.arcgis.com/javascript/latest/api-reference/esri-widgets-Feature-FeatureViewModel.html) class to access all properties and methods on the widget. + * + * [Read more...](https://developers.arcgis.com/javascript/latest/api-reference/esri-widgets-Feature.html#viewModel) + */ + viewModel?: FeatureViewModelProperties; + } + + interface FeatureViewModel extends Accessor { + /** + * The [content](https://developers.arcgis.com/javascript/latest/api-reference/esri-widgets-Popup.html#content) of the feature. + * + * [Read more...](https://developers.arcgis.com/javascript/latest/api-reference/esri-widgets-Feature-FeatureViewModel.html#content) + * + * @default null + */ + readonly content: string | any[] | HTMLElement | Widget; + /** + * The formatted attributes calculated from `fieldInfo` [PopupTemplate](https://developers.arcgis.com/javascript/latest/api-reference/esri-PopupTemplate.html) content. They are obtained from the feature's [graphic](https://developers.arcgis.com/javascript/latest/api-reference/esri-widgets-Feature-FeatureViewModel.html#graphic) attribute values and can be read: + * * globally using the [fieldInfos](https://developers.arcgis.com/javascript/latest/api-reference/esri-PopupTemplate.html#fieldInfos) property directly at the root level of the [PopupTemplate](https://developers.arcgis.com/javascript/latest/api-reference/esri-PopupTemplate.html), or + * * per an individual content element. This element is defined with a type of fields on the PopupTemplate's content property. + * + * [Read more...](https://developers.arcgis.com/javascript/latest/api-reference/esri-widgets-Feature-FeatureViewModel.html#formattedAttributes) + * + * @default null + */ + readonly formattedAttributes: FeatureViewModelFormattedAttributes; + /** + * The [Graphic](https://developers.arcgis.com/javascript/latest/api-reference/esri-Graphic.html) used to represent the feature. + * + * [Read more...](https://developers.arcgis.com/javascript/latest/api-reference/esri-widgets-Feature-FeatureViewModel.html#graphic) + * + * @default null + */ + graphic: Graphic; + /** + * The title for the feature. + * + * [Read more...](https://developers.arcgis.com/javascript/latest/api-reference/esri-widgets-Feature-FeatureViewModel.html#title) + * + * @default null + */ + readonly title: string; + /** + * The view associated with the Feature instance. + * + * [Read more...](https://developers.arcgis.com/javascript/latest/api-reference/esri-widgets-Feature-FeatureViewModel.html#view) + * + * @default null + */ + view: MapView | SceneView; + /** + * Indicates whether the feature is currently waiting for all of its content to finish loading. + * + * [Read more...](https://developers.arcgis.com/javascript/latest/api-reference/esri-widgets-Feature-FeatureViewModel.html#waitingForContent) + * + * @default true + */ + readonly waitingForContent: boolean; + } + + interface FeatureViewModelConstructor { + + + new(properties?: FeatureViewModelProperties): FeatureViewModel; + } + + export const FeatureViewModel: FeatureViewModelConstructor; + + interface FeatureViewModelProperties { + /** + * The [Graphic](https://developers.arcgis.com/javascript/latest/api-reference/esri-Graphic.html) used to represent the feature. + * + * [Read more...](https://developers.arcgis.com/javascript/latest/api-reference/esri-widgets-Feature-FeatureViewModel.html#graphic) + * + * @default null + */ + graphic?: GraphicProperties; + /** + * The view associated with the Feature instance. + * + * [Read more...](https://developers.arcgis.com/javascript/latest/api-reference/esri-widgets-Feature-FeatureViewModel.html#view) + * + * @default null + */ + view?: MapViewProperties | SceneViewProperties; + } + + + export interface FeatureViewModelFormattedAttributes extends Object { + /** + * The formatted attributes specified at the root level of the [PopupTemplate](https://developers.arcgis.com/javascript/latest/api-reference/esri-PopupTemplate.html) using the [PopupTemplate.fieldInfos](https://developers.arcgis.com/javascript/latest/api-reference/esri-PopupTemplate.html#fieldInfos) property. + * + * [Read more...](global.html) + */ + global?: any; + /** + * The formatted attributes for an individual content element. This is derived from the module:esri/PopupTemplate#fields content property of the [PopupTemplate](https://developers.arcgis.com/javascript/latest/api-reference/esri-PopupTemplate.html) defined as type `fields`. + * + * [Read more...](https://developers.arcgis.com/javascript/latest/api-reference/esri-widgets-Feature-FeatureViewModel.html#formattedAttributes) + */ + content?: any; + } + interface Fullscreen extends Widget { /** * The [HTMLElement](https://developer.mozilla.org/en-US/docs/Web/API/HTMLElement) to present in fullscreen mode. @@ -42521,6 +46848,18 @@ declare namespace __esri { } interface Home extends Widget { + /** + * The widget's default icon font. + * + * [Read more...](https://developers.arcgis.com/javascript/latest/api-reference/esri-widgets-Home.html#iconClass) + */ + readonly iconClass: string; + /** + * The widget's default label. + * + * [Read more...](https://developers.arcgis.com/javascript/latest/api-reference/esri-widgets-Home.html#label) + */ + readonly label: string; /** * A reference to the [MapView](https://developers.arcgis.com/javascript/latest/api-reference/esri-views-MapView.html) or [SceneView](https://developers.arcgis.com/javascript/latest/api-reference/esri-views-SceneView.html). Set this to link the widget to a specific view. * @@ -42664,13 +47003,19 @@ declare namespace __esri { interface LayerList extends Widget { /** - * **Use [listItemCreatedFunction](https://developers.arcgis.com/javascript/latest/api-reference/esri-widgets-LayerList.html#listItemCreatedFunction) instead.** Specify the function that will create actions for [ListItems](https://developers.arcgis.com/javascript/latest/api-reference/esri-widgets-LayerList-ListItem.html). Actions are defined with the properties listed in the [Action class](https://developers.arcgis.com/javascript/latest/api-reference/esri-support-Action.html). This function must return a two-dimensional array of [Actions](https://developers.arcgis.com/javascript/latest/api-reference/esri-support-Action.html). + * The widget's default icon font. * - * [Read more...](https://developers.arcgis.com/javascript/latest/api-reference/esri-widgets-LayerList.html#createActionsFunction) + * [Read more...](https://developers.arcgis.com/javascript/latest/api-reference/esri-widgets-LayerList.html#iconClass) */ - createActionsFunction: Function; + readonly iconClass: string; /** - * Specifies a function that accesses each [ListItem](https://developers.arcgis.com/javascript/latest/api-reference/esri-widgets-LayerList-ListItem.html). Each list item can be modified according to its modifiable propeties. Actions can be added to list items using the [actionsSections](https://developers.arcgis.com/javascript/latest/api-reference/esri-widgets-LayerList-ListItem.html#actionsSections) property of the ListItem. + * The widget's default label. + * + * [Read more...](https://developers.arcgis.com/javascript/latest/api-reference/esri-widgets-LayerList.html#label) + */ + readonly label: string; + /** + * Specifies a function that accesses each [ListItem](https://developers.arcgis.com/javascript/latest/api-reference/esri-widgets-LayerList-ListItem.html). Each list item can be modified according to its modifiable properties. Actions can be added to list items using the [actionsSections](https://developers.arcgis.com/javascript/latest/api-reference/esri-widgets-LayerList-ListItem.html#actionsSections) property of the ListItem. * * [Read more...](https://developers.arcgis.com/javascript/latest/api-reference/esri-widgets-LayerList.html#listItemCreatedFunction) */ @@ -42732,13 +47077,7 @@ declare namespace __esri { interface LayerListProperties extends WidgetProperties { /** - * **Use [listItemCreatedFunction](https://developers.arcgis.com/javascript/latest/api-reference/esri-widgets-LayerList.html#listItemCreatedFunction) instead.** Specify the function that will create actions for [ListItems](https://developers.arcgis.com/javascript/latest/api-reference/esri-widgets-LayerList-ListItem.html). Actions are defined with the properties listed in the [Action class](https://developers.arcgis.com/javascript/latest/api-reference/esri-support-Action.html). This function must return a two-dimensional array of [Actions](https://developers.arcgis.com/javascript/latest/api-reference/esri-support-Action.html). - * - * [Read more...](https://developers.arcgis.com/javascript/latest/api-reference/esri-widgets-LayerList.html#createActionsFunction) - */ - createActionsFunction?: Function; - /** - * Specifies a function that accesses each [ListItem](https://developers.arcgis.com/javascript/latest/api-reference/esri-widgets-LayerList-ListItem.html). Each list item can be modified according to its modifiable propeties. Actions can be added to list items using the [actionsSections](https://developers.arcgis.com/javascript/latest/api-reference/esri-widgets-LayerList-ListItem.html#actionsSections) property of the ListItem. + * Specifies a function that accesses each [ListItem](https://developers.arcgis.com/javascript/latest/api-reference/esri-widgets-LayerList-ListItem.html). Each list item can be modified according to its modifiable properties. Actions can be added to list items using the [actionsSections](https://developers.arcgis.com/javascript/latest/api-reference/esri-widgets-LayerList-ListItem.html#actionsSections) property of the ListItem. * * [Read more...](https://developers.arcgis.com/javascript/latest/api-reference/esri-widgets-LayerList.html#listItemCreatedFunction) */ @@ -42772,12 +47111,6 @@ declare namespace __esri { } interface LayerListViewModel extends Accessor { - /** - * **Use [listItemCreatedFunction](https://developers.arcgis.com/javascript/latest/api-reference/esri-widgets-LayerList-LayerListViewModel.html#listItemCreatedFunction) instead.** Specify the function that will create actions for [ListItems](https://developers.arcgis.com/javascript/latest/api-reference/esri-widgets-LayerList-ListItem.html). Actions are defined with the properties listed in the [Action class](https://developers.arcgis.com/javascript/latest/api-reference/esri-support-Action.html). - * - * [Read more...](https://developers.arcgis.com/javascript/latest/api-reference/esri-widgets-LayerList-LayerListViewModel.html#createActionsFunction) - */ - createActionsFunction: Function; /** * Specifies a function that accesses each [ListItem](https://developers.arcgis.com/javascript/latest/api-reference/esri-widgets-LayerList-ListItem.html). Each list item can be modified according to its modifiable propeties. Actions can be added to list items using the [actionsSections](https://developers.arcgis.com/javascript/latest/api-reference/esri-widgets-LayerList-ListItem.html#actionsSections) property of the ListItem. * @@ -42826,12 +47159,6 @@ declare namespace __esri { export const LayerListViewModel: LayerListViewModelConstructor; interface LayerListViewModelProperties { - /** - * **Use [listItemCreatedFunction](https://developers.arcgis.com/javascript/latest/api-reference/esri-widgets-LayerList-LayerListViewModel.html#listItemCreatedFunction) instead.** Specify the function that will create actions for [ListItems](https://developers.arcgis.com/javascript/latest/api-reference/esri-widgets-LayerList-ListItem.html). Actions are defined with the properties listed in the [Action class](https://developers.arcgis.com/javascript/latest/api-reference/esri-support-Action.html). - * - * [Read more...](https://developers.arcgis.com/javascript/latest/api-reference/esri-widgets-LayerList-LayerListViewModel.html#createActionsFunction) - */ - createActionsFunction?: Function; /** * Specifies a function that accesses each [ListItem](https://developers.arcgis.com/javascript/latest/api-reference/esri-widgets-LayerList-ListItem.html). Each list item can be modified according to its modifiable propeties. Actions can be added to list items using the [actionsSections](https://developers.arcgis.com/javascript/latest/api-reference/esri-widgets-LayerList-ListItem.html#actionsSections) property of the ListItem. * @@ -42895,6 +47222,12 @@ declare namespace __esri { * @default false */ open: boolean; + /** + * Allows you to display custom content for each ListItem in the [LayerList](https://developers.arcgis.com/javascript/latest/api-reference/esri-widgets-LayerList.html) widget. A common scenario for using ListItemPanel is to display a [Legend](https://developers.arcgis.com/javascript/latest/api-reference/esri-widgets-Legend.html) widget within each list item. The `legend` keyword can be used in the [content](https://developers.arcgis.com/javascript/latest/api-reference/esri-widgets-LayerList-ListItemPanel.html#content) property of the panel to display a legend for each layer in the LayerList. + * + * [Read more...](https://developers.arcgis.com/javascript/latest/api-reference/esri-widgets-LayerList-ListItem.html#panel) + */ + panel: ListItemPanel; /** * The parent of this item * @@ -42965,13 +47298,103 @@ declare namespace __esri { export const ListItem: ListItemConstructor; + interface ListItemPanel { + /** + * Adds a CSS class used to style a node that represents the panel. Clicking the node will open and close the panel. Typically, an icon font is used for this property. [Esri Icon Fonts](https://developers.arcgis.com/javascript/latest/guide/esri-icon-font/index.html) are automatically made available and can be used to represent this content. To use one of these provided icon fonts, you must prefix the class name with `esri-`. For example, the default icon font is `esri-icon-layer-list`. + * + * [Read more...](https://developers.arcgis.com/javascript/latest/api-reference/esri-widgets-LayerList-ListItemPanel.html#className) + * + * @default esri-icon-layer-list + */ + className: string; + /** + * The content displayed in the ListItem panel. This can be raw text, a [Widget](https://developers.arcgis.com/javascript/latest/api-reference/esri-widgets-Widget.html) instance, an HTML Element, or an array of any of those elements. If the text `legend` is used, then an instance of the [Legend](https://developers.arcgis.com/javascript/latest/api-reference/esri-widgets-Legend.html) widget is placed in the content. + * + * [Read more...](https://developers.arcgis.com/javascript/latest/api-reference/esri-widgets-LayerList-ListItemPanel.html#content) + */ + content: Widget | HTMLElement | string | any[]; + /** + * The URL or data URI of an image used to represent the panel. This property will be used as a background image for the node. If neither `image` nor `className` are specified, a default icon ![default icon](https://developers.arcgis.com/javascript/latest/assets/img/guide/whats-new/41/default-action.png) will display. + * + * [Read more...](https://developers.arcgis.com/javascript/latest/api-reference/esri-widgets-LayerList-ListItemPanel.html#image) + */ + image: string; + /** + * The panel's parent ListItem that represents a layer in the map. + * + * [Read more...](https://developers.arcgis.com/javascript/latest/api-reference/esri-widgets-LayerList-ListItemPanel.html#listItem) + */ + listItem: ListItem; + /** + * Indicates if the panel's content is open and visible to the user. This is different from the [visible](https://developers.arcgis.com/javascript/latest/api-reference/esri-widgets-LayerList-ListItemPanel.html#visible) property, which is used for toggling the visibility of the icon used to control whether the content is expanded or collapsed. + * + * [Read more...](https://developers.arcgis.com/javascript/latest/api-reference/esri-widgets-LayerList-ListItemPanel.html#open) + * + * @default false + */ + open: boolean; + /** + * The title of the panel. By default, this title matches the ListItem's title. Changing this value will not change the title of the ListItem in the LayerList. + * + * [Read more...](https://developers.arcgis.com/javascript/latest/api-reference/esri-widgets-LayerList-ListItemPanel.html#title) + */ + title: string; + /** + * Indicates if the node containing the [image](https://developers.arcgis.com/javascript/latest/api-reference/esri-widgets-LayerList-ListItemPanel.html#image) or [icon font](https://developers.arcgis.com/javascript/latest/api-reference/esri-widgets-LayerList-ListItemPanel.html#className) is visible to the user. Setting this value to `false` will prevent the user from toggling the visibility of the panel's content. Use [open](https://developers.arcgis.com/javascript/latest/api-reference/esri-widgets-LayerList-ListItemPanel.html#open) to programmatically set the visibility of the panel's content. + * + * [Read more...](https://developers.arcgis.com/javascript/latest/api-reference/esri-widgets-LayerList-ListItemPanel.html#visible) + * + * @default true + */ + visible: boolean; + } + + interface ListItemPanelConstructor { + /** + * This class allows you to display custom content for each [ListItem](https://developers.arcgis.com/javascript/latest/api-reference/esri-widgets-LayerList-ListItem.html) in the [LayerList](https://developers.arcgis.com/javascript/latest/api-reference/esri-widgets-LayerList.html) widget. ListItemPanel objects typically aren't constructed. Rather, they are modified using the [listItemCreatedFunction](https://developers.arcgis.com/javascript/latest/api-reference/esri-widgets-LayerList.html#listItemCreatedFunction) property in the [LayerList](https://developers.arcgis.com/javascript/latest/api-reference/esri-widgets-LayerList.html) widget. + * + * [Read more...](https://developers.arcgis.com/javascript/latest/api-reference/esri-widgets-LayerList-ListItemPanel.html) + */ + + + new(): ListItemPanel; + } + + export const ListItemPanel: ListItemPanelConstructor; + interface Legend extends Widget { + /** + * The widget's default icon font. + * + * [Read more...](https://developers.arcgis.com/javascript/latest/api-reference/esri-widgets-Legend.html#iconClass) + */ + readonly iconClass: string; + /** + * The widget's default label. + * + * [Read more...](https://developers.arcgis.com/javascript/latest/api-reference/esri-widgets-Legend.html#label) + */ + readonly label: string; /** * Specifies a subset of the layers to display in the legend. If this property is not set, all layers in the map will display in the legend. Objects in this array are defined with the properties listed below. * * [Read more...](https://developers.arcgis.com/javascript/latest/api-reference/esri-widgets-Legend.html#layerInfos) */ layerInfos: LegendLayerInfos[]; + /** + * Indicates the style of the legend. The style determines the legend's layout and behavior. See the table below for a list of possible values. + * + * Value | Description + * ------|------------ + * classic | The legend has a portrait orientation. The user can scroll vertically when many elements are included in the legend's content. + * card | In wide views, the legend has a landscape orientation that allows users to scroll horizontally to view all legend elements. This style is responsive, making it ideal for mobile web apps. In smaller views, the legend collapses to occupy less space. One element is shown at a time in a card-style layout, which the user can navigate horizontally. + * + * + * [Read more...](https://developers.arcgis.com/javascript/latest/api-reference/esri-widgets-Legend.html#style) + * + * @default classic + */ + style: string; /** * A reference to the [MapView](https://developers.arcgis.com/javascript/latest/api-reference/esri-views-MapView.html) or [SceneView](https://developers.arcgis.com/javascript/latest/api-reference/esri-views-SceneView.html). Set this to link the widget to a specific view. * @@ -43008,6 +47431,20 @@ declare namespace __esri { * [Read more...](https://developers.arcgis.com/javascript/latest/api-reference/esri-widgets-Legend.html#layerInfos) */ layerInfos?: LegendLayerInfos[]; + /** + * Indicates the style of the legend. The style determines the legend's layout and behavior. See the table below for a list of possible values. + * + * Value | Description + * ------|------------ + * classic | The legend has a portrait orientation. The user can scroll vertically when many elements are included in the legend's content. + * card | In wide views, the legend has a landscape orientation that allows users to scroll horizontally to view all legend elements. This style is responsive, making it ideal for mobile web apps. In smaller views, the legend collapses to occupy less space. One element is shown at a time in a card-style layout, which the user can navigate horizontally. + * + * + * [Read more...](https://developers.arcgis.com/javascript/latest/api-reference/esri-widgets-Legend.html#style) + * + * @default classic + */ + style?: string; /** * A reference to the [MapView](https://developers.arcgis.com/javascript/latest/api-reference/esri-views-MapView.html) or [SceneView](https://developers.arcgis.com/javascript/latest/api-reference/esri-views-SceneView.html). Set this to link the widget to a specific view. * @@ -43055,6 +47492,20 @@ declare namespace __esri { * [Read more...](https://developers.arcgis.com/javascript/latest/api-reference/esri-widgets-Locate.html#graphic) */ graphic: Graphic; + /** + * The widget's default icon font. + * + * [Read more...](https://developers.arcgis.com/javascript/latest/api-reference/esri-widgets-Locate.html#iconClass) + */ + iconClass: string; + /** + * Indicates the scale to set on the view when navigating to the position of the geolocated result once a location is returned from the [track](https://developers.arcgis.com/javascript/latest/api-reference/esri-widgets-Locate.html#event:track) event. If a scale value is not explicitly set, then the view will navigate to a default scale of `2500`. For 2D views the value should be within the [effectiveMinScale](https://developers.arcgis.com/javascript/latest/api-reference/esri-views-MapView.html#constraints) and [effectiveMaxScale](https://developers.arcgis.com/javascript/latest/api-reference/esri-views-MapView.html#constraints). + * + * [Read more...](https://developers.arcgis.com/javascript/latest/api-reference/esri-widgets-Locate.html#scale) + * + * @default null + */ + scale: number; /** * Indicates whether the widget will automatically [rotate to user's direction](https://www.w3.org/TR/geolocation-API/#coordinates_interface). Set to `false` to disable this behavior. * @@ -43129,6 +47580,20 @@ declare namespace __esri { * [Read more...](https://developers.arcgis.com/javascript/latest/api-reference/esri-widgets-Locate.html#graphic) */ graphic?: GraphicProperties; + /** + * The widget's default icon font. + * + * [Read more...](https://developers.arcgis.com/javascript/latest/api-reference/esri-widgets-Locate.html#iconClass) + */ + iconClass?: string; + /** + * Indicates the scale to set on the view when navigating to the position of the geolocated result once a location is returned from the [track](https://developers.arcgis.com/javascript/latest/api-reference/esri-widgets-Locate.html#event:track) event. If a scale value is not explicitly set, then the view will navigate to a default scale of `2500`. For 2D views the value should be within the [effectiveMinScale](https://developers.arcgis.com/javascript/latest/api-reference/esri-views-MapView.html#constraints) and [effectiveMaxScale](https://developers.arcgis.com/javascript/latest/api-reference/esri-views-MapView.html#constraints). + * + * [Read more...](https://developers.arcgis.com/javascript/latest/api-reference/esri-widgets-Locate.html#scale) + * + * @default null + */ + scale?: number; /** * Indicates whether the widget will automatically [rotate to user's direction](https://www.w3.org/TR/geolocation-API/#coordinates_interface). Set to `false` to disable this behavior. * @@ -43188,6 +47653,18 @@ declare namespace __esri { } interface NavigationToggle extends Widget { + /** + * The widget's default icon font. + * + * [Read more...](https://developers.arcgis.com/javascript/latest/api-reference/esri-widgets-NavigationToggle.html#iconClass) + */ + readonly iconClass: string; + /** + * The widget's default label. + * + * [Read more...](https://developers.arcgis.com/javascript/latest/api-reference/esri-widgets-NavigationToggle.html#label) + */ + readonly label: string; /** * Sets the layout of the widget to either `horizontal` or `vertical`. See the table below for a list of possible values. * @@ -43415,7 +47892,13 @@ declare namespace __esri { */ readonly featureCount: number; /** - * An array of features associated with the popup. Each graphic in this array must have a valid [PopupTemplate](https://developers.arcgis.com/javascript/latest/api-reference/esri-PopupTemplate.html) set. They may share the same [PopupTemplate](https://developers.arcgis.com/javascript/latest/api-reference/esri-PopupTemplate.html) or have unique [PopupTemplates](https://developers.arcgis.com/javascript/latest/api-reference/esri-PopupTemplate.html) depending on their attributes. The [content](https://developers.arcgis.com/javascript/latest/api-reference/esri-widgets-Popup.html#content) and [title](https://developers.arcgis.com/javascript/latest/api-reference/esri-widgets-Popup.html#title) of the poup is set based on the `content` and `title` properties of each graphic's respective [PopupTemplate](https://developers.arcgis.com/javascript/latest/api-reference/esri-PopupTemplate.html). When more than one graphic exists in this array, the current content of the Popup is set based on the value of the [selected feature](https://developers.arcgis.com/javascript/latest/api-reference/esri-widgets-Popup.html#selectedFeature). This value is `null` if no features are associated with the popup. + * Shows pagination for the popup if available. This allows the user to scroll through various [selected features](https://developers.arcgis.com/javascript/latest/api-reference/esri-widgets-Popup.html#features) using either arrows ![popup-pagination-arrows](https://developers.arcgis.com/javascript/latest/assets/img/apiref/widgets/popup-pagination-arrows.png) or a menu. ![popup-feature-menu](https://developers.arcgis.com/javascript/latest/assets/img/apiref/widgets/popup-pagination-menu.png) + * + * [Read more...](https://developers.arcgis.com/javascript/latest/api-reference/esri-widgets-Popup.html#featureNavigationEnabled) + */ + featureNavigationEnabled: boolean; + /** + * An array of features associated with the popup. Each graphic in this array must have a valid [PopupTemplate](https://developers.arcgis.com/javascript/latest/api-reference/esri-PopupTemplate.html) set. They may share the same [PopupTemplate](https://developers.arcgis.com/javascript/latest/api-reference/esri-PopupTemplate.html) or have unique [PopupTemplates](https://developers.arcgis.com/javascript/latest/api-reference/esri-PopupTemplate.html) depending on their attributes. The [content](https://developers.arcgis.com/javascript/latest/api-reference/esri-widgets-Popup.html#content) and [title](https://developers.arcgis.com/javascript/latest/api-reference/esri-widgets-Popup.html#title) of the popup is set based on the `content` and `title` properties of each graphic's respective [PopupTemplate](https://developers.arcgis.com/javascript/latest/api-reference/esri-PopupTemplate.html). When more than one graphic exists in this array, the current content of the Popup is set based on the value of the [selected feature](https://developers.arcgis.com/javascript/latest/api-reference/esri-widgets-Popup.html#selectedFeature). This value is `null` if no features are associated with the popup. * * [Read more...](https://developers.arcgis.com/javascript/latest/api-reference/esri-widgets-Popup.html#features) */ @@ -43452,6 +47935,12 @@ declare namespace __esri { * [Read more...](https://developers.arcgis.com/javascript/latest/api-reference/esri-widgets-Popup.html#selectedFeatureIndex) */ selectedFeatureIndex: number; + /** + * Indicates whether to display a spinner at the popup location prior to its display when it has pending promises. + * + * [Read more...](https://developers.arcgis.com/javascript/latest/api-reference/esri-widgets-Popup.html#spinnerEnabled) + */ + spinnerEnabled: boolean; /** * The title of the popup. This can be set generically on the popup no matter the features that are selected. If the [selected feature](https://developers.arcgis.com/javascript/latest/api-reference/esri-widgets-Popup.html#selectedFeature) has a [PopupTemplate](https://developers.arcgis.com/javascript/latest/api-reference/esri-PopupTemplate.html), then the title set in the corresponding template is used here. * @@ -43633,7 +48122,13 @@ declare namespace __esri { */ dockOptions?: PopupDockOptions; /** - * An array of features associated with the popup. Each graphic in this array must have a valid [PopupTemplate](https://developers.arcgis.com/javascript/latest/api-reference/esri-PopupTemplate.html) set. They may share the same [PopupTemplate](https://developers.arcgis.com/javascript/latest/api-reference/esri-PopupTemplate.html) or have unique [PopupTemplates](https://developers.arcgis.com/javascript/latest/api-reference/esri-PopupTemplate.html) depending on their attributes. The [content](https://developers.arcgis.com/javascript/latest/api-reference/esri-widgets-Popup.html#content) and [title](https://developers.arcgis.com/javascript/latest/api-reference/esri-widgets-Popup.html#title) of the poup is set based on the `content` and `title` properties of each graphic's respective [PopupTemplate](https://developers.arcgis.com/javascript/latest/api-reference/esri-PopupTemplate.html). When more than one graphic exists in this array, the current content of the Popup is set based on the value of the [selected feature](https://developers.arcgis.com/javascript/latest/api-reference/esri-widgets-Popup.html#selectedFeature). This value is `null` if no features are associated with the popup. + * Shows pagination for the popup if available. This allows the user to scroll through various [selected features](https://developers.arcgis.com/javascript/latest/api-reference/esri-widgets-Popup.html#features) using either arrows ![popup-pagination-arrows](https://developers.arcgis.com/javascript/latest/assets/img/apiref/widgets/popup-pagination-arrows.png) or a menu. ![popup-feature-menu](https://developers.arcgis.com/javascript/latest/assets/img/apiref/widgets/popup-pagination-menu.png) + * + * [Read more...](https://developers.arcgis.com/javascript/latest/api-reference/esri-widgets-Popup.html#featureNavigationEnabled) + */ + featureNavigationEnabled?: boolean; + /** + * An array of features associated with the popup. Each graphic in this array must have a valid [PopupTemplate](https://developers.arcgis.com/javascript/latest/api-reference/esri-PopupTemplate.html) set. They may share the same [PopupTemplate](https://developers.arcgis.com/javascript/latest/api-reference/esri-PopupTemplate.html) or have unique [PopupTemplates](https://developers.arcgis.com/javascript/latest/api-reference/esri-PopupTemplate.html) depending on their attributes. The [content](https://developers.arcgis.com/javascript/latest/api-reference/esri-widgets-Popup.html#content) and [title](https://developers.arcgis.com/javascript/latest/api-reference/esri-widgets-Popup.html#title) of the popup is set based on the `content` and `title` properties of each graphic's respective [PopupTemplate](https://developers.arcgis.com/javascript/latest/api-reference/esri-PopupTemplate.html). When more than one graphic exists in this array, the current content of the Popup is set based on the value of the [selected feature](https://developers.arcgis.com/javascript/latest/api-reference/esri-widgets-Popup.html#selectedFeature). This value is `null` if no features are associated with the popup. * * [Read more...](https://developers.arcgis.com/javascript/latest/api-reference/esri-widgets-Popup.html#features) */ @@ -43664,6 +48159,12 @@ declare namespace __esri { * [Read more...](https://developers.arcgis.com/javascript/latest/api-reference/esri-widgets-Popup.html#selectedFeatureIndex) */ selectedFeatureIndex?: number; + /** + * Indicates whether to display a spinner at the popup location prior to its display when it has pending promises. + * + * [Read more...](https://developers.arcgis.com/javascript/latest/api-reference/esri-widgets-Popup.html#spinnerEnabled) + */ + spinnerEnabled?: boolean; /** * The title of the popup. This can be set generically on the popup no matter the features that are selected. If the [selected feature](https://developers.arcgis.com/javascript/latest/api-reference/esri-widgets-Popup.html#selectedFeature) has a [PopupTemplate](https://developers.arcgis.com/javascript/latest/api-reference/esri-PopupTemplate.html), then the title set in the corresponding template is used here. * @@ -43836,8 +48337,6 @@ declare namespace __esri { on(name: "trigger-action", eventHandler: PopupViewModelTriggerActionEventHandler): IHandle; - - on(name: "trigger-action", modifiers: string[], eventHandler: PopupViewModelTriggerActionEventHandler): IHandle; } interface PopupViewModelConstructor { @@ -44046,6 +48545,18 @@ declare namespace __esri { } interface Print extends Widget { + /** + * The widget's default icon font. + * + * [Read more...](https://developers.arcgis.com/javascript/latest/api-reference/esri-widgets-Print.html#iconClass) + */ + readonly iconClass: string; + /** + * The widget's default label. + * + * [Read more...](https://developers.arcgis.com/javascript/latest/api-reference/esri-widgets-Print.html#label) + */ + readonly label: string; /** * The URL of the REST endpoint of the Export Web Map Task. * @@ -44205,6 +48716,14 @@ declare namespace __esri { * [Read more...](https://developers.arcgis.com/javascript/latest/api-reference/esri-widgets-Print-TemplateOptions.html#copyright) */ copyright: string; + /** + * Resolution in dots per inch. + * + * [Read more...](https://developers.arcgis.com/javascript/latest/api-reference/esri-widgets-Print-TemplateOptions.html#dpi) + * + * @default 96 + */ + dpi: string; /** * The output format for the printed map. **Known Values:** pdf | png32 | png8 | jpg | gif | eps | svg | svgz * @@ -44223,14 +48742,14 @@ declare namespace __esri { * Value | Description * | --- | --- * map-only | Map does not contain any layout elements. Only map image is printed. - * a3-landscape | 16.54 x 11.69 in - * a3-portrait | 11.69 x 16.54 in - * a4-landscape | 11.69 x 8.27 in - * a4-portrait | 8.27 × 11.69 in - * letter-ansi-a-landscape | 11.0 x 8.5 in - * letter-ansi-a-portrait | 8.5 x 11.0 in - * tabloid-ansi-b-landscape| 17.0 x 11.0 in - * tabloid-ansi-b-portrait | 11.0 x 17.0 in + * a3-landscape | A3 Landscape + * a3-portrait | A3 Portrait + * a4-landscape | A4 Landscape + * a4-portrait | A4 Portrait + * letter-ansi-a-landscape | Letter ANSI A Landscape + * letter-ansi-a-portrait | Letter ANSI A Portrait + * tabloid-ansi-b-landscape| Tabloid ANSI B Landscape + * tabloid-ansi-b-portrait | Tabloid ANSI B Portrait * * * [Read more...](https://developers.arcgis.com/javascript/latest/api-reference/esri-widgets-Print-TemplateOptions.html#layout) @@ -44295,6 +48814,14 @@ declare namespace __esri { * [Read more...](https://developers.arcgis.com/javascript/latest/api-reference/esri-widgets-Print-TemplateOptions.html#copyright) */ copyright?: string; + /** + * Resolution in dots per inch. + * + * [Read more...](https://developers.arcgis.com/javascript/latest/api-reference/esri-widgets-Print-TemplateOptions.html#dpi) + * + * @default 96 + */ + dpi?: string; /** * The output format for the printed map. **Known Values:** pdf | png32 | png8 | jpg | gif | eps | svg | svgz * @@ -44313,14 +48840,14 @@ declare namespace __esri { * Value | Description * | --- | --- * map-only | Map does not contain any layout elements. Only map image is printed. - * a3-landscape | 16.54 x 11.69 in - * a3-portrait | 11.69 x 16.54 in - * a4-landscape | 11.69 x 8.27 in - * a4-portrait | 8.27 × 11.69 in - * letter-ansi-a-landscape | 11.0 x 8.5 in - * letter-ansi-a-portrait | 8.5 x 11.0 in - * tabloid-ansi-b-landscape| 17.0 x 11.0 in - * tabloid-ansi-b-portrait | 11.0 x 17.0 in + * a3-landscape | A3 Landscape + * a3-portrait | A3 Portrait + * a4-landscape | A4 Landscape + * a4-portrait | A4 Portrait + * letter-ansi-a-landscape | Letter ANSI A Landscape + * letter-ansi-a-portrait | Letter ANSI A Portrait + * tabloid-ansi-b-landscape| Tabloid ANSI B Landscape + * tabloid-ansi-b-portrait | Tabloid ANSI B Portrait * * * [Read more...](https://developers.arcgis.com/javascript/latest/api-reference/esri-widgets-Print-TemplateOptions.html#layout) @@ -44461,7 +48988,7 @@ declare namespace __esri { view?: MapViewProperties; } - interface Search extends Widget { + interface widgetsSearch extends Widget { /** * The [source](https://developers.arcgis.com/javascript/latest/api-reference/esri-widgets-Search.html#sources) object currently selected. Can be either a [feature layer](https://developers.arcgis.com/javascript/latest/api-reference/esri-layers-FeatureLayer.html) or a [locator task](https://developers.arcgis.com/javascript/latest/api-reference/esri-tasks-Locator.html). * @@ -44498,6 +49025,18 @@ declare namespace __esri { * [Read more...](https://developers.arcgis.com/javascript/latest/api-reference/esri-widgets-Search.html#defaultSource) */ readonly defaultSource: LocatorSource | FeatureLayerSource; + /** + * The widget's default icon font. + * + * [Read more...](https://developers.arcgis.com/javascript/latest/api-reference/esri-widgets-Search.html#iconClass) + */ + readonly iconClass: string; + /** + * The widget's default label. + * + * [Read more...](https://developers.arcgis.com/javascript/latest/api-reference/esri-widgets-Search.html#label) + */ + readonly label: string; /** * Enables location services within the widget. ![locationEnabled](https://developers.arcgis.com/javascript/latest/assets/img/apiref/widgets/search-locationEnabled.png) * > The use of this property is only supported on secure origins. To use it, switch your application to a secure origin, such as HTTPS. Note that localhost is considered "potentially secure" and can be used for easy testing in browsers that supports [Window.isSecureContext](https://developer.mozilla.org/en-US/docs/Web/API/Window/isSecureContext#Browser_compatibility) (currently Chrome and Firefox). @@ -44691,19 +49230,19 @@ declare namespace __esri { suggest(value?: string): IPromise; } - interface SearchConstructor { + interface widgetsSearchConstructor { /** * The Search widget provides a way to perform search operations on [locator service(s)](https://developers.arcgis.com/javascript/latest/api-reference/esri-tasks-Locator.html) and/or [map](https://developers.arcgis.com/javascript/latest/api-reference/esri-layers-MapImageLayer.html)/[feature](https://developers.arcgis.com/javascript/latest/api-reference/esri-layers-FeatureLayer.html) service feature layer(s). If using a locator with a geocoding service, the [findAddressCandidates](https://developers.arcgis.com/rest/geocode/api-reference/geocoding-find-address-candidates.htm) operation is used, whereas [queries](https://developers.arcgis.com/javascript/latest/api-reference/esri-tasks-support-Query.html) are used on feature layers. * * [Read more...](https://developers.arcgis.com/javascript/latest/api-reference/esri-widgets-Search.html) */ - new(properties?: SearchProperties): Search; + new(properties?: widgetsSearchProperties): widgetsSearch; } - export const Search: SearchConstructor; + export const widgetsSearch: widgetsSearchConstructor; - interface SearchProperties extends WidgetProperties { + interface widgetsSearchProperties extends WidgetProperties { /** * The selected source's index. This value is `-1` when all sources are selected. * @@ -45031,27 +49570,15 @@ declare namespace __esri { on(name: "search-clear", eventHandler: SearchViewModelSearchClearEventHandler): IHandle; - on(name: "search-clear", modifiers: string[], eventHandler: SearchViewModelSearchClearEventHandler): IHandle; - on(name: "search-start", eventHandler: SearchViewModelSearchStartEventHandler): IHandle; - on(name: "search-start", modifiers: string[], eventHandler: SearchViewModelSearchStartEventHandler): IHandle; - on(name: "suggest-start", eventHandler: SearchViewModelSuggestStartEventHandler): IHandle; - on(name: "suggest-start", modifiers: string[], eventHandler: SearchViewModelSuggestStartEventHandler): IHandle; - on(name: "search-complete", eventHandler: SearchViewModelSearchCompleteEventHandler): IHandle; - on(name: "search-complete", modifiers: string[], eventHandler: SearchViewModelSearchCompleteEventHandler): IHandle; - on(name: "select-result", eventHandler: SearchViewModelSelectResultEventHandler): IHandle; - on(name: "select-result", modifiers: string[], eventHandler: SearchViewModelSelectResultEventHandler): IHandle; - on(name: "suggest-complete", eventHandler: SearchViewModelSuggestCompleteEventHandler): IHandle; - - on(name: "suggest-complete", modifiers: string[], eventHandler: SearchViewModelSuggestCompleteEventHandler): IHandle; } interface SearchViewModelConstructor { @@ -46538,7 +51065,7 @@ declare namespace __esri { * * [Read more...](https://developers.arcgis.com/javascript/latest/api-reference/esri-widgets-Sketch-SketchViewModel.html#graphic) */ - graphic: Graphic; + readonly graphic: Graphic; /** * GraphicsLayer associated with the SketchViewModel. It allows you to organize where temporary graphics are placed when the drawing is completed. * @@ -46546,19 +51073,19 @@ declare namespace __esri { */ layer: GraphicsLayer; /** - * A simple marker symbol used for drawing point geometries. + * A simple marker symbol used for representing the point geometry that is being drawn. * * [Read more...](https://developers.arcgis.com/javascript/latest/api-reference/esri-widgets-Sketch-SketchViewModel.html#pointSymbol) */ pointSymbol: SimpleMarkerSymbol; /** - * A simple fill symbol used for drawing polygon geometries. + * A simple fill symbol used for representing the polygon geometry that is being drawn. * * [Read more...](https://developers.arcgis.com/javascript/latest/api-reference/esri-widgets-Sketch-SketchViewModel.html#polygonSymbol) */ polygonSymbol: SimpleFillSymbol; /** - * A simple line symbol used for drawing polyline geometries. + * A simple line symbol used for representing the polyline geometry that is being drawn. * * [Read more...](https://developers.arcgis.com/javascript/latest/api-reference/esri-widgets-Sketch-SketchViewModel.html#polylineSymbol) */ @@ -46587,14 +51114,33 @@ declare namespace __esri { */ complete(): void; /** - * Creates an instance of the requested draw action type. **Known Values:** point | multipoint | polyline | polygon + * Creates an instance of the requested draw action type. See the table below for a list of known values and type of draw action it creates. **Known Values:** point | multipoint | polyline | polygon | rectangle | circle + * + * Geometry type | Draw action instance + * ------------- | -------------------- + * point | [PointDrawAction](https://developers.arcgis.com/javascript/latest/api-reference/esri-views-2d-draw-PointDrawAction.html) + * multipoint | [MultipointDrawAction](https://developers.arcgis.com/javascript/latest/api-reference/esri-views-2d-draw-MultipointDrawAction.html) + * polyline | [PolylineDrawAction](https://developers.arcgis.com/javascript/latest/api-reference/esri-views-2d-draw-PolylineDrawAction.html) + * polygon | [PolygonDrawAction](https://developers.arcgis.com/javascript/latest/api-reference/esri-views-2d-draw-PolygonDrawAction.html) + * rectangle/square, circle/ellipse | [SegmentDrawAction](https://developers.arcgis.com/javascript/latest/api-reference/esri-views-2d-draw-SegmentDrawAction.html) + * + * **Note:** Creating circle does not work in all spatial references. * * [Read more...](https://developers.arcgis.com/javascript/latest/api-reference/esri-widgets-Sketch-SketchViewModel.html#create) * * @param drawAction Name of the draw action tool. + * @param drawOptions Object of the drawing options for the geometry to be created. + * @param drawOptions.mode + * The drawing mode. The drawing mode only applies when creating `polygon` and `polyline` geometries. **Known Values:** + * + * Value | Description | + * ----- | ----------- | + * hybrid | Vertices are added while the pointer is clicked or dragged. + * freehand | Vertices are added while the pointer is dragged. + * click | Vertices are added when the pointer is clicked. * */ - create(drawAction: string): void; + create(drawAction: string, drawOptions: SketchViewModelCreateDrawOptions): void; /** * Resets SketchViewModel to prepare for another create operation. Reset discards the current drawing, if called mid drawing. * @@ -46603,6 +51149,15 @@ declare namespace __esri { * */ reset(): void; + /** + * Starts an update operation for the selected geometry and fires [update-start](https://developers.arcgis.com/javascript/latest/api-reference/esri-widgets-Sketch-SketchViewModel.html#event:update-start) event. + * + * [Read more...](https://developers.arcgis.com/javascript/latest/api-reference/esri-widgets-Sketch-SketchViewModel.html#update) + * + * @param geometry The geometry to be updated. + * + */ + update(geometry: Geometry): void; } interface SketchViewModelConstructor { @@ -46618,12 +51173,6 @@ declare namespace __esri { export const SketchViewModel: SketchViewModelConstructor; interface SketchViewModelProperties { - /** - * Graphic representing the temporary geometry that is being drawn on the view. - * - * [Read more...](https://developers.arcgis.com/javascript/latest/api-reference/esri-widgets-Sketch-SketchViewModel.html#graphic) - */ - graphic?: GraphicProperties; /** * GraphicsLayer associated with the SketchViewModel. It allows you to organize where temporary graphics are placed when the drawing is completed. * @@ -46631,19 +51180,19 @@ declare namespace __esri { */ layer?: GraphicsLayerProperties; /** - * A simple marker symbol used for drawing point geometries. + * A simple marker symbol used for representing the point geometry that is being drawn. * * [Read more...](https://developers.arcgis.com/javascript/latest/api-reference/esri-widgets-Sketch-SketchViewModel.html#pointSymbol) */ pointSymbol?: SimpleMarkerSymbolProperties; /** - * A simple fill symbol used for drawing polygon geometries. + * A simple fill symbol used for representing the polygon geometry that is being drawn. * * [Read more...](https://developers.arcgis.com/javascript/latest/api-reference/esri-widgets-Sketch-SketchViewModel.html#polygonSymbol) */ polygonSymbol?: SimpleFillSymbolProperties; /** - * A simple line symbol used for drawing polyline geometries. + * A simple line symbol used for representing the polyline geometry that is being drawn. * * [Read more...](https://developers.arcgis.com/javascript/latest/api-reference/esri-widgets-Sketch-SketchViewModel.html#polylineSymbol) */ @@ -46656,6 +51205,25 @@ declare namespace __esri { view?: MapViewProperties; } + + export interface SketchViewModelCreateDrawOptions extends Object { + /** + * The drawing mode. The drawing mode only applies when creating `polygon` and `polyline` geometries. **Known Values:** + * + * Value | Description | + * ----- | ----------- | + * hybrid | Vertices are added while the pointer is clicked or dragged. + * freehand | Vertices are added while the pointer is dragged. + * click | Vertices are added when the pointer is clicked. + * + * + * [Read more...](https://developers.arcgis.com/javascript/latest/api-reference/esri-widgets-Sketch-SketchViewModel.html#create) + * + * @default hybrid + */ + mode?: string; + } + interface GeolocationPositioning { /** * The HTML5 Geolocation Position options for locating. Refer to [Geolocation API Specification](http://www.w3.org/TR/geolocation-API/#position-options) for details. @@ -46679,6 +51247,14 @@ declare namespace __esri { * [Read more...](https://developers.arcgis.com/javascript/latest/api-reference/esri-widgets-support-GeolocationPositioning.html#graphic) */ graphic: Graphic; + /** + * The scale to set on the view when navigating to the position of the geolocated result. If a scale value is not explicitly set, then the view will navigate to a default scale of `2500`. + * + * [Read more...](https://developers.arcgis.com/javascript/latest/api-reference/esri-widgets-support-GeolocationPositioning.html#scale) + * + * @default null + */ + scale: number; /** * The view associated with the widget. * @@ -46718,6 +51294,14 @@ declare namespace __esri { * [Read more...](https://developers.arcgis.com/javascript/latest/api-reference/esri-widgets-support-GeolocationPositioning.html#graphic) */ graphic?: GraphicProperties; + /** + * The scale to set on the view when navigating to the position of the geolocated result. If a scale value is not explicitly set, then the view will navigate to a default scale of `2500`. + * + * [Read more...](https://developers.arcgis.com/javascript/latest/api-reference/esri-widgets-support-GeolocationPositioning.html#scale) + * + * @default null + */ + scale?: number; /** * The view associated with the widget. * @@ -46736,6 +51320,16 @@ declare namespace __esri { * */ accessibleHandler(): Function; + /** + * Utility method used for creating CSS animation/transition functions. + * + * [Read more...](https://developers.arcgis.com/javascript/latest/api-reference/esri-widgets-support-widget.html#cssTransition) + * + * @param type The animation/transition type. **Possible Values:** enter | exit + * @param className The animation/transition class name. + * + */ + cssTransition(type: string, className: string): Function; /** * Utility method used for joining CSS classes. * @@ -46810,6 +51404,26 @@ declare namespace __esri { * [Read more...](https://developers.arcgis.com/javascript/latest/api-reference/esri-widgets-Track.html#graphic) */ graphic: Graphic; + /** + * The widget's default icon font. + * + * [Read more...](https://developers.arcgis.com/javascript/latest/api-reference/esri-widgets-Track.html#iconClass) + */ + readonly iconClass: string; + /** + * The widget's default label. + * + * [Read more...](https://developers.arcgis.com/javascript/latest/api-reference/esri-widgets-Track.html#label) + */ + readonly label: string; + /** + * Indicates the scale to set on the view when navigating to the position of the geolocated result once a location is returned from the [track](https://developers.arcgis.com/javascript/latest/api-reference/esri-widgets-Track.html#event:track) event. If a scale value is not explicitly set, then the view will navigate to a default scale of `2500`. For 2D views the value should be within the [effectiveMinScale](https://developers.arcgis.com/javascript/latest/api-reference/esri-views-MapView.html#constraints) and [effectiveMaxScale](https://developers.arcgis.com/javascript/latest/api-reference/esri-views-MapView.html#constraints). + * + * [Read more...](https://developers.arcgis.com/javascript/latest/api-reference/esri-widgets-Track.html#scale) + * + * @default null + */ + scale: number; /** * Indicates whether the widget is watching for new positions. * @@ -46900,6 +51514,14 @@ declare namespace __esri { * [Read more...](https://developers.arcgis.com/javascript/latest/api-reference/esri-widgets-Track.html#graphic) */ graphic?: GraphicProperties; + /** + * Indicates the scale to set on the view when navigating to the position of the geolocated result once a location is returned from the [track](https://developers.arcgis.com/javascript/latest/api-reference/esri-widgets-Track.html#event:track) event. If a scale value is not explicitly set, then the view will navigate to a default scale of `2500`. For 2D views the value should be within the [effectiveMinScale](https://developers.arcgis.com/javascript/latest/api-reference/esri-views-MapView.html#constraints) and [effectiveMaxScale](https://developers.arcgis.com/javascript/latest/api-reference/esri-views-MapView.html#constraints). + * + * [Read more...](https://developers.arcgis.com/javascript/latest/api-reference/esri-widgets-Track.html#scale) + * + * @default null + */ + scale?: number; /** * Indicates whether the widget will automatically [rotate to user's direction](https://www.w3.org/TR/geolocation-API/#coordinates_interface). Set to `false` to disable this behavior. * @@ -47181,7 +51803,7 @@ declare namespace __esri { */ max: number; /** - * The minimum of all all data values represented in the size and color visual variables. + * The minimum of all data values represented in the size and color visual variables. * * [Read more...](https://developers.arcgis.com/javascript/latest/api-reference/esri-widgets-UnivariateColorSizeSlider.html#statistics) */ @@ -47214,6 +51836,22 @@ declare namespace __esri { */ id: string; + /** + * A utility method used for building the value for a widget's `class` property. This aids in simplifying CSS class setup. + * > Prior to version 4.7, there were various approaches towards setting CSS classes. These were dependant upon variables, such as whether the classes were: + * * a single static class, + * * multiple static classes, or + * * dynamic classes. + * + * + * This helper method takes all of these approaches into account and simplifies it to use one single pattern to accommodate these multiple approaches. + * + * [Read more...](https://developers.arcgis.com/javascript/latest/api-reference/esri-widgets-Widget.html#classes) + * + * @param classNames The class names. + * + */ + classes(...classNames: (string | string[] | any)[]): string; /** * Destroys the widget instance. * @@ -47256,7 +51894,7 @@ declare namespace __esri { */ scheduleRender(): void; /** - * Finalizes the creation of the widget. + * **Deprecated.** Finalizes the creation of the widget. * * [Read more...](https://developers.arcgis.com/javascript/latest/api-reference/esri-widgets-Widget.html#startup) * @@ -47360,6 +51998,18 @@ declare namespace __esri { } interface Zoom extends Widget { + /** + * The widget's default icon font. + * + * [Read more...](https://developers.arcgis.com/javascript/latest/api-reference/esri-widgets-Zoom.html#iconClass) + */ + readonly iconClass: string; + /** + * The widget's default label. + * + * [Read more...](https://developers.arcgis.com/javascript/latest/api-reference/esri-widgets-Zoom.html#label) + */ + readonly label: string; /** * Determines the layout/orientation of the Zoom widget. **Known Values:** vertical | horizontal * @@ -47521,6 +52171,10 @@ declare namespace __esri { export type MultipointDrawActionDrawCompleteEventHandler = (event: MultipointDrawActionDrawCompleteEvent) => void; + export type MultipointDrawActionRedoEventHandler = (event: MultipointDrawActionRedoEvent) => void; + + export type MultipointDrawActionUndoEventHandler = (event: MultipointDrawActionUndoEvent) => void; + export type MultipointDrawActionVertexAddEventHandler = (event: MultipointDrawActionVertexAddEvent) => void; export type MultipointDrawActionVertexRemoveEventHandler = (event: MultipointDrawActionVertexRemoveEvent) => void; @@ -47541,6 +52195,10 @@ declare namespace __esri { export type PolygonDrawActionDrawCompleteEventHandler = (event: PolygonDrawActionDrawCompleteEvent) => void; + export type PolygonDrawActionRedoEventHandler = (event: PolygonDrawActionRedoEvent) => void; + + export type PolygonDrawActionUndoEventHandler = (event: PolygonDrawActionUndoEvent) => void; + export type PolygonDrawActionVertexAddEventHandler = (event: PolygonDrawActionVertexAddEvent) => void; export type PolygonDrawActionVertexRemoveEventHandler = (event: PolygonDrawActionVertexRemoveEvent) => void; @@ -47549,6 +52207,10 @@ declare namespace __esri { export type PolylineDrawActionDrawCompleteEventHandler = (event: PolylineDrawActionDrawCompleteEvent) => void; + export type PolylineDrawActionRedoEventHandler = (event: PolylineDrawActionRedoEvent) => void; + + export type PolylineDrawActionUndoEventHandler = (event: PolylineDrawActionUndoEvent) => void; + export type PolylineDrawActionVertexAddEventHandler = (event: PolylineDrawActionVertexAddEvent) => void; export type PolylineDrawActionVertexRemoveEventHandler = (event: PolylineDrawActionVertexRemoveEvent) => void; @@ -47559,14 +52221,20 @@ declare namespace __esri { export type SceneLayerLayerviewDestroyEventHandler = (event: SceneLayerLayerviewDestroyEvent) => void; + export type SceneViewBlurEventHandler = (event: SceneViewBlurEvent) => void; + export type SceneViewClickEventHandler = (event: SceneViewClickEvent) => void; export type SceneViewDoubleClickEventHandler = (event: SceneViewDoubleClickEvent) => void; export type SceneViewDragEventHandler = (event: SceneViewDragEvent) => void; + export type SceneViewFocusEventHandler = (event: SceneViewFocusEvent) => void; + export type SceneViewHoldEventHandler = (event: SceneViewHoldEvent) => void; + export type SceneViewImmediateClickEventHandler = (event: SceneViewImmediateClickEvent) => void; + export type SceneViewKeyDownEventHandler = (event: SceneViewKeyDownEvent) => void; export type SceneViewKeyUpEventHandler = (event: SceneViewKeyUpEvent) => void; @@ -47601,6 +52269,12 @@ declare namespace __esri { export type SearchViewModelSuggestStartEventHandler = (event: SearchViewModelSuggestStartEvent) => void; + export type SegmentDrawActionCursorUpdateEventHandler = (event: SegmentDrawActionCursorUpdateEvent) => void; + + export type SegmentDrawActionDrawCompleteEventHandler = (event: SegmentDrawActionDrawCompleteEvent) => void; + + export type SegmentDrawActionVertexAddEventHandler = (event: SegmentDrawActionVertexAddEvent) => void; + export type StreamLayerLayerviewCreateEventHandler = (event: StreamLayerLayerviewCreateEvent) => void; export type StreamLayerLayerviewDestroyEventHandler = (event: StreamLayerLayerviewDestroyEvent) => void; @@ -47696,9 +52370,14 @@ declare module "esri/core/Collection" { export = Collection; } -declare module "esri/core/workers/Connection" { - import Connection = __esri.Connection; - export = Connection; +declare module "esri/core/Handles" { + import Handles = __esri.Handles; + export = Handles; +} + +declare module "esri/core/HandleOwner" { + import HandleOwner = __esri.HandleOwner; + export = HandleOwner; } declare module "esri/geometry/Circle" { @@ -47721,6 +52400,11 @@ declare module "esri/geometry/HeightModelInfo" { export = HeightModelInfo; } +declare module "esri/geometry/Mesh" { + import Mesh = __esri.Mesh; + export = Mesh; +} + declare module "esri/geometry/Multipoint" { import Multipoint = __esri.Multipoint; export = Multipoint; @@ -47751,6 +52435,31 @@ declare module "esri/geometry/SpatialReference" { export = SpatialReference; } +declare module "esri/geometry/support/GeographicTransformation" { + import GeographicTransformation = __esri.GeographicTransformation; + export = GeographicTransformation; +} + +declare module "esri/geometry/support/GeographicTransformationStep" { + import GeographicTransformationStep = __esri.GeographicTransformationStep; + export = GeographicTransformationStep; +} + +declare module "esri/geometry/support/MeshComponent" { + import MeshComponent = __esri.MeshComponent; + export = MeshComponent; +} + +declare module "esri/geometry/support/ValueMeshColor" { + import ValueMeshColor = __esri.ValueMeshColor; + export = ValueMeshColor; +} + +declare module "esri/geometry/support/ImageMeshColor" { + import ImageMeshColor = __esri.ImageMeshColor; + export = ImageMeshColor; +} + declare module "esri/identity/Credential" { import Credential = __esri.Credential; export = Credential; @@ -47921,6 +52630,11 @@ declare module "esri/layers/support/Domain" { export = Domain; } +declare module "esri/layers/support/ElevationSampler" { + import ElevationSampler = __esri.ElevationSampler; + export = ElevationSampler; +} + declare module "esri/layers/support/Field" { import Field = __esri.Field; export = Field; @@ -47986,6 +52700,11 @@ declare module "esri/layers/support/RasterFunction" { export = RasterFunction; } +declare module "esri/layers/support/Relationship" { + import Relationship = __esri.Relationship; + export = Relationship; +} + declare module "esri/layers/support/Sublayer" { import Sublayer = __esri.Sublayer; export = Sublayer; @@ -48256,6 +52975,21 @@ declare module "esri/symbols/callouts/LineCallout3D" { export = LineCallout3D; } +declare module "esri/symbols/edges/Edges3D" { + import Edges3D = __esri.Edges3D; + export = Edges3D; +} + +declare module "esri/symbols/edges/SolidEdges3D" { + import SolidEdges3D = __esri.SolidEdges3D; + export = SolidEdges3D; +} + +declare module "esri/symbols/edges/SketchEdges3D" { + import SketchEdges3D = __esri.SketchEdges3D; + export = SketchEdges3D; +} + declare module "esri/tasks/ClosestFacilityTask" { import ClosestFacilityTask = __esri.ClosestFacilityTask; export = ClosestFacilityTask; @@ -48546,6 +53280,11 @@ declare module "esri/tasks/workflow/WorkflowTask" { export = WorkflowTask; } +declare module "esri/views/GroundView" { + import GroundView = __esri.GroundView; + export = GroundView; +} + declare module "esri/views/MapView" { import MapView = __esri.MapView; export = MapView; @@ -48621,6 +53360,11 @@ declare module "esri/views/2d/draw/Draw" { export = Draw; } +declare module "esri/views/2d/draw/DrawAction" { + import DrawAction = __esri.DrawAction; + export = DrawAction; +} + declare module "esri/views/2d/draw/PointDrawAction" { import PointDrawAction = __esri.PointDrawAction; export = PointDrawAction; @@ -48641,11 +53385,21 @@ declare module "esri/views/2d/draw/MultipointDrawAction" { export = MultipointDrawAction; } +declare module "esri/views/2d/draw/SegmentDrawAction" { + import SegmentDrawAction = __esri.SegmentDrawAction; + export = SegmentDrawAction; +} + declare module "esri/webmap/InitialViewProperties" { import InitialViewProperties = __esri.InitialViewProperties; export = InitialViewProperties; } +declare module "esri/webscene/ApplicationProperties" { + import ApplicationProperties = __esri.ApplicationProperties; + export = ApplicationProperties; +} + declare module "esri/webscene/Environment" { import Environment = __esri.Environment; export = Environment; @@ -48671,6 +53425,31 @@ declare module "esri/webscene/Slide" { export = Slide; } +declare module "esri/webscene/applicationProperties/Search" { + import Search = __esri.Search; + export = Search; +} + +declare module "esri/webscene/applicationProperties/SearchLayer" { + import SearchLayer = __esri.SearchLayer; + export = SearchLayer; +} + +declare module "esri/webscene/applicationProperties/SearchLayerField" { + import SearchLayerField = __esri.SearchLayerField; + export = SearchLayerField; +} + +declare module "esri/webscene/applicationProperties/Viewing" { + import Viewing = __esri.Viewing; + export = Viewing; +} + +declare module "esri/widgets/AreaMeasurement3D" { + import AreaMeasurement3D = __esri.AreaMeasurement3D; + export = AreaMeasurement3D; +} + declare module "esri/widgets/Attribution" { import Attribution = __esri.Attribution; export = Attribution; @@ -48691,6 +53470,11 @@ declare module "esri/widgets/ColorSlider" { export = ColorSlider; } +declare module "esri/widgets/CoordinateConversion" { + import CoordinateConversion = __esri.CoordinateConversion; + export = CoordinateConversion; +} + declare module "esri/widgets/Compass" { import Compass = __esri.Compass; export = Compass; @@ -48711,6 +53495,11 @@ declare module "esri/widgets/Expand" { export = Expand; } +declare module "esri/widgets/Feature" { + import Feature = __esri.Feature; + export = Feature; +} + declare module "esri/widgets/Fullscreen" { import Fullscreen = __esri.Fullscreen; export = Fullscreen; @@ -48757,8 +53546,8 @@ declare module "esri/widgets/ScaleBar" { } declare module "esri/widgets/Search" { - import Search = __esri.Search; - export = Search; + import widgetsSearch = __esri.widgetsSearch; + export = widgetsSearch; } declare module "esri/widgets/SizeSlider" { @@ -48786,6 +53575,11 @@ declare module "esri/widgets/Zoom" { export = Zoom; } +declare module "esri/widgets/AreaMeasurement3D/AreaMeasurement3DViewModel" { + import AreaMeasurement3DViewModel = __esri.AreaMeasurement3DViewModel; + export = AreaMeasurement3DViewModel; +} + declare module "esri/widgets/Attribution/AttributionViewModel" { import AttributionViewModel = __esri.AttributionViewModel; export = AttributionViewModel; @@ -48796,6 +53590,11 @@ declare module "esri/widgets/BasemapGallery/BasemapGalleryViewModel" { export = BasemapGalleryViewModel; } +declare module "esri/widgets/BasemapGallery/support/BasemapGalleryItem" { + import BasemapGalleryItem = __esri.BasemapGalleryItem; + export = BasemapGalleryItem; +} + declare module "esri/widgets/BasemapGallery/support/LocalBasemapsSource" { import LocalBasemapsSource = __esri.LocalBasemapsSource; export = LocalBasemapsSource; @@ -48816,16 +53615,31 @@ declare module "esri/widgets/Compass/CompassViewModel" { export = CompassViewModel; } +declare module "esri/widgets/CoordinateConversion/CoordinateConversionViewModel" { + import CoordinateConversionViewModel = __esri.CoordinateConversionViewModel; + export = CoordinateConversionViewModel; +} + declare module "esri/widgets/Directions/DirectionsViewModel" { import DirectionsViewModel = __esri.DirectionsViewModel; export = DirectionsViewModel; } +declare module "esri/widgets/DirectLineMeasurement3D/DirectLineMeasurement3DViewModel" { + import DirectLineMeasurement3DViewModel = __esri.DirectLineMeasurement3DViewModel; + export = DirectLineMeasurement3DViewModel; +} + declare module "esri/widgets/Expand/ExpandViewModel" { import ExpandViewModel = __esri.ExpandViewModel; export = ExpandViewModel; } +declare module "esri/widgets/Feature/FeatureViewModel" { + import FeatureViewModel = __esri.FeatureViewModel; + export = FeatureViewModel; +} + declare module "esri/widgets/Fullscreen/FullscreenViewModel" { import FullscreenViewModel = __esri.FullscreenViewModel; export = FullscreenViewModel; @@ -48846,6 +53660,11 @@ declare module "esri/widgets/LayerList/ListItem" { export = ListItem; } +declare module "esri/widgets/LayerList/ListItemPanel" { + import ListItemPanel = __esri.ListItemPanel; + export = ListItemPanel; +} + declare module "esri/widgets/Locate/LocateViewModel" { import LocateViewModel = __esri.LocateViewModel; export = LocateViewModel; @@ -49031,6 +53850,11 @@ declare module "esri/core/requireUtils" { export = requireUtils; } +declare module "esri/core/scheduling" { + import scheduling = __esri.scheduling; + export = scheduling; +} + declare module "esri/core/urlUtils" { import urlUtils = __esri.urlUtils; export = urlUtils; @@ -49046,11 +53870,21 @@ declare module "esri/core/workers" { export = workers; } +declare module "esri/core/workers/Connection" { + import Connection = __esri.Connection; + export = Connection; +} + declare module "esri/core/accessorSupport/decorators" { import decorators = __esri.decorators; export = decorators; } +declare module "esri/geometry/coordinateFormatter" { + import coordinateFormatter = __esri.coordinateFormatter; + export = coordinateFormatter; +} + declare module "esri/geometry/geometryEngine" { import geometryEngine = __esri.geometryEngine; export = geometryEngine; @@ -49061,11 +53895,21 @@ declare module "esri/geometry/geometryEngineAsync" { export = geometryEngineAsync; } +declare module "esri/geometry/projection" { + import projection = __esri.projection; + export = projection; +} + declare module "esri/geometry/support/jsonUtils" { import jsonUtils = __esri.jsonUtils; export = jsonUtils; } +declare module "esri/geometry/support/meshUtils" { + import meshUtils = __esri.meshUtils; + export = meshUtils; +} + declare module "esri/geometry/support/normalizeUtils" { import normalizeUtils = __esri.normalizeUtils; export = normalizeUtils; @@ -49171,9 +54015,14 @@ declare module "esri/widgets/support/widget" { export = widget; } -declare module "esri/widgets/BasemapGallery/support/BasemapGalleryItem" { - import BasemapGalleryItem = __esri.BasemapGalleryItem; - export = BasemapGalleryItem; +declare module "esri/widgets/CoordinateConversion/support/Format" { + import Format = __esri.Format; + export = Format; +} + +declare module "esri/widgets/CoordinateConversion/support/Conversion" { + import Conversion = __esri.Conversion; + export = Conversion; } @@ -49185,6 +54034,7 @@ declare module "esri/geometry" { export import Polyline = __esri.Polyline; export import SpatialReference = __esri.SpatialReference; export import ScreenPoint = __esri.ScreenPoint; + export import Mesh = __esri.Mesh; - export type Geometry = Extent | Multipoint | Point | Polygon | Polyline; + export type Geometry = Extent | Multipoint | Point | Polygon | Polyline | Mesh; } diff --git a/types/arcgis-js-api/v3/index.d.ts b/types/arcgis-js-api/v3/index.d.ts index 391dfb6e0a..e4161412b5 100644 --- a/types/arcgis-js-api/v3/index.d.ts +++ b/types/arcgis-js-api/v3/index.d.ts @@ -1,6 +1,7 @@ -// Type definitions for ArcGIS API for JavaScript 3.23 +// Type definitions for ArcGIS API for JavaScript 3.24 // Project: https://developers.arcgis.com/javascript/3/ // Definitions by: Esri +// Bjorn Svensson // Definitions: https://github.com/DefinitelyTyped/DefinitelyTyped declare module "esri" { @@ -30,6 +31,7 @@ declare module "esri" { import LayerSource = require("esri/layers/LayerSource"); import GraphicsLayer = require("esri/layers/GraphicsLayer"); import SpatialReference = require("esri/SpatialReference"); + import GeographicTransformationStep = require("esri/geometry/GeographicTransformationStep"); import Layer = require("esri/layers/layer"); import SimpleFillSymbol = require("esri/symbols/SimpleFillSymbol"); import ArcGISImageServiceLayer = require("esri/layers/ArcGISImageServiceLayer"); @@ -42,6 +44,9 @@ declare module "esri" { import FillSymbol = require("esri/symbols/FillSymbol"); import PrintTemplate = require("esri/tasks/PrintTemplate"); import QueryTask = require("esri/tasks/QueryTask"); + import DataProviderGE = require("esri/dijit/geoenrichment/ReportPlayer/DataProviderGE"); + import PlayerResizeModes = require("esri/dijit/geoenrichment/ReportPlayer/PlayerResizeModes"); + import PlayerThemes = require("esri/dijit/geoenrichment/ReportPlayer/PlayerThemes"); import TextSymbol = require("esri/symbols/TextSymbol"); import StandardGeographyQueryTask = require("esri/tasks/geoenrichment/StandardGeographyQueryTask"); import WCSConnection = require("esri/layers/WCSConnection"); @@ -943,6 +948,8 @@ declare module "esri" { useMapTime?: boolean; /** Initial visibility of the layer. */ visible?: boolean; + /** Indicates if the layer will enable WebGL for rendering. */ + webglEnabled?: boolean; } export interface FeatureLayerStatisticsOptions { /** The feature layer that will be the source for calculating statistics. */ @@ -1152,6 +1159,16 @@ declare module "esri" { /** Scale to zoom to when geocoder does not return an extent. */ zoomScale?: number; } + export interface GeographicTransformationOptions { + /** Geographic transformation steps. */ + steps?: GeographicTransformationStep[]; + } + export interface GeographicTransformationStepOptions { + /** The well-known id (wkid) that represents a known geographic transformation. */ + wkid?: number; + /** The well-known text (wkt) that represents a known geographic transformation. */ + wkt?: string; + } export interface GeometryLocationProviderOptions { /** The attribute field in the graphic object that contains the JSON string representing the geometry. */ geometryField: string; @@ -1475,6 +1492,8 @@ declare module "esri" { sliderStyle?: string; /** When true, for Apple computers with a trackpad or magic mouse use, swipe pans instead of zooming. */ smartNavigation?: boolean; + /** Indicates whether to enable WebGL rendering for FeatureLayers in the map. */ + webglEnabled?: boolean; /** When true, supports continuous pan across the dateline. */ wrapAround180?: boolean; /** Initial zoom level of the map. */ @@ -1876,6 +1895,16 @@ declare module "esri" { /** Stores positions represented as numbers that fall between minimum and maximum. */ values: number[]; } + export interface ReportPlayerOptions { + /** Specifies which export options are available for the report. */ + dataProvider?: DataProviderGE; + /** Indicate whether to display the report in slide view or full screen, defaults to false which is full view. */ + isSlidesView?: boolean; + /** Specifies the resize mode of the ReportPlayer. */ + resizeMode?: PlayerResizeModes; + /** Specifies the theme of the ReportPlayer. */ + theme?: PlayerThemes; + } export interface RingBufferOptions { /** The radii to use to create ring buffers */ radii: number[]; @@ -2553,6 +2582,8 @@ declare module "esri/IdentityManagerBase" { class IdentityManagerBase { /** The suggested lifetime of the token in minutes. */ tokenValidity: number; + /** If your application is on the same domain as *.arcgis.com or ArcGIS Enterprise Server, the IdentityManager will redirect the user to its sign-in page. */ + useSignInPage: boolean; /** * Returns the credential (via Deferred) if the user has already signed in to access the given resource. * @param resUrl The resource URL. @@ -2625,7 +2656,7 @@ declare module "esri/IdentityManagerBase" { */ setProtocolErrorHandler(handlerFunction: Function): void; /** - * When accessing secure resources from ArcGIS.com or one of its sub-domains the IdentityManager redirects the user to the ArcGIS.com sign-in page. + * If your application is on the same domain as *.arcgis.com or ArcGIS Enterprise Server, the IdentityManager will redirect the user to its sign-in page. * @param handlerFunction When called, the function passed to setRedirectionHandler receives an object containing redirection properties. */ setRedirectionHandler(handlerFunction: Function): void; @@ -3736,9 +3767,11 @@ declare module "esri/dijit/ClassedColorSlider" { startup(): void; /** Fires when the ClassedColorSlider widget properties change. */ on(type: "change", listener: (event: { breakInfos: any; target: ClassedColorSlider }) => void): esri.Handle; - /** Fires when minValue or maxValue of the ClassedColorSlider changes. */ + /** Fires during slide and slide stop, and when a handle or the minValue or maxValue of the slider are updated via text box. */ + on(type: "data-change", listener: (event: { breakInfos: any[]; maxValue: number; minValue: number; target: ClassedColorSlider }) => void): esri.Handle; + /** Fires when minValue or maxValue are updated via textbox. */ on(type: "data-value-change", listener: (event: { breakInfos: any; maxValue: number; minValue: number; target: ClassedColorSlider }) => void): esri.Handle; - /** Fires when a ClassedColorSlider handle is moved. */ + /** Fires on slide stop and when a handle is updated via textbox. */ on(type: "handle-value-change", listener: (event: { breakInfos: any; target: ClassedColorSlider }) => void): esri.Handle; on(type: string, listener: (event: any) => void): esri.Handle; } @@ -3789,9 +3822,11 @@ declare module "esri/dijit/ClassedSizeSlider" { constructor(params: esri.ClassedSizeSliderOptions, srcNodeRef: Node | string); /** Fires when ClassedSizeSlider changes. */ on(type: "change", listener: (event: { breakInfos: any; target: ClassedSizeSlider }) => void): esri.Handle; - /** Fires when minValue or maxValue of the ClassedSizeSlider changes. */ + /** Fires during slide and slide stop, and when a handle or the minValue or maxValue of the slider are updated via text box. */ + on(type: "data-change", listener: (event: { breakInfos: any[]; maxValue: number; minValue: number; target: ClassedSizeSlider }) => void): esri.Handle; + /** Fires when minValue or maxValue are updated via textbox. */ on(type: "data-value-change", listener: (event: { breakInfos: any; maxValue: number; minValue: number; target: ClassedSizeSlider }) => void): esri.Handle; - /** Fires when a ClassedSizeSlider handle is moved. */ + /** Fires on slide stop and when a handle is updated via textbox. */ on(type: "handle-value-change", listener: (event: { breakInfos: any; target: ClassedSizeSlider }) => void): esri.Handle; on(type: string, listener: (event: any) => void): esri.Handle; } @@ -3850,9 +3885,11 @@ declare module "esri/dijit/ColorInfoSlider" { startup(): void; /** Fires when ColorInfoSlider changes. */ on(type: "change", listener: (event: { colorInfo: any; target: ColorInfoSlider }) => void): esri.Handle; - /** Fires when minValue or maxValue of the ColorInfoSlider changes. */ + /** Fires during slide and slide stop, and when a handle or the minValue or maxValue of the ColorInfoSlider are updated via text box. */ + on(type: "data-change", listener: (event: { colorInfo: any; maxValue: number; minValue: number; target: ColorInfoSlider }) => void): esri.Handle; + /** Fires when minValue or maxValue of the ColorInfoSlider are updated via text box. */ on(type: "data-value-change", listener: (event: { colorInfo: any; maxValue: number; minValue: number; target: ColorInfoSlider }) => void): esri.Handle; - /** Fires when a ColorInfoSlider handle is moved. */ + /** Fires on slide stop and when a handle is updated via textbox. */ on(type: "handle-value-change", listener: (event: { colorInfo: any; target: ColorInfoSlider }) => void): esri.Handle; /** Fires when the zoom state changes. */ on(type: "zoomed", listener: (event: { zoomed: boolean; target: ColorInfoSlider }) => void): esri.Handle; @@ -4069,7 +4106,7 @@ declare module "esri/dijit/ElevationProfile" { import esri = require("esri"); import Geometry = require("esri/geometry/Geometry"); - /** (Currently in beta)The Elevation Profile widget allows a user to create an elevation profile based on a polyline geometry input parameter or existing features.NOTE: Currently there is a known issue when creating an elevation profile that crosses the international dateline multiple times. */ + /** (Currently in beta)The Elevation Profile widget allows a user to create an elevation profile based on a polyline geometry input parameter or existing features. */ class ElevationProfile { /** The measurement unit of the polyline geometry. */ measureUnits: string; @@ -4452,7 +4489,7 @@ declare module "esri/dijit/HeatmapSlider" { constructor(params: esri.HeatmapSliderOptions, srcNodeRef: Node | string); /** Fires when HeatmapSlider changes. */ on(type: "change", listener: (event: { colorStops: any; target: HeatmapSlider }) => void): esri.Handle; - /** Fires when HeatmapSlider handle is moved. */ + /** Fires on slide stop and when a handle is updated via textbox. */ on(type: "handle-value-change", listener: (event: { colorStops: any; target: HeatmapSlider }) => void): esri.Handle; on(type: string, listener: (event: any) => void): esri.Handle; } @@ -5112,7 +5149,7 @@ declare module "esri/dijit/OpacitySlider" { on(type: "change", listener: (event: { opacityInfo: any; target: OpacitySlider }) => void): esri.Handle; /** Fires when minValue or maxValue of the OpacitySlider changes. */ on(type: "data-value-change", listener: (event: { maxValue: number; minValue: number; opacityInfo: any; target: OpacitySlider }) => void): esri.Handle; - /** Fires when an OpacitySlider handle is moved. */ + /** Fires on slide stop and when a handle is updated via textbox. */ on(type: "handle-value-change", listener: (event: { opacityInfo: any; target: OpacitySlider }) => void): esri.Handle; /** Fires when the zoom state changes. */ on(type: "zoomed", listener: (event: { zoomed: boolean; target: OpacitySlider }) => void): esri.Handle; @@ -5159,7 +5196,7 @@ declare module "esri/dijit/Popup" { import Graphic = require("esri/graphic"); import LineSymbol = require("esri/symbols/LineSymbol"); import Point = require("esri/geometry/Point"); - import MarkerSymbol = require("esri/symbols/MarkerSymbol"); + import SimpleMarkerSymbol = require("esri/symbols/SimpleMarkerSymbol"); /** The Popup class is an implementation of InfoWindow that inherits from InfoWindowBase to provide additional capabilities. */ class Popup extends InfoWindowBase { @@ -5194,7 +5231,7 @@ declare module "esri/dijit/Popup" { /** Specify the margin (in pixels) to leave at the top of the popup window when it is maximized. */ marginTop: number; /** Define the marker symbol used to highlight point features. */ - markerSymbol: MarkerSymbol; + markerSymbol: SimpleMarkerSymbol; /** Specify the x-offset (in pixels) used when positioning the popup. */ offsetX: number; /** Specify the y-offset (in pixels) used when positioning the popup. */ @@ -5700,9 +5737,11 @@ declare module "esri/dijit/SizeInfoSlider" { startup(): void; /** Fires when the SizeInfoSlider properties change. */ on(type: "change", listener: (event: { sizeInfo: any; target: SizeInfoSlider }) => void): esri.Handle; + /** Fires during slide and slide stop, and when a handle or the minValue or maxValue of the SizeInfoSlider are updated via text box. */ + on(type: "data-change", listener: (event: { maxValue: number; minValue: number; sizeInfo: any; target: SizeInfoSlider }) => void): esri.Handle; /** Fires when minValue or maxValue of the SizeInfoSlider changes. */ on(type: "data-value-change", listener: (event: { maxValue: number; minValue: number; sizeInfo: any; target: SizeInfoSlider }) => void): esri.Handle; - /** Fires when a SizeInfoSlider handle is moved. */ + /** Fires on slide stop and when a handle is updated via textbox. */ on(type: "handle-value-change", listener: (event: { sizeInfo: any; target: SizeInfoSlider }) => void): esri.Handle; /** Fires when the zoom state changes. */ on(type: "zoomed", listener: (event: { zoomed: boolean; target: SizeInfoSlider }) => void): esri.Handle; @@ -7454,6 +7493,94 @@ declare module "esri/dijit/geoenrichment/InfographicsOptionsItem" { export = InfographicsOptionsItem; } +declare module "esri/dijit/geoenrichment/ReportPlayer/DataProviderGE" { + import PlayerCommands = require("esri/dijit/geoenrichment/ReportPlayer/PlayerCommands"); + + /** Data Provider for the ReportPlayer which allows you to specify which export options are available when running the report. */ + class DataProviderGE { + /** + * Registers a export option which can be performed. + * @param playerCommand The export option to register to make available to the Report Player. + * @param label The display name of the export option. + */ + registerCommand(playerCommand: PlayerCommands, label?: string): void; + } + export = DataProviderGE; +} + +declare module "esri/dijit/geoenrichment/ReportPlayer/PlayerCommands" { + /** Enumerator of available export options that are available for the Report Player. */ + class PlayerCommands { + /** Generates a stand-alone HTML file which displays dynamic content, including interactive map and infographic panels for the run infographic report. */ + static DYNAMIC_HTML: any; + /** Generates a stand-alone HTML file without the dynamic interactivity of the DYNAMIC_HTML option for the run infographic report. */ + static HTML: any; + /** Generates an image of the run infographic report. */ + static IMAGE: any; + /** Generates a PDF file of the run infographic report. */ + static PDF: any; + /** Displays a print dialog for the run infographic report for printing directly from the web browser. */ + static PRINT: any; + } + export = PlayerCommands; +} + +declare module "esri/dijit/geoenrichment/ReportPlayer/PlayerResizeModes" { + /** Enumerator of available player resize mode options for the Report Player widget. */ + class PlayerResizeModes { + /** The Report Player will be auto-resizable for the pagination view, the size of the player will change to fit the content. */ + static AUTO: any; + /** The Report Player will be stretched and constrained to the browser window size. */ + static FIT_WINDOW: any; + /** The Report Player dimensions (height and width) will need to be set manually in CSS. */ + static MANUAL: any; + } + export = PlayerResizeModes; +} + +declare module "esri/dijit/geoenrichment/ReportPlayer/PlayerThemes" { + /** Enumerator of available theme options for displaying the Report Player. */ + class PlayerThemes { + /** Report Player will display in a dark theme. */ + static DARK: any; + /** Report Player will display in a light theme. */ + static LIGHT: any; + } + export = PlayerThemes; +} + +declare module "esri/dijit/geoenrichment/ReportPlayer/ReportPlayer" { + import esri = require("esri"); + import DataProviderGE = require("esri/dijit/geoenrichment/ReportPlayer/DataProviderGE"); + import PlayerResizeModes = require("esri/dijit/geoenrichment/ReportPlayer/PlayerResizeModes"); + import PlayerThemes = require("esri/dijit/geoenrichment/ReportPlayer/PlayerThemes"); + + /** The ReportPlayer widget runs infographic report templates for a provided analysis area. */ + class ReportPlayer { + /** Data Provider for the ReportPlayer which allows you to specify which export options are available when running the report. */ + dataProvider: DataProviderGE; + /** Indicate whether to display the report in slide view or full screen, defaults to false which is full view. */ + isSlidesView: boolean; + /** Specifies the resize mode of the ReportPlayer. */ + resizeModes: PlayerResizeModes; + /** Specifies the theme of the ReportPlayer. */ + theme: PlayerThemes; + /** + * Creates a new ReportPlayer dijit using the given DOM node. + * @param params Various parameters that can be used to configure the ReportPlayer. + * @param srcNode Reference or id of the HTML element where the widget should be rendered. + */ + constructor(params: esri.ReportPlayerOptions, srcNode?: Node | string); + /** + * Generates the report for the supplied parameters. + * @param dataProviderParams See the object specifications table below for the structure of the dataProviderParams object. + * @param playParams See the object specifications table below for the structure of the playParams object. + */ + playReport(dataProviderParams: any, playParams?: any): any; + } + export = ReportPlayer; +} + declare module "esri/dijit/util/busyIndicator" { /** This module provides the ability to create a busy indicator for a target. */ var busyIndicator: { @@ -7612,6 +7739,47 @@ declare module "esri/geometry/Extent" { export = Extent; } +declare module "esri/geometry/GeographicTransformation" { + import esri = require("esri"); + import GeographicTransformationStep = require("esri/geometry/GeographicTransformationStep"); + + /** Projecting your data between coordinate systems sometimes requires transforming between geographic coordinate systems. */ + class GeographicTransformation { + /** Geographic transformation steps. */ + steps: GeographicTransformationStep[]; + /** + * Creates a new GeographicTransformation object. + * @param params See options descriptions for further information. + */ + constructor(params?: esri.GeographicTransformationOptions); + /** Returns the inverse of the geographic transformation, calling this method or null if the transformation is not invertible. */ + getInverse(): GeographicTransformation; + } + export = GeographicTransformation; +} + +declare module "esri/geometry/GeographicTransformationStep" { + import esri = require("esri"); + + /** Represents a step in the process of transforming coordinates from one geographic coordinate system to another. */ + class GeographicTransformationStep { + /** Indicates whether the geographic transformation is inverted. */ + isInverse: boolean; + /** The well-known id (wkid) that represents a known geographic transformation. */ + wkid: number; + /** The well-known text (wkt) hat represents a known geographic transformation. */ + wkt: string; + /** + * Creates a new GeographicTransformationStep object. + * @param params See the params table for additional information. + */ + constructor(params?: esri.GeographicTransformationStepOptions); + /** Returns the inverse of the geographic transformation calling this method or null if the transformation is not invertible. */ + getInverse(): GeographicTransformationStep; + } + export = GeographicTransformationStep; +} + declare module "esri/geometry/Geometry" { import SpatialReference = require("esri/SpatialReference"); @@ -7987,6 +8155,77 @@ declare module "esri/geometry/ScreenPoint" { export = ScreenPoint; } +declare module "esri/geometry/coordinateFormatter" { + import SpatialReference = require("esri/SpatialReference"); + import Point = require("esri/geometry/Point"); + + /** This module converts between points and formatted coordinate notation strings such as: decimal degrees degrees, minutes, and secondsU.S. */ + var coordinateFormatter: { + /** + * Parses coordinates in latitude/longitude notation, and returns a Point representing that location. + * @param coordinates The latitude/longitude notation string for the coordinates. + * @param spatialReference A spatial reference for a geographic coordinate system that defines the datum and ellipsoid referenced by the latitude-longitude coordinates. + */ + fromLatitudeLongitude(coordinates: string, spatialReference?: SpatialReference): Point; + /** + * Parses coordinates in Military Grid Reference System (MGRS) notation, and returns a Point representing that location. + * @param coordinates The MGRS notation string for the coordinates. + * @param spatialReference A spatial reference for a geographic coordinate system that defines the datum and ellipsoid referenced by the MGRS coordinates. + * @param conversionMode The mode used by the given MGRS coordinates. + */ + fromMgrs(coordinates: string, spatialReference: SpatialReference, conversionMode: string): Point; + /** + * Parses coordinates in United States National Grid (USNG) notation, and returns a Point representing that location. + * @param coordinates The USNG notation string for the coordinates. + * @param spatialReference A spatial reference for a geographic coordinate system that defines the datum and ellipsoid referenced by the USNG coordinates. + */ + fromUsng(coordinates: string, spatialReference?: SpatialReference): Point; + /** + * Parses coordinates in Universal Transverse Mercator (UTM) notation, and returns a Point representing that location. + * @param coordinates The UTM notation string for the coordinates. + * @param spatialReference A spatial reference for a geographic coordinate system that defines the datum and ellipsoid referenced by the UTM coordinates. + * @param conversionMode The latitude notation scheme used by the given UTM coordinates, either a latitudinal band, or a hemisphere designator. + */ + fromUtm(coordinates: string, spatialReference: SpatialReference, conversionMode: string): Point; + /** Indicates if all dependencies of this module have been loaded. */ + isLoaded(): boolean; + /** Indicates if this module is supported in the current browser. */ + isSupported(): boolean; + /** Loads this module's dependencies. */ + load(): any; + /** + * Returns formatted coordinates in latitude/longitude notation representing the given point's location. + * @param point The location to be represented as a formatted latitude/longitude string. + * @param format The mode to use when formatting the latitude/longitude string. + * @param decimalPlaces The number of decimal places to use, it should be an integer from 0 to 16. + */ + toLatitudeLongitude(point: Point, format: string, decimalPlaces?: number): string; + /** + * Returns formatted coordinates in Military Grid Reference System (MGRS) notation representing the given point's location. + * @param point The location to be represented in MGRS notation. + * @param conversionMode The mode to use for the returned MGRS notation string. + * @param precision The precision with which to represent the coordinates. + * @param addSpaces Indicates whether the generated strings contain no spaces. + */ + toMgrs(point: Point, conversionMode: string, precision?: number, addSpaces?: boolean): string; + /** + * Returns formatted coordinates in United States National Grid (USNG) notation representing the given point's location. + * @param point The location to be represented in USNG notation. + * @param precision The precision with which to represent the coordinates. + * @param addSpaces Indicates whether the generated strings contain no spaces. + */ + toUsng(point: Point, precision?: number, addSpaces?: boolean): string; + /** + * Returns formatted coordinates in Universal Transverse Mercator (UTM) notation representing the given point's location. + * @param point The location to be represented in UTM notation. + * @param conversionMode The latitude notation scheme to use in the returned UTM notation string, either a latitudinal band, or a hemisphere designator. + * @param addSpaces Indicates whether the generated strings contain no spaces. + */ + toUtm(point: Point, conversionMode: string, addSpaces?: boolean): string; + }; + export = coordinateFormatter; +} + declare module "esri/geometry/geodesicUtils" { import Polygon = require("esri/geometry/Polygon"); import Geometry = require("esri/geometry/Geometry"); @@ -8562,6 +8801,45 @@ declare module "esri/geometry/normalizeUtils" { export = normalizeUtils; } +declare module "esri/geometry/projection" { + import SpatialReference = require("esri/SpatialReference"); + import Extent = require("esri/geometry/Extent"); + import GeographicTransformation = require("esri/geometry/GeographicTransformation"); + import Geometry = require("esri/geometry/Geometry"); + + /** A client-side projection engine for converting geometries from one SpatialReference to another. */ + var projection: { + /** + * Gets the default geographic transformation used to convert the geometry from the input spatial reference to the output spatial reference. + * @param inSpatialReference The input spatial reference from which to project geometries. + * @param outSpatialReference The spatial reference to which you are converting the geometries. + * @param extent An extent used to determine the suitability of the returned transformation. + */ + getTransformation(inSpatialReference: SpatialReference, outSpatialReference: SpatialReference, extent?: Extent): GeographicTransformation; + /** + * Returns a list of all geographic transformations suitable to convert geometries from the input spatial reference to the specified output spatial reference. + * @param inSpatialReference The spatial reference that the geometries are currently using. + * @param outSpatialReference The spatial reference to which you are converting the geometries to. + * @param extent An extent used to determine the suitability of the returned transformations. + */ + getTransformations(inSpatialReference: SpatialReference, outSpatialReference: SpatialReference, extent?: Extent): GeographicTransformation[]; + /** Indicates if all dependencies of this module have been loaded. */ + isLoaded(): boolean; + /** Indicates if this module is supported in the browser. */ + isSupported(): boolean; + /** Load this module's dependencies. */ + load(): any; + /** + * Projects a geometry or an array of geometries to the specified output spatial reference. + * @param geometry The geometry or geometries to project. + * @param outSpatialReference The spatial reference to which you are converting the geometries' coordinates. + * @param geographicTransformation The geographic transformation used to transform the geometries. + */ + project(geometry: Geometry | Geometry[], outSpatialReference: SpatialReference, geographicTransformation?: GeographicTransformation): Geometry | Geometry[]; + }; + export = projection; +} + declare module "esri/geometry/scaleUtils" { import Map = require("esri/map"); import Extent = require("esri/geometry/Extent"); @@ -9677,6 +9955,8 @@ declare module "esri/layers/FeatureLayer" { version: number; /** When true, the layer is visible at the current map scale. */ visibleAtMapScale: boolean; + /** Indicates if WebGL is enabled on the layer. */ + webglEnabled: boolean; /** * Creates a new instance of a feature layer object from the ArcGIS Server REST resource identified by the input URL. * @param url URL to the ArcGIS Server REST resource that represents a feature service. @@ -9773,6 +10053,10 @@ declare module "esri/layers/FeatureLayer" { * @param feature A feature from this layer. */ getType(feature: Graphic): FeatureType; + /** Indicates whether an error is thrown after the layer updates. */ + hasUpdateError(): void; + /** Indicates if the layer is rendered in WebGL. */ + hasWebGLSurface(): boolean; /** Returns true if geometryType is esriGeometryMultipatch and multipatchOption is xyFootprint. */ hasXYFootprint(): boolean; /** Returns true if the FeatureLayer is editable. */ @@ -9934,6 +10218,11 @@ declare module "esri/layers/FeatureLayer" { * @param update When false the layer will not update its content based on the map's time extent. */ setUseMapTime(update: boolean): void; + /** + * Toggles WebGL rendering on/off on the layer. + * @param enable Indicates whether to enable WebGL on the layer. + */ + setWebGLEnabled(enable: boolean): void; /** Suspends layer drawing. */ suspend(): void; /** Returns an easily serializable object representation of the layer. */ @@ -11961,6 +12250,8 @@ declare module "esri/map" { timeExtent: TimeExtent; /** Indicates whether map is visible. */ visible: boolean; + /** Indicates if WebGL is enabled for rendering FeatureLayers in the map. */ + webglEnabled: boolean; /** Current width of the map in screen pixels. */ width: number; /** @@ -12164,6 +12455,11 @@ declare module "esri/map" { * @param visible If true, map will be visible. */ setVisibility(visible: boolean): Map; + /** + * Toggles WebGL rendering on/off for all FeatureLayers in the map. + * @param enable Indicates whether to enable WebGL rendering on the FeatureLayers in the map. + */ + setWebGLEnabled(enable: boolean): void; /** * Set the map zoom level to the given value. * @param zoom A valid zoom level value. @@ -15860,6 +16156,8 @@ declare module "esri/tasks/PrintTemplate" { class PrintTemplate { /** Define the map width, height and dpi. */ exportOptions: any; + /** When true, the feature's attributes are included in feature collection layers even when they are not needed for rendering. */ + forceFeatureAttributes: boolean; /** The print output format. */ format: string; /** The text that appears on the Print widget's print button. */ diff --git a/types/archiver/archiver-tests.ts b/types/archiver/archiver-tests.ts index 752d9cc944..dbb1df1de7 100644 --- a/types/archiver/archiver-tests.ts +++ b/types/archiver/archiver-tests.ts @@ -64,6 +64,6 @@ archiver.setModule(() => {}); archiver.pointer(); archiver.use(() => {}); -archiver.finalize().then(); +archiver.finalize(); archiver.symlink('./path', './target'); diff --git a/types/archiver/index.d.ts b/types/archiver/index.d.ts index df15f9ff65..d33e8ec6dd 100644 --- a/types/archiver/index.d.ts +++ b/types/archiver/index.d.ts @@ -35,7 +35,7 @@ declare namespace archiver { directory(dirpath: string, destpath: false | string, data?: EntryData | EntryDataFunction): this; file(filename: string, data: EntryData): this; glob(pattern: string, options?: glob.IOptions, data?: EntryData): this; - finalize(): Promise; + finalize(): void; setFormat(format: string): this; setModule(module: Function): this; diff --git a/types/argparse/argparse-tests.ts b/types/argparse/argparse-tests.ts index aef18b665b..ed714ada95 100644 --- a/types/argparse/argparse-tests.ts +++ b/types/argparse/argparse-tests.ts @@ -20,6 +20,12 @@ simpleExample.addArgument( help: 'bar foo', } ); +simpleExample.addArgument( + 'positional', + { + help: 'bar foo', + } +); simpleExample.printHelp(); console.log('-----------'); diff --git a/types/argparse/index.d.ts b/types/argparse/index.d.ts index d8907a2ecd..cf4d1f648e 100644 --- a/types/argparse/index.d.ts +++ b/types/argparse/index.d.ts @@ -2,6 +2,7 @@ // Project: https://github.com/nodeca/argparse // Definitions by: Andrew Schurman // Tomasz Łaziuk +// Sebastian Silbermann // Definitions: https://github.com/DefinitelyTyped/DefinitelyTyped // TypeScript Version: 2.2 @@ -34,7 +35,7 @@ export class SubParser { } export class ArgumentGroup { - addArgument(args: string[], options?: ArgumentOptions): void; + addArgument(args: string[] | string, options?: ArgumentOptions): void; addArgumentGroup(options?: ArgumentGroupOptions): ArgumentGroup; addMutuallyExclusiveGroup(options?: { required: boolean }): ArgumentGroup; setDefaults(options?: {}): void; diff --git a/types/arrify/arrify-tests.ts b/types/arrify/arrify-tests.ts index 319e86897a..3fee89133d 100644 --- a/types/arrify/arrify-tests.ts +++ b/types/arrify/arrify-tests.ts @@ -1,5 +1,6 @@ -import arrify = require("arrify"); +import * as arrify from 'arrify'; +/***************** arrify *****************/ arrify(null); arrify(null); @@ -12,3 +13,74 @@ arrify([2, 3]); function test(val?: string | string[]) { arrify(val); } +/***************** arrify *****************/ + +/***************** arrify *****************/ +arrify(undefined); // returns [] + +arrify(null); // returns [] + +{ + const value: number | string[] = 2018; + arrify(value); // returns [2018] +} + +{ + const value: number[] | string | string[] = ['a', 'b']; + arrify(value); // returns ['a', 'b'] +} +/***************** arrify *****************/ + +/***************** arrify *****************/ +arrify(undefined); + +arrify(null); + +{ + const value: boolean | number[] | string[] = true; + // returns [true] + arrify(value); +} + +{ + const value: boolean[] | number | string[] = ['a', 'b']; + // returns ['a', 'b'] + arrify(value); +} +/***************** arrify *****************/ + +/***************** arrify *****************/ +arrify(undefined); + +arrify(null); + +{ + const value: boolean | Date | number[] | string[] = new Date(2018); + // returns [ new Date(2018) ] + arrify(value); +} + +{ + const value: boolean[] | Date[] | number | string = [true, false]; + // returns [true, false] + arrify(value); +} +/***************** arrify *****************/ + +/***************** arrify *****************/ +arrify(undefined); + +arrify(null); + +{ + const value: boolean | Date | number[] | RegExp | string[] = /test/; + // returns [ /test/ ] + arrify(value); +} + +{ + const value: boolean[] | Date[] | number | RegExp[] | string = [/test1/, /test2/]; + // returns [/test1/, /test2/] + arrify(value); +} +/***************** arrify *****************/ diff --git a/types/arrify/index.d.ts b/types/arrify/index.d.ts index a1dda1b9ec..7c3c588ea6 100644 --- a/types/arrify/index.d.ts +++ b/types/arrify/index.d.ts @@ -14,4 +14,78 @@ * arrify([2, 3]) // returns [2, 3] */ declare function arrify(val: undefined | null | T | T[]): T[]; + +/** + * @example + * // returns [] + * arrify(undefined); + * @example + * // returns [] + * arrify(null); + * @example + * let value: number | string[] = 2018; + * // returns [2018] + * arrify(value); + * @example + * let value: number[] | string | string[] = ['a', 'b']; + * // returns ['a', 'b'] + * arrify(value); + */ +declare function arrify(val: undefined | null | T1 | T2 | T1[] | T2[]): T1[] | T2[]; + +/** + * @example + * // returns [] + * arrify(undefined); + * @example + * // returns [] + * arrify(null); + * @example + * let value: boolean | number[] | string[] = true; + * // returns [true] + * arrify(value); + * @example + * let value: boolean[] | number | string[] = ['a', 'b']; + * // returns ['a', 'b'] + * arrify(value); + */ +declare function arrify(val: undefined | null | T1 | T2 | T3 | T1[] | T2[] | T3[]): T1[] | T2[] | T3[]; + +/** + * @example + * // returns [] + * arrify(undefined); + * @example + * // returns [] + * arrify(null); + * @example + * let value: boolean | Date | number[] | string[] = new Date(2018); + * // returns [ new Date(2018) ] + * arrify(value); + * @example + * let value: boolean[] | Date[] | number | string = [true, false]; + * // returns [true, false] + * arrify(value); + */ +declare function arrify(val: undefined | null | T1 | T2 | T3 | T4 | T1[] | T2[] | T3[] | T4[]): T1[] | T2[] | T3[] | T4[]; + +/** + * @example + * // returns [] + * arrify(undefined); + * @example + * // returns [] + * arrify(null); + * @example + * let value: boolean | Date | number[] | RegExp | string[] = /test/; + * // returns [ /test/ ] + * arrify(value); + * @example + * let value: boolean[] | Date[] | number | RegExp[] | string = [/test1/, /test2/]; + * // returns [/test1/, /test2/] + * arrify(value); + */ +declare function arrify(val: undefined | null | T1 | T2 | T3 | T4 | T5 | T1[] | T2[] | T3[] | T4[] | T5[]): T1[] | T2[] | T3[] | T4[] | T5[]; + +declare namespace arrify {} export = arrify; diff --git a/types/async-retry/async-retry-tests.ts b/types/async-retry/async-retry-tests.ts index 29c90b36c8..20dfc62c4b 100644 --- a/types/async-retry/async-retry-tests.ts +++ b/types/async-retry/async-retry-tests.ts @@ -1,4 +1,5 @@ -import { Options, RetryFunction, retry } from 'async-retry'; +import { Options, RetryFunction } from 'async-retry'; +import retry = require("async-retry"); const o: Options = { retries: 1, @@ -9,12 +10,12 @@ const o: Options = { onRetry: (e: Error) => 42 }; -retry( +const hello: Promise = retry( bail => 'hello', { retries: 3 } ); -retry( +const answer: Promise = retry( bail => Promise.resolve(42), { retries: 3 } ); diff --git a/types/async-retry/index.d.ts b/types/async-retry/index.d.ts index 38d0d8aeec..6b50c71b63 100644 --- a/types/async-retry/index.d.ts +++ b/types/async-retry/index.d.ts @@ -1,17 +1,25 @@ -// Type definitions for async-retry 1.1 +// Type definitions for async-retry 1.2 // Project: https://github.com/zeit/async-retry#readme // Definitions by: Albert Wu +// Pablo Rodríguez // Definitions: https://github.com/DefinitelyTyped/DefinitelyTyped -export function retry(fn: RetryFunction, opts: Options): Promise; +declare function AsyncRetry( + fn: AsyncRetry.RetryFunction, + opts: AsyncRetry.Options +): Promise; -export interface Options { - retries?: number; - factor?: number; - minTimeout?: number; - maxTimeout?: number; - randomize?: boolean; - onRetry?: (e: Error) => any; +declare namespace AsyncRetry { + interface Options { + retries?: number; + factor?: number; + minTimeout?: number; + maxTimeout?: number; + randomize?: boolean; + onRetry?: (e: Error) => any; + } + + type RetryFunction = (bail: (e: Error) => void, attempt: number) => A|Promise; } -export type RetryFunction = (bail: (e: Error) => A, attempt: number) => A|Promise; +export = AsyncRetry; diff --git a/types/async/index.d.ts b/types/async/index.d.ts index e2ecb522bc..961dd73ebb 100644 --- a/types/async/index.d.ts +++ b/types/async/index.d.ts @@ -168,8 +168,8 @@ export function forever(next: (next : ErrorCallback) => void, errBack: Err export function waterfall(tasks: Function[], callback?: AsyncResultCallback): void; export function compose(...fns: Function[]): Function; export function seq(...fns: Function[]): Function; -export function applyEach(fns: Function[], argsAndCallback: any[]): void; // applyEach(fns, args..., callback). TS does not support ... for a middle argument. Callback is optional. -export function applyEachSeries(fns: Function[], argsAndCallback: any[]): void; // applyEachSeries(fns, args..., callback). TS does not support ... for a middle argument. Callback is optional. +export function applyEach(fns: Function[], ...argsAndCallback: any[]): void; // applyEach(fns, args..., callback). TS does not support ... for a middle argument. Callback is optional. +export function applyEachSeries(fns: Function[], ...argsAndCallback: any[]): void; // applyEachSeries(fns, args..., callback). TS does not support ... for a middle argument. Callback is optional. export function queue(worker: AsyncWorker, concurrency?: number): AsyncQueue; export function queue(worker: AsyncResultIterator, concurrency?: number): AsyncQueue; export function priorityQueue(worker: AsyncWorker, concurrency: number): AsyncPriorityQueue; diff --git a/types/atlaskit__calendar/atlaskit__calendar-tests.tsx b/types/atlaskit__calendar/atlaskit__calendar-tests.tsx new file mode 100644 index 0000000000..3a2f9c0a71 --- /dev/null +++ b/types/atlaskit__calendar/atlaskit__calendar-tests.tsx @@ -0,0 +1,8 @@ +import Calendar from '@atlaskit/calendar'; + +import * as React from 'react'; +import { render } from 'react-dom'; + +declare const container: Element; + +render( {}} month={1} year={2000} />, container); diff --git a/types/atlaskit__calendar/index.d.ts b/types/atlaskit__calendar/index.d.ts new file mode 100644 index 0000000000..e92776c1f3 --- /dev/null +++ b/types/atlaskit__calendar/index.d.ts @@ -0,0 +1,81 @@ +// Type definitions for atlaskit__calendar 5.0 +// Project: https://bitbucket.org/atlassian/atlaskit-mk-2/src/master/ +// Definitions by: Lee Standen +// Definitions: https://github.com/DefinitelyTyped/DefinitelyTyped +// TypeScript Version: 2.6 + +import { Component, HTMLAttributes, FocusEvent } from 'react'; + +export type ArrowKeys = 'left' | 'up' | 'right' | 'down'; + +export interface DateObj { + day: number; + month: number; + year: number; +} + +export interface ChangeEvent extends DateObj { + iso: string; + type: 'left' | 'up' | 'right' | 'down' | 'prev' | 'next'; +} + +export interface SelectEvent extends DateObj { + iso: string; +} + +export interface Props { + /** The number of the day currently focused. Places border around the date. 0 highlights no date. */ + day?: number; + /** Default for `day`. */ + defaultDay?: number; + /** Default for `disabled`. */ + defaultDisabled?: string[]; + /** Default for `month`. */ + defaultMonth?: number; + /** Default for `previouslySelected`. */ + defaultPreviouslySelected?: string[]; + /** Default for `selected`. */ + defaultSelected?: string[]; + /** Default for `year`. */ + defaultYear?: number; + /** + * Takes an array of dates as string in the format 'YYYY-MM-DD'. All dates provided are greyed out. + * This does not prevent these dates being selected. + */ + disabled?: string[]; + /** Props to apply to the container. */ + innerProps?: HTMLAttributes; + /** The number of the month (from 1 to 12) which the calendar should be on. */ + month?: number; + /** Function which is called when the calendar is no longer focused. */ + onBlur?: (e?: FocusEvent) => void; + /** + * Called when the calendar is navigated. This can be triggered by the keyboard, or by clicking the navigational buttons. + * The 'type' property indicates the the direction the calendar was navigated whereas the 'iso' property is a string of the format YYYY-MM-DD. + */ + onChange?: (e: ChangeEvent) => void; + /** Called when the calendar receives focus. This could be from a mouse event on the container by tabbing into it. */ + onFocus?: (e?: FocusEvent) => void; + /** + * Function called when a day is clicked on. Calls with an object that has + * a day, month and week property as numbers, representing the date just clicked. + * It also has an 'iso' property, which is a string of the selected date in the + * format YYYY-MM-DD. + */ + onSelect?: (e: SelectEvent) => void; + /** + * Takes an array of dates as string in the format 'YYYY-MM-DD'. All dates + * provided are given a background color. + */ + previouslySelected?: string[]; + /** + * Takes an array of dates as string in the format 'YYYY-MM-DD'. All dates + * provided are given a background color. + */ + selected?: string[]; + /** Value of current day, as a string in the format 'YYYY-MM-DD'. */ + today?: string; + /** Year to display the calendar for. */ + year?: number; +} +export default class Calendar extends Component {} diff --git a/types/atlaskit__calendar/tsconfig.json b/types/atlaskit__calendar/tsconfig.json new file mode 100644 index 0000000000..55dd5249f1 --- /dev/null +++ b/types/atlaskit__calendar/tsconfig.json @@ -0,0 +1,20 @@ +{ + "compilerOptions": { + "module": "commonjs", + "lib": ["es6", "dom"], + "noImplicitAny": true, + "noImplicitThis": true, + "strictNullChecks": true, + "strictFunctionTypes": true, + "baseUrl": "../", + "typeRoots": ["../"], + "types": [], + "noEmit": true, + "forceConsistentCasingInFileNames": true, + "jsx": "react", + "paths": { + "@atlaskit/calendar": ["atlaskit__calendar"] + } + }, + "files": ["index.d.ts", "atlaskit__calendar-tests.tsx"] +} diff --git a/types/atlaskit__calendar/tslint.json b/types/atlaskit__calendar/tslint.json new file mode 100644 index 0000000000..3db14f85ea --- /dev/null +++ b/types/atlaskit__calendar/tslint.json @@ -0,0 +1 @@ +{ "extends": "dtslint/dt.json" } diff --git a/types/atlaskit__inline-edit/atlaskit__inline-edit-tests.tsx b/types/atlaskit__inline-edit/atlaskit__inline-edit-tests.tsx new file mode 100644 index 0000000000..1c8a7278b5 --- /dev/null +++ b/types/atlaskit__inline-edit/atlaskit__inline-edit-tests.tsx @@ -0,0 +1,15 @@ +import InlineEdit from '@atlaskit/inline-edit'; + +import * as React from 'react'; +import { render } from 'react-dom'; + +declare const container: Element; + +render( + Hello} + onConfirm={() => {}} + onCancel={() => {}} + />, + container, +); diff --git a/types/atlaskit__inline-edit/index.d.ts b/types/atlaskit__inline-edit/index.d.ts new file mode 100644 index 0000000000..4ee82ee4c3 --- /dev/null +++ b/types/atlaskit__inline-edit/index.d.ts @@ -0,0 +1,51 @@ +// Type definitions for @atlaskit/inline-edit 5.0 +// Project: https://bitbucket.org/atlassian/atlaskit-mk-2/ +// Definitions by: Lee Standen +// Definitions: https://github.com/DefinitelyTyped/DefinitelyTyped +// TypeScript Version: 2.6 + +import { ReactElement, Component } from 'react'; +export default class InlineEdit extends Component {} +export class InlineEditStateless extends Component {} + +export interface BaseProps { + /** Label above the input. */ + label?: string; + /** Component to be shown when reading only */ + readView: ReactElement; + /** Component to be shown when editing. Should be an @atlaskit/input. */ + editView?: ReactElement; + /** Set whether the read view should fit width, most obvious when hovered. */ + isFitContainerWidthReadView?: boolean; + /** Greys out text and shows spinner. Does not disable input. */ + isWaiting?: boolean; + /** Sets yellow border with warning symbol at end of input. Removes confirm and cancel buttons. */ + isInvalid?: boolean; + /** Determine whether the label is shown. */ + isLabelHidden?: boolean; + /** Sets whether the checkmark and cross are displayed in the bottom right fo the field. */ + areActionButtonsHidden?: boolean; + /** Sets whether the confirm function is called when the input loses focus. */ + isConfirmOnBlurDisabled?: boolean; + /** Handler called when checkmark is clicked. Also by default called when the input loses focus. */ + onConfirm: () => void; + /** Handler called when the cross is clicked on. */ + onCancel: () => void; + /** html to pass down to the label htmlFor prop. */ + labelHtmlFor?: string; + /** Set whether onConfirm is called on pressing enter. */ + shouldConfirmOnEnter?: boolean; + /** Set whether default stylings should be disabled when editing. */ + disableEditViewFieldBase?: boolean; + /** Component to be shown in an @atlaskit/inline-dialog when edit view is open. */ + invalidMessage?: ReactElement; +} + +export interface StatelessProps extends BaseProps { + /** Whether the component shows the readView or the editView. */ + isEditing: boolean; + /** Handler called when the wrapper or the label are clicked. */ + onEditRequested: () => void; +} + +export type StatefulProps = BaseProps; diff --git a/types/atlaskit__inline-edit/tsconfig.json b/types/atlaskit__inline-edit/tsconfig.json new file mode 100644 index 0000000000..d2974ebb7a --- /dev/null +++ b/types/atlaskit__inline-edit/tsconfig.json @@ -0,0 +1,20 @@ +{ + "compilerOptions": { + "module": "commonjs", + "lib": ["es6", "dom"], + "noImplicitAny": true, + "noImplicitThis": true, + "strictNullChecks": true, + "strictFunctionTypes": true, + "baseUrl": "../", + "typeRoots": ["../"], + "types": [], + "noEmit": true, + "forceConsistentCasingInFileNames": true, + "jsx": "react", + "paths": { + "@atlaskit/inline-edit": ["atlaskit__inline-edit"] + } + }, + "files": ["index.d.ts", "atlaskit__inline-edit-tests.tsx"] +} diff --git a/types/atlaskit__inline-edit/tslint.json b/types/atlaskit__inline-edit/tslint.json new file mode 100644 index 0000000000..3db14f85ea --- /dev/null +++ b/types/atlaskit__inline-edit/tslint.json @@ -0,0 +1 @@ +{ "extends": "dtslint/dt.json" } diff --git a/types/atlaskit__layer/atlaskit__layer-tests.tsx b/types/atlaskit__layer/atlaskit__layer-tests.tsx new file mode 100644 index 0000000000..d10ad57ff0 --- /dev/null +++ b/types/atlaskit__layer/atlaskit__layer-tests.tsx @@ -0,0 +1,15 @@ +import Layer from '@atlaskit/layer'; + +import * as React from 'react'; +import { render } from 'react-dom'; + +declare const container: Element; + +render( + Hello, world!} + autoFlip={false} + />, + container, +); diff --git a/types/atlaskit__layer/index.d.ts b/types/atlaskit__layer/index.d.ts new file mode 100644 index 0000000000..2f50a5abcf --- /dev/null +++ b/types/atlaskit__layer/index.d.ts @@ -0,0 +1,72 @@ +// Type definitions for @atlaskit/layer 3.1 +// Project: https://bitbucket.org/atlassian/atlaskit-mk-2/src/master/ +// Definitions by: Lee Standen +// Definitions: https://github.com/DefinitelyTyped/DefinitelyTyped +// TypeScript Version: 2.6 + +import { Component, ReactNode } from 'react'; + +export default class Layer extends Component {} + +export interface Props { + /** + * Sets whether the content auto flip when it reaches the border set it as true for default flip + * or set the custom flip positions + */ + autoFlip?: boolean | FlipPositionType | FlipPositionType[]; + /** + * Element to act as a boundary for the Layer. The Layer will not sit outside this element if it + * can help it. If, through it's normal positoning, it would end up outside the boundary the + * layer will flip positions if the autoPosition prop is set. + */ + boundariesElement?: BoundariesElementType; + /** Target to which layer is attached */ + children?: ReactNode; + /** HTML content to display in the layer. Will be aligned to the target according to the position prop. */ + content?: ReactNode; + /** + * String representing the offsets from the target element in the format "[x-offset][y-offset]", + * measured in pixels. + */ + offset?: string; + /** + * Callback that is used to know when the flipped state of Layer changes. This occurs when placing a + * Layered element in the requested position would cause Layer to be rendered outside of the + * boundariesElement (usually viewport). + */ + onFlippedChange?: ( + flipped: boolean, + actualPosition: CSSPositionType, + originalPosition: CSSPositionType, + ) => void; + /** + * Position of a layer relative to its target. The position attribute takes two positional arguments in + * the format position="edge edge-position", where edge specifies what edge to align the layer to, and + * edge-position specifies where on that edge the layer should appear. + */ + position?: PositionType; + /** z-index for the layer component */ + zIndex?: number; + /** Lock scrolling behind the layer */ + lockScroll?: boolean; +} + +export type FlipPositionType = 'top' | 'right' | 'bottom' | 'left'; + +export type PositionType = + | 'top left' + | 'top center' + | 'top right' + | 'right top' + | 'right middle' + | 'right bottom' + | 'bottom left' + | 'bottom center' + | 'bottom right' + | 'left top' + | 'left middle' + | 'left bottom'; + +export type BoundariesElementType = 'viewport' | 'window' | 'scrollParent'; + +export type CSSPositionType = 'absolute' | 'fixed'; diff --git a/types/atlaskit__layer/tsconfig.json b/types/atlaskit__layer/tsconfig.json new file mode 100644 index 0000000000..6b6a475bd3 --- /dev/null +++ b/types/atlaskit__layer/tsconfig.json @@ -0,0 +1,20 @@ +{ + "compilerOptions": { + "module": "commonjs", + "lib": ["es6", "dom"], + "noImplicitAny": true, + "noImplicitThis": true, + "strictNullChecks": true, + "strictFunctionTypes": true, + "baseUrl": "../", + "typeRoots": ["../"], + "types": [], + "noEmit": true, + "forceConsistentCasingInFileNames": true, + "jsx": "react", + "paths": { + "@atlaskit/layer": ["atlaskit__layer"] + } + }, + "files": ["index.d.ts", "atlaskit__layer-tests.tsx"] +} diff --git a/types/atlaskit__layer/tslint.json b/types/atlaskit__layer/tslint.json new file mode 100644 index 0000000000..3db14f85ea --- /dev/null +++ b/types/atlaskit__layer/tslint.json @@ -0,0 +1 @@ +{ "extends": "dtslint/dt.json" } diff --git a/types/atlaskit__single-select/atlaskit__single-select-tests.tsx b/types/atlaskit__single-select/atlaskit__single-select-tests.tsx new file mode 100644 index 0000000000..baa25dfe1f --- /dev/null +++ b/types/atlaskit__single-select/atlaskit__single-select-tests.tsx @@ -0,0 +1,14 @@ +import SingleSelect, { StatelessSelect } from '@atlaskit/single-select'; + +import * as React from 'react'; +import { render } from 'react-dom'; + +declare const container: Element; + +render( +
+ + +
, + container, +); diff --git a/types/atlaskit__single-select/index.d.ts b/types/atlaskit__single-select/index.d.ts new file mode 100644 index 0000000000..6536869512 --- /dev/null +++ b/types/atlaskit__single-select/index.d.ts @@ -0,0 +1,125 @@ +// Type definitions for @atlaskit/single-select 4.0 +// Project: https://bitbucket.org/atlassian/atlaskit-mk-2/src/master/ +// Definitions by: Lee Standen +// Definitions: https://github.com/DefinitelyTyped/DefinitelyTyped +// TypeScript Version: 2.6 + +import { Component, ReactNode, SyntheticEvent } from 'react'; + +export default class SingleSelect extends Component {} +export class StatelessSelect extends Component {} + +export interface Props { + /** Subtle items do not have a background color. */ + appearance?: 'default' | 'subtle'; + /** Item to be selected on component mount. */ + defaultSelected?: ItemType; + /** Sets whether the dropdown should be constrained to the width of its trigger */ + droplistShouldFitContainer?: boolean; + /** + * Sets whether the field should be selectable. If it is, the field will be + * a text box, which will filter the items. + */ + hasAutocomplete?: boolean; + /** id property to be passed down to the html select component. */ + id?: string; + /** message to show on the dialog when isInvalid is true */ + invalidMessage?: ReactNode; + /** controls the top margin of the label component rendered. */ + isFirstChild?: boolean; + /** Sets whether the select is selectable. Changes hover state. */ + isDisabled?: boolean; + /** Sets whether the component should be open on mount. */ + isDefaultOpen?: boolean; + /** + * Sets whether form including select can be submitted without an option + * being made. + */ + isRequired?: boolean; + /** + * Set whether there is an error with the selection. Sets an orange border + * and shows the warning icon. + */ + isInvalid?: boolean; + /** + * An array of objects, each one of which must have an array of items, and + * may have a heading. All items should have content and value properties, with + * content being the displayed text. + */ + items?: GroupType[]; + /** Label to be displayed above select. */ + label?: string; + /** name property to be passed to the html select element. */ + name?: string; + /** + * Message to display in any group in items if there are no items in it, + * including if there is one item that has been selected. + */ + noMatchesFound?: string; + /** Handler to be called when the filtered items changes. */ + onFilterChange?: (filter: string) => void; + /** + * Handler to be called when an item is selected. Called with an object that + * has the item selected as a property on the object. + */ + onSelected?: (item: ItemType) => void; + /** + * Handler called when the select is opened or closed. Called with an object + * that has both the event, and the new isOpen state. + */ + onOpenChange?: ( + change: { event: SyntheticEvent; isOpen: boolean }, + ) => void; + /** Text to be shown within the select when no item is selected. */ + placeholder?: string; + /** Where the select dropdown should be displayed relative to the field position. */ + position?: string; + /** Sets whether the field will become focused. */ + shouldFocus?: boolean; + /** Sets whether the field should be constrained to the width of its trigger */ + shouldFitContainer?: boolean; + /** Sets whether the droplist should flip its position when there is not enough space. */ + shouldFlip?: boolean; + /** Set the max height of the dropdown list in pixels. */ + maxHeight?: number; +} + +export interface StatelessProps extends Props { + /** Value to be used when filtering the items. Compared against 'content'. */ + filterValue?: string; + /** Sets whether the Select dropdown is open. */ + isOpen?: boolean; + /** + * Sets whether the field is loading data. The same property is used + * for either initial fetch (when no options are available) as well for + * subsequent loading of more options. The component reacts accordingly + * based on the `items` provided. + */ + isLoading?: boolean; + /** + * Message to be displayed when the component is set to its loading state. + * The message might be displayed differently depending on whether or not + * there are items already being rendered. + */ + loadingMessage?: string; + /** The selected item data */ + selectedItem?: ItemType; +} + +export interface GroupType { + heading?: string; + items: ItemType[]; +} + +export interface ItemType { + content?: ReactNode; + description?: string; + label?: string; + tooltipDescription?: string; + tooltipPosition?: 'top' | 'bottom' | 'left'; + value?: string | number; + filterValues?: string[]; + isDisabled?: boolean; + isSelected?: boolean; + elemBefore?: ReactNode; +} diff --git a/types/atlaskit__single-select/tsconfig.json b/types/atlaskit__single-select/tsconfig.json new file mode 100644 index 0000000000..1ec4324243 --- /dev/null +++ b/types/atlaskit__single-select/tsconfig.json @@ -0,0 +1,20 @@ +{ + "compilerOptions": { + "module": "commonjs", + "lib": ["es6", "dom"], + "noImplicitAny": true, + "noImplicitThis": true, + "strictNullChecks": true, + "strictFunctionTypes": true, + "baseUrl": "../", + "typeRoots": ["../"], + "types": [], + "noEmit": true, + "forceConsistentCasingInFileNames": true, + "jsx": "react", + "paths": { + "@atlaskit/single-select": ["atlaskit__single-select"] + } + }, + "files": ["index.d.ts", "atlaskit__single-select-tests.tsx"] +} diff --git a/types/atlaskit__single-select/tslint.json b/types/atlaskit__single-select/tslint.json new file mode 100644 index 0000000000..3db14f85ea --- /dev/null +++ b/types/atlaskit__single-select/tslint.json @@ -0,0 +1 @@ +{ "extends": "dtslint/dt.json" } diff --git a/types/atob/atob-tests.ts b/types/atob/atob-tests.ts new file mode 100644 index 0000000000..e2e2618387 --- /dev/null +++ b/types/atob/atob-tests.ts @@ -0,0 +1,3 @@ +import atob from 'atob'; + +atob('foo'); diff --git a/types/atob/index.d.ts b/types/atob/index.d.ts new file mode 100644 index 0000000000..632880f7a6 --- /dev/null +++ b/types/atob/index.d.ts @@ -0,0 +1,7 @@ +// Type definitions for atob 2.1 +// Project: https://git.coolaj86.com/coolaj86/atob.js.git +// Definitions by: John Wright +// Definitions: https://github.com/DefinitelyTyped/DefinitelyTyped +// TypeScript Version: 2.8 + +export default function(str: string): string; diff --git a/types/atob/tsconfig.json b/types/atob/tsconfig.json new file mode 100644 index 0000000000..70dd7f0fdc --- /dev/null +++ b/types/atob/tsconfig.json @@ -0,0 +1,21 @@ +{ + "compilerOptions": { + "module": "commonjs", + "noImplicitAny": true, + "noImplicitThis": true, + "strictNullChecks": true, + "strictFunctionTypes": true, + "baseUrl": "../", + "typeRoots": [ + "../" + ], + "lib": ["es6"], + "types": [], + "noEmit": true, + "forceConsistentCasingInFileNames": true + }, + "files": [ + "index.d.ts", + "atob-tests.ts" + ] +} diff --git a/types/atob/tslint.json b/types/atob/tslint.json new file mode 100644 index 0000000000..f93cf8562a --- /dev/null +++ b/types/atob/tslint.json @@ -0,0 +1,3 @@ +{ + "extends": "dtslint/dt.json" +} diff --git a/types/atom/atom-tests.ts b/types/atom/atom-tests.ts index f21fab1114..9d01e194a9 100644 --- a/types/atom/atom-tests.ts +++ b/types/atom/atom-tests.ts @@ -88,6 +88,10 @@ function testAtomEnvironment() { { label: "Undo", command: "core:undo" }, { label: "Redo", command: "core:redo" }, ], + after: ["test"], + before: ["test"], + afterGroupContaining: ["test"], + beforeGroupContaining: ["test"] }], }); @@ -1323,6 +1327,9 @@ function testMarkerLayer() { markers = markerLayer.findMarkers({ containsRange: [[0, 0], pos] }); markers = markerLayer.findMarkers({ containsRange: [[0, 0], [0, 0]] }); + const role = markerLayer.getRole(); + if (role) str = role; + // Marker creation marker = markerLayer.markRange(range); marker = markerLayer.markRange([pos, pos]); @@ -1734,6 +1741,10 @@ function testProject() { subscription = project.onDidAddBuffer(buffer => buffer.id); subscription = project.observeBuffers(buffer => buffer.getUri()); + subscription = project.onDidReplace(projectSpec => { + if (projectSpec != null) str = projectSpec.originPath; + }); + // Accessing the git repository repositories = project.getRepositories(); @@ -1946,32 +1957,54 @@ function testSelection() { selection.insertText("Replacement", { autoDecreaseIndent: true }); selection.insertText("Replacement", { normalizeLineEndings: true }); selection.insertText("Replacement", { undo: "skip" }); + selection.insertText("Replacement", { bypassReadOnly: true }); selection.insertText("Replacement", { select: true, autoIndent: true, autoIndentNewline: true, autoDecreaseIndent: true, normalizeLineEndings: true, - undo: "skip", preserveTrailingLineIndentation: false }); + undo: "skip", preserveTrailingLineIndentation: false, bypassReadOnly: false }); selection.backspace(); + selection.backspace({ bypassReadOnly: true }); selection.deleteToPreviousWordBoundary(); + selection.deleteToPreviousWordBoundary({ bypassReadOnly: false }); selection.deleteToNextWordBoundary(); + selection.deleteToNextWordBoundary({ bypassReadOnly: true }); selection.deleteToBeginningOfWord(); + selection.deleteToBeginningOfWord({ bypassReadOnly: false }); selection.deleteToBeginningOfLine(); + selection.deleteToBeginningOfLine({ bypassReadOnly: true }); selection.delete(); + selection.delete({ bypassReadOnly: false }); selection.deleteToEndOfLine(); + selection.deleteToEndOfLine({ bypassReadOnly: true }); selection.deleteToEndOfWord(); + selection.deleteToEndOfWord({ bypassReadOnly: false }); selection.deleteToBeginningOfSubword(); + selection.deleteToBeginningOfSubword({ bypassReadOnly: true }); selection.deleteToEndOfSubword(); + selection.deleteToEndOfSubword({ bypassReadOnly: false }); selection.deleteSelectedText(); + selection.deleteSelectedText({ bypassReadOnly: true }); selection.deleteLine(); + selection.deleteLine({ bypassReadOnly: false }); selection.joinLines(); + selection.joinLines({ bypassReadOnly: true }); selection.outdentSelectedRows(); + selection.outdentSelectedRows({ bypassReadOnly: false }); selection.autoIndentSelectedRows(); + selection.autoIndentSelectedRows({ bypassReadOnly: true }); selection.toggleLineComments(); + selection.toggleLineComments({ bypassReadOnly: false }); selection.cutToEndOfLine(); + selection.cutToEndOfLine(true); + selection.cutToEndOfLine(undefined, { bypassReadOnly: true }); selection.cutToEndOfBufferLine(); + selection.cutToEndOfBufferLine(true); + selection.cutToEndOfBufferLine(false, { bypassReadOnly: false }); selection.cut(); selection.cut(true); selection.cut(true, true); + selection.cut(undefined, undefined, { bypassReadOnly: true }); selection.copy(); selection.copy(true); @@ -1979,6 +2012,7 @@ function testSelection() { selection.fold(); selection.indentSelectedRows(); + selection.indentSelectedRows({ bypassReadOnly: false }); // Managing multiple selections selection.addSelectionBelow(); @@ -2139,6 +2173,8 @@ function testTextBuffer() { num = nextRow; } + bool = buffer.hasAstral(); + // Mutating Text range = buffer.setText("Test"); buffer.setTextViaDiff("Test"); @@ -2228,9 +2264,13 @@ function testTextBuffer() { // History bool = buffer.undo(); + bool = buffer.undo({ selectionsMarkerLayer: markerLayer }); bool = buffer.redo(); + bool = buffer.redo({ selectionsMarkerLayer: markerLayer }); - num = buffer.transact(500, (): number => 42); + num = buffer.transact(500, (): number => 42); + num = buffer.transact({ groupingInterval: 500, selectionsMarkerLayer: markerLayer }, + (): number => 42); buffer.clearUndoStack(); num = buffer.createCheckpoint(); @@ -2430,6 +2470,8 @@ function testTextEditor() { // Mutating Text editor.setText("Test"); + editor.setText("Test", {}); + editor.setText("Text", { bypassReadOnly: true }); range = editor.setTextInBufferRange(range, "Test"); range = editor.setTextInBufferRange([pos, pos], "Test"); @@ -2439,7 +2481,7 @@ function testTextEditor() { range = editor.setTextInBufferRange(range, "Test", {}); range = editor.setTextInBufferRange([pos, pos], "Test", { normalizeLineEndings: true }); range = editor.setTextInBufferRange(range, "Test", { normalizeLineEndings: true, - undo: "skip" }); + undo: "skip", bypassReadOnly: false }); editor.insertText("Test"); editor.insertText("Test", {}); @@ -2451,27 +2493,45 @@ function testTextEditor() { editor.insertText("Test", { undo: "skip" }); editor.insertText("Text", { autoDecreaseIndent: false, autoIndent: false, autoIndentNewline: false, normalizeLineEndings: false, select: false, - undo: "skip", preserveTrailingLineIndentation: true }); + undo: "skip", preserveTrailingLineIndentation: true, bypassReadOnly: true }); editor.insertNewline(); + editor.insertNewline({ bypassReadOnly: false }); editor.delete(); + editor.delete({ bypassReadOnly: true }); editor.backspace(); + editor.backspace({ bypassReadOnly: false }); editor.mutateSelectedText((selection, index) => { selection.clear(); }); editor.transpose(); + editor.transpose({ bypassReadOnly: true }); editor.upperCase(); + editor.upperCase({ bypassReadOnly: false }); editor.lowerCase(); + editor.lowerCase({ bypassReadOnly: true }); editor.toggleLineCommentsInSelection(); + editor.toggleLineCommentsInSelection({ bypassReadOnly: false }); editor.insertNewlineBelow(); + editor.insertNewlineBelow({ bypassReadOnly: true }); editor.insertNewlineAbove(); + editor.insertNewlineAbove({ bypassReadOnly: false }); editor.deleteToBeginningOfWord(); + editor.deleteToBeginningOfWord({ bypassReadOnly: true }); editor.deleteToPreviousWordBoundary(); + editor.deleteToPreviousWordBoundary({ bypassReadOnly: false }); editor.deleteToNextWordBoundary(); + editor.deleteToNextWordBoundary({ bypassReadOnly: true }); editor.deleteToBeginningOfSubword(); + editor.deleteToBeginningOfSubword({ bypassReadOnly: false }); editor.deleteToEndOfSubword(); + editor.deleteToEndOfSubword({ bypassReadOnly: true }); editor.deleteToBeginningOfLine(); + editor.deleteToBeginningOfLine({ bypassReadOnly: false }); editor.deleteToEndOfLine(); + editor.deleteToEndOfLine({ bypassReadOnly: true }); editor.deleteToEndOfWord(); + editor.deleteToEndOfWord({ bypassReadOnly: false }); editor.deleteLine(); + editor.deleteLine({ bypassReadOnly: true }); // History editor.undo(); @@ -2919,9 +2979,12 @@ function testTextEditor() { editor.setIndentationForBufferRow(42, 42, { preserveLeadingWhitespace: true }); editor.indentSelectedRows(); + editor.indentSelectedRows({ bypassReadOnly: false }); editor.outdentSelectedRows(); + editor.outdentSelectedRows({ bypassReadOnly: true }); num = editor.indentLevelForLine("Test"); editor.autoIndentSelectedRows(); + editor.autoIndentSelectedRows({ bypassReadOnly: false }); // Grammars grammar = editor.getGrammar(); @@ -2938,6 +3001,7 @@ function testTextEditor() { // Clipboard Operations editor.copySelectedText(); editor.cutSelectedText(); + editor.cutSelectedText({ bypassReadOnly: true }); editor.pasteText(); editor.pasteText({}); @@ -2947,11 +3011,14 @@ function testTextEditor() { editor.pasteText({ normalizeLineEndings: true }); editor.pasteText({ select: true }); editor.pasteText({ undo: "skip" }); + editor.pasteText({ bypassReadOnly: false }); editor.pasteText({ autoIndentNewline: true, autoIndent: true, autoDecreaseIndent: true, - normalizeLineEndings: true, select: true, undo: "skip" }); + normalizeLineEndings: true, select: true, undo: "skip", bypassReadOnly: true }); editor.cutToEndOfLine(); + editor.cutToEndOfLine({ bypassReadOnly: false }); editor.cutToEndOfBufferLine(); + editor.cutToEndOfBufferLine({ bypassReadOnly: true }); // Folds editor.foldCurrentRow(); @@ -3310,7 +3377,7 @@ const pathWatcherPromise = Atom.watchPath("/var/test", {}, (events) => { for (const event of events) { str = event.path; str = event.action; - if (event.oldPath) str = event.oldPath; + if (event.action === "renamed") str = event.oldPath; } }); diff --git a/types/atom/autocomplete-plus/index.d.ts b/types/atom/autocomplete-plus/index.d.ts index 2e91a81262..5176ca0f30 100644 --- a/types/atom/autocomplete-plus/index.d.ts +++ b/types/atom/autocomplete-plus/index.d.ts @@ -34,7 +34,7 @@ export interface SuggestionInsertedEvent { * An autocompletion suggestion for the user. * Primary data type for the Atom Autocomplete+ service. */ -export interface Suggestion { +export interface SuggestionBase { /** * A string that will show in the UI for this suggestion. * When not set, snippet || text is displayed. @@ -91,14 +91,20 @@ export interface Suggestion { * When specified, a More.. link will be displayed in the description area. */ descriptionMoreURL?: string; + + /** + * (experimental) Description with Markdown formatting. + * Takes precedence over plaintext description. + */ + descriptionMarkdown?: string; } -export interface TextSuggestion extends Suggestion { +export interface TextSuggestion extends SuggestionBase { /** The text which will be inserted into the editor, in place of the prefix. */ text: string; } -export interface SnippetSuggestion extends Suggestion { +export interface SnippetSuggestion extends SuggestionBase { /** * A snippet string. This will allow users to tab through function arguments * or other options. @@ -106,7 +112,8 @@ export interface SnippetSuggestion extends Suggestion { snippet: string; } -export type Suggestions = Array; +export type AnySuggestion = TextSuggestion|SnippetSuggestion; +export type Suggestions = AnySuggestion[]; /** The interface that all Autocomplete+ providers must implement. */ export interface AutocompleteProvider { @@ -154,4 +161,13 @@ export interface AutocompleteProvider { /** Will be called if your provider is being destroyed by autocomplete+ */ dispose?(): void; + + /** + * (experimental) Is called when a suggestion is selected by the user for + * the purpose of loading more information about the suggestion. Return a + * Promise of the new suggestion to replace it with or return null if + * no change is needed. + */ + getSuggestionDetailsOnSelect?: + (suggestion: AnySuggestion) => Promise | AnySuggestion | null; } diff --git a/types/atom/index.d.ts b/types/atom/index.d.ts index e673ada530..232c20a034 100644 --- a/types/atom/index.d.ts +++ b/types/atom/index.d.ts @@ -1,4 +1,4 @@ -// Type definitions for Atom 1.25 +// Type definitions for Atom 1.27 // Project: https://github.com/atom/atom // Definitions by: GlenCFL // smhxx @@ -7,7 +7,7 @@ // TypeScript Version: 2.3 // NOTE: only those classes exported within this file should be retain that status below. -// https://github.com/atom/atom/blob/v1.25.0/exports/atom.js +// https://github.com/atom/atom/blob/v1.27.0/exports/atom.js /// @@ -1004,6 +1004,9 @@ export interface MarkerLayer { /** Find markers in the layer conforming to the given parameters. */ findMarkers(params: FindMarkerOptions): Marker[]; + /** Get the role of the marker layer e.g. "atom.selection". */ + getRole(): string | undefined; + // Marker Creation /** Create a marker with the given range. */ markRange(range: RangeCompatible, options?: { reversed?: boolean, invalidate?: @@ -1525,29 +1528,29 @@ export class TextEditor { // Mutating Text /** Replaces the entire contents of the buffer with the given string. */ - setText(text: string): void; + setText(text: string, options?: ReadonlyEditOptions): void; /** Set the text in the given Range in buffer coordinates. */ setTextInBufferRange(range: RangeCompatible, text: string, options?: - { normalizeLineEndings?: boolean, undo?: "skip" }): Range; + TextEditOptions & ReadonlyEditOptions): Range; /* For each selection, replace the selected text with the given text. */ - insertText(text: string, options?: TextInsertionOptions): Range|false; + insertText(text: string, options?: TextInsertionOptions & ReadonlyEditOptions): Range|false; /** For each selection, replace the selected text with a newline. */ - insertNewline(): void; + insertNewline(options?: ReadonlyEditOptions): void; /** * For each selection, if the selection is empty, delete the character following * the cursor. Otherwise delete the selected text. */ - delete(): void; + delete(options?: ReadonlyEditOptions): void; /** * For each selection, if the selection is empty, delete the character preceding * the cursor. Otherwise delete the selected text. */ - backspace(): void; + backspace(options?: ReadonlyEditOptions): void; /** * Mutate the text of all the selections in a single transaction. @@ -1561,89 +1564,89 @@ export class TextEditor { * If the selection is empty, the characters preceding and following the cursor * are swapped. Otherwise, the selected characters are reversed. */ - transpose(): void; + transpose(options?: ReadonlyEditOptions): void; /** * Convert the selected text to upper case. * For each selection, if the selection is empty, converts the containing word * to upper case. Otherwise convert the selected text to upper case. */ - upperCase(): void; + upperCase(options?: ReadonlyEditOptions): void; /** * Convert the selected text to lower case. * For each selection, if the selection is empty, converts the containing word * to upper case. Otherwise convert the selected text to upper case. */ - lowerCase(): void; + lowerCase(options?: ReadonlyEditOptions): void; /** * Toggle line comments for rows intersecting selections. * If the current grammar doesn't support comments, does nothing. */ - toggleLineCommentsInSelection(): void; + toggleLineCommentsInSelection(options?: ReadonlyEditOptions): void; /** For each cursor, insert a newline at beginning the following line. */ - insertNewlineBelow(): void; + insertNewlineBelow(options?: ReadonlyEditOptions): void; /** For each cursor, insert a newline at the end of the preceding line. */ - insertNewlineAbove(): void; + insertNewlineAbove(options?: ReadonlyEditOptions): void; /** * For each selection, if the selection is empty, delete all characters of the * containing word that precede the cursor. Otherwise delete the selected text. */ - deleteToBeginningOfWord(): void; + deleteToBeginningOfWord(options?: ReadonlyEditOptions): void; /** * Similar to ::deleteToBeginningOfWord, but deletes only back to the previous * word boundary. */ - deleteToPreviousWordBoundary(): void; + deleteToPreviousWordBoundary(options?: ReadonlyEditOptions): void; /** Similar to ::deleteToEndOfWord, but deletes only up to the next word boundary. */ - deleteToNextWordBoundary(): void; + deleteToNextWordBoundary(options?: ReadonlyEditOptions): void; /** * For each selection, if the selection is empty, delete all characters of the * containing subword following the cursor. Otherwise delete the selected text. */ - deleteToBeginningOfSubword(): void; + deleteToBeginningOfSubword(options?: ReadonlyEditOptions): void; /** * For each selection, if the selection is empty, delete all characters of the * containing subword following the cursor. Otherwise delete the selected text. */ - deleteToEndOfSubword(): void; + deleteToEndOfSubword(options?: ReadonlyEditOptions): void; /** * For each selection, if the selection is empty, delete all characters of the * containing line that precede the cursor. Otherwise delete the selected text. */ - deleteToBeginningOfLine(): void; + deleteToBeginningOfLine(options?: ReadonlyEditOptions): void; /** * For each selection, if the selection is not empty, deletes the selection * otherwise, deletes all characters of the containing line following the cursor. * If the cursor is already at the end of the line, deletes the following newline. */ - deleteToEndOfLine(): void; + deleteToEndOfLine(options?: ReadonlyEditOptions): void; /** * For each selection, if the selection is empty, delete all characters of the * containing word following the cursor. Otherwise delete the selected text. */ - deleteToEndOfWord(): void; + deleteToEndOfWord(options?: ReadonlyEditOptions): void; /** Delete all lines intersecting selections. */ - deleteLine(): void; + deleteLine(options?: ReadonlyEditOptions): void; // History /** Undo the last change. */ - undo(): void; + undo(options?: ReadonlyEditOptions): void; /** Redo the last change. */ - redo(): void; + redo(options?: ReadonlyEditOptions): void; /** * Batch multiple operations as a single undo/redo step. @@ -2284,10 +2287,10 @@ export class TextEditor { { preserveLeadingWhitespace?: boolean }): void; /** Indent rows intersecting selections by one level. */ - indentSelectedRows(): void; + indentSelectedRows(options?: ReadonlyEditOptions): void; /** Outdent rows intersecting selections by one level. */ - outdentSelectedRows(): void; + outdentSelectedRows(options?: ReadonlyEditOptions): void; /** * Get the indentation level of the given line of text. @@ -2298,7 +2301,7 @@ export class TextEditor { indentLevelForLine(line: string): number; /** Indent rows intersecting selections based on the grammar's suggested indent level. */ - autoIndentSelectedRows(): void; + autoIndentSelectedRows(options?: ReadonlyEditOptions): void; // Grammars /** Get the current Grammar of this editor. */ @@ -2328,7 +2331,7 @@ export class TextEditor { copySelectedText(): void; /** For each selection, cut the selected text. */ - cutSelectedText(): void; + cutSelectedText(options?: ReadonlyEditOptions): void; /** * For each selection, replace the selected text with the contents of the clipboard. @@ -2336,19 +2339,19 @@ export class TextEditor { * each selection will be replaced with the content of the corresponding clipboard * selection text. */ - pasteText(options?: TextInsertionOptions): void; + pasteText(options?: TextInsertionOptions & ReadonlyEditOptions): void; /** * For each selection, if the selection is empty, cut all characters of the * containing screen line following the cursor. Otherwise cut the selected text. */ - cutToEndOfLine(): void; + cutToEndOfLine(options?: ReadonlyEditOptions): void; /** * For each selection, if the selection is empty, cut all characters of the * containing buffer line following the cursor. Otherwise cut the selected text. */ - cutToEndOfBufferLine(): void; + cutToEndOfBufferLine(options?: ReadonlyEditOptions): void; // Folds /** @@ -3322,7 +3325,7 @@ export class Directory { /** Returns a boolean, always false. */ isFile(): this is File; - /** Returns a roolean, always true. */ + /** Returns a boolean, always true. */ isDirectory(): this is Directory; /** Returns a boolean indicating whether or not this is a symbolic link. */ @@ -4482,6 +4485,10 @@ export interface Project { /** Invoke a callback when a filesystem change occurs within any open project path. */ onDidChangeFiles(callback: (events: FilesystemChangeEvent) => void): Disposable; + /** Invoke a callback whenever the project's configuration has been replaced. */ + onDidReplace(callback: (projectSpec: ProjectSpecification | null | undefined) => void): + Disposable; + // Accessing the Git Repository /** * Get an Array of GitRepositorys associated with the project's directories. @@ -4716,107 +4723,107 @@ export interface Selection { // Modifying the selected text /** Replaces text at the current selection. */ - insertText(text: string, options?: TextInsertionOptions): void; + insertText(text: string, options?: TextInsertionOptions & ReadonlyEditOptions): void; /** * Removes the first character before the selection if the selection is empty * otherwise it deletes the selection. */ - backspace(): void; + backspace(options?: ReadonlyEditOptions): void; /** * Removes the selection or, if nothing is selected, then all characters from * the start of the selection back to the previous word boundary. */ - deleteToPreviousWordBoundary(): void; + deleteToPreviousWordBoundary(options?: ReadonlyEditOptions): void; /** * Removes the selection or, if nothing is selected, then all characters from * the start of the selection up to the next word boundary. */ - deleteToNextWordBoundary(): void; + deleteToNextWordBoundary(options?: ReadonlyEditOptions): void; /** * Removes from the start of the selection to the beginning of the current * word if the selection is empty otherwise it deletes the selection. */ - deleteToBeginningOfWord(): void; + deleteToBeginningOfWord(options?: ReadonlyEditOptions): void; /** * Removes from the beginning of the line which the selection begins on all * the way through to the end of the selection. */ - deleteToBeginningOfLine(): void; + deleteToBeginningOfLine(options?: ReadonlyEditOptions): void; /** * Removes the selection or the next character after the start of the selection * if the selection is empty. */ - delete(): void; + delete(options?: ReadonlyEditOptions): void; /** * If the selection is empty, removes all text from the cursor to the end of * the line. If the cursor is already at the end of the line, it removes the following * newline. If the selection isn't empty, only deletes the contents of the selection. */ - deleteToEndOfLine(): void; + deleteToEndOfLine(options?: ReadonlyEditOptions): void; /** * Removes the selection or all characters from the start of the selection to * the end of the current word if nothing is selected. */ - deleteToEndOfWord(): void; + deleteToEndOfWord(options?: ReadonlyEditOptions): void; /** * Removes the selection or all characters from the start of the selection to * the end of the current word if nothing is selected. */ - deleteToBeginningOfSubword(): void; + deleteToBeginningOfSubword(options?: ReadonlyEditOptions): void; /** * Removes the selection or all characters from the start of the selection to * the end of the current word if nothing is selected. */ - deleteToEndOfSubword(): void; + deleteToEndOfSubword(options?: ReadonlyEditOptions): void; /** Removes only the selected text. */ - deleteSelectedText(): void; + deleteSelectedText(options?: ReadonlyEditOptions): void; /** * Removes the line at the beginning of the selection if the selection is empty * unless the selection spans multiple lines in which case all lines are removed. */ - deleteLine(): void; + deleteLine(options?: ReadonlyEditOptions): void; /** * Joins the current line with the one below it. Lines will be separated by a single space. * If there selection spans more than one line, all the lines are joined together. */ - joinLines(): void; + joinLines(options?: ReadonlyEditOptions): void; /** Removes one level of indent from the currently selected rows. */ - outdentSelectedRows(): void; + outdentSelectedRows(options?: ReadonlyEditOptions): void; /** * Sets the indentation level of all selected rows to values suggested by the * relevant grammars. */ - autoIndentSelectedRows(): void; + autoIndentSelectedRows(options?: ReadonlyEditOptions): void; /** * Wraps the selected lines in comments if they aren't currently part of a comment. * Removes the comment if they are currently wrapped in a comment. */ - toggleLineComments(): void; + toggleLineComments(options?: ReadonlyEditOptions): void; /** Cuts the selection until the end of the screen line. */ - cutToEndOfLine(): void; + cutToEndOfLine(maintainClipboard?: boolean, options?: ReadonlyEditOptions): void; /** Cuts the selection until the end of the buffer line. */ - cutToEndOfBufferLine(): void; + cutToEndOfBufferLine(maintainClipboard?: boolean, options?: ReadonlyEditOptions): void; /** Copies the selection to the clipboard and then deletes it. */ - cut(maintainClipboard?: boolean, fullLine?: boolean): void; + cut(maintainClipboard?: boolean, fullLine?: boolean, options?: ReadonlyEditOptions): void; /** Copies the current selection to the clipboard. */ copy(maintainClipboard?: boolean, fullLine?: boolean): void; @@ -4825,7 +4832,7 @@ export interface Selection { fold(): void; /** If the selection spans multiple rows, indent all of them. */ - indentSelectedRows(): void; + indentSelectedRows(options?: ReadonlyEditOptions): void; // Managing multiple selections /** Moves the selection down one row. */ @@ -5134,6 +5141,12 @@ export class TextBuffer { */ nextNonBlankRow(startRow: number): number|null; + /** + * Return true if the buffer contains any astral-plane Unicode characters that + * are encoded as surrogate pairs. + */ + hasAstral(): boolean; + // Mutating Text /** Replace the entire contents of the buffer with the given text. */ setText(text: string): Range; @@ -5145,16 +5158,13 @@ export class TextBuffer { setTextViaDiff(text: string): void; /** Set the text in the given range. */ - setTextInRange(range: RangeCompatible, text: string, options?: - { normalizeLineEndings?: boolean, undo?: "skip" }): Range; + setTextInRange(range: RangeCompatible, text: string, options?: TextEditOptions): Range; /** Insert text at the given position. */ - insert(position: PointCompatible, text: string, options?: - { normalizeLineEndings?: boolean, undo?: "skip" }): Range; + insert(position: PointCompatible, text: string, options?: TextEditOptions): Range; /** Append text to the end of the buffer. */ - append(text: string, options?: { normalizeLineEndings?: boolean, undo?: - "skip" }): Range; + append(text: string, options?: TextEditOptions): Range; /** Delete the text in the given range. */ delete(range: RangeCompatible): Range; @@ -5175,7 +5185,7 @@ export class TextBuffer { // Markers /** Create a layer to contain a set of related markers. */ - addMarkerLayer(options?: { maintainHistory?: boolean, persistent?: boolean }): + addMarkerLayer(options?: { maintainHistory?: boolean, persistent?: boolean, role?: string }): MarkerLayer; /** @@ -5213,16 +5223,18 @@ export class TextBuffer { * Undo the last operation. If a transaction is in progress, aborts it. * @return A boolean of whether or not a change was made. */ - undo(): boolean; + undo(options?: HistoryTraversalOptions): boolean; /** * Redo the last operation. * @return A boolean of whether or not a change was made. */ - redo(): boolean; + redo(options?: HistoryTraversalOptions): boolean; /** Batch multiple operations as a single undo/redo step. */ - transact(groupingInterval: number, fn: () => T): T; + transact(optionsOrInterval: number | { groupingInterval?: number } & + HistoryTransactionOptions, fn: () => T): T; + /** Batch multiple operations as a single undo/redo step. */ transact(fn: () => T): T; /** @@ -5240,20 +5252,21 @@ export class TextBuffer { * `::revertToCheckpoint` and `::groupChangesSinceCheckpoint`. * @return A checkpoint ID value. */ - createCheckpoint(): number; + createCheckpoint(options?: HistoryTransactionOptions): number; /** * Revert the buffer to the state it was in when the given checkpoint was created. * @return A boolean indicating whether the operation succeeded. */ - revertToCheckpoint(checkpoint: number): boolean; + revertToCheckpoint(checkpoint: number, options?: HistoryTraversalOptions): + boolean; /** * Group all changes since the given checkpoint into a single transaction for * purposes of undo/redo. * @return A boolean indicating whether the operation succeeded. */ - groupChangesSinceCheckpoint(checkpoint: number): boolean; + groupChangesSinceCheckpoint(checkpoint: number, options?: HistoryTransactionOptions): boolean; /** * Group the last two text changes for purposes of undo/redo. @@ -5647,19 +5660,28 @@ export interface FileSavedEvent { path: string; } -export type FilesystemChangeEvent = Array<{ +export interface FilesystemChangeBasic< + Action extends "created"|"modified"|"deleted"|"renamed" + = "created"|"modified"|"deleted" +> { /** A string describing the filesystem action that occurred. */ - action: "created"|"modified"|"deleted"|"renamed"; + action: Action; /** The absolute path to the filesystem entry that was acted upon. */ path: string; +} +export interface FilesystemChangeRename extends FilesystemChangeBasic<"renamed"> { /** * For rename events, a string containing the filesystem entry's former * absolute path. */ - oldPath?: string; -}>; + oldPath: string; +} + +export type FilesystemChange = FilesystemChangeBasic|FilesystemChangeRename; + +export type FilesystemChangeEvent = FilesystemChange[]; export interface FullKeybindingMatchEvent { /** The string of keystrokes that matched the binding. */ @@ -5822,7 +5844,7 @@ export interface TextEditorObservedEvent { // information under certain contexts. // NOTE: the config schema with these defaults can be found here: -// https://github.com/atom/atom/blob/v1.25.0/src/config-schema.js +// https://github.com/atom/atom/blob/v1.27.0/src/config-schema.js /** * Allows you to strongly type Atom configuration variables. Additional key:value * pairings merged into this interface will result in configuration values under @@ -6161,7 +6183,7 @@ export interface ConfirmationOptions { normalizeAccessKeys?: boolean; } -export interface ContextMenuOptions { +export interface ContextMenuItemOptions { /** The menu item's label. */ label?: string; @@ -6180,12 +6202,6 @@ export interface ContextMenuOptions { /** An array of additional items. */ submenu?: ReadonlyArray; - /** - * If you want to create a separator, provide an item with type: 'separator' - * and no other keys. - */ - type?: "separator"; - /** Whether the menu item should appear in the menu. Defaults to true. */ visible?: boolean; @@ -6200,8 +6216,28 @@ export interface ContextMenuOptions { * given context menu deployment. */ shouldDisplay?(event: Event): void; + + /** Place this menu item before the menu items representing the given commands. */ + before?: ReadonlyArray; + + /** Place this menu item after the menu items representing the given commands. */ + after?: ReadonlyArray; + + /** + * Place this menu item's group before the containing group of the menu items + * representing the given commands. + */ + beforeGroupContaining?: ReadonlyArray; + + /** + * Place this menu item's group after the containing group of the menu items + * representing the given commands. + */ + afterGroupContaining?: ReadonlyArray; } +export type ContextMenuOptions = ContextMenuItemOptions | { type: "separator" }; + export interface CopyMarkerOptions { /** Whether or not the marker should be tailed. */ tailed?: boolean; @@ -6336,6 +6372,16 @@ export interface FindMarkerOptions { intersectsRow?: number; } +export interface HistoryTransactionOptions { + /** When provided, skip taking snapshot for other selections markerLayers except given one. */ + selectionsMarkerLayer?: MarkerLayer; +} + +export interface HistoryTraversalOptions { + /** Restore snapshot of selections marker layer to given selectionsMarkerLayer. */ + selectionsMarkerLayer?: MarkerLayer; +} + export interface MenuOptions { /** The menu itme's label. */ label: string; @@ -6393,6 +6439,11 @@ export interface ProcessOptions extends NodeProcessOptions { autoStart?: boolean; } +export interface ReadonlyEditOptions { + /** Whether the readonly protections on the text editor should be ignored. */ + bypassReadOnly?: boolean; +} + export interface ScanContextOptions { /** The number of lines before the matched line to include in the results object. */ leadingContextLineCount?: number; @@ -6474,7 +6525,18 @@ export interface SpawnProcessOptions { shell?: boolean | string; } -export interface TextInsertionOptions { +export interface TextEditOptions { + /** If true, all line endings will be normalized to match the editor's current mode. */ + normalizeLineEndings?: boolean; + + /** + * If skip, skips the undo stack for this operation. + * @deprecated Call groupLastChanges() on the TextBuffer afterward instead. + */ + undo?: "skip"; +} + +export interface TextInsertionOptions extends TextEditOptions { /** If true, selects the newly added text. */ select?: boolean; @@ -6497,12 +6559,6 @@ export interface TextInsertionOptions { * true, this behavior is suppressed. */ preserveTrailingLineIndentation?: boolean; - - /** If true, all line endings will be normalized to match the editor's current mode. */ - normalizeLineEndings?: boolean; - - /** If skip, skips the undo stack for this operation. */ - undo?: "skip"; } /** The options for a Bootstrap 3 Tooltip class, which Atom uses a variant of. */ @@ -6797,6 +6853,12 @@ export interface ProjectHistory { lastOpened: Date; } +export interface ProjectSpecification { + paths: string[]; + originPath: string; + config?: ConfigValues; +} + export interface ScandalResult { filePath: string; matches: Array<{ diff --git a/types/auth0-lock/auth0-lock-tests.ts b/types/auth0-lock/auth0-lock-tests.ts index 3ef12e327b..0c64fd361b 100644 --- a/types/auth0-lock/auth0-lock-tests.ts +++ b/types/auth0-lock/auth0-lock-tests.ts @@ -124,7 +124,9 @@ const otherOptions : Auth0LockConstructorOptions = { configurationBaseUrl: "https://cdn.auth0.com", languageBaseUrl: "http://www.example.com", hashCleanup: false, - leeway: 30 + leeway: 30, + _enableImpersonation: true, + _enableIdPInitiatedLogin: false }; new Auth0Lock(CLIENT_ID, DOMAIN, otherOptions); @@ -256,6 +258,7 @@ new Auth0Lock(CLIENT_ID, DOMAIN, avatarOptions); const authResult : AuthResult = { accessToken: 'fake_access_token', + expiresIn: 7200, idToken: 'fake_id_token', idTokenPayload: { aud: "EaQzyHt1Dy57l-r5iHcMeT-lh1fFZntg", @@ -265,5 +268,6 @@ const authResult : AuthResult = { sub: "auth0|aksjfkladsf" }, refreshToken: undefined, - state: "923jf092j3.FFSDJFDSKLDF" + state: "923jf092j3.FFSDJFDSKLDF", + tokenType: 'Bearer' }; diff --git a/types/auth0-lock/index.d.ts b/types/auth0-lock/index.d.ts index 7dd99af9e6..27639834db 100644 --- a/types/auth0-lock/index.d.ts +++ b/types/auth0-lock/index.d.ts @@ -1,4 +1,4 @@ -// Type definitions for auth0-lock 10.16 +// Type definitions for auth0-lock 11.4 // Project: http://auth0.com // Definitions by: Brian Caruso // Dan Caddigan @@ -118,7 +118,7 @@ interface Auth0LockConstructorOptions { auth?: Auth0LockAuthOptions; autoclose?: boolean; autofocus?: boolean; - avatar?: Auth0LockAvatarOptions; + avatar?: Auth0LockAvatarOptions | null; clientBaseUrl?: string; closable?: boolean; configurationBaseUrl?: string; @@ -143,6 +143,8 @@ interface Auth0LockConstructorOptions { socialButtonStyle?: "big" | "small"; theme?: Auth0LockThemeOptions; usernameStyle?: string; + _enableImpersonation?: boolean; + _enableIdPInitiatedLogin?: boolean; } interface Auth0LockFlashMessageOptions { @@ -163,6 +165,8 @@ interface Auth0LockShowOptions { interface AuthResult { accessToken: string; + appState?: any; + expiresIn: number; idToken: string; idTokenPayload: { aud: string; @@ -172,8 +176,10 @@ interface AuthResult { sub: string; }; refreshToken?: string; + scope?: string; state: string; -} + tokenType: string; + } interface Auth0LockStatic { new (clientId: string, domain: string, options?: Auth0LockConstructorOptions): Auth0LockStatic; diff --git a/types/auth0/auth0-tests.ts b/types/auth0/auth0-tests.ts index 0572c2b0e7..94e7d63cb3 100644 --- a/types/auth0/auth0-tests.ts +++ b/types/auth0/auth0-tests.ts @@ -75,6 +75,25 @@ management // Handle the error. }); +// Link users +management + .createUser({ connection: 'email', email: 'hi@me.co' }) + .catch(err => console.error('Cannot create E-mail user', err)) + .then((emailUser) => { + if (!emailUser) return; + management + .createUser({ connection: 'sms', phone_number: '+1234567890' }) + .catch(err => console.error('Cannot create SMS user', err)) + .then((smsUser) => { + if (!smsUser) return; + const userId = emailUser.user_id; + const params = { user_id: smsUser.user_id, provider: 'sms' }; + management.linkUsers(userId, params) + .catch(err => console.error('Cannot link E-mail and SMS users', err)) + .then((linkedUsers) => console.log(linkedUsers)) + }) + }); + auth .requestChangePasswordEmail({ connection: 'My-Connection', @@ -141,3 +160,12 @@ management.createPasswordChangeTicket({ }, (err: Error, data) => { console.log(data.ticket); }); + +// Link users +management.linkUsers('primaryId', { user_id: 'secondaryId' }) + .then((result: any) => console.log(result)); + +// Link users with callback +management.linkUsers('primaryId', { user_id: 'secondaryId' }, + (err: Error, result: any) => {}); + diff --git a/types/auth0/index.d.ts b/types/auth0/index.d.ts index 58013848f8..aa82e908e5 100644 --- a/types/auth0/index.d.ts +++ b/types/auth0/index.d.ts @@ -1,4 +1,4 @@ -// Type definitions for auth0 2.7 +// Type definitions for auth0 2.9.1 // Project: https://github.com/auth0/node-auth0 // Definitions by: Wilson Hobbs , Seth Westphal , Amiram Korach // Definitions: https://github.com/DefinitelyTyped/DefinitelyTyped @@ -33,8 +33,13 @@ export interface RetryOptions { maxRetries?: number; } -export interface UserMetadata { } -export interface AppMetadata { } +export interface UserMetadata { + [propName: string]: string +} + +export interface AppMetadata { + [propName: string]: any +} export interface UserData { email?: string; @@ -345,6 +350,14 @@ export interface Identity { user_id: string; provider: string; isSocial: boolean; + profileData?: { + email?: string; + email_verified?: boolean; + name?: string; + phone_number?: string; + phone_verified?: boolean; + request_language?: string; + } } export interface AuthenticationClientOptions { @@ -462,7 +475,7 @@ export interface UnlinkAccountsResponse { profileData?: UnlinkAccountsResponseProfile } -export interface LinkAccountsData { +export interface LinkAccountsParams { user_id: string; connection_id?: string; provider?: string; @@ -505,9 +518,72 @@ export interface EmailVerificationTicketOptions { result_url: string; } +export interface BaseClientOptions { + baseUrl: string; + clientId?: string; +} + +export interface OAuthClientOptions extends BaseClientOptions { + clientSecret?: string; +} + +export interface DatabaseClientOptions extends BaseClientOptions { +} + +export interface PasswordLessClientOptions extends BaseClientOptions { +} + +export interface TokenManagerOptions extends BaseClientOptions { + headers?: any; +} +export interface UsersOptions extends BaseClientOptions { + headers?: any; +} + +export interface SignInOptions extends VerifyOptions { + connection?: string; +} + +export interface SocialSignInOptions { + access_token: string; + connection: string; +} + +export interface SignInToken { + access_token: string; + id_token?: string; + token_type?: string; + expiry: number; +} + +export interface RequestSMSCodeOptions extends RequestSMSOptions { + client_id: string; +} + +export type SendType = 'link' | 'code'; +export interface RequestEmailCodeOrLinkOptions { + email: string; + send: SendType +} + +export interface ImpersonateSettingOptions { + impersonator_id: string; + protocol: string; + token: string; + clientId?: string; +} + export class AuthenticationClient { + + // Members + database?: DatabaseAuthenticator; + oauth?: OAuthAuthenticator; + passwordless?: PasswordlessAuthenticator; + tokens?: TokenManager; + users?: UsersManager; + constructor(options: AuthenticationClientOptions); getClientInfo(): ClientInfo; @@ -664,8 +740,8 @@ export class ManagementClient { unlinkUsers(params: UnlinkAccountsParams): Promise; unlinkUsers(params: UnlinkAccountsParams, cb: (err: Error, data: UnlinkAccountsResponse) => void): void; - linkUsers(params: ObjectWithId, data: LinkAccountsData): Promise; - linkUsers(params: ObjectWithId, data: LinkAccountsData, cb: (err: Error, data: any) => void): void; + linkUsers(userId: string, params: LinkAccountsParams): Promise; + linkUsers(userId: string, params: LinkAccountsParams, cb: (err: Error, data: any) => void): void; // Tokens @@ -747,3 +823,63 @@ export class ManagementClient { updateResourceServer(params: ObjectWithId, data: ResourceServer): Promise; updateResourceServer(params: ObjectWithId, data: ResourceServer, cb?: (err: Error, data: ResourceServer) => void): void; } + + +export class DatabaseAuthenticator { + constructor(options: DatabaseClientOptions, oauth: OAuthAuthenticator); + + changePassword(data: ResetPasswordOptions): Promise; + changePassword(data: ResetPasswordOptions, cb: (err: Error, message: string) => void): void; + + requestChangePasswordEmail(data: ResetPasswordEmailOptions): Promise; + requestChangePasswordEmail(data: ResetPasswordEmailOptions, cb: (err: Error, message: string) => void): void; + + signIn(data: SignInOptions): Promise; + signIn(data: SignInOptions, cb: (err: Error, data: SignInToken) => void): void; + + signUp(data: CreateUserData): Promise; + signIn(data: CreateUserData, cb: (err: Error, data: User) => void): void; + +} + +export class OAuthAuthenticator { + constructor(options: OAuthClientOptions); + + passwordGrant(options: PasswordGrantOptions): Promise; + passwordGrant(options: PasswordGrantOptions, cb: (err: Error, response: SignInToken) => void): void; + + signIn(data: SignInOptions): Promise; + signIn(data: SignInOptions, cb: (err: Error, data: SignInToken) => void): void; + + + socialSignIn(data: SocialSignInOptions): Promise; + socialSignIn(data: SocialSignInOptions, cb: (err: Error, data: SignInToken) => void): void; +} + +export class PasswordlessAuthenticator { + constructor(options: PasswordLessClientOptions, oauth: OAuthAuthenticator); + + signIn(data: SignInOptions): Promise; + signIn(data: SignInOptions, cb: (err: Error, data: SignInToken) => void): void; + + sendEmail(data: RequestEmailCodeOrLinkOptions): Promise; + sendEmail(data: RequestEmailCodeOrLinkOptions, cb: (err: Error, message: string) => void): void; + + sendSMS(data: RequestSMSCodeOptions): Promise; + sendSMS(data: RequestSMSCodeOptions, cb: (err: Error, message: string) => void): void; +} + +export class TokenManager { + constructor(options: TokenManagerOptions); + +} + +export class UsersManager { + constructor(options: UsersOptions); + + getInfo(accessToken: string): Promise; + getInfo(accessToken: string, cb: (err: Error, user: User) => void): void; + + impersonate(userId: string, settings: ImpersonateSettingOptions): Promise; + impersonate(userId: string, settings: ImpersonateSettingOptions, cb: (err: Error, data: any) => void): void; +} \ No newline at end of file diff --git a/types/autobahn/index.d.ts b/types/autobahn/index.d.ts index 969c703478..59bb2c404d 100644 --- a/types/autobahn/index.d.ts +++ b/types/autobahn/index.d.ts @@ -25,7 +25,7 @@ declare namespace autobahn { leave(reason: string, message: string): void; - call(procedure: string, args?: any[], kwargs?: any, options?: ICallOptions): When.Promise; + call(procedure: string, args?: any[] | any, kwargs?: any, options?: ICallOptions): When.Promise; publish(topic: string, args?: any[], kwargs?: any, options?: IPublishOptions): When.Promise; @@ -96,7 +96,7 @@ declare namespace autobahn { kwargs: any; } - type SubscribeHandler = (args?: any[], kwargs?: any, details?: IEvent) => void; + type SubscribeHandler = (args?: any[] | any, kwargs?: any, details?: IEvent) => void; interface ISubscription { topic: string; @@ -206,7 +206,7 @@ declare namespace autobahn { type DeferFactory = () => When.Promise; - type OnChallengeHandler = (session: Session, method: string, extra: any) => string; + type OnChallengeHandler = (session: Session, method: string, extra: any) => string | When.Promise; interface IConnectionOptions { use_es6_promises?: boolean; diff --git a/types/awesomplete/awesomplete-tests.ts b/types/awesomplete/awesomplete-tests.ts index f9ff4fed77..a3c66875a4 100644 --- a/types/awesomplete/awesomplete-tests.ts +++ b/types/awesomplete/awesomplete-tests.ts @@ -11,6 +11,7 @@ new Awesomplete(input, { const awesomplete = new Awesomplete(input); awesomplete.list = ["Ada", "Java", "JavaScript", "LOLCODE", "Node.js", "Ruby on Rails"]; +awesomplete.destroy(); new Awesomplete(input, { list: [ diff --git a/types/awesomplete/index.d.ts b/types/awesomplete/index.d.ts index 149b87e9f6..9f5060de03 100644 --- a/types/awesomplete/index.d.ts +++ b/types/awesomplete/index.d.ts @@ -1,6 +1,9 @@ // Type definitions for Awesomplete 1.1 // Project: https://leaverou.github.io/awesomplete/ -// Definitions by: webbiesdk , Ben Dixon , Trevor Bekolay +// Definitions by: webbiesdk +// Ben Dixon +// Trevor Bekolay +// Chris LoPresto // Definitions: https://github.com/DefinitelyTyped/DefinitelyTyped declare class Awesomplete { @@ -35,10 +38,12 @@ declare class Awesomplete { selected: boolean; open: () => void; status: HTMLElement; + destroy: () => void; } declare namespace Awesomplete { - type Suggestion = string | {label: string | any, value: string | any} | [string, string]; + type Suggestion = string | { label: string | any, value: string | any } | [string, string]; + type SortFunction = (left: number | any[], right: number | any[]) => number; interface Options { list?: string | string[] | Element | Array<{ label: string, value: any }> | Array<[string, string]>; @@ -47,7 +52,7 @@ declare namespace Awesomplete { autoFirst?: boolean; data?(item: Suggestion, input: string): string; filter?(text: string, input: string): boolean; - sort?(left: number | any[], right: number | any[]): number; + sort?: boolean | SortFunction; item?(text: string, input: string): HTMLElement; replace?(text: string): void; } diff --git a/types/aws-lambda-mock-context/index.d.ts b/types/aws-lambda-mock-context/index.d.ts index 6fc5fda67a..b5a3768f2d 100644 --- a/types/aws-lambda-mock-context/index.d.ts +++ b/types/aws-lambda-mock-context/index.d.ts @@ -26,10 +26,10 @@ interface Context { } interface Options { - region: string; - account: string; - functionName: string; - functionVersion: string; - memoryLimitInMB: string; + region?: string; + account?: string; + functionName?: string; + functionVersion?: string; + memoryLimitInMB?: string; alias?: string; } diff --git a/types/aws-lambda/aws-lambda-tests.ts b/types/aws-lambda/aws-lambda-tests.ts index 2b7b375576..d3e630ddf1 100644 --- a/types/aws-lambda/aws-lambda-tests.ts +++ b/types/aws-lambda/aws-lambda-tests.ts @@ -83,6 +83,7 @@ str = apiGwEvtReqCtx.httpMethod; strOrNull = apiGwEvtReqCtx.identity.accessKey; strOrNull = apiGwEvtReqCtx.identity.accountId; strOrNull = apiGwEvtReqCtx.identity.apiKey; +strOrNull = apiGwEvtReqCtx.identity.apiKeyId; strOrNull = apiGwEvtReqCtx.identity.caller; strOrNull = apiGwEvtReqCtx.identity.cognitoAuthenticationProvider; strOrNull = apiGwEvtReqCtx.identity.cognitoAuthenticationType; @@ -92,6 +93,7 @@ str = apiGwEvtReqCtx.identity.sourceIp; strOrNull = apiGwEvtReqCtx.identity.user; strOrNull = apiGwEvtReqCtx.identity.userAgent; strOrNull = apiGwEvtReqCtx.identity.userArn; +str = apiGwEvtReqCtx.path; str = apiGwEvtReqCtx.stage; str = apiGwEvtReqCtx.requestId; str = apiGwEvtReqCtx.resourceId; @@ -259,10 +261,82 @@ statement = { Resource: str }; +// $ExpectError statement = { + Effect: str, + Action: str, + Principal: 123 +}; + +// Bad Resource +// $ExpectError +statement = { + Effect: str, + Action: str, + Resource: 123 +}; + +// Bad Resource with valid Principal +// $ExpectError +statement = { + Effect: str, + Action: str, + Principal: { Service: str}, + Resource: 123 +}; + +// Bad principal with valid Resource +// $ExpectError +statement = { + Effect: str, + Action: str, + Principal: 123, + Resource: str +}; + +// No Effect +// $ExpectError +statement = { + Action: str, + Principal: str +}; + +statement = { + Sid: str, Action: [str, str], Effect: str, - Resource: [str, str] + Resource: [str, str], + Condition: { + condition1: { key: "value" }, + condition2: [{ + key1: "value", + key2: "value" + }, { + key3: "value" + }] + }, + Principal: [str, str], + NotPrincipal: [str, str] +}; + +statement = { + Action: str, + Principal: str, + Effect: str +}; + +statement = { + Action: str, + NotPrincipal: { + Service: str + }, + Effect: str +}; + +statement = { + Effect: str, + NotAction: str, + NotResource: str }; policyDocument = { @@ -270,6 +344,11 @@ policyDocument = { Statement: [statement] }; +policyDocument = { + Version: str, + Statement: [statement, statement] +}; + authResponse = { principalId: str, policyDocument, @@ -425,6 +504,7 @@ function callback(cb: AWSLambda.Callback) { cb(); cb(null); cb(error); + cb(str); // https://docs.aws.amazon.com/apigateway/latest/developerguide/handle-errors-in-lambda-integration.html cb(null, anyObj); cb(null, bool); cb(null, str); @@ -447,6 +527,58 @@ function customAuthorizerCallback(cb: AWSLambda.CustomAuthorizerCallback) { cb(null, authResponse); } +/* CodePipeline events https://docs.aws.amazon.com/codepipeline/latest/userguide/actions-invoke-lambda-function.html#actions-invoke-lambda-function-json-event-example */ +const CodePipelineEvent: AWSLambda.CodePipelineEvent = { + "CodePipeline.job": { + id: "11111111-abcd-1111-abcd-111111abcdef", + accountId: "111111111111", + data: { + actionConfiguration: { + configuration: { + FunctionName: "MyLambdaFunctionForAWSCodePipeline", + UserParameters: "some-input-such-as-a-URL" + } + }, + inputArtifacts: [ + { + location: { + s3Location: { + bucketName: "the name of the bucket configured as the pipeline artifact store in Amazon S3, for example codepipeline-us-east-2-1234567890", + objectKey: "the name of the application, for example CodePipelineDemoApplication.zip" + }, + type: "S3" + }, + revision: null, + name: "ArtifactName" + } + ], + outputArtifacts: [], + artifactCredentials: { + secretAccessKey: "wJalrXUtnFEMI/K7MDENG/bPxRfiCYEXAMPLEKEY", + sessionToken: `MIICiTCCAfICCQD6m7oRw0uXOjANBgkqhkiG9w + 0BAQUFADCBiDELMAkGA1UEBhMCVVMxCzAJBgNVBAgTAldBMRAwDgYDVQQHEwdTZ + WF0dGxlMQ8wDQYDVQQKEwZBbWF6b24xFDASBgNVBAsTC0lBTSBDb25zb2xlMRIw + EAYDVQQDEwlUZXN0Q2lsYWMxHzAdBgkqhkiG9w0BCQEWEG5vb25lQGFtYXpvbi5 + jb20wHhcNMTEwNDI1MjA0NTIxWhcNMTIwNDI0MjA0NTIxWjCBiDELMAkGA1UEBh + MCVVMxCzAJBgNVBAgTAldBMRAwDgYDVQQHEwdTZWF0dGxlMQ8wDQYDVQQKEwZBb + WF6b24xFDASBgNVBAsTC0lBTSBDb25zb2xlMRIwEAYDVQQDEwlUZXN0Q2lsYWMx + HzAdBgkqhkiG9w0BCQEWEG5vb25lQGFtYXpvbi5jb20wgZ8wDQYJKoZIhvcNAQE + BBQADgY0AMIGJAoGBAMaK0dn+a4GmWIWJ21uUSfwfEvySWtC2XADZ4nB+BLYgVI + k60CpiwsZ3G93vUEIO3IyNoH/f0wYK8m9TrDHudUZg3qX4waLG5M43q7Wgc/MbQ + ITxOUSQv7c7ugFFDzQGBzZswY6786m86gpEIbb3OhjZnzcvQAaRHhdlQWIMm2nr + AgMBAAEwDQYJKoZIhvcNAQEFBQADgYEAtCu4nUhVVxYUntneD9+h8Mg9q6q+auN + KyExzyLwaxlAoo7TJHidbtS4J5iNmZgXL0FkbFFBjvSfpJIlJ00zbhNYS5f6Guo + EDmFJl0ZxBHjJnyp378OD8uTs7fLvjx79LjSTbNYiytVbZPQUQ5Yaxu2jXnimvw + 3rrszlaEXAMPLE=`, + accessKeyId: "AKIAIOSFODNN7EXAMPLE" + }, + continuationToken: "A continuation token if continuing job" + } + } +}; + +CodePipelineEvent["CodePipeline.job"].data.encryptionKey = { type: 'KMS', id: 'key' }; + /* CloudFront events, see http://docs.aws.amazon.com/AmazonCloudFront/latest/DeveloperGuide/lambda-event-structure.html */ const CloudFrontRequestEvent: AWSLambda.CloudFrontRequestEvent = { Records: [ @@ -572,6 +704,28 @@ const CloudFrontResponseEvent: AWSLambda.CloudFrontResponseEvent = { ] }; +/* Kinesis Data Stream Events */ +declare let kinesisStreamEvent: AWSLambda.KinesisStreamEvent; +declare let kinesisStreamRecord: AWSLambda.KinesisStreamRecord; +declare let kinesisStreamRecordPayload: AWSLambda.KinesisStreamRecordPayload; + +kinesisStreamRecord = kinesisStreamEvent.Records[0]; + +str = kinesisStreamRecord.awsRegion; +str = kinesisStreamRecord.eventID; +str = kinesisStreamRecord.eventName; +str = kinesisStreamRecord.eventSource; +str = kinesisStreamRecord.eventSourceARN; +str = kinesisStreamRecord.eventVersion; +str = kinesisStreamRecord.invokeIdentityArn; +kinesisStreamRecordPayload = kinesisStreamRecord.kinesis; + +num = kinesisStreamRecordPayload.approximateArrivalTimestamp; +str = kinesisStreamRecordPayload.data; +str = kinesisStreamRecordPayload.kinesisSchemaVersion; +str = kinesisStreamRecordPayload.partitionKey; +str = kinesisStreamRecordPayload.sequenceNumber; + /* Compatibility functions */ context.done(); context.done(error); @@ -585,8 +739,27 @@ context.fail(str); /* Handler */ let handler: AWSLambda.Handler = (event: any, context: AWSLambda.Context, cb: AWSLambda.Callback) => { }; -// async methods return Promise, test assignability -let asyncHandler: AWSLambda.Handler = async (event: any, context: AWSLambda.Context, cb: AWSLambda.Callback) => { }; +/* In node8.10 runtime, handlers may return a promise for the result value, so existing async + * handlers that return Promise before calling the callback will now have a `null` result. + * Be safe and make that badly typed with a major verson bump to 8.10 so users expect the breaking change, + * since the upgrade effort should be pretty low in most cases, and it points them at a nicer solution. + */ +// $ExpectError +let legacyAsyncHandler: AWSLambda.APIGatewayProxyHandler = async ( + event: AWSLambda.APIGatewayProxyEvent, + context: AWSLambda.Context, + cb: AWSLambda.Callback, +) => { + cb(null, { statusCode: 200, body: 'No longer valid' }); +}; + +let node8AsyncHandler: AWSLambda.APIGatewayProxyHandler = async ( + event: AWSLambda.APIGatewayProxyEvent, + context: AWSLambda.Context, + cb: AWSLambda.Callback, +) => { + return { statusCode: 200, body: 'Is now valid!' }; +}; let inferredHandler: AWSLambda.S3Handler = (event, context, cb) => { // $ExpectType S3Event @@ -631,6 +804,8 @@ let apiGtwProxyHandler: AWSLambda.APIGatewayProxyHandler = (event: AWSLambda.API let proxyHandler: AWSLambda.ProxyHandler = (event: AWSLambda.APIGatewayEvent, context: AWSLambda.Context, cb: AWSLambda.ProxyCallback) => { }; apiGtwProxyHandler = proxyHandler; +let codePipelineHandler: AWSLambda.CodePipelineHandler = (event: AWSLambda.CodePipelineEvent, context: AWSLambda.Context, cb: AWSLambda.Callback) => {}; + let cloudFrontRequestHandler: AWSLambda.CloudFrontRequestHandler = (event: AWSLambda.CloudFrontRequestEvent, context: AWSLambda.Context, cb: AWSLambda.CloudFrontRequestCallback) => { cb(); cb(null); @@ -661,3 +836,5 @@ let customHandler: AWSLambda.Handler = (event, contex // $ExpectError cb(null, { resultString: bool }); }; + +let kinesisStreamHandler: AWSLambda.KinesisStreamHandler = (event: AWSLambda.KinesisStreamEvent, context: AWSLambda.Context, cb: AWSLambda.Callback) => { }; diff --git a/types/aws-lambda/index.d.ts b/types/aws-lambda/index.d.ts index 5802913c37..dd3fd3bd4e 100644 --- a/types/aws-lambda/index.d.ts +++ b/types/aws-lambda/index.d.ts @@ -1,4 +1,4 @@ -// Type definitions for AWS Lambda +// Type definitions for AWS Lambda 8.10 // Project: http://docs.aws.amazon.com/lambda // Definitions by: James Darbyshire // Michael Skarum @@ -16,6 +16,9 @@ // Danilo Raisi // Simon Buchan // David Hayden +// Chris Redekop +// Aneil Mallavarapu +// Jeremy Nagel // Definitions: https://github.com/DefinitelyTyped/DefinitelyTyped // TypeScript Version: 2.3 @@ -29,6 +32,7 @@ export interface APIGatewayEventRequestContext { accessKey: string | null; accountId: string | null; apiKey: string | null; + apiKeyId: string | null; caller: string | null; cognitoAuthenticationProvider: string | null; cognitoAuthenticationType: string | null; @@ -39,6 +43,7 @@ export interface APIGatewayEventRequestContext { userAgent: string | null; userArn: string | null; }; + path: string; stage: string; requestId: string; requestTimeEpoch: number; @@ -437,28 +442,59 @@ export interface CustomAuthorizerResult { principalId: string; policyDocument: PolicyDocument; context?: AuthResponseContext; + usageIdentifierKey?: string; } export type AuthResponse = CustomAuthorizerResult; /** * API Gateway CustomAuthorizer AuthResponse.PolicyDocument. - * http://docs.aws.amazon.com/apigateway/latest/developerguide/use-custom-authorizer.html#api-gateway-custom-authorizer-output + * https://docs.aws.amazon.com/apigateway/latest/developerguide/api-gateway-lambda-authorizer-output.html + * https://docs.aws.amazon.com/IAM/latest/UserGuide/reference_policies_elements.html#Condition */ export interface PolicyDocument { Version: string; - Statement: [Statement]; + Id?: string; + Statement: Statement[]; +} + +/** + * API Gateway CustomAuthorizer AuthResponse.PolicyDocument.Condition. + * https://docs.aws.amazon.com/apigateway/latest/developerguide/apigateway-control-access-policy-language-overview.html + * https://docs.aws.amazon.com/IAM/latest/UserGuide/reference_policies_elements_condition.html + */ +export interface ConditionBlock { + [condition: string]: Condition | Condition[]; +} + +export interface Condition { + [key: string]: string | string[]; } /** * API Gateway CustomAuthorizer AuthResponse.PolicyDocument.Statement. - * http://docs.aws.amazon.com/apigateway/latest/developerguide/use-custom-authorizer.html#api-gateway-custom-authorizer-output + * https://docs.aws.amazon.com/apigateway/latest/developerguide/apigateway-control-access-policy-language-overview.html + * https://docs.aws.amazon.com/IAM/latest/UserGuide/reference_policies_elements.html */ -export interface Statement { - Action: string | string[]; +export type Statement = BaseStatement & StatementAction & (StatementResource | StatementPrincipal); + +export interface BaseStatement { Effect: string; - Resource: string | string[]; + Sid?: string; + Condition?: ConditionBlock; } +export type PrincipalValue = { [key: string]: string | string[]; } | string | string[]; +export interface MaybeStatementPrincipal { + Principal?: PrincipalValue; + NotPrincipal?: PrincipalValue; +} +export interface MaybeStatementResource { + Resource?: string | string[]; + NotResource?: string | string[]; +} +export type StatementAction = { Action: string | string[] } | { NotAction: string | string[] }; +export type StatementResource = MaybeStatementPrincipal & ({ Resource: string | string[] } | { NotResource: string | string[] }); +export type StatementPrincipal = MaybeStatementResource & ({ Principal: PrincipalValue } | { NotPrincipal: PrincipalValue }); /** * API Gateway CustomAuthorizer AuthResponse.PolicyDocument.Statement. * http://docs.aws.amazon.com/apigateway/latest/developerguide/use-custom-authorizer.html#api-gateway-custom-authorizer-output @@ -467,6 +503,58 @@ export interface AuthResponseContext { [name: string]: any; } +/** + * CodePipeline events + * https://docs.aws.amazon.com/codepipeline/latest/userguide/actions-invoke-lambda-function.html + */ +export interface S3ArtifactLocation { + bucketName: string; + objectKey: string; +} +export interface S3ArtifactStore { + type: 'S3'; + s3Location: S3ArtifactLocation; +} + +export type ArtifactLocation = S3ArtifactStore; + +export interface Artifact { + name: string; + revision: string | null; + location: ArtifactLocation; +} + +export interface Credentials { + accessKeyId: string; + secretAccessKey: string; + sessionToken?: string; +} + +export interface EncryptionKey { + type: string; + id: string; +} + +export interface CodePipelineEvent { + "CodePipeline.job": { + id: string; + accountId: string; + data: { + actionConfiguration: { + configuration: { + FunctionName: string; + UserParameters: string; + } + }; + inputArtifacts: Artifact[]; + outputArtifacts: Artifact[]; + artifactCredentials: Credentials; + encryptionKey?: EncryptionKey & {type: 'KMS'}; + continuationToken?: string; + }; + }; +} + /** * CloudFront events * http://docs.aws.amazon.com/AmazonCloudFront/latest/DeveloperGuide/lambda-event-structure.html @@ -529,6 +617,31 @@ export interface CloudFrontRequestEvent { export type CloudFrontResponseResult = undefined | null | CloudFrontResultResponse; +// Kinesis Streams +// https://docs.aws.amazon.com/lambda/latest/dg/eventsources.html#eventsources-kinesis-streams +export interface KinesisStreamRecordPayload { + approximateArrivalTimestamp: number; + data: string; + kinesisSchemaVersion: string; + partitionKey: string; + sequenceNumber: string; +} + +export interface KinesisStreamRecord { + awsRegion: string; + eventID: string; + eventName: string; + eventSource: string; + eventSourceARN: string; + eventVersion: string; + invokeIdentityArn: string; + kinesis: KinesisStreamRecordPayload; +} + +export interface KinesisStreamEvent { + Records: KinesisStreamRecord[]; +} + /** * AWS Lambda handler function. * http://docs.aws.amazon.com/lambda/latest/dg/nodejs-prog-model-handler.html @@ -536,17 +649,24 @@ export type CloudFrontResponseResult = undefined | null | CloudFrontResultRespon * @param event – event data. * @param context – runtime information of the Lambda function that is executing. * @param callback – optional callback to return information to the caller, otherwise return value is null. + * @return In the node8.10 runtime, a promise for the lambda result. */ -export type Handler = (event: TEvent, context: Context, callback: Callback) => void; +export type Handler = ( + event: TEvent, + context: Context, + callback: Callback, +) => void | Promise; /** * Optional callback parameter. * http://docs.aws.amazon.com/lambda/latest/dg/nodejs-prog-model-handler.html * * @param error – an optional parameter that you can use to provide results of the failed Lambda function execution. + * It can be a string for Lambda Proxy Integrations + * https://docs.aws.amazon.com/apigateway/latest/developerguide/handle-errors-in-lambda-integration.html * @param result – an optional parameter that you can use to provide the result of a successful function execution. The result provided must be JSON.stringify compatible. */ -export type Callback = (error?: Error | null, result?: TResult) => void; +export type Callback = (error?: Error | null | string, result?: TResult) => void; // Begin defining Handler and Callback types for each API trigger type. // Ordered by https://docs.aws.amazon.com/lambda/latest/dg/invoking-lambda-function.html @@ -589,13 +709,17 @@ export type ProxyCallback = APIGatewayProxyCallback; // Old name // TODO: IoT +export type CodePipelineHandler = Handler; + export type CloudFrontRequestHandler = Handler; export type CloudFrontRequestCallback = Callback; export type CloudFrontResponseHandler = Handler; export type CloudFrontResponseCallback = Callback; -// TODO: Kinesis (should be very close to DynamoDB stream?) +export type KinesisStreamHandler = Handler; + +// TODO: Kinesis Firehose export type CustomAuthorizerHandler = Handler; export type CustomAuthorizerCallback = Callback; diff --git a/types/axe-webdriverjs/axe-webdriverjs-tests.ts b/types/axe-webdriverjs/axe-webdriverjs-tests.ts new file mode 100644 index 0000000000..47eeadc8c5 --- /dev/null +++ b/types/axe-webdriverjs/axe-webdriverjs-tests.ts @@ -0,0 +1,31 @@ +import { Result, RunOptions, Spec } from "axe-core"; +import { AxeBuilder, AxeAnalysis } from "axe-webdriverjs"; +import { WebDriver } from "selenium-webdriver"; + +const inTest = async (webDriver: WebDriver) => { + const builderCalled: AxeBuilder = AxeBuilder(webDriver); + const builderNewed: AxeBuilder = new AxeBuilder(webDriver); + + const runOptions: RunOptions = {}; + const spec: Spec = {}; + + const analysis: AxeAnalysis = await AxeBuilder(webDriver) + .include("include") + .exclude("exclude") + .options(runOptions) + .withRules("rule") + .withRules(["rule", "rule"]) + .withTags("tag") + .withTags(["tag", "tag"]) + .disableRules("rule") + .disableRules(["rule", "rule"]) + .configure(spec) + .analyze((internalResults: AxeAnalysis) => {}); + + const inapplicable: Result[] = analysis.inapplicable; + const incomplete: Result[] = analysis.incomplete; + const passes: Result[] = analysis.passes; + const timestamp: string = analysis.timestamp; + const url: string = analysis.url; + const violations: Result[] = analysis.violations; +}; diff --git a/types/axe-webdriverjs/index.d.ts b/types/axe-webdriverjs/index.d.ts new file mode 100644 index 0000000000..3c8ae27249 --- /dev/null +++ b/types/axe-webdriverjs/index.d.ts @@ -0,0 +1,83 @@ +// Type definitions for axe-webdriverjs 2.0 +// Project: https://github.com/dequelabs/axe-webdriverjs#readme +// Definitions by: My Self +// Definitions: https://github.com/DefinitelyTyped/DefinitelyTyped +// TypeScript Version: 2.3 + +import { Result, RunOptions, Spec } from "axe-core"; +import { WebDriver } from "selenium-webdriver"; + +export interface AxeAnalysis { + inapplicable: Result[]; + incomplete: Result[]; + passes: Result[]; + timestamp: string; + url: string; + violations: Result[]; +} + +export interface AxeBuilder { + /** + * Includes a selector in analysis. + * + * @param selector CSS selector of the element to include. + */ + include(selector: string): this; + + /** + * Excludes a selector from analysis. + * + * @param selector CSS selector of the element to exclude. + */ + exclude(selector: string): this; + + /** + * Options to directly pass to `axe.run`. + * + * @param options aXe options object. + * @remarks Will override any other configured options, including calls to `withRules` and `withTags`. + * @see https://github.com/dequelabs/axe-core/issues/937 + */ + options(options: RunOptions): this; + + /** + * Limits analysis to only the specified rules. + * + * @param rules Array of rule IDs, or a single rule ID as a string. + * @remarks Cannot be used with `withTags`. + */ + withRules(rules: string | string[]): this; + + /** + * Limist analysis to only the specified tags. + * + * @param rules Array of tags, or a single tag as a string. + * @remarks Cannot be used with `withRules`. + */ + withTags(tags: string | string[]): this; + + /** + * Set the list of rules to skip when running an analysis + * + * @param rules Array of rule IDs, or a single rule ID as a string. + */ + disableRules(rules: string | string[]): this; + + /** + * Configures aXe before running analyze. + * + * @param config aXe Configuration spec to use in analysis. + */ + configure(config: Spec): this; + + /** + * Perform analysis and retrieve results. + * @param callback Function to execute when analysis completes. + */ + analyze(callback: (results: AxeAnalysis) => void): Promise; +} + +export const AxeBuilder: { + (driver: WebDriver): AxeBuilder; + new (driver: WebDriver): AxeBuilder; +}; diff --git a/types/react-monaco-editor/package.json b/types/axe-webdriverjs/package.json similarity index 60% rename from types/react-monaco-editor/package.json rename to types/axe-webdriverjs/package.json index c30b05905b..e4e88ef33a 100644 --- a/types/react-monaco-editor/package.json +++ b/types/axe-webdriverjs/package.json @@ -1,6 +1,6 @@ { "private": true, "dependencies": { - "monaco-editor": "^0.10.0" + "axe-core": "^3.0.3" } } diff --git a/types/axe-webdriverjs/tsconfig.json b/types/axe-webdriverjs/tsconfig.json new file mode 100644 index 0000000000..d8637d03e4 --- /dev/null +++ b/types/axe-webdriverjs/tsconfig.json @@ -0,0 +1,23 @@ +{ + "compilerOptions": { + "module": "commonjs", + "lib": [ + "es6" + ], + "noImplicitAny": true, + "noImplicitThis": true, + "strictFunctionTypes": true, + "strictNullChecks": true, + "baseUrl": "../", + "typeRoots": [ + "../" + ], + "types": [], + "noEmit": true, + "forceConsistentCasingInFileNames": true + }, + "files": [ + "index.d.ts", + "axe-webdriverjs-tests.ts" + ] +} diff --git a/types/axe-webdriverjs/tslint.json b/types/axe-webdriverjs/tslint.json new file mode 100644 index 0000000000..3db14f85ea --- /dev/null +++ b/types/axe-webdriverjs/tslint.json @@ -0,0 +1 @@ +{ "extends": "dtslint/dt.json" } diff --git a/types/axios-token-interceptor/axios-token-interceptor-tests.ts b/types/axios-token-interceptor/axios-token-interceptor-tests.ts new file mode 100644 index 0000000000..036223b699 --- /dev/null +++ b/types/axios-token-interceptor/axios-token-interceptor-tests.ts @@ -0,0 +1,18 @@ +import tokenProvider = require('axios-token-interceptor'); + +tokenProvider(); // $ExpectError + +const validOptions = { + getToken: () => Promise.resolve('qwerty'), +}; +tokenProvider(validOptions); // $ExpectType TokenProvider + +tokenCache(); // $ExpectError + +const getToken = Promise.resolve('qwerty'); +const validCacheOptions = { + maxAge: 3600, +}; +const cache = tokenProvider.tokenCache(getToken, validCacheOptions); // $Expect TokenCache + +cache.reset(); // $ExpectType void diff --git a/types/axios-token-interceptor/index.d.ts b/types/axios-token-interceptor/index.d.ts new file mode 100644 index 0000000000..85121f8165 --- /dev/null +++ b/types/axios-token-interceptor/index.d.ts @@ -0,0 +1,32 @@ +// Type definitions for axios-token-interceptor 0.1 +// Project: https://github.com/sandrinodimattia/axios-token-interceptor#readme +// Definitions by: Mike Dodge +// Definitions: https://github.com/DefinitelyTyped/DefinitelyTyped + +import { AxiosRequestConfig } from 'axios'; + +// Module +declare function AxiosTokenProvider(Options: AxiosTokenProvider.InterceptorOptions): AxiosTokenProvider.TokenProvider; +declare namespace AxiosTokenProvider { + function tokenCache(getToken: Promise, options: TokenCacheOptions): TokenCache; + + // Interfaces + interface InterceptorOptions { + token?: string; + getToken?: () => string | Promise; + header?: string; + headerFormatter?: (token: string) => string; + } + + type TokenProvider = (config: AxiosRequestConfig) => Promise; + + interface TokenCacheOptions { + getMaxAge?: () => number; + maxAge?: number; + } + + interface TokenCache { + reset(): void; + } +} +export = AxiosTokenProvider; diff --git a/types/axios-token-interceptor/package.json b/types/axios-token-interceptor/package.json new file mode 100644 index 0000000000..4f244abbfd --- /dev/null +++ b/types/axios-token-interceptor/package.json @@ -0,0 +1,6 @@ +{ + "private": true, + "dependencies": { + "axios": "*" + } +} diff --git a/types/axios-token-interceptor/tsconfig.json b/types/axios-token-interceptor/tsconfig.json new file mode 100644 index 0000000000..509608e7d6 --- /dev/null +++ b/types/axios-token-interceptor/tsconfig.json @@ -0,0 +1,23 @@ +{ + "compilerOptions": { + "module": "commonjs", + "lib": [ + "es6" + ], + "noImplicitAny": true, + "noImplicitThis": true, + "strictNullChecks": true, + "strictFunctionTypes": true, + "baseUrl": "../", + "typeRoots": [ + "../" + ], + "types": [], + "noEmit": true, + "forceConsistentCasingInFileNames": true + }, + "files": [ + "index.d.ts", + "axios-token-interceptor-tests.ts" + ] +} diff --git a/types/axios-token-interceptor/tslint.json b/types/axios-token-interceptor/tslint.json new file mode 100644 index 0000000000..3db14f85ea --- /dev/null +++ b/types/axios-token-interceptor/tslint.json @@ -0,0 +1 @@ +{ "extends": "dtslint/dt.json" } diff --git a/types/axon/axon-tests.ts b/types/axon/axon-tests.ts new file mode 100644 index 0000000000..a7f2a95a87 --- /dev/null +++ b/types/axon/axon-tests.ts @@ -0,0 +1,173 @@ +import * as axon from 'axon'; +import { Socket as NetSocket } from 'net'; + +const PubEmitterSocket = axon.PubEmitterSocket; +const PubSocket = axon.PubSocket; +const RepSocket = axon.RepSocket; +const ReqSocket = axon.ReqSocket; +const Socket = axon.Socket; +const SubSocket = axon.SubSocket; + +const pubSocket = new PubSocket(); +const pubEmitterSocket = new PubEmitterSocket(); +const repSocket = new RepSocket(); +const reqSocket = new ReqSocket(); +const netSocket = new NetSocket(); +const socket = new Socket(); +const subSocket = new SubSocket(); + +// $ExpectType PubSocket +pubSocket.send('anything'); + +// $ExpectType PubSocket +pubSocket.send('anything', {w: 100, h: 200}); + +// $ExpectType PubSocket +pubEmitterSocket.send('anything'); + +// $ExpectType PubSocket +pubEmitterSocket.send('anything', {w: 100, h: 200}); + +// $ExpectType Socket +pubEmitterSocket.bind(3000); + +// $ExpectError +pubEmitterSocket.bind({a, b, c}); + +// $ExpectError +pubEmitterSocket.bind(); + +// $ExpectType Socket +pubEmitterSocket.connect(3000); + +// $ExpectError +pubEmitterSocket.connect({a, b, c}); + +// $ExpectError +pubEmitterSocket.connect(); + +// $ExpectType (args: Buffer | Buffer[]) => void +repSocket.onmessage(netSocket); + +// $ExpectError +repSocket.onmessage(); + +// $ExpectError +repSocket.onmessage(''); + +// $ExpectError +repSocket.onmessage(1); + +// $ExpectError +repSocket.onmessage({}); + +// $ExpectType string +reqSocket.id(); + +// $ExpectType (args: Buffer | Buffer[]) => void +reqSocket.onmessage(); + +// $ExpectType void +reqSocket.send('anything'); + +// $ExpectType void +reqSocket.send('anything', {w: 100, h: 200}); + +// $ExpectType Socket +socket.set('name', 'aaa'); + +// $ExpectError +socket.set(1, 'aaa'); + +// $ExpectError +socket.set({}, 'aaa'); + +// $ExpectError +socket.set('name'); + +// $ExpectType any +socket.get('name'); + +// $ExpectError +socket.get(1); + +// $ExpectError +socket.get({}); + +// $ExpectType Socket +socket.enable('name'); + +// $ExpectError +socket.enable(1); + +// $ExpectError +socket.enable({}); + +// $ExpectType Socket +socket.disable('name'); + +// $ExpectError +socket.disable(1); + +// $ExpectError +socket.disable({}); + +// $ExpectType boolean +socket.enabled('name'); + +// $ExpectError +socket.enabled(1); + +// $ExpectError +socket.enabled({}); + +// $ExpectType boolean +socket.disabled('name'); + +// $ExpectError +socket.disabled(1); + +// $ExpectError +socket.disabled({}); + +// $ExpectType boolean +subSocket.hasSubscriptions(); + +// $ExpectType boolean +subSocket.matches('name'); + +// $ExpectError +subSocket.matches(1); + +// $ExpectError +subSocket.matches({}); + +// $ExpectType RegExp +subSocket.subscribe(/some regex/); + +// $ExpectType RegExp +subSocket.subscribe('some string'); + +// $ExpectError +subSocket.subscribe(1); + +// $ExpectError +subSocket.subscribe({}); + +// $ExpectError +subSocket.subscribe(); + +// $ExpectType void +subSocket.unsubscribe(/some regex/); + +// $ExpectType void +subSocket.unsubscribe('some string'); + +// $ExpectError +subSocket.unsubscribe(1); + +// $ExpectError +subSocket.unsubscribe({}); + +// $ExpectError +subSocket.unsubscribe(); diff --git a/types/axon/index.d.ts b/types/axon/index.d.ts new file mode 100644 index 0000000000..2449b83eb4 --- /dev/null +++ b/types/axon/index.d.ts @@ -0,0 +1,134 @@ +// Type definitions for axon 2.0 +// Project: https://github.com/visionmedia/axon#readme +// Definitions by: Vilim Stubičan +// Definitions: https://github.com/DefinitelyTyped/DefinitelyTyped +// TypeScript Version: 2.4 + +/// + +import { EventEmitter } from "events"; +import { Socket as NetSocket } from "net"; + +export class Socket extends EventEmitter { + set(name: string, val: any): Socket; + + get(name: string): any; + + enable(name: string): Socket; + + disable(name: string): Socket; + + enabled(name: string): boolean; + + disabled(name: string): boolean; + + use(plugin: (socket: Socket) => any): Socket; + + pack(args: Buffer | Buffer[]): Buffer; + + closeSockets(): void; + + close(): void; + + closeServer(fn: () => any): void; + + address(): { port: number; family: string; address: string; string: string } | undefined; + + removeSocket(sock: Socket): void; + + addSocket(sock: Socket): void; + + handleErrors(sock: Socket): void; + + onmessage(sock: NetSocket): (args: Buffer | Buffer[]) => void; + + connect(port: ConnectionPort, host?: string | (() => void), fn?: () => void): Socket; + + onconnect(sock: Socket): void; + + bind(port: ConnectionPort, host?: string | (() => void), fn?: () => void): Socket; +} + +export class SubSocket extends Socket { + hasSubscriptions(): boolean; + + matches(topic: string): boolean; + + onmessage(sock: NetSocket): (args: Buffer | Buffer[]) => void; + + subscribe(re: RegExp | string): RegExp; + + unsubscribe(re: RegExp | string): void; + + clearSubscriptions(): void; + + /** + * @throws {Error} + */ + send(): void; +} + +export class SubEmitterSocket { + onmessage(): (args: Buffer | Buffer[]) => void; + + on(event: string, fn: (...args: any[]) => void): SubEmitterSocket; + + off(event: string): SubEmitterSocket; + + bind(port: ConnectionPort, host?: string | (() => void), fn?: () => void): Socket; + + connect(port: ConnectionPort, host?: string | (() => void), fn?: () => void): Socket; + + close(): void; +} + +export class PubSocket extends Socket { + send(...args: any[]): PubSocket; +} + +export class PubEmitterSocket { + sock: PubSocket; + + send(...args: any[]): PubSocket; + + bind(port: ConnectionPort, host?: string | (() => void), fn?: () => void): Socket; + + connect(port: ConnectionPort, host?: string | (() => void), fn?: () => void): Socket; + + close(): void; +} + +export class PushSocket extends Socket { + send(...args: any[]): void; + enqueue(msg: any): void; +} + +export class ReqSocket extends Socket { + id(): string; + + onmessage(): (args: Buffer | Buffer[]) => void; + + send(...args: any[]): void; +} + +export class RepSocket extends Socket { + onmessage(sock: NetSocket): (args: Buffer | Buffer[]) => void; +} + +export class PullSocket extends Socket { + /** + * @throws {Error} + */ + send(): void; +} + +export type ConnectionPort = + number + | string + | { protocol?: string, hostname?: string, pathname: string, port: string | number }; + +export function socket(type: string, options?: any): Socket; + +export const types: { + [propName: string]: { new(): PubEmitterSocket | SubEmitterSocket | PushSocket | PullSocket | PubSocket | SubSocket | ReqSocket | RepSocket | Socket }; +}; diff --git a/types/axon/tsconfig.json b/types/axon/tsconfig.json new file mode 100644 index 0000000000..2025639930 --- /dev/null +++ b/types/axon/tsconfig.json @@ -0,0 +1,23 @@ +{ + "compilerOptions": { + "module": "commonjs", + "lib": [ + "es6" + ], + "noImplicitAny": true, + "noImplicitThis": true, + "strictNullChecks": true, + "strictFunctionTypes": true, + "baseUrl": "../", + "typeRoots": [ + "../" + ], + "types": [], + "noEmit": true, + "forceConsistentCasingInFileNames": true + }, + "files": [ + "index.d.ts", + "axon-tests.ts" + ] +} diff --git a/types/axon/tslint.json b/types/axon/tslint.json new file mode 100644 index 0000000000..3db14f85ea --- /dev/null +++ b/types/axon/tslint.json @@ -0,0 +1 @@ +{ "extends": "dtslint/dt.json" } diff --git a/types/azure-sb/azure-sb-tests.ts b/types/azure-sb/azure-sb-tests.ts index 411862a3b2..14d2ba9054 100644 --- a/types/azure-sb/azure-sb-tests.ts +++ b/types/azure-sb/azure-sb-tests.ts @@ -14,14 +14,14 @@ function ResponseCallback(err: Error | null, response: Azure.ServiceBus.Response const ServiceBus = AzureSB.createServiceBusService('connectionstring'); // Queues -ServiceBus.listQueues('', createResultCallback()); +ServiceBus.listQueues(createResultCallback()); ServiceBus.createQueue('test', createResultCallback()); ServiceBus.createQueueIfNotExists('test', createResultCallback()); ServiceBus.getQueue('test', createResultCallback()); ServiceBus.deleteQueue('test', ResponseCallback); // Topics -ServiceBus.listTopics('', createResultCallback()); +ServiceBus.listTopics(createResultCallback()); ServiceBus.createTopic('test', createResultCallback()); ServiceBus.createTopicIfNotExists('test', createResultCallback()); ServiceBus.getTopic('test', createResultCallback()); diff --git a/types/azure-sb/index.d.ts b/types/azure-sb/index.d.ts index ba92395c0f..9f9d07d3dc 100644 --- a/types/azure-sb/index.d.ts +++ b/types/azure-sb/index.d.ts @@ -214,15 +214,15 @@ export namespace Azure.ServiceBus { // [x: string]: string | Dictionary; // } + export const ActiveMessageCount = 'd2p1:ActiveMessageCount'; + export const DeadLetterMessageCount = 'd2p1:DeadLetterMessageCount'; + export const ScheduledMessageCount = 'd2p1:ScheduledMessageCount'; + export const TransferMessageCount = 'd2p1:TransferMessageCount'; + export const TransferDeadLetterMessageCount = 'd2p1:TransferDeadLetterMessageCount'; + export interface Topic extends ExtendedBase { AccessedAt: DateString; - CountDetails: { - 'd2p1:ActiveMessageCount': string; - 'd2p1:DeadLetterMessageCount': string; - 'd2p1:ScheduledMessageCount': string; - 'd2p1:TransferMessageCount': string; - 'd2p1:TransferDeadLetterMessageCount': string; - }; + CountDetails: { [key: string]: string }; EnableSubscriptionPartitioning: string; FilteringMessagesBeforePublishing: string; IsExpress: string; @@ -242,13 +242,7 @@ export namespace Azure.ServiceBus { } export interface Subscription extends ExtendedBase { - CountDetails: { - 'd3p1:ActiveMessageCount': string; - 'd3p1:DeadLetterMessageCount': string; - 'd3p1:ScheduledMessageCount': string; - 'd3p1:TransferMessageCount': string; - 'd3p1:TransferDeadLetterMessageCount': string; - }; + CountDetails: { [key: string]: string }; DeadLetteringOnFilterEvaluationExceptions: string; DeadLetteringOnMessageExpiration: string; LockDuration: string; @@ -315,6 +309,8 @@ export namespace Azure.ServiceBus { export type CreateSubscriptionOptions = Partial; export type ListSubscriptionsOptions = Partial; export type ListRulesOptions = Partial; + export type ListTopicsOptions = Partial; + export type ListQueuesOptions = Partial; export type CreateRuleOptions = Partial; export type CreateNotificationHubOptions = Partial; export type ListNotificationHubsOptions = Partial; diff --git a/types/azure-sb/lib/servicebusservice.d.ts b/types/azure-sb/lib/servicebusservice.d.ts index 44f2b2c522..45600a1661 100644 --- a/types/azure-sb/lib/servicebusservice.d.ts +++ b/types/azure-sb/lib/servicebusservice.d.ts @@ -11,6 +11,8 @@ import CreateTopicOptions = Azure.ServiceBus.CreateTopicOptions; import ListNotificationHubsOptions = Azure.ServiceBus.ListNotificationHubsOptions; import ListRulesOptions = Azure.ServiceBus.ListRulesOptions; import ListSubscriptionsOptions = Azure.ServiceBus.ListSubscriptionsOptions; +import ListTopicsOptions = Azure.ServiceBus.ListTopicsOptions; +import ListQueuesOptions = Azure.ServiceBus.ListQueuesOptions; import MessageOrName = Azure.ServiceBus.MessageOrName; import Queue = Azure.ServiceBus.Results.Models.Queue; import ReceiveQueueMessageOptions = Azure.ServiceBus.ReceiveQueueMessageOptions; @@ -88,7 +90,8 @@ declare class ServiceBusService extends ServiceBusServiceBase { public getQueue(queuePath: string, callback: TypedResultAndResponseCallback): void; - public listQueues(queuePath: string, + public listQueues(callback: TypedResultAndResponseCallback): void; + public listQueues(options: ListQueuesOptions, callback: TypedResultAndResponseCallback): void; /* @@ -115,7 +118,8 @@ declare class ServiceBusService extends ServiceBusServiceBase { public getTopic(topicPath: string, callback: TypedResultAndResponseCallback): void; - public listTopics(topicPath: string, + public listTopics(callback: TypedResultAndResponseCallback): void; + public listTopics(options: ListTopicsOptions, callback: TypedResultAndResponseCallback): void; /* diff --git a/types/azure-sb/lib/servicebusserviceclient.d.ts b/types/azure-sb/lib/servicebusserviceclient.d.ts index c97b1e3107..1730b642c3 100644 --- a/types/azure-sb/lib/servicebusserviceclient.d.ts +++ b/types/azure-sb/lib/servicebusserviceclient.d.ts @@ -1,14 +1,13 @@ -/// -import EventEmitter = NodeJS.EventEmitter; +import ServiceClient = require('azure-sb/lib/serviceclient'); -declare class ServiceBusServiceClient extends EventEmitter { +declare class ServiceBusServiceClient extends ServiceClient { constructor(accessKey?: string, issuer?: string, sharedAccessKeyName?: string, sharedAccessKeyValue?: string, host?: string, acsHost?: string, - authenticationProvider?: object); + authenticationProvider?: object); } export = ServiceBusServiceClient; diff --git a/types/azure-sb/lib/serviceclient.d.ts b/types/azure-sb/lib/serviceclient.d.ts new file mode 100644 index 0000000000..3e39052235 --- /dev/null +++ b/types/azure-sb/lib/serviceclient.d.ts @@ -0,0 +1,8 @@ +/// +import EventEmitter = NodeJS.EventEmitter; +declare class ServiceClient extends EventEmitter { + public host: string; + public port: number; + public protocol: string; +} +export = ServiceClient; diff --git a/types/azure-sb/tsconfig.json b/types/azure-sb/tsconfig.json index 6e015480dc..61e37ac754 100644 --- a/types/azure-sb/tsconfig.json +++ b/types/azure-sb/tsconfig.json @@ -30,6 +30,7 @@ "lib/models/subscriptionresult.d.ts", "lib/models/notificationhubresult.d.ts", "lib/models/resourceresult.d.ts", + "lib/serviceclient.d.ts", "lib/servicebusserviceclient.d.ts", "lib/gcmservice.d.ts", "lib/wnsservice.d.ts", @@ -38,4 +39,4 @@ "azure-sb-tests.ts", "index.d.ts" ] -} \ No newline at end of file +} diff --git a/types/babel-core/babel-core-tests.ts b/types/babel-core/babel-core-tests.ts index b3839d151f..da87d891ba 100644 --- a/types/babel-core/babel-core-tests.ts +++ b/types/babel-core/babel-core-tests.ts @@ -1,13 +1,15 @@ import * as babel from "babel-core"; -// Example from https://github.com/babel/babel/tree/master/packages/babel-core +// Slightly modified example from https://github.com/babel/babel/tree/master/packages/babel-core const code = `class Example {}`; const result = babel.transform(code, { /* options */ }); result.code; // Generated code result.map; // Sourcemap result.ast; // AST +result.ignored; +result.metadata; -// Examples from http://babeljs.io/docs/usage/api/ +// Slightly modified examples from http://babeljs.io/docs/usage/api/ const options: babel.TransformOptions = { plugins: [ "es2015-arrow-functions", @@ -24,6 +26,8 @@ babel.transformFile("filename.js", options, (err, result) => { result.code; result.map; result.ast; + result.ignored; + result.metadata; }); babel.transformFileSync("filename.js", options).code; diff --git a/types/babel-core/index.d.ts b/types/babel-core/index.d.ts index 3a41d2d252..de09b2a91f 100644 --- a/types/babel-core/index.d.ts +++ b/types/babel-core/index.d.ts @@ -169,9 +169,30 @@ export interface TransformOptions { wrapPluginVisitorMethod?(pluginAlias: string, visitorType: 'enter' | 'exit', callback: (path: NodePath, state: any) => void): (path: NodePath, state: any) => void ; } +export interface BabelFileModulesMetadata { + imports: object[]; + exports: { + exported: object[], + specifiers: object[] + }; +} + +export interface BabelFileMetadata { + usedHelpers: string[]; + marked: Array<{ + type: string; + message: string; + loc: object; + }>; + modules: BabelFileModulesMetadata; +} + export interface BabelFileResult { ast?: Node; code?: string; + ignored?: boolean; map?: object; + metadata?: BabelFileMetadata; } + export as namespace babel; diff --git a/types/babel-types/index.d.ts b/types/babel-types/index.d.ts index b1de338923..8c892a3ca0 100644 --- a/types/babel-types/index.d.ts +++ b/types/babel-types/index.d.ts @@ -46,7 +46,7 @@ export interface Node { export interface ArrayExpression extends Node { type: "ArrayExpression"; - elements: Array; + elements: Array; } export interface AssignmentExpression extends Node { @@ -1306,7 +1306,7 @@ export type TSEntityName = Identifier | TSQualifiedName; export type TSTypeElement = TSCallSignatureDeclaration | TSConstructSignatureDeclaration | TSIndexSignature | TSMethodSignature | TSPropertySignature; -export function arrayExpression(elements?: Array): ArrayExpression; +export function arrayExpression(elements?: Array): ArrayExpression; export function assignmentExpression(operator?: string, left?: LVal, right?: Expression): AssignmentExpression; export function binaryExpression( operator?: "+" | "-" | "/" | "%" | "*" | "**" | "&" | "|" | ">>" | ">>>" | "<<" | "^" | "==" | "===" | "!=" | "!==" | "in" | "instanceof" | ">" | "<" | ">=" | "<=", diff --git a/types/backbone.marionette/backbone.marionette-tests.ts b/types/backbone.marionette/backbone.marionette-tests.ts index f57e9e2edc..c6400b2672 100644 --- a/types/backbone.marionette/backbone.marionette-tests.ts +++ b/types/backbone.marionette/backbone.marionette-tests.ts @@ -1,3 +1,4 @@ +import * as JQuery from 'jquery'; import * as Marionette from 'backbone.marionette'; import * as Backbone from 'backbone'; @@ -9,6 +10,10 @@ class DestroyWarn extends Marionette.Behavior { message: 'you are destroying!' }; + ui = { + destroy: '.foo' + }; + // behaviors have events that are bound to the views DOM events = { 'click @ui.destroy': 'warnBeforeDestroy' @@ -258,12 +263,18 @@ function RegionTests() { }); } +function BehaviorTest() { + const b = new DestroyWarn(); + const uiHandle: JQuery = b.getUI('destroy'); +} + function ViewTests() { const v = new MyView(new MyModel()); const isDestroyed: boolean = v.isDestroyed(); const isRendered: boolean = v.isRendered(); const isAttached: boolean = v.isAttached(); const vv: Marionette.View = v.delegateEntityEvents(); + const uiHandle: JQuery = v.getUI('destroy'); } function CollectionViewTests() { diff --git a/types/backbone.marionette/index.d.ts b/types/backbone.marionette/index.d.ts index cd8ccd3821..0b717c9bb1 100644 --- a/types/backbone.marionette/index.d.ts +++ b/types/backbone.marionette/index.d.ts @@ -1,6 +1,9 @@ // Type definitions for Marionette 3.3 // Project: https://github.com/marionettejs/ -// Definitions by: Zeeshan Hamid , Natan Vivo , Sven Tschui +// Definitions by: Zeeshan Hamid , +// Natan Vivo , +// Sven Tschui , +// Volker Nauruhn // Definitions: https://github.com/DefinitelyTyped/DefinitelyTyped // TypeScript Version: 2.3 @@ -1140,6 +1143,11 @@ export class View extends Backbone.View i * throughout the view with the ui attribute. */ ui: any; + + /** + * Get handle on UI element defined in ui hash + */ + getUI(ui: string): JQuery; } export interface CollectionViewOptions< @@ -1394,27 +1402,27 @@ export class CollectionView, childView: TView): void; /** * This callback function allows you to know when a child / child view * instance has been added to the collection view. It provides access to * the view instance for the child that was added. */ - onAddChild(childView: TView): void; + onAddChild(collectionView: CollectionView, childView: TView): void; /** * This callback function allows you to know when a childView instance is * about to be removed from the collectionView. It provides access to the * view instance for the child that was removed. */ - onBeforeRemoveChild(childView: TView): void; + onBeforeRemoveChild(collectionView: CollectionView, childView: TView): void; /** * This callback function allows you to know when a child / childView * instance has been deleted or removed from the collection. */ - onRemoveChild(childView: TView): void; + onRemoveChild(collectionView: CollectionView, childView: TView): void; /** * Automatically destroys this Collection's children and cleans up @@ -1558,6 +1566,11 @@ export class Behavior extends Object { */ ui: any; + /** + * Get handle on UI element defined in ui hash + */ + getUI(ui: string): JQuery; + /** * Any triggers you define on the Behavior will be triggered in response to the appropriate event on the view. */ diff --git a/types/backo2/backo2-tests.ts b/types/backo2/backo2-tests.ts new file mode 100644 index 0000000000..71b20378d2 --- /dev/null +++ b/types/backo2/backo2-tests.ts @@ -0,0 +1,13 @@ +import Backoff = require("backo2"); + +const backoff = new Backoff(); +const backoff2 = new Backoff({}); +const backoff3 = new Backoff({ + min: 0, + max: 0, + jitter: 0, + factor: 0 +}); + +const y: number = backoff3.duration(); +backoff3.reset(); diff --git a/types/backo2/index.d.ts b/types/backo2/index.d.ts new file mode 100644 index 0000000000..9dcaba9f2a --- /dev/null +++ b/types/backo2/index.d.ts @@ -0,0 +1,36 @@ +// Type definitions for backo2 1.0 +// Project: https://github.com/mokesmokes/backo +// Definitions by: Retsam +// Definitions: https://github.com/DefinitelyTyped/DefinitelyTyped +// TypeScript Version: 2.1 + +type BackoffOptions = Partial<{ + min: number, + max: number, + jitter: number, + factor: number, +}>; + +declare class Backoff { + constructor(opts?: BackoffOptions); + + duration(): number; + /** + * Reset the number of attempts. + */ + reset(): void; + /** + * Set the minimum duration + */ + setMin(min: number): void; + /** + * Set the maximum duration + */ + setMax(max: number): void; + /** + * Set the jitter + */ + setJitter(jitter: number): void; +} + +export = Backoff; diff --git a/types/backo2/tsconfig.json b/types/backo2/tsconfig.json new file mode 100644 index 0000000000..2abe4e6c11 --- /dev/null +++ b/types/backo2/tsconfig.json @@ -0,0 +1,23 @@ +{ + "compilerOptions": { + "module": "commonjs", + "lib": [ + "es6" + ], + "noImplicitAny": true, + "noImplicitThis": true, + "strictNullChecks": true, + "strictFunctionTypes": true, + "baseUrl": "../", + "typeRoots": [ + "../" + ], + "types": [], + "noEmit": true, + "forceConsistentCasingInFileNames": true + }, + "files": [ + "index.d.ts", + "backo2-tests.ts" + ] +} diff --git a/types/backo2/tslint.json b/types/backo2/tslint.json new file mode 100644 index 0000000000..3db14f85ea --- /dev/null +++ b/types/backo2/tslint.json @@ -0,0 +1 @@ +{ "extends": "dtslint/dt.json" } diff --git a/types/base64-arraybuffer/base64-arraybuffer-tests.ts b/types/base64-arraybuffer/base64-arraybuffer-tests.ts new file mode 100644 index 0000000000..3263f45afe --- /dev/null +++ b/types/base64-arraybuffer/base64-arraybuffer-tests.ts @@ -0,0 +1,4 @@ +import { encode, decode } from 'base64-arraybuffer'; + +encode(new Float32Array([1, 2, 3]).buffer); // $ExpectType string +decode('AACAPwAAAEAAAEBA'); // $ExpectType ArrayBuffer diff --git a/types/base64-arraybuffer/index.d.ts b/types/base64-arraybuffer/index.d.ts new file mode 100644 index 0000000000..8d8f5b8285 --- /dev/null +++ b/types/base64-arraybuffer/index.d.ts @@ -0,0 +1,7 @@ +// Type definitions for base64-arraybuffer 0.1 +// Project: https://github.com/niklasvh/base64-arraybuffer +// Definitions by: Ben Cook +// Definitions: https://github.com/DefinitelyTyped/DefinitelyTyped + +export function encode(arraybuffer: ArrayBuffer): string; +export function decode(base64: string): ArrayBuffer; diff --git a/types/base64-arraybuffer/tsconfig.json b/types/base64-arraybuffer/tsconfig.json new file mode 100644 index 0000000000..5d6ba6ac31 --- /dev/null +++ b/types/base64-arraybuffer/tsconfig.json @@ -0,0 +1,23 @@ +{ + "compilerOptions": { + "module": "commonjs", + "lib": [ + "es6" + ], + "noImplicitAny": true, + "noImplicitThis": true, + "strictNullChecks": true, + "strictFunctionTypes": true, + "baseUrl": "../", + "typeRoots": [ + "../" + ], + "types": [], + "noEmit": true, + "forceConsistentCasingInFileNames": true + }, + "files": [ + "index.d.ts", + "base64-arraybuffer-tests.ts" + ] +} diff --git a/types/base64-arraybuffer/tslint.json b/types/base64-arraybuffer/tslint.json new file mode 100644 index 0000000000..3db14f85ea --- /dev/null +++ b/types/base64-arraybuffer/tslint.json @@ -0,0 +1 @@ +{ "extends": "dtslint/dt.json" } diff --git a/types/base64-url/base64-url-tests.ts b/types/base64-url/base64-url-tests.ts new file mode 100644 index 0000000000..fd5c07cac0 --- /dev/null +++ b/types/base64-url/base64-url-tests.ts @@ -0,0 +1,9 @@ +import * as base64url from 'base64-url'; + +base64url.encode('Node.js is awesome.'); // $ExpectType string +base64url.decode('Tm9kZS5qcyBpcyBhd2Vzb21lLg'); // $ExpectType string +base64url.escape('This+is/goingto+escape=='); // $ExpectType string +base64url.unescape('This-is_goingto-escape'); // $ExpectType string + +base64url.encode('string to encode', 'ascii'); // $ExpectType string +base64url.decode('string to decode', 'ascii'); // $ExpectType string diff --git a/types/base64-url/index.d.ts b/types/base64-url/index.d.ts new file mode 100644 index 0000000000..1065cb9115 --- /dev/null +++ b/types/base64-url/index.d.ts @@ -0,0 +1,9 @@ +// Type definitions for base64-url 2.2 +// Project: https://github.com/joaquimserafim/base64-url +// Definitions by: Uri Shaked +// Definitions: https://github.com/DefinitelyTyped/DefinitelyTyped + +export function decode(value: string, encoding?: string): string; +export function encode(value: string, encoding?: string): string; +export function escape(value: string): string; +export function unescape(value: string): string; diff --git a/types/base64-url/tsconfig.json b/types/base64-url/tsconfig.json new file mode 100644 index 0000000000..26ccd93511 --- /dev/null +++ b/types/base64-url/tsconfig.json @@ -0,0 +1,23 @@ +{ + "compilerOptions": { + "module": "commonjs", + "lib": [ + "es6" + ], + "noImplicitAny": true, + "noImplicitThis": true, + "strictNullChecks": true, + "strictFunctionTypes": true, + "baseUrl": "../", + "typeRoots": [ + "../" + ], + "types": [], + "noEmit": true, + "forceConsistentCasingInFileNames": true + }, + "files": [ + "index.d.ts", + "base64-url-tests.ts" + ] +} diff --git a/types/base64-url/tslint.json b/types/base64-url/tslint.json new file mode 100644 index 0000000000..3db14f85ea --- /dev/null +++ b/types/base64-url/tslint.json @@ -0,0 +1 @@ +{ "extends": "dtslint/dt.json" } diff --git a/types/bcrypt/bcrypt-tests.ts b/types/bcrypt/bcrypt-tests.ts index 6824549a61..0d824f40a2 100644 --- a/types/bcrypt/bcrypt-tests.ts +++ b/types/bcrypt/bcrypt-tests.ts @@ -8,15 +8,24 @@ let error: Error; str = bcrypt.genSaltSync(); str = bcrypt.genSaltSync(num); +str = bcrypt.genSaltSync(num, str); bcrypt.genSalt(num, (err: Error, salt: string): void => { error = err; str = salt; }) .then(salt => str = salt) .catch(err => error = err); +bcrypt.genSalt(num, str, (err: Error, salt: string): void => { error = err; str = salt; }) + .then(salt => str = salt) + .catch(err => error = err); + bcrypt.genSalt(num) .then(salt => str = salt) .catch(err => error = err); +bcrypt.genSalt(num, str) + .then(salt => str = salt) + .catch(err => error = err); + bcrypt.genSalt((err: Error, salt: string): void => { error = err; str = salt; }) .then(salt => str = salt) .catch(err => error = err); diff --git a/types/bcrypt/index.d.ts b/types/bcrypt/index.d.ts index 98c7ba97fe..3cf57ca562 100644 --- a/types/bcrypt/index.d.ts +++ b/types/bcrypt/index.d.ts @@ -1,20 +1,32 @@ -// Type definitions for bcrypt 1.0 +// Type definitions for bcrypt 2.0 // Project: https://www.npmjs.org/package/bcrypt -// Definitions by: Peter Harris , Ayman Nedjmeddine +// Definitions by: Peter Harris +// Ayman Nedjmeddine +// David Stapleton // Definitions: https://github.com/DefinitelyTyped/DefinitelyTyped /** - * @param rounds The cost of processing the data. Default 10. + * @param rounds The cost of processing the data. Default 10. + * @param minor The minor version of bcrypt to use. Either 'a' or 'b'. Default 'b'. */ -export declare function genSaltSync(rounds?: number): string; +export declare function genSaltSync(rounds?: number, minor?: string): string; /** * @param rounds The cost of processing the data. Default 10. * @param callback A callback to be fire once the sald has been generated. Uses eio making it asynchronous. * @return A promise to be either resolved with the generated salt or rejected with an Error */ -export declare function genSalt(rounds: number, callback?: (err: Error, salt: string) => void): Promise; +export declare function genSalt(rounds?: number, callback?: (err: Error, salt: string) => void): Promise; + +/** + * @param rounds The cost of processing the data. Default 10. + * @param minor The minor version of bcrypt to use. Either 'a' or 'b'. Default 'b'. + * @param callback A callback to be fire once the sald has been generated. Uses eio making it asynchronous. + * @return A promise to be either resolved with the generated salt or rejected with an Error + */ +export declare function genSalt(rounds?: number, minor?: string, callback?: (err: Error, salt: string) => void): Promise; + /** * @param callback A callback to be fire once the sald has been generated. Uses eio making it asynchronous. * @return A promise to be either resolved with the generated salt or rejected with an Error diff --git a/types/behavior3/behavior3-tests.ts b/types/behavior3/behavior3-tests.ts new file mode 100644 index 0000000000..b612209a09 --- /dev/null +++ b/types/behavior3/behavior3-tests.ts @@ -0,0 +1,73 @@ +import '../behavior3'; + +// Test decode +const blackboard = new b3.Blackboard(); +const behaviorTree = new b3.BehaviorTree(); +behaviorTree.load({ + version: "0.3.0", + scope: "tree", + id: "6bc03cd0-38ef-4a3e-8e08-54c412491525", + title: "A behavior tree", + description: "", + root: "607d29f5-9dbc-4cc4-8ebb-e57c4908d87b", + properties: {}, + nodes: { + "607d29f5-9dbc-4cc4-8ebb-e57c4908d87b": { + id: "607d29f5-9dbc-4cc4-8ebb-e57c4908d87b", + name: "Sequence", + title: "Sequence", + description: "", + properties: {}, + display: { + x: -216, + y: -36 + }, + children: [ + "09f04185-205b-40c0-8494-ffd53ffd0820", + "df7366f8-999a-4971-872c-cef57607f99f" + ] + }, + "df7366f8-999a-4971-872c-cef57607f99f": { + id: "df7366f8-999a-4971-872c-cef57607f99f", + name: "Runner", + title: "Runner", + description: "", + properties: {}, + display: { + x: -12, + y: -36 + } + }, + "e498e1a5-5295-43c3-8716-20dd6d3407f2": { + id: "e498e1a5-5295-43c3-8716-20dd6d3407f2", + name: "Succeeder", + title: "Succeeder", + description: "", + properties: {}, + display: { + x: 192, + y: -96 + } + }, + "09f04185-205b-40c0-8494-ffd53ffd0820": { + id: "09f04185-205b-40c0-8494-ffd53ffd0820", + name: "Inverter", + title: "Inverter", + description: "", + properties: {}, + display: { + x: -36, + y: -108 + }, + child: "e498e1a5-5295-43c3-8716-20dd6d3407f2" + } + }, + display: { + camera_x: 640, + camera_y: 324, + camera_z: 1, + x: -324, + y: -36 + } + }); +behaviorTree.tick(null, blackboard); diff --git a/types/behavior3/index.d.ts b/types/behavior3/index.d.ts new file mode 100644 index 0000000000..7cb3ad9deb --- /dev/null +++ b/types/behavior3/index.d.ts @@ -0,0 +1,908 @@ +// Type definitions for behavior3 0.2 +// Project: https://github.com/behavior3/behavior3js +// Definitions by: carry.wu +// Definitions: https://github.com/DefinitelyTyped/DefinitelyTyped + +/** + * Behavior3JS + * =========== + * + * * * * + * + * **Behavior3JS** is a Behavior Tree library written in JavaScript. It + * provides structures and algorithms that assist you in the task of creating + * intelligent agents for your game or application. Check it out some features + * of Behavior3JS: + * + * - Based on the work of (Marzinotto et al., 2014), in which they propose a + * **formal**, **consistent** and **general** definition of Behavior Trees; + * - **Optimized to control multiple agents**: you can use a single behavior + * tree instance to handle hundreds of agents; + * - It was **designed to load and save trees in a JSON format**, in order to + * use, edit and test it in multiple environments, tools and languages; + * - A **cool visual editor** which you can access online; + * - Several **composite, decorator and action nodes** available within the + * library. You still can define your own nodes, including composites and + * decorators; + * - **Completely free**, the core module and the visual editor are all + * published under the MIT License, which means that you can use them for + * your open source and commercial projects; + * - **Lightweight**! + * + * Visit http://behavior3.com to know more! + * + * + * ## Core Classes and Functions + * + * This library include the following core structures... + * + * + * **Public:** + * + * - **BehaviorTree**: the structure that represents a Behavior Tree; + * - **Blackboard**: represents a "memory" in an agent and is required to to + * run a `BehaviorTree`; + * - **Composite**: base class for all composite nodes; + * - **Decorator**: base class for all decorator nodes; + * - **Action**: base class for all action nodes; + * - **Condition**: base class for all condition nodes; + * + * + * **Internal:** + * + * - **Tick**: used as container and tracking object through the tree during + * the tick signal; + * - **BaseNode**: the base class that provide all common node features; + * + * *Some classes are used internally on Behavior3JS, but you may need to access + * its functionalities eventually, specially the `Tick` object.* + * + * + * **Nodes:** + * + * - **Composite Nodes**: Sequence, Priority, MemSequence, MemPriority. + * - **Decorators**: Inverter, Limiter, MaxTime, Repeater, + * RepeaterUntilFailure, RepeaterUntilSuccess. + * - **Actions**: Succeeder, Failer, Error, Runner, Wait. + * + * ## The list of all constants in B3. + * + * NAME | VALUE + * ------------------- | ---------------------- + * VERSION | depends on the version + * | + * **Node State** | + * SUCCESS | 1 + * FAILURE | 2 + * RUNNING | 3 + * ERROR | 4 + * | + * **Node categories** | + * COMPOSITE | 'composite' + * DECORATOR | 'decorator' + * ACTION | 'action' + * CONDITION | 'condition' + * + */ +declare namespace b3 { + /** + * This function is used to create unique IDs for trees and nodes. + * + * (consult http://www.ietf.org/rfc/rfc4122.txt). + * + */ + function createUUID(): string; + + /** + * The BaseNode class is used as super class to all nodes in BehaviorJS. It + * comprises all common variables and methods that a node must have to + * execute. + * + * **IMPORTANT:** Do not inherit from this class, use `Composite`, + * `Decorator`, `Action` or `Condition`, instead. + * + * The attributes are specially designed to serialization of the node in a + * JSON format. In special, the `parameters` attribute can be set into the + * visual editor (thus, in the JSON file), and it will be used as parameter + * on the node initialization at `BehaviorTree.load`. + * + * BaseNode also provide 5 callback methods, which the node implementations + * can override. They are `enter`, `open`, `tick`, `close` and `exit`. See + * their documentation to know more. These callbacks are called inside the + * `_execute` method, which is called in the tree traversal. + * + */ + class BaseNode { + /** + * Initialization method. + */ + constructor({category, name, title, description, properties}?: {category?: string, name?: string, title?: string, description?: string, properties?: any}); + + /** + * This is the main method to propagate the tick signal to this node. This + * method calls all callbacks: `enter`, `open`, `tick`, `close`, and + * `exit`. It only opens a node if it is not already open. In the same + * way, this method only close a node if the node returned a status + * different of `RUNNING`. + * + */ + _execute(tick: Tick): number; + + /** + * Wrapper for enter method. + */ + _enter(tick: Tick): void; + + /** + * Wrapper for open method. + */ + _open(tick: Tick): void; + + /** + * Wrapper for tick method. + */ + _tick(tick: Tick): number; + + /** + * Wrapper for close method. + */ + _close(tick: Tick): void; + + /** + * Wrapper for exit method. + */ + _exit(tick: Tick): void; + + /** + * Enter method, override this to use. It is called every time a node is + * asked to execute, before the tick itself. + */ + enter(tick: Tick): void; + + /** + * Open method, override this to use. It is called only before the tick + * callback and only if the not isn't closed. + * + * Note: a node will be closed if it returned `RUNNING` in the tick. + * + */ + open(tick: Tick): void; + + /** + * Tick method, override this to use. This method must contain the real + * execution of node (perform a task, call children, etc.). It is called + * every time a node is asked to execute. + * + */ + tick(tick: Tick): void; + + /** + * Close method, override this to use. This method is called after the tick + * callback, and only if the tick return a state different from + * `RUNNING`. + * + */ + close(tick: Tick): void; + + /** + * Exit method, override this to use. Called every time in the end of the + * execution. + * + */ + exit(tick: Tick): void; + } + + /** + * Action is the base class for all action nodes. Thus, if you want to create + * new custom action nodes, you need to inherit from this class. For example, + * take a look at the Runner action: + * + * class Runner extends b3.Action { + * constructor(){ + * super({name: 'Runner'}); + * } + * tick(tick) { + * return b3.RUNNING; + * } + * }; + * + */ + class Action extends BaseNode { + /** + * Creates an instance of Action. + */ + constructor({name, title, properties}?: {name?: string, title?: string, properties?: any}); + } + + /** + * The BehaviorTree class, as the name implies, represents the Behavior Tree + * structure. + * + * There are two ways to construct a Behavior Tree: by manually setting the + * root node, or by loading it from a data structure (which can be loaded + * from a JSON). Both methods are shown in the examples below and better + * explained in the user guide. + * + * The tick method must be called periodically, in order to send the tick + * signal to all nodes in the tree, starting from the root. The method + * `BehaviorTree.tick` receives a target object and a blackboard as + * parameters. The target object can be anything: a game agent, a system, a + * DOM object, etc. This target is not used by any piece of Behavior3JS, + * i.e., the target object will only be used by custom nodes. + * + * The blackboard is obligatory and must be an instance of `Blackboard`. This + * requirement is necessary due to the fact that neither `BehaviorTree` or + * any node will store the execution variables in its own object (e.g., the + * BT does not store the target, information about opened nodes or number of + * times the tree was called). But because of this, you only need a single + * tree instance to control multiple (maybe hundreds) objects. + * + * Manual construction of a Behavior Tree + * -------------------------------------- + * + * var tree = new b3.BehaviorTree(); + * + * tree.root = new b3.Sequence({children:[ + * new b3.Priority({children:[ + * new MyCustomNode(), + * new MyCustomNode() + * ]}), + * ... + * ]}); + * + * + * Loading a Behavior Tree from data structure + * ------------------------------------------- + * + * var tree = new b3.BehaviorTree(); + * + * tree.load({ + * 'title' : 'Behavior Tree title' + * 'description' : 'My description' + * 'root' : 'node-id-1' + * 'nodes' : { + * 'node-id-1' : { + * 'name' : 'Priority', // this is the node type + * 'title' : 'Root Node', + * 'description' : 'Description', + * 'children' : ['node-id-2', 'node-id-3'], + * }, + * ... + * } + * }) + * + */ + class BehaviorTree { + /** + * Initialization method. + */ + constructor(); + + /** + * This method loads a Behavior Tree from a data structure, populating this + * object with the provided data. Notice that, the data structure must + * follow the format specified by Behavior3JS. Consult the guide to know + * more about this format. + * + * You probably want to use custom nodes in your BTs, thus, you need to + * provide the `names` object, in which this method can find the nodes by + * `names[NODE_NAME]`. This variable can be a namespace or a dictionary, + * as long as this method can find the node by its name, for example: + * + * //json + * ... + * 'node1': { + * 'name': MyCustomNode, + * 'title': ... + * } + * ... + * + * //code + * var bt = new b3.BehaviorTree(); + * bt.load(data, {'MyCustomNode':MyCustomNode}) + * + * + */ + load(data: any, names?: any): void; + + /** + * This method dump the current BT into a data structure. + * + * Note: This method does not record the current node parameters. Thus, + * it may not be compatible with load for now. + * + */ + dump(): any; + + /** + * Propagates the tick signal through the tree, starting from the root. + * + * This method receives a target object of any type (Object, Array, + * DOMElement, whatever) and a `Blackboard` instance. The target object has + * no use at all for all Behavior3JS components, but surely is important + * for custom nodes. The blackboard instance is used by the tree and nodes + * to store execution variables (e.g., last node running) and is obligatory + * to be a `Blackboard` instance (or an object with the same interface). + * + * Internally, this method creates a Tick object, which will store the + * target and the blackboard objects. + * + * Note: BehaviorTree stores a list of open nodes from last tick, if these + * nodes weren't called after the current tick, this method will close them + * automatically. + * + */ + tick(target: any, blackboard: Blackboard): string; + } + + /** + * The Blackboard is the memory structure required by `BehaviorTree` and its + * nodes. It only have 2 public methods: `set` and `get`. These methods works + * in 3 different contexts: global, per tree, and per node per tree. + * + * Suppose you have two different trees controlling a single object with a + * single blackboard, then: + * + * - In the global context, all nodes will access the stored information. + * - In per tree context, only nodes sharing the same tree share the stored + * information. + * - In per node per tree context, the information stored in the blackboard + * can only be accessed by the same node that wrote the data. + * + * The context is selected indirectly by the parameters provided to these + * methods, for example: + * + * // getting/setting variable in global context + * blackboard.set('testKey', 'value'); + * var value = blackboard.get('testKey'); + * + * // getting/setting variable in per tree context + * blackboard.set('testKey', 'value', tree.id); + * var value = blackboard.get('testKey', tree.id); + * + * // getting/setting variable in per node per tree context + * blackboard.set('testKey', 'value', tree.id, node.id); + * var value = blackboard.get('testKey', tree.id, node.id); + * + * Note: Internally, the blackboard store these memories in different + * objects, being the global on `_baseMemory`, the per tree on `_treeMemory` + * and the per node per tree dynamically create inside the per tree memory + * (it is accessed via `_treeMemory[id].nodeMemory`). Avoid to use these + * variables manually, use `get` and `set` instead. + * + */ + class Blackboard { + /** + * Initialization method. + */ + constructor(); + + /** + * Internal method to retrieve the tree context memory. If the memory does + * not exist, this method creates it. + * + */ + _getTreeMemory(treeScope: string): any; + + /** + * Internal method to retrieve the node context memory, given the tree + * memory. If the memory does not exist, this method creates is. + * + */ + _getNodeMemory(treeMemory: string, nodeScope: string): any; + + /** + * Internal method to retrieve the context memory. If treeScope and + * nodeScope are provided, this method returns the per node per tree + * memory. If only the treeScope is provided, it returns the per tree + * memory. If no parameter is provided, it returns the global memory. + * Notice that, if only nodeScope is provided, this method will still + * return the global memory. + * + */ + _getMemory(treeScope: string, nodeScope: string): any; + + /** + * Stores a value in the blackboard. If treeScope and nodeScope are + * provided, this method will save the value into the per node per tree + * memory. If only the treeScope is provided, it will save the value into + * the per tree memory. If no parameter is provided, this method will save + * the value into the global memory. Notice that, if only nodeScope is + * provided (but treeScope not), this method will still save the value into + * the global memory. + * + */ + set(key: string, value: string, treeScope: string, nodeScope: string): void; + + /** + * Retrieves a value in the blackboard. If treeScope and nodeScope are + * provided, this method will retrieve the value from the per node per tree + * memory. If only the treeScope is provided, it will retrieve the value + * from the per tree memory. If no parameter is provided, this method will + * retrieve from the global memory. If only nodeScope is provided (but + * treeScope not), this method will still try to retrieve from the global + * memory. + * + */ + get(key: string, treeScope: string, nodeScope: string): any; + } + + /** + * Composite is the base class for all composite nodes. Thus, if you want to + * create new custom composite nodes, you need to inherit from this class. + * + * When creating composite nodes, you will need to propagate the tick signal + * to the children nodes manually. To do that, override the `tick` method and + * call the `_execute` method on all nodes. For instance, take a look at how + * the Sequence node inherit this class and how it call its children: + * + * // Inherit from Composite, using the util function Class. + * class Sequence extends Composite { + * + * constructor(){ + * // Remember to set the name of the node. + * super({name: 'Sequence'}); + * } + * + * // Override the tick function + * tick(tick) { + * + * // Iterates over the children + * for (var i=0; i request.query).wantsSharePermission) { + scopes.push('publish_actions'); + } + return scopes; + } + }); + + const providers: bell.BellOptions[] = [{ + provider: 'discord', + password: 'cookie_encryption_password_secure', + isSecure: false, + clientId: '', + clientSecret: '', + location: () => '', + }, + { + provider: 'facebook', + password: 'cookie_encryption_password_secure', + isSecure: false, + clientId: '', + clientSecret: '', + location: server.info.uri + }, + { + provider: 'google', + password: 'cookie_encryption_password_secure', + isSecure: false, + clientId: '', + clientSecret: '', + location: server.info.uri + }, + { + provider: 'linkedin', + password: 'cookie_encryption_password_secure', + isSecure: false, + clientId: '', + clientSecret: '', + providerParams: { + redirect_uri: server.info.uri + '/bell/door' + } + }, + { + provider: 'meetup', + password: 'cookie_encryption_password_secure', + isSecure: false, + clientId: '', + clientSecret: '', + scope: ['basic', 'ageless', 'group_edit', 'reporting'], + }, + { + provider: 'nest', + password: 'cookie_encryption_password_secure', + isSecure: false, + clientId: '', + clientSecret: '' + }, + { + provider: 'office365', + clientId: '', + clientSecret: '', + password: 'cookie_encryption_password_secure', + providerParams: { + response_type: 'code' + }, + scope: ['openid', 'offline_access', 'profile'] + }, + { + provider: 'okta', + config: { uri: 'https://your-organization.okta.com' }, + password: 'cookie_encryption_password_secure', + isSecure: false, + location: 'http://127.0.0.1:8000', + clientId: '', + clientSecret: '' + }, + { + provider: 'slack', + password: 'cookie_encryption_password_secure', + isSecure: false, + clientId: '', + clientSecret: '' + }, + { + provider: 'twitch', + password: 'cookie_encryption_password_secure', + isSecure: false, + clientId: '', + clientSecret: '', + scope: ['user_read', 'channel_read'] + }]; +} diff --git a/types/bell/index.d.ts b/types/bell/index.d.ts new file mode 100644 index 0000000000..14cdc65cb9 --- /dev/null +++ b/types/bell/index.d.ts @@ -0,0 +1,269 @@ +// Type definitions for bell 9.1 +// Project: https://github.com/hapijs/bell +// Definitions by: Simon Schick +// Definitions: https://github.com/DefinitelyTyped/DefinitelyTyped +// TypeScript Version: 2.7 + +import { Server, Request, Plugin, AuthCredentials } from 'hapi'; + +declare module 'hapi' { + interface ServerAuth { + strategy(name: string, scheme: 'bell', options: BellOptions): void; + strategy( + name: string, + scheme: 'bell', + mode: boolean | 'required' | 'optional' | 'try', + options: BellOptions, + ): void; + } +} + +export interface StringLikeMap { + [key: string]: string | number; +} +export type Provider = + 'arcgisonline' | + 'auth0' | + 'azuread' | + 'bitbucket' | + 'digitalocean' | + 'discord' | + 'dropbox' | + 'dropboxV2' | + 'facebook' | + 'fitbit' | + 'foursquare' | + 'github' | + 'gitlab' | + 'google' | + 'googleplus' | + 'instagram' | + 'linkedin' | + 'live' | + 'medium' | + 'meetup' | + 'mixer' | + 'nest' | + 'office365' | + 'okta' | + 'phabricator' | + 'pingfed' | + 'pinterest' | + 'reddit' | + 'salesforce' | + 'slack' | + 'spotify' | + 'stripe' | + 'trakt' | + 'tumblr' | + 'twitch' | + 'twitter' | + 'vk' | + 'wordpress' | + 'yahoo'; + +export type RequestPassThrough = ( + request: Request, + next: (err: Error | null, credentials: AuthCredentials) => void, +) => void; + +export interface OptionalOptions { + /** + * the name of the cookie used to manage the temporary state. + * Defaults to 'bell-provider' where 'provider' is the provider name (or 'custom' for custom providers). + * For example, the Twitter cookie name defaults to 'bell-twitter'. + */ + cookie?: string; + /** + * sets the cookie secure flag. + * Defaults to true. + */ + isSecure?: boolean; + /** + * sets the cookie HTTP only flag. + * Defaults to true. + */ + isHttpOnly?: boolean; + /** + * cookie time-to-live in milliseconds. + * Defaults to null (session time-life - cookies are deleted when the browser is closed). + */ + ttl?: number; + /** + * the domain scope. + * Defaults to null (no domain). + */ + domain?: string; + /** + * provider-specific query parameters for the authentication endpoint. + * It may be passed either as an object to merge into the query string, + * or a function which takes the client's request and returns an object. + * Each provider supports its own set of parameters which customize the user's login experience. + * For example: + * * Facebook supports `display` ('page', 'popup', or 'touch'), `auth_type`, `auth_nonce`. + * * Google supports `access_type`, `approval_prompt`, `prompt`, `login_hint`, `user_id`, `hd`. + * * Twitter supports `force_login`, `screen_name`. + * * Linkedin supports `fields`. + */ + providerParams?: StringLikeMap | ((request: Request) => StringLikeMap); + /** + * allows passing query parameters from a bell protected endpoint to the auth request. + * It will merge the query params you pass along with the providerParams and any other predefined ones. + * Be aware that this will override predefined query parameters! + * Default to false. + */ + allowRuntimeProviderParams?: StringLikeMap | boolean; + /** + * Each built-in vendor comes with the required scope for basic profile information. + * Use scope to specify a different scope as required by your application. + * It may be passed either as an object to merge into the query string, + * or a function which takes the client's request and returns an object. + * Consult the provider for their specific supported scopes. + */ + scope?: string[] | ((request: Request) => string[]); + /** + * skips obtaining a user profile from the provider. + * Useful if you need specific scopes, + * but not the user profile. + * Defaults to false. + */ + skipProfile?: boolean; + /** + * a configuration object used to customize the provider settings. + * The built-in 'twitter' provider accepts the `extendedProfile` & `getMethod` options. + * option which allows disabling the extra profile request when the provider + * returns the user information in the callback (defaults to true). + * The built-in 'github' and 'phabricator' providers accept the uri + * option which allows pointing to a private enterprise installation (e.g. 'https://vpn.example.com'). + * See Providers documentation for more information. + */ + config?: { extendedProfile?: boolean; getMethod?: string } | { uri?: string }; + /** + * an object of key-value pairs that specify additional + * URL query parameters to send with the profile request to the provider. + * The built-in facebook provider, + * for example, could have fields specified to determine the fields returned from the user's graph, + * which would then be available to you in the auth.credentials.profile.raw object. + */ + profileParams?: StringLikeMap; + /** + * allows passing additional OAuth state from initial request. + * This must be a function returning a string, + * which will be appended to the bell internal state parameter for OAuth code flow. + */ + runtimeStateCallback?(req: Request): string; + + // THESE ARE IN THE *REQUIRED* section but are actually not... + /** + * A boolean indicating whether or not you want the redirect_uri to be forced to https. + * Useful if your hapi application runs as http, but is accessed through https. + */ + forceHttps?: boolean; + /** + * Set the base redirect_uri manually if it cannot be inferred properly from server settings. + * Useful to override port, protocol, and host if proxied or forwarded. + */ + location?: string | ((req: Request) => string); +} + +export interface RequiredProviderOptions { + /** + * the cookie encryption password. + * Used to encrypt the temporary state cookie used by the module in + * between the authorization protocol steps. + */ + password: string; + /** + * the OAuth client identifier (consumer key). + */ + clientId: string; + /** + * the OAuth client secret (consumer secret) + */ + clientSecret: string; +} + +export interface KnownProviderOptions extends RequiredProviderOptions, OptionalOptions { + provider: Provider; +} + +/** + * @param uri the requested resource URI (bell will add the token or authentication header as needed). + * @param params any URI query parameters (cannot include them in the URI due to signature requirements). + */ +export type AuthedRequest = (uri: string, params: { [key: string]: string } | null) => Promise; + +export interface CustomProtocol { + /** + * the authorization protocol used. + */ + protocol: 'oauth' | 'oauth2'; + /** + * the OAuth signature method (OAuth 1.0a only). Must be one of: + * * 'HMAC-SHA1' - default + * * 'RSA-SHA1' - in that case, the clientSecret is your RSA private key + */ + signatureMethod?: 'HMAC-SHA1' | 'RSA-SHA1'; + /** + * the temporary credentials (request token) endpoint (OAuth 1.0a only). + */ + temporary?: string; + /** + * boolean that determines if OAuth client id and client secret will be sent + * as parameters as opposed to an Authorization header (OAuth 2.0 only). + * Defaults to false. + */ + useParamsAuth?: boolean; + /** + * the authorization endpoint URI. + */ + auth: string; + /** + * the access token endpoint URI. + */ + token: string; + /** + * the OAuth version. + */ + version?: string; + /** + * an array of scope strings (OAuth 2.0 only). + */ + scope?: string[] | ((query: StringLikeMap) => string[]); + /** + * the scope separator character (OAuth 2.0 only). Only required when a provider has a broken OAuth 2.0 implementation. Defaults to space (Facebook and GitHub default to comma). + */ + scopeSeparator?: string; + /** + * a headers object with additional headers required by the provider + * (e.g. GitHub required the 'User-Agent' header which is set by default). + */ + headers?: { + [key: string]: string; + }; + /** + * a function used to obtain user profile information and normalize it. + * @param credentials the credentials object. + * Change the object directly within the function (profile information is typically stored under credentials.profile). + * @param params the parsed information received from the provider (e.g. token, secret, and other custom fields). + * @param get an OAuth helper function to make authenticated requests using the credentials received. + */ + profile(credentials: any, params: { [key: string]: string }, get: AuthedRequest): Promise; +} + +export interface CustomProviderOptions extends RequiredProviderOptions, OptionalOptions { + provider: CustomProtocol; +} + +export type BellOptions = CustomProviderOptions | KnownProviderOptions; + +export const plugin: Plugin; +/** + * Enables simulation mode. + */ +export function simulate(credentialsFunc: RequestPassThrough): void; +/** + * [See docs](https://github.com/hapijs/bell/blob/master/API.md#simulated-authentication) + * Disables simulation mode + */ +export function simulate(state: false): void; diff --git a/types/bell/tsconfig.json b/types/bell/tsconfig.json new file mode 100644 index 0000000000..4db30822b8 --- /dev/null +++ b/types/bell/tsconfig.json @@ -0,0 +1,23 @@ +{ + "compilerOptions": { + "module": "commonjs", + "lib": [ + "es6" + ], + "strictFunctionTypes": true, + "strictNullChecks": true, + "noImplicitAny": true, + "noImplicitThis": true, + "baseUrl": "../", + "typeRoots": [ + "../" + ], + "types": [], + "noEmit": true, + "forceConsistentCasingInFileNames": true + }, + "files": [ + "index.d.ts", + "bell-tests.ts" + ] +} diff --git a/types/bell/tslint.json b/types/bell/tslint.json new file mode 100644 index 0000000000..843d627f89 --- /dev/null +++ b/types/bell/tslint.json @@ -0,0 +1,6 @@ +{ + "extends": "dtslint/dt.json", + "rules": { + "unified-signatures": false // Disabling as it prevents me from using overloaded doctags + } +} diff --git a/types/bidirectional-map/bidirectional-map-tests.ts b/types/bidirectional-map/bidirectional-map-tests.ts new file mode 100644 index 0000000000..274680a1a7 --- /dev/null +++ b/types/bidirectional-map/bidirectional-map-tests.ts @@ -0,0 +1,19 @@ +import BiMap from "bidirectional-map"; + +const bidirectionalMap = new BiMap({ + one: 1 +}); +bidirectionalMap.size; // $ExpectType number +bidirectionalMap.set("two", 2); +bidirectionalMap.set("three", 3); +bidirectionalMap.get("one"); // $ExpectType number +bidirectionalMap.get(true); // $ExpectError +bidirectionalMap.getKey(1); // $ExpectType string +bidirectionalMap.getKey("one"); // $ExpectError +bidirectionalMap.delete("two"); +bidirectionalMap.deleteValue(3); +bidirectionalMap.entries(); // $ExpectType IterableIterator<[string, number]> +bidirectionalMap.has("one"); // $ExpectType boolean +bidirectionalMap.hasValue(2); // $ExpectType boolean +bidirectionalMap.keys(); // $ExpectType IterableIterator +bidirectionalMap.values(); // $ExpectType IterableIterator diff --git a/types/bidirectional-map/index.d.ts b/types/bidirectional-map/index.d.ts new file mode 100644 index 0000000000..67662d3441 --- /dev/null +++ b/types/bidirectional-map/index.d.ts @@ -0,0 +1,22 @@ +// Type definitions for bidirectional-map 1.0 +// Project: https://github.com/educastellano/bidirectional-map +// Definitions by: Helen Anderson +// Definitions: https://github.com/DefinitelyTyped/DefinitelyTyped +// TypeScript Version: 2.8 + +export default class BiMap { + constructor(object?: { [i: string]: TValue }); + size: number; + + set(key: string, value: TValue): void; + get(key: string): TValue; + getKey(value: TValue): string; + clear(): void; + delete(key: string): void; + deleteValue(value: TValue): void; + entries(): IterableIterator<[string, TValue]>; + has(key: string): boolean; + hasValue(value: TValue): boolean; + keys(): IterableIterator; + values(): IterableIterator; +} diff --git a/types/bidirectional-map/tsconfig.json b/types/bidirectional-map/tsconfig.json new file mode 100644 index 0000000000..0c3b3a1cac --- /dev/null +++ b/types/bidirectional-map/tsconfig.json @@ -0,0 +1,23 @@ +{ + "compilerOptions": { + "module": "commonjs", + "lib": [ + "es6" + ], + "noImplicitAny": true, + "noImplicitThis": true, + "strictNullChecks": true, + "strictFunctionTypes": true, + "baseUrl": "../", + "typeRoots": [ + "../" + ], + "types": [], + "noEmit": true, + "forceConsistentCasingInFileNames": true + }, + "files": [ + "index.d.ts", + "bidirectional-map-tests.ts" + ] +} diff --git a/types/bidirectional-map/tslint.json b/types/bidirectional-map/tslint.json new file mode 100644 index 0000000000..3db14f85ea --- /dev/null +++ b/types/bidirectional-map/tslint.json @@ -0,0 +1 @@ +{ "extends": "dtslint/dt.json" } diff --git a/types/big.js/index.d.ts b/types/big.js/index.d.ts index 405622f7ee..8b61c73d37 100644 --- a/types/big.js/index.d.ts +++ b/types/big.js/index.d.ts @@ -102,6 +102,12 @@ export interface BigConstructor { export interface Big { /** Returns a Big number whose value is the absolute value, i.e. the magnitude, of this Big number. */ abs(): Big; + /** + * Returns a Big number whose value is the value of this Big number plus n - alias for .plus(). + * + * @throws `NaN` if n is invalid. + */ + add(n: BigSource): Big; /** * Compare the values. * @@ -162,6 +168,12 @@ export interface Big { * @throws `NaN` if n is negative or otherwise invalid. */ mod(n: BigSource): Big; + /** + * Returns a Big number whose value is the value of this Big number times n - alias for .times(). + * + * @throws `NaN` if n is invalid. + */ + mul(n: BigSource): Big; /** * Returns a Big number whose value is the value of this Big number plus n. * @@ -196,6 +208,12 @@ export interface Big { * @throws `NaN` if this Big number is negative. */ sqrt(): Big; + /** + * Returns a Big number whose value is the value of this Big number minus n - alias for .minus(). + * + * @throws `NaN` if n is invalid. + */ + sub(n: BigSource): Big; /** * Returns a Big number whose value is the value of this Big number times n. * diff --git a/types/big.js/test/big.js-global-tests.ts b/types/big.js/test/big.js-global-tests.ts index 578391de7b..a57e748fbf 100644 --- a/types/big.js/test/big.js-global-tests.ts +++ b/types/big.js/test/big.js-global-tests.ts @@ -86,6 +86,7 @@ function minusTests() { 0.3 - 0.1; // 0.19999999999999998 const x = new Big(0.3); x.minus(0.1); // '0.2' + x.sub(0.1); // '0.2' } function modTests() { @@ -99,6 +100,7 @@ function plusTests() { const x = new Big(0.1); const y = x.plus(0.2); // '0.3' Big(0.7).plus(x).plus(y); // '1' + Big(0.7).add(x).add(y); // '1' } function powTests() { @@ -138,6 +140,7 @@ function timesTests() { const x = new Big(0.6); const y = x.times(3); // '1.8' Big('7e+500').times(y); // '1.26e+501' + Big('7e+500').mul(y); // '1.26e+501' } function toExponentialTests() { diff --git a/types/big.js/test/big.js-module-tests.ts b/types/big.js/test/big.js-module-tests.ts index 056d41727b..62e5ba491e 100644 --- a/types/big.js/test/big.js-module-tests.ts +++ b/types/big.js/test/big.js-module-tests.ts @@ -88,6 +88,7 @@ function minusTests() { 0.3 - 0.1; // 0.19999999999999998 const x = new Big(0.3); x.minus(0.1); // '0.2' + x.sub(0.1); // '0.2' } function modTests() { @@ -101,6 +102,7 @@ function plusTests() { const x = new Big(0.1); const y = x.plus(0.2); // '0.3' Big(0.7).plus(x).plus(y); // '1' + Big(0.7).add(x).add(y); // '1' } function powTests() { @@ -140,6 +142,7 @@ function timesTests() { const x = new Big(0.6); const y = x.times(3); // '1.8' Big('7e+500').times(y); // '1.26e+501' + Big('7e+500').mul(y); // '1.26e+501' } function toExponentialTests() { diff --git a/types/bigi/bigi-tests.ts b/types/bigi/bigi-tests.ts index ef9d7421d3..0e4822aeb6 100644 --- a/types/bigi/bigi-tests.ts +++ b/types/bigi/bigi-tests.ts @@ -7,3 +7,10 @@ const b3 = b1.multiply(b2); console.log(b3.toHex()); // => ae499bfe762edfb416d0ce71447af67ff33d1760cbebd70874be1d7a5564b0439a59808cb1856a91974f7023f72132 + +const b4 = BigInteger.valueOf(42); +const b5 = BigInteger.valueOf(10); +const b6 = b4.multiply(b5); + +console.log(b6); +// => BigInteger { '0': 420, '1': 0, t: 1, s: 0 } diff --git a/types/bigi/index.d.ts b/types/bigi/index.d.ts index c991b13fac..7b44ff75e4 100644 --- a/types/bigi/index.d.ts +++ b/types/bigi/index.d.ts @@ -87,7 +87,7 @@ declare class bigi { static fromDERInteger(byteArray?: any): number; static fromHex(hex: string): bigi; static isBigInteger(obj: any, check_ver: any): obj is bigi; - static valueOf(i: any): number; + static valueOf(i: any): bigi; } declare namespace bigi { interface Constants { diff --git a/types/bin-pack/bin-pack-tests.ts b/types/bin-pack/bin-pack-tests.ts new file mode 100644 index 0000000000..f913d53520 --- /dev/null +++ b/types/bin-pack/bin-pack-tests.ts @@ -0,0 +1,8 @@ +import * as pack from "bin-pack"; + +// $ExpectType PackResult<{ width: number; height: number; }> +const packResult = pack([ + { width: 50, height: 50 }, + { width: 25, height: 25 }, + { width: 25, height: 20 } +]); diff --git a/types/bin-pack/index.d.ts b/types/bin-pack/index.d.ts new file mode 100644 index 0000000000..0d3df98899 --- /dev/null +++ b/types/bin-pack/index.d.ts @@ -0,0 +1,60 @@ +// Type definitions for bin-pack 1.0 +// Project: https://github.com/bryanburgers/bin-pack +// Definitions by: Oren Trutner +// Definitions: https://github.com/DefinitelyTyped/DefinitelyTyped + +/** + * Packs objects that have a width and a height into as small of a square as + * possible, using a binary tree bin packing algorithm. After packing, each + * object is given an (x, y) coordinate of where it would be optimally packed. + * @param bins List of rectangular bins to pack + * @param options Packing options. Use inPlace: true to modify the bins + * argument in-place. + */ +declare function pack(bins: T[], options?: pack.Options): pack.PackResult; + +declare namespace pack { + /** Packing options. */ + interface Options { + /** Use inPlace=true to add x,y fields to the bins argument. */ + inPlace?: boolean; + } + + /** Specifies the dimensions of a bin to pack. */ + interface Bin { + width: number; + height: number; + } + + /** Describes the location of a packed bin. */ + interface PackedItem { + /** X coordinate of the packed bin. */ + x: number; + + /** Y coordinate of the packed bin. */ + y: number; + + /** Width of the bin. */ + width: number; + + /** Height of the bin. */ + height: number; + + /** The original bin object. */ + item: T; + } + + /** The return value from the pack function. */ + interface PackResult { + /** Width of the bounding box around all bins. */ + width: number; + + /** Height of the bounding box around all bins. */ + height: number; + + /** List of packed bins. */ + items: Array>; + } +} + +export = pack; diff --git a/types/bin-pack/tsconfig.json b/types/bin-pack/tsconfig.json new file mode 100644 index 0000000000..6c6a41a37a --- /dev/null +++ b/types/bin-pack/tsconfig.json @@ -0,0 +1,23 @@ +{ + "compilerOptions": { + "module": "commonjs", + "lib": [ + "es6" + ], + "noImplicitAny": true, + "noImplicitThis": true, + "strictNullChecks": true, + "strictFunctionTypes": true, + "baseUrl": "../", + "typeRoots": [ + "../" + ], + "types": [], + "noEmit": true, + "forceConsistentCasingInFileNames": true + }, + "files": [ + "index.d.ts", + "bin-pack-tests.ts" + ] +} diff --git a/types/bin-pack/tslint.json b/types/bin-pack/tslint.json new file mode 100644 index 0000000000..3db14f85ea --- /dev/null +++ b/types/bin-pack/tslint.json @@ -0,0 +1 @@ +{ "extends": "dtslint/dt.json" } diff --git a/types/bitcoinjs-lib/bitcoinjs-lib-tests.ts b/types/bitcoinjs-lib/bitcoinjs-lib-tests.ts index 669c00d77a..9576ba7289 100644 --- a/types/bitcoinjs-lib/bitcoinjs-lib-tests.ts +++ b/types/bitcoinjs-lib/bitcoinjs-lib-tests.ts @@ -41,3 +41,22 @@ bitcoin.address.toBase58Check(rsBase58Check.hash, rsBase58Check.version); bitcoin.address.toBech32(rsBech32.data, rsBech32.version, rsBech32.prefix); bitcoin.address.toOutputScript(address); bitcoin.address.toOutputScript(address, network); + +const redeemScript = bitcoin.script.multisig.output.encode( + 2, + [ + new Buffer('12345678901234567890123456789012'), + new Buffer('12345678901234567890123456789012'), + new Buffer('12345678901234567890123456789012'), + ] +); +bitcoin.script.scriptHash.input.encode( + bitcoin.script.multisig.input.encodeStack( + [ + new Buffer('12345678901234567890123456789012'), + new Buffer('12345678901234567890123456789012'), + ], + redeemScript, + ), + redeemScript, +); diff --git a/types/bitcoinjs-lib/index.d.ts b/types/bitcoinjs-lib/index.d.ts index 11d311a276..2d0603b87c 100644 --- a/types/bitcoinjs-lib/index.d.ts +++ b/types/bitcoinjs-lib/index.d.ts @@ -1,10 +1,11 @@ -// Type definitions for bitcoinjs-lib 3.3 +// Type definitions for bitcoinjs-lib 3.4 // Project: https://github.com/bitcoinjs/bitcoinjs-lib // Definitions by: Mohamed Hegazy // Daniel // Ron Buckton // Satana Charuwichitratana // Youssef GHOUBACH +// Kento // Definitions: https://github.com/DefinitelyTyped/DefinitelyTyped // Declaration file initially generated by dts-gen for bitcoinjs-lib 3.0.3 // based on the flow version found at https://github.com/flowtype/flow-typed/blob/master/definitions/npm/bitcoinjs-lib_v2.x.x/flow_v0.17.x-/bitcoinjs-lib_v2.x.x.js @@ -23,9 +24,11 @@ export interface In { hash: Buffer; index: number; sequence: number; + witness: Buffer[]; } export interface Network { + bech32?: string; bip32: { public: number; private: number; @@ -71,6 +74,10 @@ export class ECPair { d: BigInteger; + readonly compressed: boolean; + + readonly network: Network; + getAddress(): string; getNetwork(): Network; @@ -463,8 +470,8 @@ export namespace script { check(script: Buffer, allowIncomplete: boolean): boolean; decode(buffer: Buffer): Array; decodeStack(stack: Buffer[], allowIncomplete: boolean): Array; - encode(signatures: ECSignature[], scriptPubKey: Buffer): Buffer; - encodeStack(signatures: ECSignature[], scriptPubKey: Buffer): ECSignature[]; + encode(signatures: Buffer[], scriptPubKey: Buffer): Buffer; + encodeStack(signatures: Buffer[], scriptPubKey: Buffer): Buffer[]; }; output: { check(script: Buffer, allowIncomplete: boolean): boolean; @@ -478,8 +485,8 @@ export namespace script { check(script: Buffer): boolean; decode(buffer: Buffer): Array; decodeStack(stack: Buffer[]): Array; - encode(signature: ECSignature): Buffer; - encodeStack(signature: ECSignature): ECSignature[]; + encode(signature: Buffer): Buffer; + encodeStack(signature: Buffer): Buffer[]; }; output: { @@ -492,10 +499,10 @@ export namespace script { const pubKeyHash: { input: { check(script: Buffer): boolean; - decode(buffer: Buffer): { signature: ECSignature; pubKey: Buffer }; - decodeStack(stack: Buffer[]): { signature: ECSignature; pubKey: Buffer }; - encode(signature: ECSignature, pubKey: Buffer): Buffer; - encodeStack(signature: ECSignature, pubKey: Buffer): [ECSignature, Buffer]; + decode(buffer: Buffer): { signature: Buffer; pubKey: Buffer }; + decodeStack(stack: Buffer[]): { signature: Buffer; pubKey: Buffer }; + encode(signature: Buffer, pubKey: Buffer): Buffer; + encodeStack(signature: Buffer, pubKey: Buffer): [Buffer, Buffer]; }; output: { @@ -511,7 +518,7 @@ export namespace script { decode(buffer: Buffer): { redeemScriptStack: Buffer[]; redeemScript: Buffer }; decodeStack(stack: Buffer[]): { redeemScriptStack: Buffer[]; redeemScript: Buffer }; encode(redeemScriptSig: Array, redeemScript: Buffer): Buffer; - encodeStack(redeemScriptStack: Buffer[], redeemScript: Buffer): Buffer; + encodeStack(redeemScriptStack: Buffer[], redeemScript: Buffer): Buffer[]; }; output: { @@ -532,8 +539,8 @@ export namespace script { const witnessPubKeyHash: { input: { check(script: Buffer): boolean; - decodeStack(stack: Buffer[]): { signature: ECSignature; pubKey: Buffer }; - encodeStack(signature: ECSignature, pubKey: Buffer): [ECSignature, Buffer]; + decodeStack(stack: Buffer[]): { signature: Buffer; pubKey: Buffer }; + encodeStack(signature: Buffer, pubKey: Buffer): [Buffer, Buffer]; }; output: { @@ -547,7 +554,7 @@ export namespace script { input: { check(script: Buffer, allowIncomplete: boolean): boolean; decodeStack(stack: Buffer[]): { redeemScriptStack: Buffer[]; redeemScript: Buffer }; - encodeStack(redeemScriptStack: Buffer[], redeemScript: Buffer): Buffer; + encodeStack(redeemScriptStack: Buffer[], redeemScript: Buffer): Buffer[]; }; output: { diff --git a/types/bl/index.d.ts b/types/bl/index.d.ts index 5d34052b80..8ad01671fd 100644 --- a/types/bl/index.d.ts +++ b/types/bl/index.d.ts @@ -11,7 +11,7 @@ import stream = require('stream'); declare class BufferList extends stream.Duplex { constructor(callback?: (err: Error, buffer: Buffer) => void); - append(buffer: Buffer): void; + append(buffer: Buffer | Buffer[] | BufferList | BufferList[] | string): void; get(index: number): number; slice(start?: number, end?: number): Buffer; copy(dest: Buffer, destStart?: number, srcStart?: number, srcEnd?: number): void; diff --git a/types/bleno/bleno-tests.ts b/types/bleno/bleno-tests.ts index bd4b6971ee..2251baed19 100644 --- a/types/bleno/bleno-tests.ts +++ b/types/bleno/bleno-tests.ts @@ -46,7 +46,7 @@ Bleno.on('stateChange', (state: string) => { }); const characteristic = new EchoCharacteristic(); -Bleno.on('advertisingStart', (error: string) => { +Bleno.on('advertisingStart', (error?: Error | null) => { if (!error) { Bleno.setServices( [new Bleno.PrimaryService({uuid: 'ec00', characteristics: [ characteristic ] })], @@ -54,3 +54,265 @@ Bleno.on('advertisingStart', (error: string) => { ); } }); + +const SERVICE_UUID = '87B1E448-1C07-4957-B7D3-017DF4EE3863'; +const CONTROL_CHAR_UUID = '87B1E448-1C07-4957-B7D3-017DF4EE3864'; +const STATUS_CHAR_UUID = '87B1E448-1C07-4957-B7D3-017DF4EE3866'; + +class StatusCharacteristic extends Bleno.Characteristic { + constructor() { + super({ + uuid: 'STATUS_CHAR_UUID', + properties: ['read'], + descriptors: [ + new Bleno.Descriptor({ + uuid: '2901', + value: Buffer.from('Status'), + }), + ], + }); + } + + onReadRequest( + offset: number, + callback: (result: number, data?: Buffer) => void + ) { + try { + const data = Buffer.from('status ok'); + callback(Bleno.Characteristic.RESULT_SUCCESS, data.slice(offset)); + } catch (error) { + callback(Bleno.Characteristic.RESULT_UNLIKELY_ERROR); + } + } +} + +class ControlCharacteristic extends Bleno.Characteristic { + private readonly callback: (data: Buffer) => void; + + constructor(onWriteRequestCb: (data: Buffer) => void) { + super({ + uuid: CONTROL_CHAR_UUID, + properties: ['write'], + descriptors: [ + new Bleno.Descriptor({ + uuid: '2901', + value: Buffer.from('test characteristic'), + }), + ], + }); + this.callback = onWriteRequestCb; + } + + onWriteRequest( + data: Buffer, + offset: number, + withoutResponse: any, + callback: (result: number) => void + ): void { + if (offset > 0) { + this.callback(data.slice(offset)); + } else { + this.callback(data); + } + callback(this.RESULT_SUCCESS); + } +} + +export class BluetoothController { + private isAdvertising: boolean; + + constructor() { + this.isAdvertising = false; + this.setup(); + } + + toString(): string { + return ''; + } + + dispose(callback: () => void) { + if (this.isAdvertising) { + Bleno.stopAdvertising(callback); + } else { + callback(); + } + } + + private setup() { + Bleno.on('stateChange', (state: string) => { + console.log('bluetooth', `stateChange: ${state}, address = ${Bleno.address}`); + + if (state === 'poweredOn') { + Bleno.startAdvertising('device', [SERVICE_UUID]); + } else { + Bleno.stopAdvertising(); + } + }); + + Bleno.on('accept', (clientAddress: string) => { + console.log('bluetooth', `accept, client: ${clientAddress}`); + Bleno.updateRssi(); + }); + + Bleno.on('disconnect', (clientAddress: string) => { + console.log('bluetooth', `disconnect, client: ${clientAddress}`); + }); + + Bleno.on('rssiUpdate', (rssi: number) => { + console.log('bluetooth', `rssiUpdate: ${rssi}`); + }); + + Bleno.on('mtuChange', (mtu: number) => { + console.log('bluetooth', `mtuChange: ${mtu}`); + }); + + Bleno.on('advertisingStart', (error?: Error | null) => { + console.log('bluetooth', `advertisingStart: ${error ? error : 'success'}`); + if (!error) { + this.isAdvertising = true; + Bleno.setServices([ + new Bleno.PrimaryService({ + uuid: SERVICE_UUID, + characteristics: [ + new ControlCharacteristic((data) => { + this.onWriteRequest(data); + }), + new StatusCharacteristic(), + ], + }), + ]); + } + }); + + Bleno.on('advertisingStop', () => { + this.isAdvertising = false; + console.log('bluetooth', 'advertisingStop'); + }); + + Bleno.on('servicesSet', (error?: Error | null) => { + console.log('bluetooth', `servicesSet: ${error ? error : 'success'}`); + }); + } + + private onWriteRequest(data: Buffer) { + console.log(data.toString('hex')); + } +} + +/////////////////////////////////////////////////////////////////////////////// +// code from bleno's README +// + +const bleno = Bleno; + +function test1() { + const name = 'name'; + const serviceUuids = ['fffffffffffffffffffffffffffffff0']; + + bleno.startAdvertising(name); + bleno.startAdvertising(name, serviceUuids); + bleno.startAdvertising(name, serviceUuids, (error) => {}); +} + +function test2() { + const uuid = 'e2c56db5dffb48d2b060d0f5a71096e0'; + const major = 0; // 0x0000 - 0xffff + const minor = 0; // 0x0000 - 0xffff + const measuredPower = -59; // -128 - 127 + + bleno.startAdvertisingIBeacon(uuid, major, minor, measuredPower); + bleno.startAdvertisingIBeacon(uuid, major, minor, measuredPower, (error) => {}); +} + +function test3() { + const scanData = new Buffer(''); // maximum 31 bytes + const advertisementData = new Buffer(''); // maximum 31 bytes + + bleno.startAdvertisingWithEIRData(advertisementData); + bleno.startAdvertisingWithEIRData(advertisementData, (error) => {}); + bleno.startAdvertisingWithEIRData(advertisementData, scanData, (error) => {}); +} + +function test4() { + bleno.stopAdvertising(); + bleno.stopAdvertising(() => {}); +} + +function test5() { + const service = new bleno.PrimaryService({uuid: '0000'}); + const services = [ + service + ]; + + bleno.setServices(services); + bleno.setServices(services, (error) => {}); +} + +function test6() { + bleno.disconnect(); // Linux only +} + +function test7() { + bleno.updateRssi(); // not available in OS X 10.9 + bleno.updateRssi((error, rssi) => {}); // not available in OS X 10.9 +} + +function test8() { + const PrimaryService = bleno.PrimaryService; + + const primaryService = new PrimaryService({ + uuid: 'fffffffffffffffffffffffffffffff0', // or 'fff0' for 16-bit + characteristics: [ + // see Characteristic for data type + ] + }); +} + +function test9() { + const Characteristic = bleno.Characteristic; + + const characteristic = new Characteristic({ + uuid: 'fffffffffffffffffffffffffffffff1', // or 'fff1' for 16-bit + properties: ['read'], // can be a combination of 'read', 'write', 'writeWithoutResponse', 'notify', 'indicate' + secure: ['notify'], // enable security for properties, can be a combination of 'read', 'write', 'writeWithoutResponse', 'notify', 'indicate' + value: null, // optional static value, must be of type Buffer - for read only characteristics + descriptors: [ + // see Descriptor for data type + new bleno.Descriptor({uuid: '0000'}) + ], + onReadRequest: null, // optional read request handler, function(offset, callback) { ... } + onWriteRequest: null, // optional write request handler, function(data, offset, withoutResponse, callback) { ...} + onSubscribe: null, // optional notify/indicate subscribe handler, function(maxValueSize, updateValueCallback) { ...} + onUnsubscribe: null, // optional notify/indicate unsubscribe handler, function() { ...} + onNotify: null, // optional notify sent handler, function() { ...} + onIndicate: null // optional indicate confirmation received handler, function() { ...} + }); +} + +function test10() { + bleno.Characteristic.RESULT_SUCCESS; + bleno.Characteristic.RESULT_INVALID_OFFSET; + bleno.Characteristic.RESULT_INVALID_ATTRIBUTE_LENGTH; + bleno.Characteristic.RESULT_UNLIKELY_ERROR; +} + +function test11() { + const Descriptor = bleno.Descriptor; + + const descriptor = new Descriptor({ + uuid: '2901', + value: 'value' // static value, must be of type Buffer or string if set + }); +} + +function test12() { + bleno.on('stateChange', (state: string) => {}); + bleno.on('advertisingStart', (error?: Error | null) => {}); + bleno.on('advertisingStartError', (error: Error) => {}); + bleno.on('advertisingStop', () => {}); + bleno.on('servicesSet', (error?: Error | null) => {}); + bleno.on('servicesSetError', (error: Error) => {}); + bleno.on('accept', (clientAddress) => {}); // not available on OS X 10.9 + bleno.on('disconnect', (clientAddress) => {}); // Linux only + bleno.on('rssiUpdate', (rssi) => {}); // not available on OS X 10.9 +} diff --git a/types/bleno/index.d.ts b/types/bleno/index.d.ts index a59e394a84..0dee37c9ed 100644 --- a/types/bleno/index.d.ts +++ b/types/bleno/index.d.ts @@ -3,126 +3,147 @@ // Definitions by: Manuel Francisco Naranjo // Definitions: https://github.com/DefinitelyTyped/DefinitelyTyped -export class Characteristic { - uuid: any; - properties: any; - secure: any; - value: any; - descriptors: any; +/// - constructor(options: any); +type State = 'poweredOn' | 'poweredOff' | 'unauthorized' | 'unsupported' | 'unknown' | 'resetting'; + +type Property = 'read' | 'write' | 'indicate' | 'notify' | 'writeWithoutResponse'; + +interface CharacteristicOptions { + uuid: string; + properties?: ReadonlyArray | null; + secure?: ReadonlyArray | null; + value?: Buffer | null; + descriptors?: ReadonlyArray | null; + onIndicate?: (() => void) | null; + onNotify?: (() => void) | null; + onReadRequest?: (( + offset: number, + callback: (result: number, data?: Buffer) => void + ) => void) | null; + onSubscribe?: ((maxValueSize: number, updateValueCallback: any) => void) | null; + onUnsubscribe?: (() => void) | null; + onWriteRequest?: (( + data: Buffer, + offset: number, + withoutResponse: boolean, + callback: (result: number) => void + ) => void) | null; +} + +declare class Characteristic { + uuid: string; + properties: ReadonlyArray; + secure: ReadonlyArray; + value: Buffer | null; + descriptors: ReadonlyArray; + + constructor(options: CharacteristicOptions); onIndicate(): void; onNotify(): void; - onReadRequest(offset: any, callback: any): void; + onReadRequest(offset: number, callback: (result: number, data?: Buffer) => void): void; - onSubscribe(maxValueSize: any, updateValueCallback: any): void; + onSubscribe(maxValueSize: number, updateValueCallback: any): void; onUnsubscribe(): void; - onWriteRequest(data: any, offset: any, withoutResponse: any, callback: any): void; + onWriteRequest(data: Buffer, offset: number, withoutResponse: boolean, callback: (result: number) => void): void; - toString(): any; + toString(): string; - static RESULT_ATTR_NOT_LONG: number; + readonly RESULT_ATTR_NOT_LONG: number; - static RESULT_INVALID_ATTRIBUTE_LENGTH: number; + readonly RESULT_INVALID_ATTRIBUTE_LENGTH: number; - static RESULT_INVALID_OFFSET: number; + readonly RESULT_INVALID_OFFSET: number; - static RESULT_SUCCESS: number; + readonly RESULT_SUCCESS: number; - static RESULT_UNLIKELY_ERROR: number; + readonly RESULT_UNLIKELY_ERROR: number; + + static readonly RESULT_ATTR_NOT_LONG: number; + + static readonly RESULT_INVALID_ATTRIBUTE_LENGTH: number; + + static readonly RESULT_INVALID_OFFSET: number; + + static readonly RESULT_SUCCESS: number; + + static readonly RESULT_UNLIKELY_ERROR: number; } -export class Descriptor { - uuid: any; - value: any; - - constructor(options: any); - - toString(): any; +interface DescriptorOptions { + uuid: string; + value?: Buffer | string | null; } -export class PrimaryService { - uuid: any; - characteristics: any; +declare class Descriptor { + uuid: string; + value: Buffer; - constructor(options: any); + constructor(options: DescriptorOptions); - toString(): any; + toString(): string; } -export const address: string; +interface PrimaryServiceOptions { + uuid: string; + characteristics?: ReadonlyArray | null; +} -export const domain: any; +declare class PrimaryService { + uuid: string; + characteristics: ReadonlyArray; -export const mtu: number; + constructor(options: PrimaryServiceOptions); -export const platform: string; + toString(): string; +} -export const rssi: number; +interface Bleno extends NodeJS.EventEmitter { + readonly Characteristic: typeof Characteristic; + readonly Descriptor: typeof Descriptor; + readonly PrimaryService: typeof PrimaryService; -export const state: string; + readonly address: string; -export function addListener(type: any, listener: any): any; + readonly mtu: number; -export function disconnect(): void; + readonly platform: string; -export function emit(type: any, ...args: any[]): any; + readonly rssi: number; -export function eventNames(): any; + readonly state: State; -export function getMaxListeners(): any; + disconnect(): void; -export function listenerCount(type: any): any; + setServices(services: ReadonlyArray, callback?: (arg: Error | undefined | null) => void): void; -export function listeners(type: any): any; + startAdvertising(name: string, serviceUuids?: ReadonlyArray, callback?: (arg: Error | undefined | null) => void): void; -export function on(type: any, listener: any): any; + startAdvertisingIBeacon(uuid: string, major: number, minor: number, measuredPower: number, callback?: (arg: Error | undefined | null) => void): void; -export function onAccept(clientAddress: any): void; + startAdvertisingWithEIRData(advertisementData: Buffer, callback?: (arg: Error | undefined | null) => void): void; + startAdvertisingWithEIRData(advertisementData: Buffer, scanData: Buffer, callback?: (arg: Error | undefined | null) => void): void; -export function onAddressChange(address: any): void; + stopAdvertising(callback?: () => void): void; -export function onAdvertisingStart(error: any): void; + updateRssi(callback?: (err: null, rssi: number) => void): void; -export function onAdvertisingStop(): void; + on(event: 'stateChange', cb: (state: State) => void): this; + on(event: 'accept', cb: (address: string) => void): this; + on(event: 'mtuChange', cb: (mtu: number) => void): this; + on(event: 'disconnect', cb: (clientAddress: string) => void): this; + on(event: 'advertisingStart', cb: (err?: Error | null) => void): this; + on(event: 'advertisingStartError', cb: (err: Error) => void): this; + on(event: 'advertisingStop', cb: () => void): this; + on(event: 'servicesSet', cb: (err?: Error | null) => void): this; + on(event: 'servicesSetError', cb: (err: Error) => void): this; + on(event: 'rssiUpdate', cb: (rssi: number) => void): this; +} -export function onDisconnect(clientAddress: any): void; - -export function onMtuChange(mtu: any): void; - -export function onPlatform(platform: any): void; - -export function onRssiUpdate(rssi: any): void; - -export function onServicesSet(error: any): void; - -export function onStateChange(state: any): void; - -export function once(type: any, listener: any): any; - -export function prependListener(type: any, listener: any): any; - -export function prependOnceListener(type: any, listener: any): any; - -export function removeAllListeners(type: any, ...args: any[]): any; - -export function removeListener(type: any, listener: any): any; - -export function setMaxListeners(n: any): any; - -export function setServices(services: any, callback: any): void; - -export function startAdvertising(name: any, serviceUuids: any, callback: any): void; - -export function startAdvertisingIBeacon(uuid: any, major: any, minor: any, measuredPower: any, callback: any): void; - -export function startAdvertisingWithEIRData(advertisementData: any, scanData: any, callback: any): void; - -export function stopAdvertising(callback: any): void; - -export function updateRssi(callback: any): void; +declare const bleno: Bleno; +export = bleno; diff --git a/types/bleno/tslint.json b/types/bleno/tslint.json index 26bcea6634..0f5eeaf557 100644 --- a/types/bleno/tslint.json +++ b/types/bleno/tslint.json @@ -1,6 +1,7 @@ { "extends": "dtslint/dt.json", "rules": { - "dt-header": false + "dt-header": false, + "unified-signatures": false } } diff --git a/types/blocked/blocked-tests.ts b/types/blocked/blocked-tests.ts new file mode 100644 index 0000000000..f43eb82cba --- /dev/null +++ b/types/blocked/blocked-tests.ts @@ -0,0 +1,7 @@ +import * as blocked from 'blocked'; + +blocked((ms: number) => { + // todo: show warning +}, { + threshold: 10 +}); diff --git a/types/blocked/index.d.ts b/types/blocked/index.d.ts new file mode 100644 index 0000000000..5292011f23 --- /dev/null +++ b/types/blocked/index.d.ts @@ -0,0 +1,24 @@ +// Type definitions for blocked 1.2 +// Project: https://github.com/visionmedia/node-blocked#readme +// Definitions by: Jonas Lochmann +// Definitions: https://github.com/DefinitelyTyped/DefinitelyTyped + +/// + +/*~ Note that ES6 modules cannot directly export callable functions. + *~ This file should be imported using the CommonJS-style: + *~ import x = require('someLibrary'); + *~ + *~ Refer to the documentation to understand common + *~ workarounds for this limitation of ES6 modules. + */ + +export = Blocked; + +declare function Blocked(callback: (ms: number) => void, options?: Blocked.Options): NodeJS.Timer; + +declare namespace Blocked { + interface Options { + threshold: number; // in milliseconds + } +} diff --git a/types/blocked/tsconfig.json b/types/blocked/tsconfig.json new file mode 100644 index 0000000000..3b110548b0 --- /dev/null +++ b/types/blocked/tsconfig.json @@ -0,0 +1,23 @@ +{ + "compilerOptions": { + "module": "commonjs", + "lib": [ + "es6" + ], + "noImplicitAny": true, + "noImplicitThis": true, + "strictNullChecks": true, + "baseUrl": "../", + "typeRoots": [ + "../" + ], + "types": [], + "noEmit": true, + "forceConsistentCasingInFileNames": true, + "strictFunctionTypes": true + }, + "files": [ + "index.d.ts", + "blocked-tests.ts" + ] +} diff --git a/types/blocked/tslint.json b/types/blocked/tslint.json new file mode 100644 index 0000000000..3db14f85ea --- /dev/null +++ b/types/blocked/tslint.json @@ -0,0 +1 @@ +{ "extends": "dtslint/dt.json" } diff --git a/types/blockies/blockies-tests.ts b/types/blockies/blockies-tests.ts new file mode 100644 index 0000000000..31b9dcad48 --- /dev/null +++ b/types/blockies/blockies-tests.ts @@ -0,0 +1,4 @@ +import blockies = require('blockies'); + +const seed = 'seed'; +blockies({ seed }); diff --git a/types/blockies/index.d.ts b/types/blockies/index.d.ts new file mode 100644 index 0000000000..f2de8b2c53 --- /dev/null +++ b/types/blockies/index.d.ts @@ -0,0 +1,14 @@ +// Type definitions for blockies 0.0 +// Project: https://github.com/goldylucks/blockies-npm +// Definitions by: Leonid Logvinov +// Definitions: https://github.com/DefinitelyTyped/DefinitelyTyped + +interface BlockiesIcon { + toDataURL(): string; +} +interface BlockiesConfig { + seed: string; +} +declare function blockies(config: BlockiesConfig): BlockiesIcon; + +export = blockies; diff --git a/types/blockies/tsconfig.json b/types/blockies/tsconfig.json new file mode 100644 index 0000000000..f190f0b0c9 --- /dev/null +++ b/types/blockies/tsconfig.json @@ -0,0 +1,16 @@ +{ + "compilerOptions": { + "module": "commonjs", + "lib": ["es6"], + "noImplicitAny": true, + "noImplicitThis": true, + "strictFunctionTypes": true, + "strictNullChecks": true, + "baseUrl": "../", + "typeRoots": ["../"], + "types": [], + "noEmit": true, + "forceConsistentCasingInFileNames": true + }, + "files": ["index.d.ts", "blockies-tests.ts"] +} diff --git a/types/blockies/tslint.json b/types/blockies/tslint.json new file mode 100644 index 0000000000..3db14f85ea --- /dev/null +++ b/types/blockies/tslint.json @@ -0,0 +1 @@ +{ "extends": "dtslint/dt.json" } diff --git a/types/bluebird-retry/bluebird-retry-tests.ts b/types/bluebird-retry/bluebird-retry-tests.ts index e9beaf5562..45a665c969 100644 --- a/types/bluebird-retry/bluebird-retry-tests.ts +++ b/types/bluebird-retry/bluebird-retry-tests.ts @@ -30,3 +30,10 @@ const options: retry.Options = { }; retry(logFail, options); + +function stopErrorExample() { + console.log('retrying\n'); + throw new retry.StopError('stop retrying'); +} + +retry(stopErrorExample); diff --git a/types/bluebird-retry/index.d.ts b/types/bluebird-retry/index.d.ts index 358c75936d..b7ba96495d 100644 --- a/types/bluebird-retry/index.d.ts +++ b/types/bluebird-retry/index.d.ts @@ -20,6 +20,8 @@ declare namespace retry { context?: any; args?: any; } + + class StopError extends Error {} } export = retry; diff --git a/types/bn.js/bn.js-tests.ts b/types/bn.js/bn.js-tests.ts new file mode 100644 index 0000000000..670234ecfe --- /dev/null +++ b/types/bn.js/bn.js-tests.ts @@ -0,0 +1,6 @@ +import BN = require('bn.js'); + +let bn = new BN(42); +bn = bn.add(bn); +bn.isZero(); +bn.byteLength; diff --git a/types/bn.js/index.d.ts b/types/bn.js/index.d.ts new file mode 100644 index 0000000000..1a3d4f9b70 --- /dev/null +++ b/types/bn.js/index.d.ts @@ -0,0 +1,60 @@ +// Type definitions for bn.js 4.11 +// Project: https://github.com/indutny/bn.js +// Definitions by: Leonid Logvinov +// Definitions: https://github.com/DefinitelyTyped/DefinitelyTyped + +/// + +type Endianness = 'le' | 'be'; + +declare class BN { + constructor(num: number | string | number[] | Buffer, base?: number, endian?: Endianness); + clone(): BN; + toString(base?: number, length?: number): string; + toNumber(): number; + toJSON(): string; + toArray(endian?: Endianness, length?: number): number[]; + toBuffer(endian?: Endianness, length?: number): Buffer; + bitLength(): number; + zeroBits(): number; + byteLength(): number; + isNeg(): boolean; + isEven(): boolean; + isOdd(): boolean; + isZero(): boolean; + cmp(b: any): number; + lt(b: any): boolean; + lte(b: any): boolean; + gt(b: any): boolean; + gte(b: any): boolean; + eq(b: any): boolean; + isBN(b: any): boolean; + + neg(): BN; + abs(): BN; + add(b: BN): BN; + sub(b: BN): BN; + mul(b: BN): BN; + sqr(): BN; + pow(b: BN): BN; + div(b: BN): BN; + mod(b: BN): BN; + divRound(b: BN): BN; + + or(b: BN): BN; + and(b: BN): BN; + xor(b: BN): BN; + setn(b: number): BN; + shln(b: number): BN; + shrn(b: number): BN; + testn(b: number): boolean; + maskn(b: number): BN; + bincn(b: number): BN; + notn(w: number): BN; + + gcd(b: BN): BN; + egcd(b: BN): { a: BN; b: BN; gcd: BN }; + invm(b: BN): BN; +} + +export = BN; diff --git a/types/bn.js/tsconfig.json b/types/bn.js/tsconfig.json new file mode 100644 index 0000000000..932e246886 --- /dev/null +++ b/types/bn.js/tsconfig.json @@ -0,0 +1,16 @@ +{ + "compilerOptions": { + "module": "commonjs", + "lib": ["es6"], + "noImplicitAny": true, + "noImplicitThis": true, + "strictFunctionTypes": true, + "strictNullChecks": true, + "baseUrl": "../", + "typeRoots": ["../"], + "types": [], + "noEmit": true, + "forceConsistentCasingInFileNames": true + }, + "files": ["index.d.ts", "bn.js-tests.ts"] +} diff --git a/types/bn.js/tslint.json b/types/bn.js/tslint.json new file mode 100644 index 0000000000..3db14f85ea --- /dev/null +++ b/types/bn.js/tslint.json @@ -0,0 +1 @@ +{ "extends": "dtslint/dt.json" } diff --git a/types/body-parser-xml/body-parser-xml-tests.ts b/types/body-parser-xml/body-parser-xml-tests.ts new file mode 100644 index 0000000000..9aab34ecc7 --- /dev/null +++ b/types/body-parser-xml/body-parser-xml-tests.ts @@ -0,0 +1,4 @@ +import bodyParser = require('body-parser'); +import bodyParserXml = require('body-parser-xml'); + +bodyParserXml(bodyParser); diff --git a/types/body-parser-xml/index.d.ts b/types/body-parser-xml/index.d.ts new file mode 100644 index 0000000000..c5de21c062 --- /dev/null +++ b/types/body-parser-xml/index.d.ts @@ -0,0 +1,11 @@ +// Type definitions for body-parser-xml 1.1 +// Project: https://github.com/fiznool/body-parser-xml +// Definitions by: tbounsiar +// Definitions: https://github.com/DefinitelyTyped/DefinitelyTyped +// TypeScript Version: 2.3 + +import { Request, RequestHandler, Response, NextFunction } from 'express'; + +declare function bodyParserXml(bodyParser: any): (req: Request, res: Response, next: NextFunction) => void; + +export = bodyParserXml; diff --git a/types/node-common-errors/tsconfig.json b/types/body-parser-xml/tsconfig.json similarity index 92% rename from types/node-common-errors/tsconfig.json rename to types/body-parser-xml/tsconfig.json index a862893b87..c597f3cb08 100644 --- a/types/node-common-errors/tsconfig.json +++ b/types/body-parser-xml/tsconfig.json @@ -18,6 +18,6 @@ }, "files": [ "index.d.ts", - "node-common-errors-tests.ts" + "body-parser-xml-tests.ts" ] } \ No newline at end of file diff --git a/types/body-parser-xml/tslint.json b/types/body-parser-xml/tslint.json new file mode 100644 index 0000000000..2750cc0197 --- /dev/null +++ b/types/body-parser-xml/tslint.json @@ -0,0 +1 @@ +{ "extends": "dtslint/dt.json" } \ No newline at end of file diff --git a/types/body-parser/body-parser-tests.ts b/types/body-parser/body-parser-tests.ts index 2f6a33ea72..89d905ead0 100644 --- a/types/body-parser/body-parser-tests.ts +++ b/types/body-parser/body-parser-tests.ts @@ -1,3 +1,4 @@ +import * as http from 'http'; import express = require('express'); import { json, @@ -13,6 +14,21 @@ app.use(raw()); app.use(text()); app.use(urlencoded()); +const jsonParser = app.use(json({ + inflate: true, + limit: '100kb', + type: 'application/*', + verify: ( + req: http.IncomingMessage, + res: http.ServerResponse, + buf: Buffer, + encoding: string + ) => { + return true; + } +})); +app.use(jsonParser); + // send any data, it should be parsed and printed app.all('/', (req, res, next) => { console.log(req.body); diff --git a/types/body-parser/index.d.ts b/types/body-parser/index.d.ts index b1485770a1..67774e2149 100644 --- a/types/body-parser/index.d.ts +++ b/types/body-parser/index.d.ts @@ -1,24 +1,30 @@ -// Type definitions for body-parser 1.16 +// Type definitions for body-parser 1.17 // Project: https://github.com/expressjs/body-parser -// Definitions by: Santi Albo , Vilic Vane , Jonathan Häberle , Gevik Babakhani , Tomasz Łaziuk +// Definitions by: Santi Albo +// Vilic Vane +// Jonathan Häberle +// Gevik Babakhani +// Tomasz Łaziuk +// Jason Walton // Definitions: https://github.com/DefinitelyTyped/DefinitelyTyped // TypeScript Version: 2.2 /// -import { Request, RequestHandler, Response } from 'express'; +import { NextHandleFunction } from 'connect'; +import * as http from 'http'; // for docs go to https://github.com/expressjs/body-parser/tree/1.16.0#body-parser // @deprecated -declare function bodyParser(options?: bodyParser.OptionsJson & bodyParser.OptionsText & bodyParser.OptionsUrlencoded): RequestHandler; +declare function bodyParser(options?: bodyParser.OptionsJson & bodyParser.OptionsText & bodyParser.OptionsUrlencoded): NextHandleFunction; declare namespace bodyParser { interface Options { inflate?: boolean; limit?: number | string; - type?: string | string[] | ((req: Request) => any); - verify?(req: Request, res: Response, buf: Buffer, encoding: string): void; + type?: string | string[] | ((req: http.IncomingMessage) => any); + verify?(req: http.IncomingMessage, res: http.ServerResponse, buf: Buffer, encoding: string): void; } interface OptionsJson extends Options { @@ -35,13 +41,13 @@ declare namespace bodyParser { parameterLimit?: number; } - function json(options?: OptionsJson): RequestHandler; + function json(options?: OptionsJson): NextHandleFunction; - function raw(options?: Options): RequestHandler; + function raw(options?: Options): NextHandleFunction; - function text(options?: OptionsText): RequestHandler; + function text(options?: OptionsText): NextHandleFunction; - function urlencoded(options?: OptionsUrlencoded): RequestHandler; + function urlencoded(options?: OptionsUrlencoded): NextHandleFunction; } export = bodyParser; diff --git a/types/bootstrap-datepicker/index.d.ts b/types/bootstrap-datepicker/index.d.ts index dfe358854e..b841fe07ab 100644 --- a/types/bootstrap-datepicker/index.d.ts +++ b/types/bootstrap-datepicker/index.d.ts @@ -10,7 +10,20 @@ type DatepickerEvents = "show"|"hide"|"clearDate"|"changeDate"|"changeMonth"|"ch type DatepickerViewModes = 0|"days"|1|"months"|2|"years"|3|"decades"|4|"centuries"|"millenium"; -type DatepickerOrientations = "auto"|"left top"|"left bottom"|"right top"|"right bottom"; +type DatepickerOrientations = + "auto" + | "left top" + | "left bottom" + | "right top" + | "right bottom" + | "top auto" + | "bottom auto" + | "auto left" + | "top left" + | "bottom left" + | "auto right" + | "top right" + | "bottom right" /** * All options that take a “Date” can handle a Date object; a String diff --git a/types/bootstrap/bootstrap-tests.ts b/types/bootstrap/bootstrap-tests.ts index 21286ad5f4..f0a353889c 100755 --- a/types/bootstrap/bootstrap-tests.ts +++ b/types/bootstrap/bootstrap-tests.ts @@ -43,10 +43,15 @@ $("#carousel").on("slide.bs.carousel", function(ev) { $("#carousel").carousel({ interval: 5000, keyboard: true, + slide: false, pause: "hover", wrap: true, }); +$("#carousel").carousel({ + slide: "prev", +}); + $("#carousel").carousel({ pause: false, }); @@ -96,6 +101,8 @@ $("#dropdown").dropdown({ offset: 10, flip: false, boundary: "window", + reference: "toggle", + display: "dynamic", }); $("#dropdown").dropdown({ @@ -114,6 +121,10 @@ $("#dropdown").dropdown({ boundary: document.body, }); +$("#dropdown").dropdown({ + reference: document.body, +}); + // -------------------------------------------------------------------------------------- // Modal // -------------------------------------------------------------------------------------- diff --git a/types/bootstrap/index.d.ts b/types/bootstrap/index.d.ts index 88bcc66af8..2f43555a73 100755 --- a/types/bootstrap/index.d.ts +++ b/types/bootstrap/index.d.ts @@ -1,4 +1,4 @@ -// Type definitions for Bootstrap 4.0 +// Type definitions for Bootstrap 4.1 // Project: https://github.com/twbs/bootstrap/ // Definitions by: denisname // Definitions: https://github.com/DefinitelyTyped/DefinitelyTyped @@ -55,6 +55,14 @@ export interface CarouselOption { */ keyboard?: boolean; + /** + * Use to easily control the position of the carousel. It accepts the keywords prev or next, which alters the slide position + * relative to its current position. Alternatively, use `data-slide-to` to pass a raw slide index to the carousel. + * + * @default false + */ + slide?: "next" | "prev" | false; + /** * If set to "hover", pauses the cycling of the carousel on mouseenter and resumes the cycling of the carousel on mouseleave. * If set to false, hovering over the carousel won't pause it. @@ -116,6 +124,21 @@ export interface DropdownOption { * @default "scrollParent" */ boundary?: Popper.Boundary | HTMLElement; + + /** + * Reference element of the dropdown menu. Accepts the values of 'toggle', 'parent', or an HTMLElement reference. + * For more information refer to Popper.js's referenceObject docs. + * + * @default "toggle" + */ + reference?: "toggle" | "parent" | HTMLElement; + + /** + * By default, we use Popper.js for dynamic positioning. Disable this with 'static'. + * + * @default "dynamic" + */ + display?: "dynamic" | "static"; } export interface ModalOption { @@ -154,6 +177,8 @@ export interface PopoverOption extends TooltipOption { * Default content value if data-content attribute isn't present. * If a function is given, it will be called with its this reference * set to the element that the popover is attached to. + * + * @default "" */ content?: string | Element | ((this: Element) => string | Element); } @@ -226,7 +251,7 @@ export interface TooltipOption { * the tooltip or popover DOM node as its first argument and the triggering element DOM node as its second. * The this context is set to the tooltip or popover instance. * - * @default "top" + * @default tooltip: "top", popover: "right" */ placement?: Placement | ((this: TooltipInstance, node: HTMLElement, trigger: Element) => Placement); diff --git a/types/browser-sync/browser-sync-tests.ts b/types/browser-sync/browser-sync-tests.ts index bcd829367a..c63cb0c862 100644 --- a/types/browser-sync/browser-sync-tests.ts +++ b/types/browser-sync/browser-sync-tests.ts @@ -8,11 +8,98 @@ import browserSync = require("browser-sync"); })(); browserSync({ - server: { - baseDir: "./" + ui: true +}); + +browserSync({ + ui: { + port: 9000, + weinre: { + port: 9001 + } } }); +browserSync({ + files: "app/css/style.css" +}); + +browserSync({ + files: [ + "app/css/style.css", + "app/js/*.js" + ] +}); + +browserSync({ + files: [ + "app/css/style.css", + "!app/js/*.js" + ] +}); + +browserSync({ + files: [ + "wp-content/themes/**/*.css", + { + match: ["wp-content/themes/**/*.css"], + fn: function (event, file) { + /** Custom event handler **/ + } + } + ] +}); + +browserSync({ + watchEvents: [ + "change", + "add", + "unlink", + "addDir", + "unlinkDir" + ] +}); + +browserSync({ + watch: true +}); + +browserSync({ + ignore: [ + "app/js/*.js" + ] +}); + +browserSync({ + single: true +}); + +browserSync({ + watchOptions: { + ignoreInitial: true, + ignored: '*.txt' + }, + files: ['./app'] +}); + +browserSync({ + files: [ + { + match: ["wp-content/themes/**/*.php"], + fn: function (event, file) { + /** Custom event handler **/ + }, + options: { + ignored: '*.txt' + } + } + ] +}); + +browserSync({ + server: "app" +}); + // multiple base directory browserSync({ server: { @@ -20,6 +107,39 @@ browserSync({ } }); +browserSync({ + server: true +}); + +browserSync({ + server: { + baseDir: "./" + } +}); + +browserSync({ + server: { + baseDir: "./", + index: "index.htm" + } +}); + +browserSync({ + server: { + baseDir: "./", + directory: true + } +}); + +browserSync({ + server: { + baseDir: "app", + serveStaticOptions: { + extensions: ["html"] + } + } +}); + browserSync({ proxy: "yourlocal.dev" }); @@ -27,8 +147,8 @@ browserSync({ browserSync({ proxy: { target: "http://yourlocal.dev", - proxyReq: function(proxyReq) { - console.log(proxyReq); + proxyReq: function (proxyReq) { + console.log(proxyReq); } } }); @@ -37,7 +157,7 @@ browserSync({ proxy: { target: "http://yourlocal.dev", proxyReq: [ - function(proxyReq) { + function (proxyReq) { console.log(proxyReq); } ] @@ -47,8 +167,8 @@ browserSync({ browserSync({ proxy: { target: "http://yourlocal.dev", - proxyRes: function(proxyRes, req, res) { - console.log(proxyRes); + proxyRes: function (proxyResponse, req, res) { + console.log(proxyResponse); } } }); @@ -57,13 +177,157 @@ browserSync({ proxy: { target: "http://yourlocal.dev", proxyRes: [ - function(proxyRes, req, res) { - console.log(proxyRes); + function (proxyResponse, req, res) { + console.log(proxyResponse); } ] } }); +browserSync({ + proxy: { + target: "http://yourlocal.dev", + proxyRes: function (res) { + console.log(res); + } + } +}); + +browserSync({ + proxy: { + target: "http://yourlocal.dev", + proxyRes: [ + function (res) { + console.log(res); + } + ] + } +}); + +browserSync({ + proxy: "https://yourlocal.dev", + https: { + key: "./path/to/the/key/file.key", + cert: "./path/to/the/cert/file.cer" + } +}); + +browserSync({ + port: 3000 +}); + +browserSync({ + proxy: "http://yourlocal.dev", + serveStatic: ['.', './app/css'] +}); + +browserSync({ + proxy: "http://yourlocal.dev", + serveStatic: [{ + route: '/assets', + dir: 'tmp' + }] +}); + +browserSync({ + proxy: "http://yourlocal.dev", + serveStatic: [{ + route: ['/assets', '/content'], + dir: 'tmp' + }] +}); + +browserSync({ + proxy: "http://yourlocal.dev", + serveStatic: [{ + route: '/assets', + dir: ['./tmp', './app'] + }] +}); + +browserSync({ + serveStatic: ['.', './app', './temp'], + serveStaticOptions: { + extensions: ['html'] // pretty urls + } +}); + +browserSync({ + https: true +}); + +browserSync({ + server: "./app", + https: true +}); + +browserSync({ + server: "./app", + https: { + key: "./path/to/the/key/file.key", + cert: "./path/to/the/cert/file.cer" + } +}); + +browserSync({ + httpModule: "http2" +}); + +browserSync({ + ghostMode: { + clicks: true, + scroll: true, + forms: { + inputs: true, + submit: true, + toggles: true + } + }, + proxy: "https://yourlocal.dev" +}); + +/** + * Not testing a bunch because they are either only string or boolean types. + * ....Also just got lazy and tired of writing the simple ones. + */ + +browserSync({ + snippetOptions: { + + // Ignore all HTML files within the templates folder + blacklist: [ + "templates/*.html" + ], + // Provide a custom Regex for inserting the snippet. + rule: { + match: /<\/body>/i, + fn: function (snippet, match) { + return snippet + match; + } + } + } +}); + +browserSync({ + rewriteRules: [ + { + match: /Browsersync/g, + fn: function (req, res, match) { + return 'kittenz'; + } + } + ] +}); + +browserSync({ + rewriteRules: [ + { + match: /(cats|kitten[sz]) are mediocre/g, + replace: "$1 are excellent" + } + ] +}); + var config = { server: { baseDir: "./" @@ -84,13 +348,13 @@ browserSync(config, function (err, bs) { browserSync.reload(); // single file -browserSync.reload( "styles.css" ); +browserSync.reload("styles.css"); // multiple files -browserSync.reload( ["styles.css", "ie.css"] ); +browserSync.reload(["styles.css", "ie.css"]); // streams support -browserSync.reload( { stream: true } ); +browserSync.reload({ stream: true }); browserSync.notify("Compiling, please wait!"); @@ -143,19 +407,19 @@ browser.exit(); browser.stream(); // -- "once" option. -browser.stream({once: true}); +browser.stream({ once: true }); // -- "match" option (string). -browser.stream({match: "**/*.js"}); +browser.stream({ match: "**/*.js" }); // -- "match" option (RegExp). -browser.stream({match: /\.js$/}); +browser.stream({ match: /\.js$/ }); // -- "match" option (function). -browser.stream({match: (testString) => true}); +browser.stream({ match: (testString) => true }); // -- "match" option (array). -browser.stream({match: ["**/*.js", /\.js$/, (testString) => true]}); +browser.stream({ match: ["**/*.js", /\.js$/, (testString) => true] }); // -- Both options. -browser.stream({once: true, match: ["**/*.js", /\.js$/, (testString) => true]}); +browser.stream({ once: true, match: ["**/*.js", /\.js$/, (testString) => true] }); diff --git a/types/browser-sync/index.d.ts b/types/browser-sync/index.d.ts index b22054c367..de0a457266 100644 --- a/types/browser-sync/index.d.ts +++ b/types/browser-sync/index.d.ts @@ -1,16 +1,21 @@ // Type definitions for browser-sync // Project: http://www.browsersync.io/ -// Definitions by: Asana , Joe Skeen +// Definitions by: Asana , +// Joe Skeen // Thomas "Thasmo" Deinhamer +// Kiyotoshi Ichikawa // Definitions: https://github.com/DefinitelyTyped/DefinitelyTyped +// TypeScript Version: 2.2 /// /// +/// import * as chokidar from "chokidar"; import * as fs from "fs"; import * as http from "http"; import * as mm from "micromatch"; +import { ServeStaticOptions } from "serve-static"; declare namespace browserSync { interface Options { @@ -20,7 +25,7 @@ declare namespace browserSync { * * port - Default: 3001 * weinre.port - Default: 8080 - * Note: requires at least version 2.0.0 + * Note: Requires at least version 2.0.0. */ ui?: UIOptions | boolean; /** @@ -29,46 +34,81 @@ declare namespace browserSync { * patterns. * Default: false */ - files?: string | (string | FileCallback)[]; + files?: string | (string | FileCallback | object)[]; + /** + * Specify which file events to respond to. + * Available events: `add`, `change`, `unlink`, `addDir`, `unlinkDir` + */ + watchEvents?: WatchEvents | string[]; + /** + * Watch files automatically. + */ + watch?: boolean; + /** + * Patterns for any watchers to ignore. + * Anything provided here will end up inside 'watchOptions.ignored'. + */ + ignore?: string[]; + /** + * Serve an index.html file for all non-asset routes. + * Useful when using client-routers. + */ + single?: boolean; /** * File watching options that get passed along to Chokidar. Check their docs for available options * Default: undefined - * Note: requires at least version 2.6.0 + * Note: Requires at least version 2.6.0. */ watchOptions?: chokidar.WatchOptions; /** * Use the built-in static server for basic HTML/JS/CSS websites. * Default: false */ - server?: ServerOptions; + server?: string | boolean | string[] | ServerOptions; /** * Proxy an EXISTING vhost. Browsersync will wrap your vhost with a proxy URL to view your site. + * Passing only a URL as a string equates to passing only target property of ProxyOptions type. * target - Default: undefined * ws - Default: undefined * middleware - Default: undefined * reqHeaders - Default: undefined - * proxyRes - Default: undefined + * proxyRes - Default: undefined (http.ServerResponse if expecting single parameter) * proxyReq - Default: undefined */ - proxy?: string | boolean | ProxyOptions; + proxy?: string | ProxyOptions; /** * Use a specific port (instead of the one auto-detected by Browsersync) * Default: 3000 */ port?: number; + /** + * Functions or actual plugins used as middleware. + */ + middleware?: MiddlewareHandler | PerRouteMiddleware | (MiddlewareHandler | PerRouteMiddleware)[]; /** * Add additional directories from which static files should be served. * Should only be used in proxy or snippet mode. * Default: [] - * Note: requires at least version 2.8.0 + * Note: Requires at least version 2.8.0. */ - serveStatic?: string[]; + serveStatic?: StaticOptions[] | string[]; + /** + * Options that are passed to the serve-static middleware when you use the + * string[] syntax: eg: `serveStatic: ['./app']`. + * Please see [serve-static](https://github.com/expressjs/serve-static) for details. + */ + serveStaticOptions?: ServeStaticOptions; /** * Enable https for localhost development. - * Note - this is not needed for proxy option as it will be inferred from your target url. - * Note: requires at least version 1.3.0 + * Note: This may not be needed for proxy option as it will try to infer from your target url. + * Note: If privacy error is encountered please see HttpsOptions below, setting those will resolve. + * Note: Requires at least version 1.3.0. */ - https?: boolean; + https?: boolean | HttpsOptions; + /** + * Override http module to allow using 3rd party server modules (such as http2). + */ + httpModule?: string; /** * Clicks, Scrolls & Form inputs on any device will be mirrored to all others. * clicks - Default: true @@ -80,11 +120,11 @@ declare namespace browserSync { * Can be either "info", "debug", "warn", or "silent" * Default: info */ - logLevel?: string; + logLevel?: LogLevel; /** * Change the console logging prefix. Useful if you're creating your own project based on Browsersync * Default: BS - * Note: requires at least version 1.5.1 + * Note: Requires at least version 1.5.1. */ logPrefix?: string; /** @@ -100,19 +140,19 @@ declare namespace browserSync { /** * Log the snippet to the console when you're in snippet mode (no proxy/server) * Default: true - * Note: requires at least version 1.5.2 + * Note: Requires at least version 1.5.2. */ logSnippet?: boolean; /** * You can control how the snippet is injected onto each page via a custom regex + function. * You can also provide patterns for certain urls that should be ignored from the snippet injection. - * Note: requires at least version 2.0.0 + * Note: Requires at least version 2.0.0. */ snippetOptions?: SnippetOptions; /** * Add additional HTML rewriting rules. * Default: false - * Note: requires at least version 2.4.0 + * Note: Requires at least version 2.4.0. */ rewriteRules?: boolean | RewriteRules[]; /** @@ -130,7 +170,7 @@ declare namespace browserSync { * Decide which URL to open automatically when Browsersync starts. Defaults to "local" if none set. * Can be true, local, external, ui, ui-external, tunnel or false */ - open?: string | boolean; + open?: OpenOptions | boolean; /** * The browser(s) to open * Default: default @@ -139,7 +179,7 @@ declare namespace browserSync { /** * Add HTTP access control (CORS) headers to assets served by Browsersync. * Default: false - * Note: requires at least version 2.16.0 + * Note: Requires at least version 2.16.0. */ cors?: boolean; /** @@ -177,12 +217,12 @@ declare namespace browserSync { /** * Sync the scroll position of any element on the page. Add any amount of CSS selectors * Default: [] - * Note: requires at least version 2.9.0 + * Note: Requires at least version 2.9.0. */ scrollElements?: string[]; /** * Default: [] - * Note: requires at least version 2.9.0 + * Note: Requires at least version 2.9.0. * Sync the scroll position of any element on the page - where any scrolled element will cause * all others to match scroll position. This is helpful when a breakpoint alters which element * is actually scrolling @@ -197,13 +237,18 @@ declare namespace browserSync { /** * Restrict the frequency in which browser:reload events can be emitted to connected clients * Default: 0 - * Note: requires at least version 2.6.0 + * Note: Requires at least version 2.6.0. */ reloadDebounce?: number; + /** + * Emit only the first event during sequential time windows of a specified duration. + * Note: Requires at least version 2.13.0. + */ + reloadThrottle?: number; /** * User provided plugins * Default: [] - * Note: requires at least version 2.6.0 + * Note: Requires at least version 2.6.0. */ plugins?: any[]; /** @@ -224,6 +269,10 @@ declare namespace browserSync { * Override host detection if you know the correct IP to use */ host?: string; + /** + * Support environments where dynamic hostnames are not required (ie: electron). + */ + localOnly?: boolean; /** * Send file-change events to the browser * Default: true @@ -234,10 +283,16 @@ declare namespace browserSync { * Default: true */ timestamps?: boolean; + /** + * ¯\_(ツ)_/¯ + * Best guess, when ghostMode (or SocketIO?) is setup the events + * listed here will be emitted and able to hook into. + */ + clientEvents?: string[]; /** * Alter the script path for complete control over where the Browsersync Javascript is served * from. Whatever you return from this function will be used as the script path. - * Note: requires at least version 1.5.0 + * Note: Requires at least version 1.5.0. */ scriptPath?: (path: string) => string; /** @@ -248,12 +303,29 @@ declare namespace browserSync { * domain - Default: undefined * port - Default: undefined * clients.heartbeatTimeout - Default: 5000 - * Note: requires at least version 1.6.2 + * Note: Requires at least version 1.6.2. */ socket?: SocketOptions; - middleware?: MiddlewareHandler | PerRouteMiddleware | (MiddlewareHandler | PerRouteMiddleware)[]; + /** + * ¯\_(ツ)_/¯ + */ + tagNames?: TagNamesOptions; + /** + * ¯\_(ツ)_/¯ + */ + injectFileTypes?: string[]; + /** + * ¯\_(ツ)_/¯ + */ + excludeFileTypes?: string[]; } + type WatchEvents = "add" | "change" | "unlink" | "addDir" | "unlinkDir"; + + type LogLevel = "info" | "debug" | "warn" | "silent"; + + type OpenOptions = "local" | "external" | "ui" | "ui-external" | "tunnel"; + interface Hash { [path: string]: T; } @@ -287,22 +359,39 @@ declare namespace browserSync { routes?: Hash; /** configure custom middleware */ middleware?: (MiddlewareHandler | PerRouteMiddleware)[]; + serveStaticOptions?: ServeStaticOptions; } interface ProxyOptions { target?: string; middleware?: MiddlewareHandler; ws?: boolean; - reqHeaders?: (config: any) => Hash; - proxyRes?: ((res: http.ServerResponse, req: http.IncomingMessage, next: Function) => any)[] | ((res: http.ServerResponse, req: http.IncomingMessage, next: Function) => any); - proxyReq?: ((res: http.ServerRequest) => any)[] | ((res: http.ServerRequest) => any); + reqHeaders?: (config: object) => Hash; + proxyRes?: ProxyResponseMiddleware | ProxyResponseMiddleware[]; + proxyReq?: ((res: http.ServerRequest) => void)[] | ((res: http.ServerRequest) => void); + error?: (err: NodeJS.ErrnoException, req: http.IncomingMessage, res: http.ServerResponse) => void; + } + + interface ProxyResponseMiddleware { + (proxyRes: http.ServerResponse | http.IncomingMessage, res: http.ServerResponse, req: http.IncomingMessage): void; + } + + interface HttpsOptions { + key?: string; + cert?: string; + } + + interface StaticOptions { + route: string | string[], + dir: string | string[] } interface MiddlewareHandler { - (req: http.IncomingMessage, res: http.ServerResponse, next: Function): any; + (req: http.IncomingMessage, res: http.ServerResponse, next: () => void): any; } interface PerRouteMiddleware { + id?: string; route: string; handle: MiddlewareHandler; } @@ -310,12 +399,23 @@ declare namespace browserSync { interface GhostOptions { clicks?: boolean; scroll?: boolean; - forms?: boolean; + forms?: FormsOptions | boolean; + } + + interface FormsOptions { + inputs: boolean, + submit: boolean, + toggles: boolean } interface SnippetOptions { - ignorePaths?: string; - rule?: { match?: RegExp; fn?: (snippet: string, match: string) => any }; + async?: boolean; + whitelist?: string[], + blacklist?: string[], + rule?: { + match?: RegExp; + fn?: (snippet: string, match: string) => any + }; } interface SocketOptions { @@ -327,9 +427,22 @@ declare namespace browserSync { clients?: { heartbeatTimeout?: number; }; } + interface TagNamesOptions { + less?: string; + scss?: string; + css?: string; + jpg?: string; + jpeg?: string; + png?: string; + svg?: string; + gif?: string; + js?: string; + } + interface RewriteRules { match: RegExp; - fn: (match: string) => string; + replace?: string; + fn?: (req: http.IncomingMessage, res: http.ServerResponse, match: string) => string; } interface StreamOptions { @@ -342,7 +455,7 @@ declare namespace browserSync { * Start the Browsersync service. This will launch a server, proxy or start the snippet mode * depending on your use-case. */ - (config?: Options, callback?: (err: Error, bs: Object) => any): BrowserSyncInstance; + (config?: Options, callback?: (err: Error, bs: object) => any): BrowserSyncInstance; /** * Create a Browsersync instance * @param name an identifier that can used for retrieval later @@ -367,7 +480,7 @@ declare namespace browserSync { * Start the Browsersync service. This will launch a server, proxy or start the snippet mode * depending on your use-case. */ - init(config?: Options, callback?: (err: Error, bs: Object) => any): BrowserSyncInstance; + init(config?: Options, callback?: (err: Error, bs: object) => any): BrowserSyncInstance; /** * Reload the browser * The reload method will inform all browsers about changed files and will either cause the browser diff --git a/types/bson/bson-tests.ts b/types/bson/bson-tests.ts index ebdd8a19c3..b3173053c8 100644 --- a/types/bson/bson-tests.ts +++ b/types/bson/bson-tests.ts @@ -6,7 +6,7 @@ bson.ObjectID.cacheHexString = true let BSON = new bson.BSON(); let Long = bson.Long; -let doc = {long: Long.fromNumber(100)} +let doc = { long: Long.fromNumber(100) } // Serialize a document let data = BSON.serialize(doc, false, true, false); @@ -19,3 +19,10 @@ console.log("doc_2:", doc_2); BSON = new bson.BSON(); data = BSON.serialize(doc); doc_2 = BSON.deserialize(data); + + +// Calculate Object Size +BSON = new bson.BSON(); +console.log("Calculated Object size - no options object:", BSON.calculateObjectSize(doc)); +console.log("Calculated Object size - empty options object:", BSON.calculateObjectSize(doc, {})); +console.log("Calculated Object size - custom options object:", BSON.calculateObjectSize(doc, { ignoreUndefined: false, serializeFunctions: true })); diff --git a/types/bson/index.d.ts b/types/bson/index.d.ts index 24372ff0f5..3b0feb0113 100644 --- a/types/bson/index.d.ts +++ b/types/bson/index.d.ts @@ -16,6 +16,14 @@ export interface DeserializeOptions { /** {Boolean, default:false}, deserialize Binary data directly into node.js Buffer object. */ promoteBuffers?: boolean; } + +export interface CalculateObjectSizeOptions { + /** {Boolean, default:false}, serialize the javascript functions */ + serializeFunctions?: boolean; + /** {Boolean, default:true}, ignore undefined fields. */ + ignoreUndefined?: boolean; +} + export class BSON { /** * @param {Object} object the Javascript object to serialize. @@ -26,6 +34,14 @@ export class BSON { */ serialize(object: any, checkKeys?: boolean, asBuffer?: boolean, serializeFunctions?: boolean): Buffer; deserialize(buffer: Buffer, options?: DeserializeOptions, isArray?: boolean): any; + /** + * Calculate the bson size for a passed in Javascript object. + * + * @param {Object} object the Javascript object to calculate the BSON byte size for. + * @param {CalculateObjectSizeOptions} Options + * @return {Number} returns the number of bytes the BSON object will take up. + */ + calculateObjectSize(object: any, options?: CalculateObjectSizeOptions): number; } export class Binary { diff --git a/types/btoa/btoa-tests.ts b/types/btoa/btoa-tests.ts new file mode 100644 index 0000000000..d09cdad23a --- /dev/null +++ b/types/btoa/btoa-tests.ts @@ -0,0 +1,3 @@ +import btoa from 'btoa'; + +btoa('foo'); diff --git a/types/btoa/index.d.ts b/types/btoa/index.d.ts new file mode 100644 index 0000000000..cc311ed836 --- /dev/null +++ b/types/btoa/index.d.ts @@ -0,0 +1,7 @@ +// Type definitions for btoa 1.2 +// Project: https://git.coolaj86.com/coolaj86/btoa.js +// Definitions by: John Wright +// Definitions: https://github.com/DefinitelyTyped/DefinitelyTyped +// TypeScript Version: 2.8 + +export default function(str: string): string; diff --git a/types/btoa/tsconfig.json b/types/btoa/tsconfig.json new file mode 100644 index 0000000000..da4e373e68 --- /dev/null +++ b/types/btoa/tsconfig.json @@ -0,0 +1,21 @@ +{ + "compilerOptions": { + "module": "commonjs", + "noImplicitAny": true, + "noImplicitThis": true, + "strictNullChecks": true, + "strictFunctionTypes": true, + "baseUrl": "../", + "typeRoots": [ + "../" + ], + "lib": ["es6"], + "types": [], + "noEmit": true, + "forceConsistentCasingInFileNames": true + }, + "files": [ + "index.d.ts", + "btoa-tests.ts" + ] +} diff --git a/types/btoa/tslint.json b/types/btoa/tslint.json new file mode 100644 index 0000000000..f93cf8562a --- /dev/null +++ b/types/btoa/tslint.json @@ -0,0 +1,3 @@ +{ + "extends": "dtslint/dt.json" +} diff --git a/types/bull/bull-tests.tsx b/types/bull/bull-tests.tsx index 765be54733..c2e0d3161f 100644 --- a/types/bull/bull-tests.tsx +++ b/types/bull/bull-tests.tsx @@ -7,7 +7,7 @@ import Queue = require("bull"); const videoQueue = new Queue('video transcoding', 'redis://127.0.0.1:6379'); const audioQueue = new Queue('audio transcoding', {redis: {port: 6379, host: '127.0.0.1'}}); // Specify Redis connection using object -const imageQueue = new Queue('image transcoding'); +const imageQueue: Queue.Queue<{ image: string }> = new Queue('image transcoding'); videoQueue.process((job, done) => { // job.data contains the custom data passed when the job was created diff --git a/types/bull/index.d.ts b/types/bull/index.d.ts index c07c938630..cdef279acb 100644 --- a/types/bull/index.d.ts +++ b/types/bull/index.d.ts @@ -6,6 +6,7 @@ // Weeco // Gabriel Terwesten // Oleg Repin +// David Koblas // Definitions: https://github.com/DefinitelyTyped/DefinitelyTyped // TypeScript Version: 2.3 @@ -42,7 +43,7 @@ declare namespace Bull { * When specified, the `Queue` will use this function to create new `ioredis` client connections. * This is useful if you want to re-use connections. */ - createClient?(type: 'client' | 'subscriber', redisOpts?: Redis.RedisOptions): Redis.Redis; + createClient?(type: 'client' | 'subscriber' | 'bclient', redisOpts?: Redis.RedisOptions): Redis.Redis; /** * Prefix to use for all redis keys @@ -87,13 +88,18 @@ declare namespace Bull { type JobId = number | string; - interface Job { + interface Job { id: JobId; /** * The custom data passed when the job was created */ - data: any; + data: T; + + /** + * How many attempts where made to run this job + */ + attemptsMade: number; /** * Report progress on a job @@ -253,7 +259,7 @@ declare namespace Bull { next: number; } - interface Queue { + interface Queue { /** * Returns a promise that resolves when Redis is connected and the queue is ready to accept jobs. * This replaces the `ready` event emitted on Queue in previous verisons. @@ -271,7 +277,7 @@ declare namespace Bull { * Errors will be passed as a second argument to the "failed" event; * results, as a second argument to the "completed" event. */ - process(callback: (job: Job, done: DoneCallback) => void): void; + process(callback: (job: Job, done: DoneCallback) => void): void; /** * Defines a processing function for the jobs placed into a given Queue. @@ -289,7 +295,7 @@ declare namespace Bull { * If the promise is rejected, the error will be passed as a second argument to the "failed" event. * If it is resolved, its value will be the "completed" event's second argument. */ - process(callback: ((job: Job) => void) | string): Promise; + process(callback: ((job: Job) => void) | string): Promise; /** * Defines a processing function for the jobs placed into a given Queue. @@ -309,7 +315,7 @@ declare namespace Bull { * * @param concurrency Bull will then call you handler in parallel respecting this max number. */ - process(concurrency: number, callback: ((job: Job) => void) | string): Promise; + process(concurrency: number, callback: ((job: Job) => void) | string): Promise; /** * Defines a processing function for the jobs placed into a given Queue. @@ -324,7 +330,7 @@ declare namespace Bull { * * @param concurrency Bull will then call you handler in parallel respecting this max number. */ - process(concurrency: number, callback: (job: Job, done: DoneCallback) => void): void; + process(concurrency: number, callback: (job: Job, done: DoneCallback) => void): void; /** * Defines a named processing function for the jobs placed into a given Queue. @@ -345,7 +351,7 @@ declare namespace Bull { * @param name Bull will only call the handler if the job name matches */ // tslint:disable-next-line:unified-signatures - process(name: string, callback: ((job: Job) => void) | string): Promise; + process(name: string, callback: ((job: Job) => void) | string): Promise; /** * Defines a processing function for the jobs placed into a given Queue. @@ -361,7 +367,7 @@ declare namespace Bull { * @param name Bull will only call the handler if the job name matches */ // tslint:disable-next-line:unified-signatures - process(name: string, callback: (job: Job, done: DoneCallback) => void): void; + process(name: string, callback: (job: Job, done: DoneCallback) => void): void; /** * Defines a named processing function for the jobs placed into a given Queue. @@ -382,7 +388,7 @@ declare namespace Bull { * @param name Bull will only call the handler if the job name matches * @param concurrency Bull will then call you handler in parallel respecting this max number. */ - process(name: string, concurrency: number, callback: ((job: Job) => void) | string): Promise; + process(name: string, concurrency: number, callback: ((job: Job) => void) | string): Promise; /** * Defines a processing function for the jobs placed into a given Queue. @@ -398,21 +404,21 @@ declare namespace Bull { * @param name Bull will only call the handler if the job name matches * @param concurrency Bull will then call you handler in parallel respecting this max number. */ - process(name: string, concurrency: number, callback: (job: Job, done: DoneCallback) => void): void; + process(name: string, concurrency: number, callback: (job: Job, done: DoneCallback) => void): void; /** * Creates a new job and adds it to the queue. * If the queue is empty the job will be executed directly, * otherwise it will be placed in the queue and executed as soon as possible. */ - add(data: any, opts?: JobOptions): Promise; + add(data: T, opts?: JobOptions): Promise>; /** * Creates a new named job and adds it to the queue. * If the queue is empty the job will be executed directly, * otherwise it will be placed in the queue and executed as soon as possible. */ - add(name: string, data: any, opts?: JobOptions): Promise; + add(name: string, data: T, opts?: JobOptions): Promise>; /** * Returns a promise that resolves when the queue is paused. @@ -461,32 +467,32 @@ declare namespace Bull { * Returns a promise that will return the job instance associated with the jobId parameter. * If the specified job cannot be located, the promise callback parameter will be set to null. */ - getJob(jobId: JobId): Promise; + getJob(jobId: JobId): Promise>; /** * Returns a promise that will return an array with the waiting jobs between start and end. */ - getWaiting(start?: number, end?: number): Promise; + getWaiting(start?: number, end?: number): Promise>>; /** * Returns a promise that will return an array with the active jobs between start and end. */ - getActive(start?: number, end?: number): Promise; + getActive(start?: number, end?: number): Promise>>; /** * Returns a promise that will return an array with the delayed jobs between start and end. */ - getDelayed(start?: number, end?: number): Promise; + getDelayed(start?: number, end?: number): Promise>>; /** * Returns a promise that will return an array with the completed jobs between start and end. */ - getCompleted(start?: number, end?: number): Promise; + getCompleted(start?: number, end?: number): Promise>>; /** * Returns a promise that will return an array with the failed jobs between start and end. */ - getFailed(start?: number, end?: number): Promise; + getFailed(start?: number, end?: number): Promise>>; /** * Returns JobInformation of repeatable jobs (ordered descending). Provide a start and/or an end @@ -497,7 +503,7 @@ declare namespace Bull { /** * ??? */ - nextRepeatableJob(name: string, data: any, opts: JobOptions): Promise; + nextRepeatableJob(name: string, data: any, opts: JobOptions): Promise>; /** * Removes a given repeatable job. The RepeatOptions and JobId needs to be the same as the ones @@ -560,7 +566,7 @@ declare namespace Bull { * @param status Status of the job to clean. Values are completed, wait, active, delayed, and failed. Defaults to completed. * @param limit Maximum amount of jobs to clean per call. If not provided will clean all matching jobs. */ - clean(grace: number, status?: JobStatus, limit?: number): Promise; + clean(grace: number, status?: JobStatus, limit?: number): Promise>>; /** * Listens to queue events @@ -575,28 +581,28 @@ declare namespace Bull { /** * A job has started. You can use `jobPromise.cancel()` to abort it */ - on(event: 'active', callback: ActiveEventCallback): this; + on(event: 'active', callback: ActiveEventCallback): this; /** * A job has been marked as stalled. * This is useful for debugging job workers that crash or pause the event loop. */ - on(event: 'stalled', callback: StalledEventCallback): this; + on(event: 'stalled', callback: StalledEventCallback): this; /** * A job's progress was updated */ - on(event: 'progress', callback: ProgressEventCallback): this; + on(event: 'progress', callback: ProgressEventCallback): this; /** * A job successfully completed with a `result` */ - on(event: 'completed', callback: CompletedEventCallback): this; + on(event: 'completed', callback: CompletedEventCallback): this; /** * A job failed with `err` as the reason */ - on(event: 'failed', callback: FailedEventCallback): this; + on(event: 'failed', callback: FailedEventCallback): this; /** * The queue has been paused @@ -614,7 +620,7 @@ declare namespace Bull { * * @see Queue#clean() for details */ - on(event: 'cleaned', callback: CleanedEventCallback): this; + on(event: 'cleaned', callback: CleanedEventCallback): this; } type EventCallback = () => void; @@ -628,17 +634,17 @@ declare namespace Bull { cancel(): void; } - type ActiveEventCallback = (job: Job, jobPromise?: JobPromise) => void; + type ActiveEventCallback = (job: Job, jobPromise?: JobPromise) => void; - type StalledEventCallback = (job: Job) => void; + type StalledEventCallback = (job: Job) => void; - type ProgressEventCallback = (job: Job, progress: any) => void; + type ProgressEventCallback = (job: Job, progress: any) => void; - type CompletedEventCallback = (job: Job, result: any) => void; + type CompletedEventCallback = (job: Job, result: any) => void; - type FailedEventCallback = (job: Job, error: Error) => void; + type FailedEventCallback = (job: Job, error: Error) => void; - type CleanedEventCallback = (jobs: Job[], status: JobStatus) => void; + type CleanedEventCallback = (jobs: Array>, status: JobStatus) => void; } export = Bull; diff --git a/types/c3/c3-tests.ts b/types/c3/c3-tests.ts index 7ac2f0ccd8..f2e630cd09 100644 --- a/types/c3/c3-tests.ts +++ b/types/c3/c3-tests.ts @@ -1798,6 +1798,26 @@ function legend_custom() { }); } +function legend_tiles() { + const chart = c3.generate({ + data: { + columns: [ + ["sample", 30, 200, 100, 400, 150, 250] + ] + }, + legend: { + // amount of padding to put between each legend element + padding: 5, + // define custom height and width for the legend item tile + item: { + tile: { + width: 15, + height: 2 + } + } + }}); +} + ///////////////////// // Tooltip Tests ///////////////////// diff --git a/types/c3/index.d.ts b/types/c3/index.d.ts index 28f301237c..6c466458e3 100644 --- a/types/c3/index.d.ts +++ b/types/c3/index.d.ts @@ -1,11 +1,12 @@ -// Type definitions for C3js 0.4 +// Type definitions for C3js 0.6 // Project: http://c3js.org/ // Definitions by: Marc Climent // Gerin Jacob // Bernd Hacker // Dzmitry Shyndzin +// Tim Niemueller // Definitions: https://github.com/DefinitelyTyped/DefinitelyTyped -// TypeScript Version: 2.1 +// TypeScript Version: 2.3 import * as d3 from "d3"; @@ -28,7 +29,7 @@ export interface ChartConfiguration { * Note: When chart is not binded, c3 starts observing if chart.element is binded by MutationObserver. In this case, polyfill is required in IE9 and IE10 becuase they do not support * MutationObserver. On the other hand, if chart always will be binded, polyfill will not be required because MutationObserver will never be called. */ - bindto?: string | HTMLElement | d3.Selection | null; + bindto?: string | HTMLElement | d3.Selection | null; size?: { /** * The desired width of the chart element. @@ -172,16 +173,18 @@ export interface ChartConfiguration { /** * Change the width of bar chart. If ratio is specified, change the width of bar chart by ratio. */ - width?: number | { - /** - * Set the width of each bar by ratio - */ - ratio: number, - /** - * Set max width of each bar - */ - max?: number - }; + width?: + | number + | { + /** + * Set the width of each bar by ratio + */ + ratio: number; + /** + * Set max width of each bar + */ + max?: number; + }; /** * Set if min or max value will be 0 on bar chart. */ @@ -205,7 +208,7 @@ export interface ChartConfiguration { /** * Set threshold to show/hide labels. */ - threshold?: number + threshold?: number; }; /** * Enable or disable expanding pie pieces. @@ -226,7 +229,7 @@ export interface ChartConfiguration { /** * Set threshold to show/hide labels. */ - threshold?: number + threshold?: number; }; /** * Enable or disable expanding pie pieces. @@ -280,7 +283,17 @@ export interface ChartConfiguration { /** * Set custom spline interpolation */ - type?: 'linear' | 'linear-closed' | 'basis' | 'basis-open' | 'basis-closed' | 'bundle' | 'cardinal' | 'cardinal-open' | 'cardinal-closed' | 'monotone'; + type?: + | "linear" + | "linear-closed" + | "basis" + | "basis-open" + | "basis-closed" + | "bundle" + | "cardinal" + | "cardinal-open" + | "cardinal-closed" + | "monotone"; }; }; } @@ -309,7 +322,7 @@ export interface Data { /** * Choose which JSON object keys correspond to desired data. */ - keys?: { x?: string; value: string[]; }; + keys?: { x?: string; value: string[] }; /** * Specify the key of x values in the data. * We can show the data with non-index x values by this option. This option is required when the type of x axis is timeseries. If this option is set on category axis, the values of the data @@ -365,9 +378,7 @@ export interface Data { * - j is the sub index of the data point where the label is shown. * Formatter function can be defined for each data by specifying as an object and D3 formatter function can be set (e.g. d3.format('$')) */ - labels?: boolean | - { format: FormatFunction } | - { format: { [key: string]: FormatFunction } }; + labels?: boolean | { format: FormatFunction } | { format: { [key: string]: FormatFunction } }; /** * Define the order of the data. * This option changes the order of stacking the data and pieces of pie/donut. If null specified, it will be the order the data loaded. If function specified, it will be used to sort the data @@ -387,11 +398,11 @@ export interface Data { * This option should a function and the specified function receives color (e.g. '#ff0000') and d that has data parameters like id, value, index, etc. And it must return a string that * represents color (e.g. '#00ff00'). */ - color?(color: string, d: any): string | d3.Rgb; + color?(color: string, d: any): string | d3.RGBColor; /** * Set color for each data. */ - colors?: { [key: string]: string | d3.Rgb | ((d: any) => string | d3.Rgb) }; + colors?: { [key: string]: string | d3.RGBColor | ((d: any) => string | d3.RGBColor) }; /** * Hide each data when the chart appears. * If true specified, all of data will be hidden. If multiple ids specified as an array, those will be hidden. @@ -690,6 +701,10 @@ export interface LegendOptions { y?: number; step?: number; }; + /** + * Padding between legend elements. + */ + padding?: number; item?: { /** @@ -704,6 +719,19 @@ export interface LegendOptions { * Set mouseout event handler to the legend item. */ onmouseout?(id: any): void; + /** + * Tile settings for legend color display. + */ + tile?: { + /** + * Tile width. + */ + width?: number; + /** + * Tile height + */ + height?: number; + } }; } @@ -813,7 +841,7 @@ export interface PointOptions { /** * The radius size of each point on focus. */ - r?: number + r?: number; }; }; @@ -877,7 +905,7 @@ export interface ChartAPI { load(args: { url?: string; json?: {}; - keys?: { x?: string; value: string[]; } + keys?: { x?: string; value: string[] }; rows?: PrimitiveArray[]; columns?: PrimitiveArray[]; xs?: { [key: string]: string }; @@ -885,7 +913,7 @@ export interface ChartAPI { classes?: { [key: string]: string }; categories?: string[]; axes?: { [key: string]: string }; - colors?: { [key: string]: string | d3.Rgb }; + colors?: { [key: string]: string | d3.RGBColor }; type?: string; types?: { [key: string]: string }; unload?: boolean | ArrayOrString; @@ -911,7 +939,7 @@ export interface ChartAPI { */ flow(args: { json?: {}; - keys?: { x?: string; value: string[]; } + keys?: { x?: string; value: string[] }; rows?: PrimitiveArray[]; columns?: PrimitiveArray[]; to?: any; @@ -997,7 +1025,7 @@ export interface ChartAPI { * Get and set colors of the data loaded in the chart. * @param colors If this argument is given, the colors of data will be updated. If not given, the current colors will be returned. The format of this argument is the same as data.colors. */ - colors(colors?: { [key: string]: string | d3.Rgb }): { [key: string]: string }; + colors(colors?: { [key: string]: string | d3.RGBColor }): { [key: string]: string }; /** * Get and set axes of the data loaded in the chart. * @param axes If this argument is given, the axes of data will be updated. If not given, the current axes will be returned. The format of this argument is the same as data.axes. @@ -1040,22 +1068,25 @@ export interface ChartAPI { * Get and set axis labels. * @param labels If labels is given, specified axis' label will be updated. */ - labels(labels?: { [key: string]: string }): { [key: string]: string } + labels(labels?: { [key: string]: string }): { [key: string]: string }; /** * Get and set axis min value. * @param min If min is given, specified axis' min value will be updated. If no argument is given, the current min values for each axis will be returned. */ - min(min?: number | { [key: string]: number }): number | { [key: string]: number } + min(min?: number | { [key: string]: number }): number | { [key: string]: number }; /** * Get and set axis max value. * @param max If max is given, specified axis' max value will be updated. If no argument is given, the current max values for each axis will be returned. */ - max(max?: number | { [key: string]: number }): number | { [key: string]: number } + max(max?: number | { [key: string]: number }): number | { [key: string]: number }; /** * Get and set axis min and max value. * @param range If range is given, specified axis' min and max value will be updated. If no argument is given, the current min and max values for each axis will be returned. */ - range(range?: { min?: number | { [key: string]: number }; max?: number | { [key: string]: number } }): { min: number | { [key: string]: number }; max: number | { [key: string]: number } } + range(range?: { + min?: number | { [key: string]: number }; + max?: number | { [key: string]: number }; + }): { min: number | { [key: string]: number }; max: number | { [key: string]: number } }; }; legend: { diff --git a/types/c3/tsconfig.json b/types/c3/tsconfig.json index fe3b00c503..aa923e91c0 100644 --- a/types/c3/tsconfig.json +++ b/types/c3/tsconfig.json @@ -1,29 +1,20 @@ { "compilerOptions": { "module": "commonjs", - "lib": [ - "es6", - "dom" - ], + "lib": ["es6", "dom"], "noImplicitAny": true, "noImplicitThis": true, "strictNullChecks": true, "strictFunctionTypes": false, "baseUrl": "../", - "typeRoots": [ - "../" - ], + "typeRoots": ["../"], "types": [], "paths": { - "d3": [ - "d3/v3" - ] + "d3-scale": ["d3-scale/v1"], + "d3": ["d3/v4"] }, "noEmit": true, "forceConsistentCasingInFileNames": true }, - "files": [ - "index.d.ts", - "c3-tests.ts" - ] -} \ No newline at end of file + "files": ["index.d.ts", "c3-tests.ts"] +} diff --git a/types/cassandra-driver/index.d.ts b/types/cassandra-driver/index.d.ts index 5c0578ccf2..33a9f5988f 100644 --- a/types/cassandra-driver/index.d.ts +++ b/types/cassandra-driver/index.d.ts @@ -1,6 +1,7 @@ -// Type definitions for cassandra-driver v3.2.2 +// Type definitions for cassandra-driver v3.4.1 // Project: https://github.com/datastax/nodejs-driver // Definitions by: Marc Fisher +// Christian D // Definitions: https://github.com/DefinitelyTyped/DefinitelyTyped // TypeScript Version: 2.2 @@ -115,7 +116,11 @@ export namespace policies { interface RetryPolicyStatic { new (): RetryPolicy; - retryDecision: any; + retryDecision: { + rethrow: number, + retry: number, + ignore: number + }; } interface RetryPolicy { @@ -126,15 +131,55 @@ export namespace policies { retryResult(): { decision: retryDecision, consistency: types.consistencies, useCurrentHost: boolean }; } } + + namespace speculativeExecution { + let NoSpeculativeExecutionPolicy: NoSpeculativeExecutionPolicyStatic + + interface SpeculativeExecutionPolicy { + init(client: Client): void; + newPlan(keyspace: string, queryInfo: string | Array): { + nextExecution: Function + } + } + + interface NoSpeculativeExecutionPolicyStatic { + new (): NoSpeculativeExecutionPolicy + } + + interface NoSpeculativeExecutionPolicy extends SpeculativeExecutionPolicy { } + + interface ConstantSpeculativeExecutionPolicyStatic { + new (delay: number, maxSpeculativeExecutions: number): ConstantSpeculativeExecutionPolicy + } + + interface ConstantSpeculativeExecutionPolicy extends SpeculativeExecutionPolicy { } + } + + namespace timestampGeneration { + let MonotonicTimestampGenerator: MonotonicTimestampGeneratorStatic + + interface TimestampGenerator { + next(client: Client): null | number | _Long + } + + interface MonotonicTimestampGeneratorStatic { + new (warningThreshold?: number, minLogInterval?: number): MonotonicTimestampGeneratorStatic + } + + interface MonotonicTimestampGenerator extends TimestampGenerator { + getDate(): number + } + } } export namespace types { let BigDecimal: BigDecimalStatic; + let Duration: DurationStatic; + let Long: _Long; let InetAddress: InetAddressStatic; let Integer: IntegerStatic; let LocalDate: LocalDateStatic; let LocalTime: LocalTimeStatic; - let Long: _Long; let ResultSet: ResultSetStatic; // let ResultStream: ResultStreamStatic; let Row: RowStatic; @@ -221,6 +266,19 @@ export namespace types { toJSON(): string; } + interface DurationStatic { + new (month: number, days: number, nanoseconds: number | _Long): Duration; + + fromBuffer(buffer: Buffer): Duration; + fromString(input: string): Duration; + } + + interface Duration { + equals(other: Duration): boolean; + toBuffer(): Buffer; + toString(): string; + } + interface InetAddressStatic { new (buffer: Buffer): InetAddress; @@ -336,13 +394,14 @@ export namespace types { } interface ResultSetStatic { - new (response: any, host: string, triedHost: { [key: string]: any }, consistency: consistencies): ResultSet; + new (response: any, host: string, triedHost: { [key: string]: any }, speculativeExecutions: number, consistency: consistencies): ResultSet; } interface ResultSet { info: { queriedHost: Host, triedHosts: { [key: string]: string; }, + speculativeExecutions: number, achievedConsistency: consistencies, traceId: Uuid, warnings: Array, @@ -352,11 +411,13 @@ export namespace types { rowLength: number; columns: Array<{ [key: string]: string; }>; pageState: string; - nextPage: any; // function + nextPage: Function; first(): Row; getPageState(): string; getColumns(): Array<{ [key: string]: string; }>; + wasApplied(): boolean; + [Symbol.iterator](): Iterator; } interface ResultStreamStatic { @@ -442,40 +503,50 @@ export let Encoder: EncoderStatic; export interface ClientOptions { contactPoints: Array, keyspace?: string, + refreshSchemaDelay?: number, + isMetadataSyncEnabled?: boolean, + prepareOnAllHosts?: boolean, + rePrepareOnUp?: boolean, + maxPrepared?: number, policies?: { - addressResolution?: policies.addressResolution.AddressTranslator, loadBalancing?: policies.loadBalancing.LoadBalancingPolicy, + retry?: policies.retry.RetryPolicy, reconnection?: policies.reconnection.ReconnectionPolicy, - retry?: policies.retry.RetryPolicy + addressResolution?: policies.addressResolution.AddressTranslator, + speculativeExecution?: policies.speculativeExecution.SpeculativeExecutionPolicy, + timestampGeneration?: policies.timestampGeneration.TimestampGenerator, }, queryOptions?: QueryOptions, pooling?: { - heartBeatInterval: number, - coreConnectionsPerHost: { [key: number]: number; }, - warmup: boolean; + heartBeatInterval?: number, + coreConnectionsPerHost?: { [key: number]: number; }, + maxRequestsPerConnection?: number, + warmup?: boolean; }, protocolOptions?: { - port: number, - maxSchemaAgreementWaitSeconds: number, - maxVersion: number + port?: number, + maxSchemaAgreementWaitSeconds?: number, + maxVersion?: number }, socketOptions?: { - connectTimeout: number, - defunctReadTimeoutThreshold: number, - keepAlive: boolean, - keepAliveDelay: number, - readTimeout: number, - tcpNoDelay: boolean, - coalescingThreshold: number + connectTimeout?: number, + defunctReadTimeoutThreshold?: number, + keepAlive?: boolean, + keepAliveDelay?: number, + readTimeout?: number, + tcpNoDelay?: boolean, + coalescingThreshold?: number }, authProvider?: auth.AuthProvider, sslOptions?: tls.ConnectionOptions, encoding?: { - map: Function, - set: Function, - copyBuffer: boolean, - useUndefinedAsUnset: boolean - } + map?: Function, + set?: Function, + copyBuffer?: boolean, + useUndefinedAsUnset?: boolean + }, + profiles?: Array, + promiseFactory?: Function, } export interface QueryOptions { @@ -483,8 +554,11 @@ export interface QueryOptions { captureStackTrace?: boolean; consistency?: number; customPayload?: any; + executionProfile?: string | ExecutionProfile; fetchSize?: number; hints?: Array | Array>; + isIdempotent?: boolean; + keyspace?: string; logged?: boolean; pageState?: Buffer | string; prepare?: boolean; @@ -520,6 +594,7 @@ export interface Client extends events.EventEmitter { execute(query: string, callback: ResultCallback): void; execute(query: string, params?: any, options?: QueryOptions): Promise; getReplicas(keyspace: string, token: Buffer): Array; // TODO: Should this be a more explicit return? + getState(): metadata.ClientState; shutdown(callback?: Callback): void; shutdown(): Promise; stream(query: string, params?: any, options?: QueryOptions, callback?: Callback): NodeJS.ReadableStream; @@ -548,6 +623,7 @@ export interface HostMapStatic { export interface HostMap extends events.EventEmitter { length: number; + clear(): Array; forEach(callback: Callback): void; get(key: string): Host; keys(): Array; @@ -566,6 +642,22 @@ export interface Encoder { encode(value: any, typeInfo?: string | number | { code: number, info?: any }): Buffer; } +interface ExecutionProfileOptions { + consistency: number, + loadBalancing: policies.loadBalancing.LoadBalancingPolicy, + name: string, + readTimeout: number, + retry: policies.retry.RetryPolicy, + serialConsistency: number +} + +export interface ExecutionProfileStatic { + new (name: string, options: ExecutionProfileOptions): ExecutionProfile +} + +export interface ExecutionProfile extends ExecutionProfileOptions { +} + export namespace auth { let Authenticator: AuthenticatorStatic; let PlainTextAuthProvider: PlainTextAuthProviderStatic; @@ -649,6 +741,17 @@ export namespace metadata { stateFunction: string; stateType: string; } + + interface ClientStateStatic { + new (): ClientState; + } + + interface ClientState { + getConnectedHosts(): Array; + getInFlightQueries(host: Host): number; + getOpenConnections(host: Host): number; + toString(): string; + } interface DataTypeInfo { code: number, diff --git a/types/catalog/catalog-tests.tsx b/types/catalog/catalog-tests.tsx deleted file mode 100644 index 37a87540d1..0000000000 --- a/types/catalog/catalog-tests.tsx +++ /dev/null @@ -1,42 +0,0 @@ -import * as React from "react"; -import { Config, render, markdown, Catalog, ReactSpecimen, Page } from "catalog"; - -const config: Config = { - title: 'Test', - pages: [ - { - path: '/', - title: 'Introduction', - content: '/patd/to/file.md', - }, - { - path: '/materials', - title: 'Materials', - pages: [ - { - path: '/materials/typeface', - title: 'Typeface', - component: , - }, - ], - }, - ], - useBrowserHistory: true, - basePath: '/doc', - responsiveSizes: [ - { name: 'large', width: 978, height: 1100 }, - { name: 'medium', width: 640, height: 900 }, - { name: 'small', width: 471, height: 700 }, - ], -}; - -render(config, document.body); -; - -markdown` -# Test - -${ -
-} -`; diff --git a/types/catalog/index.d.ts b/types/catalog/index.d.ts deleted file mode 100644 index 3476e86641..0000000000 --- a/types/catalog/index.d.ts +++ /dev/null @@ -1,109 +0,0 @@ -// Type definitions for catalog 3.2 -// Project: https://github.com/interactivethings/catalog/ -// Definitions by: Peter Gassner , Tomas Carnecky -// Definitions: https://github.com/interactivethings/catalog/ -// TypeScript Version: 2.6 - -import * as React from "react"; - -// Configuration - -// XXX: Can not name this 'Page' because there's already a 'Page' -// component here. -export interface ConfigPage { - path: string; - title: string; - - content?: any; - component?: any; - pages?: ConfigPage[]; -} - -export interface ConfigResponsiveSize { - name: string; - width: number; - height: number; -} - -export interface Config { - title: string; - pages: ConfigPage[]; - - useBrowserHistory?: boolean; - basePath?: string; - responsiveSizes?: ConfigResponsiveSize[]; -} - -export function render(config: Config, element: HTMLElement): void; -export function configure(config: any): any; -export function configureRoutes(config: any): any; -export function configureJSXRoutes(config: any): any; - -export function pageLoader(f: () => Promise): any; -export function markdown(...x: any[]): JSX.Element; - -// Components -export interface DefaultCatalogProps extends React.Props<{}> { - span?: number; - theme?: any; -} - -export class Card extends React.Component {} -export class Page extends React.Component {} -export interface SpanProps extends DefaultCatalogProps { - style?: any; -} -export class Span extends React.Component {} - -// Specimens -export class AudioSpecimen extends React.Component {} - -export interface CodeSpecimenProps extends DefaultCatalogProps { - rawBody: string; - collapsed: boolean; - lang: string; - raw: boolean; -} -export class CodeSpecimen extends React.Component {} - -export interface ColorSpecimenProps extends DefaultCatalogProps { - value: string; - name: string; -} -export class ColorSpecimen extends React.Component {} - -export interface ColorPaletteSpecimenProps extends DefaultCatalogProps { - colors: Array<{name?: string, value: string}>; - horizontal?: boolean; -} -export class ColorPaletteSpecimen extends React.Component {} - -export class HtmlSpecimen extends React.Component {} -export class HintSpecimen extends React.Component {} -export class ImageSpecimen extends React.Component {} - -export interface TypeSpecimenProps extends DefaultCatalogProps { - color?: string; - font: string; - headings: string[] | number[]; - style?: string; - weight: string; -} -export class TypeSpecimen extends React.Component {} -export class DownloadSpecimen extends React.Component {} - -export interface ReactSpecimenProps extends DefaultCatalogProps { - noSource?: boolean; - plain?: boolean; - light?: boolean; - dark?: boolean; - frame?: boolean; - state?: any; - responsive?: boolean | string | string[]; - sourceText?: string; -} -export class ReactSpecimen extends React.Component {} - -export class VideoSpecimen extends React.Component {} - -export class Catalog extends React.Component {} diff --git a/types/catalog/tslint.json b/types/catalog/tslint.json deleted file mode 100644 index b4b47a0378..0000000000 --- a/types/catalog/tslint.json +++ /dev/null @@ -1,3 +0,0 @@ -{ - "extends": "dtslint/dt.json" -} diff --git a/types/cesium/index.d.ts b/types/cesium/index.d.ts new file mode 100644 index 0000000000..21b80f7d05 --- /dev/null +++ b/types/cesium/index.d.ts @@ -0,0 +1,5118 @@ +// Type definitions for cesium 1.44 +// Project: http://cesiumjs.org +// Definitions by: Aigars Zeiza +// Harry Nicholls +// Jared Szechy +// Definitions: https://github.com/DefinitelyTyped/DefinitelyTyped +// TypeScript Version: 2.3 + +// tslint:disable-next-line:export-just-namespace +export = Cesium; +export as namespace Cesium; + +declare namespace Cesium { + type RenderState = any; + + interface Proxy { + getURL(resource: string): string; + } + + class ArcGisImageServerTerrainProvider extends TerrainProvider { + constructor(options: { url: string; token?: string; proxy?: any; tilingScheme?: TilingScheme; ellipsoid?: Ellipsoid; credit?: Credit | string }); + } + + class AssociativeArray { + length: number; + values: any[]; + contains(key: string | number): boolean; + set(key: string | number, value: any): void; + get(key: string | number): any; + remove(key: string | number): boolean; + removeAll(): void; + } + + class AxisAlignedBoundingBox { + minimum: Cartesian3; + maximum: Cartesian3; + center: Cartesian3; + constructor(minimum?: Cartesian3, maximum?: Cartesian3, center?: Cartesian3); + clone(result?: AxisAlignedBoundingBox): AxisAlignedBoundingBox; + intersect(plane: Cartesian4): Intersect; + equals(right?: AxisAlignedBoundingBox): boolean; + static fromPoints(positions: Cartesian3[], result?: AxisAlignedBoundingBox): AxisAlignedBoundingBox; + static clone(box: AxisAlignedBoundingBox, result?: AxisAlignedBoundingBox): AxisAlignedBoundingBox; + static equals(left?: AxisAlignedBoundingBox, right?: AxisAlignedBoundingBox): boolean; + static intersect(box: AxisAlignedBoundingBox, plane: Cartesian4): Intersect; + } + + class BoundingRectangle { + x: number; + y: number; + width: number; + height: number; + constructor(x?: number, y?: number, width?: number, height?: number); + clone(result?: BoundingRectangle): BoundingRectangle; + intersect(right: BoundingRectangle): Intersect; + equals(right?: BoundingRectangle): boolean; + static fromPoints(positions: Cartesian2[], result?: BoundingRectangle): BoundingRectangle; + static fromRectangle(rectangle: Rectangle, projection?: any, result?: BoundingRectangle): BoundingRectangle; + static clone(rectangle: BoundingRectangle, result?: BoundingRectangle): BoundingRectangle; + static union(left: BoundingRectangle, right: BoundingRectangle, result?: BoundingRectangle): BoundingRectangle; + static expand(rectangle: BoundingRectangle, point: Cartesian2, result?: BoundingRectangle): BoundingRectangle; + static intersect(left: BoundingRectangle, right: BoundingRectangle): Intersect; + static equals(left?: BoundingRectangle, right?: BoundingRectangle): boolean; + } + + class BoundingSphere extends Packable { + center: Cartesian3; + radius: number; + constructor(center?: Cartesian3, radius?: number); + intersect(plane: Cartesian4): Intersect; + equals(right?: BoundingSphere): boolean; + clone(result?: BoundingSphere): BoundingSphere; + static fromPoints(positions: Cartesian3[], result?: BoundingSphere): BoundingSphere; + static fromRectangle2D(rectangle: Rectangle, projection?: any, result?: BoundingSphere): BoundingSphere; + static fromRectangleWithHeights2D(rectangle: Rectangle, projection?: any, minimumHeight?: number, maximumHeight?: number, result?: BoundingSphere): BoundingSphere; + static fromRectangle3D(rectangle: Rectangle, ellipsoid?: Ellipsoid, surfaceHeight?: number, result?: BoundingSphere): BoundingSphere; + static fromVertices(positions: Cartesian3[], center?: Cartesian3, stride?: number, result?: BoundingSphere): BoundingSphere; + static fromCornerPoints(corner?: number, oppositeCorner?: number, result?: BoundingSphere): BoundingSphere; + static fromEllipsoid(ellipsoid: Ellipsoid, result?: BoundingSphere): BoundingSphere; + static fromBoundingSpheres(boundingSpheres: BoundingSphere[], result?: BoundingSphere): BoundingSphere; + static clone(sphere: BoundingSphere, result?: BoundingSphere): BoundingSphere; + static pack(value: BoundingSphere, array: number[], startingIndex?: number): number[]; + static unpack(array: number[], startingIndex?: number, result?: BoundingSphere): BoundingSphere; + static union(left: BoundingSphere, right: BoundingSphere, result?: BoundingSphere): BoundingSphere; + static expand(sphere: BoundingSphere, point: Cartesian3, result?: BoundingSphere): BoundingSphere; + static intersect(sphere: BoundingSphere, plane: Cartesian4): Intersect; + static transform(sphere: BoundingSphere, transform: Matrix4, result?: BoundingSphere): BoundingSphere; + static distanceSquaredTo(sphere: BoundingSphere, cartesian: Cartesian3): number; + static transformWithoutScale(sphere: BoundingSphere, transform: Matrix4, result?: BoundingSphere): BoundingSphere; + static computePlaneDistances(sphere: BoundingSphere, position: Cartesian3, direction: Cartesian3, result?: Cartesian2): Interval; + static projectTo2D(sphere: BoundingSphere, projection?: any, result?: BoundingSphere): BoundingSphere; + static equals(left?: BoundingSphere, right?: BoundingSphere): boolean; + } + + class BoxGeometry extends Packable { + constructor(options: { minimumCorner: Cartesian3; maximumCorner: Cartesian3; vertexFormat?: VertexFormat }); + static fromDimensions(): void; + static unpack(array: number[], startingIndex?: number, result?: BoxGeometry): BoxGeometry; + static createGeometry(boxGeometry: BoxGeometry): Geometry; + } + + class BoxOutlineGeometry extends Packable { + constructor(); + static fromDimensions(): void; + static unpack(array: number[], startingIndex?: number, result?: BoxOutlineGeometry): BoxOutlineGeometry; + static createGeometry(boxGeometry: BoxOutlineGeometry): Geometry; + } + + class Cartesian2 extends Packable { + x: number; + y: number; + static ZERO: Cartesian2; + static UNIT_X: Cartesian2; + static UNIT_Y: Cartesian2; + constructor(x?: number, y?: number); + clone(result?: Cartesian2): Cartesian2; + equals(right?: Cartesian2): boolean; + equalsEpsilon(right: Cartesian2, relativeEpsilon: number, absoluteEpsilon?: number): boolean; + toString(): string; + static fromElements(x: number, y: number, result?: Cartesian2): Cartesian2; + static clone(cartesian: Cartesian2, result?: Cartesian2): Cartesian2; + static fromCartesian3(cartesian: Cartesian3, result?: Cartesian2): Cartesian2; + static fromCartesian4(cartesian: Cartesian4, result?: Cartesian2): Cartesian2; + static pack(value: Cartesian2, array: number[], startingIndex?: number): number[]; + static unpack(array: number[], startingIndex?: number, result?: Cartesian2): Cartesian2; + static fromArray(array: number[], startingIndex?: number, result?: Cartesian2): Cartesian2; + static maximumComponent(cartesian: Cartesian2): number; + static minimumComponent(cartesian: Cartesian2): number; + static minimumByComponent(first: Cartesian2, second: Cartesian2, result: Cartesian2): Cartesian2; + static maximumByComponent(first: Cartesian2, second: Cartesian2, result: Cartesian2): Cartesian2; + static magnitudeSquared(cartesian: Cartesian2): number; + static magnitude(cartesian: Cartesian2): number; + static distance(left: Cartesian2, right: Cartesian2): number; + static distanceSquared(left: Cartesian2, right: Cartesian2): number; + static normalize(cartesian: Cartesian2, result: Cartesian2): Cartesian2; + static dot(left: Cartesian2, right: Cartesian2): number; + static multiplyComponents(left: Cartesian2, right: Cartesian2, result: Cartesian2): Cartesian2; + static add(left: Cartesian2, right: Cartesian2, result: Cartesian2): Cartesian2; + static subtract(left: Cartesian2, right: Cartesian2, result: Cartesian2): Cartesian2; + static multiplyByScalar(cartesian: Cartesian2, scalar: number, result: Cartesian2): Cartesian2; + static divideByScalar(cartesian: Cartesian2, scalar: number, result: Cartesian2): Cartesian2; + static negate(cartesian: Cartesian2, result: Cartesian2): Cartesian2; + static abs(cartesian: Cartesian2, result: Cartesian2): Cartesian2; + static lerp(start: Cartesian2, end: Cartesian2, t: number, result: Cartesian2): Cartesian2; + static angleBetween(left: Cartesian2, right: Cartesian2): number; + static mostOrthogonalAxis(cartesian: Cartesian2, result: Cartesian2): Cartesian2; + static equals(left?: Cartesian2, right?: Cartesian2): boolean; + static equalsEpsilon(left: Cartesian2, right: Cartesian2, relativeEpsilon: number, absoluteEpsilon?: number): boolean; + } + + class Cartesian3 extends Packable implements PositionProperty { + x: number; + y: number; + z: number; + static ZERO: Cartesian3; + static UNIT_X: Cartesian3; + static UNIT_Y: Cartesian3; + static UNIT_Z: Cartesian3; + constructor(x?: number, y?: number, z?: number); + clone(result?: Cartesian3): Cartesian3; + equals(right?: Cartesian3): boolean; + equalsEpsilon(right: Cartesian3, relativeEpsilon: number, absoluteEpsilon?: number): boolean; + toString(): string; + static fromSpherical(spherical: Spherical, result?: Cartesian3): Cartesian3; + static fromElements(x: number, y: number, z: number, result?: Cartesian3): Cartesian3; + static clone(cartesian: Cartesian3, result?: Cartesian3): Cartesian3; + static fromCartesian4(cartesian: Cartesian4, result?: Cartesian3): Cartesian3; + static pack(value: Cartesian3, array: number[], startingIndex?: number): number[]; + static unpack(array: number[], startingIndex?: number, result?: Cartesian3): Cartesian3; + static fromArray(array: number[], startingIndex?: number, result?: Cartesian3): Cartesian3; + static maximumComponent(cartesian: Cartesian3): number; + static minimumComponent(cartesian: Cartesian3): number; + static minimumByComponent(first: Cartesian3, second: Cartesian3, result: Cartesian3): Cartesian3; + static maximumByComponent(first: Cartesian3, second: Cartesian3, result: Cartesian3): Cartesian3; + static magnitudeSquared(cartesian: Cartesian3): number; + static magnitude(cartesian: Cartesian3): number; + static distance(left: Cartesian3, right: Cartesian3): number; + static distanceSquared(left: Cartesian3, right: Cartesian3): number; + static normalize(cartesian: Cartesian3, result: Cartesian3): Cartesian3; + static dot(left: Cartesian3, right: Cartesian3): number; + static multiplyComponents(left: Cartesian3, right: Cartesian3, result: Cartesian3): Cartesian3; + static add(left: Cartesian3, right: Cartesian3, result: Cartesian3): Cartesian3; + static subtract(left: Cartesian3, right: Cartesian3, result: Cartesian3): Cartesian3; + static multiplyByScalar(cartesian: Cartesian3, scalar: number, result: Cartesian3): Cartesian3; + static divideByScalar(cartesian: Cartesian3, scalar: number, result: Cartesian3): Cartesian3; + static negate(cartesian: Cartesian3, result: Cartesian3): Cartesian3; + static abs(cartesian: Cartesian3, result: Cartesian3): Cartesian3; + static lerp(start: Cartesian3, end: Cartesian3, t: number, result: Cartesian3): Cartesian3; + static angleBetween(left: Cartesian3, right: Cartesian3): number; + static mostOrthogonalAxis(cartesian: Cartesian3, result: Cartesian3): Cartesian3; + static equals(left?: Cartesian3, right?: Cartesian3): boolean; + static equalsEpsilon(left: Cartesian3, right: Cartesian3, relativeEpsilon: number, absoluteEpsilon?: number): boolean; + static cross(left: Cartesian3, right: Cartesian3, result: Cartesian3): Cartesian3; + static fromDegrees(longitude: number, latitude: number, height?: number, ellipsoid?: Ellipsoid, result?: Cartesian3): Cartesian3; + static fromRadians(longitude: number, latitude: number, height?: number, ellipsoid?: Ellipsoid, result?: Cartesian3): Cartesian3; + static fromDegreesArray(coordinates: number[], ellipsoid?: Ellipsoid, result?: Cartesian3[]): Cartesian3[]; + static fromRadiansArray(coordinates: number[], ellipsoid?: Ellipsoid, result?: Cartesian3[]): Cartesian3[]; + static fromDegreesArrayHeights(coordinates: number[], ellipsoid?: Ellipsoid, result?: Cartesian3[]): Cartesian3[]; + static fromRadiansArrayHeights(coordinates: number[], ellipsoid?: Ellipsoid, result?: Cartesian3[]): Cartesian3[]; + isConstant: boolean; + definitionChanged: Event; + referenceFrame: ReferenceFrame; + getValue(time: JulianDate, result?: Cartesian3): Cartesian3; + getValueInReferenceFrame(time: JulianDate, referenceFrame: ReferenceFrame, result?: Cartesian3): Cartesian3; + } + + class Cartesian4 extends Packable { + x: number; + y: number; + z: number; + w: number; + static ZERO: Cartesian4; + static UNIT_X: Cartesian4; + static UNIT_Y: Cartesian4; + static UNIT_Z: Cartesian4; + static UNIT_W: Cartesian4; + constructor(x?: number, y?: number, z?: number, w?: number); + clone(result?: Cartesian4): Cartesian4; + equals(right?: Cartesian4): boolean; + equalsEpsilon(right: Cartesian4, relativeEpsilon: number, absoluteEpsilon?: number): boolean; + toString(): string; + static fromElements(x: number, y: number, z: number, w: number, result?: Cartesian4): Cartesian4; + static fromColor(color: Color, result?: Cartesian4): Cartesian4; + static clone(cartesian: Cartesian4, result?: Cartesian4): Cartesian4; + static pack(value: Cartesian4, array: number[], startingIndex?: number): number[]; + static unpack(array: number[], startingIndex?: number, result?: Cartesian4): Cartesian4; + static fromArray(array: number[], startingIndex?: number, result?: Cartesian4): Cartesian4; + static maximumComponent(cartesian: Cartesian4): number; + static minimumComponent(cartesian: Cartesian4): number; + static minimumByComponent(first: Cartesian4, second: Cartesian4, result: Cartesian4): Cartesian4; + static maximumByComponent(first: Cartesian4, second: Cartesian4, result: Cartesian4): Cartesian4; + static magnitudeSquared(cartesian: Cartesian4): number; + static magnitude(cartesian: Cartesian4): number; + static distance(left: Cartesian4, right: Cartesian4): number; + static distanceSquared(left: Cartesian4, right: Cartesian4): number; + static normalize(cartesian: Cartesian4, result: Cartesian4): Cartesian4; + static dot(left: Cartesian4, right: Cartesian4): number; + static multiplyComponents(left: Cartesian4, right: Cartesian4, result: Cartesian4): Cartesian4; + static add(left: Cartesian4, right: Cartesian4, result: Cartesian4): Cartesian4; + static subtract(left: Cartesian4, right: Cartesian4, result: Cartesian4): Cartesian4; + static multiplyByScalar(cartesian: Cartesian4, scalar: number, result: Cartesian4): Cartesian4; + static divideByScalar(cartesian: Cartesian4, scalar: number, result: Cartesian4): Cartesian4; + static negate(cartesian: Cartesian4, result: Cartesian4): Cartesian4; + static abs(cartesian: Cartesian4, result: Cartesian4): Cartesian4; + static lerp(start: Cartesian4, end: Cartesian4, t: number, result: Cartesian4): Cartesian4; + static mostOrthogonalAxis(cartesian: Cartesian4, result: Cartesian4): Cartesian4; + static equals(left?: Cartesian4, right?: Cartesian4): boolean; + static equalsEpsilon(left: Cartesian4, right: Cartesian4, relativeEpsilon: number, absoluteEpsilon?: number): boolean; + } + + class Cartographic { + longitude: number; + latitude: number; + height: number; + static ZERO: Cartographic; + constructor(longitude?: number, latitude?: number, height?: number); + clone(result?: Cartographic): Cartographic; + equals(right?: Cartographic): boolean; + equalsEpsilon(right: Cartographic, epsilon: number): boolean; + toString(): string; + static fromRadians(longitude: number, latitude: number, height?: number, result?: Cartographic): Cartographic; + static fromDegrees(longitude: number, latitude: number, height?: number, result?: Cartographic): Cartographic; + static clone(cartographic: Cartographic, result?: Cartographic): Cartographic; + static equals(left?: Cartographic, right?: Cartographic): boolean; + static equalsEpsilon(left: Cartographic, right: Cartographic, epsilon: number): boolean; + } + + class CatmullRomSpline { + times: number[]; + points: Cartesian3[]; + firstTangent: Cartesian3; + lastTangent: Cartesian3; + constructor(options: { times: number[]; points: Cartesian3[]; firstTangent?: Cartesian3; lastTangent?: Cartesian3 }); + findTimeInterval(time: number): number; + evaluate(time: number, result?: Cartesian3): Cartesian3; + } + + class CesiumTerrainProvider extends TerrainProvider { + requestVertexNormals: boolean; + requestWaterMask: boolean; + constructor(options: { url: string; proxy?: Proxy; requestVertexNormals?: boolean; requestWaterMask?: boolean; ellipsoid?: Ellipsoid; credit?: Credit | string }); + } + + class CircleGeometry extends Packable { + constructor(options: { + center: Cartesian3; + radius: number; + ellipsoid?: Ellipsoid; + height?: number; + granularity?: number; + vertexFormat?: VertexFormat; + extrudedHeight?: number; + stRotation?: number + }); + static unpack(array: number[], startingIndex?: number, result?: CircleGeometry): number[]; + static createGeometry(circleGeometry: CircleGeometry): Geometry; + } + + class CircleOutlineGeometry extends Packable { + constructor(options: { center: Cartesian3; radius: number; ellipsoid?: Ellipsoid; height?: number; granularity?: number; extrudedHeight?: number; numberOfVerticalLines?: number }); + static unpack(array: number[], startingIndex?: number, result?: CircleOutlineGeometry): number[]; + static createGeometry(circleGeometry: CircleOutlineGeometry): Geometry; + } + + class Clock { + startTime: JulianDate; + stopTime: JulianDate; + currentTime: JulianDate; + multiplier: number; + clockStep: ClockStep; + clockRange: ClockRange; + canAnimate: boolean; + shouldAnimate: boolean; + onTick: Event; + constructor(options: { + startTime?: JulianDate; + stopTime?: JulianDate; + currentTime?: JulianDate; + multiplier?: number; + clockStep?: ClockStep; + clockRange?: ClockRange; + canAnimate?: boolean; + shouldAnimate?: + boolean + }); + tick(): JulianDate; + } + + class Color extends Packable { + red: number; + green: number; + blue: number; + alpha: number; + static ALICEBLUE: Color; + static ANTIQUEWHITE: Color; + static AQUA: Color; + static AQUAMARINE: Color; + static AZURE: Color; + static BEIGE: Color; + static BISQUE: Color; + static BLACK: Color; + static BLANCHEDALMOND: Color; + static BLUE: Color; + static BLUEVIOLET: Color; + static BROWN: Color; + static BURLYWOOD: Color; + static CADETBLUE: Color; + static CHARTREUSE: Color; + static CHOCOLATE: Color; + static CORAL: Color; + static CORNFLOWERBLUE: Color; + static CORNSILK: Color; + static CRIMSON: Color; + static CYAN: Color; + static DARKBLUE: Color; + static DARKCYAN: Color; + static DARKGOLDENROD: Color; + static DARKGRAY: Color; + static DARKGREEN: Color; + static DARKGREY: Color; + static DARKKHAKI: Color; + static DARKMAGENTA: Color; + static DARKOLIVEGREEN: Color; + static DARKORANGE: Color; + static DARKORCHID: Color; + static DARKRED: Color; + static DARKSALMON: Color; + static DARKSEAGREEN: Color; + static DARKSLATEBLUE: Color; + static DARKSLATEGRAY: Color; + static DARKSLATEGREY: Color; + static DARKTURQUOISE: Color; + static DARKVIOLET: Color; + static DEEPPINK: Color; + static DEEPSKYBLUE: Color; + static DIMGRAY: Color; + static DIMGREY: Color; + static DODGERBLUE: Color; + static FIREBRICK: Color; + static FLORALWHITE: Color; + static FORESTGREEN: Color; + static FUSCHIA: Color; + static GAINSBORO: Color; + static GHOSTWHITE: Color; + static GOLD: Color; + static GOLDENROD: Color; + static GRAY: Color; + static GREEN: Color; + static GREENYELLOW: Color; + static GREY: Color; + static HONEYDEW: Color; + static HOTPINK: Color; + static INDIANRED: Color; + static INDIGO: Color; + static IVORY: Color; + static KHAKI: Color; + static LAVENDER: Color; + static LAVENDAR_BLUSH: Color; + static LAWNGREEN: Color; + static LEMONCHIFFON: Color; + static LIGHTBLUE: Color; + static LIGHTCORAL: Color; + static LIGHTCYAN: Color; + static LIGHTGOLDENRODYELLOW: Color; + static LIGHTGRAY: Color; + static LIGHTGREEN: Color; + static LIGHTGREY: Color; + static LIGHTPINK: Color; + static LIGHTSEAGREEN: Color; + static LIGHTSKYBLUE: Color; + static LIGHTSLATEGRAY: Color; + static LIGHTSLATEGREY: Color; + static LIGHTSTEELBLUE: Color; + static LIGHTYELLOW: Color; + static LIME: Color; + static LIMEGREEN: Color; + static LINEN: Color; + static MAGENTA: Color; + static MAROON: Color; + static MEDIUMAQUAMARINE: Color; + static MEDIUMBLUE: Color; + static MEDIUMORCHID: Color; + static MEDIUMPURPLE: Color; + static MEDIUMSEAGREEN: Color; + static MEDIUMSLATEBLUE: Color; + static MEDIUMSPRINGGREEN: Color; + static MEDIUMTURQUOISE: Color; + static MEDIUMVIOLETRED: Color; + static MIDNIGHTBLUE: Color; + static MINTCREAM: Color; + static MISTYROSE: Color; + static MOCCASIN: Color; + static NAVAJOWHITE: Color; + static NAVY: Color; + static OLDLACE: Color; + static OLIVE: Color; + static OLIVEDRAB: Color; + static ORANGE: Color; + static ORANGERED: Color; + static ORCHID: Color; + static PALEGOLDENROD: Color; + static PALEGREEN: Color; + static PALETURQUOISE: Color; + static PALEVIOLETRED: Color; + static PAPAYAWHIP: Color; + static PEACHPUFF: Color; + static PERU: Color; + static PINK: Color; + static PLUM: Color; + static POWDERBLUE: Color; + static PURPLE: Color; + static RED: Color; + static ROSYBROWN: Color; + static ROYALBLUE: Color; + static SADDLEBROWN: Color; + static SALMON: Color; + static SANDYBROWN: Color; + static SEAGREEN: Color; + static SEASHELL: Color; + static SIENNA: Color; + static SILVER: Color; + static SKYBLUE: Color; + static SLATEBLUE: Color; + static SLATEGRAY: Color; + static SLATEGREY: Color; + static SNOW: Color; + static SPRINGGREEN: Color; + static STEELBLUE: Color; + static TAN: Color; + static TEAL: Color; + static THISTLE: Color; + static TOMATO: Color; + static TURQUOISE: Color; + static VIOLET: Color; + static WHEAT: Color; + static WHITE: Color; + static WHITESMOKE: Color; + static YELLOW: Color; + static YELLOWGREEN: Color; + static TRANSPARENT: Color; + static add(left: Color, right: Color, result?: Color): Color; + static byteToFloat(number: number): number; + static clone(color: Color, result?: Color): Color; + static divide(left: Color, right: Color, result?: Color): Color; + static divideByScalar(color: Color, scalar: number, result?: Color): Color; + static equals(left: Color, right: Color): boolean; + static floatToByte(number: number): number; + static fromAlpha(color: Color, alpha: number, result?: Color): Color; + static fromBytes(red?: number, green?: number, blue?: number, alpha?: number, result?: Color): Color; + static fromCartesian4(cartesian: Cartesian4, result?: Color): Color; + static fromCssColorString(color: string): Color; + static fromHsl(hue?: number, saturation?: number, lightness?: number, alpha?: number): Color; + static fromRandom(options?: { + red?: number; + minimumRed?: number; + maximumRed?: number; + green?: number; + minimumGreen?: number; + maximumGreen?: number; + blue?: number; + minimumBlue?: number; + maximumBlue?: number; + alpha?: number; + minimumAlpha?: number; + maximumAlpha?: number + }, result?: Color): Color; + static fromRgba(rgba: number): Color; + static mod(left: Color, right: Color, result?: Color): Color; + static multiply(left: Color, right: Color, result?: Color): Color; + static multiplyByScalar(color: Color, scalar: number, result?: Color): Color; + static pack(value: Color, array: number[], startingIndex?: number): number[]; + static subtract(left: Color, right: Color, result?: Color): Color; + static unpack(array: number[], startingIndex?: number, result?: Color): Color; + constructor(red?: number, green?: number, blue?: number, alpha?: number); + brighten(magnitude: number, result: Color): Color; + clone(result?: Color): Color; + darken(magnitude: number, result: Color): Color; + equals(other: Color): boolean; + equalsEpsilon(other: Color, epsilon?: number): boolean; + toBytes(result?: number[]): number[]; + toCssColorString(): string; + toRgba(): number; + toString(): string; + withAlpha(alpha: number, result?: Color): Color; + } + + class ColorGeometryInstanceAttribute { + value: Uint8Array; + componentDatatype: ComponentDatatype; + componentsPerAttribute: number; + normalize: boolean; + constructor(red?: number, green?: number, blue?: number, alpha?: number); + static fromColor(color: Color): ColorGeometryInstanceAttribute; + static toValue(color: Color, result?: Uint8Array): Uint8Array; + } + + class CorridorGeometry extends Packable { + constructor(options: { + positions: Cartesian3[]; + width: number; + ellipsoid?: Ellipsoid; + granularity?: number; + height?: number; + extrudedHeight?: number; + vertexFormat?: VertexFormat; + cornerType?: CornerType + }); + static unpack(array: number[], startingIndex?: number, result?: CorridorGeometry): CorridorGeometry; + static createGeometry(corridorGeometry: CorridorGeometry): Geometry; + } + + class CorridorOutlineGeometry extends Packable { + constructor(options: { + positions: Cartesian3[]; + width: number; + ellipsoid?: Ellipsoid; + granularity?: number; + height?: number; + extrudedHeight?: number; + cornerType?: CornerType + }); + static unpack(array: number[], startingIndex?: number, result?: CorridorOutlineGeometry): CorridorOutlineGeometry; + static createGeometry(corridorOutlineGeometry: CorridorOutlineGeometry): Geometry; + } + + class Credit { + readonly element: HTMLElement; + readonly html: string; + readonly imageUrl: string; + readonly link: string; + readonly showOnScreen: boolean; + readonly text: string; + constructor(html: string, showOnScreen?: boolean); + static equals(left: Credit, right: Credit): boolean; + equals(credits: Credit): boolean; + hasImage(): boolean; + hasLink(): boolean; + } + + class CylinderGeometry extends Packable { + constructor(options: { length: number; topRadius: number; bottomRadius: number; slices?: number; vertexFormat?: VertexFormat }); + static unpack(array: number[], startingIndex?: number, result?: CylinderGeometry): CylinderGeometry; + static createGeometry(cylinderGeometry: CylinderGeometry): Geometry; + } + + class CylinderOutlineGeometry extends Packable { + constructor(options: { length: number; topRadius: number; bottomRadius: number; slices?: number; numberOfVerticalLines?: number }); + static unpack(array: number[], startingIndex?: number, result?: CylinderOutlineGeometry): CylinderOutlineGeometry; + static createGeometry(cylinderGeometry: CylinderOutlineGeometry): Geometry; + } + + class DefaultProxy { + constructor(proxy: string); + getURL(resource: string): string; + } + + class DeveloperError { + name: string; + message: string; + stack: string; + constructor(message?: string); + } + + class EllipseGeometry extends Packable { + constructor(options: { + center: Cartesian3; + semiMajorAxis: number; + semiMinorAxis: number; + ellipsoid?: Ellipsoid; + height?: number; + extrudedHeight?: number; + rotation?: number; + stRotation?: number; + granularity?: number; + vertexFormat?: VertexFormat + }); + static unpack(array: number[], startingIndex?: number, result?: EllipseGeometry): EllipseGeometry; + static createGeometry(ellipseGeometry: EllipseGeometry): Geometry; + } + + class EllipseOutlineGeometry extends Packable { + constructor(options: { + center: Cartesian3; + semiMajorAxis: number; + semiMinorAxis: number; + ellipsoid?: Ellipsoid; + height?: number; + extrudedHeight?: number; + rotation?: number; + granularity?: number; + numberOfVerticalLines?: number + }); + static unpack(array: number[], startingIndex?: number, result?: EllipseOutlineGeometry): EllipseOutlineGeometry; + static createGeometry(ellipseGeometry: EllipseOutlineGeometry): Geometry; + } + + class Ellipsoid extends Packable { + radii: Cartesian3; + radiiSquared: Cartesian3; + radiiToTheFourth: Cartesian3; + oneOverRadii: Cartesian3; + oneOverRadiiSquared: Cartesian3; + minimumRadius: number; + maximumRadius: number; + static WGS84: Ellipsoid; + static UNIT_SPHERE: Ellipsoid; + static MOON: Ellipsoid; + constructor(x?: number, y?: number, z?: number); + clone(result?: Ellipsoid): Ellipsoid; + geocentricSurfaceNormal(cartesian: Cartesian3, result?: Cartesian3): Cartesian3; + geodeticSurfaceNormalCartographic(cartographic: Cartographic, result?: Cartesian3): Cartesian3; + geodeticSurfaceNormal(cartesian: Cartesian3, result?: Cartesian3): Cartesian3; + cartographicToCartesian(cartographic: Cartographic, result?: Cartesian3): Cartesian3; + cartographicArrayToCartesianArray(cartographics: Cartographic[], result?: Cartesian3[]): Cartesian3[]; + cartesianToCartographic(cartesian: Cartesian3, result?: Cartographic): Cartographic; + cartesianArrayToCartographicArray(cartesians: Cartesian3[], result?: Cartographic[]): Cartographic[]; + scaleToGeodeticSurface(cartesian: Cartesian3, result?: Cartesian3): Cartesian3; + scaleToGeocentricSurface(cartesian: Cartesian3, result?: Cartesian3): Cartesian3; + transformPositionToScaledSpace(position: Cartesian3, result?: Cartesian3): Cartesian3; + transformPositionFromScaledSpace(position: Cartesian3, result?: Cartesian3): Cartesian3; + equals(right?: Ellipsoid): boolean; + toString(): string; + static clone(ellipsoid: Ellipsoid, result?: Ellipsoid): Ellipsoid; + static fromCartesian3(radii?: Cartesian3): Ellipsoid; + static unpack(array: number[], startingIndex?: number, result?: Ellipsoid): Ellipsoid; + } + + class EllipsoidGeodesic { + surfaceDistance: number; + start: Cartographic; + end: Cartographic; + startHeading: number; + endHeading: number; + constructor(start?: Cartographic, end?: Cartographic, ellipsoid?: Ellipsoid); + setEndPoints(start: Cartographic, end: Cartographic): void; + interpolateUsingFraction(fraction: number): Cartographic; + interpolateUsingSurfaceDistance(distance: number): Cartographic; + } + + class EllipsoidGeometry extends Packable { + constructor(options?: { radii?: Cartesian3; stackPartitions?: number; slicePartitions?: number; vertexFormat?: VertexFormat }); + static unpack(array: number[], startingIndex?: number, result?: EllipsoidGeometry): EllipsoidGeometry; + static createGeometry(ellipsoidGeometry: EllipsoidGeometry): Geometry; + } + + class EllipsoidOutlineGeometry extends Packable { + constructor(options?: { radii?: Cartesian3; stackPartitions?: number; slicePartitions?: number; subdivisions?: number }); + static unpack(array: number[], startingIndex?: number, result?: EllipsoidOutlineGeometry): EllipsoidOutlineGeometry; + static createGeometry(ellipsoidGeometry: EllipsoidOutlineGeometry): Geometry; + } + + class EllipsoidTangentPlane { + ellipsoid: Ellipsoid; + origin: Cartesian3; + constructor(ellipsoid: Ellipsoid, origin: Cartesian3); + projectPointOntoPlane(cartesian: Cartesian3, result?: Cartesian2): Cartesian2; + projectPointsOntoPlane(cartesians: Cartesian3[], result?: Cartesian2[]): Cartesian2[]; + projectPointsOntoEllipsoid(cartesians: Cartesian2[], result?: Cartesian3[]): Cartesian3[]; + static fromPoints(ellipsoid: Ellipsoid, cartesians: Cartesian3): EllipsoidTangentPlane; + } + + class EllipsoidTerrainProvider extends TerrainProvider { + constructor(options?: { tilingScheme?: TilingScheme; ellipsoid?: Ellipsoid }); + } + + class Event { + numberOfListeners: number; + addEventListener(listener: () => void, scope?: any): Event.RemoveCallback; + removeEventListener(listener: () => void, scope?: any): boolean; + raiseEvent(...args: any[]): void; + } + + namespace Event { + type RemoveCallback = () => void; + } + + class EventHelper { + add(event: Event, listener: () => void, scope?: any): EventHelper.RemoveCallback; + removeAll(): void; + } + + namespace EventHelper { + type RemoveCallback = () => void; + } + + class GeographicProjection { + ellipsoid: Ellipsoid; + constructor(ellipsoid?: Ellipsoid); + project(cartographic: Cartographic, result?: Cartesian3): Cartesian3; + unproject(cartesian: Cartesian3, result?: Cartographic): Cartographic; + } + + class GeographicTilingScheme { + ellipsoid: Ellipsoid; + rectangle: Rectangle; + projection: MapProjection; + constructor(options?: { ellipsoid?: Ellipsoid; rectangle?: Rectangle; numberOfLevelZeroTilesX?: number; numberOfLevelZeroTilesY?: number }); + getNumberOfXTilesAtLevel(level: number): number; + getNumberOfYTilesAtLevel(level: number): number; + rectangleToNativeRectangle(rectangle: Rectangle, result?: Rectangle): Rectangle; + tileXYToNativeRectangle(x: number, y: number, level: number, result?: any): Rectangle; + tileXYToRectangle(x: number, y: number, level: number, result?: any): Rectangle; + positionToTileXY(position: Cartographic, level: number, result?: Cartesian2): Cartesian2; + } + + class Geometry { + attributes: GeometryAttributes; + indices: any[]; + primitiveType: PrimitiveType; + boundingSphere: BoundingSphere; + constructor(options: { attributes: GeometryAttributes; primitiveType?: PrimitiveType; indices?: Uint16Array | Uint32Array; boundingSphere?: BoundingSphere }); + static computeNumberOfVertices(geometry: Cartesian3): number; + } + + class GeometryAttribute { + componentDatatype: ComponentDatatype; + componentsPerAttribute: number; + normalize: boolean; + values: any[]; + constructor(options?: { componentDatatype?: ComponentDatatype; componentsPerAttribute?: number; normalize?: boolean; values?: number[] }); + } + + class GeometryAttributes { + position: GeometryAttribute; + normal: GeometryAttribute; + st: GeometryAttribute; + binormal: GeometryAttribute; + tangent: GeometryAttribute; + color: GeometryAttribute; + } + + class GeometryInstance { + geometry: Geometry; + modelMatrix: Matrix4; + id: any; + attributes: any; + constructor(options: { geometry: Geometry; modelMatrix?: Matrix4; id?: any; attributes?: any }); + } + + class GeometryInstanceAttribute { + componentDatatype: ComponentDatatype; + componentsPerAttribute: number; + normalize: boolean; + value: number[]; + constructor(options: { componentDatatype?: ComponentDatatype; componentsPerAttribute?: number; normalize?: boolean; value?: number[] }); + } + + class GregorianDate { + year: number; + month: number; + day: number; + hour: number; + minute: number; + second: number; + millisecond: number; + isLeapSecond: boolean; + } + + class HeightmapTerrainData { + waterMask: Uint8Array | HTMLImageElement | HTMLCanvasElement; + constructor(options: { + buffer: Int8Array | Uint8Array | Int16Array | Uint16Array | Float32Array | Float64Array; + width: number; + height: number; + childTileMask?: number; + structure?: any; + structureheightScale?: number; + structureheightOffset?: number; + structureelementsPerHeight?: number; + structurestride?: number; + structureelementMultiplier?: number; + structureisBigEndian?: boolean; + createdByUpsampling?: boolean + }); + createMesh(tilingScheme: TilingScheme, x: number, y: number, level: number): Promise; + interpolateHeight(rectangle: Rectangle, longitude: number, latitude: number): number; + upsample(tilingScheme: TilingScheme, thisX: number, thisY: number, thisLevel: number, descendantX: number, descendantY: number, descendantLevel: number): Promise; + isChildAvailable(thisX: number, thisY: number, childX: number, childY: number): boolean; + wasCreatedByUpsampling(): boolean; + } + + class HermiteSpline { + times: number[]; + points: Cartesian3[]; + inTangents: Cartesian3[]; + outTangents: Cartesian3[]; + constructor(options: { times: number[]; points: Cartesian3[]; inTangents: Cartesian3[]; outTangents: Cartesian3[] }); + findTimeInterval(time: number): number; + evaluate(time: number, result?: Cartesian3): Cartesian3; + static createC1(): HermiteSpline; + static createNaturalCubic(): HermiteSpline | LinearSpline; + static createClampedCubic(): HermiteSpline | LinearSpline; + } + + class IonImageryProvider extends ImageryProvider { + constructor(options: {assetId: number, accessToken?: string, server?: string}) + } + + class Interval { + start: number; + stop: number; + constructor(start?: number, stop?: number); + } + + class JulianDate { + dayNumber: number; + secondsOfDay: number; + static leapSeconds: LeapSecond[]; + constructor(julianDayNumber?: number, secondsOfDay?: number, timeStandard?: TimeStandard); + clone(result?: JulianDate): JulianDate; + equals(right?: JulianDate): boolean; + equalsEpsilon(right: JulianDate, epsilon: number): boolean; + toString(): string; + static fromDate(date: Date, result?: JulianDate): JulianDate; + static fromIso8601(iso8601String: string, result?: JulianDate): JulianDate; + static now(result?: JulianDate): JulianDate; + static toGregorianDate(julianDate: JulianDate, result?: GregorianDate): GregorianDate; + static toDate(julianDate: JulianDate): Date; + static toIso8601(julianDate: JulianDate, precision?: number): string; + static clone(julianDate: JulianDate, result?: JulianDate): JulianDate; + static compare(left: JulianDate, right: JulianDate): number; + static equals(left?: JulianDate, right?: JulianDate): boolean; + static equalsEpsilon(left: JulianDate, right: JulianDate, epsilon: number): boolean; + static totalDays(julianDate: JulianDate): number; + static secondsDifference(left: JulianDate, right: JulianDate): number; + static daysDifference(left: JulianDate, right: JulianDate): number; + static computeTaiMinusUtc(julianDate: JulianDate): number; + static addSeconds(julianDate: JulianDate, seconds: number, result: JulianDate): JulianDate; + static addMinutes(julianDate: JulianDate, minutes: number, result: JulianDate): JulianDate; + static addHours(julianDate: JulianDate, hours: number, result: JulianDate): JulianDate; + static addDays(julianDate: JulianDate, days: number, result: JulianDate): JulianDate; + static lessThan(left: JulianDate, right: JulianDate): boolean; + static lessThanOrEquals(left: JulianDate, right: JulianDate): boolean; + static greaterThan(left: JulianDate, right: JulianDate): boolean; + static greaterThanOrEquals(left: JulianDate, right: JulianDate): boolean; + } + + class LeapSecond { + julianDate: JulianDate; + offset: number; + constructor(date?: JulianDate, offset?: number); + } + + class LinearSpline { + times: number[]; + points: Cartesian3[]; + constructor(); + findTimeInterval(time: number): number; + evaluate(time: number, result?: Cartesian3): Cartesian3; + } + + class MapProjection { + ellipsoid: Ellipsoid; + project(cartographic: Cartographic, result?: Cartesian3): Cartesian3; + unproject(cartesian: Cartesian3, result?: Cartographic): Cartographic; + } + + class Matrix2 extends Packable { + static IDENTITY: Matrix2; + static COLUMN0ROW0: number; + static COLUMN0ROW1: number; + static COLUMN1ROW0: number; + static COLUMN1ROW1: number; + constructor(column0Row0?: number, column1Row0?: number, column0Row1?: number, column1Row1?: number); + clone(result?: Matrix2): Matrix2; + equals(right?: Matrix2): boolean; + equalsEpsilon(right: Matrix2, epsilon: number): boolean; + toString(): string; + static pack(value: Matrix2, array: number[], startingIndex?: number): number[]; + static unpack(array: number[], startingIndex?: number, result?: Matrix2): Matrix2; + static clone(matrix: Matrix2, result?: Matrix2): Matrix2; + static fromArray(array: number[], startingIndex?: number, result?: Matrix2): Matrix2; + static fromColumnMajorArray(values: number[], result?: Matrix2): Matrix2; + static fromRowMajorArray(values: number[], result?: Matrix2): Matrix2; + static fromScale(scale: Cartesian2, result?: Matrix2): Matrix2; + static fromUniformScale(scale: number, result?: Matrix2): Matrix2; + static fromRotation(angle: number, result?: Matrix2): Matrix2; + static toArray(matrix: Matrix2, result?: number[]): number[]; + static getElementIndex(row: number, column: number): number; + static getColumn(matrix: Matrix2, index: number, result: Cartesian2): Cartesian2; + static setColumn(matrix: Matrix2, index: number, cartesian: Cartesian2, result: Cartesian2): Matrix2; + static getRow(matrix: Matrix2, index: number, result: Cartesian2): Cartesian2; + static setRow(matrix: Matrix2, index: number, cartesian: Cartesian2, result: Matrix2): Matrix2; + static getScale(matrix: Matrix2, result: Cartesian2): Cartesian2; + static getMaximumScale(matrix: Matrix2): number; + static multiply(left: Matrix2, right: Matrix2, result: Matrix2): Matrix2; + static add(left: Matrix2, right: Matrix2, result: Matrix2): Matrix2; + static subtract(left: Matrix2, right: Matrix2, result: Matrix2): Matrix2; + static multiplyByVector(matrix: Matrix2, cartesian: Cartesian2, result: Cartesian2): Cartesian2; + static multiplyByScalar(matrix: Matrix2, scalar: number, result: Matrix2): Matrix2; + static negate(matrix: Matrix2, result: Matrix2): Matrix2; + static transpose(matrix: Matrix2, result: Matrix2): Matrix2; + static abs(matrix: Matrix2, result: Matrix2): Matrix2; + static equals(left?: Matrix2, right?: Matrix2): boolean; + static equalsEpsilon(left: Matrix2, right: Matrix2, epsilon: number): boolean; + } + + class Matrix3 extends Packable { + static IDENTITY: Matrix3; + static COLUMN0ROW0: number; + static COLUMN0ROW1: number; + static COLUMN0ROW2: number; + static COLUMN1ROW0: number; + static COLUMN1ROW1: number; + static COLUMN1ROW2: number; + static COLUMN2ROW0: number; + static COLUMN2ROW1: number; + static COLUMN2ROW2: number; + constructor(column0Row0?: number, column1Row0?: number, column2Row0?: number, column0Row1?: number, column1Row1?: number, + column2Row1?: number, column0Row2?: number, column1Row2?: number, column2Row2?: number); + clone(result?: Matrix3): Matrix3; + equals(right?: Matrix3): boolean; + equalsEpsilon(right: Matrix3, epsilon: number): boolean; + toString(): string; + static pack(value: Matrix3, array: number[], startingIndex?: number): number[]; + static unpack(array: number[], startingIndex?: number, result?: Matrix3): Matrix3; + static clone(matrix: Matrix3, result?: Matrix3): Matrix3; + static fromArray(array: number[], startingIndex?: number, result?: Matrix3): Matrix3; + static fromColumnMajorArray(values: number[], result?: Matrix3): Matrix3; + static fromRowMajorArray(values: number[], result?: Matrix3): Matrix3; + static fromQuaternion(quaternion: Quaternion): Matrix3; + static fromScale(scale: Cartesian3, result?: Matrix3): Matrix3; + static fromUniformScale(scale: number, result?: Matrix3): Matrix3; + static fromCrossProduct(the: Cartesian3, result?: Matrix3): Matrix3; + static fromRotationX(angle: number, result?: Matrix3): Matrix3; + static fromRotationY(angle: number, result?: Matrix3): Matrix3; + static fromRotationZ(angle: number, result?: Matrix3): Matrix3; + static toArray(matrix: Matrix3, result?: number[]): number[]; + static getElementIndex(row: number, column: number): number; + static getColumn(matrix: Matrix3, index: number, result: Cartesian3): Cartesian3; + static setColumn(matrix: Matrix3, index: number, cartesian: Cartesian3, result: Cartesian3): Matrix3; + static getRow(matrix: Matrix3, index: number, result: Cartesian3): Cartesian3; + static setRow(matrix: Matrix3, index: number, cartesian: Cartesian3, result: Cartesian3): Matrix3; + static getScale(matrix: Matrix3, result: Cartesian3): Cartesian3; + static getMaximumScale(matrix: Matrix3): number; + static multiply(left: Matrix3, right: Matrix3, result: Matrix3): Matrix3; + static add(left: Matrix3, right: Matrix3, result: Matrix3): Matrix3; + static subtract(left: Matrix3, right: Matrix3, result: Matrix3): Matrix3; + static multiplyByVector(matrix: Matrix3, cartesian: Cartesian3, result: Cartesian3): Cartesian3; + static multiplyByScalar(matrix: Matrix3, scalar: number, result: Matrix3): Matrix3; + static negate(matrix: Matrix3, result: Matrix3): Matrix3; + static transpose(matrix: Matrix3, result: Matrix3): Matrix3; + static computeEigenDecomposition(matrix: Matrix3, result?: any): any; + static abs(matrix: Matrix3, result: Matrix3): Matrix3; + static determinant(matrix: Matrix3): number; + static inverse(matrix: Matrix3, result: Matrix3): Matrix3; + static equals(left?: Matrix3, right?: Matrix3): boolean; + static equalsEpsilon(left: Matrix3, right: Matrix3, epsilon: number): boolean; + } + + class Matrix4 extends Packable { + static IDENTITY: Matrix4; + static COLUMN0ROW0: number; + static COLUMN0ROW1: number; + static COLUMN0ROW2: number; + static COLUMN0ROW3: number; + static COLUMN1ROW0: number; + static COLUMN1ROW1: number; + static COLUMN1ROW2: number; + static COLUMN1ROW3: number; + static COLUMN2ROW0: number; + static COLUMN2ROW1: number; + static COLUMN2ROW2: number; + static COLUMN2ROW3: number; + static COLUMN3ROW0: number; + static COLUMN3ROW1: number; + static COLUMN3ROW2: number; + static COLUMN3ROW3: number; + constructor(column0Row0?: number, column1Row0?: number, column2Row0?: number, column3Row0?: number, column0Row1?: number, + column1Row1?: number, column2Row1?: number, column3Row1?: number, column0Row2?: number, column1Row2?: number, + column2Row2?: number, column3Row2?: number, column0Row3?: number, column1Row3?: number, column2Row3?: number, + column3Row3?: number); + clone(result?: Matrix4): Matrix4; + equals(right?: Matrix4): boolean; + equalsEpsilon(right: Matrix4, epsilon: number): boolean; + toString(): string; + static pack(value: Matrix4, array: number[], startingIndex?: number): number[]; + static unpack(array: number[], startingIndex?: number, result?: Matrix4): Matrix4; + static clone(matrix: Matrix4, result?: Matrix4): Matrix4; + static fromArray(array: number[], startingIndex?: number, result?: Matrix4): Matrix4; + static fromColumnMajorArray(values: number[], result?: Matrix4): Matrix4; + static fromRowMajorArray(values: number[], result?: Matrix4): Matrix4; + static fromRotationTranslation(rotation: Matrix3, translation?: Cartesian3, result?: Matrix4): Matrix4; + static fromTranslationQuaternionRotationScale(translation: Cartesian3, rotation: Quaternion, scale: Cartesian3, result?: Matrix4): Matrix4; + static fromTranslation(translation: Cartesian3, result?: Matrix4): Matrix4; + static fromScale(scale: Cartesian3, result?: Matrix4): Matrix4; + static fromUniformScale(scale: number, result?: Matrix4): Matrix4; + static fromCamera(camera: Camera, result?: Matrix4): Matrix4; + static computePerspectiveFieldOfView(fovY: number, aspectRatio: number, near: number, far: number, result: Matrix4): Matrix4; + static computeOrthographicOffCenter(left: number, right: number, bottom: number, top: number, near: number, far: number, result: Matrix4): Matrix4; + static computePerspectiveOffCenter(left: number, right: number, bottom: number, top: number, near: number, far: number, result: Matrix4): Matrix4; + static computeInfinitePerspectiveOffCenter(left: number, right: number, bottom: number, top: number, near: number, far: number, result: Matrix4): Matrix4; + static computeViewportTransformation(viewport: any, nearDepthRange: number, farDepthRange: number, result: Matrix4): Matrix4; + static toArray(matrix: Matrix4, result?: number[]): number[]; + static getElementIndex(row: number, column: number): number; + static getColumn(matrix: Matrix4, index: number, result: Cartesian4): Cartesian4; + static setColumn(matrix: Matrix4, index: number, cartesian: Cartesian4, result: Cartesian4): Matrix4; + static getRow(matrix: Matrix4, index: number, result: Cartesian4): Cartesian4; + static setRow(matrix: Matrix4, index: number, cartesian: Cartesian4, result: Cartesian4): Matrix4; + static getScale(matrix: Matrix4, result: Cartesian3): Cartesian3; + static getMaximumScale(matrix: Matrix4): number; + static multiply(left: Matrix4, right: Matrix4, result: Matrix4): Matrix4; + static add(left: Matrix4, right: Matrix4, result: Matrix4): Matrix4; + static subtract(left: Matrix4, right: Matrix4, result: Matrix4): Matrix4; + static multiplyTransformation(left: Matrix4, right: Matrix4, result: Matrix4): Matrix4; + static multiplyByMatrix3(matrix: Matrix4, rotation: Matrix3, result: Matrix4): Matrix4; + static multiplyByTranslation(matrix: Matrix4, translation: Cartesian3, result: Matrix4): Matrix4; + static multiplyByUniformScale(matrix: Matrix4, scale: number, result: Matrix4): Matrix4; + static multiplyByScale(matrix: Matrix4, scale: Cartesian3, result: Matrix4): Matrix4; + static multiplyByVector(matrix: Matrix4, cartesian: Cartesian4, result: Cartesian4): Cartesian4; + static multiplyByPointAsVector(matrix: Matrix4, cartesian: Cartesian3, result: Cartesian3): Cartesian3; + static multiplyByPoint(matrix: Matrix4, cartesian: Cartesian3, result: Cartesian3): Cartesian3; + static multiplyByScalar(matrix: Matrix4, scalar: number, result: Matrix4): Matrix4; + static negate(matrix: Matrix4, result: Matrix4): Matrix4; + static transpose(matrix: Matrix4, result: Matrix4): Matrix4; + static abs(matrix: Matrix4, result: Matrix4): Matrix4; + static equals(left?: Matrix4, right?: Matrix4): boolean; + static equalsEpsilon(left: Matrix4, right: Matrix4, epsilon: number): boolean; + static getTranslation(matrix: Matrix4, result: Cartesian3): Cartesian3; + static getRotation(matrix: Matrix4, result: Matrix3): Matrix3; + static inverse(matrix: Matrix4, result: Matrix4): Matrix4; + static inverseTransformation(matrix: Matrix4, result: Matrix4): Matrix4; + } + + class NearFarScalar extends Packable { + near: number; + nearValue: number; + far: number; + farValue: number; + constructor(near?: number, nearValue?: number, far?: number, farValue?: number); + clone(result?: NearFarScalar): NearFarScalar; + equals(right?: NearFarScalar): boolean; + static clone(nearFarScalar: NearFarScalar, result?: NearFarScalar): NearFarScalar; + static pack(value: NearFarScalar, array: number[], startingIndex?: number): number[]; + static unpack(array: number[], startingIndex?: number, result?: NearFarScalar): NearFarScalar; + static equals(left?: NearFarScalar, right?: NearFarScalar): boolean; + } + + class ObjectOrientedBoundingBox { + rotation: Matrix3; + translation: Cartesian3; + scale: Cartesian3; + constructor(rotation?: Matrix3, translation?: Cartesian3, scale?: Cartesian3); + clone(result?: ObjectOrientedBoundingBox): ObjectOrientedBoundingBox; + equals(right?: ObjectOrientedBoundingBox): boolean; + static fromPoints(positions: Cartesian3[], result?: ObjectOrientedBoundingBox): ObjectOrientedBoundingBox; + static fromBoundingRectangle(boundingRectangle: BoundingRectangle, rotation?: number): ObjectOrientedBoundingBox; + static clone(box: ObjectOrientedBoundingBox, result?: ObjectOrientedBoundingBox): ObjectOrientedBoundingBox; + static intersect(left: ObjectOrientedBoundingBox, right: ObjectOrientedBoundingBox): boolean; + static equals(left: ObjectOrientedBoundingBox, right: ObjectOrientedBoundingBox): boolean; + } + + class Occluder { + position: Cartesian3; + radius: number; + cameraPosition: Cartesian3; + constructor(occluderBoundingSphere: BoundingSphere, cameraPosition: Cartesian3); + isPointVisible(occludee: Cartesian3): boolean; + isBoundingSphereVisible(occludee: BoundingSphere): boolean; + computeVisibility(occludeeBS: BoundingSphere): number; + static fromBoundingSphere(occluderBoundingSphere: BoundingSphere, cameraPosition: Cartesian3, result?: Occluder): Occluder; + static computeOccludeePoint(occluderBoundingSphere: BoundingSphere, occludeePosition: Cartesian3, positions: Cartesian3[]): any; + static computeOccludeePointFromRectangle(rectangle: Rectangle, ellipsoid?: Ellipsoid): any; + } + + class PinBuilder { + fromColor(color: Color, size: number): HTMLCanvasElement; + fromUrl(url: string, color: Color, size: number): HTMLCanvasElement | Promise; + fromMakiIconId(id: string, color: Color, size: number): HTMLCanvasElement | Promise; + fromText(text: string, color: Color, size: number): HTMLCanvasElement; + } + + class Plane { + normal: Cartesian3; + distance: number; + constructor(normal: Cartesian3, distance: number); + static fromPointNormal(point: Cartesian3, normal: Cartesian3, result?: Plane): Plane; + static getPointDistance(plane: Plane, point: Cartesian3): number; + } + + class PolygonGeometry extends Packable { + constructor(options: { + polygonHierarchy: PolygonHierarchy; + height?: number; + extrudedHeight?: number; + vertexFormat?: VertexFormat; + stRotation?: number; + ellipsoid?: Ellipsoid; + granularity?: number; + perPositionHeight?: boolean + }); + static fromPositions(options?: { + positions: Cartesian3[]; + height?: number; + extrudedHeight?: number; + vertexFormat?: VertexFormat; + stRotation?: number; + ellipsoid?: Ellipsoid; + granularity?: number; + perPositionHeight?: boolean; + closeTop?: boolean; + closeBottom?: boolean; + }): PolygonGeometry; + static unpack(array: number[], startingIndex?: number, result?: PolygonGeometry): PolygonGeometry; + static createGeometry(polygonGeometry: PolygonGeometry): Geometry; + } + + class PolygonHierarchy extends Property { + positions: Cartesian3[]; + holes: PolygonHierarchy[]; + constructor(positions?: Cartesian3[], holes?: PolygonHierarchy[]); + } + + class PolygonOutlineGeometry extends Packable { + constructor(options: { + polygonHierarchy: any; + height?: number; + extrudedHeight?: number; + vertexFormat?: VertexFormat; + ellipsoid?: Ellipsoid; + granularity?: number; + perPositionHeight?: boolean + }); + static unpack(array: number[], startingIndex?: number, result?: PolygonOutlineGeometry): PolygonOutlineGeometry; + static fromPositions(options?: { + positions: Cartesian3[]; + height?: number; + extrudedHeight?: number; + ellipsoid?: Ellipsoid; + granularity?: number; + perPositionHeight?: boolean; + }): PolygonOutlineGeometry; + static createGeometry(polygonGeometry: PolygonOutlineGeometry): Geometry; + } + + class PolylineGeometry extends Packable { + constructor(options: { positions: Cartesian3[]; width?: number; colors?: Color[]; colorsPerVertex?: boolean; followSurface?: boolean; granularity?: number; ellipsoid?: Ellipsoid }); + static unpack(array: number[], startingIndex?: number, result?: PolylineGeometry): PolylineGeometry; + static createGeometry(polylineGeometry: PolylineGeometry): Geometry; + } + + class PolylineVolumeGeometry extends Packable { + constructor(options: { polylinePositions: Cartesian3[]; shapePositions: Cartesian2[]; ellipsoid?: Ellipsoid; granularity?: number; vertexFormat?: VertexFormat; cornerType?: CornerType }); + static unpack(array: number[], startingIndex?: number, result?: PolylineVolumeGeometry): PolylineVolumeGeometry; + static createGeometry(polylineVolumeGeometry: PolylineVolumeGeometry): Geometry; + } + + class PolylineVolumeOutlineGeometry extends Packable { + constructor(options: { polylinePositions: Cartesian3[]; shapePositions: number; ellipsoid?: Ellipsoid; granularity?: number; cornerType?: CornerType }); + static unpack(array: number[], startingIndex?: number, result?: PolylineVolumeOutlineGeometry): PolylineVolumeOutlineGeometry; + static createGeometry(polylineVolumeOutlineGeometry: PolylineVolumeOutlineGeometry): Geometry; + } + + class QuantizedMeshTerrainData { + waterMask: Uint8Array | HTMLImageElement | HTMLCanvasElement; + constructor(options: { + quantizedVertices: Uint16Array; + indices: Uint16Array | Uint32Array; + minimumHeight: number; + maximumHeight: number; + boundingSphere: BoundingSphere; + horizonOcclusionPoint: Cartesian3; + westIndices: number[]; + southIndices: number[]; + eastIndices: number[]; + northIndices: number[]; + westSkirtHeight: number; + southSkirtHeight: number; + eastSkirtHeight: number; + northSkirtHeight: number; + childTileMask?: number; + createdByUpsampling?: boolean; + encodedNormals?: Uint8Array; + waterMask?: Uint8Array + }); + createMesh(tilingScheme: TilingScheme, x: number, y: number, level: number): Promise; + upsample(tilingScheme: TilingScheme, thisX: number, thisY: number, thisLevel: number, descendantX: number, descendantY: number, descendantLevel: number): Promise; + interpolateHeight(rectangle: Rectangle, longitude: number, latitude: number): number; + isChildAvailable(thisX: number, thisY: number, childX: number, childY: number): boolean; + wasCreatedByUpsampling(): boolean; + } + + class Quaternion extends Packable { + x: number; + y: number; + z: number; + w: number; + static packedInterpolationLength: number; + static ZERO: Quaternion; + static IDENTITY: Quaternion; + constructor(x?: number, y?: number, z?: number, w?: number); + clone(result?: Quaternion): Quaternion; + equals(right?: Quaternion): boolean; + equalsEpsilon(right: Quaternion, epsilon: number): boolean; + toString(): string; + static fromAxisAngle(axis: Cartesian3, angle: number, result?: Quaternion): Quaternion; + static fromRotationMatrix(matrix: Matrix3, result?: Quaternion): Quaternion; + static fromHeadingPitchRoll(heading: number, pitch: number, roll: number, result: Quaternion): Quaternion; + static pack(value: Quaternion, array: number[], startingIndex?: number): number[]; + static unpack(array: number[], startingIndex?: number, result?: Quaternion): Quaternion; + static convertPackedArrayForInterpolation(packedArray: number[], startingIndex?: number, lastIndex?: number, result?: number[]): void; + static unpackInterpolationResult(array: number[], sourceArray: number[], startingIndex?: number, lastIndex?: number, result?: Quaternion): Quaternion; + static clone(quaternion: Quaternion, result?: Quaternion): Quaternion; + static conjugate(quaternion: Quaternion, result: Quaternion): Quaternion; + static magnitudeSquared(quaternion: Quaternion): number; + static magnitude(quaternion: Quaternion): number; + static normalize(quaternion: Quaternion, result: Quaternion): Quaternion; + static inverse(quaternion: Quaternion, result: Quaternion): Quaternion; + static add(left: Quaternion, right: Quaternion, result: Quaternion): Quaternion; + static subtract(left: Quaternion, right: Quaternion, result: Quaternion): Quaternion; + static negate(quaternion: Quaternion, result: Quaternion): Quaternion; + static dot(left: Quaternion, right: Quaternion): number; + static multiply(left: Quaternion, right: Quaternion, result: Quaternion): Quaternion; + static multiplyByScalar(quaternion: Quaternion, scalar: number, result: Quaternion): Quaternion; + static divideByScalar(quaternion: Quaternion, scalar: number, result: Quaternion): Quaternion; + static computeAxis(quaternion: Quaternion, result: Cartesian3): Cartesian3; + static computeAngle(quaternion: Quaternion): number; + static lerp(start: Quaternion, end: Quaternion, t: number, result: Quaternion): Quaternion; + static slerp(start: Quaternion, end: Quaternion, t: number, result: Quaternion): Quaternion; + static log(quaternion: Quaternion, result: Cartesian3): Cartesian3; + static exp(cartesian: Cartesian3, result: Quaternion): Quaternion; + static computeInnerQuadrangle(q0: Quaternion, q1: Quaternion, q2: Quaternion, result: Quaternion): Quaternion; + static squad(q0: Quaternion, q1: Quaternion, s0: Quaternion, s1: Quaternion, t: number, result: Quaternion): Quaternion; + static fastSlerp(start: Quaternion, end: Quaternion, t: number, result: Quaternion): Quaternion; + static fastSquad(q0: Quaternion, q1: Quaternion, s0: Quaternion, s1: Quaternion, t: number, result?: Quaternion): Quaternion; + static equals(left?: Quaternion, right?: Quaternion): boolean; + static equalsEpsilon(left: Quaternion, right: Quaternion, epsilon: number): boolean; + } + + class QuaternionSpline { + times: number[]; + points: Quaternion[]; + innerQuadrangles: Quaternion[]; + constructor(options: { times: number[]; points: Quaternion[]; firstInnerQuadrangle?: Quaternion; lastInnerQuadrangle?: Quaternion }); + findTimeInterval(time: number): number; + evaluate(time: number, result?: Quaternion): Quaternion; + } + + class Queue { + readonly length: number; + enqueue(item: any): void; + dequeue(): any; + contains(item: any): boolean; + clear(): void; + peek(): any; + sort(compareFunction: Queue.Comparator): void; + } + + namespace Queue { + type Comparator = (a: any, b: any) => number; + } + + class Ray { + origin: Cartesian3; + direction: Cartesian3; + constructor(origin?: Cartesian3, direction?: Cartesian3); + static getPoint(t: number, result?: Cartesian3): Cartesian3; + } + + class Rectangle extends Packable { + west: number; + south: number; + east: number; + north: number; + width: number; + height: number; + static MAX_VALUE: Rectangle; + constructor(west?: number, south?: number, east?: number, north?: number); + clone(result?: Rectangle): Rectangle; + equals(other?: Rectangle): boolean; + equalsEpsilon(other: Rectangle, epsilon: number): boolean; + static pack(value: Rectangle, array: number[], startingIndex?: number): number[]; + static unpack(array: number[], startingIndex?: number, result?: Rectangle): Rectangle; + static computeWidth(rectangle: Rectangle): number; + static computeHeight(rectangle: Rectangle): number; + static fromDegrees(west?: number, south?: number, east?: number, north?: number, result?: Rectangle): Rectangle; + static fromCartographicArray(cartographics: Cartographic[], result?: Rectangle): Rectangle; + static clone(rectangle: Rectangle, result?: Rectangle): Rectangle; + static equals(left?: Rectangle, right?: Rectangle): boolean; + static validate(rectangle: Rectangle): void; + static southwest(rectangle: Rectangle, result?: Cartographic): Cartographic; + static northwest(rectangle: Rectangle, result?: Cartographic): Cartographic; + static northeast(rectangle: Rectangle, result?: Cartographic): Cartographic; + static southeast(rectangle: Rectangle, result?: Cartographic): Cartographic; + static center(rectangle: Rectangle, result?: Cartographic): Cartographic; + static intersection(rectangle: Rectangle, otherRectangle: Rectangle, result?: Rectangle): Rectangle; + static contains(rectangle: Rectangle, cartographic: Cartographic): boolean; + static subsample(rectangle: Rectangle, ellipsoid?: Ellipsoid, surfaceHeight?: number, result?: Cartesian3[]): Cartesian3[]; + } + + class RectangleGeometry extends Packable { + constructor(options: { + rectangle: Rectangle; + vertexFormat?: VertexFormat; + ellipsoid?: Ellipsoid; + granularity?: number; + height?: number; + rotation?: number; + stRotation?: number; + extrudedHeight?: number + }); + static pack(value: BoundingSphere, array: number[], startingIndex?: number): number[]; + static unpack(array: number[], startingIndex?: number, result?: RectangleGeometry): RectangleGeometry; + static createGeometry(rectangleGeometry: RectangleGeometry): Geometry; + } + + class RectangleOutlineGeometry extends Packable { + constructor(options: { + rectangle: Rectangle; + ellipsoid?: Ellipsoid; + granularity?: number; + height?: number; + rotation?: number; + extrudedHeight?: number + }); + static pack(value: BoundingSphere, array: number[], startingIndex?: number): number[]; + static unpack(array: number[], startingIndex?: number, result?: RectangleGeometry): RectangleOutlineGeometry; + static createGeometry(rectangleGeometry: RectangleOutlineGeometry): Geometry; + } + + class RequestErrorEvent { + statusCode: number; + response: any; + responseHeaders: any; + constructor(statusCode?: number, response?: any, responseHeaders?: string | object); + toString(): string; + } + + class RuntimeError { + name: string; + message: string; + stack: string; + constructor(message?: string); + } + + class ScreenSpaceEventHandler { + constructor(element?: HTMLCanvasElement); + setInputAction(action: () => void, type: number, modifier?: number): void; + getInputAction(type: number, modifier?: number): () => void; + removeInputAction(type: number, modifier?: number): void; + isDestroyed(): boolean; + destroy(): void; + } + + class ShowGeometryInstanceAttribute { + value: Uint8Array; + componentDatatype: ComponentDatatype; + componentsPerAttribute: number; + normalize: boolean; + constructor(show?: boolean); + static toValue(show: boolean, result?: Uint8Array): Uint8Array; + } + + class SimplePolylineGeometry extends Packable { + constructor(options: { positions: Cartesian3[]; colors?: Color[]; colorsPerVertex?: boolean; followSurface?: boolean; granularity?: number; ellipsoid?: Ellipsoid }); + static unpack(array: number[], startingIndex?: number, result?: SimplePolylineGeometry): SimplePolylineGeometry; + static createGeometry(simplePolylineGeometry: SimplePolylineGeometry): Geometry; + } + + class SphereGeometry extends Packable { + constructor(options?: { radius?: number; stackPartitions?: number; slicePartitions?: number; vertexFormat?: VertexFormat }); + static unpack(array: number[], startingIndex?: number, result?: SphereGeometry): SphereGeometry; + static createGeometry(sphereGeometry: SphereGeometry): Geometry; + } + + class SphereOutlineGeometry extends Packable { + constructor(options?: { radius?: number; stackPartitions?: number; slicePartitions?: number; subdivisions?: number }); + static unpack(array: number[], startingIndex?: number, result?: SphereOutlineGeometry): SphereOutlineGeometry; + static createGeometry(sphereGeometry: SphereOutlineGeometry): Geometry; + } + + class Spherical { + constructor(clock?: number, cone?: number, magnitude?: number); + equals(other: Spherical): boolean; + clone(result?: Spherical): Spherical; + equalsEpsilon(other: Spherical, epsilon: number): boolean; + toString(): string; + static fromCartesian3(cartesian3: Cartesian3, spherical?: Spherical): Spherical; + static clone(spherical: Spherical, result?: Spherical): Spherical; + static normalize(spherical: Spherical, result?: Spherical): Spherical; + static equals(left: Spherical, right: Spherical): boolean; + static equalsEpsilon(left: Spherical, right: Spherical, epsilon?: number): boolean; + } + + class Spline { + times: number[]; + points: Cartesian3[] | Quaternion[]; + evaluate(time: number, result?: Cartesian3 | Quaternion): Cartesian3 | Quaternion; + findTimeInterval(time: number, startIndex: number): number; + } + + class TaskProcessor { + constructor(workerName: string, maximumActiveTasks?: number); + scheduleTask(parameters: any, transferableObjects?: any[]): Promise; + isDestroyed(): boolean; + destroy(): void; + } + + class TerrainData { + waterMask: Uint8Array | HTMLImageElement | HTMLCanvasElement; + interpolateHeight(rectangle: Rectangle, longitude: number, latitude: number): number; + isChildAvailable(thisX: number, thisY: number, childX: number, childY: number): boolean; + createMesh(tilingScheme: TilingScheme, x: number, y: number, level: number): Promise; + upsample(tilingScheme: TilingScheme, thisX: number, thisY: number, thisLevel: number, descendantX: number, descendantY: number, descendantLevel: number): Promise; + wasCreatedByUpsampling(): boolean; + } + + class TerrainMesh { + center: Cartesian3; + vertices: Float32Array; + stride: number; + indices: Uint16Array | Uint32Array; + minimumHeight: number; + maximumHeight: number; + boundingSphere3D: BoundingSphere; + occludeePointInScaledSpace: Cartesian3; + constructor(center: Cartesian3, vertices: Float32Array, indices: Uint16Array | Uint32Array, minimumHeight: number, + maximumHeight: number, boundingSphere3D: BoundingSphere, occludeePointInScaledSpace: Cartesian3, vertexStride?: number); + } + + abstract class TerrainProvider { + availability: any; // TileAvailability + credit: Credit; + errorEvent: Event; + hasVertexNormals: boolean; + hasWaterMask: boolean; + ready: boolean; + readonly readyPromise: Promise; + tilingScheme: TilingScheme; + static heightmapTerrainQuality: number; + static getEstimatedLevelZeroGeometricErrorForAHeightmap(ellipsoid: Ellipsoid, tileImageWidth: number, numberOfTilesAtLevelZero: number): number; + static getRegularGridIndices(width: number, height: number): Uint16Array; + getLevelMaximumGeometricError(level: number): number; + getTileDataAvailable(x: number, y: number, level: number): boolean; + requestTileGeometry(x: number, y: number, level: number, throttleRequests?: boolean): Promise; + } + + class TileProviderError { + provider: ImageryProvider | TerrainProvider; + message: string; + x: number; + y: number; + level: number; + timesRetried: number; + retry: boolean; + error: Error; + constructor(provider: ImageryProvider | TerrainProvider, message: string, x?: number, y?: number, level?: number, timesRetried?: number, error?: Error); + static handleError(previousError: TileProviderError, provider: ImageryProvider | TerrainProvider, event: Event, + message: string, x: number, y: number, level: number, retryFunction: TileProviderError.RetryFunction, + errorDetails?: Error): TileProviderError; + static handleSuccess(previousError: TileProviderError): void; + } + + namespace TileProviderError { + type RetryFunction = () => void; + } + + class TilingScheme { + ellipsoid: Ellipsoid; + rectangle: Rectangle; + projection: MapProjection; + getNumberOfXTilesAtLevel(level: number): number; + getNumberOfYTilesAtLevel(level: number): number; + rectangleToNativeRectangle(rectangle: Rectangle, result?: Rectangle): Rectangle; + tileXYToNativeRectangle(x: number, y: number, level: number, result?: any): Rectangle; + tileXYToRectangle(x: number, y: number, level: number, result?: any): Rectangle; + positionToTileXY(position: Cartographic, level: number, result?: Cartesian2): Cartesian2; + } + + class TimeInterval { + start: JulianDate; + stop: JulianDate; + data: any; + isStartIncluded: boolean; + isStopIncluded: boolean; + isEmpty: boolean; + static EMPTY: TimeInterval; + constructor(options?: { start?: JulianDate; stop?: JulianDate; isStartIncluded?: boolean; isStopIncluded?: boolean; data?: any }); + clone(result?: TimeInterval): TimeInterval; + equals(right?: TimeInterval, dataComparer?: TimeInterval.DataComparer): boolean; + equalsEpsilon(right: TimeInterval, epsilon: number, dataComparer?: TimeInterval.DataComparer): boolean; + toString(): string; + static fromIso8601(options: { iso8601: string; isStartIncluded?: boolean; isStopIncluded?: boolean; data?: any }, result?: TimeInterval): TimeInterval; + static toIso8601(timeInterval: TimeInterval, precision?: number): string; + static clone(timeInterval?: TimeInterval, result?: TimeInterval): TimeInterval; + static equals(left?: TimeInterval, right?: TimeInterval, dataComparer?: TimeInterval.DataComparer): boolean; + static equalsEpsilon(left: TimeInterval, right: TimeInterval, epsilon: number, dataComparer?: TimeInterval.DataComparer): boolean; + static intersect(left: TimeInterval, right: TimeInterval, result: TimeInterval, mergeCallback?: TimeInterval.MergeCallback): TimeInterval; + static contains(timeInterval: TimeInterval, julianDate: JulianDate): boolean; + } + + namespace TimeInterval { + type MergeCallback = (leftData: any, rightData: any) => any; + type DataComparer = (leftData: any, rightData: any) => boolean; + } + + class TimeIntervalCollection { + readonly changedEvent: Event; + readonly start: JulianDate; + readonly isStartIncluded: boolean; + readonly stop: JulianDate; + readonly isStopIncluded: boolean; + readonly length: number; + readonly isEmpty: boolean; + constructor(intervals?: TimeInterval[]); + equals(right?: TimeIntervalCollection, dataComparer?: TimeInterval.DataComparer): boolean; + get(index: number): TimeInterval; + removeAll(): void; + findIntervalContainingDate(date: JulianDate): TimeInterval | undefined; + findDataForIntervalContainingDate(date: JulianDate): any; + contains(julianDate: JulianDate): boolean; + indexOf(date: JulianDate): number; + findInterval(options?: { start?: JulianDate; stop?: JulianDate; isStartIncluded?: boolean; isStopIncluded?: boolean }): TimeInterval; + addInterval(interval: TimeInterval, dataComparer?: TimeInterval.DataComparer): void; + removeInterval(interval: TimeInterval): void; + intersect(other: TimeIntervalCollection, dataComparer?: TimeInterval.DataComparer, mergeCallback?: TimeInterval.MergeCallback): TimeIntervalCollection; + } + + class VRTheWorldTerrainProvider extends TerrainProvider { + constructor(options: { url: string; proxy?: any; ellipsoid?: Ellipsoid; credit?: Credit | string }); + } + + class VertexFormat extends Packable { + position: boolean; + normal: boolean; + st: boolean; + binormal: boolean; + tangent: boolean; + color: boolean; + static POSITION_ONLY: VertexFormat; + static POSITION_AND_NORMAL: VertexFormat; + static POSITION_NORMAL_AND_ST: VertexFormat; + static POSITION_AND_ST: VertexFormat; + static POSITION_AND_COLOR: VertexFormat; + static ALL: VertexFormat; + static DEFAULT: VertexFormat; + constructor(options?: any); + static unpack(array: number[], startingIndex?: number, result?: VertexFormat): VertexFormat; + static clone(cartesian: VertexFormat, result?: VertexFormat): VertexFormat; + } + + class WallGeometry extends Packable { + constructor(options: { positions: Cartesian3[]; granularity?: number; maximumHeights?: number[]; minimumHeights?: number[]; ellipsoid?: Ellipsoid; vertexFormat?: VertexFormat }); + static unpack(array: number[], startingIndex?: number, result?: WallGeometry): WallGeometry; + static fromConstantHeights(positions: Cartesian3[], maximumHeight?: number, minimumHeight?: number, ellipsoid?: Ellipsoid): WallGeometry; + static createGeometry(wallGeometry: WallGeometry): Geometry; + } + + class WallOutlineGeometry extends Packable { + constructor(options: { positions: Cartesian3[]; granularity?: number; maximumHeights?: number[]; minimumHeights?: number[]; ellipsoid?: Ellipsoid }); + static unpack(array: number[], startingIndex?: number, result?: WallOutlineGeometry): WallOutlineGeometry; + static fromConstantHeights(positions: Cartesian3[], maximumHeight?: number, minimumHeight?: number, ellipsoid?: Ellipsoid): WallOutlineGeometry; + static createGeometry(wallGeometry: WallOutlineGeometry): Geometry; + } + + class WebMercatorProjection { + ellipsoid: Ellipsoid; + static MaximumLatitude: number; + constructor(ellipsoid?: Ellipsoid); + project(cartographic: Cartographic, result?: Cartesian3): Cartesian3; + unproject(cartesian: Cartesian3, result?: Cartographic): Cartographic; + static mercatorAngleToGeodeticLatitude(mercatorAngle: number): number; + static geodeticLatitudeToMercatorAngle(latitude: number): number; + } + + class WebMercatorTilingScheme { + ellipsoid: Ellipsoid; + rectangle: Rectangle; + projection: MapProjection; + constructor(options?: { ellipsoid?: Ellipsoid; + numberOfLevelZeroTilesX?: number; + numberOfLevelZeroTilesY?: number; + rectangleSouthwestInMeters?: Cartesian2; + rectangleNortheastInMeters?: Cartesian2 + }); + getNumberOfXTilesAtLevel(level: number): number; + getNumberOfYTilesAtLevel(level: number): number; + rectangleToNativeRectangle(rectangle: Rectangle, result?: Rectangle): Rectangle; + tileXYToNativeRectangle(x: number, y: number, level: number, result?: any): Rectangle; + tileXYToRectangle(x: number, y: number, level: number, result?: any): Rectangle; + positionToTileXY(position: Cartographic, level: number, result?: Cartesian2): Cartesian2; + } + + class BillboardGraphics { + definitionChanged: Event; + image: Property; + imageSubRegion: Property; + scale: Property; + rotation: Property; + alignedAxis: Property; + horizontalOrigin: Property; + verticalOrigin: Property; + color: Property; + eyeOffset: Property; + pixelOffset: Property; + show: Property; + width: Property; + height: Property; + scaleByDistance: Property; + translucencyByDistance: Property; + pixelOffsetScaleByDistance: Property; + constructor(options?: { image?: Property; + show?: Property; + scale?: Property; + horizontalOrigin?: Property; + verticalOrigin?: Property; + eyeOffset?: Property; + pixelOffset?: Property; + rotation?: Property; + alignedAxis?: Property; + width?: Property; + height?: Property; + color?: Property; + scaleByDistance?: Property; + translucencyByDistance?: Property; + pixelOffsetScaleByDistance?: Property; + imageSubRegion?: Property + }); + clone(result?: BillboardGraphics): BillboardGraphics; + merge(source: BillboardGraphics): BillboardGraphics; + } + + class BillboardVisualizer extends Visualizer { + constructor(entityCluster: EntityCluster, entityCollection: EntityCollection); + } + + class BoxGeometryUpdater extends GeometryUpdater { + constructor(entity: Entity, scene: Scene); + } + + class BoxGraphics { + definitionChanged: Event; + show: Property; + dimensions: Property; + material: MaterialProperty; + fill: Property; + outline: Property; + outlineColor: Property; + outlineWidth: Property; + constructor(options?: { + dimensions?: Property; + show?: Property; + fill?: Property; + material?: MaterialProperty; + outline?: Property; + outlineColor?: Property; + outlineWidth?: Property + }); + clone(result?: BoxGraphics): BoxGraphics; + merge(source: BoxGraphics): BoxGraphics; + } + + class CallbackProperty extends Property { + constructor(callback: CallbackProperty.Callback, isConstant: boolean); + setCallback(callback: CallbackProperty.Callback, isConstant: boolean): void; + } + + namespace CallbackProperty { + type Callback = (time?: JulianDate, result?: any) => any; + } + + class CheckerboardMaterialProperty extends MaterialProperty { + evenColor: Color; + oddColor: Color; + repeat: Property; + constructor(options?: { evenColor?: Color; oddColor?: Color; repeat?: Property }); + } + + class ColorMaterialProperty extends MaterialProperty { + color: Color; + constructor(color?: Color); + } + + class CompositeEntityCollection { + collectionChanged: Event; + id: string; + values: Entity[]; + constructor(collections?: EntityCollection[]); + addCollection(collection: EntityCollection, index?: number): void; + removeCollection(collection: EntityCollection): boolean; + removeAllCollections(): void; + containsCollection(collection: EntityCollection): boolean; + contains(entity: Entity): boolean; + indexOfCollection(collection: EntityCollection): number; + getCollection(index: number): EntityCollection; + getCollectionsLength(): number; + raiseCollection(collection: EntityCollection): void; + lowerCollection(collection: EntityCollection): void; + raiseCollectionToTop(collection: EntityCollection): void; + lowerCollectionToBottom(collection: EntityCollection): void; + suspendEvents(): void; + resumeEvents(): void; + computeAvailability(): TimeInterval; + getById(id: any): Entity; + } + + class CompositeMaterialProperty extends MaterialProperty { + intervals: TimeIntervalCollection; + } + + class CompositePositionProperty { + isConstant: boolean; + definitionChanged: Event; + intervals: TimeIntervalCollection; + referenceFrame: ReferenceFrame; + getValue(time: JulianDate, result?: any): any; + getValueInReferenceFrame(time: JulianDate, referenceFrame: ReferenceFrame, result?: Cartesian3): Cartesian3; + equals(other?: Property): boolean; + } + + class CompositeProperty extends Property { + intervals: TimeIntervalCollection; + } + + class ConstantPositionProperty { + isConstant: boolean; + definitionChanged: Event; + referenceFrame: ReferenceFrame; + constructor(value?: Cartesian3, referenceFrame?: ReferenceFrame); + getValue(time: JulianDate, result?: any): any; + setValue(value: Cartesian3, referenceFrame?: ReferenceFrame): void; + getValueInReferenceFrame(time: JulianDate, referenceFrame: ReferenceFrame, result?: Cartesian3): Cartesian3; + equals(other?: Property): boolean; + } + + class ConstantProperty extends Property { + constructor(value?: any); + setValue(value: any): void; + } + + class CorridorGeometryUpdater extends GeometryUpdater { + constructor(entity: Entity, scene: Scene); + } + + class CorridorGraphics { + definitionChanged: Event; + show: Property; + material: MaterialProperty; + positions: Property; + height: Property; + extrudedHeight: Property; + granularity: Property; + width: Property; + fill: Property; + outline: Property; + outlineColor: Property; + outlineWidth: Property; + cornerType: Property; + constructor(options?: { + positions?: Property; + width?: Property; + cornerType?: Property; + height?: Property; + extrudedHeight?: Property; + show?: Property; + fill?: Property; + material?: MaterialProperty; + outline?: Property; + outlineColor?: Property; + outlineWidth?: Property; + granularity?: Property + }); + clone(result?: CorridorGraphics): CorridorGraphics; + merge(source: CorridorGraphics): CorridorGraphics; + } + + class CustomDataSource extends DataSource { + constructor(name?: string); + } + + class CylinderGeometryUpdater extends GeometryUpdater { + constructor(entity: Entity, scene: Scene); + } + + class CylinderGraphics { + definitionChanged: Event; + length: Property; + topRadius: Property; + bottomRadius: Property; + numberOfVerticalLines: Property; + slices: Property; + show: Property; + material: MaterialProperty; + fill: Property; + outline: Property; + outlineColor: Property; + outlineWidth: Property; + constructor(options?: { length?: Property; + topRadius?: Property; + bottomRadius?: Property; + show?: Property; + fill?: Property; + material?: MaterialProperty; + outline?: Property; + outlineColor?: Property; + outlineWidth?: Property; + numberOfVerticalLines?: Property; + slices?: Property + }); + clone(result?: CylinderGraphics): CylinderGraphics; + merge(source: CylinderGraphics): CylinderGraphics; + } + + class CzmlDataSource extends DataSource { + static updaters: any[]; + static load(czml: Resource | string | object, options?: { sourceUri?: string }): Promise; + static processMaterialPacketData(object: object, propertyName: string, packetData: object, interval: TimeInterval, sourceUri: string, entityCollection: EntityCollection): void; + static processPacketData(type: () => any, object: object, propertyName: string, packetData: object, interval: TimeInterval, sourceUri: string, entityCollection: EntityCollection): void; + static processPositionPacketData(object: object, propertyName: string, packetData: object, interval: TimeInterval, sourceUri: string, entityCollection: EntityCollection): void; + constructor(name?: string); + load(czml: Resource | string | object, options?: { sourceUri?: string }): Promise; + process(czml: Resource | string | object, options?: { sourceUri?: string }): Promise; + } + + abstract class DataSource { + changedEvent: Event; + clock: DataSourceClock; + clustering: EntityCluster; + entities: EntityCollection; + errorEvent: Event; + isLoading: boolean; + loadingEvent: Event; + name: string; + show: boolean; + update(time: JulianDate): boolean; + } + + class DataSourceClock { + definitionChanged: Event; + startTime: JulianDate; + stopTime: JulianDate; + currentTime: JulianDate; + clockRange: ClockRange; + clockStep: ClockStep; + multiplier: number; + clone(result?: DataSourceClock): DataSourceClock; + equals(other: DataSourceClock): boolean; + merge(source: DataSourceClock): DataSourceClock; + getValue(): Clock; + } + + class DataSourceCollection { + length: number; + dataSourceAdded: Event; + dataSourceRemoved: Event; + add(dataSource: DataSource | Promise): Promise; + remove(dataSource: DataSource, destroy?: boolean): boolean; + removeAll(destroy?: boolean): void; + contains(dataSource: DataSource): boolean; + indexOf(dataSource: DataSource): number; + get(index: number): DataSource; + isDestroyed(): boolean; + destroy(): void; + } + + class DataSourceDisplay { + scene: Scene; + dataSources: DataSourceCollection; + defaultDataSource: CustomDataSource; + static defaultVisualizersCallback: DataSourceDisplay.VisualizersCallback; + constructor(options: { scene: Scene; dataSourceCollection: DataSourceCollection; visualizersCallback?: DataSourceDisplay.VisualizersCallback }); + isDestroyed(): boolean; + destroy(): void; + update(time: JulianDate): boolean; + } + + namespace DataSourceDisplay { + type VisualizersCallback = (scene: Scene, dataSource: DataSource) => Visualizer[]; + } + + class DynamicGeometryUpdater { + update(time: JulianDate): void; + isDestroyed(): boolean; + destroy(): void; + } + + class EllipseGeometryUpdater extends GeometryUpdater { + readonly onTerrain: boolean; + constructor(entity: Entity, scene: Scene); + } + + class EllipseGraphics { + definitionChanged: Event; + semiMajorAxis: Property; + semiMinorAxis: Property; + rotation: Property; + show: Property; + material: MaterialProperty; + height: Property; + extrudedHeight: Property; + granularity: Property; + stRotation: Property; + fill: Property; + outline: Property; + outlineColor: Property; + outlineWidth: Property; + numberOfVerticalLines: Property; + constructor(options?: { + semiMajorAxis?: number; + semiMinorAxis?: number; + height?: Property; + extrudedHeight?: Property; + show?: Property; + fill?: Property; + material?: MaterialProperty; + outline?: Property; + outlineColor?: Property; + outlineWidth?: Property; + numberOfVerticalLines?: Property; + rotation?: Property; + stRotation?: Property; + granularity?: Property + }); + clone(result?: EllipseGraphics): EllipseGraphics; + merge(source: EllipseGraphics): EllipseGraphics; + } + + class EllipsoidGeometryUpdater extends GeometryUpdater { + constructor(entity: Entity, scene: Scene); + createFillGeometryInstance(time: JulianDate, skipModelMatrix?: boolean, modelMatrixResult?: Matrix4): GeometryInstance; + createOutlineGeometryInstance(time: JulianDate, skipModelMatrix?: boolean, modelMatrixResult?: Matrix4): GeometryInstance; + } + + class EllipsoidGraphics { + definitionChanged: Event; + show: Property; + radii: Property; + material: MaterialProperty; + fill: Property; + outline: Property; + outlineColor: Property; + outlineWidth: Property; + stackPartitions: Property; + slicePartitions: Property; + subdivisions: Property; + constructor(options?: { + radii?: Property; + show?: Property; + fill?: Property; + material?: MaterialProperty; + outline?: Property; + outlineColor?: Property; + outlineWidth?: Property; + subdivisions?: Property; + stackPartitions?: Property; + slicePartitions?: Property + }); + clone(result?: EllipsoidGraphics): EllipsoidGraphics; + merge(source: EllipsoidGraphics): EllipsoidGraphics; + } + + class Entity { + availability: TimeIntervalCollection; + billboard: BillboardGraphics; + box: BoxGraphics; + corridor: CorridorGraphics; + cylinder: CylinderGraphics; + readonly definitionChanged: Event; + description: Property; + ellipse: EllipseGraphics; + ellipsoid: EllipsoidGraphics; + entityCollection: EntityCollection; + id: string; + isShowing: boolean; + label: LabelGraphics; + model: ModelGraphics; + name: string; + orientation: Property; + parent: Entity; + path: PathGraphics; + plane: any; + point: PointGraphics; + polygon: PolygonGraphics; + polyline: PolylineGraphics; + polylineVolume: PolylineVolumeGraphics; + position: PositionProperty; + properties: any; + propertyNames: any[]; + rectangle: RectangleGraphics; + show: boolean; + viewFrom: Property; + wall: WallGraphics; + constructor(options?: { + id?: string; + name?: string; + availability?: TimeIntervalCollection; + show?: boolean; + description?: Property; + position?: PositionProperty; + orientation?: Property; + viewFrom?: Property; + parent?: Entity; + billboard?: BillboardGraphics; + box?: BoxGraphics; + corridor?: CorridorGraphics; + cylinder?: CylinderGraphics; + ellipse?: EllipseGraphics; + ellipsoid?: EllipsoidGraphics; + label?: LabelGraphics; + model?: ModelGraphics; + path?: PathGraphics; + plane?: any; + point?: PointGraphics; + polygon?: PolygonGraphics; + polyline?: PolylineGraphics; + polylineVolume?: PolylineVolumeGraphics; + rectangle?: RectangleGraphics; + wall?: WallGraphics + }); + addProperty(propertyName: string): void; + computeModelMatrix(time: JulianDate, result?: Matrix4): Matrix4; + isAvailable(time: JulianDate): boolean; + merge(source: Entity): Entity; + removeProperty(propertyName: string): void; + } + + class EntityCluster { + clusterBillboards: boolean; + clusterEvent: Event; + clusterLabels: boolean; + clusterPoints: boolean; + enabled: boolean; + minimumClusterSize: number; + pixelRange: number; + constructor(options?: { enabled?: boolean; pixelRange?: number; minimumClusterSize?: number; clusterBillboards?: boolean; clusterLabels?: boolean; clusterPoints?: boolean }); + destroy(): void; + // newClusterCallback(clusteredEntities, cluster) + } + + class EntityCollection { + readonly collectionChanged: Event; + readonly id: string; + readonly owner: DataSource | CompositeEntityCollection; + show: boolean; + readonly values: Entity[]; + static collectionChangedEventCallback(collection: EntityCollection, added: Entity[], removed: Entity[], changed: Entity[]): void; + constructor(owner: DataSource | CompositeEntityCollection); + add(entity: Entity): Entity; + computeAvailability(): TimeInterval; + contains(entity: Entity): boolean; + getById(id: string): Entity; + getOrCreateEntity(id: string): Entity; + remove(entity: Entity): boolean; + removeAll(): void; + removeById(id: string): boolean; + resumeEvents(): void; + suspendEvents(): void; + } + + class EntityView { + entity: Entity; + scene: Scene; + ellipsoid: Ellipsoid; + boundingSphere: Entity; + static defaultOffset3D: Cartesian3; + constructor(entity: Entity, scene: Scene, ellipsoid?: Ellipsoid, boundingSphere?: BoundingSphere); + update(time: JulianDate): void; + } + + class GeoJsonDataSource extends DataSource { + static clampToGround: boolean; + static crsLinkHrefs: any; + static crsLinkTypes: any; + static crsNames: any; + static fill: Color; + static markerColor: Color; + static markerSize: number; + static markerSymbol: string; + static stroke: Color; + static strokeWidth: number; + static load(data: Resource | string | object, options?: { + sourceUri?: string; + markerSize?: number; + markerSymbol?: string; + markerColor?: Color; + stroke?: Color; + strokeWidth?: number; + fill?: Color; + clampToGround?: boolean + }): Promise; + constructor(name?: string); + load(data: Resource | string | object, options?: { + sourceUri?: string; + markerSize?: number; + markerSymbol?: string; + markerColor?: Color; + stroke?: Color; + strokeWidth?: number; + fill?: Color; + clampToGround?: boolean + }): Promise; + } + + class GeometryUpdater { + readonly classificationTypeProperty: Property; + readonly readonlydistanceDisplayConditionProperty: Property; + readonly entity: Entity; + readonly fillEnabled: boolean; + readonly fillMaterialProperty: MaterialProperty; + readonly geometryChanged: boolean; + readonly hasConstantFill: boolean; + readonly hasConstantOutline: boolean; + readonly id: string; + readonly isClosed: boolean; + readonly isDynamic: boolean; + readonly outlineColorProperty: Property; + readonly outlineEnabled: boolean; + readonly outlineWidth: number; + readonly shadowsProperty: Property; + constructor(options: { entity: Entity; scene: Scene; geometryOptions: any; geometryPropertyName: string; observedPropertyNames: string[] }); + createDynamicUpdater(primitives: PrimitiveCollection, groundPrimitives: PrimitiveCollection): DynamicGeometryUpdater; + destroy(): void; + isDestroyed(): boolean; + isFilled(time: JulianDate): boolean; + isOutlineVisible(time: JulianDate): boolean; + createFillGeometryInstance(time: JulianDate): GeometryInstance; + createOutlineGeometryInstance(time: JulianDate): GeometryInstance; + } + + class GeometryVisualizer extends Visualizer { + constructor(scene: Scene, entityCollection: EntityCollection, primitives?: PrimitiveCollection, groundPrimitives?: PrimitiveCollection); + } + + class GridMaterialProperty extends MaterialProperty { + color: Color; + cellAlpha: Property; + lineCount: Property; + lineThickness: Property; + lineOffset: Property; + constructor(options?: { color?: Property; cellAlpha?: Property; lineCount?: Property; lineThickness?: Property; lineOffset?: Property }); + } + + class ImageMaterialProperty extends MaterialProperty { + image: Property; + repeat: Property; + constructor(options?: { image?: Property; repeat?: Property }); + } + + class KmlDataSource extends DataSource { + refreshEvent: Event; + unsupportedNodeEvent: Event; + constructor(options?: {camera?: Camera, canvas?: HTMLCanvasElement; ellipsoid?: Ellipsoid}); + static load(data: Resource | string | Document | Blob, + options?: { camera: Camera, canvas: HTMLCanvasElement; sourceUri?: string, clampToGround?: boolean; ellipsoid?: Ellipsoid }): Promise; + load(data: Resource | string | Document | Blob, options?: { sourceUri?: string, clampToGround?: boolean, ellipsoid?: Ellipsoid }): Promise; + } + + class KmlFeatureData { + author: { name: string; uri: string; email: string }; + link: { href: string; hreflang: string; rel: string; type: string; title: string; length: string }; + address: string; + phoneNumber: string; + snippet: string; + extendedData: string; + } + + class LabelGraphics { + definitionChanged: Event; + text: Property; + font: Property; + style: Property; + fillColor: Property; + outlineColor: Property; + outlineWidth: Property; + horizontalOrigin: Property; + verticalOrigin: Property; + eyeOffset: Property; + pixelOffset: Property; + scale: Property; + show: Property; + translucencyByDistance: Property; + pixelOffsetScaleByDistance: Property; + constructor(options?: { + text?: Property; + font?: Property; + style?: Property; + fillColor?: Property; + outlineColor?: Property; + outlineWidth?: Property; + show?: Property; + scale?: Property; + horizontalOrigin?: Property; + verticalOrigin?: Property; + eyeOffset?: Property; + pixelOffset?: Property; + translucencyByDistance?: Property; + pixelOffsetScaleByDistance?: Property + }); + clone(result?: LabelGraphics): LabelGraphics; + merge(source: LabelGraphics): LabelGraphics; + } + + class LabelVisualizer extends Visualizer { + constructor(entityCluster: EntityCluster, entityCollection: EntityCollection); + } + + class MaterialProperty extends Property { + getType(time: JulianDate): string; + } + + class ModelGraphics { + clampAnimations: Property | boolean; + clippingPlanes: Property; + color: Property; + colorBlendAmount: Property | number; + colorBlendMode: Property; + readonly definitionChanged: Event; + distanceDisplayCondition: Property; + heightReference: Property; + incrementallyLoadTextures: Property | boolean; + maximumScale: Property | number; + minimumScale: Property | number; + minimumPixelSize: Property | number; + nodeTransformations: any; // PropertyBag + runAnimations: Property | boolean; + scale: Property | number; + shadows: Property; + show: Property | boolean; + silhouetteColor: Property; + silhouetteSize: Property | number; + uri: Property | string; + constructor(options?: { + uri?: Property | string; + show?: Property | boolean; + scale?: Property | number; + minimumPixelSize?: Property | number; + maximumScale?: Property | number; + incrementallyLoadTextures?: Property | boolean; + runAnimations?: Property | boolean; + clampAnimations?: Property | boolean; + nodeTransformations?: Property; + shadows?: Property; + heightReference?: Property; + distanceDisplayCondition?: Property; + silhouetteColor?: Property; + silhouetteSize?: Property | number; + color?: Property; + colorBlendMode?: Property; + colorBlendAmount?: Property | number; + clippingPlanes?: Property; + }); + clone(result?: ModelGraphics): ModelGraphics; + merge(source: ModelGraphics): ModelGraphics; + } + + class ModelVisualizer extends Visualizer { + constructor(scene: Scene, entityCollection: EntityCollection); + } + + class PathGraphics { + readonly definitionChanged: Event; + distanceDisplayCondition: Property; + leadTime: Property | number; + material: MaterialProperty; + resolution: Property | number; + trailTime: Property | number; + show: Property | boolean; + width: Property | number; + constructor(options?: { + leadTime?: Property | number; + trailTime?: Property | number; + show?: Property | boolean; + width?: Property | number; + material?: MaterialProperty; + resolution?: Property | number; + distanceDisplayCondition?: Property; + }); + clone(result?: PathGraphics): PathGraphics; + merge(source: PathGraphics): PathGraphics; + } + + class PathVisualizer extends Visualizer { + constructor(scene: Scene, entityCollection: EntityCollection); + } + + class PointGraphics { + color: Property; + readonly definitionChanged: Event; + disableDepthTestDistance: Property; + distanceDisplayCondition: Property; + heightReference: Property; + outlineColor: Property; + outlineWidth: Property; + pixelSize: Property; + scaleByDistance: Property; + show: Property; + translucencyByDistance: Property; + constructor(options?: { + color?: Color; + pixelSize?: number; + outlineColor?: Color; + outlineWidth?: number; + show?: boolean; + scaleByDistance?: Property; + translucencyByDistance?: Property; + heightReference?: HeightReference; + distanceDisplayCondition?: Property; + disableDepthTestDistance?: Property + }); + clone(result?: PointGraphics): PointGraphics; + merge(source: PointGraphics): PointGraphics; + } + + class PointVisualizer extends Visualizer { + constructor(entityCluster: EntityCluster, entityCollection: EntityCollection); + } + + class PolygonGeometryUpdater extends GeometryUpdater { + constructor(entity: Entity, scene: Scene); + } + + class PolygonGraphics { + definitionChanged: Event; + show: Property; + material: MaterialProperty; + positions: Property; + hierarchy: Property; + height: Property; + extrudedHeight: Property; + granularity: Property; + stRotation: Property; + fill: Property; + outline: Property; + outlineColor: Property; + outlineWidth: Property; + perPositionHeight: Property; + constructor(options?: { + hierarchy?: Property; + height?: number; + extrudedHeight?: Property; + show?: Property; + fill?: Property; + material?: MaterialProperty; + outline?: boolean; + outlineColor?: Property; + outlineWidth?: number; + stRotation?: Property; + granularity?: Property; + perPositionHeight?: Property + }); + clone(result?: PolygonGraphics): PolygonGraphics; + merge(source: PolygonGraphics): PolygonGraphics; + } + + class PolylineArrowMaterialProperty extends MaterialProperty { + color: Property; + constructor(color?: Property); + } + + class PolylineGeometryUpdater extends GeometryUpdater { + readonly depthFailMaterialProperty: MaterialProperty; + readonly distanceDisplayConditionProperty: Property; + constructor(entity: Entity, scene: Scene); + } + + class PolylineGlowMaterialProperty extends MaterialProperty { + color: Color; + glowPower: Property; + constructor(options?: { color?: Property; glowPower?: Property }); + } + + class PolylineGraphics { + definitionChanged: Event; + show: Property; + material: MaterialProperty; + positions: Property; + width: number; + followSurface: Property; + granularity: Property; + constructor(options?: { positions?: Cartesian3[]; followSurface?: Property; width?: number; show?: Property; material?: MaterialProperty; granularity?: Property }); + clone(result?: PolylineGraphics): PolylineGraphics; + merge(source: PolylineGraphics): PolylineGraphics; + } + + class PolylineOutlineMaterialProperty extends MaterialProperty { + color: Color; + outlineColor: Color; + outlineWidth: Property; + constructor(options?: { color?: Property; outlineColor?: Property; outlineWidth?: Property }); + } + + class PolylineVolumeGeometryUpdater extends GeometryUpdater { + constructor(entity: Entity, scene: Scene); + } + + class PolylineVolumeGraphics { + definitionChanged: Event; + show: Property; + material: MaterialProperty; + positions: Property; + shape: Property; + granularity: Property; + fill: Property; + outline: Property; + outlineColor: Property; + outlineWidth: Property; + cornerType: Property; + constructor(options?: { + positions?: Property; + shape?: Property; + cornerType?: Property; + show?: Property; + fill?: Property; + material?: MaterialProperty; + outline?: Property; + outlineColor?: Property; + outlineWidth?: Property; + granularity?: Property + }); + clone(result?: PolylineVolumeGraphics): PolylineVolumeGraphics; + merge(source: PolylineVolumeGraphics): PolylineVolumeGraphics; + } + + abstract class PositionProperty extends Property { + referenceFrame: ReferenceFrame; + getValueInReferenceFrame(time: JulianDate, referenceFrame: ReferenceFrame, result?: Cartesian3): Cartesian3; + } + + class PositionPropertyArray extends PositionProperty { + constructor(value?: Property[]); + getValue(time?: JulianDate, result?: Cartesian3[]): Cartesian3[]; + setValue(value: Property[]): void; + } + + abstract class Property { + readonly isConstant: boolean; + readonly definitionChanged: Event; + getValue(time: JulianDate, result?: any): any; + equals(other?: Property): boolean; + } + + class PropertyArray extends Property { + constructor(value?: Property[]); + getValue(time?: JulianDate, result?: any[]): any[]; + setValue(value: Property[]): void; + } + + class RectangleGeometryUpdater extends GeometryUpdater { + constructor(entity: Entity, scene: Scene); + } + + class RectangleGraphics { + definitionChanged: Event; + show: Property; + coordinates: Property; + material: MaterialProperty; + height: Property; + extrudedHeight: Property; + granularity: Property; + stRotation: Property; + rotation: Property; + fill: Property; + outline: Property; + outlineColor: Property; + outlineWidth: Property; + closeTop: Property; + closeBottom: Property; + constructor(options?: { + coordinates?: Property; + height?: Property; + extrudedHeight?: Property; + closeTop?: Property; + closeBottom?: Property; + show?: Property; + fill?: Property; + material?: MaterialProperty; + outline?: Property; + outlineColor?: Property; + outlineWidth?: Property; + rotation?: Property; + stRotation?: Property; + granularity?: Property + }); + clone(result?: RectangleGraphics): RectangleGraphics; + merge(source: RectangleGraphics): RectangleGraphics; + } + + class ReferenceProperty extends Property { + readonly referenceFrame: ReferenceFrame; + readonly targetId: string; + readonly targetCollection: EntityCollection; + readonly targetPropertyNames: string[]; + readonly resolvedProperty: Property; + constructor(targetCollection: EntityCollection, targetId: string, targetPropertyNames: string); + getValueInReferenceFrame(time: JulianDate, referenceFrame: ReferenceFrame, result?: Cartesian3): Cartesian3; + getType(time: JulianDate): string; + static fromString(targetCollection: Entity, referenceString: string): ReferenceProperty; + } + + class SampledPositionProperty extends SampledProperty { + numberOfDerivatives: boolean; + constructor(referenceFrame?: ReferenceFrame, numberOfDerivatives?: number); + addSample(time: JulianDate, position: Cartesian3, derivatives?: Cartesian3[]): void; + addSamples(times: JulianDate[], positions: Cartesian3[], derivatives?: any[][]): void; + addSamplesPackedArray(packedSamples: number[], epoch?: JulianDate): void; + } + + class SampledProperty extends PositionProperty { + type: any; + derivativeTypes: Packable[]; + interpolationDegree: number; + interpolationAlgorithm: InterpolationAlgorithm; + forwardExtrapolationType: ExtrapolationType; + forwardExtrapolationDuration: number; + backwardExtrapolationType: ExtrapolationType; + backwardExtrapolationDuration: number; + constructor(type: number | Packable, derivativeTypes?: Packable[]); + setInterpolationOptions(options?: { interpolationAlgorithm?: InterpolationAlgorithm; interpolationDegree?: number }): void; + addSample(time: JulianDate, value: Packable, derivatives?: Packable[]): void; + addSamples(times: JulianDate[], values: Packable[], derivativeValues?: any[][]): void; + addSamplesPackedArray(packedSamples: number[], epoch?: JulianDate): void; + } + + class StripeMaterialProperty extends MaterialProperty { + orientation: Property; + evenColor: Color; + oddColor: Color; + offset: Property; + repeat: number; + constructor(options?: { evenColor?: Property; oddColor?: Property; repeat?: Property; offset?: Property; orientation?: Property }); + } + + class TimeIntervalCollectionPositionProperty extends PositionProperty { + intervals: TimeIntervalCollection; + constructor(referenceFrame?: ReferenceFrame); + } + + class TimeIntervalCollectionProperty extends Property { + intervals: TimeIntervalCollection; + } + + class VelocityOrientationProperty extends Property { + position: Property; + ellipsoid: Property; + constructor(position?: Property, ellipsoid?: Ellipsoid); + getValue(time?: JulianDate, result?: Quaternion): Quaternion; + } + + abstract class Visualizer { + update(time: JulianDate): boolean; + isDestroyed(): boolean; + destroy(): void; + } + + class WallGeometryUpdater extends GeometryUpdater { + constructor(entity: Entity, scene: Scene); + } + + class WallGraphics { + readonly definitionChanged: Event; + show: Property; + material: MaterialProperty; + positions: Property; + minimumHeights: Property; + maximumHeights: Property; + granularity: Property; + fill: Property; + outline: Property; + outlineColor: Property; + outlineWidth: Property; + constructor(options?: { + positions?: Property; + maximumHeights?: Property; + minimumHeights?: Property; + show?: Property; + fill?: Property; + material?: MaterialProperty; + outline?: Property; + outlineColor?: Property; + outlineWidth?: Property; + granularity?: Property + }); + clone(result?: WallGraphics): WallGraphics; + merge(source: WallGraphics): WallGraphics; + } + + class Appearance { + readonly closed: boolean; + readonly fragmentShaderSource: string; + material: Material; + readonly renderState: any; + translucent: boolean; + readonly vertexShaderSource: string; + constructor(options?: { translucent?: boolean; closed?: boolean; material?: Material; vertexShaderSource?: string; fragmentShaderSource?: string; renderState?: RenderState }); + getFragmentShaderSource(): string; + isTranslucent(): boolean; + getRenderState(): any; + } + + class ArcGisMapServerImageryProvider extends ImageryProvider { + url: string; + usingPrecachedTiles: boolean; + constructor(options: { + url: string; + tileDiscardPolicy?: TileDiscardPolicy; + proxy?: Proxy; + usePreCachedTilesIfAvailable?: boolean; + enablePickFeatures?: boolean; + rectangle?: Rectangle; + tilingScheme?: TilingScheme; + ellipsoid?: Ellipsoid; + tileWidth?: number; + tileHeight?: number; + maximumLevel?: number + }, layers?: string); + } + + class DistanceDisplayCondition extends Packable { + far: number; + near: number; + constructor(near: number, far: number); + static clone(value?: DistanceDisplayCondition, result?: DistanceDisplayCondition): DistanceDisplayCondition; + static equals(left: DistanceDisplayCondition, right: DistanceDisplayCondition): boolean; + static pack(value: DistanceDisplayCondition, array: number[], startingIndex: number): number[]; + static unpack(array: number[], startingIndex: number, result: DistanceDisplayCondition): DistanceDisplayCondition; + clone(result: DistanceDisplayCondition): DistanceDisplayCondition; + equals(other: DistanceDisplayCondition): boolean; + } + + class Billboard { + alignedAxis: Cartesian3; + color: Color; + disableDepthTestDistance: number; + distanceDisplayCondition: DistanceDisplayCondition; + eyeOffset: Cartesian3; + height: number; + heightReference: HeightReference; + horizontalOrigin: HorizontalOrigin; + id: any; + image: string; + pixelOffset: Cartesian2; + pixelOffsetScaleByDistance: NearFarScalar; + position: Cartesian3; + readonly ready: boolean; + rotation: number; + scale: number; + scaleByDistance: NearFarScalar; + show: boolean; + sizeInMeters: boolean; + translucencyByDistance: NearFarScalar; + verticalOrigin: VerticalOrigin; + width: number; + computeScreenSpacePosition(scene: Scene, result?: Cartesian2): Cartesian2; + equals(other: Billboard): boolean; + setImage(id: string, image: HTMLImageElement | HTMLCanvasElement | string | Billboard.CreateImageCallback): void; + setImageSubRegion(id: string, subRegion: BoundingRectangle): void; + } + + namespace Billboard { + type CreateImageCallback = (id: string) => HTMLImageElement | HTMLCanvasElement | Promise; + } + + class BillboardCollection { + blendOption: BlendOption; + debugShowBoundingVolume: boolean; + length: number; + modelMatrix: Matrix4; + constructor(options?: { modelMatrix?: Matrix4; debugShowBoundingVolume?: boolean; scene?: Scene; blendOption?: BlendOption }); + add(billboard?: any): Billboard; + contains(billboard?: Billboard): boolean; + destroy(): void; + get(index: number): Billboard; + isDestroyed(): boolean; + remove(billboard: Billboard): boolean; + removeAll(): void; + update(): void; + } + + class BingMapsImageryProvider extends ImageryProvider { + readonly url: string; + readonly key: string; + readonly mapStyle: BingMapsStyle; + readonly culture: string; + constructor(options: { url: string; key?: string; tileProtocol?: string; mapStyle?: string; culture?: string; ellipsoid?: Ellipsoid; tileDiscardPolicy?: TileDiscardPolicy; proxy?: Proxy }); + static tileXYToQuadKey(x: number, y: number, level: number): string; + static quadKeyToTileXY(quadkey: string): {x: number, y: number, level: number}; + } + + // tslint:disable-next-line no-unnecessary-class + class EasingFunction { + static BACK_IN: EasingFunction.Callback; + static BACK_IN_OUT: EasingFunction.Callback; + static BACK_OUT: EasingFunction.Callback; + static BOUNCE_IN: EasingFunction.Callback; + static BOUNCE_IN_OUT: EasingFunction.Callback; + static BOUNCE_OUT: EasingFunction.Callback; + static CIRCULAR_IN: EasingFunction.Callback; + static CIRCULAR_IN_OUT: EasingFunction.Callback; + static CIRCULAR_OUT: EasingFunction.Callback; + static CUBIC_IN: EasingFunction.Callback; + static CUBIC_IN_OUT: EasingFunction.Callback; + static CUBIR_OUT: EasingFunction.Callback; + static ELASTIC_IN: EasingFunction.Callback; + static ELASTIC_IN_OUT: EasingFunction.Callback; + static ELASTIC_OUT: EasingFunction.Callback; + static EXPONENTIAL_IN: EasingFunction.Callback; + static EXPONENTIAL_IN_OUT: EasingFunction.Callback; + static EXPONENTIAL_OUT: EasingFunction.Callback; + static LINEAR_NONE: EasingFunction.Callback; + static QUADRATIC_IN: EasingFunction.Callback; + static QUADRATIC_IN_OUT: EasingFunction.Callback; + static QUADRATIC_OUT: EasingFunction.Callback; + static QUARTIC_IN: EasingFunction.Callback; + static QUARTIC_IN_OUT: EasingFunction.Callback; + static QUARTIC_OUT: EasingFunction.Callback; + static QUINTIC_IN: EasingFunction.Callback; + static QUINTIC_IN_OUT: EasingFunction.Callback; + static QUINTIC_OUT: EasingFunction.Callback; + static SINUSOIDAL_IN: EasingFunction.Callback; + static SINUSOIDAL_IN_OUT: EasingFunction.Callback; + static SINUSOIDAL_OUT: EasingFunction.Callback; + } + + namespace EasingFunction { + type Callback = (time: number) => number; + } + + class Camera { + position: Cartesian3; + direction: Cartesian3; + up: Cartesian3; + right: Cartesian3; + frustum: Frustum; + defaultMoveAmount: number; + defaultLookAmount: number; + defaultRotateAmount: number; + defaultZoomAmount: number; + constrainedAxis: Cartesian3; + maximumTranslateFactor: number; + maximumZoomFactor: number; + readonly transform: Matrix4; + readonly inverseTransform: Matrix4; + readonly viewMatrix: Matrix4; + readonly inverseViewMatrix: Matrix4; + readonly positionCartographic: Cartographic; + readonly positionWC: Cartesian3; + percentageChanged: number; + readonly directionWC: Cartesian3; + readonly upWC: Cartesian3; + readonly rightWC: Cartesian3; + readonly heading: number; + readonly pitch: number; + readonly roll: number; + readonly moveStart: Event; + readonly moveEnd: Event; + static DEFAULT_OFFSET: HeadingPitchRange; + static DEFAULT_VIEW_RECTANGLE: Rectangle; + static DEFAULT_VIEW_FACTOR: number; + readonly changed: Event; + constructor(scene: Scene); + cameraToWorldCoordinates(cartesian: Cartesian4, result?: Cartesian4): Cartesian4; + cameraToWorldCoordinatesPoint(cartesian: Cartesian3, result?: Cartesian3): Cartesian3; + cameraToWorldCoordinatesVector(cartesian: Cartesian3, result?: Cartesian3): Cartesian3; + cancelFlight(): void; + computeViewRectangle(ellipsoid?: Ellipsoid, result?: Rectangle): Rectangle | undefined; + distanceToBoundingSphere(boundingSphere: BoundingSphere): number; + flyHome(duration: number): void; + flyTo(options: { + destination: Cartesian3 | Rectangle; + orientation?: any; + duration?: number; + complete?: Camera.FlightCompleteCallback; + cancel?: Camera.FlightCancelledCallback; + endTransform?: Matrix4; + maximumHeight?: number; + pitchAdjustHeight?: number; + flyOverLongitude?: number; + flyOverLongitudeWeight?: number; + easingFunction?: EasingFunction + }): void; + flyToBoundingSphere(boundingSphere: BoundingSphere, options?: { + duration?: number; + offset?: HeadingPitchRange; + complete?: Camera.FlightCompleteCallback; + cancel?: Camera.FlightCancelledCallback; + endTransform?: Matrix4; + maximumHeight?: number; + pitchAdjustHeight?: number; + flyOverLongitude?: number; + flyOverLongitudeWeight?: number; + easingFunction?: EasingFunction + }): void; + getMagnitude(): number; + getPickRay(windowPosition: Cartesian2, result?: Ray): Ray; + getPixelSize(boundingSphere: BoundingSphere, drawingBufferWidth: number, drawingBufferHeight: number): number; + getRectangleCameraCoordinates(rectangle: Rectangle, result?: Cartesian3): Cartesian3; + look(axis: Cartesian3, angle?: number): void; + lookAt(target: Cartesian3, offset: Cartesian3 | HeadingPitchRange): void; + lookAtTransform(transform: Matrix4, offset: Cartesian3 | HeadingPitchRange): void; + lookDown(amount?: number): void; + lookLeft(amount?: number): void; + lookRight(amount?: number): void; + lookUp(amount?: number): void; + move(direction: Cartesian3, amount?: number): void; + moveBackward(amount?: number): void; + moveDown(amount?: number): void; + moveForward(amount?: number): void; + moveLeft(amount?: number): void; + moveRight(amount?: number): void; + moveUp(amount?: number): void; + pickEllipsoid(windowPosition: Cartesian2, ellipsoid?: Ellipsoid, result?: Cartesian3): Cartesian3; + rotate(axis: Cartesian3, angle?: number): void; + rotateDown(angle?: number): void; + rotateLeft(angle?: number): void; + rotateRight(angle?: number): void; + rotateUp(angle?: number): void; + setView(options: {destination?: Cartesian3 | Rectangle; orientation?: any; endTransform?: Matrix4}): void; + switchToOrthographicFrustum(): void; + switchToPerspectiveFrustum(): void; + twistLeft(amount?: number): void; + twistRight(amount?: number): void; + viewBoundingSphere(boundingSphere: BoundingSphere, offset?: HeadingPitchRange): void; + worldToCameraCoordinates(cartesian: Cartesian4, result?: Cartesian4): Cartesian4; + worldToCameraCoordinatesPoint(cartesian: Cartesian3, result?: Cartesian3): Cartesian3; + worldToCameraCoordinatesVector(cartesian: Cartesian3, result?: Cartesian3): Cartesian3; + zoomIn(amount?: number): void; + zoomOut(amount?: number): void; + } + + namespace Camera { + type FlightCancelledCallback = () => void; + type FlightCompleteCallback = () => void; + } + + class CameraEventAggregator { + currentMousePosition: Cartesian2; + anyButtonDown: boolean; + constructor(element?: HTMLCanvasElement); + isMoving(type: CameraEventType, modifier?: KeyboardEventModifier): boolean; + getMovement(type: CameraEventType, modifier?: KeyboardEventModifier): any; + getLastMovement(type: CameraEventType, modifier?: KeyboardEventModifier): any; + isButtonDown(type: CameraEventType, modifier?: KeyboardEventModifier): boolean; + getStartMousePosition(type: CameraEventType, modifier?: KeyboardEventModifier): Cartesian2; + getButtonPressTime(type: CameraEventType, modifier?: KeyboardEventModifier): Date; + getButtonReleaseTime(type: CameraEventType, modifier?: KeyboardEventModifier): Date; + reset(): void; + isDestroyed(): boolean; + destroy(): void; + } + + class CreditDisplay { + static cesiumCredit: Credit; + container: HTMLElement; + constructor(container: HTMLElement, delimiter?: string, viewport?: HTMLElement); + addCredit(credit: Credit): void; + addDefaultCredit(credit: Credit): void; + beginFrame(credit: Credit): void; + destroy(): void; + endFrame(credit: Credit): void; + isDestroyed(): boolean; + removeDefaultCredit(credit: Credit): void; + update(): void; + } + + class CullingVolume { + planes: Cartesian4[]; + constructor(planes: Cartesian4[]); + computeVisibility(boundingVolume: any): Intersect; + } + + class DebugAppearance extends Appearance { + readonly attributeName: string; + readonly glslDatatype: string; + constructor(options: { attributeName: string; glslDatatype?: string; vertexShaderSource?: string; fragmentShaderSource?: string; renderState?: RenderState }); + } + + class DebugModelMatrixPrimitive { + length: number; + width: number; + show: boolean; + modelMatrix: Matrix4; + id: any; + constructor(options?: { length?: number; width?: number; modelMatrix?: Matrix4; show?: boolean; id?: any }); + isDestroyed(): boolean; + destroy(): void; + } + + class DiscardMissingTileImagePolicy { + constructor(options: { missingImageUrl: Resource | string; pixelsToCheck: Cartesian2[]; disableCheckIfAllPixelsAreTransparent?: boolean }); + isReady(): boolean; + shouldDiscardImage(image: HTMLImageElement): boolean; + } + + class EllipsoidPrimitive { + center: Cartesian3; + radii: Cartesian3; + modelMatrix: Matrix4; + show: boolean; + material: Material; + id: any; + debugShowBoundingVolume: boolean; + constructor(options?: { center?: Cartesian3; radii?: Cartesian3; modelMatrix?: Matrix4; show?: boolean; material?: Material; id?: any; debugShowBoundingVolume?: boolean }); + update(): void; + isDestroyed(): boolean; + destroy(): void; + } + + class EllipsoidSurfaceAppearance extends Appearance { + readonly vertexFormat: VertexFormat; + readonly flat: boolean; + readonly faceForward: boolean; + readonly aboveGround: boolean; + static VERTEX_FORMAT: VertexFormat; + constructor(options?: { + flat?: boolean; + faceForward?: boolean; + translucent?: boolean; + aboveGround?: boolean; + material?: Material; + vertexShaderSource?: string; + fragmentShaderSource?: string; + renderState?: RenderState + }); + } + + class FrameRateMonitor { + samplingWindow: number; + quietPeriod: number; + warmupPeriod: number; + minimumFrameRateDuringWarmup: number; + minimumFrameRateAfterWarmup: number; + scene: Scene; + lowFrameRate: Event; + nominalFrameRate: Event; + lastFramesPerSecond: number; + static defaultSettings: any; + constructor(options?: { + scene: Scene; + samplingWindow?: number; + quietPeriod?: number; + warmupPeriod?: number; + minimumFrameRateDuringWarmup?: number; + minimumFrameRateAfterWarmup?: number + }); + pause(): void; + unpause(): void; + isDestroyed(): boolean; + destroy(): void; + static fromScene(scene: Scene): FrameRateMonitor; + } + + // tslint:disable-next-line no-unnecessary-class + class GetFeatureInfoFormat { + constructor(type: string, format?: string, callback?: (res: any) => any); + } + + class Globe { + terrainProvider: TerrainProvider; + northPoleColor: Cartesian3; + southPoleColor: Cartesian3; + show: boolean; + oceanNormalMapUrl: string; + depthTestAgainstTerrain: boolean; + maximumScreenSpaceError: number; + tileCacheSize: number; + enableLighting: boolean; + lightingFadeOutDistance: number; + lightingFadeInDistance: number; + showWaterEffect: boolean; + ellipsoid: Ellipsoid; + imageryLayers: ImageryLayerCollection; + baseColor: Color; + constructor(ellipsoid?: Ellipsoid); + pick(ray: Ray, scene: Scene, result?: Cartesian3): Cartesian3; + getHeight(cartographic: Cartographic): number; + isDestroyed(): boolean; + destroy(): void; + } + + class GoogleEarthEnterpriseImageryProvider extends ImageryProvider { + url: string; + path: string; + channel: number; + version: number; + requestType: string; + constructor(options: { + url: string; + channel: number; + path?: string; + maximumLevel?: number; + tileDiscardPolicy?: TileDiscardPolicy; + ellipsoid?: Ellipsoid; + proxy?: Proxy + }); + } + + class GridImageryProvider extends ImageryProvider { + constructor(options?: { + tilingScheme?: TilingScheme; + ellipsoid?: Ellipsoid; + cells?: number; + color?: Color; + glowColor?: Color; + glowWidth?: number; + tileWidth?: number; + tileHeight?: number; + canvasSize?: number + }, backgroundColor?: Color); + } + + class HeadingPitchRange { + heading: number; + pitch: number; + range: number; + constructor(heading?: number, pitch?: number, range?: number); + static clone(hpr: HeadingPitchRange, result?: HeadingPitchRange): HeadingPitchRange; + } + + class ImageryLayer { + alpha: number; + brightness: number; + contrast: number; + hue: number; + saturation: number; + gamma: number; + show: boolean; + imageryProvider: ImageryProvider; + rectangle: Rectangle; + static DEFAULT_BRIGHTNESS: number; + static DEFAULT_CONTRAST: number; + static DEFAULT_HUE: number; + static DEFAULT_SATURATION: number; + static DEFAULT_GAMMA: number; + constructor(imageryProvider: ImageryProvider, options?: { + rectangle?: Rectangle; + alpha?: number | ImageryLayer.ValueFunc; + brightness?: number | ImageryLayer.ValueFunc; + contrast?: number | ImageryLayer.ValueFunc; + hue?: number | ImageryLayer.ValueFunc; + saturation?: number | ImageryLayer.ValueFunc; + gamma?: number | ImageryLayer.ValueFunc; + show?: boolean; + maximumAnisotropy?: number; + minimumTerrainLevel?: number; + maximumTerrainLevel?: number + }); + isBaseLayer(): boolean; + isDestroyed(): boolean; + destroy(): void; + } + + namespace ImageryLayer { + type ValueFunc = (frameState: any, layer: ImageryLayer, x: number, y: number, level: number) => number; + } + + class ImageryLayerCollection { + layerAdded: Event; + layerRemoved: Event; + layerMoved: Event; + layerShownOrHidden: Event; + length: number; + add(layer: ImageryLayer, index?: number): void; + addImageryProvider(imageryProvider: ImageryProvider, index?: number): ImageryLayer; + remove(layer: ImageryLayer, destroy?: boolean): boolean; + removeAll(destroy?: boolean): void; + contains(layer: ImageryLayer): boolean; + indexOf(layer: ImageryLayer): number; + get(index: number): ImageryLayer; + raise(layer: ImageryLayer): void; + lower(layer: ImageryLayer): void; + raiseToTop(layer: ImageryLayer): void; + lowerToBottom(layer: ImageryLayer): void; + pickImageryLayerFeatures(ray: Ray, scene: Scene): Promise | undefined; + isDestroyed(): boolean; + destroy(): void; + } + + class ImageryLayerFeatureInfo { + name: string; + description: string; + position: Cartographic; + data: any; + configureNameFromProperties(properties: any): void; + configureDescriptionFromProperties(properties: any): void; + } + + abstract class ImageryProvider { + credit: Credit; + defaultAlpha: number; + defaultBrightness: number; + defaultContrast: number; + defaultGamma: number; + defaultHue: number; + defaultSaturation: number; + defaultMagnificationFilter: any; + defaultMinificationFilter: any; + readonly errorEvent: Event; + readonly hasAlphaChannel: boolean; + readonly maximumLevel: number; + readonly minimumLevel: number; + readonly proxy: Proxy; + readonly ready: boolean; + readonly readyPromise: Promise; + readonly rectangle: Rectangle; + readonly tileDiscardPolicy: TileDiscardPolicy; + readonly tileWidth: number; + readonly tileHeight: number; + readonly tilingScheme: TilingScheme; + getTileCredits(x: number, y: number, level: number): Credit[]; + requestImage(x: number, y: number, level: number): Promise; + pickFeatures(x: number, y: number, level: number, longitude: number, latitude: number): Promise; + static loadImage(url: string): Promise; + } + + class Label { + show: boolean; + position: Cartesian3; + text: string; + font: string; + fillColor: Color; + outlineColor: Color; + outlineWidth: number; + style: LabelStyle; + pixelOffset: Cartesian2; + translucencyByDistance: NearFarScalar; + pixelOffsetScaleByDistance: NearFarScalar; + eyeOffset: Cartesian3; + horizontalOrigin: HorizontalOrigin; + verticalOrigin: VerticalOrigin; + scale: number; + id: any; + computeScreenSpacePosition(scene: Scene, result?: Cartesian2): Cartesian2; + equals(other: Label): boolean; + isDestroyed(): boolean; + } + + class LabelCollection { + modelMatrix: Matrix4; + debugShowBoundingVolume: boolean; + length: number; + constructor(options?: { modelMatrix?: Matrix4; debugShowBoundingVolume?: boolean }); + add(options?: any): Label; + remove(label: Label): boolean; + removeAll(): void; + contains(label: Label): boolean; + get(index: number): Label; + isDestroyed(): boolean; + destroy(): void; + } + + class Material { + type: string; + shaderSource: string; + materials: any; + uniforms: any; + translucent: boolean; + static DefaultImageId: string; + static DefaultCubeMapId: string; + static ColorType: string; + static ImageType: string; + static DiffuseMapType: string; + static AlphaMapType: string; + static SpecularMapType: string; + static EmissionMapType: string; + static BumpMapType: string; + static NormalMapType: string; + static GridType: string; + static StripeType: string; + static CheckerboardType: string; + static DotType: string; + static WaterType: string; + static RimLightingType: string; + static FadeType: string; + static PolylineArrowType: string; + static PolylineGlowType: string; + static PolylineOutlineType: string; + constructor(options?: { strict?: boolean; translucent?: boolean; fabric: any }); + isTranslucent(): boolean; + isDestroyed(): boolean; + destroy(): void; + static fromType(type: string, uniforms?: any): Material; + } + + class MaterialAppearance extends Appearance { + readonly materialSupport: MaterialAppearance.MaterialSupport; + readonly vertexFormat: VertexFormat; + readonly flat: boolean; + readonly faceForward: boolean; + constructor(options?: { + flat?: boolean; + faceForward?: boolean; + translucent?: boolean; + closed?: boolean; + materialSupport?: MaterialAppearance.MaterialSupport; + material?: Material; + vertexShaderSource?: string; + fragmentShaderSource?: string; + renderState?: RenderState + }); + } + + namespace MaterialAppearance { + enum MaterialSupport { + BASIC, + TEXTURED, + ALL + } + } + + class Model { + show: boolean; + modelMatrix: Matrix4; + scale: number; + minimumPixelSize: number; + id: any; + activeAnimations: ModelAnimationCollection; + debugShowBoundingVolume: boolean; + debugWireframe: boolean; + gltf: any; + basePath: string; + boundingSphere: BoundingSphere; + ready: boolean; + readyPromise: Promise; + asynchronous: boolean; + allowPicking: boolean; + constructor(options?: { + gltf?: any; + basePath?: string; + show?: boolean; + modelMatrix?: Matrix4; + scale?: number; + minimumPixelSize?: number; + id?: any; + allowPicking?: boolean; + asynchronous?: boolean; + debugShowBoundingVolume?: boolean; + debugWireframe?: boolean + }); + getNode(name: string): ModelNode; + getMesh(name: string): ModelMesh; + getMaterial(name: string): ModelMaterial; + update(): void; + isDestroyed(): boolean; + destroy(): void; + static fromGltf(options: { + url: string; + headers?: any; + show?: boolean; + modelMatrix?: Matrix4; + scale?: number; + minimumPixelSize?: number; + allowPicking?: boolean; + asynchronous?: boolean; + debugShowBoundingVolume?: boolean; + debugWireframe?: boolean + }): Model; + } + + class ModelAnimation { + removeOnStop: boolean; + start: Event; + update: Event; + stop: Event; + name: string; + startTime: JulianDate; + delay: number; + stopTime: JulianDate; + speedup: number; + reverse: boolean; + loop: ModelAnimationLoop; + } + + class ModelAnimationCollection { + animationAdded: Event; + animationRemoved: Event; + length: number; + add(options: { + name: string; + startTime?: JulianDate; + delay?: number; + stopTime?: JulianDate; + removeOnStop?: boolean; + speedup?: number; + reverse?: boolean; + loop?: ModelAnimationLoop + }): ModelAnimation; + addAll(options?: { + startTime?: JulianDate; + delay?: number; + stopTime?: JulianDate; + removeOnStop?: boolean; + speedup?: number; + reverse?: boolean; + loop?: ModelAnimationLoop + }): ModelAnimation[]; + remove(animation: ModelAnimation): boolean; + removeAll(): void; + contains(animation: ModelAnimation): boolean; + get(index: number): ModelAnimation; + } + + class ModelMaterial { + readonly name: string; + readonly id: string; + setValue(name: string, value?: any): void; + getValue(name: string): any; + } + + class ModelMesh { + name: string; + id: string; + materials: ModelMaterial[]; + } + + class ModelNode { + name: string; + id: string; + show: boolean; + matrix: Matrix4; + } + + class Moon { + show: boolean; + textureUrl: string; + onlySunLighting: boolean; + ellipsoid: Ellipsoid; + constructor(options?: { show?: boolean; textureUrl?: string; ellipsoid?: Ellipsoid; onlySunLighting?: boolean }); + isDestroyed(): boolean; + destroy(): void; + } + + class NeverTileDiscardPolicy { + isReady(): boolean; + shouldDiscardImage(image: HTMLImageElement | Promise): Promise; + } + + class PerInstanceColorAppearance extends Appearance { + readonly vertexFormat: VertexFormat; + readonly flat: boolean; + readonly faceForward: boolean; + static VERTEX_FORMAT: VertexFormat; + static FLAT_VERTEX_FORMAT: VertexFormat; + constructor(options?: { flat?: boolean; + faceForward?: boolean; + translucent?: boolean; + closed?: boolean; + vertexShaderSource?: string; + fragmentShaderSource?: string; + renderState?: RenderState + }); + } + + abstract class Frustum { + near: number; + far: number; + readonly projectionMatrix: Matrix4; + computeCullingVolume(position: Cartesian3, direction: Cartesian3, up: Cartesian3): CullingVolume; + getPixelDimensions(drawingBufferWidth: number, drawingBufferHeight: number, distance: number, result: Cartesian2): Cartesian2; + } + + class OrthographicFrustum extends Frustum { + aspectRatio: number; + width: number; + static packedLength: number; + constructor(options?: {width: number; aspectRatio: number; near: number; far: number}); + pack(value: OrthographicFrustum, array: number[], startingIndex: number): number[]; + unpack(array: number[], startingIndex: number, result: OrthographicFrustum): OrthographicFrustum; + clone(result?: OrthographicFrustum): OrthographicFrustum; + equals(other?: OrthographicFrustum): boolean; + } + + class PerspectiveFrustum extends Frustum { + fov: number; + aspectRatio: number; + xOffset: number; + yOffset: number; + readonly infiniteProjectionMatrix: Matrix4; + readonly fovy: number; + static packedLength: number; + constructor(options?: {fov: number; aspectRatio: number; near: number; far: number; xOffset: number; yOffset: number}); + pack(value: PerspectiveFrustum, array: number[], startingIndex: number): number[]; + unpack(array: number[], startingIndex: number, result: PerspectiveFrustum): PerspectiveFrustum; + clone(result?: PerspectiveFrustum): PerspectiveFrustum; + equals(other?: PerspectiveFrustum): boolean; + } + + class PerspectiveOffCenterFrustum extends Frustum { + left: number; + right: number; + top: number; + bottom: number; + readonly infiniteProjectionMatrix: Matrix4; + constructor(options?: {left: number; right: number; top: number; bottom: number; near: number; far: number}); + clone(result?: PerspectiveOffCenterFrustum): PerspectiveOffCenterFrustum; + equals(other?: PerspectiveOffCenterFrustum): boolean; + } + + class PointPrimitive { + color: Color; + disableDepthTestDistance: number; + distanceDisplayCondition: DistanceDisplayCondition; + id: any; + outlineColor: Color; + outlineWidth: number; + pixelSize: number; + position: Cartesian3; + scaleByDistance: NearFarScalar; + show: boolean; + translucencyByDistance: NearFarScalar; + computeScreenSpacePosition(scene: Scene, result?: Cartesian2): Cartesian2; + equals(other: PointPrimitive): boolean; + } + + class PointPrimitiveCollection { + blendOption: BlendOption; + debugShowBoundingVolume: boolean; + length: number; + modelMatrix: Matrix4; + constructor(options?: { modelMatrix?: Matrix4; debugShowBoundingVolume?: boolean, blendOption?: BlendOption }); + add(pointPrimitive?: any): PointPrimitive; + contains(pointPrimitive?: PointPrimitive): boolean; + destroy(): void; + get(index: number): PointPrimitive; + isDestroyed(): boolean; + remove(pointPrimitive: PointPrimitive): boolean; + removeAll(): void; + } + + class Polyline { + show: boolean; + positions: Cartesian3[]; + material: Material; + width: number; + loop: boolean; + id: any; + constructor(options?: { show?: boolean; width?: number; loop?: boolean; material?: Material; positions?: Cartesian3[]; id?: any }); + } + + class PolylineCollection { + modelMatrix: Matrix4; + debugShowBoundingVolume: boolean; + length: number; + constructor(options?: { modelMatrix?: Matrix4; debugShowBoundingVolume?: boolean }); + add(polyline?: any): Polyline; + remove(polyline: Polyline): boolean; + removeAll(): void; + contains(polyline: Polyline): boolean; + get(index: number): Polyline; + isDestroyed(): boolean; + destroy(): void; + } + + class PolylineColorAppearance extends Appearance { + readonly vertexFormat: VertexFormat; + static VERTEX_FORMAT: VertexFormat; + constructor(options?: { translucent?: boolean; vertexShaderSource?: string; fragmentShaderSource?: string; renderState?: RenderState }); + } + + class PolylineMaterialAppearance extends Appearance { + readonly vertexFormat: VertexFormat; + static VERTEX_FORMAT: VertexFormat; + constructor(options?: { translucent?: boolean; material?: Material; vertexShaderSource?: string; fragmentShaderSource?: string; renderState?: RenderState }); + } + + class Primitive { + readonly allowPicking: boolean; + appearance: Appearance; + readonly asynchronous: boolean; + readonly compressVertices: boolean; + cull: boolean; + debugShowBoundingVolume: boolean; + depthFailAppearance: Appearance; + readonly geometryInstances: GeometryInstance[] | GeometryInstance; + readonly interleave: boolean; + modelMatrix: Matrix4; + readonly ready: boolean; + readonly readyPromise: Promise; + readonly releaseGeometryInstances: boolean; + shadows: ShadowMode; + show: boolean; + readonly vertexCacheOptimize: boolean; + constructor(options?: { + geometryInstances?: any[] | GeometryInstance; + appearance?: Appearance; + show?: boolean; + modelMatrix?: Matrix4; + vertexCacheOptimize?: boolean; + interleave?: boolean; + compressVertices?: boolean; + releaseGeometryInstances?: boolean; + allowPicking?: boolean; + cull?: boolean; + asynchronous?: boolean; + debugShowBoundingVolume?: boolean; + shadows: ShadowMode + }); + destroy(): void; + getGeometryInstanceAttributes(id: any): any; + isDestroyed(): boolean; + update(): void; + } + + class PrimitiveCollection { + show: boolean; + destroyPrimitives: boolean; + readonly length: number; + constructor(options?: { show?: boolean; destroyPrimitives?: boolean }); + add(primitive: any): any; + remove(primitive?: any): boolean; + removeAll(): void; + contains(primitive?: any): boolean; + raise(primitive?: any): void; + raiseToTop(primitive?: any): void; + lower(primitive?: any): void; + lowerToBottom(primitive?: any): void; + get(index: number): any; + isDestroyed(): boolean; + destroy(): void; + } + + class RectanglePrimitive { + ellipsoid: Ellipsoid; + rectangle: Rectangle; + granularity: number; + height: number; + rotation: number; + textureRotationAngle: number; + show: boolean; + material: Material; + id: any; + asynchronous: boolean; + debugShowBoundingVolume: boolean; + constructor(options?: { + ellipsoid?: Ellipsoid; + rectangle?: Rectangle; + granularity?: number; + height?: number; + rotation?: number; + textureRotationAngle?: number; + show?: boolean; + material?: Material; + id?: any; + asynchronous?: boolean; + debugShowBoundingVolume?: boolean + }); + update(): void; + isDestroyed(): boolean; + destroy(): void; + } + + class Scene { + backgroundColor: Color; + readonly camera: Camera; + readonly canvas: Element; + completeMorphOnUserInput: boolean; + debugCommandFilter: (command: any) => boolean; + readonly debugFrustumStatistics: any; + debugShowCommands: boolean; + debugShowDepthFrustum: number; + debugShowFramesPerSecond: boolean; + debugShowFrustumPlanes: boolean; + debugShowFrustums: boolean; + readonly drawingBufferHeight: number; + readonly drawingBufferWidth: number; + eyeSeparation: number; + farToNearRatio: number; + focalLength: number; + fog: Fog; + fxaa: boolean; + globe: Globe; + readonly groundPrimitives: PrimitiveCollection; + readonly id: string; + readonly imageryLayers: ImageryLayerCollection; + imagerySplitPosition: number; + invertClassification: boolean; + invertClassificationColor: Color; + readonly lastRenderTime: JulianDate; + logarithmicDepthFarToNearRatio: number; + mapMode2D: boolean; + readonly mapProjection: MapProjection; + readonly maximumAliasedLineWidth: number; + readonly maximumCubeMapSize: number; + maximumRenderTimeChange: number; + minimumDisableDepthTestDistance: number; + mode: SceneMode; + moon: Moon; + morphComplete: Event; + morphStart: Event; + morphTime: number; + nearToFarDistance2D: number; + readonly orderIndependentTranslucency: boolean; + readonly pickPositionSupported: boolean; + pickTranslucentDepth: boolean; + readonly postRender: Event; + readonly preRender: Event; + readonly preUpdate: Event; + readonly primitives: PrimitiveCollection; + readonly renderError: Event; + requestRenderMode: boolean; + rethrowRenderErrors: boolean; + readonly scene3DOnly: boolean; + readonly screenSpaceCameraController: ScreenSpaceCameraController; + shadowMap: ShadowMap; + skyAtmosphere: SkyAtmosphere; + skyBox: SkyBox; + sun: Sun; + sunBloom: boolean; + terrainExaggeration: number; + terrainProvider: TerrainProvider; + readonly terrainProviderChanged: Event; + useDepthPicking: boolean; + useWebVR: boolean; + constructor(options?: { + canvas: HTMLCanvasElement; + contextOptions?: any; + creditContainer?: Element; + creditViewport?: Element; + mapProjection?: MapProjection; + orderIndependentTranslucency?: boolean; + scene3DOnly?: boolean; + terrainExaggeration?: number; + shadows?: boolean; + mapMode2D?: MapMode2D; + requestRenderMode?: boolean; + maximumRenderTimeChange?: number + }); + cartesianToCanvasCoordinates(position: Cartesian3, result?: Cartesian2): Cartesian2; + completeMorph(): void; + destroy(): void; + drillPick(windowPosition: Cartesian2, limit?: number): any[]; + getCompressedTextureFormatSupported(format: string): boolean; + isDestroyed(): boolean; + morphTo2D(duration?: number): void; + morphTo3D(duration?: number): void; + morphToColumbusView(duration?: number): void; + pick(windowPosition: Cartesian2, width?: number, height?: number): any; + pickPosition(windowPosition: Cartesian2, result?: Cartesian3): Cartesian3; + requestRender(): void; + } + + class ScreenSpaceCameraController { + enableInputs: boolean; + enableTranslate: boolean; + enableZoom: boolean; + enableRotate: boolean; + enableTilt: boolean; + enableLook: boolean; + inertiaSpin: number; + inertiaTranslate: number; + inertiaZoom: number; + maximumMovementRatio: number; + bounceAnimationTime: number; + minimumZoomDistance: number; + maximumZoomDistance: number; + translateEventTypes: CameraEventType | any[]; + zoomEventTypes: CameraEventType | any[]; + rotateEventTypes: CameraEventType | any[]; + tiltEventTypes: CameraEventType | any[]; + lookEventTypes: CameraEventType | any[]; + minimumPickingTerrainHeight: number; + minimumCollisionTerrainHeight: number; + minimumTrackBallHeight: number; + enableCollisionDetection: boolean; + constructor(scene: Scene); + isDestroyed(): boolean; + destroy(): void; + } + + class SingleTileImageryProvider extends ImageryProvider { + url: string; + constructor(options: { url: string; rectangle?: Rectangle; credit?: Credit | string; ellipsoid?: Ellipsoid; proxy?: any }); + } + + class SkyAtmosphere { + show: boolean; + ellipsoid: Ellipsoid; + constructor(ellipsoid?: Ellipsoid); + isDestroyed(): boolean; + destroy(): void; + } + + class SkyBox { + sources: any; + show: boolean; + constructor(options: { sources?: any; show?: boolean }); + update(): void; + isDestroyed(): boolean; + destroy(): void; + } + + class Sun { + show: boolean; + glowFactor: number; + isDestroyed(): boolean; + destroy(): void; + } + + class Fog { + density: number; + enabled: boolean; + minimumBrightness: number; + screenSpaceErrorFactor: number; + } + + class TileCoordinatesImageryProvider extends ImageryProvider { + constructor(options?: { tilingScheme?: TilingScheme; ellipsoid?: Ellipsoid; color?: Color; tileWidth?: number; tileHeight?: number }); + } + + class TileDiscardPolicy { + isReady(): boolean; + shouldDiscardImage(image: HTMLImageElement | Promise): Promise; + } + + class TileMapServiceImageryProvider extends ImageryProvider { + url: string; + constructor(options?: { + url?: string; + fileExtension?: string; + proxy?: any; + credit?: Credit | string; + minimumLevel?: number; + maximumLevel?: number; + rectangle?: Rectangle; + tilingScheme?: TilingScheme; + ellipsoid?: Ellipsoid; + tileWidth?: number; + tileHeight?: number + }); + } + + class ViewportQuad { + show: boolean; + rectangle: BoundingRectangle; + material: Material; + constructor(rectangle?: BoundingRectangle, material?: Material); + update(): void; + isDestroyed(): boolean; + destroy(): void; + } + + class WebMapServiceImageryProvider extends ImageryProvider { + readonly url: string; + static DefaultParameters: {service: string, version: string, request: string, styles: string, format: string}; + static GetFeatureInfoDefaultParameters: {service: string, version: string, request: string}; + constructor(options: { + url: string; + layers: string; + parameters?: any; + getFeatureInfoParameters?: any; + enablePickFeatures?: boolean; + getFeatureInfoFormats?: GetFeatureInfoFormat[]; + rectangle?: Rectangle; + tilingScheme?: TilingScheme; + ellipsoid?: Ellipsoid; + tileWidth?: number; + tileHeight?: number; + minimumLevel?: number; + maximumLevel?: number; + crs?: string; + srs?: string; + credit?: Credit | string; + subdomains?: string | string[] + }); + } + + class WebMapTileServiceImageryProvider extends ImageryProvider { + clock: Clock; + dimensions: any; + readonly format: string; + times: TimeIntervalCollection; + readonly url: string; + constructor(options: { + url: string; + format?: string; + layer: string; + style: string; + tileMatrixSetID: string; + tileMatrixLabels?: any[]; + clock?: Clock; + times?: TimeIntervalCollection; + dimensions?: any; + tileWidth?: number; + tileHeight?: number; + tilingScheme?: TilingScheme; + rectangle?: Rectangle; + minimumLevel?: number; + maximumLevel?: number; + ellipsoid?: Ellipsoid; + credit?: Credit | string; + subdomains?: string | string[] + }); + } + + class Animation { + readonly container: Element; + readonly viewModel: AnimationViewModel; + constructor(container: Element | string, viewModel: AnimationViewModel); + isDestroyed(): boolean; + destroy(): void; + resize(): void; + applyThemeChanges(): void; + } + + class AnimationViewModel { + shuttleRingDragging: boolean; + snapToTicks: boolean; + timeLabel: string; + dateLabel: string; + multiplierLabel: string; + shuttleRingAngle: number; + slower: Command; + faster: Command; + clockViewModel: ClockViewModel; + pauseViewModel: ToggleButtonViewModel; + playReverseViewModel: ToggleButtonViewModel; + playForwardViewModel: ToggleButtonViewModel; + playRealtimeViewModel: ToggleButtonViewModel; + dateFormatter: AnimationViewModel.DateFormatter; + timeFormatter: AnimationViewModel.TimeFormatter; + static defaultDateFormatter: AnimationViewModel.DateFormatter; + static defaultTicks: number[]; + static defaultTimeFormatter: AnimationViewModel.TimeFormatter; + constructor(clockViewModel: ClockViewModel); + getShuttleRingTicks(): number[]; + setShuttleRingTicks(positiveTicks: number[]): void; + } + + namespace AnimationViewModel { + type DateFormatter = (date: JulianDate, viewModel: AnimationViewModel) => string; + type TimeFormatter = (date: JulianDate, viewModel: AnimationViewModel) => string; + } + + class BaseLayerPicker { + container: Element; + viewModel: BaseLayerPickerViewModel; + constructor(container: Element, options: { + globe: Globe; + imageryProviderViewModels?: ProviderViewModel[]; + selectedImageryProviderViewModel?: ProviderViewModel; + terrainProviderViewModels?: ProviderViewModel[]; + selectedTerrainProviderViewModel?: ProviderViewModel + }); + isDestroyed(): boolean; + destroy(): void; + } + + class BaseLayerPickerViewModel { + imageryProviderViewModels: ProviderViewModel[]; + terrainProviderViewModels: ProviderViewModel[]; + dropDownVisible: boolean; + buttonTooltip: string; + buttonImageUrl: string; + selectedImagery: ProviderViewModel; + selectedTerrain: ProviderViewModel; + toggleDropDown: Command; + globe: Globe; + constructor(options: { + globe: Globe; + imageryProviderViewModels?: ProviderViewModel[]; + selectedImageryProviderViewModel?: ProviderViewModel; + terrainProviderViewModels?: ProviderViewModel[]; + selectedTerrainProviderViewModel?: ProviderViewModel + }); + } + + class ProviderViewModel { + name: string; + tooltip: string; + iconUrl: string; + creationCommand: Command; + constructor(options: { name: string; tooltip: string; iconUrl: string; creationFunction: ProviderViewModel.CreationFunction | Command }); + } + + namespace ProviderViewModel { + type CreationFunction = () => ImageryProvider | TerrainProvider | ImageryProvider[] | TerrainProvider[]; + } + + class CesiumInspector { + container: Element; + viewModel: CesiumInspectorViewModel; + constructor(container: Element | string, scene: Scene); + isDestroyed(): boolean; + destroy(): void; + } + + class CesiumInspectorViewModel { + frustums: boolean; + performance: boolean; + shaderCacheText: string; + primitiveBoundingSphere: boolean; + primitiveReferenceFrame: boolean; + filterPrimitive: boolean; + tileBoundingSphere: boolean; + filterTile: boolean; + wireframe: boolean; + suspendUpdates: boolean; + tileCoordinates: boolean; + frustumStatisticText: string; + tileText: string; + hasPickedPrimitive: boolean; + hasPickedTile: boolean; + pickPimitiveActive: boolean; + pickTileActive: boolean; + dropDownVisible: boolean; + generalVisible: boolean; + primitivesVisible: boolean; + terrainVisible: boolean; + generalSwitchText: string; + primitivesSwitchText: string; + terrainSwitchText: string; + scene: Scene; + performanceContainer: Element; + toggleDropDown: Command; + showFrustums: Command; + showPerformance: Command; + showPrimitiveBoundingSphere: Command; + showPrimitiveReferenceFrame: Command; + doFilterPrimitive: Command; + showWireframe: Command; + doSuspendUpdates: Command; + showTileCoordinates: Command; + showTileBoundingSphere: Command; + doFilterTile: Command; + toggleGeneral: Command; + togglePrimitives: Command; + toggleTerrain: Command; + pickPrimitive: Command; + pickTile: Command; + selectParent: Command; + selectNW: Command; + selectNE: Command; + selectSW: Command; + selectSE: Command; + primitive: Command; + tile: Command; + constructor(scene: Scene); + isDestroyed(): boolean; + destroy(): void; + } + + class CesiumWidget { + container: Element; + canvas: HTMLCanvasElement; + creditContainer: Element; + creditViewport: Element; + scene: Scene; + readonly imageryLayers: ImageryLayerCollection; + terrainProvider: TerrainProvider; + readonly camera: Camera; + clock: Clock; + screenSpaceEventHandler: ScreenSpaceEventHandler; + targetFrameRate: number; + useDefaultRenderLoop: boolean; + resolutionScale: number; + constructor(container: Element | string, options?: { + clock?: Clock; + imageryProvider?: ImageryProvider; + terrainProvider?: TerrainProvider; + skyBox?: SkyBox; + skyAtmosphere?: SkyAtmosphere; + sceneMode?: SceneMode; + scene3DOnly?: boolean; + orderIndependentTranslucency?: boolean; + mapProjection?: MapProjection; + globe?: Globe; + useDefaultRenderLoop?: boolean; + targetFrameRate?: number; + showRenderLoopErrors?: boolean; + contextOptions?: any; + creditContainer?: Element | string; + creditViewport?: Element | string; + terrainExaggeration?: number; + shadows?: boolean; + terrainShadows?: ShadowMode; + mapMode2D?: MapMode2D; + requestRenderMode?: boolean; + maximumRenderTimeChange?: number + }); + showErrorPanel(title: string, message: string, error?: string): void; + isDestroyed(): boolean; + destroy(): void; + resize(): void; + render(): void; + } + + class ClockViewModel { + systemTime: JulianDate; + startTime: JulianDate; + stopTime: JulianDate; + currentTime: JulianDate; + multiplier: number; + clockStep: ClockStep; + clockRange: ClockRange; + canAnimate: boolean; + shouldAnimate: boolean; + clock: Clock; + constructor(clock?: Clock); + synchronize(): void; + isDestroyed(): boolean; + destroy(): void; + } + + class Command { + canExecute: boolean; + beforeExecute: Event; + afterExecute: Event; + } + + class FullscreenButton { + container: Element; + viewModel: FullscreenButtonViewModel; + constructor(container: Element | string, fullscreenElement?: Element | string); + isDestroyed(): boolean; + destroy(): void; + } + + class FullscreenButtonViewModel { + isFullscreen: boolean; + isFullscreenEnabled: boolean; + tooltip: string; + fullscreenElement: Element; + command: Command; + constructor(fullscreenElement?: Element | string); + isDestroyed(): boolean; + destroy(): void; + } + + class Geocoder { + container: Element; + viewModel: GeocoderViewModel; + constructor(options: { container: Element | string; scene: Scene; url?: string; key?: string; flightDuration?: number }); + isDestroyed(): boolean; + destroy(): void; + } + + class GeocoderViewModel { + isSearchInProgress: boolean; + searchText: string; + flightDuration: number; + url: string; + key: string; + complete: Event; + scene: Scene; + search: Command; + constructor(options: { scene: Scene; url?: string; key?: string; flightDuration?: number }); + } + + class HomeButton { + container: Element; + viewModel: HomeButtonViewModel; + constructor(container: Element | string, scene: Scene, duration?: number); + isDestroyed(): boolean; + destroy(): void; + } + + class HomeButtonViewModel { + tooltip: string; + scene: Scene; + command: Command; + duration: number; + constructor(scene: Scene, duration?: number); + } + + class VRButton { + container: Element; + viewModel: VRButtonViewModel; + constructor(container: Element | string, scene: Scene, vrElement: Element | string); + destroy(): void; + isDestroyed(): boolean; + } + + class VRButtonViewModel { + command: Command; + isVREnabled: boolean; + isVRMode: boolean; + tooltip: string; + vrElement: Element; + constructor(scene: Scene, vrElement: Element | string); + destroy(): void; + isDestroyed(): boolean; + } + + class InfoBox { + container: Element; + viewModel: InfoBoxViewModel; + frame: HTMLIFrameElement; + constructor(container: Element | string); + isDestroyed(): boolean; + destroy(): void; + } + + class InfoBoxViewModel { + maxHeight: number; + enableCamera: boolean; + isCameraTracking: boolean; + showInfo: boolean; + titleText: string; + description: string; + cameraIconPath: string; + cameraClicked: Event; + closeClicked: Event; + maxHeightOffset(offset: number): string; + } + + class NavigationHelpButton { + container: Element; + viewModel: NavigationHelpButtonViewModel; + constructor(options: { container: Element | string; instructionsInitiallyVisible?: boolean }); + isDestroyed(): boolean; + destroy(): void; + } + + class NavigationHelpButtonViewModel { + showInstructions: boolean; + tooltip: string; + command: Command; + showClick: Command; + showTouch: Command; + } + + class PerformanceWatchdog { + container: Element; + viewModel: PerformanceWatchdogViewModel; + constructor(options?: { container: Element | string; scene: Scene; lowFrameRateMessage?: string }); + isDestroyed(): boolean; + destroy(): void; + } + + class PerformanceWatchdogViewModel { + lowFrameRateMessage: string; + lowFrameRateMessageDismissed: boolean; + showingLowFrameRateMessage: boolean; + scene: Scene; + dismissMessage: Command; + constructor(options?: { scene: Scene; lowFrameRateMessage?: string }); + } + + class ProjectionPicker { + container: Element; + viewModel: ProjectionPickerViewModel; + constructor(container: Element | string, scene: Scene); + destroy(): void; + isDestroyed(): boolean; + } + + class ProjectionPickerViewModel { + dropDownVisible: boolean; + isOrthographicProjection: Command; + scene: Scene; + sceneMode: SceneMode; + selectedTooltip: string; + switchToOrthographic: Command; + switchToPerspective: Command; + toggleDropdown: Command; + tooltipOrthographic: string; + tooltipPerspective: string; + constructor(scene: Scene); + destroy(): void; + isDestroyed(): boolean; + } + + class SceneModePicker { + container: Element; + viewModel: SceneModePickerViewModel; + constructor(container: Element | string, scene: Scene, duration?: number); + isDestroyed(): boolean; + destroy(): void; + } + + class SceneModePickerViewModel { + sceneMode: SceneMode; + dropDownVisible: boolean; + tooltip2D: string; + tooltip3D: string; + tooltipColumbusView: string; + selectedTooltip: string; + scene: Scene; + duration: number; + toggleDropDown: Command; + morphTo2D: Command; + morphTo3D: Command; + morphToColumbusView: Command; + constructor(scene: Scene, duration?: number); + isDestroyed(): boolean; + destroy(): void; + } + + class SelectionIndicator { + container: Element; + viewModel: SelectionIndicatorViewModel; + constructor(container: Element | string, scene: Scene); + isDestroyed(): boolean; + destroy(): void; + } + + class SelectionIndicatorViewModel { + position: Cartesian3; + showSelection: boolean; + isVisible: boolean; + computeScreenSpacePosition: SelectionIndicatorViewModel.ComputeScreenSpacePosition; + container: Element; + selectionIndicatorElement: Element; + scene: Scene; + constructor(scene: Scene, selectionIndicatorElement: Element, container: Element); + update(): void; + animateAppear(): void; + animateDepart(): void; + } + + namespace SelectionIndicatorViewModel { + type ComputeScreenSpacePosition = (position: Cartesian3, result: Cartesian2) => Cartesian2; + } + + class Timeline { + container: Element; + constructor(container: Element, clock: Clock); + isDestroyed(): boolean; + destroy(): void; + zoomTo(startTime: JulianDate, stopTime: JulianDate): void; + resize(): void; + } + + class ToggleButtonViewModel { + toggled: boolean; + tooltip: string; + command: Command; + constructor(command: Command, options?: { toggled?: boolean; tooltip?: string }); + } + + class Viewer { + readonly container: Element; + readonly bottomContainer: Element; + readonly cesiumWidget: CesiumWidget; + readonly selectionIndicator: SelectionIndicator; + readonly infoBox: InfoBox; + readonly geocoder: Geocoder; + readonly homeButton: HomeButton; + readonly sceneModePicker: SceneModePicker; + readonly projectionPicker: ProjectionPicker; + readonly navigationHelpButton: NavigationHelpButton; + readonly baseLayerPicker: BaseLayerPicker; + readonly animation: Animation; + readonly timeline: Timeline; + readonly fullscreenButton: FullscreenButton; + readonly dataSourceDisplay: DataSourceDisplay; + readonly entities: EntityCollection; + readonly dataSources: DataSourceCollection; + readonly canvas: HTMLCanvasElement; + readonly scene: Scene; + readonly imageryLayers: ImageryLayerCollection; + terrainProvider: TerrainProvider; + terrainShadows: ShadowMode; + readonly camera: Camera; + clockTrackedDataSource: DataSource; + readonly clockViewModel: ClockViewModel; + readonly clock: Clock; + readonly screenSpaceEventHandler: ScreenSpaceEventHandler; + targetFrameRate: number; + useDefaultRenderLoop: boolean; + resolutionScale: number; + allowDataSourcesToSuspendAnimation: boolean; + trackedEntity: Entity; + selectedEntity: Entity; + readonly trackedEntityChanged: Event; + readonly selectedEntityChanged: Event; + readonly shadowMap: ShadowMap; + readonly vrButton: VRButton; + shadows: boolean; + constructor(container: Element | string, options?: { + animation?: boolean; + baseLayerPicker?: boolean; + fullscreenButton?: boolean; + vrButton?: boolean; + geocoder?: boolean; + homeButton?: boolean; + infoBox?: boolean; + sceneModePicker?: boolean; + selectionIndicator?: boolean; + timeline?: boolean; + navigationHelpButton?: boolean; + navigationInstructionsInitiallyVisible?: boolean; + scene3DOnly?: boolean; + shouldAnimate?: boolean; + clockViewModel?: ClockViewModel; + selectedImageryProviderViewModel?: ProviderViewModel; + imageryProviderViewModels?: ProviderViewModel[]; + selectedTerrainProviderViewModel?: ProviderViewModel; + terrainProviderViewModels?: ProviderViewModel[]; + imageryProvider?: ImageryProvider; + terrainProvider?: TerrainProvider; + skyBox?: SkyBox; + skyAtmosphere?: SkyAtmosphere; + fullscreenElement?: Element | string; + useDefaultRenderLoop?: boolean; + targetFrameRate?: number; + showRenderLoopErrors?: boolean; + automaticallyTrackDataSourceClocks?: boolean; + contextOptions?: any; + sceneMode?: SceneMode; + mapProjection?: MapProjection; + globe?: Globe; + orderIndependentTranslucency?: boolean; + creditContainer?: Element | string; + creditViewport?: Element | string; + dataSources?: DataSourceCollection; + terrainExaggeration?: number; + shadows?: boolean; + terrainShadows?: ShadowMode; + mapMode2D?: MapMode2D; + projectionPicker?: boolean; + requestRenderMode?: boolean; + maximumRenderTimeChange?: number + }); + extend(mixin: Viewer.ViewerMixin, options: any): void; + resize(): void; + forceResize(): void; + render(): void; + isDestroyed(): boolean; + destroy(): void; + zoomTo(target: Entity | Entity[] | EntityCollection | DataSource | Promise, offset?: HeadingPitchRange): Promise; + flyTo(target: Entity | Entity[] | EntityCollection | DataSource | Promise, + options?: { duration?: number; maximumHeight?: number; offset?: HeadingPitchRange }): Promise; + } + + namespace Viewer { + type ViewerMixin = (viewer: Viewer, options: any) => void; + } + + function barycentricCoordinates(point: Cartesian2 | Cartesian3, p0: Cartesian2 | Cartesian3, p1: Cartesian2 | Cartesian3, p2: Cartesian2 | Cartesian3, result?: Cartesian3): Cartesian3; + + function binarySearch(array: any[], itemToFind: any, comparator: binarySearch.Comparator): number; + + namespace binarySearch { + type Comparator = (a: any, b: any) => number; + } + + function cancelAnimationFrame(requestID: number): undefined; + + function clone(object: any, deep?: boolean): any; + + function combine(object1?: any, object2?: any, deep?: boolean): any; + + function destroyObject(object: any, message?: string): undefined; + + function formatError(object: any): string; + + function getFilenameFromUri(uri: string): string; + + function getImagePixels(image: HTMLImageElement): number[]; + + function isArray(value: any): boolean; + + function isLeapYear(year: number): boolean; + + function jsonp(url: string, options?: { parameters?: any; callbackParameterName?: string; proxy?: any }): Promise; + + function loadArrayBuffer(url: string | Promise, headers?: any): Promise; + + function loadBlob(url: string | Promise, headers?: any): Promise; + + function loadImage(url: string | Promise, allowCrossOrigin?: boolean): Promise; + + function loadImageViaBlob(url: string | Promise): Promise; + + function loadJson(url: string | Promise, headers?: any): Promise; + + function loadText(url: string | Promise, headers?: any): Promise; + + function loadWithXhr(options: { url: string | Promise; responseType?: string; method?: string; data?: string; headers?: any; overrideMimeType?: string }): Promise; + + function loadXML(url: string | Promise, headers?: any): Promise; + + function mergeSort(array: any[], comparator: mergeSort.Comparator, userDefinedObject?: any): undefined; + + namespace mergeSort { + type Comparator = (a: any, b: any, userDefinedObject?: any) => number; + } + + function objectToQuery(obj: any): string; + + function pointInsideTriangle(point: Cartesian2 | Cartesian3, p0: Cartesian2 | Cartesian3, p1: Cartesian2 | Cartesian3, p2: Cartesian2 | Cartesian3): boolean; + + function queryToObject(queryString: string): any; + + function requestAnimationFrame(callback: requestAnimationFrame.Callback): number; + + namespace requestAnimationFrame { + type Callback = (timestamp: number) => void; + } + + function sampleTerrain(terrainProvider: TerrainProvider, level: number, positions: Cartographic[]): Promise; + + function subdivideArray(array: any[], numberOfArrays: number): undefined; + + function throttleRequestByServer(url: string, requestFunction: throttleRequestByServer.RequestFunction): Promise; + + namespace throttleRequestByServer { + type RequestFunction = (url: string) => Promise; + } + + function createTangentSpaceDebugPrimitive(options: { geometry: Geometry; length?: number; modelMatrix?: Matrix4 }): Primitive; + + function viewerCesiumInspectorMixin(viewer: Viewer): undefined; + + function viewerDragDropMixin(viewer: Viewer, options?: { dropTarget?: Element | string; clearOnDrop?: boolean; flyToOnDrop?: boolean; clampToGround?: boolean; proxy?: DefaultProxy }): undefined; + + function viewerPerformanceWatchdogMixin(viewer: Viewer): undefined; + + function createCommand(func: () => any, canExecute?: boolean): Command; + + function createTaskProcessorWorker(workerFunction: createTaskProcessorWorker.WorkerFunction): createTaskProcessorWorker.TaskProcessorWorkerFunction; + + namespace createTaskProcessorWorker { + type WorkerFunction = (parameters: any, transferableObjects: any[]) => any; + type TaskProcessorWorkerFunction = (event: any) => void; + } + + enum ClockRange { + UNBOUNDED, + CLAMPED, + LOOP_STOP, + } + + enum ClockStep { + TICK_DEPENDENT, + SYSTEM_CLOCK_MULTIPLIER, + SYSTEM_CLOCK, + } + + enum ComponentDatatype { + BYTE, + UNSIGNED_BYTE, + SHORT, + UNSIGNED_SHORT, + FLOAT, + DOUBLE, + } + + namespace ComponentDatatype { + function getSizeInBytes(componentDatatype: ComponentDatatype): number; + function fromTypedArray(array: Int8Array | Uint8Array | Int16Array | Uint16Array | Float32Array | Float64Array): ComponentDatatype; + function validate(componentDatatype: ComponentDatatype): boolean; + function createTypedArray(componentDatatype: ComponentDatatype, valuesOrLength: number | any[]): Int8Array | Uint8Array | Int16Array | Uint16Array | Float32Array | Float64Array; + function createArrayBufferView(componentDatatype: ComponentDatatype, buffer: ArrayBuffer, byteOffset?: number, length?: number): + Int8Array | Uint8Array | Int16Array | Uint16Array | Float32Array | Float64Array; + } + + enum CornerType { + ROUNDED, + MITERED, + BEVELED, + } + + namespace CubicRealPolynomial { + function computeDiscriminant(a: number, b: number, c: number, d: number): number; + function computeRealRoots(a: number, b: number, c: number, d: number): number[]; + } + + enum ExtrapolationType { + NONE, + HOLD, + EXTRAPOLATE, + } + + namespace FeatureDetection { + function supportsFullscreen(): boolean; + function supportsTypedArrays(): boolean; + function supportsWebAssembly(): boolean; + function supportsWebWorkers(): boolean; + } + + enum Fullscreen { + element, + changeEventName, + errorEventName, + enabled, + fullscreen, + } + + namespace Fullscreen { + function supportsFullscreen(): boolean; + function requestFullscreen(element: any): undefined; + function exitFullscreen(): undefined; + } + + namespace GeometryPipeline { + function toWireframe(geometry: Geometry): Geometry; + function createLineSegmentsForVectors(geometry: Geometry, attributeName?: string, length?: number): Geometry; + function createAttributeLocations(geometry: Geometry): any; + function reorderForPreVertexCache(geometry: Geometry): Geometry; + function reorderForPostVertexCache(geometry: Geometry, cacheCapacity?: number): Geometry; + function fitToUnsignedShortIndices(geometry: Geometry): Geometry[]; + function projectTo2D(geometry: Geometry, attributeName: string, attributeName3D: string, attributeName2D: string, projection?: any): Geometry; + function encodeAttribute(geometry: Geometry, attributeName: string, attributeHighName: string, attributeLowName: string): Geometry; + function transformToWorldCoordinates(instance: GeometryInstance): GeometryInstance; + function computeNormal(geometry: Geometry): Geometry; + function computeBinormalAndTangent(geometry: Geometry): Geometry; + function compressVertices(geometry: Geometry): Geometry; + } + + enum HeightmapTessellator { + DEFAULT_STRUCTURE, + } + + namespace HeightmapTessellator { + function computeVertices(options: { + vertices: any[] | Float32Array; + heightmap: Int8Array | Uint8Array | Int16Array | Uint16Array | Float32Array | Float64Array; + width: number; + height: number; + skirtHeight: number; + nativeRectangle: Rectangle; + rectangle?: Rectangle; + isGeographic?: boolean; + relativetoCenter?: Cartesian3; + ellipsoid?: Ellipsoid; + structure?: any; + structureheightScale?: number; + structureheightOffset?: number; + structureelementsPerHeight?: number; + structurestride?: number; + structureelementMultiplier?: number; + structureisBigEndian?: boolean + }): undefined; + } + + enum HeightReference { + CLAMP_TO_GROUND, + NONE, + RELATIVE_TO_GROUND + } + + class HermitePolynomialApproximation extends InterpolationAlgorithm { + static getRequiredDataPoints(degree: number, inputOrder?: number): number; + } + + enum IndexDatatype { + UNSIGNED_BYTE, + UNSIGNED_SHORT, + UNSIGNED_INT, + } + + namespace IndexDatatype { + function getSizeInBytes(indexDatatype: IndexDatatype): number; + function validate(indexDatatype: IndexDatatype): boolean; + function createTypedArray(numberOfVertices: number, indicesLengthOrArray: any): Uint16Array | Uint32Array; + function createTypedArrayFromArrayBuffer(numberOfVertices: number, sourceArray: ArrayBuffer, byteOffset: number, length: number): Uint16Array | Uint32Array; + } + + // tslint:disable-next-line no-unnecessary-class + class InterpolationAlgorithm { + static type: string; + static getRequiredDataPoints(degree: number): number; + static interpolateOrderZero(x: number, xTable: number[], yTable: number[], yStride: number, result?: number[]): number[]; + static interpolate(x: number, xTable: number[], yTable: number[], yStride: number, inputOrder: number, outputOrder: number, result?: number[]): number[]; + } + + enum Intersect { + OUTSIDE, + INTERSECTING, + INSIDE, + } + + namespace IntersectionTests { + function rayPlane(ray: Ray, plane: Plane, result?: Cartesian3): Cartesian3; + function rayTriangle(ray: Ray, p0: Cartesian3, p1: Cartesian3, p2: Cartesian3, cullBackFaces?: boolean, result?: Cartesian3): Cartesian3; + function lineSegmentTriangle(v0: Cartesian3, v1: Cartesian3, p0: Cartesian3, p1: Cartesian3, p2: Cartesian3, cullBackFaces?: boolean, result?: Cartesian3): Cartesian3; + function raySphere(ray: Ray, sphere: BoundingSphere, result?: any): any; + function lineSegmentSphere(p0: Cartesian3, p1: Cartesian3, sphere: BoundingSphere, result?: any): any; + function rayEllipsoid(ray: Ray, ellipsoid: Ellipsoid): any; + function grazingAltitudeLocation(ray: Ray, ellipsoid: Ellipsoid): Cartesian3; + function lineSegmentPlane(endPoint0: Cartesian3, endPoint1: Cartesian3, plane: Plane, result?: Cartesian3): Cartesian3; + function trianglePlaneIntersection(p0: Cartesian3, p1: Cartesian3, p2: Cartesian3, plane: Plane): any; + } + + namespace Intersections2D { + function clipTriangleAtAxisAlignedThreshold(threshold: number, keepAbove: boolean, u0: number, u1: number, u2: number, result?: number[]): number[]; + function computeBarycentricCoordinates(x: number, y: number, x1: number, y1: number, x2: number, y2: number, x3: number, y3: number, result?: Cartesian3): Cartesian3; + } + + enum Iso8601 { + MINIMUM_VALUE, + MAXIMUM_VALUE, + MAXIMUM_INTERVAL, + } + + enum KeyboardEventModifier { + SHIFT, + CTRL, + ALT, + } + + class LagrangePolynomialApproximation extends InterpolationAlgorithm {} + + class LinearApproximation extends InterpolationAlgorithm {} + + enum MapMode2D { + INFINITE_SCROLL, + ROTATE + } + + enum Math { + EPSILON1, + EPSILON2, + EPSILON3, + EPSILON4, + EPSILON5, + EPSILON6, + EPSILON7, + EPSILON8, + EPSILON9, + EPSILON10, + EPSILON11, + EPSILON12, + EPSILON13, + EPSILON14, + EPSILON15, + EPSILON16, + EPSILON17, + EPSILON18, + EPSILON19, + EPSILON20, + GRAVITATIONALPARAMETER, + SOLAR_RADIUS, + LUNAR_RADIUS, + SIXTY_FOUR_KILOBYTES, + PI, + ONE_OVER_PI, + PI_OVER_TWO, + PI_OVER_THREE, + PI_OVER_FOUR, + PI_OVER_SIX, + THREE_PI_OVER_TWO, + TWO_PI, + ONE_OVER_TWO_PI, + RADIANS_PER_DEGREE, + DEGREES_PER_RADIAN, + RADIANS_PER_ARCSECOND, + } + + namespace Math { + function sign(value: number): number; + function signNotZero(value: number): number; + function toSNorm(value: number): number; + function fromSNorm(value: number): number; + function sinh(value: number): number; + function cosh(value: number): number; + function lerp(p: number, q: number, time: number): number; + function toRadians(degrees: number): number; + function toDegrees(radians: number): number; + function convertLongitudeRange(angle: number): number; + function negativePiToPi(angle: number): number; + function zeroToTwoPi(angle: number): number; + function mod(m: number, n: number): number; + function equalsEpsilon(left: number, right: number, relativeEpsilon: number, absoluteEpsilon?: number): boolean; + function factorial(n: number): number; + function incrementWrap(n?: number, maximumValue?: number, minimumValue?: number): number; + function isPowerOfTwo(n: number): boolean; + function nextPowerOfTwo(n: number): number; + function clamp(value: number, min: number, max: number): number; + function setRandomNumberSeed(seed: number): undefined; + function nextRandomNumber(): number; + function acosClamped(value: number): number; + function asinClamped(value: number): number; + function chordLength(angle: number, radius: number): number; + } + + // tslint:disable-next-line no-unnecessary-class + abstract class Packable { + static packedLength: number; + static pack(value: any, array: number[], startingIndex?: number): number[]; + static unpack(array: number[], startingIndex?: number, result?: any): Packable; + } + + enum PackableForInterpolation { + packedInterpolationLength, + } + + namespace PackableForInterpolation { + function convertPackedArrayForInterpolation(packedArray: number[], startingIndex?: number, lastIndex?: number, result?: number[]): number[]; + function unpackInterpolationResult(array: number[], sourceArray: number[], startingIndex?: number, lastIndex?: number, result?: any): any; + } + + enum PixelFormat { + DEPTH_COMPONENT, + DEPTH_STENCIL, + ALPHA, + RGB, + RGBA, + LUMINANCE, + LUMINANCE_ALPHA, + } + + enum PrimitiveType { + POINTS, + LINES, + LINE_LOOP, + LINE_STRIP, + TRIANGLES, + TRIANGLE_STRIP, + TRIANGLE_FAN, + } + + namespace QuadraticRealPolynomial { + function computeDiscriminant(a: number, b: number, c: number): number; + function computeRealRoots(a: number, b: number, c: number): number[]; + } + + namespace QuarticRealPolynomial { + function computeDiscriminant(a: number, b: number, c: number, d: number, e: number): number; + function computeRealRoots(a: number, b: number, c: number, d: number, e: number): number[]; + } + + enum ReferenceFrame { + FIXED, + INERTIAL, + } + + enum ScreenSpaceEventType { + LEFT_DOWN, + LEFT_UP, + LEFT_CLICK, + LEFT_DOUBLE_CLICK, + RIGHT_DOWN, + RIGHT_UP, + RIGHT_CLICK, + RIGHT_DOUBLE_CLICK, + MIDDLE_DOWN, + MIDDLE_UP, + MIDDLE_CLICK, + MIDDLE_DOUBLE_CLICK, + MOUSE_MOVE, + WHEEL, + PINCH_START, + PINCH_END, + PINCH_MOVE, + } + + namespace Simon1994PlanetaryPositions { + function computeSunPositionInEarthInertialFrame(julianDate?: JulianDate, result?: Cartesian3): Cartesian3; + function computeMoonPositionInEarthInertialFrame(julianDate?: JulianDate, result?: Cartesian3): Cartesian3; + } + + class ShadowMap { + darkness: number; + enabled: boolean; + maximumDistance: number; + normalOffset: boolean; + size: number; + softShadows: boolean; + constructor(obtions: { + lightCamera: Camera; + enabled?: boolean; + isPointLight?: boolean; + pointLightRadius?: number; + cascadesEnabled?: boolean; + numberOfCascades?: number; + maximumDistance?: number; + size?: number; + softShadows?: boolean; + darkness?: number; + normalOffset?: boolean + }); + } + + enum ShadowMode { + CAST_ONLY, + DISABLED, + ENABLED, + RECEIVE_ONLY + } + + enum TimeStandard { + UTC, + TAI, + } + + namespace Transforms { + function eastNorthUpToFixedFrame(origin: Cartesian3, ellipsoid?: Ellipsoid, result?: Matrix4): Matrix4; + function northEastDownToFixedFrame(origin: Cartesian3, ellipsoid?: Ellipsoid, result?: Matrix4): Matrix4; + function northUpEastToFixedFrame(origin: Cartesian3, ellipsoid?: Ellipsoid, result?: Matrix4): Matrix4; + function headingPitchRollToFixedFrame(origin: Cartesian3, heading: number, pitch: number, roll: number, ellipsoid?: Ellipsoid, result?: Matrix4): Matrix4; + function headingPitchRollQuaternion(origin: Cartesian3, heading: number, pitch: number, roll: number, ellipsoid?: Ellipsoid, result?: Quaternion): Quaternion; + function computeTemeToPseudoFixedMatrix(date: JulianDate, result?: Matrix3): Matrix3; + function preloadIcrfFixed(timeInterval: TimeInterval): Promise; + function computeIcrfToFixedMatrix(date: JulianDate, result?: Matrix3): Matrix3; + function computeFixedToIcrfMatrix(date: JulianDate, result?: Matrix3): Matrix3; + function pointToWindowCoordinates(modelViewProjectionMatrix: Matrix4, viewportTransformation: Matrix4, point: Cartesian3, result?: Cartesian2): Cartesian2; + } + + namespace TridiagonalSystemSolver { + function solve(diagonal: number[], lower: number[], upper: number[], right: Cartesian3[]): Cartesian3[]; + } + + enum Visibility { + NONE, + PARTIAL, + FULL, + } + + enum WindingOrder { + CLOCKWISE, + COUNTER_CLOCKWISE, + } + + enum StripeOrientation { + HORIZONTAL, + VERTICAL, + } + + enum BingMapsStyle { + AERIAL, + AERIAL_WITH_LABELS, + ROAD, + ORDNANCE_SURVEY, + COLLINS_BART, + } + + enum BlendEquation { + ADD, + SUBTRACT, + REVERSE_SUBTRACT, + } + + enum BlendFunction { + ZERO, + ONE, + SOURCE_COLOR, + ONE_MINUS_SOURCE_COLOR, + DESTINATION_COLOR, + ONE_MINUS_DESTINATION_COLOR, + SOURCE_ALPHA, + ONE_MINUS_SOURCE_ALPHA, + DESTINATION_ALPHA, + ONE_MINUS_DESTINATION_ALPHA, + CONSTANT_COLOR, + ONE_MINUS_CONSTANT_COLOR, + CONSTANT_ALPHA, + ONE_MINUS_CONSTANT_ALPHA, + SOURCE_ALPHA_SATURATE, + } + + enum BlendingState { + DISABLED, + ALPHA_BLEND, + PRE_MULTIPLIED_ALPHA_BLEND, + ADDITIVE_BLEND, + } + + enum BlendOption { + OPAQUE, + OPAQUE_AND_TRANSLUCENT, + TRANSLUCENT + } + + enum CameraEventType { + LEFT_DRAG, + RIGHT_DRAG, + MIDDLE_DRAG, + WHEEL, + PINCH, + } + + enum CullFace { + FRONT, + BACK, + FRONT_AND_BACK, + } + + enum DepthFunction { + NEVER, + LESS, + EQUAL, + LESS_OR_EQUAL, + GREATER, + NOT_EQUAL, + GREATER_OR_EQUAL, + ALWAYS, + } + + enum HorizontalOrigin { + CENTER, + LEFT, + RIGHT, + } + + enum LabelStyle { + FILL, + OUTLINE, + FILL_AND_OUTLINE, + } + + enum ModelAnimationLoop { + NONE, + REPEAT, + MIRRORED_REPEAT, + } + + enum SceneMode { + MORPHING, + COLUMBUS_VIEW, + SCENE2D, + SCENE3D, + } + + namespace SceneMode { + function getMorphTime(value: SceneMode): number; + } + + namespace SceneTransforms { + function wgs84ToWindowCoordinates(scene: Scene, position: Cartesian3, result?: Cartesian2): Cartesian2; + function wgs84ToDrawingBufferCoordinates(scene: Scene, position: Cartesian3, result?: Cartesian2): Cartesian2; + } + + enum StencilFunction { + NEVER, + LESS, + EQUAL, + LESS_OR_EQUAL, + GREATER, + NOT_EQUAL, + GREATER_OR_EQUAL, + ALWAYS, + } + + enum StencilOperation { + ZERO, + KEEP, + REPLACE, + INCREMENT, + DECREMENT, + INVERT, + INCREMENT_WRAP, + DECREMENT_WRAP, + } + + enum VerticalOrigin { + CENTER, + BOTTOM, + TOP, + } + + function createOpenStreetMapImageryProvider(options: { + url?: string, + fileExtension?: string, + rectangle?: Rectangle, + minimumLevel?: number, + maximumLevel?: number, + ellipsoid?: Ellipsoid, + credit?: Credit | string + }): UrlTemplateImageryProvider; + + function createTileMapServiceImageryProvider(options: { + url?: string, + fileExtension?: string, + credit?: Credit | string, + minimumLevel?: number, + maximumLevel?: number, + rectangle?: Rectangle, + tilingScheme?: TilingScheme, + ellipsoid?: Ellipsoid, + tileWidth?: number, + tileHeight?: number, + flipXY?: boolean + }): UrlTemplateImageryProvider; + + function createWorldImagery(options: { + style?: any // IonWorldImageryStyle + }): IonImageryProvider; + + function createWorldTerrain(options: { + requestVertexNormals?: boolean, + requestWaterMask?: boolean + }): CesiumTerrainProvider; + + class UrlTemplateImageryProvider extends ImageryProvider { + url: string; + pickFeaturesUrl: string; + urlSchemeZeroPadding: {}; + subdomains: string | string[]; + ellipsoid: Ellipsoid; + getFeatureInfoFormats: GetFeatureInfoFormat[]; + enablePickFeatures: boolean; + + constructor(options: { + url: string, + pickFeaturesUrl?: string, + urlSchemeZeroPadding?: {}, + subdomains?: string | string[] + proxy?: {}, + credit?: Credit | string, + minimumLevel?: number, + maximumLevel?: number, + rectangle?: Rectangle, + tilingScheme?: TilingScheme, + ellipsoid?: Ellipsoid, + tileWidth?: number, + tileHeight?: number, + hasAlphaChannel?: boolean, + getFeatureInfoFormats?: GetFeatureInfoFormat[], + enablePickFeatures?: boolean + }); + reinitialize(options: Promise | object): void; + } + + class Resource { + static DEFAULT: Resource; + static readonly isBlobSupported: boolean; + readonly extension: string; + hasHeaders: boolean; + headers: any; + isBlobUri: boolean; + isCrossOriginUrl: boolean; + isDataUri: boolean; + proxy: DefaultProxy; + readonly queryParameters: any; + request: Request; + retryAttempts: number; + retryCallback: () => void; + readonly templateValues: any; + url: string; + static delete(options?: { url: string; data?: any; queryParameters?: any; templateValues?: any; headers?: any; proxy?: DefaultProxy; retryCallback?: Resource.RetryCallback; + retryAttempts?: number; request?: Request; responseType?: string; overrideMimeType?: string }): Promise | undefined; + static fetch(options?: { url: string; queryParameters?: any; templateValues?: any; headers?: any; proxy?: DefaultProxy; retryCallback?: Resource.RetryCallback; + retryAttempts?: number; request?: Request; responseType?: string; overrideMimeType?: string }): Promise | undefined; + static fetchArrayBuffer(options?: { url: string; queryParameters?: any; templateValues?: any; headers?: any; proxy?: DefaultProxy; retryCallback?: Resource.RetryCallback; + retryAttempts?: number; request?: Request }): Promise | undefined; + static fetchBlob(options?: { url: string; queryParameters?: any; templateValues?: any; headers?: any; proxy?: DefaultProxy; retryCallback?: Resource.RetryCallback; + retryAttempts?: number; request?: Request }): Promise | undefined; + static fetchImage(options?: { url: string; queryParameters?: any; templateValues?: any; headers?: any; proxy?: DefaultProxy; retryCallback?: Resource.RetryCallback; + retryAttempts?: number; request?: Request; preferBlob?: boolean }): Promise | undefined; + static fetchJson(options?: { url: string; queryParameters?: any; templateValues?: any; headers?: any; proxy?: DefaultProxy; retryCallback?: Resource.RetryCallback; + retryAttempts?: number; request?: Request }): Promise | undefined; + static fetchJsonp(options?: { url: string; queryParameters?: any; templateValues?: any; headers?: any; proxy?: DefaultProxy; retryCallback?: Resource.RetryCallback; + retryAttempts?: number; request?: Request; callbackParameterName?: string }): Promise | undefined; + static fetchText(options?: { url: string; queryParameters?: any; templateValues?: any; headers?: any; proxy?: DefaultProxy; retryCallback?: Resource.RetryCallback; + retryAttempts?: number; request?: Request }): Promise | undefined; + static fetchXml(options?: { url: string; queryParameters?: any; templateValues?: any; headers?: any; proxy?: DefaultProxy; retryCallback?: Resource.RetryCallback; + retryAttempts?: number; request?: Request }): Promise | undefined; + static head(options?: { url: string; queryParameters?: any; templateValues?: any; headers?: any; proxy?: DefaultProxy; retryCallback?: Resource.RetryCallback; + retryAttempts?: number; request?: Request; responseType?: string; overrideMimeType?: string }): Promise | undefined; + static options(options?: { url: string; queryParameters?: any; templateValues?: any; headers?: any; proxy?: DefaultProxy; retryCallback?: Resource.RetryCallback; + retryAttempts?: number; request?: Request; responseType?: string; overrideMimeType?: string }): Promise | undefined; + static patch(options?: { url: string; data?: any; queryParameters?: any; templateValues?: any; headers?: any; proxy?: DefaultProxy; retryCallback?: Resource.RetryCallback; + retryAttempts?: number; request?: Request; responseType?: string; overrideMimeType?: string }): Promise | undefined; + static post(options?: { url: string; data?: any; queryParameters?: any; templateValues?: any; headers?: any; proxy?: DefaultProxy; retryCallback?: Resource.RetryCallback; + retryAttempts?: number; request?: Request; responseType?: string; overrideMimeType?: string }): Promise | undefined; + static put(options?: { url: string; data?: any; queryParameters?: any; templateValues?: any; headers?: any; proxy?: DefaultProxy; retryCallback?: Resource.RetryCallback; + retryAttempts?: number; request?: Request; responseType?: string; overrideMimeType?: string }): Promise | undefined; + constructor(options?: { url: string; queryParameters?: any; templateValues?: any; headers?: any; proxy?: DefaultProxy; retryCallback?: Resource.RetryCallback; + retryAttempts?: number; request?: Request }); + addQueryParameters(params: any, useAsDefault: boolean): void; + addTemplateValues(template: any, useAsDefault: boolean): void; + appendForwardSlash(): void; + appendQueryParameters(params: any): void; + clone(result: Resource): Resource; + delete(options?: { responseType?: string; headers?: any; overrideMimeType?: string }): Promise | undefined; + fetch(options?: { responseType?: string; headers?: any; overrideMimeType?: string }): Promise | undefined; + fetchArrayBuffer(): Promise | undefined; + fetchBlob(): Promise | undefined; + fetchImage(preferBlob: boolean): Promise | undefined; + fetchJson(): Promise | undefined; + fetchJsonp(callbackParameterName: string): Promise | undefined; + fetchText(): Promise | undefined; + fetchXml(): Promise | undefined; + getBaseUri(includeQuery: boolean): string; + getDerivedResource(options: {url?: string; queryParameters?: any; templateValues?: any; headers?: any; proxy?: DefaultProxy; retryCallback?: Resource.RetryCallback; + retryAttempts?: number; request?: Request; preserveQueryParameters?: boolean}): Resource; + getUrlComponent(query: boolean, proxy: boolean): string; + head(options?: {responseType?: string; headers?: any; overrideMimeType?: string}): Promise | undefined; + options(options?: { responseType?: string; headers?: any; overrideMimeType?: string }): Promise | undefined; + patch(data: any, options?: { responseType?: string; headers?: any; overrideMimeType?: string }): Promise | undefined; + post(data: any, options?: { data?: any; responseType?: string; headers?: any; overrideMimeType?: string }): Promise | undefined; + put(data: any, options?: { responseType?: string; headers?: any; overrideMimeType?: string }): Promise | undefined; + setQueryParameters(params: any, useAsDefault: boolean): void; + setTemplateValues(template: any, useAsDefault: boolean): void; + } + + namespace Resource { + type RetryCallback = (resource: Resource, error: Error) => void; + } + + function defined(value: any): boolean; + + namespace buildModuleUrl { + function setBaseUrl(value: string): undefined; + } +} diff --git a/types/cesium/test/cesium-global.test.ts b/types/cesium/test/cesium-global.test.ts new file mode 100644 index 0000000000..8974e56542 --- /dev/null +++ b/types/cesium/test/cesium-global.test.ts @@ -0,0 +1,48 @@ +Cesium.buildModuleUrl.setBaseUrl('/assets/cesium/'); + +const viewer = new Cesium.Viewer('#cesium', { + sceneMode: Cesium.SceneMode.COLUMBUS_VIEW, + imageryProvider: new Cesium.IonImageryProvider({ assetId: 3845 }), + baseLayerPicker: false, + geocoder: false, +}); + +const midnight = Cesium.JulianDate.fromDate(new Date(2018, 5, 14)); +const prop = new Cesium.SampledPositionProperty(); + +const pos = Cesium.Cartesian3.fromDegrees(1, 2, 3); +const time = Cesium.JulianDate.addSeconds(midnight, 12345, new Cesium.JulianDate()); +prop.addSample(time, pos); +viewer.entities.add(new Cesium.Entity({ + position: pos, + point: new Cesium.PointGraphics({ + color: Cesium.Color.fromCssColorString('#123123'), + pixelSize: 2 + }) +})); + +const objStart = Cesium.JulianDate.addSeconds(midnight, 12340, new Cesium.JulianDate()); +const objStop = Cesium.JulianDate.addSeconds(midnight, 12350, new Cesium.JulianDate()); + +const entity = new Cesium.Entity({ + name: 'TEST', + availability: new Cesium.TimeIntervalCollection([ + new Cesium.TimeInterval({ + start: objStart, + stop: objStop + }) + ]), + position: prop, + orientation: new Cesium.VelocityOrientationProperty(prop), + path: new Cesium.PathGraphics({ + resolution: 5, + width: 3, + material: new Cesium.ColorMaterialProperty(Cesium.Color.fromCssColorString('#223344')), + leadTime: 0 + }), + model: new Cesium.ModelGraphics({ + uri: 'http://assets.agi.com/models/rv1.gltf', + minimumPixelSize: 48 + }) +}); +viewer.entities.add(entity); diff --git a/types/cesium/test/cesium-module.test.ts b/types/cesium/test/cesium-module.test.ts new file mode 100644 index 0000000000..726daf7df2 --- /dev/null +++ b/types/cesium/test/cesium-module.test.ts @@ -0,0 +1,50 @@ +import * as Cesium from 'cesium'; + +Cesium.buildModuleUrl.setBaseUrl('/assets/cesium/'); + +const viewer = new Cesium.Viewer('#cesium', { + sceneMode: Cesium.SceneMode.COLUMBUS_VIEW, + imageryProvider: new Cesium.IonImageryProvider({ assetId: 3845 }), + baseLayerPicker: false, + geocoder: false, +}); + +const midnight = Cesium.JulianDate.fromDate(new Date(2018, 5, 14)); +const prop = new Cesium.SampledPositionProperty(); + +const pos = Cesium.Cartesian3.fromDegrees(1, 2, 3); +const time = Cesium.JulianDate.addSeconds(midnight, 12345, new Cesium.JulianDate()); +prop.addSample(time, pos); +viewer.entities.add(new Cesium.Entity({ + position: pos, + point: new Cesium.PointGraphics({ + color: Cesium.Color.fromCssColorString('#123123'), + pixelSize: 2 + }) +})); + +const objStart = Cesium.JulianDate.addSeconds(midnight, 12340, new Cesium.JulianDate()); +const objStop = Cesium.JulianDate.addSeconds(midnight, 12350, new Cesium.JulianDate()); + +const entity = new Cesium.Entity({ + name: 'TEST', + availability: new Cesium.TimeIntervalCollection([ + new Cesium.TimeInterval({ + start: objStart, + stop: objStop + }) + ]), + position: prop, + orientation: new Cesium.VelocityOrientationProperty(prop), + path: new Cesium.PathGraphics({ + resolution: 5, + width: 3, + material: new Cesium.ColorMaterialProperty(Cesium.Color.fromCssColorString('#223344')), + leadTime: 0 + }), + model: new Cesium.ModelGraphics({ + uri: 'http://assets.agi.com/models/rv1.gltf', + minimumPixelSize: 48 + }) +}); +viewer.entities.add(entity); diff --git a/types/cesium/tsconfig.json b/types/cesium/tsconfig.json new file mode 100644 index 0000000000..e82d8ca16a --- /dev/null +++ b/types/cesium/tsconfig.json @@ -0,0 +1,25 @@ +{ + "compilerOptions": { + "module": "commonjs", + "lib": [ + "es6", + "dom" + ], + "noImplicitAny": true, + "noImplicitThis": true, + "strictNullChecks": true, + "strictFunctionTypes": true, + "baseUrl": "../", + "typeRoots": [ + "../" + ], + "types": [], + "noEmit": true, + "forceConsistentCasingInFileNames": true + }, + "files": [ + "index.d.ts", + "test/cesium-global.test.ts", + "test/cesium-module.test.ts" + ] +} diff --git a/types/cesium/tslint.json b/types/cesium/tslint.json new file mode 100644 index 0000000000..4c4fc86ace --- /dev/null +++ b/types/cesium/tslint.json @@ -0,0 +1,6 @@ +{ + "extends": "dtslint/dt.json", + "rules": { + "strict-export-declare-modifiers": false + } +} diff --git a/types/chai-jest-snapshot/chai-jest-snapshot-tests.ts b/types/chai-jest-snapshot/chai-jest-snapshot-tests.ts index c93c4a1d04..cd35998db8 100644 --- a/types/chai-jest-snapshot/chai-jest-snapshot-tests.ts +++ b/types/chai-jest-snapshot/chai-jest-snapshot-tests.ts @@ -1,4 +1,4 @@ -import chaiJestSnapshot from 'chai-jest-snapshot'; +import * as chaiJestSnapshot from 'chai-jest-snapshot'; import { expect } from 'chai'; chai.use(chaiJestSnapshot); diff --git a/types/chai-jest-snapshot/index.d.ts b/types/chai-jest-snapshot/index.d.ts index 470e4fa423..27ec049b14 100644 --- a/types/chai-jest-snapshot/index.d.ts +++ b/types/chai-jest-snapshot/index.d.ts @@ -40,4 +40,4 @@ interface ChaiJestSnapshot { } declare var ChaiJestSnapshot: ChaiJestSnapshot; -export default ChaiJestSnapshot; +export = ChaiJestSnapshot; diff --git a/types/chai-spies/chai-spies-tests.ts b/types/chai-spies/chai-spies-tests.ts index 1d99f0add2..f5247ba13f 100644 --- a/types/chai-spies/chai-spies-tests.ts +++ b/types/chai-spies/chai-spies-tests.ts @@ -88,6 +88,27 @@ spyStringArg('foo'); expect(spyStringArg).to.have.been.called.always.with.exactly('foo'); spyStringArg.should.have.been.called.always.with.exactly('foo'); +// .first / .second / .third +const spyStringIteratedArg = chai.spy((arg: string) => arg); +spyStringIteratedArg('foo'); +spyStringIteratedArg('bar'); +spyStringIteratedArg('baz'); +expect(spyStringIteratedArg).to.have.been.first.called.with('foo'); +spyStringIteratedArg.should.have.been.first.called.with('foo'); +expect(spyStringIteratedArg).to.have.been.first.called.with('bar'); +spyStringIteratedArg.should.have.been.first.called.with('bar'); +expect(spyStringIteratedArg).to.have.been.first.called.with('baz'); +spyStringIteratedArg.should.have.been.first.called.with('baz'); + +// .nth +const spyStringNthArg = chai.spy((arg: string) => arg); +spyStringNthArg('foo'); +spyStringNthArg('bar'); +expect(spyStringNthArg).on.nth(1).be.called.with('foo'); +spyStringNthArg.should.on.nth(1).be.called.with('foo'); +expect(spyStringNthArg).on.nth(2).be.called.with('bar'); +spyStringNthArg.should.on.nth(2).be.called.with('bar'); + // .once expect(spy).to.have.been.called.once; expect(spy).to.not.have.been.called.once; diff --git a/types/chai-spies/index.d.ts b/types/chai-spies/index.d.ts index ffed6e594b..75f702ca37 100644 --- a/types/chai-spies/index.d.ts +++ b/types/chai-spies/index.d.ts @@ -10,6 +10,10 @@ declare namespace Chai { spy: ChaiSpies.Spy; } + interface LanguageChains { + on: Assertion; + } + interface Assertion { /** * ####.spy @@ -31,6 +35,28 @@ declare namespace Chai { * Note that ```called``` can be used as a chainable method. */ called: ChaiSpies.Called; + + /** + * * ####.been + * * Assert that something has been spied on. Negation passes through. + * * ```ts + * * expect(spy).to.have.been.called(); + * * spy.should.have.been.called(); + * ``` + * Note that ```been``` can be used as a chainable method. + */ + been: ChaiSpies.Been; + + /** + * * ####.nth (function) + * * Assert that something has been spied on on a certain index. Negation passes through. + * * ```ts + * * expect(spy).on.nth(5).be.called.with('foobar'); + * * spy.should.on.nth(5).be.called.with('foobar'); + * ``` + * Note that ```nth``` can be used as a chainable method. + */ + nth(index: number): Assertion; } } @@ -224,6 +250,47 @@ declare namespace ChaiSpies { lt(n: number): Chai.Assertion; } + interface Been extends Chai.Assertion { + (): Chai.Assertion; + called: Called; + + /** + * ####.first + * Assert that a spy has been called first. + * ```ts + * expect(spy).to.have.been.called.first; + * expect(spy).to.not.have.been.called.first; + * spy.should.have.been.called.first; + * spy.should.not.have.been.called.first; + * ``` + */ + first: Chai.Assertion; + + /** + * ####.second + * Assert that a spy has been called second. + * ```ts + * expect(spy).to.have.been.called.second; + * expect(spy).to.not.have.been.called.second; + * spy.should.have.been.called.second; + * spy.should.not.have.been.called.second; + * ``` + */ + second: Chai.Assertion; + + /** + * ####.third + * Assert that a spy has been called third. + * ```ts + * expect(spy).to.have.been.called.third; + * expect(spy).to.not.have.been.called.third; + * spy.should.have.been.called.third; + * spy.should.not.have.been.called.third; + * ``` + */ + third: Chai.Assertion; + } + interface With { /** * ####.with diff --git a/types/chai-string/index.d.ts b/types/chai-string/index.d.ts index bc990104be..fcf0fb9c23 100644 --- a/types/chai-string/index.d.ts +++ b/types/chai-string/index.d.ts @@ -49,4 +49,5 @@ declare global { } declare function chaiString(chai: any, utils: any): void; +declare namespace chaiString { } export = chaiString; diff --git a/types/chai-things/chai-things-tests.ts b/types/chai-things/chai-things-tests.ts index ecb7294dd2..b3549ab192 100644 --- a/types/chai-things/chai-things-tests.ts +++ b/types/chai-things/chai-things-tests.ts @@ -1,8 +1,7 @@ -import chai = require('chai'); -import chaiThings = require('chai-things'); - +import * as chai from 'chai'; +import * as chaiThings from 'chai-things'; chai.use(chaiThings); function test_somethingSyntax() { diff --git a/types/chai-things/index.d.ts b/types/chai-things/index.d.ts index 11ad20ede3..e0b3d0f0ec 100644 --- a/types/chai-things/index.d.ts +++ b/types/chai-things/index.d.ts @@ -60,5 +60,6 @@ interface Array { declare module "chai-things" { function chaiThings(chai: any, utils: any): void; + namespace chaiThings { } export = chaiThings; } diff --git a/types/chai-uuid/chai-uuid-tests.ts b/types/chai-uuid/chai-uuid-tests.ts new file mode 100644 index 0000000000..0620464988 --- /dev/null +++ b/types/chai-uuid/chai-uuid-tests.ts @@ -0,0 +1,15 @@ +import { assert, expect, use, should } from 'chai'; +import chaiUuid = require('chai-uuid'); + +use(chaiUuid); +should(); + +// bdd style +expect('67cb8aa1-61bb-4b9b-8ca9-9dc0b278d5f7').to.be.uuid('v4'); +expect('67cb8aa1-61bb-4b9b-8ca9-9dc0b278d5f7').to.be.guid; +expect('invalid').to.not.be.uuid('v4'); +expect('invalid').to.not.be.guid(); + +// tdd style +assert.uuid('67cb8aa1-61bb-4b9b-8ca9-9dc0b278d5f7', 'v4'); +assert.guid('67cb8aa1-61bb-4b9b-8ca9-9dc0b278d5f7'); diff --git a/types/chai-uuid/index.d.ts b/types/chai-uuid/index.d.ts new file mode 100644 index 0000000000..23a0b6db92 --- /dev/null +++ b/types/chai-uuid/index.d.ts @@ -0,0 +1,27 @@ +// Type definitions for chai-uuid 1.0 +// Project: https://github.com/rfrench/chai-uuid +// Definitions by: Harm van der Werf +// Definitions: https://github.com/DefinitelyTyped/DefinitelyTyped +// TypeScript Version: 2.8 + +/// +/// + +declare global { + namespace Chai { + type UuidVersion = 'v1' | 'v2' | 'v3' | 'v4' | 'v5' | ''; + + interface Assertion extends LanguageChains, NumericComparison, TypeComparison { + uuid(uuid?: UuidVersion): void; + guid(guid?: any): void; + } + + interface Assert { + uuid(uuid: string, version?: UuidVersion): void; + guid(guid: string, version?: any): void; + } + } +} + +declare function chaiUuid(chai: any, utils: any): void; +export = chaiUuid; diff --git a/types/chai-uuid/tsconfig.json b/types/chai-uuid/tsconfig.json new file mode 100644 index 0000000000..ca2ca40071 --- /dev/null +++ b/types/chai-uuid/tsconfig.json @@ -0,0 +1,23 @@ +{ + "compilerOptions": { + "module": "commonjs", + "lib": [ + "es6" + ], + "noImplicitAny": true, + "noImplicitThis": true, + "strictNullChecks": true, + "strictFunctionTypes": true, + "baseUrl": "../", + "typeRoots": [ + "../" + ], + "types": [], + "noEmit": true, + "forceConsistentCasingInFileNames": true + }, + "files": [ + "index.d.ts", + "chai-uuid-tests.ts" + ] +} diff --git a/types/chai-uuid/tslint.json b/types/chai-uuid/tslint.json new file mode 100644 index 0000000000..3db14f85ea --- /dev/null +++ b/types/chai-uuid/tslint.json @@ -0,0 +1 @@ +{ "extends": "dtslint/dt.json" } diff --git a/types/chai/chai-tests.ts b/types/chai/chai-tests.ts index 57b7d127ac..f19514fe71 100644 --- a/types/chai/chai-tests.ts +++ b/types/chai/chai-tests.ts @@ -191,6 +191,18 @@ function within() { expect(10).to.be.within(50, 100, 'blah'); (10).should.be.within(50, 100, 'blah'); + expect(new Date('December 17, 1995 03:24:30')).to.not.be.within(new Date('December 17, 1995 03:24:20'), new Date('December 17, 1995 03:24:40')); + new Date('December 17, 1995 03:24:30').should.not.be.within(new Date('December 17, 1995 03:24:20'), new Date('December 17, 1995 03:24:40')); + + expect(new Date('December 17, 1995 03:24:30')).to.be.within(new Date('December 17, 1995 03:24:20'), new Date('December 17, 1995 03:24:40')); + new Date('December 17, 1995 03:24:30').should.be.within(new Date('December 17, 1995 03:24:20'), new Date('December 17, 1995 03:24:40')); + + expect(new Date('December 17, 1995 03:24:30')).to.not.be.within(new Date('December 17, 1995 03:24:20'), new Date('December 17, 1995 03:24:40'), 'blah'); + new Date('December 17, 1995 03:24:30').should.not.be.within(new Date('December 17, 1995 03:24:20'), new Date('December 17, 1995 03:24:40'), 'blah'); + + expect(new Date('December 17, 1995 03:24:30')).to.be.within(new Date('December 17, 1995 03:24:20'), new Date('December 17, 1995 03:24:40'), 'blah'); + new Date('December 17, 1995 03:24:30').should.be.within(new Date('December 17, 1995 03:24:20'), new Date('December 17, 1995 03:24:40'), 'blah'); + expect('foo').to.have.length.within(5, 7, 'blah'); 'foo'.should.have.length.within(5, 7, 'blah'); @@ -218,6 +230,18 @@ function above() { expect(10).to.not.be.above(6, 'blah'); (10).should.not.be.above(6, 'blah'); + expect(new Date('December 17, 1995 03:24:30')).to.not.be.above(new Date('December 17, 1995 03:24:20')); + new Date('December 17, 1995 03:24:30').should.not.be.above(new Date('December 17, 1995 03:24:20')); + + expect(new Date('December 17, 1995 03:24:30')).to.be.above(new Date('December 17, 1995 03:24:20')); + new Date('December 17, 1995 03:24:30').should.be.above(new Date('December 17, 1995 03:24:20')); + + expect(new Date('December 17, 1995 03:24:30')).to.not.be.above(new Date('December 17, 1995 03:24:20'), 'blah'); + new Date('December 17, 1995 03:24:30').should.not.be.above(new Date('December 17, 1995 03:24:20'), 'blah'); + + expect(new Date('December 17, 1995 03:24:30')).to.be.above(new Date('December 17, 1995 03:24:20'), 'blah'); + new Date('December 17, 1995 03:24:30').should.be.above(new Date('December 17, 1995 03:24:20'), 'blah'); + expect('foo').to.have.length.above(4, 'blah'); 'foo'.should.have.length.above(4, 'blah'); @@ -243,6 +267,18 @@ function least() { expect(10).to.not.be.at.least(6, 'blah'); (10).should.not.be.at.least(6, 'blah'); + expect(new Date('December 17, 1995 03:24:30')).to.not.be.least(new Date('December 17, 1995 03:24:20')); + new Date('December 17, 1995 03:24:30').should.not.be.least(new Date('December 17, 1995 03:24:20')); + + expect(new Date('December 17, 1995 03:24:30')).to.be.least(new Date('December 17, 1995 03:24:20')); + new Date('December 17, 1995 03:24:30').should.be.least(new Date('December 17, 1995 03:24:20')); + + expect(new Date('December 17, 1995 03:24:30')).to.not.be.least(new Date('December 17, 1995 03:24:20'), 'blah'); + new Date('December 17, 1995 03:24:30').should.not.be.least(new Date('December 17, 1995 03:24:20'), 'blah'); + + expect(new Date('December 17, 1995 03:24:30')).to.be.least(new Date('December 17, 1995 03:24:20'), 'blah'); + new Date('December 17, 1995 03:24:30').should.be.least(new Date('December 17, 1995 03:24:20'), 'blah'); + expect('foo').to.have.length.of.at.least(4, 'blah'); 'foo'.should.have.length.of.at.least(4, 'blah'); @@ -273,6 +309,18 @@ function below() { expect(6).to.not.be.below(10, 'blah'); (6).should.not.be.below(10, 'blah'); + expect(new Date('December 17, 1995 03:24:30')).to.not.be.below(new Date('December 17, 1995 03:24:20')); + new Date('December 17, 1995 03:24:30').should.not.be.below(new Date('December 17, 1995 03:24:20')); + + expect(new Date('December 17, 1995 03:24:30')).to.be.below(new Date('December 17, 1995 03:24:20')); + new Date('December 17, 1995 03:24:30').should.be.below(new Date('December 17, 1995 03:24:20')); + + expect(new Date('December 17, 1995 03:24:30')).to.not.be.below(new Date('December 17, 1995 03:24:20'), 'blah'); + new Date('December 17, 1995 03:24:30').should.not.be.below(new Date('December 17, 1995 03:24:20'), 'blah'); + + expect(new Date('December 17, 1995 03:24:30')).to.be.below(new Date('December 17, 1995 03:24:20'), 'blah'); + new Date('December 17, 1995 03:24:30').should.be.below(new Date('December 17, 1995 03:24:20'), 'blah'); + expect('foo').to.have.length.below(2, 'blah'); 'foo'.should.have.length.below(2, 'blah'); @@ -300,6 +348,18 @@ function most() { expect(6).to.not.be.at.most(10, 'blah'); (6).should.not.be.at.most(10, 'blah'); + expect(new Date('December 17, 1995 03:24:30')).to.not.be.most(new Date('December 17, 1995 03:24:20')); + new Date('December 17, 1995 03:24:30').should.not.be.most(new Date('December 17, 1995 03:24:20')); + + expect(new Date('December 17, 1995 03:24:30')).to.be.most(new Date('December 17, 1995 03:24:20')); + new Date('December 17, 1995 03:24:30').should.be.most(new Date('December 17, 1995 03:24:20')); + + expect(new Date('December 17, 1995 03:24:30')).to.not.be.most(new Date('December 17, 1995 03:24:20'), 'blah'); + new Date('December 17, 1995 03:24:30').should.not.be.most(new Date('December 17, 1995 03:24:20'), 'blah'); + + expect(new Date('December 17, 1995 03:24:30')).to.be.most(new Date('December 17, 1995 03:24:20'), 'blah'); + new Date('December 17, 1995 03:24:30').should.be.most(new Date('December 17, 1995 03:24:20'), 'blah'); + expect('foo').to.have.length.of.at.most(2, 'blah'); 'foo'.should.have.length.of.at.most(2, 'blah'); diff --git a/types/chai/index.d.ts b/types/chai/index.d.ts index 02bca8909f..d0f5ab099c 100644 --- a/types/chai/index.d.ts +++ b/types/chai/index.d.ts @@ -9,6 +9,7 @@ // Shaun Luttin // Gintautas Miselis // Satana Charuwichitratana +// Erik Schierboom // Definitions: https://github.com/DefinitelyTyped/DefinitelyTyped declare namespace Chai { @@ -150,10 +151,11 @@ declare namespace Chai { most: NumberComparer; lte: NumberComparer; within(start: number, finish: number, message?: string): Assertion; + within(start: Date, finish: Date, message?: string): Assertion; } interface NumberComparer { - (value: number, message?: string): Assertion; + (value: number | Date, message?: string): Assertion; } interface TypeComparison { diff --git a/types/chardet/chardet-tests.ts b/types/chardet/chardet-tests.ts new file mode 100644 index 0000000000..7c06d2cc61 --- /dev/null +++ b/types/chardet/chardet-tests.ts @@ -0,0 +1,7 @@ +import * as chardet from "chardet"; + +chardet.detect(new Buffer('hello there!')); +chardet.detectFile('/path/to/file', (err, encoding) => {}); +chardet.detectFileSync('/path/to/file'); + +chardet.detectFile('/path/to/file', { sampleSize: 32 }, (err, encoding) => {}); diff --git a/types/chardet/index.d.ts b/types/chardet/index.d.ts new file mode 100644 index 0000000000..20324be60e --- /dev/null +++ b/types/chardet/index.d.ts @@ -0,0 +1,26 @@ +// Type definitions for chardet 0.5 +// Project: https://github.com/runk/node-chardet +// Definitions by: Hauke Oldsen +// Definitions: https://github.com/DefinitelyTyped/DefinitelyTyped + +/// + +export interface Confidence { + name: string; + confidence: number; + lang?: string; +} + +export interface Options { + returnAllMatches?: boolean; + sampleSize?: number; +} + +export type Result = Confidence[] | string | null; + +export function detect(buf: Buffer, opts?: Options): Result; + +export function detectFile(path: string, cb: (err: any, result: Result) => void): void; +export function detectFile(path: string, opts: Options, cb: (err: any, result: Result) => void): void; + +export function detectFileSync(path: string, opts?: Options): Result; diff --git a/types/chardet/tsconfig.json b/types/chardet/tsconfig.json new file mode 100644 index 0000000000..6215a6303f --- /dev/null +++ b/types/chardet/tsconfig.json @@ -0,0 +1,23 @@ +{ + "compilerOptions": { + "module": "commonjs", + "lib": [ + "es6" + ], + "noImplicitAny": true, + "noImplicitThis": true, + "strictNullChecks": true, + "strictFunctionTypes": true, + "baseUrl": "../", + "typeRoots": [ + "../" + ], + "types": [], + "noEmit": true, + "forceConsistentCasingInFileNames": true + }, + "files": [ + "index.d.ts", + "chardet-tests.ts" + ] +} diff --git a/types/chardet/tslint.json b/types/chardet/tslint.json new file mode 100644 index 0000000000..3db14f85ea --- /dev/null +++ b/types/chardet/tslint.json @@ -0,0 +1 @@ +{ "extends": "dtslint/dt.json" } diff --git a/types/chart.js/chart.js-tests.ts b/types/chart.js/chart.js-tests.ts index 6041889b66..d0f6ebc684 100644 --- a/types/chart.js/chart.js-tests.ts +++ b/types/chart.js/chart.js-tests.ts @@ -21,6 +21,12 @@ const chart: Chart = new Chart(new CanvasRenderingContext2D(), { hover: { intersect: true }, + onHover(ev: MouseEvent, points: any[]) { + return; + }, + title: { + text: ["foo", "bar"] + }, tooltips: { filter: data => Number(data.yLabel) > 0, intersect: true, @@ -52,6 +58,7 @@ const chart: Chart = new Chart(new CanvasRenderingContext2D(), { padding: 40 } }, + devicePixelRatio: 2, } }); chart.update(); diff --git a/types/chart.js/index.d.ts b/types/chart.js/index.d.ts index c637164d30..cb3db72855 100644 --- a/types/chart.js/index.d.ts +++ b/types/chart.js/index.d.ts @@ -9,6 +9,9 @@ // Dan Manastireanu // Guillaume Rodriguez // Sergey Rubanov +// Simon Archer +// Ken Elkabany +// Slavik Nychkalo // Definitions: https://github.com/DefinitelyTyped/DefinitelyTyped // TypeScript Version: 2.3 @@ -35,6 +38,7 @@ declare class Chart { canvas: HTMLCanvasElement|null; chartArea: Chart.ChartArea; static pluginService: PluginServiceStatic; + static plugins: PluginServiceStatic; static defaults: { global: Chart.ChartOptions & Chart.ChartFontOptions; @@ -54,40 +58,40 @@ declare class PluginServiceStatic { } interface PluginServiceRegistrationOptions { - beforeInit?(chartInstance: Chart): void; - afterInit?(chartInstance: Chart): void; + beforeInit?(chartInstance: Chart, options?: any): void; + afterInit?(chartInstance: Chart, options?: any): void; - resize?(chartInstance: Chart, newChartSize: Size): void; + resize?(chartInstance: Chart, newChartSize: Size, options?: any): void; - beforeUpdate?(chartInstance: Chart): void; - afterScaleUpdate?(chartInstance: Chart): void; - beforeDatasetsUpdate?(chartInstance: Chart): void; - afterDatasetsUpdate?(chartInstance: Chart): void; - afterUpdate?(chartInstance: Chart): void; + beforeUpdate?(chartInstance: Chart, options?: any): void; + afterScaleUpdate?(chartInstance: Chart, options?: any): void; + beforeDatasetsUpdate?(chartInstance: Chart, options?: any): void; + afterDatasetsUpdate?(chartInstance: Chart, options?: any): void; + afterUpdate?(chartInstance: Chart, options?: any): void; // This is called at the start of a render. It is only called once, even if the animation will run for a number of frames. Use beforeDraw or afterDraw // to do something on each animation frame - beforeRender?(chartInstance: Chart): void; + beforeRender?(chartInstance: Chart, options?: any): void; // Easing is for animation - beforeDraw?(chartInstance: Chart, easing: string): void; - afterDraw?(chartInstance: Chart, easing: string): void; + beforeDraw?(chartInstance: Chart, easing: string, options?: any): void; + afterDraw?(chartInstance: Chart, easing: string, options?: any): void; // Before the datasets are drawn but after scales are drawn - beforeDatasetsDraw?(chartInstance: Chart, easing: string): void; - afterDatasetsDraw?(chartInstance: Chart, easing: string): void; + beforeDatasetsDraw?(chartInstance: Chart, easing: string, options?: any): void; + afterDatasetsDraw?(chartInstance: Chart, easing: string, options?: any): void; // Called before drawing the `tooltip`. If any plugin returns `false`, // the tooltip drawing is cancelled until another `render` is triggered. - beforeTooltipDraw?(chartInstance: Chart): void; + beforeTooltipDraw?(chartInstance: Chart, tooltipData?: any, options?: any): void; // Called after drawing the `tooltip`. Note that this hook will not, // be called if the tooltip drawing has been previously cancelled. - afterTooltipDraw?(chartInstance: Chart): void; + afterTooltipDraw?(chartInstance: Chart, tooltipData?: any, options?: any): void; destroy?(chartInstance: Chart): void; // Called when an event occurs on the chart - beforeEvent?(chartInstance: Chart, event: Event): void; - afterEvent?(chartInstance: Chart, event: Event): void; + beforeEvent?(chartInstance: Chart, event: Event, options?: any): void; + afterEvent?(chartInstance: Chart, event: Event, options?: any): void; } interface Size { @@ -96,7 +100,7 @@ interface Size { } declare namespace Chart { - type ChartType = 'line' | 'bar' | 'radar' | 'doughnut' | 'polarArea' | 'bubble' | 'pie'; + type ChartType = 'line' | 'bar' | 'horizontalBar' | 'radar' | 'doughnut' | 'polarArea' | 'bubble' | 'pie'; type TimeUnit = 'millisecond' | 'second' | 'minute' | 'hour' | 'day' | 'week' | 'month' | 'quarter' | 'year'; @@ -126,6 +130,10 @@ declare namespace Chart { pointStyle?: PointStyle; } + interface ChartLegendLabelItem extends ChartLegendItem { + datasetIndex: number; + } + interface ChartTooltipItem { xLabel?: string; yLabel?: string; @@ -161,8 +169,9 @@ declare namespace Chart { interface ChartPoint { x?: number | string | Date; - y?: number; + y?: number | string | Date; r?: number; + t?: number | string | Date; } interface ChartConfiguration { @@ -184,6 +193,7 @@ declare namespace Chart { aspectRatio?: number; maintainAspectRatio?: boolean; events?: string[]; + onHover?(this: Chart, event: MouseEvent, activeElements: Array<{}>): any; onClick?(event?: MouseEvent, activeElements?: Array<{}>): any; title?: ChartTitleOptions; legend?: ChartLegendOptions; @@ -198,6 +208,7 @@ declare namespace Chart { cutoutPercentage?: number; circumference?: number; rotation?: number; + devicePixelRatio?: number; // Plugins can require any options plugins?: { [plugin: string]: any }; } @@ -212,21 +223,21 @@ declare namespace Chart { interface ChartTitleOptions { display?: boolean; position?: PositionType; - fullWdith?: boolean; + fullWidth?: boolean; fontSize?: number; fontFamily?: string; fontColor?: ChartColor; fontStyle?: string; padding?: number; - text?: string; + text?: string | string[]; } interface ChartLegendOptions { display?: boolean; position?: PositionType; fullWidth?: boolean; - onClick?(event: MouseEvent, legendItem: ChartLegendItem): void; - onHover?(event: MouseEvent, legendItem: ChartLegendItem): void; + onClick?(event: MouseEvent, legendItem: ChartLegendLabelItem): void; + onHover?(event: MouseEvent, legendItem: ChartLegendLabelItem): void; labels?: ChartLegendLabelOptions; reverse?: boolean; } @@ -239,7 +250,7 @@ declare namespace Chart { fontFamily?: string; padding?: number; generateLabels?(chart: any): any; - filter?(item: ChartLegendItem, data: ChartData): any; + filter?(legendItem: ChartLegendLabelItem, data: ChartData): any; usePointStyle?: boolean; } @@ -291,7 +302,7 @@ declare namespace Chart { mode?: string; animationDuration?: number; intersect?: boolean; - onHover?(active: any): void; + onHover?(this: Chart, event: MouseEvent, activeElements: Array<{}>): any; } interface ChartAnimationObject { @@ -395,6 +406,10 @@ declare namespace Chart { interface TickOptions { autoSkip?: boolean; autoSkipPadding?: number; + backdropColor?: ChartColor; + backdropPaddingX?: number; + backdropPaddingY?: number; + beginAtZero?: boolean; callback?(value: any, index: any, values: any): string|number; display?: boolean; fontColor?: ChartColor; @@ -402,14 +417,18 @@ declare namespace Chart { fontSize?: number; fontStyle?: string; labelOffset?: number; + max?: any; maxRotation?: number; + maxTicksLimit?: number; + min?: any; minRotation?: number; mirror?: boolean; padding?: number; reverse?: boolean; - min?: any; - max?: any; + showLabelBackdrop?: boolean; + source?: 'auto' | 'data' | 'labels'; } + interface AngleLineOptions { display?: boolean; color?: ChartColor; @@ -424,26 +443,15 @@ declare namespace Chart { fontStyle?: string; } - interface TickOptions { - backdropColor?: ChartColor; - backdropPaddingX?: number; - backdropPaddingY?: number; - maxTicksLimit?: number; - showLabelBackdrop?: boolean; - } interface LinearTickOptions extends TickOptions { - beginAtZero?: boolean; - min?: number; - max?: number; maxTicksLimit?: number; stepSize?: number; suggestedMin?: number; suggestedMax?: number; } + // tslint:disable-next-line no-empty-interface interface LogarithmicTickOptions extends TickOptions { - min?: number; - max?: number; } type ChartColor = string | CanvasGradient | CanvasPattern | string[]; @@ -506,7 +514,9 @@ declare namespace Chart { ticks?: TickOptions; gridLines?: GridLineOptions; barThickness?: number; + maxBarThickness?: number; scaleLabel?: ScaleTitleOptions; + offset?: boolean; beforeUpdate?(scale?: any): void; beforeSetDimension?(scale?: any): void; beforeDataLimits?(scale?: any): void; @@ -526,6 +536,7 @@ declare namespace Chart { interface ChartXAxe extends CommonAxe { categoryPercentage?: number; barPercentage?: number; + distribution?: 'linear' | 'series'; time?: TimeScale; } diff --git a/types/chartist/chartist-tests.ts b/types/chartist/chartist-tests.ts index 13a7c7dd1c..270e6e0970 100644 --- a/types/chartist/chartist-tests.ts +++ b/types/chartist/chartist-tests.ts @@ -1,429 +1,485 @@ import Chartist = require("chartist"); + Chartist.escapingMap = { - '&': '&', - '<': '<', - '>': '>', - '"': '"', - '\'': ''', + '&': '&', + '<': '<', + '>': '>', + '"': '"', + '\'': ''', }; Chartist.precision = 8; new Chartist.Line('.ct-chart', { - labels: ['Monday', 'Tuesday', 'Wednesday', 'Thursday', 'Friday'], - series: [ - [12, 9, 7, 8, 5], - [2, 1, 3.5, 7, 3], - [1, 3, 4, 5, 6] - ] + labels: ['Monday', 'Tuesday', 'Wednesday', 'Thursday', 'Friday'], + series: [ + [12, 9, 7, 8, 5], + [2, 1, 3.5, 7, 3], + [1, 3, 4, 5, 6] + ] }, { fullWidth: true, chartPadding: { - right: 40 + right: 40 } - }); - -var lineChart = new Chartist.Line('.ct-chart', { - labels: [1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15, 16], - series: [ - [5, 5, 10, 8, 7, 5, 4, null, null, null, 10, 10, 7, 8, 6, 9], - [10, 15, null, 12, null, 10, 12, 15, null, null, 12, null, 14, null, null, null], - [null, null, null, null, 3, 4, 1, 3, 4, 6, 7, 9, 5, null, null, null] - ] -}, { - fullWidth: true, - chartPadding: { - right: 10 - }, - low: 0 - }); - -new Chartist.Line('.ct-chart', { - labels: ['1', '2', '3', '4', '5', '6'], - series: [ - { - name: 'Fibonacci sequence', - data: [1, 2, 3, 5, 8, 13] - }, - { - name: 'Golden section', - data: [1, 1.618, 2.618, 4.236, 6.854, 11.09] - } - ] }); +var lineChart = new Chartist.Line('.ct-chart', { + labels: [1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15, 16], + series: [ + [5, 5, 10, 8, 7, 5, 4, null, null, null, 10, 10, 7, 8, 6, 9], + [10, 15, null, 12, null, 10, 12, 15, null, null, 12, null, 14, null, null, null], + [null, null, null, null, 3, 4, 1, 3, 4, 6, 7, 9, 5, null, null, null] + ] +}, { + fullWidth: true, + chartPadding: { + right: 10 + }, + low: 0 +}); + +new Chartist.Line('.ct-chart', { + labels: ['1', '2', '3', '4', '5', '6'], + series: [ + { + name: 'Fibonacci sequence', + data: [1, 2, 3, 5, 8, 13] + }, + { + name: 'Golden section', + data: [1, 1.618, 2.618, 4.236, 6.854, 11.09] + } + ] +}); + + +// This example was taken here: https://gionkunz.github.io/chartist-js/examples.html#example-line-series-override +new Chartist.Line('.ct-chart', { + labels: ['1', '2', '3', '4', '5', '6', '7', '8'], + // Naming the series with the series object array notation + series: [{ + name: 'series-1', + data: [5, 2, -4, 2, 0, -2, 5, -3] + }, { + name: 'series-2', + data: [4, 3, 5, 3, 1, 3, 6, 4] + }, { + name: 'series-3', + data: [2, 4, 3, 1, 4, 5, 3, 2] + }] +}, { + fullWidth: true, + // Within the series options you can use the series names + // to specify configuration that will only be used for the + // specific series. + series: { + 'series-1': { + lineSmooth: Chartist.Interpolation.step() + }, + 'series-2': { + lineSmooth: Chartist.Interpolation.simple(), + showArea: true + }, + 'series-3': { + showPoint: false + } + } +}, [ + // You can even use responsive configuration overrides to + // customize your series configuration even further! + ['screen and (max-width: 320px)', { + series: { + 'series-1': { + lineSmooth: Chartist.Interpolation.none() + }, + 'series-2': { + lineSmooth: Chartist.Interpolation.none(), + showArea: false + }, + 'series-3': { + lineSmooth: Chartist.Interpolation.none(), + showPoint: true + } + } + }] +]); + + var data = { - series: [5, 3, 4] + series: [5, 3, 4] }; -var sum = (a: number, b: number) => { return a + b }; +var sum = (a: number, b: number) => { + return a + b +}; new Chartist.Pie('.ct-chart', data, { - labelInterpolationFnc: (value: number) => { - return Math.round(value / data.series.reduce(sum) * 100) + '%'; - } + labelInterpolationFnc: (value: number) => { + return Math.round(value / data.series.reduce(sum) * 100) + '%'; + } }); new Chartist.Pie('.ct-chart', { - series: [20, 10, 30, 40] + series: [20, 10, 30, 40] }, { donut: true, donutWidth: 60, startAngle: 270, total: 200, showLabel: false - }); +}); // Animation Donut example var chart = new Chartist.Pie('.ct-chart', { - series: [10, 20, 50, 20, 5, 50, 15], - labels: [1, 2, 3, 4, 5, 6, 7] + series: [10, 20, 50, 20, 5, 50, 15], + labels: [1, 2, 3, 4, 5, 6, 7] }, { donut: true, showLabel: false - }); +}); chart.on('draw', (data: any) => { - if (data.type === 'slice') { - // Get the total path length in order to use for dash array animation - var pathLength = data.element._node.getTotalLength(); + if (data.type === 'slice') { + // Get the total path length in order to use for dash array animation + var pathLength = data.element._node.getTotalLength(); - // Set a dasharray that matches the path length as prerequisite to animate dashoffset - data.element.attr({ - 'stroke-dasharray': pathLength + 'px ' + pathLength + 'px' - }); + // Set a dasharray that matches the path length as prerequisite to animate dashoffset + data.element.attr({ + 'stroke-dasharray': pathLength + 'px ' + pathLength + 'px' + }); - // Create animation definition while also assigning an ID to the animation for later sync usage - var animationDefinition: Chartist.IChartistAnimations = { - 'stroke-dashoffset': { - id: 'anim' + data.index, - dur: 1000, - from: -pathLength + 'px', - to: '0px', - easing: Chartist.Svg.Easing.easeOutQuint, - // We need to use `fill: 'freeze'` otherwise our animation will fall back to initial (not visible) - fill: 'freeze' - } - }; + // Create animation definition while also assigning an ID to the animation for later sync usage + var animationDefinition: Chartist.IChartistAnimations = { + 'stroke-dashoffset': { + id: 'anim' + data.index, + dur: 1000, + from: -pathLength + 'px', + to: '0px', + easing: Chartist.Svg.Easing.easeOutQuint, + // We need to use `fill: 'freeze'` otherwise our animation will fall back to initial (not visible) + fill: 'freeze' + } + }; - // If this was not the first slice, we need to time the animation so that it uses the end sync event of the previous animation - if (data.index !== 0) { - animationDefinition['stroke-dashoffset'].begin = 'anim' + (data.index - 1) + '.end'; + // If this was not the first slice, we need to time the animation so that it uses the end sync event of the previous animation + if (data.index !== 0) { + animationDefinition['stroke-dashoffset'].begin = 'anim' + (data.index - 1) + '.end'; + } + + // We need to set an initial value before the animation starts as we are not in guided mode which would do that for us + data.element.attr({ + 'stroke-dashoffset': -pathLength + 'px' + }); + + // We can't use guided mode as the animations need to rely on setting begin manually + // See http://gionkunz.github.io/chartist-js/api-documentation.html#chartistsvg-function-animate + data.element.animate(animationDefinition, false); } - - // We need to set an initial value before the animation starts as we are not in guided mode which would do that for us - data.element.attr({ - 'stroke-dashoffset': -pathLength + 'px' - }); - - // We can't use guided mode as the animations need to rely on setting begin manually - // See http://gionkunz.github.io/chartist-js/api-documentation.html#chartistsvg-function-animate - data.element.animate(animationDefinition, false); - } }); new Chartist.Bar('.ct-chart', { - labels: ['XS', 'S', 'M', 'L', 'XL', 'XXL', 'XXXL'], - series: [20, 60, 120, 200, 180, 20, 10] + labels: ['XS', 'S', 'M', 'L', 'XL', 'XXL', 'XXXL'], + series: [20, 60, 120, 200, 180, 20, 10] }, { distributeSeries: true - }); +}); new Chartist.Bar('.ct-chart', { - labels: ['Quarter 1', 'Quarter 2', 'Quarter 3', 'Quarter 4'], - series: [ - [5, 4, 3, 7], - [3, 2, 9, 5], - [1, 5, 8, 4], - [2, 3, 4, 6], - [4, 1, 2, 1] - ] + labels: ['Quarter 1', 'Quarter 2', 'Quarter 3', 'Quarter 4'], + series: [ + [5, 4, 3, 7], + [3, 2, 9, 5], + [1, 5, 8, 4], + [2, 3, 4, 6], + [4, 1, 2, 1] + ] }, { // Default mobile configuration stackBars: true, axisX: { - labelInterpolationFnc: (value: string) => { - return value.split(/\s+/).map((word: string) => { - return word[0]; - }).join(''); - } + labelInterpolationFnc: (value: string) => { + return value.split(/\s+/).map((word: string) => { + return word[0]; + }).join(''); + } }, axisY: { - offset: 20 + offset: 20 } - }, [ +}, [ // Options override for media > 400px ['screen and (min-width: 400px)', { - reverseData: true, - horizontalBars: true, - axisX: { - labelInterpolationFnc: Chartist.noop - }, - axisY: { - offset: 60 - } + reverseData: true, + horizontalBars: true, + axisX: { + labelInterpolationFnc: Chartist.noop + }, + axisY: { + offset: 60 + } }], // Options override for media > 800px ['screen and (min-width: 800px)', { - stackBars: false, - seriesBarDistance: 10 + stackBars: false, + seriesBarDistance: 10 }], // Options override for media > 1000px ['screen and (min-width: 1000px)', { - reverseData: false, - horizontalBars: false, - seriesBarDistance: 15 + reverseData: false, + horizontalBars: false, + seriesBarDistance: 15 }] - ]); +]); new Chartist.Pie('.ct-chart', { - series: [{ - value: 20, - name: 'Series 1', - className: 'my-custom-class-one', - meta: 'Meta One' - }, { - value: 10, - name: 'Series 2', - className: 'my-custom-class-two', - meta: 'Meta Two' + series: [{ + value: 20, + name: 'Series 1', + className: 'my-custom-class-one', + meta: 'Meta One' }, { - value: 70, - name: 'Series 3', - className: 'my-custom-class-three', - meta: 'Meta Three' + value: 10, + name: 'Series 2', + className: 'my-custom-class-two', + meta: 'Meta Two' + }, { + value: 70, + name: 'Series 3', + className: 'my-custom-class-three', + meta: { description: 'Meta Three' } }] }); new Chartist.Bar('.bar-chart', { - labels: ['foo', 'bar', 'foobar'], - series: [ - { - data: [1], - className: 'graph-foo', - }, - { - data: [10], - className: 'graph-foo', - }, - { - data: [12], - className: 'graph-foo', - }] -  }, { + labels: ['foo', 'bar', 'foobar'], + series: [ + { + data: [1], + className: 'graph-foo', + }, + { + data: [10], + className: 'graph-foo', + }, + { + data: [12], + className: 'graph-foo', + }] +}, { seriesBarDistance: 30, reverseData: true, horizontalBars: true, height: '115px', axisY: { - offset: 70, - showGrid: false, + offset: 70, + showGrid: false, }, axisX: { - scaleMinSpace: 200 + scaleMinSpace: 200 } - }); +}); new Chartist.Line('.ct-chart', { - labels: [1, 2, 3, 4, 5, 6, 7, 8], - series: [ - [5, 9, 7, 8, 5, 3, 5, 4] - ] + labels: [1, 2, 3, 4, 5, 6, 7, 8], + series: [ + [5, 9, 7, 8, 5, 3, 5, 4] + ] }, { ticks: [0, 4], low: 0, showArea: true, axisY: { - showLabel: true, - showGrid: false, - ticks: [1, 4], - type: Chartist.FixedScaleAxis + showLabel: true, + showGrid: false, + ticks: [1, 4], + type: Chartist.FixedScaleAxis } - }); +}); new Chartist.Line('.ct-chart', { - labels: [1, 2, 3, 4, 5, 6, 7, 8], - series: [ - [5, 9, 7, 8, 5, 3, 5, 4] - ] + labels: [1, 2, 3, 4, 5, 6, 7, 8], + series: [ + [5, 9, 7, 8, 5, 3, 5, 4] + ] }, { ticks: [0, 4], low: 0, showArea: true, axisX: { - showGrid: false + showGrid: false }, axisY: { - showLabel: true, - showGrid: false, - ticks: [1, 4], - type: Chartist.FixedScaleAxis + showLabel: true, + showGrid: false, + ticks: [1, 4], + type: Chartist.FixedScaleAxis } - }); +}); var chart2 = new Chartist.Line('.ct-chart', { - labels: [1, 2, 3, 4, 5], - series: [ - [12, 9, 7, 8, 5] - ] + labels: [1, 2, 3, 4, 5], + series: [ + [12, 9, 7, 8, 5] + ] }); // Listening for draw events that get emitted by the Chartist chart chart2.on('draw', (data: any) => { - // If the draw event was triggered from drawing a point on the line chart - if (data.type === 'point') { - // We are creating a new path SVG element that draws a triangle around the point coordinates - var triangle = new Chartist.Svg('path', { - d: ['M', - data.x, - data.y - 15, - 'L', - data.x - 15, - data.y + 8, - 'L', - data.x + 15, - data.y + 8, - 'z'].join(' '), - style: 'fill-opacity: 1' - }, 'ct-area'); + // If the draw event was triggered from drawing a point on the line chart + if (data.type === 'point') { + // We are creating a new path SVG element that draws a triangle around the point coordinates + var triangle = new Chartist.Svg('path', { + d: ['M', + data.x, + data.y - 15, + 'L', + data.x - 15, + data.y + 8, + 'L', + data.x + 15, + data.y + 8, + 'z'].join(' '), + style: 'fill-opacity: 1' + }, 'ct-area'); - // With data.element we get the Chartist SVG wrapper and we can replace the original point drawn by Chartist with our newly created triangle - data.element.replace(triangle); - } + // With data.element we get the Chartist SVG wrapper and we can replace the original point drawn by Chartist with our newly created triangle + data.element.replace(triangle); + } }); // Create a simple bi-polar bar chart var biPolarChart = new Chartist.Bar('.ct-chart', { - labels: ['W1', 'W2', 'W3', 'W4', 'W5', 'W6', 'W7', 'W8', 'W9', 'W10'], - series: [ - [1, 2, 4, 8, 6, -2, -1, -4, -6, -2] - ] + labels: ['W1', 'W2', 'W3', 'W4', 'W5', 'W6', 'W7', 'W8', 'W9', 'W10'], + series: [ + [1, 2, 4, 8, 6, -2, -1, -4, -6, -2] + ] }, { high: 10, low: -10, axisX: { - labelInterpolationFnc: (value: any, index: number) => { - return index % 2 === 0 ? value : null; - } + labelInterpolationFnc: (value: any, index: number) => { + return index % 2 === 0 ? value : null; + } } - }); +}); // Listen for draw events on the bar chart biPolarChart.on('draw', (data: any) => { - // If this draw event is of type bar we can use the data to create additional content - if (data.type === 'bar') { - // We use the group element of the current series to append a simple circle with the bar peek coordinates and a circle radius that is depending on the value - data.group.append(new Chartist.Svg('circle', { - cx: data.x2, - cy: data.y2, - r: Math.abs(Chartist.getMultiValue(data.value)) * 2 + 5 - }, 'ct-slice-pie')); - } + // If this draw event is of type bar we can use the data to create additional content + if (data.type === 'bar') { + // We use the group element of the current series to append a simple circle with the bar peek coordinates and a circle radius that is depending on the value + data.group.append(new Chartist.Svg('circle', { + cx: data.x2, + cy: data.y2, + r: Math.abs(Chartist.getMultiValue(data.value)) * 2 + 5 + }, 'ct-slice-pie')); + } }); new Chartist.Bar('.ct-chart', { - labels: ['Mon', 'Tue', 'Wed', 'Thu', 'Fri', 'Sat', 'Sun'], - series: [ - [5, 4, 3, 7, 5, 10, 3], - [3, 2, 9, 5, 4, 6, 4] - ] + labels: ['Mon', 'Tue', 'Wed', 'Thu', 'Fri', 'Sat', 'Sun'], + series: [ + [5, 4, 3, 7, 5, 10, 3], + [3, 2, 9, 5, 4, 6, 4] + ] }, { axisX: { - // On the x-axis start means top and end means bottom - position: 'start' + // On the x-axis start means top and end means bottom + position: 'start' }, axisY: { - // On the y-axis start means left and end means right - position: 'end' + // On the y-axis start means left and end means right + position: 'end' } - }); +}); new Chartist.Line('.ct-chart', { - labels: [1, 2, 3, 4, 5], - series: [[1, 2, 8, 1, 7]] + labels: [1, 2, 3, 4, 5], + series: [[1, 2, 8, 1, 7]] }, { lineSmooth: Chartist.Interpolation.none({ - fillHoles: false + fillHoles: false }) - }); +}); new Chartist.Line('.ct-chart', { - labels: [1, 2, 3, 4, 5], - series: [[1, 2, 8, 1, 7]] + labels: [1, 2, 3, 4, 5], + series: [[1, 2, 8, 1, 7]] }, { lineSmooth: Chartist.Interpolation.simple({ - divisor: 2, - fillHoles: false + divisor: 2, + fillHoles: false }) - }); +}); new Chartist.Line('.ct-chart', { - labels: [1, 2, 3, 4, 5], - series: [[1, 2, 8, 1, 7]] + labels: [1, 2, 3, 4, 5], + series: [[1, 2, 8, 1, 7]] }, { lineSmooth: Chartist.Interpolation.cardinal({ - tension: 1, - fillHoles: false + tension: 1, + fillHoles: false }) - }); +}); new Chartist.Line('.ct-chart', { - labels: [1, 2, 3, 4, 5], - series: [[1, 2, 8, 1, 7]] + labels: [1, 2, 3, 4, 5], + series: [[1, 2, 8, 1, 7]] }, { lineSmooth: Chartist.Interpolation.step({ - postpone: true, - fillHoles: false + postpone: true, + fillHoles: false }) - }); +}); var overlappingBarsData: Chartist.IChartistData = { - labels: ['Jan', 'Feb', 'Mar', 'Apr', 'Mai', 'Jun', 'Jul', 'Aug', 'Sep', 'Oct', 'Nov', 'Dec'], - series: [ - [5, 4, 3, 7, 5, 10, 3, 4, 8, 10, 6, 8], - [3, 2, 9, 5, 4, 6, 4, 6, 7, 8, 7, 4] - ] + labels: ['Jan', 'Feb', 'Mar', 'Apr', 'Mai', 'Jun', 'Jul', 'Aug', 'Sep', 'Oct', 'Nov', 'Dec'], + series: [ + [5, 4, 3, 7, 5, 10, 3, 4, 8, 10, 6, 8], + [3, 2, 9, 5, 4, 6, 4, 6, 7, 8, 7, 4] + ] }; var overlappingBarsOptions: Chartist.IBarChartOptions = { - seriesBarDistance: 10 + seriesBarDistance: 10 }; var overlappingBarsResponsiveOptions: Array> = [ - ['screen and (max-width: 640px)', { - seriesBarDistance: 5, - axisX: { - labelInterpolationFnc: (value: any) => { - return value[0]; - } - } - }] + ['screen and (max-width: 640px)', { + seriesBarDistance: 5, + axisX: { + labelInterpolationFnc: (value: any) => { + return value[0]; + } + } + }] ]; new Chartist.Bar('.ct-chart', overlappingBarsData, overlappingBarsOptions, overlappingBarsResponsiveOptions); new Chartist.Candle('.ct-chart', { - labels: ['Mon', 'Tue', 'Wed', 'Thu', 'Fri', 'Sat', 'Sun'], - series: [ - [5, 4, 3, 7], - [3, 2, 9, 5], - [5, 4, 3, 7], - [3, 2, 9, 5], - [5, 4, 3, 7], - [3, 2, 9, 5], - [3, 2, 9, 5] - ] + labels: ['Mon', 'Tue', 'Wed', 'Thu', 'Fri', 'Sat', 'Sun'], + series: [ + [5, 4, 3, 7], + [3, 2, 9, 5], + [5, 4, 3, 7], + [3, 2, 9, 5], + [5, 4, 3, 7], + [3, 2, 9, 5], + [3, 2, 9, 5] + ] }, { - axisX: { - labelOffset: { - x: -10, - y: 0 + axisX: { + labelOffset: { + x: -10, + y: 0 + } + }, + axisY: { + showGrid: false, + labelInterpolationFnc: function (value: any) { + return value + 12000; + } } - }, - axisY: { - showGrid: false, - labelInterpolationFnc: function (value: any) { - return value + 12000; - } - } }); diff --git a/types/chartist/index.d.ts b/types/chartist/index.d.ts index 93918a5eeb..80cc589ee2 100644 --- a/types/chartist/index.d.ts +++ b/types/chartist/index.d.ts @@ -1,703 +1,728 @@ // Type definitions for Chartist v0.9.81 // Project: https://github.com/gionkunz/chartist-js -// Definitions by: Matt Gibbs , Simon Pfeifer , Cassey Lottman +// Definitions by: Matt Gibbs , Simon Pfeifer , Cassey Lottman , Anastasiia Antonova , Sunny Juneja // Definitions: https://github.com/DefinitelyTyped/DefinitelyTyped declare namespace Chartist { - interface ChartistStatic { - - /** - * Precision level used internally in Chartist for rounding. If you require more decimal places you can increase this number. - */ - precision: number; - - /** - * A map with characters to escape for strings to be safely used as attribute values. - */ - escapingMap: IChartistEscapeMap; - - Pie: IChartistPieChart; - Bar: IChartistBarChart; - Line: IChartistLineChart; - Candle: IChartistCandleChart; - - FixedScaleAxis: IFixedScaleAxisStatic; - AutoScaleAxis: IAutoScaleAxisStatic; - StepAxis: IStepAxisStatic; - - Svg: ChartistSvgStatic; - Interpolation: ChartistInterpolationStatic; - - noop: Function; - - alphaNumerate(n: number): string; - extend(target: Object, ...sources: Object[]): Object; - - replaceAll(str: string, subStr: string, newSubStr: string): string; - ensureUnit(value: number, unit: string): string; - quantity(input: string | number): Object; - - query(query: Node | string): Node; - times(length: number): Array; - sum(previous: number, current: number): number; - mapMultiply(factor: number): (num: number) => number; - mapAdd(addend: number): (num: number) => number; - serialMap(arr: Array, cb: Function): Array; - roundWithPrecision(value: number, digits?: number): number; - - getMultiValue(value: any, dimension?: any): number; // this method is not documented, but it is used in the examples - - serialize(data: Object | string | number): string; - deserialize(data: string): Object | string | number; - - createSvg(container: Node, width: string, height: string, className: string): Object; // TODO: Figure out if this is returning a ChartistSVGWrapper or an actual SVGElement - - plugins: any; - } - - interface IChartistEscapeMap { - [Key: string]: string; - } - - interface IResponsiveOptionTuple extends Array { - 0: string; - 1: T; - } - - // these have no other purpose than to help define the types that can be placed on - // a line chart axisX - // in the actual chartist library these are classes that project their options onto - // the parent class - interface IFixedScaleAxisStatic { } - interface IAutoScaleAxisStatic { } - interface IStepAxisStatic { } - - // data formats are not well documented on all the ways they can be passed to the constructors - // this definition gives some intellisense, but does not protect the user from misuse - // TODO: come in and tidy this up and make it fit better - interface IChartistData { - labels?: Array | Array | Array; - series: Array | Array> | Array | Array>; - } - - interface IChartistSeriesData { - name?: string; - value?: number; - data?: Array; - className?: string; - meta?: string; // I assume this could probably be a number as well? - } - - interface IChartistBase { - container: any; - data: IChartistData; - defaultOptions: T; - options: T; - responsiveOptions: Array>; - - // this most likely doesn't need to be exposed to the user - eventEmitter: any; - - supportsForeignObject: boolean; - supportsAnimations: boolean; - resizeListener: any; - - plugins?: Array; // all of these plugins seem to be functions with options, but keeping type any for now - - update(data: Object, options?: T, override?: boolean): void; - detach(): void; - - /** - * Use this function to register event handlers. The handler callbacks are synchronous and will run in the main thread rather than the event loop. - * - * @method on - * @param event {string} Name of the event. Check the examples for supported events. - * @param handler {Function} The handler function that will be called when an event with the given name was emitted. This function will receive a data argument which contains event data. See the example for more details. - */ - on(event: string, handler: Function): IChartistBase; - - /** - * Use this function to un-register event handlers. If the handler function parameter is omitted all handlers for the given event will be un-registered. - * - * @method off - * @param event {string} Name of the event for which a handler should be removed - * @param handler {Function} The handler function that that was previously used to register a new event handler. This handler will be removed from the event handler list. If this parameter is omitted then all event handlers for the given event are removed from the list. - */ - off(event: string, handler?: Function): IChartistBase; - } - - interface IChartistPieChart extends IChartistBase { - new (target: any, data: IChartistData, options?: IPieChartOptions, responsiveOptions?: Array>): IChartistPieChart; - } - - interface IChartistLineChart extends IChartistBase { - new (target: any, data: IChartistData, options?: ILineChartOptions, responsiveOptions?: Array>): IChartistLineChart; - } - - interface IChartistBarChart extends IChartistBase { - new (target: any, data: IChartistData, options?: IBarChartOptions, responsiveOptions?: Array>): IChartistBarChart; - } - - interface IChartistCandleChart extends IChartistBase { - new (target: any, data: IChartistData, options?: ICandleChartOptions, responsiveOptions?: Array>): IChartistCandleChart; - } - - interface IChartOptions { - /** - * If true the whole data is reversed including labels, the series order as well as the whole series data arrays. - */ - reverseData?: boolean; - - plugins?: Array; - } - - interface IPieChartOptions extends IChartOptions { - /** - * Specify a fixed width for the chart as a string (i.e. '100px' or '50%') - */ - width?: number | string; - - /** - * Specify a fixed height for the chart as a string (i.e. '100px' or '50%') - */ - height?: number | string; - - /** - * Padding of the chart drawing area to the container element and labels as a number or padding object {top: 5, right: 5, bottom: 5, left: 5} - */ - chartPadding?: IChartPadding | number; - - /** - * Override the class names that are used to generate the SVG structure of the chart - */ - classNames?: IPieChartClasses; - - /** - * The start angle of the pie chart in degrees where 0 points north. A higher value offsets the start angle clockwise. - */ - startAngle?: number; - - /** - * An optional total you can specify. By specifying a total value, the sum of the values in the series must be this total in order to draw a full pie. You can use this parameter to draw only parts of a pie or gauge charts. - */ - total?: number; - - /** - * If specified the donut CSS classes will be used and strokes will be drawn instead of pie slices. - */ - donut?: boolean; - - /** - * If specified the donut segments will be drawn as shapes instead of strokes. - */ - donutSolid?: boolean; - - /** - * Specify the donut stroke width, currently done in javascript for convenience. May move to CSS styles in the future. - * This option can be set as number or string to specify a relative width (i.e. 100 or '30%'). - */ - donutWidth?: number | string; - - /** - * Specify if a label should be shown or not - */ - showLabel?: boolean; - - /** - * Label position offset from the standard position which is half distance of the radius. This value can be either positive or negative. Positive values will position the label away from the center. - */ - labelOffset?: number; - - /** - * This option can be set to 'inside', 'outside' or 'center'. Positioned with 'inside' the labels will be placed on half the distance of the radius to the border of the Pie by respecting the 'labelOffset'. The 'outside' option will place the labels at the border of the pie and 'center' will place the labels in the absolute center point of the chart. The 'center' option only makes sense in conjunction with the 'labelOffset' option. - */ - labelPosition?: string; - - /** - * An interpolation function for the label value - */ - labelInterpolationFnc?: Function; - - /** - * Label direction can be 'neutral', 'explode' or 'implode'. Default is 'neutral'. The labels anchor will be positioned based on those settings as well as the fact if the labels are on the right or left side of the center of the chart. Usually explode is useful when labels are positioned far away from the center. - */ - labelDirection?: string; - - /** - * If true the whole data is reversed including labels, the series order as well as the whole series data arrays. - */ - reverseData?: boolean; - - /** - * If true empty values will be ignored to avoid drawing unncessary slices and labels - */ - ignoreEmptyValues?: boolean; - } - - interface IChartPadding { - top?: number; - right?: number; - bottom?: number; - left?: number; - } - - interface IPieChartClasses { - chartPie?: string; - chartDonut?: string; - series?: string; - slicePie?: string; - sliceDonut?: string; - label?: string; - } - - interface IBarChartOptions extends IChartOptions { - axisX?: IBarChartAxis; - axisY?: IBarChartAxis; - width?: number | string; - height?: number | string; - high?: number; - low?: number; - ticks?: Array; - onlyInteger?: boolean; - chartPadding?: IChartPadding; - seriesBarDistance?: number; - - /** - * If set to true this property will cause the series bars to be stacked and form a total for each series point. This will also influence the y-axis and the overall bounds of the chart. In stacked mode the seriesBarDistance property will have no effect. - */ - stackBars?: boolean; - - horizontalBars?: boolean; - distributeSeries?: boolean; - } - - interface IBarChartAxis { - offset?: number; - position?: string; - labelOffset?: { - x?: number; - y?: number; - }; - showLabel?: boolean; - showGrid?: boolean; - labelInterpolationFnc?: Function; - scaleMinSpace?: number; - onlyInteger?: boolean; - } - - interface IBarChartClasses { - chart?: string; - horizontalBars?: string; - label?: string; - labelGroup?: string; - series?: string; - bar?: string; - grid?: string; - gridGroup?: string; - vertical?: string; - horizontal?: string; - start?: string; - end?: string; - } - - interface ILineChartOptions extends IChartOptions { - axisX?: IChartistStepAxis | IChartistFixedScaleAxis | IChartistAutoScaleAxis; - axisY?: IChartistStepAxis | IChartistFixedScaleAxis | IChartistAutoScaleAxis; - width?: number | string; - height?: number | string; - showLine?: boolean; - showPoint?: boolean; - showArea?: boolean; - areaBase?: number; - lineSmooth?: Function | boolean; - low?: number; - high?: number; - ticks?: Array; - chartPadding?: IChartPadding; - fullWidth?: boolean; - classNames?: ILineChartClasses; - } - - interface ILineChartAxis { - offset?: number; - position?: string; - labelOffset?: { - x?: number; - y?: number; - }; - showLabel?: boolean; - showGrid?: boolean; - labelInterpolationFnc?: Function; - } - - interface IChartistStepAxis extends ILineChartAxis { - type?: IStepAxisStatic; - ticks?: Array | Array; - stretch?: boolean; - } - - interface IChartistFixedScaleAxis extends ILineChartAxis { - type?: IFixedScaleAxisStatic; - high?: number; - low?: number; - divisor?: number; - ticks?: Array | Array; - } - - interface IChartistAutoScaleAxis extends ILineChartAxis { - high?: number; - low?: number; - scaleMinSpace?: number; - onlyInteger?: boolean; - referenceValue?: number; - type?: IAutoScaleAxisStatic; - } - - interface ILineChartClasses { - /** - * Default is 'ct-chart-line' - */ - chart?: string; - label?: string; - labelGroup?: string; - series?: string; - line?: string; - point?: string; - area?: string; - grid?: string; - gridGroup?: string; - gridBackground?: string; - vertical?: string; - horizontal?: string; - start?: string; - end?: string; - } - - interface ICandleChartOptions extends IChartOptions { - - /** - * Options for X-Axis - */ - axisX?: ICandleChartAxis; - - /** - * Options for Y-Axis - */ - axisY?: ICandleChartAxis; - - /** - * Specify a fixed width for the chart as a string (i.e. '100px' or '50%') - */ - width?: number | string; - - /** - * Specify a fixed height for the chart as a string (i.e. '100px' or '50%') - */ - height?: number | string; - - /** - * Overriding the natural high of the chart allows you to zoom in or limit the charts highest displayed value - */ - hight?: number | string; - - /** - * Overriding the natural low of the chart allows you to zoom in or limit the charts lowest displayed value - */ - low?: number | string; - - /** - * Width of candle body in pixel (IMO is 2 px best minimum value) - */ - candleWidth?: number | string; - - /** - * Width of candle wick in pixel (IMO is 1 px best minimum value) - */ - candleWickWidth?: number | string; - - /** - * Use calculated x-axis step length, depending on the number of quotes to display, as candle width. Otherwise the candleWidth is being used. - */ - useStepLengthAsCandleWidth?: boolean | string; - - /** - * Use 1/3 of candle body width as width for the candle wick, otherwise the candleWickWidth is being used. - */ - useOneThirdAsCandleWickWidth?: boolean | string; - - /** - * Padding of the chart drawing area to the container element and labels as a number or padding object {top: 5, right: 5, bottom: 5, left: 5} - */ - chartPadding?: IChartPadding | number; - - /** - * When set to true, the last grid line on the x-axis is not drawn and the chart elements will expand to the full available width of the chart. For the last label to be drawncorrectly you might need to add chart padding or offset the last label with a draw event handler. - */ - fullWidth?: boolean | string; - - /** - * Override the class names that get used to generate the SVG structure of the chart - */ - classNames?: ICandleChartClasses; - } - - interface ICandleChartAxis { - /** - * The offset of the chart drawing area to the border of the container - */ - offset?: number; - /** - * Position where labels are placed. Can be set to `start` or `end` where `start` is equivalent to left or top on vertical axis and `end` is equivalent to right or bottom on horizontal axis. - */ - position?: string; - /** - * Allows you to correct label positioning on this axis by positive or negative x and y offset. - */ - labelOffset?: { - x?: number; - y?: number; - }; - /** - * If labels should be shown or not - */ - showLabel?: boolean; - /** - * If the axis grid should be drawn or not - */ - showGrid?: boolean; - /** - * Interpolation function that allows you to intercept the value from the axis label - */ - labelInterpolationFnc?: Function; - /** - * Set the axis type to be used to project values on this axis. If not defined, Chartist.StepAxis will be used for the X-Axis, where the ticks option will be set to the labels in the data and the stretch option will be set to the global fullWidth option. This type can be changed to any axis constructor available (e.g. Chartist.FixedScaleAxis), where all axis options should be present here. - */ - type?: any; - } - - interface ICandleChartClasses { - chart?: string; - label?: string; - labelGroup?: string; - series?: string; - candlePositive?: string; - candleNegative?: string, - grid?: string, - gridGroup?: string, - gridBackground?: string, - vertical?: string, - horizontal?: string, - start?: string, - end?: string, - } - - - interface ChartistSvgStatic { - new (name: HTMLElement | string, attributes: Object, className?: string, parent?: Object, insertFirst?: boolean): IChartistSvg; - - Easing: ChartistEasingStatic; - - /** - * This method checks for support of a given SVG feature like Extensibility, SVG-animation or the like. Check http://www.w3.org/TR/SVG11/feature for a detailed list. - */ - isSupported(feature: string): boolean; - } - - interface IChartistSvg { - - /** - * Set attributes on the current SVG element of the wrapper you're currently working on. - */ - attr(attributes: Object | string, ns: string): Object | string; - - /** - * Create a new SVG element whose wrapper object will be selected for further operations. This way you can also create nested groups easily. - */ - elem(name: string, attributes?: Object, className?: string, insertFirst?: boolean): IChartistSvg; - - /** - * Returns the parent Chartist.SVG wrapper object - */ - parent(): IChartistSvg; - - /** - * This method returns a Chartist.Svg wrapper around the root SVG element of the current tree. - */ - root(): IChartistSvg; - - /** - * Find the first child SVG element of the current element that matches a CSS selector. The returned object is a Chartist.Svg wrapper. - */ - querySelector(selector: string): IChartistSvg; - - /** - * Find the all child SVG elements of the current element that match a CSS selector. The returned object is a Chartist.Svg.List wrapper. - */ - querySelectorAll(selector: string): any; // this returns an svg wrapper list in the docs, need to see if that's just an array or a special list - - /** - * This method creates a foreignObject (see https://developer.mozilla.org/en-US/docs/Web/SVG/Element/foreignObject) that allows to embed HTML content into a SVG graphic. With the help of foreignObjects you can enable the usage of regular HTML elements inside of SVG where they are subject for SVG positioning and transformation but the Browser will use the HTML rendering capabilities for the containing DOM. - */ - foreignObject(content: any, attributes?: Object, className?: string, insertFirst?: boolean): IChartistSvg; - - /** - * This method adds a new text element to the current Chartist.Svg wrapper. - */ - text(t: string): IChartistSvg; - - /** - * This method will clear all child nodes of the current wrapper object. - */ - empty(): IChartistSvg; - - /** - * This method will cause the current wrapper to remove itself from its parent wrapper. Use this method if you'd like to get rid of an element in a given DOM structure. - */ - remove(): IChartistSvg; - - /** - * This method will replace the element with a new element that can be created outside of the current DOM. - */ - replace(): IChartistSvg; - - /** - * This method will append an element to the current element as a child. - */ - append(element: IChartistSvg, insertFirst?: boolean): IChartistSvg; - - /** - * Returns an array of class names that are attached to the current wrapper element. This method can not be chained further. - */ - classes(): Array; - - /** - * Adds one or a space separated list of classes to the current element and ensures the classes are only existing once. - * - * @method addClass - * @param names {string} A white space separated list of class names - */ - addClass(names: string): IChartistSvg; - - /** - * Removes one or a space separated list of classes from the current element. - * - * @method removeClass - * @param names {string} A white space separated list of class names - */ - removeClass(names: string): IChartistSvg; - - /** - * Removes all classes from the current element. - */ - removeAllClasses(): IChartistSvg; - - /** - * Get element height with fallback to svg BoundingBox or parent container dimensions - */ - height(): number; - - /** - * The animate function lets you animate the current element with SMIL animations. You can add animations for multiple attributes at the same time by using an animation definition object. This object should contain SMIL animation attributes. - */ - animate(animations: IChartistAnimations, guided: boolean, eventEmitter: Object): IChartistSvg; - - /** - * "Safe" way to get property value from svg BoundingBox. This is a workaround. Firefox throws an NS_ERROR_FAILURE error if getBBox() is called on an invisible node. - * THIS IS A WORKAROUND - */ - getBBoxProperty(node: SVGElement, prop: string): string; // TODO: find a good example of this and add it to the tests, it might belong to static - } - - interface IChartistAnimations { - [Key: string]: IChartistAnimationOptions; - } - - interface IChartistAnimationOptions { - id?: string; - dur: string | number; - from: string | number; - to: string | number; - easing?: IChartistEasingDefinition | string; - fill?: string; - begin?: string; - } - - interface IChartistEasingDefinition { - 0: number; - 1: number; - 2: number; - 3: number; - } - - interface ChartistEasingStatic { - easeInSine: IChartistEasingDefinition; - easeOutSine: IChartistEasingDefinition; - easeInOutSine: IChartistEasingDefinition; - easeInQuad: IChartistEasingDefinition; - easeOutQuad: IChartistEasingDefinition; - easeInOutQuad: IChartistEasingDefinition; - easeInCubic: IChartistEasingDefinition; - easeOutCubic: IChartistEasingDefinition; - easeInOutCubic: IChartistEasingDefinition; - easeInQuart: IChartistEasingDefinition; - easeOutQuart: IChartistEasingDefinition; - easeInOutQuart: IChartistEasingDefinition; - easeInQuint: IChartistEasingDefinition; - easeOutQuint: IChartistEasingDefinition; - easeInOutQuint: IChartistEasingDefinition; - easeInExpo: IChartistEasingDefinition; - easeOutExpo: IChartistEasingDefinition; - easeInOutExpo: IChartistEasingDefinition; - easeInCirc: IChartistEasingDefinition; - easeOutCirc: IChartistEasingDefinition; - easeInOutCirc: IChartistEasingDefinition; - easeInBack: IChartistEasingDefinition; - easeOutBack: IChartistEasingDefinition; - easeInOutBack: IChartistEasingDefinition; - } - - interface ChartistInterpolationStatic { - - /** - * This interpolation function does not smooth the path and the result is only containing lines and no curves. - */ - none(options?: IChartistInterpolationOptions): Function; - - /** - * Simple smoothing creates horizontal handles that are positioned with a fraction of the length between two data points. You can use the divisor option to specify the amount of smoothing. - */ - simple(options?: IChartistSimpleInterpolationOptions): Function; - - /** - * Cardinal / Catmull-Rome spline interpolation is the default smoothing function in Chartist. It produces nice results where the splines will always meet the points. It produces some artifacts though when data values are increased or decreased rapidly. The line may not follow a very accurate path and if the line should be accurate this smoothing function does not produce the best results. - */ - cardinal(options?: IChartistCardinalInterpolationOptions): Function; - - /** - * Step interpolation will cause the line chart to move in steps rather than diagonal or smoothed lines. This interpolation will create additional points that will also be drawn when the showPoint option is enabled. - */ - step(options?: IChartistStepInterpolationOptions): Function; - } - - interface IChartistInterpolationOptions { - fillHoles?: boolean; - } - - interface IChartistSimpleInterpolationOptions extends IChartistInterpolationOptions { - divisor?: number; - } - - interface IChartistCardinalInterpolationOptions extends IChartistInterpolationOptions { - tension?: number; - } - - interface IChartistStepInterpolationOptions extends IChartistInterpolationOptions { - postpone?: boolean; - } + interface ChartistStatic { + + /** + * Precision level used internally in Chartist for rounding. If you require more decimal places you can increase this number. + */ + precision: number; + + /** + * A map with characters to escape for strings to be safely used as attribute values. + */ + escapingMap: IChartistEscapeMap; + + Pie: IChartistPieChart; + Bar: IChartistBarChart; + Line: IChartistLineChart; + Candle: IChartistCandleChart; + + FixedScaleAxis: IFixedScaleAxisStatic; + AutoScaleAxis: IAutoScaleAxisStatic; + StepAxis: IStepAxisStatic; + + Svg: ChartistSvgStatic; + Interpolation: ChartistInterpolationStatic; + + noop: Function; + + alphaNumerate(n: number): string; + + extend(target: Object, ...sources: Object[]): Object; + + replaceAll(str: string, subStr: string, newSubStr: string): string; + + ensureUnit(value: number, unit: string): string; + + quantity(input: string | number): Object; + + query(query: Node | string): Node; + + times(length: number): Array; + + sum(previous: number, current: number): number; + + mapMultiply(factor: number): (num: number) => number; + + mapAdd(addend: number): (num: number) => number; + + serialMap(arr: Array, cb: Function): Array; + + roundWithPrecision(value: number, digits?: number): number; + + getMultiValue(value: any, dimension?: any): number; // this method is not documented, but it is used in the examples + + serialize(data: Object | string | number): string; + + deserialize(data: string): Object | string | number; + + createSvg(container: Node, width: string, height: string, className: string): Object; // TODO: Figure out if this is returning a ChartistSVGWrapper or an actual SVGElement + + plugins: any; + } + + interface IChartistEscapeMap { + [Key: string]: string; + } + + interface IResponsiveOptionTuple extends Array { + 0: string; + 1: T; + } + + // these have no other purpose than to help define the types that can be placed on + // a line chart axisX + // in the actual chartist library these are classes that project their options onto + // the parent class + interface IFixedScaleAxisStatic { + } + + interface IAutoScaleAxisStatic { + } + + interface IStepAxisStatic { + } + + // data formats are not well documented on all the ways they can be passed to the constructors + // this definition gives some intellisense, but does not protect the user from misuse + // TODO: come in and tidy this up and make it fit better + interface IChartistData { + labels?: Array | Array | Array; + series: Array | Array> | Array | Array>; + } + + interface IChartistSeriesData { + name?: string; + value?: number; + data?: Array; + className?: string; + meta?: any; + } + + interface IChartistBase { + container: any; + data: IChartistData; + defaultOptions: T; + options: T; + responsiveOptions: Array>; + + // this most likely doesn't need to be exposed to the user + eventEmitter: any; + + supportsForeignObject: boolean; + supportsAnimations: boolean; + resizeListener: any; + + plugins?: Array; // all of these plugins seem to be functions with options, but keeping type any for now + + update(data: Object, options?: T, override?: boolean): void; + + detach(): void; + + /** + * Use this function to register event handlers. The handler callbacks are synchronous and will run in the main thread rather than the event loop. + * + * @method on + * @param event {string} Name of the event. Check the examples for supported events. + * @param handler {Function} The handler function that will be called when an event with the given name was emitted. This function will receive a data argument which contains event data. See the example for more details. + */ + on(event: string, handler: Function): IChartistBase; + + /** + * Use this function to un-register event handlers. If the handler function parameter is omitted all handlers for the given event will be un-registered. + * + * @method off + * @param event {string} Name of the event for which a handler should be removed + * @param handler {Function} The handler function that that was previously used to register a new event handler. This handler will be removed from the event handler list. If this parameter is omitted then all event handlers for the given event are removed from the list. + */ + off(event: string, handler?: Function): IChartistBase; + } + + interface IChartistPieChart extends IChartistBase { + new (target: any, data: IChartistData, options?: IPieChartOptions, responsiveOptions?: Array>): IChartistPieChart; + } + + interface IChartistLineChart extends IChartistBase { + new (target: any, data: IChartistData, options?: ILineChartOptions, responsiveOptions?: Array>): IChartistLineChart; + } + + interface IChartistBarChart extends IChartistBase { + new (target: any, data: IChartistData, options?: IBarChartOptions, responsiveOptions?: Array>): IChartistBarChart; + } + + interface IChartistCandleChart extends IChartistBase { + new (target: any, data: IChartistData, options?: ICandleChartOptions, responsiveOptions?: Array>): IChartistCandleChart; + } + + interface IChartOptions { + /** + * If true the whole data is reversed including labels, the series order as well as the whole series data arrays. + */ + reverseData?: boolean; + + plugins?: Array; + } + + interface IPieChartOptions extends IChartOptions { + /** + * Specify a fixed width for the chart as a string (i.e. '100px' or '50%') + */ + width?: number | string; + + /** + * Specify a fixed height for the chart as a string (i.e. '100px' or '50%') + */ + height?: number | string; + + /** + * Padding of the chart drawing area to the container element and labels as a number or padding object {top: 5, right: 5, bottom: 5, left: 5} + */ + chartPadding?: IChartPadding | number; + + /** + * Override the class names that are used to generate the SVG structure of the chart + */ + classNames?: IPieChartClasses; + + /** + * The start angle of the pie chart in degrees where 0 points north. A higher value offsets the start angle clockwise. + */ + startAngle?: number; + + /** + * An optional total you can specify. By specifying a total value, the sum of the values in the series must be this total in order to draw a full pie. You can use this parameter to draw only parts of a pie or gauge charts. + */ + total?: number; + + /** + * If specified the donut CSS classes will be used and strokes will be drawn instead of pie slices. + */ + donut?: boolean; + + /** + * If specified the donut segments will be drawn as shapes instead of strokes. + */ + donutSolid?: boolean; + + /** + * Specify the donut stroke width, currently done in javascript for convenience. May move to CSS styles in the future. + * This option can be set as number or string to specify a relative width (i.e. 100 or '30%'). + */ + donutWidth?: number | string; + + /** + * Specify if a label should be shown or not + */ + showLabel?: boolean; + + /** + * Label position offset from the standard position which is half distance of the radius. This value can be either positive or negative. Positive values will position the label away from the center. + */ + labelOffset?: number; + + /** + * This option can be set to 'inside', 'outside' or 'center'. Positioned with 'inside' the labels will be placed on half the distance of the radius to the border of the Pie by respecting the 'labelOffset'. The 'outside' option will place the labels at the border of the pie and 'center' will place the labels in the absolute center point of the chart. The 'center' option only makes sense in conjunction with the 'labelOffset' option. + */ + labelPosition?: string; + + /** + * An interpolation function for the label value + */ + labelInterpolationFnc?: Function; + + /** + * Label direction can be 'neutral', 'explode' or 'implode'. Default is 'neutral'. The labels anchor will be positioned based on those settings as well as the fact if the labels are on the right or left side of the center of the chart. Usually explode is useful when labels are positioned far away from the center. + */ + labelDirection?: string; + + /** + * If true the whole data is reversed including labels, the series order as well as the whole series data arrays. + */ + reverseData?: boolean; + + /** + * If true empty values will be ignored to avoid drawing unncessary slices and labels + */ + ignoreEmptyValues?: boolean; + } + + interface IChartPadding { + top?: number; + right?: number; + bottom?: number; + left?: number; + } + + interface IPieChartClasses { + chartPie?: string; + chartDonut?: string; + series?: string; + slicePie?: string; + sliceDonut?: string; + label?: string; + } + + interface IBarChartOptions extends IChartOptions { + axisX?: IBarChartAxis; + axisY?: IBarChartAxis; + width?: number | string; + height?: number | string; + high?: number; + low?: number; + ticks?: Array; + onlyInteger?: boolean; + chartPadding?: IChartPadding; + seriesBarDistance?: number; + + /** + * If set to true this property will cause the series bars to be stacked and form a total for each series point. This will also influence the y-axis and the overall bounds of the chart. In stacked mode the seriesBarDistance property will have no effect. + */ + stackBars?: boolean; + + horizontalBars?: boolean; + distributeSeries?: boolean; + } + + interface IBarChartAxis { + offset?: number; + position?: string; + labelOffset?: { + x?: number; + y?: number; + }; + showLabel?: boolean; + showGrid?: boolean; + labelInterpolationFnc?: Function; + scaleMinSpace?: number; + onlyInteger?: boolean; + } + + interface IBarChartClasses { + chart?: string; + horizontalBars?: string; + label?: string; + labelGroup?: string; + series?: string; + bar?: string; + grid?: string; + gridGroup?: string; + vertical?: string; + horizontal?: string; + start?: string; + end?: string; + } + + interface ILineChartOptions extends IChartOptions { + axisX?: IChartistStepAxis | IChartistFixedScaleAxis | IChartistAutoScaleAxis; + axisY?: IChartistStepAxis | IChartistFixedScaleAxis | IChartistAutoScaleAxis; + width?: number | string; + height?: number | string; + showLine?: boolean; + showPoint?: boolean; + showArea?: boolean; + areaBase?: number; + lineSmooth?: Function | boolean; + low?: number; + high?: number; + ticks?: Array; + chartPadding?: IChartPadding; + fullWidth?: boolean; + classNames?: ILineChartClasses; + series?: { + [key: string]: { + lineSmooth?: Function | boolean; + showLine?: boolean; + showPoint?: boolean; + showArea?: boolean; + areaBase?: number; + } + } + } + + interface ILineChartAxis { + offset?: number; + position?: string; + labelOffset?: { + x?: number; + y?: number; + }; + showLabel?: boolean; + showGrid?: boolean; + labelInterpolationFnc?: Function; + } + + interface IChartistStepAxis extends ILineChartAxis { + type?: IStepAxisStatic; + ticks?: Array | Array; + stretch?: boolean; + } + + interface IChartistFixedScaleAxis extends ILineChartAxis { + type?: IFixedScaleAxisStatic; + high?: number; + low?: number; + divisor?: number; + ticks?: Array | Array; + } + + interface IChartistAutoScaleAxis extends ILineChartAxis { + high?: number; + low?: number; + scaleMinSpace?: number; + onlyInteger?: boolean; + referenceValue?: number; + type?: IAutoScaleAxisStatic; + } + + interface ILineChartClasses { + /** + * Default is 'ct-chart-line' + */ + chart?: string; + label?: string; + labelGroup?: string; + series?: string; + line?: string; + point?: string; + area?: string; + grid?: string; + gridGroup?: string; + gridBackground?: string; + vertical?: string; + horizontal?: string; + start?: string; + end?: string; + } + + interface ICandleChartOptions extends IChartOptions { + + /** + * Options for X-Axis + */ + axisX?: ICandleChartAxis; + + /** + * Options for Y-Axis + */ + axisY?: ICandleChartAxis; + + /** + * Specify a fixed width for the chart as a string (i.e. '100px' or '50%') + */ + width?: number | string; + + /** + * Specify a fixed height for the chart as a string (i.e. '100px' or '50%') + */ + height?: number | string; + + /** + * Overriding the natural high of the chart allows you to zoom in or limit the charts highest displayed value + */ + hight?: number | string; + + /** + * Overriding the natural low of the chart allows you to zoom in or limit the charts lowest displayed value + */ + low?: number | string; + + /** + * Width of candle body in pixel (IMO is 2 px best minimum value) + */ + candleWidth?: number | string; + + /** + * Width of candle wick in pixel (IMO is 1 px best minimum value) + */ + candleWickWidth?: number | string; + + /** + * Use calculated x-axis step length, depending on the number of quotes to display, as candle width. Otherwise the candleWidth is being used. + */ + useStepLengthAsCandleWidth?: boolean | string; + + /** + * Use 1/3 of candle body width as width for the candle wick, otherwise the candleWickWidth is being used. + */ + useOneThirdAsCandleWickWidth?: boolean | string; + + /** + * Padding of the chart drawing area to the container element and labels as a number or padding object {top: 5, right: 5, bottom: 5, left: 5} + */ + chartPadding?: IChartPadding | number; + + /** + * When set to true, the last grid line on the x-axis is not drawn and the chart elements will expand to the full available width of the chart. For the last label to be drawncorrectly you might need to add chart padding or offset the last label with a draw event handler. + */ + fullWidth?: boolean | string; + + /** + * Override the class names that get used to generate the SVG structure of the chart + */ + classNames?: ICandleChartClasses; + } + + interface ICandleChartAxis { + /** + * The offset of the chart drawing area to the border of the container + */ + offset?: number; + /** + * Position where labels are placed. Can be set to `start` or `end` where `start` is equivalent to left or top on vertical axis and `end` is equivalent to right or bottom on horizontal axis. + */ + position?: string; + /** + * Allows you to correct label positioning on this axis by positive or negative x and y offset. + */ + labelOffset?: { + x?: number; + y?: number; + }; + /** + * If labels should be shown or not + */ + showLabel?: boolean; + /** + * If the axis grid should be drawn or not + */ + showGrid?: boolean; + /** + * Interpolation function that allows you to intercept the value from the axis label + */ + labelInterpolationFnc?: Function; + /** + * Set the axis type to be used to project values on this axis. If not defined, Chartist.StepAxis will be used for the X-Axis, where the ticks option will be set to the labels in the data and the stretch option will be set to the global fullWidth option. This type can be changed to any axis constructor available (e.g. Chartist.FixedScaleAxis), where all axis options should be present here. + */ + type?: any; + } + + interface ICandleChartClasses { + chart?: string; + label?: string; + labelGroup?: string; + series?: string; + candlePositive?: string; + candleNegative?: string, + grid?: string, + gridGroup?: string, + gridBackground?: string, + vertical?: string, + horizontal?: string, + start?: string, + end?: string, + } + + + interface ChartistSvgStatic { + new (name?: HTMLElement | string, attributes?: Object, className?: string, parent?: Object, insertFirst?: boolean): IChartistSvg; + + Easing: ChartistEasingStatic; + + /** + * This method checks for support of a given SVG feature like Extensibility, SVG-animation or the like. Check http://www.w3.org/TR/SVG11/feature for a detailed list. + */ + isSupported(feature: string): boolean; + } + + interface IChartistSvg { + + /** + * Set attributes on the current SVG element of the wrapper you're currently working on. + */ + attr(attributes: Object | string, ns: string): Object | string; + + /** + * Create a new SVG element whose wrapper object will be selected for further operations. This way you can also create nested groups easily. + */ + elem(name: string, attributes?: Object, className?: string, insertFirst?: boolean): IChartistSvg; + + /** + * Returns the parent Chartist.SVG wrapper object + */ + parent(): IChartistSvg; + + /** + * This method returns a Chartist.Svg wrapper around the root SVG element of the current tree. + */ + root(): IChartistSvg; + + /** + * Find the first child SVG element of the current element that matches a CSS selector. The returned object is a Chartist.Svg wrapper. + */ + querySelector(selector: string): IChartistSvg; + + /** + * Find the all child SVG elements of the current element that match a CSS selector. The returned object is a Chartist.Svg.List wrapper. + */ + querySelectorAll(selector: string): any; // this returns an svg wrapper list in the docs, need to see if that's just an array or a special list + + /** + * This method creates a foreignObject (see https://developer.mozilla.org/en-US/docs/Web/SVG/Element/foreignObject) that allows to embed HTML content into a SVG graphic. With the help of foreignObjects you can enable the usage of regular HTML elements inside of SVG where they are subject for SVG positioning and transformation but the Browser will use the HTML rendering capabilities for the containing DOM. + */ + foreignObject(content: any, attributes?: Object, className?: string, insertFirst?: boolean): IChartistSvg; + + /** + * This method adds a new text element to the current Chartist.Svg wrapper. + */ + text(t: string): IChartistSvg; + + /** + * This method will clear all child nodes of the current wrapper object. + */ + empty(): IChartistSvg; + + /** + * This method will cause the current wrapper to remove itself from its parent wrapper. Use this method if you'd like to get rid of an element in a given DOM structure. + */ + remove(): IChartistSvg; + + /** + * This method will replace the element with a new element that can be created outside of the current DOM. + */ + replace(): IChartistSvg; + + /** + * This method will append an element to the current element as a child. + */ + append(element: IChartistSvg, insertFirst?: boolean): IChartistSvg; + + /** + * Returns an array of class names that are attached to the current wrapper element. This method can not be chained further. + */ + classes(): Array; + + /** + * Adds one or a space separated list of classes to the current element and ensures the classes are only existing once. + * + * @method addClass + * @param names {string} A white space separated list of class names + */ + addClass(names: string): IChartistSvg; + + /** + * Removes one or a space separated list of classes from the current element. + * + * @method removeClass + * @param names {string} A white space separated list of class names + */ + removeClass(names: string): IChartistSvg; + + /** + * Removes all classes from the current element. + */ + removeAllClasses(): IChartistSvg; + + /** + * Get element height with fallback to svg BoundingBox or parent container dimensions + */ + height(): number; + + /** + * The animate function lets you animate the current element with SMIL animations. You can add animations for multiple attributes at the same time by using an animation definition object. This object should contain SMIL animation attributes. + */ + animate(animations: IChartistAnimations, guided: boolean, eventEmitter: Object): IChartistSvg; + + /** + * "Safe" way to get property value from svg BoundingBox. This is a workaround. Firefox throws an NS_ERROR_FAILURE error if getBBox() is called on an invisible node. + * THIS IS A WORKAROUND + */ + getBBoxProperty(node: SVGElement, prop: string): string; // TODO: find a good example of this and add it to the tests, it might belong to static + } + + interface IChartistAnimations { + [Key: string]: IChartistAnimationOptions; + } + + interface IChartistAnimationOptions { + id?: string; + dur: string | number; + from: string | number; + to: string | number; + easing?: IChartistEasingDefinition | string; + fill?: string; + begin?: string; + } + + interface IChartistEasingDefinition { + 0: number; + 1: number; + 2: number; + 3: number; + } + + interface ChartistEasingStatic { + easeInSine: IChartistEasingDefinition; + easeOutSine: IChartistEasingDefinition; + easeInOutSine: IChartistEasingDefinition; + easeInQuad: IChartistEasingDefinition; + easeOutQuad: IChartistEasingDefinition; + easeInOutQuad: IChartistEasingDefinition; + easeInCubic: IChartistEasingDefinition; + easeOutCubic: IChartistEasingDefinition; + easeInOutCubic: IChartistEasingDefinition; + easeInQuart: IChartistEasingDefinition; + easeOutQuart: IChartistEasingDefinition; + easeInOutQuart: IChartistEasingDefinition; + easeInQuint: IChartistEasingDefinition; + easeOutQuint: IChartistEasingDefinition; + easeInOutQuint: IChartistEasingDefinition; + easeInExpo: IChartistEasingDefinition; + easeOutExpo: IChartistEasingDefinition; + easeInOutExpo: IChartistEasingDefinition; + easeInCirc: IChartistEasingDefinition; + easeOutCirc: IChartistEasingDefinition; + easeInOutCirc: IChartistEasingDefinition; + easeInBack: IChartistEasingDefinition; + easeOutBack: IChartistEasingDefinition; + easeInOutBack: IChartistEasingDefinition; + } + + interface ChartistInterpolationStatic { + + /** + * This interpolation function does not smooth the path and the result is only containing lines and no curves. + */ + none(options?: IChartistInterpolationOptions): Function; + + /** + * Simple smoothing creates horizontal handles that are positioned with a fraction of the length between two data points. You can use the divisor option to specify the amount of smoothing. + */ + simple(options?: IChartistSimpleInterpolationOptions): Function; + + /** + * Cardinal / Catmull-Rome spline interpolation is the default smoothing function in Chartist. It produces nice results where the splines will always meet the points. It produces some artifacts though when data values are increased or decreased rapidly. The line may not follow a very accurate path and if the line should be accurate this smoothing function does not produce the best results. + */ + cardinal(options?: IChartistCardinalInterpolationOptions): Function; + + /** + * Step interpolation will cause the line chart to move in steps rather than diagonal or smoothed lines. This interpolation will create additional points that will also be drawn when the showPoint option is enabled. + */ + step(options?: IChartistStepInterpolationOptions): Function; + } + + interface IChartistInterpolationOptions { + fillHoles?: boolean; + } + + interface IChartistSimpleInterpolationOptions extends IChartistInterpolationOptions { + divisor?: number; + } + + interface IChartistCardinalInterpolationOptions extends IChartistInterpolationOptions { + tension?: number; + } + + interface IChartistStepInterpolationOptions extends IChartistInterpolationOptions { + postpone?: boolean; + } } declare var Chartist: Chartist.ChartistStatic; export = Chartist; -export as namespace Chartist; \ No newline at end of file +export as namespace Chartist; diff --git a/types/chosen-js/chosen-js-tests.ts b/types/chosen-js/chosen-js-tests.ts index 575b7503ea..811ff4994b 100644 --- a/types/chosen-js/chosen-js-tests.ts +++ b/types/chosen-js/chosen-js-tests.ts @@ -1,5 +1,3 @@ - - // Options $(".my_select_box").chosen(); @@ -12,14 +10,23 @@ $(".my_select_box").chosen({ width: "95%" }); +$(".chosen-select").chosen({ + rtl: true +}); + // Destroy $(".my_select_box").chosen("destroy"); // Triggered Events -$(".my_select_box").on("change", function(evt, params) { +$(".my_select_box").on("change", (evt, params) => { evt.preventDefault(); - let s = params.selected; - console.log(s); + const s: string = params.selected; + const d: string = params.deselected; + console.log(s, d); +}); + +$(".chosen-select").on("chosen:maxselected", () => { + alert("Max selected"); }); // Triggerable Events diff --git a/types/chosen-js/index.d.ts b/types/chosen-js/index.d.ts index c9a5556c26..e9a67550db 100644 --- a/types/chosen-js/index.d.ts +++ b/types/chosen-js/index.d.ts @@ -1,9 +1,11 @@ -// Type definitions for Chosen.JQuery 1.6.1 +// Type definitions for Chosen 1.8 // Project: http://harvesthq.github.com/chosen/ -// Definitions by: Boris Yankov , denis +// Definitions by: Boris Yankov , denisname // Definitions: https://github.com/DefinitelyTyped/DefinitelyTyped // TypeScript Version: 2.3 +// Validated against Chosen version 1.8.5 + /// declare namespace Chosen { @@ -11,71 +13,107 @@ declare namespace Chosen { type TriggerEvent = "chosen:updated" | "chosen:activate" | "chosen:open" | "chosen:close"; interface Options { - /**When set to true on a single select, Chosen adds a UI element which selects the first element (if it is blank). - * @default: false + /** + * When set to true on a single select, Chosen adds a UI element which selects the first element (if it is blank). + * @default false */ allow_single_deselect?: boolean; - /**By default Chosen's search is case-insensitive. Setting this option to true makes the search case-sensitive. - * @default: false + /** + * By default, Chosen's search is case-insensitive. Setting this option to true makes the search case-sensitive. + * @default false */ case_sensitive_search?: boolean; - /**When set to true, Chosen will not display the search field (single selects only). - * @default: false + /** + * When set to true, Chosen will not display the search field (single selects only). + * @default false */ disable_search?: boolean; - /**Hide the search input on single selects if there are n or fewer options. - * @default: 0 + /** + * Hide the search input on single selects if there are n or fewer options. + * @default 0 */ disable_search_threshold?: number; - /**By default, searching will match on any word within an option tag. Set this option to false if you want to only match on the entire text of an option tag. - * @default: true + /** + * By default, searching will match on any word within an option tag. Set this option to false if you want to only match on the entire text of an option tag. + * @default true */ enable_split_word_search?: boolean; - /**When set to true, Chosen will grab any classes on the original select field and add them to Chosen’s container div. - * @default: false + /** + * By default, Chosen will search group labels as well as options, and filter to show all options below matching groups. Set this to false to search only in the options. + * @default true + */ + group_search?: boolean; + /** + * By default, Chosen's results are hidden after a option is selected. Setting this option to false will keep the results open after selection. This only applies to multiple selects. + * @default true + */ + hide_results_on_select?: boolean; + /** + * When set to true, Chosen will grab any classes on the original select field and add them to Chosen’s container div. + * @default false */ inherit_select_classes?: boolean; - /**Limits how many options the user can select. When the limit is reached, the chosen:maxselected event is triggered. - * @default: Infinity + /** + * Limits how many options the user can select. When the limit is reached, the `chosen:maxselected` event is triggered. + * @default Infinity */ max_selected_options?: number; - /**The text to be displayed when no matching results are found. The current search is shown at the end of the text (e.g., No results match "Bad Search"). - * @default: "No results match" + /** + * The text to be displayed when no matching results are found. The current search is shown at the end of the text (e.g., No results match "Bad Search"). + * @default "No results match" */ no_results_text?: string; - /**The text to be displayed as a placeholder when no options are selected for a multiple select. - * @default: "Select Some Options" + /** + * The text to be displayed as a placeholder when no options are selected for a multiple select. + * @default "Select Some Options" */ placeholder_text_multiple?: string; - /**The text to be displayed as a placeholder when no options are selected for a single select. - * @default: "Select an Option" + /** + * The text to be displayed as a placeholder when no options are selected for a single select. + * @default "Select an Option" */ placeholder_text_single?: string; - /**By default, Chosen’s search matches starting at the beginning of a word. Setting this option to true allows matches starting from anywhere within a word. This is especially useful for options that include a lot of special characters or phrases in ()s and []s. - * @default: false + /** + * Chosen supports right-to-left text in select boxes. Set this option to true to support right-to-left text options. + * @default false + */ + rtl?: boolean; + /** + * By default, Chosen’s search matches starting at the beginning of a word. Setting this option to true allows matches starting from anywhere within a word. + * This is especially useful for options that include a lot of special characters or phrases in ()s and []s. + * @default false */ search_contains?: boolean; - /**By default, pressing delete/backspace on multiple selects will remove a selected choice. When false, pressing delete/backspace will highlight the last choice, and a second press deselects it. - * @default: true + /** + * By default, pressing delete/backspace on multiple selects will remove a selected choice. + * When false, pressing delete/backspace will highlight the last choice, and a second press deselects it. + * @default true */ single_backstroke_delete?: boolean; - /**The width of the Chosen select box. By default, Chosen attempts to match the width of the select box you are replacing. If your select is hidden when Chosen is instantiated, you must specify a width or the select will show up with a width of 0. */ + /** + * The width of the Chosen select box. By default, Chosen attempts to match the width of the select box you are replacing. + * If your select is hidden when Chosen is instantiated, you must specify a width or the select will show up with a width of 0. + */ width?: string; - /**By default, Chosen includes disabled options in search results with a special styling. Setting this option to false will hide disabled results and exclude them from searches. - * @default: true + /** + * By default, Chosen includes disabled options in search results with a special styling. Setting this option to false will hide disabled results and exclude them from searches. + * @default true */ display_disabled_options?: boolean; - /**By default, Chosen includes selected options in search results with a special styling. Setting this option to false will hide selected results and exclude them from searches. + /** + * By default, Chosen includes selected options in search results with a special styling. Setting this option to false will hide selected results and exclude them from searches. * Note: this is for multiple selects only. In single selects, the selected result will always be displayed. - * @default: true + * @default true */ display_selected_options?: boolean; - /**By default, Chosen only shows the text of a selected option. Setting this option to true will show the text and group (if any) of the selected option. - * @default: false + /** + * By default, Chosen only shows the text of a selected option. Setting this option to true will show the text and group (if any) of the selected option. + * @default false */ include_group_label_in_selected?: boolean; - /**Only show the first (n) matching options in the results. This can be used to increase performance for selects with very many options. - * @default: Infinity + /** + * Only show the first (n) matching options in the results. This can be used to increase performance for selects with very many options. + * @default Infinity */ max_shown_results?: number; } @@ -87,13 +125,27 @@ declare namespace Chosen { } interface JQuery { - chosen(): JQuery; - chosen(options: Chosen.Options | "destroy"): JQuery; + chosen(options?: Chosen.Options | "destroy"): JQuery; - /**Chosen triggers the standard DOM event whenever a selection is made (it also sends a selected or deselected parameter that tells you which option was changed). */ + /** + * Chosen triggers the standard DOM event whenever a selection is made (it also sends a selected or deselected parameter that tells you which option was changed). + */ on(events: "change", handler: (eventObject: JQueryEventObject, args: Chosen.SelectedData) => any): JQuery; + /** + * * `chosen:ready` Triggered after Chosen has been fully instantiated. + * * `chosen:maxselected` Triggered if max_selected_options is set and that total is broken. + * * `chosen:showing_dropdown` Triggered when Chosen’s dropdown is opened. + * * `chosen:hiding_dropdown` Triggered when Chosen’s dropdown is closed. + * * `chosen:no_results` Triggered when a search returns no matching results. + */ on(events: Chosen.OnEvent, handler: (eventObject: JQueryEventObject) => any): JQuery; + /** + * * `chosen:updated` This event should be triggered whenever Chosen’s underlying select element changes (such as a change in selected options). + * * `chosen:activate` This is the equivalant of focusing a standard HTML select field. When activated, Chosen will capure keypress events as if you had clicked the field directly. + * * `chosen:open` This event activates Chosen and also displays the search results. + * * `chosen:close` This event deactivates Chosen and hides the search results. + */ trigger(eventType: Chosen.TriggerEvent): JQuery; } diff --git a/types/chosen-js/tsconfig.json b/types/chosen-js/tsconfig.json index 9f4ce049cb..93360e6201 100644 --- a/types/chosen-js/tsconfig.json +++ b/types/chosen-js/tsconfig.json @@ -7,7 +7,7 @@ ], "noImplicitAny": true, "noImplicitThis": true, - "strictNullChecks": false, + "strictNullChecks": true, "strictFunctionTypes": true, "baseUrl": "../", "typeRoots": [ diff --git a/types/chosen-js/tslint.json b/types/chosen-js/tslint.json index a41bf5d19a..f93cf8562a 100644 --- a/types/chosen-js/tslint.json +++ b/types/chosen-js/tslint.json @@ -1,79 +1,3 @@ { - "extends": "dtslint/dt.json", - "rules": { - "adjacent-overload-signatures": false, - "array-type": false, - "arrow-return-shorthand": false, - "ban-types": false, - "callable-types": false, - "comment-format": false, - "dt-header": false, - "eofline": false, - "export-just-namespace": false, - "import-spacing": false, - "interface-name": false, - "interface-over-type-literal": false, - "jsdoc-format": false, - "max-line-length": false, - "member-access": false, - "new-parens": false, - "no-any-union": false, - "no-boolean-literal-compare": false, - "no-conditional-assignment": false, - "no-consecutive-blank-lines": false, - "no-construct": false, - "no-declare-current-package": false, - "no-duplicate-imports": false, - "no-duplicate-variable": false, - "no-empty-interface": false, - "no-for-in-array": false, - "no-inferrable-types": false, - "no-internal-module": false, - "no-irregular-whitespace": false, - "no-mergeable-namespace": false, - "no-misused-new": false, - "no-namespace": false, - "no-object-literal-type-assertion": false, - "no-padding": false, - "no-redundant-jsdoc": false, - "no-redundant-jsdoc-2": false, - "no-redundant-undefined": false, - "no-reference-import": false, - "no-relative-import-in-test": false, - "no-self-import": false, - "no-single-declare-module": false, - "no-string-throw": false, - "no-unnecessary-callback-wrapper": false, - "no-unnecessary-class": false, - "no-unnecessary-generics": false, - "no-unnecessary-qualifier": false, - "no-unnecessary-type-assertion": false, - "no-useless-files": false, - "no-var-keyword": false, - "no-var-requires": false, - "no-void-expression": false, - "no-trailing-whitespace": false, - "object-literal-key-quotes": false, - "object-literal-shorthand": false, - "one-line": false, - "one-variable-per-declaration": false, - "only-arrow-functions": false, - "prefer-conditional-expression": false, - "prefer-const": false, - "prefer-declare-function": false, - "prefer-for-of": false, - "prefer-method-signature": false, - "prefer-template": false, - "radix": false, - "semicolon": false, - "space-before-function-paren": false, - "space-within-parens": false, - "strict-export-declare-modifiers": false, - "trim-file": false, - "triple-equals": false, - "typedef-whitespace": false, - "unified-signatures": false, - "void-return": false, - "whitespace": false - } + "extends": "dtslint/dt.json" } diff --git a/types/chroma-js/index.d.ts b/types/chroma-js/index.d.ts index 797752c8ad..daf53a0e10 100644 --- a/types/chroma-js/index.d.ts +++ b/types/chroma-js/index.d.ts @@ -293,6 +293,8 @@ declare namespace chroma { mode(mode: keyof ColorSpaces): this; + gamma(g: number): this; + cache(use: boolean): boolean; correctLightness(enable?: boolean): this; diff --git a/types/chrome-apps/index.d.ts b/types/chrome-apps/index.d.ts new file mode 100644 index 0000000000..957c409a4f --- /dev/null +++ b/types/chrome-apps/index.d.ts @@ -0,0 +1,5781 @@ +// Type definitions for Chrome packaged application development +// Project: http://developer.chrome.com/apps/ +// Definitions by: Nikolai Ommundsen , Adam Lay , MIZUNE Pine , MIZUSHIMA Junki , Ingvar Stepanyan , Adam Pyle +// Definitions: https://github.com/DefinitelyTyped/DefinitelyTyped +// TypeScript Version: 2.4 + +/// + +/////////////// +// WebView ref: https://chromium.googlesource.com/chromium/src/+/68.0.3432.1/chrome/common/extensions/api/webview_tag.json +/////////////// + +//////////////////// +// Accessibility Features +//////////////////// +/** + * Use the chrome.accessibilityFeatures API to manage Chrome's accessibility features. This API relies on the ChromeSetting prototype of the type API for getting and setting individual accessibility features. In order to get feature states the extension must request accessibilityFeatures.read permission. For modifying feature state, the extension needs accessibilityFeatures.modify permission. Note that accessibilityFeatures.modify does not imply accessibilityFeatures.read permission. + * @since Availability: Since Chrome 37. + * Permissions: "accessibilityFeatures.read" (For read access); "accessibilityFeatures.modify" (For modifications; Note that accessibilityFeatures.modify does not imply accessibilityFeatures.read permission.) + * Important: This API works only on Chrome OS. + */ +declare namespace chrome { + namespace accessibilityFeatures { + interface AccessibilityFeaturesGetArg { + /** Optional. Whether to return the value that applies to the incognito session (default false). */ + incognito?: boolean; + } + + interface AccessibilityFeaturesCallbackArg { + /** The value of the setting. */ + value: any; + /** + * One of + * • not_controllable: cannot be controlled by any extension + * • controlled_by_other_extensions: controlled by extensions with higher precedence + * • controllable_by_this_extension: can be controlled by this extension + * • controlled_by_this_extension: controlled by this extension + */ + levelOfControl: string; + /** Optional. Whether the effective value is specific to the incognito session. This property will only be present if the incognito property in the details parameter of get() was true. */ + incognitoSpecific?: boolean; + } + + interface AccessibilityFeaturesSetArg { + /** + * The value of the setting. + * Note that every setting has a specific value type, which is described together with the setting. An extension should not set a value of a different type. + */ + value: any; + /** + * Optional. + * The scope of the ChromeSetting. One of + * • regular: setting for the regular profile (which is inherited by the incognito profile if not overridden elsewhere), + * • regular_only: setting for the regular profile only (not inherited by the incognito profile), + * • incognito_persistent: setting for the incognito profile that survives browser restarts (overrides regular preferences), + * • incognito_session_only: setting for the incognito profile that can only be set during an incognito session and is deleted when the incognito session ends (overrides regular and incognito_persistent preferences). + */ + scope?: string; + } + + interface AccessibilityFeaturesClearArg { + /** + * Optional. + * The scope of the ChromeSetting. One of + * • regular: setting for the regular profile (which is inherited by the incognito profile if not overridden elsewhere), + * • regular_only: setting for the regular profile only (not inherited by the incognito profile), + * • incognito_persistent: setting for the incognito profile that survives browser restarts (overrides regular preferences), + * • incognito_session_only: setting for the incognito profile that can only be set during an incognito session and is deleted when the incognito session ends (overrides regular and incognito_persistent preferences). + */ + scope?: string; + } + + interface AccessibilityFeaturesSetting { + /** + * Gets the value of a setting. + * @param details Which setting to consider. + * @param callback The callback parameter should be a function that looks like this: + * function(object details) {...}; + */ + get(details: AccessibilityFeaturesGetArg, callback: (details: AccessibilityFeaturesCallbackArg) => void): void; + /** + * Sets the value of a setting. + * @param details Which setting to change. + * @param callback Called at the completion of the set operation. + * If you specify the callback parameter, it should be a function that looks like this: + * function() {...}; + */ + set(details: AccessibilityFeaturesSetArg, callback?: () => void): void; + /** + * Clears the setting, restoring any default value. + * @param details Which setting to clear. + * @param callback Called at the completion of the clear operation. + * If you specify the callback parameter, it should be a function that looks like this: + * function() {...}; + */ + clear(details: AccessibilityFeaturesClearArg, callback?: () => void): void; + } + + export var spokenFeedback: AccessibilityFeaturesSetting; + export var largeCursor: AccessibilityFeaturesSetting; + export var stickyKeys: AccessibilityFeaturesSetting; + export var highContrast: AccessibilityFeaturesSetting; + export var screenMagnifier: AccessibilityFeaturesSetting; + export var autoclick: AccessibilityFeaturesSetting; + export var virtualKeyboard: AccessibilityFeaturesSetting; + export var animationPolicy: AccessibilityFeaturesSetting; + } + + //////////////////// + // Alarms + //////////////////// + /** + * Use the chrome.alarms API to schedule code to run periodically or at a specified time in the future. + * Availability: Since Chrome 22. + * Permissions: "alarms" + */ + namespace alarms { + interface AlarmCreateInfo { + /** Optional. Length of time in minutes after which the onAlarm event should fire. */ + delayInMinutes?: number; + /** Optional. If set, the onAlarm event should fire every periodInMinutes minutes after the initial event specified by when or delayInMinutes. If not set, the alarm will only fire once. */ + periodInMinutes?: number; + /** Optional. Time at which the alarm should fire, in milliseconds past the epoch (e.g. Date.now() + n). */ + when?: number; + } + + interface Alarm { + /** Optional. If not null, the alarm is a repeating alarm and will fire again in periodInMinutes minutes. */ + periodInMinutes?: number; + /** Time at which this alarm was scheduled to fire, in milliseconds past the epoch (e.g. Date.now() + n). For performance reasons, the alarm may have been delayed an arbitrary amount beyond this. */ + scheduledTime: number; + /** Name of this alarm. */ + name: string; + } + + interface AlarmEvent extends chrome.events.Event<(alarm: Alarm) => void> { } + + /** + * Creates an alarm. Near the time(s) specified by alarmInfo, the onAlarm event is fired. If there is another alarm with the same name (or no name if none is specified), it will be cancelled and replaced by this alarm. + * In order to reduce the load on the user's machine, Chrome limits alarms to at most once every 1 minute but may delay them an arbitrary amount more. That is, setting delayInMinutes or periodInMinutes to less than 1 will not be honored and will cause a warning. when can be set to less than 1 minute after "now" without warning but won't actually cause the alarm to fire for at least 1 minute. + * To help you debug your app or extension, when you've loaded it unpacked, there's no limit to how often the alarm can fire. + * @param alarmInfo Describes when the alarm should fire. The initial time must be specified by either when or delayInMinutes (but not both). If periodInMinutes is set, the alarm will repeat every periodInMinutes minutes after the initial event. If neither when or delayInMinutes is set for a repeating alarm, periodInMinutes is used as the default for delayInMinutes. + */ + export function create(alarmInfo: AlarmCreateInfo): void; + /** + * Creates an alarm. Near the time(s) specified by alarmInfo, the onAlarm event is fired. If there is another alarm with the same name (or no name if none is specified), it will be cancelled and replaced by this alarm. + * In order to reduce the load on the user's machine, Chrome limits alarms to at most once every 1 minute but may delay them an arbitrary amount more. That is, setting delayInMinutes or periodInMinutes to less than 1 will not be honored and will cause a warning. when can be set to less than 1 minute after "now" without warning but won't actually cause the alarm to fire for at least 1 minute. + * To help you debug your app or extension, when you've loaded it unpacked, there's no limit to how often the alarm can fire. + * @param name Optional name to identify this alarm. Defaults to the empty string. + * @param alarmInfo Describes when the alarm should fire. The initial time must be specified by either when or delayInMinutes (but not both). If periodInMinutes is set, the alarm will repeat every periodInMinutes minutes after the initial event. If neither when or delayInMinutes is set for a repeating alarm, periodInMinutes is used as the default for delayInMinutes. + */ + export function create(name: string, alarmInfo: AlarmCreateInfo): void; + /** + * Gets an array of all the alarms. + * @param callback The callback parameter should be a function that looks like this: + * function(array of Alarm alarms) {...}; + */ + export function getAll(callback: (alarms: Alarm[]) => void): void; + /** + * Clears all alarms. + * @param callback If you specify the callback parameter, it should be a function that looks like this: + * function(boolean wasCleared) {...}; + */ + export function clearAll(callback?: (wasCleared: boolean) => void): void; + /** + * Clears the alarm with the given name. + * @param name The name of the alarm to clear. Defaults to the empty string. + * @param callback If you specify the callback parameter, it should be a function that looks like this: + * function(boolean wasCleared) {...}; + */ + export function clear(name?: string, callback?: (wasCleared: boolean) => void): void; + /** + * Clears the alarm without a name. + * @param callback If you specify the callback parameter, it should be a function that looks like this: + * function(boolean wasCleared) {...}; + */ + export function clear(callback: (wasCleared: boolean) => void): void; + /** + * Retrieves details about the specified alarm. + * @param callback The callback parameter should be a function that looks like this: + * function( Alarm alarm) {...}; + */ + export function get(callback: (alarm: Alarm) => void): void; + /** + * Retrieves details about the specified alarm. + * @param name The name of the alarm to get. Defaults to the empty string. + * @param callback The callback parameter should be a function that looks like this: + * function( Alarm alarm) {...}; + */ + export function get(name: string, callback: (alarm: Alarm) => void): void; + + /** Fired when an alarm has elapsed. Useful for event pages. */ + export var onAlarm: AlarmEvent; + } + + + //////////////////// + // App + //////////////////// + namespace app { + interface AppDetails extends chrome.runtime.Manifest { + id: string; + } + + export function getDetails(): AppDetails; + } + + //////////////////// + // App Runtime + //////////////////// + namespace app.runtime { + type LaunchSource = 'untracked' | 'app_launcher' | 'new_tab_page' | 'reload' | 'restart' | + 'load_and_launch' | 'command_line' | 'file_handler' | 'url_handler' | 'system_tray' | + 'about_page' | 'keyboard' | 'extensions_page' | 'management_api' | 'ephemeral_app' | + 'background' | 'kiosk' | 'chrome_internal' | 'test' | 'installed_notification' | 'context_menu'; + + interface LaunchData { + id?: string; + items?: LaunchDataItem[]; + url?: string; + referrerUrl?: string; + isKioskSession?: boolean; + isPublicSession?: boolean; + source?: LaunchSource; + actionData?: {}; + } + + interface LaunchDataItem { + entry: FileEntry; + type: string; + } + + interface LaunchedEvent extends chrome.events.Event<(launchData: LaunchData) => void> { } + + interface RestartedEvent extends chrome.events.Event<() => void> { } + + export var onLaunched: LaunchedEvent; + export var onRestarted: RestartedEvent; + } + + //////////////////// + // App Window + //////////////////// + namespace app.window { + interface ContentBounds { + left?: number; + top?: number; + width?: number; + height?: number; + } + + interface BoundsSpecification { + left?: number; + top?: number; + width?: number; + height?: number; + minWidth?: number; + minHeight?: number; + maxWidth?: number; + maxHeight?: number; + } + + interface Bounds { + left: number; + top: number; + width: number; + height: number; + minWidth?: number; + minHeight?: number; + maxWidth?: number; + maxHeight?: number; + setPosition(left: number, top: number): void; + setSize(width: number, height: number): void; + setMinimumSize(minWidth: number, minHeight: number): void; + setMaximumSize(maxWidth: number, maxHeight: number): void; + } + interface FrameOptions { + type?: string; + color?: string; + activeColor?: string; + inactiveColor?: string; + } + + interface CreateWindowOptions { + id?: string; + innerBounds?: BoundsSpecification; + outerBounds?: BoundsSpecification; + minWidth?: number; + minHeight?: number; + maxWidth?: number; + maxHeight?: number; + /** + * @description + * @type {(string | FrameOptions)} string ("none", "chrome") or FrameOptions + * @memberof CreateWindowOptions + */ + frame?: string | FrameOptions; + bounds?: ContentBounds; + alphaEnabled?: boolean; + /** + * @description + * @type {string} "normal", "fullscreen", "maximized", "minimized" + * @memberof CreateWindowOptions + */ + state?: string; + hidden?: boolean; + resizable?: boolean; + singleton?: boolean; + alwaysOnTop?: boolean; + focused?: boolean; + visibleOnAllWorkspaces?: boolean; + } + + interface AppWindow { + focus: () => void; + fullscreen: () => void; + isFullscreen: () => boolean; + minimize: () => void; + isMinimized: () => boolean; + maximize: () => void; + isMaximized: () => boolean; + restore: () => void; + moveTo: (left: number, top: number) => void; + resizeTo: (width: number, height: number) => void; + drawAttention: () => void; + clearAttention: () => void; + close: () => void; + show: () => void; + hide: () => void; + getBounds: () => ContentBounds; + setBounds: (bounds: ContentBounds) => void; + isAlwaysOnTop: () => boolean; + setAlwaysOnTop: (alwaysOnTop: boolean) => void; + setVisibleOnAllWorkspaces: (alwaysVisible: boolean) => void; + contentWindow: Window; + id: string; + innerBounds: Bounds; + outerBounds: Bounds; + onBoundsChanged: WindowEvent; + onClosed: WindowEvent; + onFullscreened: WindowEvent; + onMaximized: WindowEvent; + onMinimized: WindowEvent; + onRestored: WindowEvent; + } + + export function create(url: string, options?: CreateWindowOptions, callback?: (created_window: AppWindow) => void): void; + export function current(): AppWindow; + export function get(id: string): AppWindow; + export function getAll(): AppWindow[]; + export function canSetVisibleOnAllWorkspaces(): boolean; + + interface WindowEvent extends chrome.events.Event<() => void> { } + + export var onBoundsChanged: WindowEvent; + export var onClosed: WindowEvent; + export var onFullscreened: WindowEvent; + export var onMaximized: WindowEvent; + export var onMinimized: WindowEvent; + export var onRestored: WindowEvent; + } + + + //////////////////// + // Audio + //////////////////// + /** + * The chrome.audio API is provided to allow users to get information about and control the audio devices attached to the system. This API is currently only implemented for ChromeOS. + * @since Chrome 59 + */ + namespace audio { + export type StreamType = 'INPUT' | 'OUTPUT'; + interface AudioDeviceInfo { + /** The unique identifier of the audio device. */ + id: string; + /** Stream type associated with this device. */ + streamType: StreamType; + /** Type of the device. */ + deviceType: "HEADPHONE" | "MIC" | "USB" | "BLUETOOTH" | "HDMI" | "INTERNAL_SPEAKER" | "INTERNAL_MIC" | "FRONT_MIC" | "REAR_MIC" | "KEYBOARD_MIC" | "HOTWORD" | "LINEOUT" | "POST_MIX_LOOPBACK" | "POST_DSP_LOOPBACK" | "OTHER"; + /** The user-friendly name (e.g. "USB Microphone"). */ + displayName: string; + /** Device name. */ + deviceName: string; + /** True if this is the current active device. */ + isActive: boolean; + /** The sound level of the device, volume for output, gain for input. */ + level: number; + /** The stable/persisted device id string when available. */ + stableDeviceId?: string; + } + interface DeviceIdLists { + /** + * List of input devices specified by their ID. + * To indicate input devices should be unaffected, leave this property unset. + */ + input?: string[]; + /** + * List of output devices specified by their ID. + * To indicate output devices should be unaffected, leave this property unset. + */ + output?: string[]; + } + interface SetDeviceProperties { + /** + * The audio device's desired sound level. Defaults to the device's current sound level. + * If used with audio input device, represents audio device gain. + * If used with audio output device, represents audio device volume. + * + * Type: integer + */ + level?: number; + } + interface OnLevelChangedEvent { + /** + * The callback parameter should be a function that looks like this: + * function(object event) {...}; + * @param {(event: { + * deviceId: string, + * level: number + * }) => void} callback + */ + addListener(callback: (event: { + deviceId: string, + level: number + }) => void): void; + } + interface OnMuteChangedEvent { + /** + * The callback parameter should be a function that looks like this: + * function(object event) {...}; + */ + addListener(callback: (event: { + streamType: StreamType[], + isMuted: boolean + }) => void): void; + } + interface OnDeviceListChangedEvent { + /** + * The callback parameter should be a function that looks like this: + * function(array of AudioDeviceInfo devices) {...}; + * @param {(devices: AudioDeviceInfo[]) => void} callback `devices` contains a list of all present audio devices after the change. + */ + addListener(callback: (devices: AudioDeviceInfo[]) => void): void; + } + /** + * @description Device properties by which to filter the list of returned audio devices. If the filter is not set or set to {}, returned device list will contain all available audio devices. + */ + interface Filter { + /** + * @description If set, only audio devices whose stream type is included in this list will satisfy the filter. + */ + streamTypes?: StreamType[]; + /** + * @description If set, only audio devices whose active state matches this value will satisfy the filter. + */ + isActive?: boolean; + } + /** + * @description Gets a list of audio devices filtered based on |filter|. + */ + export function getDevices(filter: Filter, callback: (devices: AudioDeviceInfo[]) => void): void; + export function getDevices(callback: (devices: AudioDeviceInfo[]) => void): void; + /** Sets lists of active input and/or output devices. */ + export function setDevices(ids: DeviceIdLists[] | string[], callback: () => void): void; + /** Sets the properties for the input or output device. */ + export function setProperties(id: string, properties: SetDeviceProperties, callback: () => void): void; + /** + * @description Gets the system-wide mute state for the specified stream type. + * @param {StreamType} streamType Stream type for which mute state should be fetched. + * @param {(value: boolean) => {}} callback Callback reporting whether mute is set or not for specified stream type. + */ + export function getMute(streamType: StreamType, callback: (value: boolean) => void): void; + /** + * @description Sets mute state for a stream type. The mute state will apply to all audio devices with the specified audio stream type. + * @param {StreamType} streamType Stream type for which mute state should be set. + * @param {boolean} isMuted New mute value. + * @param {() => {}} [callback] If you specify the callback parameter, it should be a function that looks like this: function() {...}; + */ + export function setMute(streamType: StreamType, isMuted: boolean, callback?: () => void): void; + /** Fired when sound level changes for an active audio device. */ + export var onLevelChanged: OnLevelChangedEvent; + /** Fired when the mute state of the audio input or output changes. Note that mute state is system-wide and the new value applies to every audio device with specified stream type. */ + export var onMuteChanged: OnMuteChangedEvent; + /** Fired when audio devices change, either new devices being added, or existing devices being removed. */ + export var onDeviceListChanged: OnDeviceListChangedEvent; + } + + //////////////////// + // Bluetooth + //////////////////// + /** + * Use the chrome.bluetooth API to connect to a Bluetooth device. All functions report failures via chrome.runtime.lastError. + * Manifest: "bluetooth": {...} + * @since Chrome 37 + */ + namespace bluetooth { + interface AdapterState { + address: string; + name: string; + powered: boolean; + available: boolean; + discovering: boolean; + } + interface Device { + address: string; + name?: string; + deviceClass?: number; + vendorIdSource?: 'bluetooth' | 'usb'; + vendorId?: number; + productId?: number; + deviceId?: number; + type?: "computer" | "phone" | "modem" | "audio" | "carAudio" | "video" | "peripheral" | "joystick" | "gamepad" | "keyboard" | "mouse" | "tablet" | "keyboardMouseCombo"; + paired?: boolean; + connected?: boolean; + /** + * @since Chrome 48 + */ + connecting?: boolean; + /** + * @since Chrome 48 + */ + connectable?: boolean; + uuids?: string[]; + /** + * @since Chrome 44 + */ + inquiryRssi: number; + /** + * @since Chrome 44 + */ + inquiryTxPower: number; + } + + interface BluetoothEvent { + addListener(callback: (event: T) => void): void; + } + + /** + * Some criteria to filter the list of returned bluetooth devices. If the filter is not set or set to {}, returned device list will contain all bluetooth devices. Right now this is only supported in ChromeOS, for other platforms, a full list is returned. + */ + interface DeviceFilter { + /** Type of filter to apply to the device list. Default is all. */ + filterType?: 'all' | 'known'; + /** Maximum number of bluetoth devices to return. Default is 0 (no limit) if unspecified. */ + limit?: number; + } + /** Get information about the Bluetooth adapter. */ + export function getAdapterState(callback: (adapterInfo: AdapterState) => void): void; + /** Get information about a Bluetooth device known to the system. */ + export function getDevice(deviceAddress: string, callback: (deviceInfo: Device) => void): void; + /** + * Get a list of Bluetooth devices known to the system, including paired and recently discovered devices. + * @param filter Since Chrome 67. Some criteria to filter the list of returned bluetooth devices. If the filter is not set or set to {}, returned device list will contain all bluetooth devices. Right now this is only supported in ChromeOS, for other platforms, a full list is returned. + * @param callback Called when the search is completed. + */ + export function getDevices(filter: DeviceFilter, callback: (deviceInfo: Device) => void): void; + /** + * Start discovery. Newly discovered devices will be returned via the onDeviceAdded event. Previously discovered devices already known to the adapter must be obtained using getDevices and will only be updated using the |onDeviceChanged| event if information about them changes. + * Discovery will fail to start if this application has already called startDiscovery. Discovery can be resource intensive: stopDiscovery should be called as soon as possible. + */ + export function startDiscovery(callback: () => void): void; + /** Stop discovery. */ + export function stopDiscovery(callback: () => void): void; + /** Fired when the state of the Bluetooth adapter changes. */ + export var onAdapterStateChanged: BluetoothEvent; + /** Fired when information about a new Bluetooth device is available. */ + export var onDeviceAdded: BluetoothEvent; + /** Fired when information about a known Bluetooth device has changed. */ + export var onDeviceChanged: BluetoothEvent; + /** Fired when a Bluetooth device that was previously discovered has been out of range for long enough to be considered unavailable again, and when a paired device is removed. */ + export var onDeviceRemoved: BluetoothEvent; + } + /** + * The chrome.bluetoothLowEnergy API is used to communicate with Bluetooth Smart (Low Energy) devices using the Generic Attribute Profile (GATT). + * Manifest: "bluetooth": {...} + * @since Chrome 37 + * Important: This API works only on Chrome OS. + * Note: With Chrome 56, users can select nearby Bluetooth Low Energy devices to provide to web sites that use the Web Bluetooth API. + */ + namespace bluetoothLowEnergy { + /** + * NOT IMPLEMENTED YET + * @see https://developer.chrome.com/apps/bluetoothLowEnergy + * */ + } + /** + * Use the chrome.bluetoothSocket API to send and receive data to Bluetooth devices using RFCOMM and L2CAP connections. + * @since Chrome 37 + * Manifest: "bluetooth": {...} + * Important: This API works only on OS X, Windows and Chrome OS. + */ + namespace bluetoothSocket { + /** NOT IMPLEMENTED YET */ + } + + //////////////////// + // Browser + //////////////////// + /** + * Use the chrome.browser API to interact with the Chrome browser associated with + * the current application and Chrome profile. + */ + namespace browser { + interface Options { + /** The URL to navigate to when the new tab is initially opened. */ + url: string; + } + + /** + * Opens a new tab in a browser window associated with the current application + * and Chrome profile. If no browser window for the Chrome profile is opened, + * a new one is opened prior to creating the new tab. + * @param options Configures how the tab should be opened. + * @param callback Called when the tab was successfully + * created, or failed to be created. If failed, runtime.lastError will be set. + */ + export function openTab(options: Options, callback: () => void): void; + + /** + * Opens a new tab in a browser window associated with the current application + * and Chrome profile. If no browser window for the Chrome profile is opened, + * a new one is opened prior to creating the new tab. Since Chrome 42 only. + * @param options Configures how the tab should be opened. + */ + export function openTab(options: Options): void; + } + + //////////////////// + // Commands + //////////////////// + /** + * Use the commands API to add keyboard shortcuts that trigger actions in your extension, for example, an action to open the browser action or send a command to the extension. + * Availability: Since Chrome 25. + * Manifest: "commands": {...} + */ + namespace commands { + interface Command { + /** Optional. The name of the Extension Command */ + name?: string; + /** Optional. The Extension Command description */ + description?: string; + /** Optional. The shortcut active for this command, or blank if not active. */ + shortcut?: string; + } + + interface CommandEvent extends chrome.events.Event<(command: string) => void> { } + + /** + * Returns all the registered extension commands for this extension and their shortcut (if active). + * @param callback Called to return the registered commands. + * If you specify the callback parameter, it should be a function that looks like this: + * function(array of Command commands) {...}; + */ + export function getAll(callback: (commands: Command[]) => void): void; + + /** Fired when a registered command is activated using a keyboard shortcut. */ + export var onCommand: CommandEvent; + } + + //////////////////// + // Context Menus + //////////////////// + /** + * Use the chrome.contextMenus API to add items to Google Chrome's context menu. You can choose what types of objects your context menu additions apply to, such as images, hyperlinks, and pages. + * Availability: Since Chrome 6. + * Permissions: "contextMenus" + */ + namespace contextMenus { + /** + * The different contexts a menu can appear in. Specifying 'all' is equivalent to the combination of all other contexts except for 'launcher'. The 'launcher' context is only supported by apps and is used to add menu items to the context menu that appears when clicking on the app icon in the launcher/taskbar/dock/etc. Different platforms might put limitations on what is actually supported in a launcher context menu. + **/ + export type ContextType = "all" | "page" | "frame" | "selection" | "link" | "editable" | "image" | "video" | "audio" | "launcher" | "browser_action" | "page_action"; + /** + * The type of menu item. + **/ + export type ItemType = "normal" | "checkbox" | "radio" | "separator"; + + interface OnClickData { + /** + * Optional. + * @since Since Chrome 35. + * The text for the context selection, if any. + */ + selectionText?: string; + /** + * Optional. + * @since Since Chrome 35. + * A flag indicating the state of a checkbox or radio item after it is clicked. + */ + checked?: boolean; + /** + * @since Since Chrome 35. + * The ID of the menu item that was clicked. + */ + menuItemId: any; + /** + * Optional. + * @since Since Chrome 35. + * The URL of the frame of the element where the context menu was clicked, if it was in a frame. + */ + frameUrl?: string; + /** + * @since Since Chrome 35. + * A flag indicating whether the element is editable (text input, textarea, etc.). + */ + editable: boolean; + /** + * Optional. + * @since Since Chrome 35. + * One of 'image', 'video', or 'audio' if the context menu was activated on one of these types of elements. + */ + mediaType?: string; + /** + * Optional. + * @since Since Chrome 35. + * A flag indicating the state of a checkbox or radio item before it was clicked. + */ + wasChecked?: boolean; + /** + * @since Since Chrome 35. + * The URL of the page where the menu item was clicked. This property is not set if the click occured in a context where there is no current page, such as in a launcher context menu. + */ + pageUrl: string; + /** + * Optional. + * @since Since Chrome 35. + * If the element is a link, the URL it points to. + */ + linkUrl?: string; + /** + * Optional. + * @since Since Chrome 35. + * The parent ID, if any, for the item clicked. + */ + parentMenuItemId?: any; + /** + * Optional. + * @since Since Chrome 35. + * Will be present for elements with a 'src' URL. + */ + srcUrl?: string; + } + + interface CreateProperties { + /** Optional. Lets you restrict the item to apply only to documents whose URL matches one of the given patterns. (This applies to frames as well.) For details on the format of a pattern, see Match Patterns. */ + documentUrlPatterns?: string[]; + /** Optional. The initial state of a checkbox or radio item: true for selected and false for unselected. Only one radio item can be selected at a time in a given group of radio items. */ + checked?: boolean; + /** Optional. The text to be displayed in the item; this is required unless type is 'separator'. When the context is 'selection', you can use %s within the string to show the selected text. For example, if this parameter's value is "Translate '%s' to Pig Latin" and the user selects the word "cool", the context menu item for the selection is "Translate 'cool' to Pig Latin". */ + title?: string; + /** Optional. List of contexts this menu item will appear in. Defaults to ['page'] if not specified. */ + contexts?: string[]; + /** + * Optional. + * Whether this context menu item is enabled or disabled. Defaults to true. + * @since Since Chrome 20. + */ + enabled?: boolean; + /** Optional. Similar to documentUrlPatterns, but lets you filter based on the src attribute of img/audio/video tags and the href of anchor tags. */ + targetUrlPatterns?: string[]; + /** + * Optional. + * A function that will be called back when the menu item is clicked. Event pages cannot use this; instead, they should register a listener for chrome.contextMenus.onClicked. + * @param info Information sent when a context menu item is clicked. + */ + onclick?: (info: OnClickData) => void; + /** Optional. The ID of a parent menu item; this makes the item a child of a previously added item. */ + parentId?: any; + /** Optional. The type of menu item. Defaults to 'normal' if not specified. */ + type?: string; + /** + * Optional. + * @since Since Chrome 21. + * @description The unique ID to assign to this item. Mandatory for event pages. Cannot be the same as another ID for this extension. + */ + id?: string; + /** + * @description Whether the item is visible in the menu. + * @since Since Chrome 62 + */ + visible?: boolean; + } + + interface UpdateProperties { + documentUrlPatterns?: string[]; + checked?: boolean; + title?: string; + contexts?: string[]; + /** + * @since Chrome 20 + **/ + enabled?: boolean; + targetUrlPatterns?: string[]; + onclick?: (info: OnClickData) => void; + /** Optional. Note: You cannot change an item to be a child of one of its own descendants. */ + parentId?: any; + type?: string; + /** + * @description Whether the item is visible or not. + * @since Since Chrome 62 + */ + visible?: boolean; + } + + interface MenuClickedEvent extends chrome.events.Event<(info: OnClickData) => void> { } + + /** + * Since Chrome 38. + * The maximum number of top level extension items that can be added to an extension action context menu. Any items beyond this limit will be ignored. + */ + export var ACTION_MENU_TOP_LEVEL_LIMIT: number; + + /** + * Removes all context menu items added by this extension. + * @param callback Called when removal is complete. + * If you specify the callback parameter, it should be a function that looks like this: + * function() {...}; + */ + export function removeAll(callback?: () => void): void; + /** + * Creates a new context menu item. Note that if an error occurs during creation, you may not find out until the creation callback fires (the details will be in chrome.runtime.lastError). + * @param callback Called when the item has been created in the browser. If there were any problems creating the item, details will be available in chrome.runtime.lastError. + * If you specify the callback parameter, it should be a function that looks like this: + * function() {...}; + */ + export function create(createProperties: CreateProperties, callback?: () => void): void; + /** + * Updates a previously created context menu item. + * @param id The ID of the item to update. + * @param updateProperties The properties to update. Accepts the same values as the create function. + * @param callback Called when the context menu has been updated. + * If you specify the callback parameter, it should be a function that looks like this: + * function() {...}; + */ + export function update(id: string, updateProperties: UpdateProperties, callback?: () => void): void; + /** + * Updates a previously created context menu item. + * @param id The ID of the item to update. + * @param updateProperties The properties to update. Accepts the same values as the create function. + * @param callback Called when the context menu has been updated. + * If you specify the callback parameter, it should be a function that looks like this: + * function() {...}; + */ + export function update(id: number, updateProperties: UpdateProperties, callback?: () => void): void; + /** + * Removes a context menu item. + * @param menuItemId The ID of the context menu item to remove. + * @param callback Called when the context menu has been removed. + * If you specify the callback parameter, it should be a function that looks like this: + * function() {...}; + */ + export function remove(menuItemId: string, callback?: () => void): void; + /** + * Removes a context menu item. + * @param menuItemId The ID of the context menu item to remove. + * @param callback Called when the context menu has been removed. + * If you specify the callback parameter, it should be a function that looks like this: + * function() {...}; + */ + export function remove(menuItemId: number, callback?: () => void): void; + + /** + * Since Chrome 21. + * Fired when a context menu item is clicked. + */ + export var onClicked: MenuClickedEvent; + + } + + //////////////////// + // Document Scan + //////////////////// + /** + * Use the chrome.documentScan API to discover and retrieve images from attached paper document scanners. + * Availability: Since Chrome 44. + * Permissions: "documentScan" + * Important: This API works only on Chrome OS. + */ + namespace documentScan { + interface DocumentScanOptions { + /** Optional. The MIME types that are accepted by the caller. */ + mimeTypes?: string[]; + /** Optional. The number of scanned images allowed (defaults to 1). */ + maxImages?: number; + } + + interface DocumentScanCallbackArg { + /** The data image URLs in a form that can be passed as the "src" value to an image tag. */ + dataUrls: string[]; + /** The MIME type of dataUrls. */ + mimeType: string; + } + + /** + * Performs a document scan. On success, the PNG data will be sent to the callback. + * @param options Object containing scan parameters. + * @param callback Called with the result and data from the scan. + * The callback parameter should be a function that looks like this: + * function(object result) {...}; + */ + export function scan(options: DocumentScanOptions, callback: (result: DocumentScanCallbackArg) => void): void; + } + + //////////////////// + // Events + //////////////////// + /** + * The chrome.events namespace contains common types used by APIs dispatching events to notify you when something interesting happens. + * Availability: Since Chrome 21. + */ + namespace events { + /** Filters URLs for various criteria. See event filtering. All criteria are case sensitive. */ + interface UrlFilter { + /** Optional. Matches if the scheme of the URL is equal to any of the schemes specified in the array. */ + schemes?: string[]; + /** + * Optional. + * Since Chrome 23. + * Matches if the URL (without fragment identifier) matches a specified regular expression. Port numbers are stripped from the URL if they match the default port number. The regular expressions use the RE2 syntax. + */ + urlMatches?: string; + /** Optional. Matches if the path segment of the URL contains a specified string. */ + pathContains?: string; + /** Optional. Matches if the host name of the URL ends with a specified string. */ + hostSuffix?: string; + /** Optional. Matches if the host name of the URL starts with a specified string. */ + hostPrefix?: string; + /** Optional. Matches if the host name of the URL contains a specified string. To test whether a host name component has a prefix 'foo', use hostContains: '.foo'. This matches 'www.foobar.com' and 'foo.com', because an implicit dot is added at the beginning of the host name. Similarly, hostContains can be used to match against component suffix ('foo.') and to exactly match against components ('.foo.'). Suffix- and exact-matching for the last components need to be done separately using hostSuffix, because no implicit dot is added at the end of the host name. */ + hostContains?: string; + /** Optional. Matches if the URL (without fragment identifier) contains a specified string. Port numbers are stripped from the URL if they match the default port number. */ + urlContains?: string; + /** Optional. Matches if the query segment of the URL ends with a specified string. */ + querySuffix?: string; + /** Optional. Matches if the URL (without fragment identifier) starts with a specified string. Port numbers are stripped from the URL if they match the default port number. */ + urlPrefix?: string; + /** Optional. Matches if the host name of the URL is equal to a specified string. */ + hostEquals?: string; + /** Optional. Matches if the URL (without fragment identifier) is equal to a specified string. Port numbers are stripped from the URL if they match the default port number. */ + urlEquals?: string; + /** Optional. Matches if the query segment of the URL contains a specified string. */ + queryContains?: string; + /** Optional. Matches if the path segment of the URL starts with a specified string. */ + pathPrefix?: string; + /** Optional. Matches if the path segment of the URL is equal to a specified string. */ + pathEquals?: string; + /** Optional. Matches if the path segment of the URL ends with a specified string. */ + pathSuffix?: string; + /** Optional. Matches if the query segment of the URL is equal to a specified string. */ + queryEquals?: string; + /** Optional. Matches if the query segment of the URL starts with a specified string. */ + queryPrefix?: string; + /** Optional. Matches if the URL (without fragment identifier) ends with a specified string. Port numbers are stripped from the URL if they match the default port number. */ + urlSuffix?: string; + /** Optional. Matches if the port of the URL is contained in any of the specified port lists. For example [80, 443, [1000, 1200]] matches all requests on port 80, 443 and in the range 1000-1200. */ + ports?: any[]; + /** + * Optional. + * Since Chrome 28. + * Matches if the URL without query segment and fragment identifier matches a specified regular expression. Port numbers are stripped from the URL if they match the default port number. The regular expressions use the RE2 syntax. + */ + originAndPathMatches?: string; + } + + /** An object which allows the addition and removal of listeners for a Chrome event. */ + interface Event { + /** + * Registers an event listener callback to an event. + * @param callback Called when an event occurs. The parameters of this function depend on the type of event. + * The callback parameter should be a function that looks like this: + * function() {...}; + */ + addListener(callback: T): void; + /** + * Returns currently registered rules. + * @param callback Called with registered rules. + * The callback parameter should be a function that looks like this: + * function(array of Rule rules) {...}; + * Parameter rules: Rules that were registered, the optional parameters are filled with values. + */ + getRules(callback: (rules: Rule[]) => void): void; + /** + * Returns currently registered rules. + * @param ruleIdentifiers If an array is passed, only rules with identifiers contained in this array are returned. + * @param callback Called with registered rules. + * The callback parameter should be a function that looks like this: + * function(array of Rule rules) {...}; + * Parameter rules: Rules that were registered, the optional parameters are filled with values. + */ + getRules(ruleIdentifiers: string[], callback: (rules: Rule[]) => void): void; + /** + * @param callback Listener whose registration status shall be tested. + */ + hasListener(callback: T): boolean; + /** + * Unregisters currently registered rules. + * @param ruleIdentifiers If an array is passed, only rules with identifiers contained in this array are unregistered. + * @param callback Called when rules were unregistered. + * If you specify the callback parameter, it should be a function that looks like this: + * function() {...}; + */ + removeRules(ruleIdentifiers?: string[], callback?: () => void): void; + /** + * Unregisters currently registered rules. + * @param callback Called when rules were unregistered. + * If you specify the callback parameter, it should be a function that looks like this: + * function() {...}; + */ + removeRules(callback?: () => void): void; + /** + * Registers rules to handle events. + * @param rules Rules to be registered. These do not replace previously registered rules. + * @param callback Called with registered rules. + * If you specify the callback parameter, it should be a function that looks like this: + * function(array of Rule rules) {...}; + * Parameter rules: Rules that were registered, the optional parameters are filled with values. + */ + addRules(rules: Rule[], callback?: (rules: Rule[]) => void): void; + /** + * Deregisters an event listener callback from an event. + * @param callback Listener that shall be unregistered. + * The callback parameter should be a function that looks like this: + * function() {...}; + */ + removeListener(callback: T): void; + hasListeners(): boolean; + } + + /** Description of a declarative rule for handling events. */ + interface Rule { + /** Optional. Optional priority of this rule. Defaults to 100. */ + priority?: number; + /** List of conditions that can trigger the actions. */ + conditions: any[]; + /** Optional. Optional identifier that allows referencing this rule. */ + id?: string; + /** List of actions that are triggered if one of the condtions is fulfilled. */ + actions: any[]; + /** + * Optional. + * Since Chrome 28. + * Tags can be used to annotate rules and perform operations on sets of rules. + */ + tags?: string[]; + } + } + + //////////////////// + // Extension Types + //////////////////// + + /** + * Primary for extensions, but also used in apps. + * https://developer.chrome.com/extensions/extensionTypes#type-ImageDetails + **/ + namespace extensionTypes { + /** + * The format of an image. + **/ + export type ImageFormat = 'jpeg' | 'png'; + /** + * Details about the format and quality of an image. + */ + interface ImageDetails { + /** + * @description The format of the resulting image. Default is "jpeg". + * @type {ImageFormat} + * @memberof ImageDetails + */ + format?: ImageFormat; + /** + * @description When format is "jpeg", controls the quality of the resulting image. This value is ignored for PNG images. As quality is decreased, the resulting image will have more visual artifacts, and the number of bytes needed to store it will decrease. + * @type {number} + * @memberof ImageDetails + */ + quality?: number; + } + /** + * The soonest that the JavaScript or CSS will be injected into the tab. + **/ + export type RunAt = 'document_start' | 'document_end' | 'document_idle'; + /** + * The origin of injected CSS. + **/ + export type CSSOrigin = 'author' | 'user'; + /** + * @description Details of the script or CSS to inject. Either the code or the file property must be set, but both may not be set at the same time. + * @interface InjectDetails + */ + interface InjectDetails { + /** + * JavaScript or CSS code to inject. + * Warning: + * Be careful using the code parameter. Incorrect use of it may open your extension to cross site scripting attacks. + * @type {string} + * @memberof InjectDetails + */ + code?: string; + /** + * @description JavaScript or CSS file to inject. + * @type {string} + * @memberof InjectDetails + */ + file?: string; + /** + * @description If allFrames is true, implies that the JavaScript or CSS should be injected into all frames of current page. By default, it's false and is only injected into the top frame. If true and frameId is set, then the code is inserted in the selected frame and all of its child frames. + * @type {boolean} + * @memberof InjectDetails + */ + allFrames?: boolean; + /** + * @description The frame where the script or CSS should be injected. Defaults to 0 (the top-level frame). + * @since Since Chrome 50. + * @type {number} + * @memberof InjectDetails + */ + frameId?: number; + /** + * @description If matchAboutBlank is true, then the code is also injected in about:blank and about:srcdoc frames if your extension has access to its parent document. Code cannot be inserted in top-level about:-frames. By default it is false. + * @type {boolean} + * @memberof InjectDetails + */ + matchAboutBlank?: boolean; + /** + * @description The soonest that the JavaScript or CSS will be injected into the tab. Defaults to "document_idle". + * @type {RunAt} + * @memberof InjectDetails + */ + runAt: RunAt; + /** + * @description The origin of the CSS to inject. This may only be specified for CSS, not JavaScript. Defaults to "author". + * @since Since Chrome 66. + * @type {CSSOrigin} + * @memberof InjectDetails + */ + cssOrigin: CSSOrigin; + } + } + + //////////////////// + // FileSystem + //////////////////// + namespace fileSystem { + + interface AcceptOptions { + description?: string; + mimeTypes?: string[]; + extensions?: string[]; + } + + interface ChooseEntryOptions { + type?: string; + suggestedName?: string; + accepts?: AcceptOptions[]; + acceptsAllTypes?: boolean; + acceptsMultiple?: boolean; + } + + export function getDisplayPath(entry: Entry, callback: (displayPath: string) => void): void; + export function getWritableEntry(entry: Entry, callback: (entry: Entry) => void): void; + export function isWritableEntry(entry: Entry, callback: (isWritable: boolean) => void): void; + export function chooseEntry(callback: (entry: Entry) => void): void; + export function chooseEntry(callback: (fileEntries: FileEntry[]) => void): void; + export function chooseEntry(options: ChooseEntryOptions, callback: (entry: Entry) => void): void; + export function chooseEntry(options: ChooseEntryOptions, callback: (fileEntries: FileEntry[]) => void): void; + export function restoreEntry(id: string, callback: (entry: Entry) => void): void; + export function isRestorable(id: string, callback: (isRestorable: boolean) => void): void; + export function retainEntry(entry: Entry): string; + } + + + //////////////////// + // File System Provider + //////////////////// + /** + * Use the chrome.fileSystemProvider API to create file systems, that can be accessible from the file manager on Chrome OS. + * Availability: Since Chrome 40. + * Permissions: "fileSystemProvider" + * Important: This API works only on Chrome OS. + */ + namespace fileSystemProvider { + interface OpenedFileInfo { + /** A request ID to be be used by consecutive read/write and close requests. */ + openRequestId: number; + /** The path of the opened file. */ + filePath: string; + /** Whether the file was opened for reading or writing. */ + mode: string; + } + + interface FileWatchersInfo { + /** The path of the entry being observed. */ + entryPath: string; + /** Whether watching should include all child entries recursively. It can be true for directories only. */ + recursive: boolean; + /** Optional. Tag used by the last notification for the watcher. */ + lastTag?: string; + } + + interface EntryMetadata { + /** True if it is a directory. */ + isDirectory: boolean; + /** Name of this entry (not full path name). Must not contain '/'. For root it must be empty. */ + name: string; + /** File size in bytes. */ + size: number; + /** The last modified time of this entry. */ + modificationTime: Date; + /** Optional. Mime type for the entry. */ + mimeType?: string; + /** Optional. Thumbnail image as a data URI in either PNG, JPEG or WEBP format, at most 32 KB in size. Optional, but can be provided only when explicitly requested by the onGetMetadataRequested event. */ + thumbnail?: string; + } + + interface FileSystemInfo { + /** The identifier of the file system. */ + fileSystemId: string; + /** A human-readable name for the file system. */ + displayName: string; + /** Whether the file system supports operations which may change contents of the file system (such as creating, deleting or writing to files). */ + writable: boolean; + /** + * The maximum number of files that can be opened at once. If 0, then not limited. + * @since Since Chrome 42. + */ + openedFilesLimit: number; + /** + * List of currently opened files. + * @since Since Chrome 42. + */ + openedFiles: OpenedFileInfo[]; + /** + * Optional. + * Whether the file system supports the tag field for observing directories. + * @since Since Chrome 45. Warning: this is the current Beta channel. + */ + supportsNotifyTag?: boolean; + /** + * List of watchers. + * @since Since Chrome 45. Warning: this is the current Beta channel. + */ + watchers: FileWatchersInfo[]; + } + + /** @since Since Chrome 45. Warning: this is the current Beta channel. */ + interface GetActionsRequestedOptions { + /** The identifier of the file system related to this operation. */ + fileSystemId: string; + /** The unique identifier of this request. */ + requestId: number; + /** The path of the entry to return the list of actions for. */ + entryPath: string; + } + + /** @since Since Chrome 45. Warning: this is the current Beta channel. */ + interface Action { + /** The identifier of the action. Any string or CommonActionId for common actions. */ + id: string; + /** Optional. The title of the action. It may be ignored for common actions. */ + title?: string; + } + + /** @since Since Chrome 45. Warning: this is the current Beta channel. */ + interface ExecuteActionRequestedOptions { + /** The identifier of the file system related to this operation. */ + fileSystemId: string; + /** The unique identifier of this request. */ + requestId: number; + /** The path of the entry to be used for the action. */ + entryPath: string; + /** The identifier of the action to be executed. */ + actionId: string; + } + + interface MountOptions { + /** The string indentifier of the file system. Must be unique per each extension. */ + fileSystemId: string; + /** A human-readable name for the file system. */ + displayName: string; + /** Optional. Whether the file system supports operations which may change contents of the file system (such as creating, deleting or writing to files). */ + writable?: boolean; + /** + * Optional. + * The maximum number of files that can be opened at once. If not specified, or 0, then not limited. + * @since Since Chrome 41. + */ + openedFilesLimit?: number; + /** + * Optional. + * Whether the file system supports the tag field for observed directories. + * @since Since Chrome 45. Warning: this is the current Beta channel. + */ + supportsNotifyTag?: boolean; + } + + interface UnmountOptions { + /** The identifier of the file system to be unmounted. */ + fileSystemId: string; + } + + interface NotificationChange { + /** The path of the changed entry. */ + entryPath: string; + /** The type of the change which happened to the entry. */ + changeType: string; + } + + interface NotificationOptions { + /** The identifier of the file system related to this change. */ + fileSystemId: string; + /** The path of the observed entry. */ + observedPath: string; + /** Mode of the observed entry. */ + recursive: boolean; + /** The type of the change which happened to the observed entry. If it is DELETED, then the observed entry will be automatically removed from the list of observed entries. */ + changeType: string; + /** Optional. List of changes to entries within the observed directory (including the entry itself) */ + changes?: NotificationChange[]; + /** Optional. Tag for the notification. Required if the file system was mounted with the supportsNotifyTag option. Note, that this flag is necessary to provide notifications about changes which changed even when the system was shutdown. */ + tag?: string; + } + + interface RequestedEventOptions { + /** The identifier of the file system related to this operation. */ + fileSystemId: string; + /** The unique identifier of this request. */ + requestId: number; + } + + interface EntryPathRequestedEventOptions extends RequestedEventOptions { + /** The path of the entry to which this operation is related to. */ + entryPath: string; + } + + interface MetadataRequestedEventOptions extends EntryPathRequestedEventOptions { + /** Set to true if the thumbnail is requested. */ + thumbnail: boolean; + } + + interface DirectoryPathRequestedEventOptions extends RequestedEventOptions { + /** The path of the directory which is to be operated on. */ + directoryPath: string; + } + + interface FilePathRequestedEventOptions extends RequestedEventOptions { + /** The path of the entry for the operation */ + filePath: string; + } + + interface OpenFileRequestedEventOptions extends FilePathRequestedEventOptions { + /** Whether the file will be used for reading or writing. */ + mode: string; + } + + interface OpenedFileRequestedEventOptions extends RequestedEventOptions { + /** A request ID used to open the file. */ + openRequestId: number; + } + + interface OpenedFileOffsetRequestedEventOptions extends OpenedFileRequestedEventOptions { + /** Position in the file (in bytes) to start reading from. */ + offset: number; + /** Number of bytes to be returned. */ + length: number; + } + + interface DirectoryPathRecursiveRequestedEventOptions extends DirectoryPathRequestedEventOptions { + /** Whether the operation is recursive (for directories only). */ + recursive: boolean; + } + + interface EntryPathRecursiveRequestedEventOptions extends EntryPathRequestedEventOptions { + /** Whether the operation is recursive (for directories only). */ + recursive: boolean; + } + + interface SourceTargetPathRequestedEventOptions extends RequestedEventOptions { + /** The source path for the operation. */ + sourcePath: string; + /** The destination path for the operation. */ + targetPath: string; + } + + interface FilePathLengthRequestedEventOptions extends FilePathRequestedEventOptions { + /** Number of bytes to be retained after the operation completes. */ + length: number; + } + + interface OpenedFileIoRequestedEventOptions extends OpenedFileRequestedEventOptions { + /** Position in the file (in bytes) to start operating from. */ + offset: number; + /** Buffer of bytes to be operated on the file. */ + data: ArrayBuffer; + } + + interface OperationRequestedEventOptions extends RequestedEventOptions { + /** An ID of the request to which this operation is related. */ + operationRequestId: number; + } + + interface RequestedEvent extends chrome.events.Event<(options: RequestedEventOptions, successCallback: Function, errorCallback: (error: string) => void) => void> { } + + interface MetadataRequestedEvent extends chrome.events.Event<(options: MetadataRequestedEventOptions, successCallback: (metadata: EntryMetadata) => void, errorCallback: (error: string) => void) => void> { } + + interface DirectoryPathRequestedEvent extends chrome.events.Event<(options: DirectoryPathRequestedEventOptions, successCallback: (entries: EntryMetadata[], hasMore: boolean) => void, errorCallback: (error: string) => void) => void> { } + + interface OpenFileRequestedEvent extends chrome.events.Event<(options: OpenFileRequestedEventOptions, successCallback: Function, errorCallback: (error: string) => void) => void> { } + + interface OpenedFileRequestedEvent extends chrome.events.Event<(options: OpenedFileRequestedEventOptions, successCallback: Function, errorCallback: (error: string) => void) => void> { } + + interface OpenedFileOffsetRequestedEvent extends chrome.events.Event<(options: OpenedFileOffsetRequestedEventOptions, successCallback: (data: ArrayBuffer, hasMore: boolean) => void, errorCallback: (error: string) => void) => void> { } + + interface DirectoryPathRecursiveRequestedEvent extends chrome.events.Event<(options: DirectoryPathRecursiveRequestedEventOptions, successCallback: Function, errorCallback: (error: string) => void) => void> { } + + interface EntryPathRecursiveRequestedEvent extends chrome.events.Event<(options: EntryPathRecursiveRequestedEventOptions, successCallback: Function, errorCallback: (error: string) => void) => void> { } + + interface FilePathRequestedEvent extends chrome.events.Event<(options: FilePathRequestedEventOptions, successCallback: Function, errorCallback: (error: string) => void) => void> { } + + interface SourceTargetPathRequestedEvent extends chrome.events.Event<(options: SourceTargetPathRequestedEventOptions, successCallback: Function, errorCallback: (error: string) => void) => void> { } + + interface FilePathLengthRequestedEvent extends chrome.events.Event<(options: FilePathLengthRequestedEventOptions, successCallback: Function, errorCallback: (error: string) => void) => void> { } + + interface OpenedFileIoRequestedEvent extends chrome.events.Event<(options: OpenedFileIoRequestedEventOptions, successCallback: Function, errorCallback: (error: string) => void) => void> { } + + interface OperationRequestedEvent extends chrome.events.Event<(options: OperationRequestedEventOptions, successCallback: Function, errorCallback: (error: string) => void) => void> { } + + interface OptionlessRequestedEvent extends chrome.events.Event<(successCallback: Function, errorCallback: (error: string) => void) => void> { } + + /** + * Mounts a file system with the given fileSystemId and displayName. displayName will be shown in the left panel of Files.app. displayName can contain any characters including '/', but cannot be an empty string. displayName must be descriptive but doesn't have to be unique. The fileSystemId must not be an empty string. + * Depending on the type of the file system being mounted, the source option must be set appropriately. + * In case of an error, runtime.lastError will be set with a corresponding error code. + * @param callback A generic result callback to indicate success or failure. + * If you specify the callback parameter, it should be a function that looks like this: + * function() {...}; + */ + export function mount(options: MountOptions, callback?: () => void): void; + /** + * Unmounts a file system with the given fileSystemId. It must be called after onUnmountRequested is invoked. Also, the providing extension can decide to perform unmounting if not requested (eg. in case of lost connection, or a file error). + * In case of an error, runtime.lastError will be set with a corresponding error code. + * @param callback A generic result callback to indicate success or failure. + * If you specify the callback parameter, it should be a function that looks like this: + * function() {...}; + */ + export function unmount(options: UnmountOptions, callback?: () => void): void; + /** + * Returns all file systems mounted by the extension. + * @param callback Callback to receive the result of getAll function. + * The callback parameter should be a function that looks like this: + * function(array of FileSystemInfo fileSystems) {...}; + */ + export function getAll(callback: (fileSystems: FileSystemInfo[]) => void): void; + /** + * Returns information about a file system with the passed fileSystemId. + * @since Since Chrome 42. + * @param callback Callback to receive the result of get function. + * The callback parameter should be a function that looks like this: + * function(FileSystemInfo fileSystem) {...}; + */ + export function get(fileSystemId: string, callback: (fileSystem: FileSystemInfo) => void): void; + /** + * Notifies about changes in the watched directory at observedPath in recursive mode. If the file system is mounted with supportsNofityTag, then tag must be provided, and all changes since the last notification always reported, even if the system was shutdown. The last tag can be obtained with getAll. + * To use, the file_system_provider.notify manifest option must be set to true. + * Value of tag can be any string which is unique per call, so it's possible to identify the last registered notification. Eg. if the providing extension starts after a reboot, and the last registered notification's tag is equal to "123", then it should call notify for all changes which happened since the change tagged as "123". It cannot be an empty string. + * Not all providers are able to provide a tag, but if the file system has a changelog, then the tag can be eg. a change number, or a revision number. + * Note that if a parent directory is removed, then all descendant entries are also removed, and if they are watched, then the API must be notified about the fact. Also, if a directory is renamed, then all descendant entries are in fact removed, as there is no entry under their original paths anymore. + * In case of an error, runtime.lastError will be set will a corresponding error code. + * @param callback A generic result callback to indicate success or failure. + * If you specify the callback parameter, it should be a function that looks like this: + * function() {...}; + */ + export function notify(options: NotificationOptions, callback: () => void): void; + + /** Raised when unmounting for the file system with the fileSystemId identifier is requested. In the response, the unmount API method must be called together with successCallback. If unmounting is not possible (eg. due to a pending operation), then errorCallback must be called. */ + export var onUnmountRequested: RequestedEvent; + /** Raised when metadata of a file or a directory at entryPath is requested. The metadata must be returned with the successCallback call. In case of an error, errorCallback must be called. */ + export var onGetMetadataRequested: MetadataRequestedEvent; + /** Raised when contents of a directory at directoryPath are requested. The results must be returned in chunks by calling the successCallback several times. In case of an error, errorCallback must be called. */ + export var onReadDirectoryRequested: DirectoryPathRequestedEvent; + /** Raised when opening a file at filePath is requested. If the file does not exist, then the operation must fail. Maximum number of files opened at once can be specified with MountOptions. */ + export var onOpenFileRequested: OpenFileRequestedEvent; + /** Raised when opening a file previously opened with openRequestId is requested to be closed. */ + export var onCloseFileRequested: OpenedFileRequestedEvent; + /** Raised when reading contents of a file opened previously with openRequestId is requested. The results must be returned in chunks by calling successCallback several times. In case of an error, errorCallback must be called. */ + export var onReadFileRequested: OpenedFileOffsetRequestedEvent; + /** Raised when creating a directory is requested. The operation must fail with the EXISTS error if the target directory already exists. If recursive is true, then all of the missing directories on the directory path must be created. */ + export var onCreateDirectoryRequested: DirectoryPathRecursiveRequestedEvent; + /** Raised when deleting an entry is requested. If recursive is true, and the entry is a directory, then all of the entries inside must be recursively deleted as well. */ + export var onDeleteEntryRequested: EntryPathRecursiveRequestedEvent; + /** Raised when creating a file is requested. If the file already exists, then errorCallback must be called with the "EXISTS" error code. */ + export var onCreateFileRequested: FilePathRequestedEvent; + /** Raised when copying an entry (recursively if a directory) is requested. If an error occurs, then errorCallback must be called. */ + export var onCopyEntryRequested: SourceTargetPathRequestedEvent; + /** Raised when moving an entry (recursively if a directory) is requested. If an error occurs, then errorCallback must be called. */ + export var onMoveEntryRequested: SourceTargetPathRequestedEvent; + /** Raised when truncating a file to a desired length is requested. If an error occurs, then errorCallback must be called. */ + export var onTruncateRequested: FilePathLengthRequestedEvent; + /** Raised when writing contents to a file opened previously with openRequestId is requested. */ + export var onWriteFileRequested: OpenedFileIoRequestedEvent; + /** Raised when aborting an operation with operationRequestId is requested. The operation executed with operationRequestId must be immediately stopped and successCallback of this abort request executed. If aborting fails, then errorCallback must be called. Note, that callbacks of the aborted operation must not be called, as they will be ignored. Despite calling errorCallback, the request may be forcibly aborted. */ + export var onAbortRequested: OperationRequestedEvent; + /** + * Raised when showing a configuration dialog for fileSystemId is requested. If it's handled, the file_system_provider.configurable manfiest option must be set to true. + * @since Since Chrome 44. + */ + export var onConfigureRequested: RequestedEvent; + /** + * Raised when showing a dialog for mounting a new file system is requested. If the extension/app is a file handler, then this event shouldn't be handled. Instead app.runtime.onLaunched should be handled in order to mount new file systems when a file is opened. For multiple mounts, the file_system_provider.multiple_mounts manifest option must be set to true. + * @since Since Chrome 44. + */ + export var onMountRequested: OptionlessRequestedEvent; + /** + * Raised when setting a new directory watcher is requested. If an error occurs, then errorCallback must be called. + * @since Since Chrome 45. Warning: this is the current Beta channel. + */ + export var onAddWatcherRequested: EntryPathRecursiveRequestedEvent; + /** + * Raised when the watcher should be removed. If an error occurs, then errorCallback must be called. + * @since Since Chrome 45. Warning: this is the current Beta channel. + */ + export var onRemoveWatcherRequested: EntryPathRecursiveRequestedEvent; + } + + //////////////////// + // Google Cloud Messaging + //////////////////// + /** + * Use chrome.gcm to enable apps and extensions to send and receive messages through the Google Cloud Messaging Service. + * Availability: Since Chrome 35. + * Permissions: "gcm" + */ + namespace gcm { + interface OutgoingMessage { + /** The ID of the server to send the message to as assigned by Google API Console. */ + destinationId: string; + /** The ID of the message. It must be unique for each message in scope of the applications. See the Cloud Messaging documentation for advice for picking and handling an ID. */ + messageId: string; + /** Optional. Time-to-live of the message in seconds. If it is not possible to send the message within that time, an onSendError event will be raised. A time-to-live of 0 indicates that the message should be sent immediately or fail if it's not possible. The maximum and a default value of time-to-live is 86400 seconds (1 day). */ + timeToLive?: number; + /** Message data to send to the server. Case-insensitive goog. and google, as well as case-sensitive collapse_key are disallowed as key prefixes. Sum of all key/value pairs should not exceed gcm.MAX_MESSAGE_SIZE. */ + data: Object; + } + + interface IncomingMessage { + /** The message data. */ + data: Object; + /** + * Optional. + * The sender who issued the message. + * @since Since Chrome 41. + */ + from?: string; + /** + * Optional. + * The collapse key of a message. See Collapsible Messages section of Cloud Messaging documentation for details. + */ + collapseKey?: string; + } + + interface GcmError { + /** The error message describing the problem. */ + errorMessage: string; + /** Optional. The ID of the message with this error, if error is related to a specific message. */ + messageId?: string; + /** Additional details related to the error, when available. */ + detail: Object; + } + + interface MessageReceptionEvent extends chrome.events.Event<(message: IncomingMessage) => void> { } + + interface MessageDeletionEvent extends chrome.events.Event<() => void> { } + + interface GcmErrorEvent extends chrome.events.Event<(error: GcmError) => void> { } + + /** The maximum size (in bytes) of all key/value pairs in a message. */ + export var MAX_MESSAGE_SIZE: number; + + /** + * Registers the application with GCM. The registration ID will be returned by the callback. If register is called again with the same list of senderIds, the same registration ID will be returned. + * @param senderIds A list of server IDs that are allowed to send messages to the application. It should contain at least one and no more than 100 sender IDs. + * @param callback Function called when registration completes. It should check runtime.lastError for error when registrationId is empty. + * The callback parameter should be a function that looks like this: + * function(string registrationId) {...}; + * Parameter registrationId: A registration ID assigned to the application by the GCM. + */ + export function register(senderIds: string[], callback: (registrationId: string) => void): void; + /** + * Unregisters the application from GCM. + * @param callback A function called after the unregistration completes. Unregistration was successful if runtime.lastError is not set. + * The callback parameter should be a function that looks like this: + * function() {...}; + */ + export function unregister(callback: () => void): void; + /** + * Sends a message according to its contents. + * @param message A message to send to the other party via GCM. + * @param callback A function called after the message is successfully queued for sending. runtime.lastError should be checked, to ensure a message was sent without problems. + * The callback parameter should be a function that looks like this: + * function(string messageId) {...}; + * Parameter messageId: The ID of the message that the callback was issued for. + */ + export function send(message: OutgoingMessage, callback: (messageId: string) => void): void; + + /** Fired when a message is received through GCM. */ + export var onMessage: MessageReceptionEvent; + /** Fired when a GCM server had to delete messages sent by an app server to the application. See Messages deleted event section of Cloud Messaging documentation for details on handling this event. */ + export var onMessagesDeleted: MessageDeletionEvent; + /** Fired when it was not possible to send a message to the GCM server. */ + export var onSendError: GcmErrorEvent; + } + + //////////////////// + // HID + //////////////////// + /** + * Use the chrome.hid API to interact with connected HID devices. This API provides access to HID operations from within the context of an app. Using this API, apps can function as drivers for hardware devices. Errors generated by this API are reported by setting runtime.lastError and executing the function's regular callback. The callback's regular parameters will be undefined in this case. + * @since Chrome 38 + */ + namespace hid { + /** NOT YET IMPLEMENTED */ + } + + //////////////////// + // i18n + //////////////////// + /** + * Use the chrome.i18n infrastructure to implement internationalization across your whole app or extension. + * @since Chrome 5. + */ + namespace i18n { + /** Holds detected ISO language code and its percentage in the input string */ + interface DetectedLanguage { + /** An ISO language code such as 'en' or 'fr'. + * For a complete list of languages supported by this method, see [kLanguageInfoTable]{@link https://src.chromium.org/viewvc/chrome/trunk/src/third_party/cld/languages/internal/languages.cc}. + * For an unknown language, 'und' will be returned, which means that [percentage] of the text is unknown to CLD */ + language: string; + + /** The percentage of the detected language */ + percentage: number; + } + + /** Holds detected language reliability and array of DetectedLanguage */ + interface LanguageDetectionResult { + /** CLD detected language reliability */ + isReliable: boolean; + + /** Array of detectedLanguage */ + languages: DetectedLanguage[]; + } + + /** + * Gets the accept-languages of the browser. This is different from the locale used by the browser; to get the locale, use i18n.getUILanguage. + * @param callback The callback parameter should be a function that looks like this: + * function(array of string languages) {...}; + * Parameter languages: Array of the accept languages of the browser, such as en-US,en,zh-CN + */ + export function getAcceptLanguages(callback: (languages: string[]) => void): void; + /** + * Gets the localized string for the specified message. If the message is missing, this method returns an empty string (''). If the format of the getMessage() call is wrong — for example, messageName is not a string or the substitutions array has more than 9 elements — this method returns undefined. + * @param messageName The name of the message, as specified in the messages.json file. + * @param substitutions Optional. Up to 9 substitution strings, if the message requires any. + */ + export function getMessage(messageName: string, substitutions?: any): string; + /** + * Gets the browser UI language of the browser. This is different from i18n.getAcceptLanguages which returns the preferred user languages. + * @since Chrome 35. + */ + export function getUILanguage(): string; + + /** Detects the language of the provided text using CLD. + * @param text User input string to be translated. + * @param callback The callback parameter should be a function that looks like this: function(object result) {...}; + */ + export function detectLanguage(text: string, callback: (result: LanguageDetectionResult) => void): void; + } + + //////////////////// + // Identity + //////////////////// + /** + * Use the chrome.identity API to get OAuth2 access tokens. + * Permissions: "identity" + * @since Chrome 29. + */ + namespace identity { + /** @since Chrome 32. */ + interface AccountInfo { + /** A unique identifier for the account. This ID will not change for the lifetime of the account. */ + id: string; + } + + interface TokenDetails { + /** + * Optional. + * Fetching a token may require the user to sign-in to Chrome, or approve the application's requested scopes. If the interactive flag is true, getAuthToken will prompt the user as necessary. When the flag is false or omitted, getAuthToken will return failure any time a prompt would be required. + */ + interactive?: boolean; + /** + * Optional. + * The account ID whose token should be returned. If not specified, the primary account for the profile will be used. + * account is only supported when the "enable-new-profile-management" flag is set. + * @since Chrome 37. + */ + account?: AccountInfo; + /** + * Optional. + * A list of OAuth2 scopes to request. + * When the scopes field is present, it overrides the list of scopes specified in manifest.json. + * @since Chrome 37. + */ + scopes?: string[]; + } + + interface UserInfo { + /** An email address for the user account signed into the current profile. Empty if the user is not signed in or the identity.email manifest permission is not specified. */ + email: string; + /** A unique identifier for the account. This ID will not change for the lifetime of the account. Empty if the user is not signed in or (in M41+) the identity.email manifest permission is not specified. */ + id: string; + } + + interface TokenInformation { + /** The specific token that should be removed from the cache. */ + token: string; + } + + interface WebAuthFlowOptions { + /** The URL that initiates the auth flow. */ + url: string; + /** + * Optional. + * Whether to launch auth flow in interactive mode. + * Since some auth flows may immediately redirect to a result URL, launchWebAuthFlow hides its web view until the first navigation either redirects to the final URL, or finishes loading a page meant to be displayed. + * If the interactive flag is true, the window will be displayed when a page load completes. If the flag is false or omitted, launchWebAuthFlow will return with an error if the initial navigation does not complete the flow. + */ + interactive?: boolean; + } + + interface SignInChangeEvent extends chrome.events.Event<(account: AccountInfo, signedIn: boolean) => void> { } + + /** + * Retrieves a list of AccountInfo objects describing the accounts present on the profile. + * getAccounts is only supported on dev channel. + * Dev channel only. + */ + export function getAccounts(callback: (accounts: AccountInfo[]) => void): void; + /** + * Gets an OAuth2 access token using the client ID and scopes specified in the oauth2 section of manifest.json. + * The Identity API caches access tokens in memory, so it's ok to call getAuthToken non-interactively any time a token is required. The token cache automatically handles expiration. + * For a good user experience it is important interactive token requests are initiated by UI in your app explaining what the authorization is for. Failing to do this will cause your users to get authorization requests, or Chrome sign in screens if they are not signed in, with with no context. In particular, do not use getAuthToken interactively when your app is first launched. + * @param details Token options. + * @param callback Called with an OAuth2 access token as specified by the manifest, or undefined if there was an error. + * If you specify the callback parameter, it should be a function that looks like this: + * function(string token) {...}; + */ + export function getAuthToken(details: TokenDetails, callback?: (token: string) => void): void; + /** + * Retrieves email address and obfuscated gaia id of the user signed into a profile. + * This API is different from identity.getAccounts in two ways. The information returned is available offline, and it only applies to the primary account for the profile. + * @since Chrome 37. + */ + export function getProfileUserInfo(callback: (userInfo: UserInfo) => void): void; + /** + * Removes an OAuth2 access token from the Identity API's token cache. + * If an access token is discovered to be invalid, it should be passed to removeCachedAuthToken to remove it from the cache. The app may then retrieve a fresh token with getAuthToken. + * @param details Token information. + * @param callback Called when the token has been removed from the cache. + * If you specify the callback parameter, it should be a function that looks like this: + * function() {...}; + */ + export function removeCachedAuthToken(details: TokenInformation, callback?: () => void): void; + /** + * Starts an auth flow at the specified URL. + * This method enables auth flows with non-Google identity providers by launching a web view and navigating it to the first URL in the provider's auth flow. When the provider redirects to a URL matching the pattern https://.chromiumapp.org/*, the window will close, and the final redirect URL will be passed to the callback function. + * For a good user experience it is important interactive auth flows are initiated by UI in your app explaining what the authorization is for. Failing to do this will cause your users to get authorization requests with no context. In particular, do not launch an interactive auth flow when your app is first launched. + * @param details WebAuth flow options. + * @param callback Called with the URL redirected back to your application. + * The callback parameter should be a function that looks like this: + * function(string responseUrl) {...}; + */ + export function launchWebAuthFlow(details: WebAuthFlowOptions, callback: (responseUrl?: string) => void): void; + /** + * Generates a redirect URL to be used in launchWebAuthFlow. + * The generated URLs match the pattern https://.chromiumapp.org/*. + * @since Chrome 33. + * @param path Optional. The path appended to the end of the generated URL. + */ + export function getRedirectURL(path?: string): string; + + /** + * Fired when signin state changes for an account on the user's profile. + * @since Chrome 33. + */ + export var onSignInChanged: SignInChangeEvent; + } + + //////////////////// + // Idle + //////////////////// + /** + * Use the chrome.idle API to detect when the machine's idle state changes. + * Permissions: "idle" + * @since Chrome 6. + */ + namespace idle { + interface IdleStateChangedEvent extends chrome.events.Event<(newState: string) => void> { } + + /** + * Returns "locked" if the system is locked, "idle" if the user has not generated any input for a specified number of seconds, or "active" otherwise. + * @param detectionIntervalInSeconds The system is considered idle if detectionIntervalInSeconds seconds have elapsed since the last user input detected. + * Since Chrome 25. + * @param callback The callback parameter should be a function that looks like this: + * function( IdleState newState) {...}; + */ + export function queryState(detectionIntervalInSeconds: number, callback: (newState: string) => void): void; + /** + * Sets the interval, in seconds, used to determine when the system is in an idle state for onStateChanged events. The default interval is 60 seconds. + * @since Chrome 25. + * @param intervalInSeconds Threshold, in seconds, used to determine when the system is in an idle state. + */ + export function setDetectionInterval(intervalInSeconds: number): void; + + /** Fired when the system changes to an active, idle or locked state. The event fires with "locked" if the screen is locked or the screensaver activates, "idle" if the system is unlocked and the user has not generated any input for a specified number of seconds, and "active" when the user generates input on an idle system. */ + export var onStateChanged: IdleStateChangedEvent; + } + + //////////////////// + // InstanceID + //////////////////// + /** + * Use chrome.instanceID to access the Instance ID service. + * @since Chrome 46 + */ + namespace instanceID { + /** NOT YET IMPLEMENTED */ + } + + //////////////////// + // mDNS + //////////////////// + /** + * Use the chrome.mdns API to discover services over mDNS. This comprises a subset of the features of the NSD spec: http://www.w3.org/TR/discovery-api/ + * @since Chrome 31 + */ + namespace mdns { + /** NOT YET IMPLEMENTED */ + } + + //////////////////// + // Media Galleries + //////////////////// + namespace mediaGalleries { + interface MediaFileSystemsOptions { + interactive?: 'no' | 'yes' | 'if_needed'; + } + + interface MediaFileSystemMetadata { + name: string; + galleryId: string; + deviceId?: string; + isRemovable: boolean; + isMediaDevice: boolean; + isAvailable: boolean; + } + + interface MetadataOptions { + metadataType: 'all' | 'mimeTypeAndTags' | 'mimeTypeOnly'; + } + + interface RawTag { + type: string; + tags: { [name: string]: string; }; + } + + interface Metadata { + // The browser sniffed mime type. + mimeType: string; + // Defined for images and video. In pixels. + height?: number; + width?: number; + // Defined for images only. + xResolution?: number; + yResolution?: number; + // Defined for audio and video. In seconds. + duration?: number; + // Defined for images and video. In degrees. + rotation?: number; + // Defined for images only. + cameraMake?: string; + cameraModel?: string; + exposureTimeSeconds?: number; + flashFired?: boolean; + fNumber?: number; + focalLengthMm?: number; + isoEquivalent?: number; + // Defined for audio and video only. + album?: string; + artist?: string; + comment?: string; + copyright?: string; + disc?: number; + genre?: string; + language?: string; + title?: string; + track?: number; + // All the metadata in the media file. For formats with multiple streams, stream order will be preserved. Container metadata is the first element. + rawTags: RawTag[]; + // The images embedded in the media file's metadata. This is most often used for album art or video thumbnails. + attachedImages: Blob[]; + } + + interface GalleryWatchResult { + galleryId: string; + success: boolean; + } + + interface GalleryChangedEventArgs { + type: 'contents_changed' | 'watch_dropped'; + galleryId: string; + } + + interface ScanProgressEventArgs { + // The type of progress event, i.e. start, finish, etc. + type: 'start' | 'cancel' | 'finish' | 'error'; + // The number of Galleries found. + galleryCount?: number; + // Appoximate number of media files found; some file types can be either audio or video and are included in both counts. + audioCount?: number; + imageCount?: number; + videoCount?: number; + } + + export function getMediaFileSystems(callback: (mediaFileSystems: FileSystem[]) => void): void; + export function getMediaFileSystems(options: MediaFileSystemsOptions, callback: (mediaFileSystems: FileSystem[]) => void): void; + export function addUserSelectedFolder(callback: (mediaFileSystems: FileSystem[], selectedFileSystemName: string) => void): void; + export function dropPermissionForMediaFileSystem(galleryId: string, callback?: () => void): void; + export function startMediaScan(): void; + export function cancelMediaScan(): void; + export function addScanResults(callback: (mediaFileSystems: FileSystem[]) => void): void; + export function getMediaFileSystemMetadata(mediaFileSystem: FileSystem): MediaFileSystemMetadata; + export function getAllMediaFileSystemMetadata(callback: (metadatas: MediaFileSystemMetadata[]) => void): void; + export function getMetadata(mediaFile: Blob, callback: (metadata: Metadata) => void): void; + export function getMetadata(mediaFile: Blob, options: MetadataOptions, callback: (metadata: Metadata) => void): void; + export function addGalleryWatch(galleryId: string, callback: (result: GalleryWatchResult) => void): void; + export function removeGalleryWatch(galleryId: string): void; + export function getAllGalleryWatch(callback: (galleryIds: string[]) => void): void; + export function removeAllGalleryWatch(): void; + + export var onGalleryChanged: chrome.events.Event<(args: GalleryChangedEventArgs) => void>; + export var onScanProgress: chrome.events.Event<(args: ScanProgressEventArgs) => void>; + } + + //////////////////////////////////// + // Open Network Configuration (ONC) + //////////////////////////////////// + /** + * The chrome.networking.onc API is used for configuring network connections (Cellular, Ethernet, VPN, WiFi or WiMAX). This API is available in Chrome OS kiosk sessions. + * Network connection configurations are specified following Open Network Configuration (ONC) specification. + * NOTE: Most dictionary properties and enum values use UpperCamelCase to match the ONC specification instead of the JavaScript lowerCamelCase convention. + */ + namespace networking.onc { + export type ActivationStateType = 'Activated' | 'Activating' | 'NotActivated' | 'PartiallyActivated'; + export type CaptivePortalStatus = 'Unknown' | 'Offline' | 'Online' | 'Portal' | 'ProxyAuthRequired'; + export type ConnectionStateType = 'Connected' | 'Connecting' | 'NotConnected'; + export type IPConfigType = 'DHCP' | 'Static'; + export type NetworkType = 'All' | 'Cellular' | 'Ethernet' | 'VPN' | 'Wireless' | 'WiFi' | 'WiMAX'; + export type ProxySettingsType = 'Direct' | 'Manual' | 'PAC' | 'WPAD'; + interface ManagedBoolean { + /** + * @description The active value currently used by the network configuration manager (e.g. Shill). + * @type {boolean} + * @memberof ManagedBoolean + */ + Active?: boolean, + /** + * @description The source from which the effective property value was determined. + * @type {string} + * @memberof ManagedBoolean + */ + Effective?: string, + /** + * @description The property value provided by the user policy. + * @type {boolean} + * @memberof ManagedBoolean + */ + UserPolicy?: boolean, + /** + * @description The property value provided by the device policy. + * @type {boolean} + * @memberof ManagedBoolean + */ + DevicePolicy?: boolean, + /** + * @description The property value set by the logged in user. Only provided if |UserEditable| is true. + * @type {boolean} + * @memberof ManagedBoolean + */ + UserSettings?: boolean, + /** + * @description The value set for all users of the device. Only provided if |DeviceEditiable| is true. + * @type {boolean} + * @memberof ManagedBoolean + */ + SharedSettings?: boolean, + /** + * @description Whether a UserPolicy for the property exists and allows the property to be edited (i.e. the policy set recommended property value). Defaults to false. + * @type {boolean} + * @memberof ManagedBoolean + */ + UserEditable?: boolean, + /** + * @description Whether a DevicePolicy for the property exists and allows the property to be edited (i.e. the policy set recommended property value). Defaults to false. + * @type {boolean} + * @memberof ManagedBoolean + */ + DeviceEditable?: boolean + } + interface ManagedLong { + /** + * @description The active value currently used by the network configuration manager (e.g. Shill). + * @type {number} + * @memberof ManagedLong + */ + Active?: number, + /** + * @description The source from which the effective property value was determined. + * @type {string} + * @memberof ManagedLong + */ + Effective?: string, + /** + * @description The property value provided by the user policy. + * @type {number} + * @memberof ManagedLong + */ + UserPolicy?: number, + /** + * @description The property value provided by the device policy. + * @type {number} + * @memberof ManagedLong + */ + DevicePolicy?: number, + /** + * @description The property value set by the logged in user. Only provided if |UserEditable| is true. + * @type {number} + * @memberof ManagedLong + */ + UserSettings?: number, + /** + * @description The value set for all users of the device. Only provided if |DeviceEditiable| is true. + * @type {number} + * @memberof ManagedLong + */ + SharedSettings?: number, + /** + * @description Whether a UserPolicy for the property exists and allows the property to be edited (i.e. the policy set recommended property value). Defaults to false. + * @type {boolean} + * @memberof ManagedLong + */ + UserEditable?: boolean, + /** + * @description Whether a DevicePolicy for the property exists and allows the property to be edited (i.e. the policy set recommended property value). Defaults to false. + * @type {boolean} + * @memberof ManagedLong + */ + DeviceEditable?: boolean + } + } + + //////////////////// + // Notifications + // https://developer.chrome.com/extensions/notifications + //////////////////// + /** + * Use the chrome.notifications API to create rich notifications using templates and show these notifications to users in the system tray. + * Permissions: "notifications" + * @since Chrome 28. + */ + namespace notifications { + interface ButtonOptions { + title: string; + iconUrl?: string; + } + + interface ItemOptions { + /** Title of one item of a list notification. */ + title: string; + /** Additional details about this item. */ + message: string; + } + + interface NotificationOptions { + /** Optional. Which type of notification to display. Required for notifications.create method. */ + type?: string; + /** + * Optional. + * A URL to the sender's avatar, app icon, or a thumbnail for image notifications. + * URLs can be a data URL, a blob URL, or a URL relative to a resource within this extension's .crx file Required for notifications.create method. + */ + iconUrl?: string; + /** Optional. Title of the notification (e.g. sender name for email). Required for notifications.create method. */ + title?: string; + /** Optional. Main notification content. Required for notifications.create method. */ + message?: string; + /** + * Optional. + * Alternate notification content with a lower-weight font. + * @since Chrome 31. + */ + contextMessage?: string; + /** Optional. Priority ranges from -2 to 2. -2 is lowest priority. 2 is highest. Zero is default. */ + priority?: number; + /** Optional. A timestamp associated with the notification, in milliseconds past the epoch (e.g. Date.now() + n). */ + eventTime?: number; + /** Optional. Text and icons for up to two notification action buttons. */ + buttons?: ButtonOptions[]; + /** Optional. Items for multi-item notifications. */ + items?: ItemOptions[]; + /** + * Optional. + * Current progress ranges from 0 to 100. + * @since Chrome 30. + */ + progress?: number; + /** + * Optional. + * Whether to show UI indicating that the app will visibly respond to clicks on the body of a notification. + * @since Chrome 32. + */ + isClickable?: boolean; + /** + * Optional. + * A URL to the app icon mask. URLs have the same restrictions as iconUrl. The app icon mask should be in alpha channel, as only the alpha channel of the image will be considered. + * @since Chrome 38. + */ + appIconMaskUrl?: string; + /** Optional. A URL to the image thumbnail for image-type notifications. URLs have the same restrictions as iconUrl. */ + imageUrl?: string; + /** + * Indicates that the notification should remain visible on screen until the user activates or dismisses the notification. + * This defaults to false. + * @since Chrome 50 + */ + requireInteraction?: boolean; + } + + interface NotificationClosedEvent extends chrome.events.Event<(notificationId: string, byUser: boolean) => void> { } + + interface NotificationClickedEvent extends chrome.events.Event<(notificationId: string) => void> { } + + interface NotificationButtonClickedEvent extends chrome.events.Event<(notificationId: string, buttonIndex: number) => void> { } + + interface NotificationPermissionLevelChangedEvent extends chrome.events.Event<(level: string) => void> { } + + interface NotificationShowSettingsEvent extends chrome.events.Event<() => void> { } + + /** The notification closed, either by the system or by user action. */ + export var onClosed: NotificationClosedEvent; + /** The user clicked in a non-button area of the notification. */ + export var onClicked: NotificationClickedEvent; + /** The user pressed a button in the notification. */ + export var onButtonClicked: NotificationButtonClickedEvent; + /** + * The user changes the permission level. + * @since Chrome 32. + */ + export var onPermissionLevelChanged: NotificationPermissionLevelChangedEvent; + /** + * The user clicked on a link for the app's notification settings. + * @since Chrome 32. + */ + export var onShowSettings: NotificationShowSettingsEvent; + + /** + * Creates and displays a notification. + * @param notificationId Identifier of the notification. If not set or empty, an ID will automatically be generated. If it matches an existing notification, this method first clears that notification before proceeding with the create operation. + * The notificationId parameter is required before Chrome 42. + * @param options Contents of the notification. + * @param callback Returns the notification id (either supplied or generated) that represents the created notification. + * The callback is required before Chrome 42. + * If you specify the callback parameter, it should be a function that looks like this: + * function(string notificationId) {...}; + */ + export function create(notificationId: string, options: NotificationOptions, callback?: (notificationId: string) => void): void; + /** + * Creates and displays a notification. + * @param notificationId Identifier of the notification. If not set or empty, an ID will automatically be generated. If it matches an existing notification, this method first clears that notification before proceeding with the create operation. + * The notificationId parameter is required before Chrome 42. + * @param options Contents of the notification. + * @param callback Returns the notification id (either supplied or generated) that represents the created notification. + * The callback is required before Chrome 42. + * If you specify the callback parameter, it should be a function that looks like this: + * function(string notificationId) {...}; + */ + export function create(options: NotificationOptions, callback?: (notificationId: string) => void): void; + /** + * Updates an existing notification. + * @param notificationId The id of the notification to be updated. This is returned by notifications.create method. + * @param options Contents of the notification to update to. + * @param callback Called to indicate whether a matching notification existed. + * The callback is required before Chrome 42. + * If you specify the callback parameter, it should be a function that looks like this: + * function(boolean wasUpdated) {...}; + */ + export function update(notificationId: string, options: NotificationOptions, callback?: (wasUpdated: boolean) => void): void; + /** + * Clears the specified notification. + * @param notificationId The id of the notification to be cleared. This is returned by notifications.create method. + * @param callback Called to indicate whether a matching notification existed. + * The callback is required before Chrome 42. + * If you specify the callback parameter, it should be a function that looks like this: + * function(boolean wasCleared) {...}; + */ + export function clear(notificationId: string, callback?: (wasCleared: boolean) => void): void; + /** + * Retrieves all the notifications. + * @since Chrome 29. + * @param callback Returns the set of notification_ids currently in the system. + * The callback parameter should be a function that looks like this: + * function(object notifications) {...}; + */ + export function getAll(callback: (notifications: Object) => void): void; + /** + * Retrieves whether the user has enabled notifications from this app or extension. + * @since Chrome 32. + * @param callback Returns the current permission level. + * The callback parameter should be a function that looks like this: + * function( PermissionLevel level) {...}; + */ + export function getPermissionLevel(callback: (level: string) => void): void; + } + + //////////////////// + // Permissions + //////////////////// + /** + * Use the chrome.permissions API to request declared optional permissions at run time rather than install time, so users understand why the permissions are needed and grant only those that are necessary. + * @since Chrome 16. + */ + namespace permissions { + interface Permissions { + /** + * Optional. + * List of named permissions (does not include hosts or origins). Anything listed here must appear in the optional_permissions list in the manifest. + */ + origins?: string[]; + /** + * Optional. + * List of origin permissions. Anything listed here must be a subset of a host that appears in the optional_permissions list in the manifest. For example, if http://*.example.com/ or http://* appears in optional_permissions, you can request an origin of http://help.example.com/. Any path is ignored. + */ + permissions?: string[]; + } + + interface PermissionsRemovedEvent { + /** + * @param callback The callback parameter should be a function that looks like this: + * function( Permissions permissions) {...}; + * Parameter permissions: The permissions that have been removed. + */ + addListener(callback: (permissions: Permissions) => void): void; + } + + interface PermissionsAddedEvent { + /** + * @param callback The callback parameter should be a function that looks like this: + * function( Permissions permissions) {...}; + * Parameter permissions: The newly acquired permissions. + */ + addListener(callback: (permissions: Permissions) => void): void; + } + + /** + * Checks if the extension has the specified permissions. + * @param callback The callback parameter should be a function that looks like this: + * function(boolean result) {...}; + * Parameter result: True if the extension has the specified permissions. + */ + export function contains(permissions: Permissions, callback: (result: boolean) => void): void; + /** + * Gets the extension's current set of permissions. + * @param callback The callback parameter should be a function that looks like this: + * function( Permissions permissions) {...}; + * Parameter permissions: The extension's active permissions. + */ + export function getAll(callback: (permissions: Permissions) => void): void; + /** + * Requests access to the specified permissions. These permissions must be defined in the optional_permissions field of the manifest. If there are any problems requesting the permissions, runtime.lastError will be set. + * @param callback If you specify the callback parameter, it should be a function that looks like this: + * function(boolean granted) {...}; + * Parameter granted: True if the user granted the specified permissions. + */ + export function request(permissions: Permissions, callback?: (granted: boolean) => void): void; + /** + * Removes access to the specified permissions. If there are any problems removing the permissions, runtime.lastError will be set. + * @param callback If you specify the callback parameter, it should be a function that looks like this: + * function(boolean removed) {...}; + * Parameter removed: True if the permissions were removed. + */ + export function remove(permissions: Permissions, callback?: (removed: boolean) => void): void; + + /** Fired when access to permissions has been removed from the extension. */ + export var onRemoved: PermissionsRemovedEvent; + /** Fired when the extension acquires new permissions. */ + export var onAdded: PermissionsAddedEvent; + } + + //////////////////// + // Power + //////////////////// + /** + * Use the chrome.power API to override the system's power management features. + * Permissions: "power" + * @since Chrome 27. + */ + namespace power { + /** Requests that power management be temporarily disabled. |level| describes the degree to which power management should be disabled. If a request previously made by the same app is still active, it will be replaced by the new request. */ + export function requestKeepAwake(level: string): void; + /** Releases a request previously made via requestKeepAwake(). */ + export function releaseKeepAwake(): void; + } + + //////////////////// + // Printer Provider + //////////////////// + /** + * The chrome.printerProvider API exposes events used by print manager to query printers controlled by extensions, to query their capabilities and to submit print jobs to these printers. + * Permissions: "printerProvider" + * @since Chrome 44. + */ + namespace printerProvider { + interface PrinterInfo { + /** Unique printer ID. */ + id: string; + /** Printer's human readable name. */ + name: string; + /** Optional. Printer's human readable description. */ + description?: string; + } + + interface PrinterCapabilities { + /** Device capabilities in CDD format. */ + capabilities: any; + } + + interface PrintJob { + /** ID of the printer which should handle the job. */ + printerId: string; + /** The print job title. */ + title: string; + /** Print ticket in CJT format. */ + ticket: Object; + /** The document content type. Supported formats are "application/pdf" and "image/pwg-raster". */ + contentType: string; + /** Blob containing the document data to print. Format must match |contentType|. */ + document: Blob; + } + + interface PrinterRequestedEvent extends chrome.events.Event<(resultCallback: (printerInfo: PrinterInfo[]) => void) => void> { } + + interface PrinterInfoRequestedEvent extends chrome.events.Event<(device: any, resultCallback: (printerInfo?: PrinterInfo) => void) => void> { } + + interface CapabilityRequestedEvent extends chrome.events.Event<(printerId: string, resultCallback: (capabilities: PrinterCapabilities) => void) => void> { } + + interface PrintRequestedEvent extends chrome.events.Event<(printJob: PrintJob, resultCallback: (result: string) => void) => void> { } + + /** Event fired when print manager requests printers provided by extensions. */ + export var onGetPrintersRequested: PrinterRequestedEvent; + /** + * Event fired when print manager requests information about a USB device that may be a printer. + * Note: An application should not rely on this event being fired more than once per device. If a connected device is supported it should be returned in the onGetPrintersRequested event. + * @since Chrome 45. + */ + export var onGetUsbPrinterInfoRequested: PrinterInfoRequestedEvent; + /** Event fired when print manager requests printer capabilities. */ + export var onGetCapabilityRequested: CapabilityRequestedEvent; + /** Event fired when print manager requests printing. */ + export var onPrintRequested: PrintRequestedEvent; + } + + //////////////////// + // Runtime + //////////////////// + /** + * Use the chrome.runtime API to retrieve the background page, return details about the manifest, and listen for and respond to events in the app or extension lifecycle. You can also use this API to convert the relative path of URLs to fully-qualified URLs. + * @since Chrome 22 + */ + namespace runtime { + /** This will be defined during an API method callback if there was an error */ + export var lastError: LastError | undefined; + /** The ID of the extension/app. */ + export var id: string; + + interface LastError { + /** Optional. Details about the error which occurred. */ + message?: string; + } + + interface ConnectInfo { + name?: string; + } + + interface InstalledDetails { + /** + * The reason that this event is being dispatched. + * One of: "install", "update", "chrome_update", or "shared_module_update" + */ + reason: string; + /** + * Optional. + * Indicates the previous version of the extension, which has just been updated. This is present only if 'reason' is 'update'. + */ + previousVersion?: string; + /** + * Optional. + * Indicates the ID of the imported shared module extension which updated. This is present only if 'reason' is 'shared_module_update'. + * @since Chrome 29. + */ + id?: string; + } + + interface MessageOptions { + /** Whether the TLS channel ID will be passed into onMessageExternal for processes that are listening for the connection event. */ + includeTlsChannelId?: boolean; + } + + /** + * An object containing information about the script context that sent a message or request. + * @since Chrome 26. + */ + interface MessageSender { + /** The ID of the extension or app that opened the connection, if any. */ + id?: string; + /** + * The frame that opened the connection. 0 for top-level frames, positive for child frames. This will only be set when tab is set. + * @since Chrome 41. + */ + frameId?: number; + /** + * The URL of the page or frame that opened the connection. If the sender is in an iframe, it will be iframe's URL not the URL of the page which hosts it. + * @since Chrome 28. + */ + url?: string; + /** + * The TLS channel ID of the page or frame that opened the connection, if requested by the extension or app, and if available. + * @since Chrome 32. + */ + tlsChannelId?: string; + } + + /** + * An object containing information about the current platform. + * @since Chrome 36. + */ + interface PlatformInfo { + /** + * The operating system chrome is running on. + * One of: "mac", "win", "android", "cros", "linux", or "openbsd" + */ + os: string; + /** + * The machine's processor architecture. + * One of: "arm", "x86-32", or "x86-64" + */ + arch: string; + /** + * The native client architecture. This may be different from arch on some platforms. + * One of: "arm", "x86-32", or "x86-64" + */ + nacl_arch: string; + } + + /** + * An object which allows two way communication with other pages. + * @since Chrome 26. + */ + interface Port { + postMessage: (message: Object) => void; + disconnect: () => void; + /** + * Optional. + * This property will only be present on ports passed to onConnect/onConnectExternal listeners. + */ + sender?: MessageSender; + /** An object which allows the addition and removal of listeners for a Chrome event. */ + onDisconnect: PortDisconnectEvent; + /** An object which allows the addition and removal of listeners for a Chrome event. */ + onMessage: PortMessageEvent; + name: string; + } + + interface UpdateAvailableDetails { + /** The version number of the available update. */ + version: string; + } + + interface UpdateCheckDetails { + /** The version of the available update. */ + version: string; + } + + interface PortDisconnectEvent extends chrome.events.Event<(port: Port) => void> { } + + interface PortMessageEvent extends chrome.events.Event<(message: any, port: Port) => void> { } + + interface ExtensionMessageEvent extends chrome.events.Event<(message: any, sender: MessageSender, sendResponse: (response: any) => void) => void> { } + + interface ExtensionConnectEvent extends chrome.events.Event<(port: Port) => void> { } + + interface RuntimeInstalledEvent extends chrome.events.Event<(details: InstalledDetails) => void> { } + + interface RuntimeEvent extends chrome.events.Event<() => void> { } + + interface RuntimeRestartRequiredEvent extends chrome.events.Event<(reason: string) => void> { } + + interface RuntimeUpdateAvailableEvent extends chrome.events.Event<(details: UpdateAvailableDetails) => void> { } + + interface ManifestIcons { + [size: number]: string; + } + + interface ManifestAction { + default_icon?: ManifestIcons; + default_title?: string; + default_popup?: string; + } + + interface SearchProvider { + name?: string; + keyword?: string; + favicon_url?: string; + search_url: string; + encoding?: string; + suggest_url?: string; + instant_url?: string; + image_url?: string; + search_url_post_params?: string; + suggest_url_post_params?: string; + instant_url_post_params?: string; + image_url_post_params?: string; + alternate_urls?: string[]; + prepopulated_id?: number; + is_default?: boolean; + } + + interface Manifest { + /** Required */ + app: { + background: { + scripts?: string[]; + } + } + /** Should be set to 2 */ + manifest_version: number; + name: string; + version: string; + + // Recommended + default_locale?: string; + description?: string; + icons?: ManifestIcons; + // Optional + action_handlers?: string[]; + author?: any; + automation?: any; + bluetooth?: { + uuids?: string[]; + socket?: boolean; + low_energy?: boolean; + peripheral?: boolean; + }; + commands?: { + [name: string]: { + suggested_key?: { + default?: string; + windows?: string; + mac?: string; + chromeos?: string; + linux?: string; + }; + description?: string; + global?: boolean + } + }; + current_locale?: string; + event_rules?: { + event?: string; + actions?: { + type: string; + }[]; + conditions?: { + type: string, + css?: string[] + }[]; + }[]; + file_handlers?: { + [key: string]: { + extensions?: Array<'*' | string | { include_directories: boolean }>; + types?: Array<'*' | string | { include_directories: boolean }>; + } + }[]; + file_system_provider_capabilities?: { + configurable?: boolean; + multiple_mounts?: boolean; + source?: string; + }; + import?: { + id: string; + }[]; + key?: string; + kiosk?: { + always_update: any; + required_platform_version: any; + }; + kiosk_enabled?: boolean, + kiosk_only?: boolean, + kiosk_secondary_apps: any; + minimum_chrome_version?: string; + nacl_modules?: { + path: string; + mime_type: string; + }[]; + oauth2?: { + client_id: string; + scopes?: string[]; + }; + offline_enabled?: boolean; + optional_permissions?: string[]; + permissions?: string[]; + platforms?: { + nacl_arch?: string; + sub_package_path: string; + }[]; + /** + * Technologies required by the app or extension. Hosting sites such as the Chrome Web Store may use this list to dissuade users from installing apps or extensions that will not work on their computer. Supported requirements currently include "3D" and "plugins"; additional requirements checks may be added in the future. + */ + requirements?: { + /** + * The "3D" requirement denotes GPU hardware acceleration. The "webgl" requirement refers to the WebGL API. For more information on Chrome 3D graphics support, see the help article on WebGL and 3D graphics. You can list the 3D-related features your app requires, as demonstrated in the following example: + * "requirements": { + * "3D": { + * "features": ["webgl"] + * } + * } + */ + '3D'?: { + features?: Array; + }; + /** + * The "plugins" requirement indicates if an app or extension requires NPAPI to run. This requirement is enabled by default when the manifest includes the "plugins" field. For apps and extensions that still work when plugins aren't available, you can disable this requirement by setting NPAPI to false. You can also enable this requirement manually, by setting NPAPI to true, as shown in this example: + * "requirements": { + * "plugins": { + * "npapi": true + * } + * } + */ + plugins?: { + npapi?: boolean; + } + + [key: string]: any; + }; + /** + * @deprecated Warning: Starting in version 57, Chrome will no longer allow external web content (including embedded frames and scripts) inside sandboxed pages. Please use a webview instead. + */ + sandbox?: { + pages: string[]; + content_security_policy?: string; + }; + short_name?: string; + signature?: any; + sockets?: { + tcp?: { + connect: string | '*'; + }; + udp?: { + send: string | '*'; + } + }; + storage?: { + managed_schema: string + }; + system_indicator?: any; + update_url?: string; + url_handlers?: { + [name: string]: { + matches: string[]; + title?: string; + } + }; + usb_printers?: { + filters: { + vendorId?: number; + productId?: number; + interfaceClass?: number; + interfaceSubclass?: number; + interfaceProtocol?: number; + }[] + }; + version_name?: string; + webview?: { + partitions?: { + name: string; + accessible_resources: string[]; + }[] + } + [key: string]: any; + } + + /** + * Attempts to connect to connect listeners within an extension/app (such as the background page), or other extensions/apps. This is useful for content scripts connecting to their extension processes, inter-app/extension communication, and web messaging. Note that this does not connect to any listeners in a content script. Extensions may connect to content scripts embedded in tabs via tabs.connect. + * @since Chrome 26. + */ + export function connect(connectInfo?: ConnectInfo): Port; + /** + * Attempts to connect to connect listeners within an extension/app (such as the background page), or other extensions/apps. This is useful for content scripts connecting to their extension processes, inter-app/extension communication, and web messaging. Note that this does not connect to any listeners in a content script. Extensions may connect to content scripts embedded in tabs via tabs.connect. + * @since Chrome 26. + * @param extensionId Optional. + * The ID of the extension or app to connect to. If omitted, a connection will be attempted with your own extension. Required if sending messages from a web page for web messaging. + */ + export function connect(extensionId: string, connectInfo?: ConnectInfo): Port; + /** + * Connects to a native application in the host machine. + * @since Chrome 28. + * @param application The name of the registered application to connect to. + */ + export function connectNative(application: string): Port; + /** Retrieves the JavaScript 'window' object for the background page running inside the current extension/app. If the background page is an event page, the system will ensure it is loaded before calling the callback. If there is no background page, an error is set. */ + export function getBackgroundPage(callback: (backgroundPage?: Window) => void): void; + /** + * Returns details about the app or extension from the manifest. The object returned is a serialization of the full manifest file. + * @returns The manifest details. + */ + export function getManifest(): Manifest; + /** + * Returns a DirectoryEntry for the package directory. + * @since Chrome 29. + */ + export function getPackageDirectoryEntry(callback: (directoryEntry: DirectoryEntry) => void): void; + /** + * Returns information about the current platform. + * @since Chrome 29. + * @param callback Called with results + */ + export function getPlatformInfo(callback: (platformInfo: PlatformInfo) => void): void; + /** + * Converts a relative path within an app/extension install directory to a fully-qualified URL. + * @param path A path to a resource within an app/extension expressed relative to its install directory. + */ + export function getURL(path: string): string; + /** + * Reloads the app or extension. + * @since Chrome 25. + */ + export function reload(): void; + /** + * Requests an update check for this app/extension. + * @since Chrome 25. + * @param callback + * Parameter status: Result of the update check. One of: "throttled", "no_update", or "update_available" + * Optional parameter details: If an update is available, this contains more information about the available update. + */ + export function requestUpdateCheck(callback: (status: string, details?: UpdateCheckDetails) => void): void; + /** + * Restart the ChromeOS device when the app runs in kiosk mode. Otherwise, it's no-op. + * @since Chrome 32. + */ + export function restart(): void; + /** + * Sends a single message to event listeners within your extension/app or a different extension/app. Similar to runtime.connect but only sends a single message, with an optional response. If sending to your extension, the runtime.onMessage event will be fired in each page, or runtime.onMessageExternal, if a different extension. Note that extensions cannot send messages to content scripts using this method. To send messages to content scripts, use tabs.sendMessage. + * @since Chrome 26. + * @param responseCallback Optional + * Parameter response: The JSON response object sent by the handler of the message. If an error occurs while connecting to the extension, the callback will be called with no arguments and runtime.lastError will be set to the error message. + */ + export function sendMessage(message: any, responseCallback?: (response: any) => void): void; + /** + * Sends a single message to event listeners within your extension/app or a different extension/app. Similar to runtime.connect but only sends a single message, with an optional response. If sending to your extension, the runtime.onMessage event will be fired in each page, or runtime.onMessageExternal, if a different extension. Note that extensions cannot send messages to content scripts using this method. To send messages to content scripts, use tabs.sendMessage. + * @since Chrome 32. + * @param responseCallback Optional + * Parameter response: The JSON response object sent by the handler of the message. If an error occurs while connecting to the extension, the callback will be called with no arguments and runtime.lastError will be set to the error message. + */ + export function sendMessage(message: any, options: MessageOptions, responseCallback?: (response: any) => void): void; + /** + * Sends a single message to event listeners within your extension/app or a different extension/app. Similar to runtime.connect but only sends a single message, with an optional response. If sending to your extension, the runtime.onMessage event will be fired in each page, or runtime.onMessageExternal, if a different extension. Note that extensions cannot send messages to content scripts using this method. To send messages to content scripts, use tabs.sendMessage. + * @since Chrome 26. + * @param extensionId The ID of the extension/app to send the message to. If omitted, the message will be sent to your own extension/app. Required if sending messages from a web page for web messaging. + * @param responseCallback Optional + * Parameter response: The JSON response object sent by the handler of the message. If an error occurs while connecting to the extension, the callback will be called with no arguments and runtime.lastError will be set to the error message. + */ + export function sendMessage(extensionId: string, message: any, responseCallback?: (response: any) => void): void; + /** + * Sends a single message to event listeners within your extension/app or a different extension/app. Similar to runtime.connect but only sends a single message, with an optional response. If sending to your extension, the runtime.onMessage event will be fired in each page, or runtime.onMessageExternal, if a different extension. Note that extensions cannot send messages to content scripts using this method. To send messages to content scripts, use tabs.sendMessage. + * @since Chrome 32. + * @param extensionId The ID of the extension/app to send the message to. If omitted, the message will be sent to your own extension/app. Required if sending messages from a web page for web messaging. + * @param responseCallback Optional + * Parameter response: The JSON response object sent by the handler of the message. If an error occurs while connecting to the extension, the callback will be called with no arguments and runtime.lastError will be set to the error message. + */ + export function sendMessage(extensionId: string, message: any, options: MessageOptions, responseCallback?: (response: any) => void): void; + /** + * Send a single message to a native application. + * @since Chrome 28. + * @param application The of the native messaging host. + * @param message The message that will be passed to the native messaging host. + * @param responseCallback Optional. + * Parameter response: The response message sent by the native messaging host. If an error occurs while connecting to the native messaging host, the callback will be called with no arguments and runtime.lastError will be set to the error message. + */ + export function sendNativeMessage(application: string, message: Object, responseCallback?: (response: any) => void): void; + /** + * Sets the URL to be visited upon uninstallation. This may be used to clean up server-side data, do analytics, and implement surveys. Maximum 255 characters. + * @since Chrome 41. + * @param url Since Chrome 34. + * URL to be opened after the extension is uninstalled. This URL must have an http: or https: scheme. Set an empty string to not open a new tab upon uninstallation. + * @param callback Called when the uninstall URL is set. If the given URL is invalid, runtime.lastError will be set. + */ + export function setUninstallURL(url: string, callback?: () => void): void; + /** + * Open your Extension's options page, if possible. + * The precise behavior may depend on your manifest's options_ui or options_page key, or what Chrome happens to support at the time. For example, the page may be opened in a new tab, within chrome://extensions, within an App, or it may just focus an open options page. It will never cause the caller page to reload. + * If your Extension does not declare an options page, or Chrome failed to create one for some other reason, the callback will set lastError. + * @since Chrome 42. + */ + export function openOptionsPage(callback?: () => void): void; + + /** + * Fired when a connection is made from either an extension process or a content script. + * @since Chrome 26. + */ + export var onConnect: ExtensionConnectEvent; + /** + * Fired when a connection is made from another extension. + * @since Chrome 26. + */ + export var onConnectExternal: ExtensionConnectEvent; + /** Sent to the event page just before it is unloaded. This gives the extension opportunity to do some clean up. Note that since the page is unloading, any asynchronous operations started while handling this event are not guaranteed to complete. If more activity for the event page occurs before it gets unloaded the onSuspendCanceled event will be sent and the page won't be unloaded. */ + export var onSuspend: RuntimeEvent; + /** + * Fired when a profile that has this extension installed first starts up. This event is not fired when an incognito profile is started, even if this extension is operating in 'split' incognito mode. + * @since Chrome 23. + */ + export var onStartup: RuntimeEvent; + /** Fired when the extension is first installed, when the extension is updated to a new version, and when Chrome is updated to a new version. */ + export var onInstalled: RuntimeInstalledEvent; + /** Sent after onSuspend to indicate that the app won't be unloaded after all. */ + export var onSuspendCanceled: RuntimeEvent; + /** + * Fired when a message is sent from either an extension process or a content script. + * @since Chrome 26. + */ + export var onMessage: ExtensionMessageEvent; + /** + * Fired when a message is sent from another extension/app. Cannot be used in a content script. + * @since Chrome 26. + */ + export var onMessageExternal: ExtensionMessageEvent; + /** + * Fired when an app or the device that it runs on needs to be restarted. The app should close all its windows at its earliest convenient time to let the restart to happen. If the app does nothing, a restart will be enforced after a 24-hour grace period has passed. Currently, this event is only fired for Chrome OS kiosk apps. + * @since Chrome 29. + */ + export var onRestartRequired: RuntimeRestartRequiredEvent; + /** + * Fired when an update is available, but isn't installed immediately because the app is currently running. If you do nothing, the update will be installed the next time the background page gets unloaded, if you want it to be installed sooner you can explicitly call chrome.runtime.reload(). If your extension is using a persistent background page, the background page of course never gets unloaded, so unless you call chrome.runtime.reload() manually in response to this event the update will not get installed until the next time chrome itself restarts. If no handlers are listening for this event, and your extension has a persistent background page, it behaves as if chrome.runtime.reload() is called in response to this event. + * @since Chrome 25. + */ + export var onUpdateAvailable: RuntimeUpdateAvailableEvent; + /** + * @deprecated since Chrome 33. Please use chrome.runtime.onRestartRequired. + * Fired when a Chrome update is available, but isn't installed immediately because a browser restart is required. + */ + export var onBrowserUpdateAvailable: RuntimeEvent; + } + + //////////////////// + // Serial + //////////////////// + /** + * Use the chrome.serial API to read from and write to a device connected to a serial port. + * @since Chrome 23 + */ + namespace serial { + /** NOT YET IMPLEMENTED */ + } + + //////////////////// + // Socket + //////////////////// + namespace socket { + interface CreateInfo { + socketId: number; + } + + interface AcceptInfo { + resultCode: number; + socketId?: number; + } + + interface ReadInfo { + resultCode: number; + data: ArrayBuffer; + } + + interface WriteInfo { + bytesWritten: number; + } + + interface RecvFromInfo { + resultCode: number; + data: ArrayBuffer; + port: number; + address: string; + } + + interface SocketInfo { + socketType: string; + localPort?: number; + peerAddress?: string; + peerPort?: number; + localAddress?: string; + connected: boolean; + } + + interface NetworkInterface { + name: string; + address: string; + } + + export function create(type: string, options?: Object, callback?: (createInfo: CreateInfo) => void): void; + export function destroy(socketId: number): void; + export function connect(socketId: number, hostname: string, port: number, callback: (result: number) => void): void; + export function bind(socketId: number, address: string, port: number, callback: (result: number) => void): void; + export function disconnect(socketId: number): void; + export function read(socketId: number, bufferSize?: number, callback?: (readInfo: ReadInfo) => void): void; + export function write(socketId: number, data: ArrayBuffer, callback?: (writeInfo: WriteInfo) => void): void; + export function recvFrom(socketId: number, bufferSize?: number, callback?: (recvFromInfo: RecvFromInfo) => void): void; + export function sendTo(socketId: number, data: ArrayBuffer, address: string, port: number, callback?: (writeInfo: WriteInfo) => void): void; + export function listen(socketId: number, address: string, port: number, backlog?: number, callback?: (result: number) => void): void; + export function accept(socketId: number, callback?: (acceptInfo: AcceptInfo) => void): void; + export function setKeepAlive(socketId: number, enable: boolean, delay?: number, callback?: (result: boolean) => void): void; + export function setNoDelay(socketId: number, noDelay: boolean, callback?: (result: boolean) => void): void; + export function getInfo(socketId: number, callback: (result: SocketInfo) => void): void; + export function getNetworkList(callback: (result: NetworkInterface[]) => void): void; + } + + namespace sockets.tcp { + interface CreateInfo { + socketId: number; + } + + interface SendInfo { + resultCode: number; + bytesSent?: number; + } + + interface ReceiveEventArgs { + socketId: number; + data: ArrayBuffer; + } + + interface ReceiveErrorEventArgs { + socketId: number; + resultCode: number; + } + + interface SocketProperties { + persistent?: boolean; + name?: string; + bufferSize?: number; + } + + interface SocketInfo { + socketId: number; + persistent: boolean; + name?: string; + bufferSize?: number; + paused: boolean; + connected: boolean; + localAddress?: string; + localPort?: number; + peerAddress?: string; + peerPort?: number; + } + + export function create(callback: (createInfo: CreateInfo) => void): void; + export function create(properties: SocketProperties, callback: (createInfo: CreateInfo) => void): void; + + export function update(socketId: number, properties: SocketProperties, callback?: () => void): void; + export function setPaused(socketId: number, paused: boolean, callback?: () => void): void; + + export function setKeepAlive(socketId: number, + enable: boolean, callback: (result: number) => void): void; + export function setKeepAlive(socketId: number, + enable: boolean, delay: number, callback: (result: number) => void): void; + + export function setNoDelay(socketId: number, noDelay: boolean, callback: (result: number) => void): void; + export function connect(socketId: number, + peerAddress: string, peerPort: number, callback: (result: number) => void): void; + export function disconnect(socketId: number, callback?: () => void): void; + export function send(socketId: number, data: ArrayBuffer, callback: (sendInfo: SendInfo) => void): void; + export function close(socketId: number, callback?: () => void): void; + export function getInfo(socketId: number, callback: (socketInfo: SocketInfo) => void): void; + export function getSockets(callback: (socketInfos: SocketInfo[]) => void): void; + + export var onReceive: chrome.events.Event<(args: ReceiveEventArgs) => void>; + export var onReceiveError: chrome.events.Event<(args: ReceiveErrorEventArgs) => void>; + } + + /** + * Use the chrome.sockets.tcpServer API to create server applications using TCP + * connections. This API supersedes the TCP functionality previously found in + * the chrome.socket API. + * + * @since Chrome 33 + * @see https://developer.chrome.com/apps/sockets_tcpServer + */ + namespace sockets.tcpServer { + interface CreateInfo { + socketId: number; + } + + interface AcceptEventArgs { + socketId: number; + clientSocketId: number; + } + + interface AcceptErrorEventArgs { + socketId: number; + resultCode: number; + } + + /** + * @see https://developer.chrome.com/apps/sockets_tcpServer#type-SocketProperties + */ + interface SocketProperties { + /** + * Flag indicating if the socket remains open when the event page of the + * application is unloaded. The default value is "false." When the + * application is loaded, any sockets previously opened with + * persistent=true can be fetched with getSockets. + * + * @see http://developer.chrome.com/apps/app_lifecycle.html + */ + persistent?: boolean; + + /** An application-defined string associated with the socket. */ + name?: string; + } + + /** + * @see https://developer.chrome.com/apps/sockets_tcpServer#type-SocketInfo + */ + interface SocketInfo { + /** The socket identifier. */ + socketId: number; + + /** + * Flag indicating if the socket remains open when the event page of the + * application is unloaded (see SocketProperties.persistent). The + * default value is "false". + */ + persistent: boolean; + + /** Application-defined string associated with the socket. */ + name?: string; + + /** + * Flag indicating whether connection requests on a listening socket are + * dispatched through the onAccept event or queued up in the listen + * queue backlog. See setPaused. The default value is "false" + */ + paused: boolean; + + /** If the socket is listening, contains its local IPv4/6 address. */ + localAddress?: string; + + /** If the socket is listening, contains its local port. */ + localPort?: number; + } + + /** + * Creates a TCP server socket. + * + * @see https://developer.chrome.com/apps/sockets_tcpServer#method-create + * @param callback Called when the socket has been created. + */ + export function create(callback: (createInfo: CreateInfo) => void): void; + + /** + * Creates a TCP server socket. + * + * @see https://developer.chrome.com/apps/sockets_tcpServer#method-create + * @param properties The socket properties. + * @param callback Called when the socket has been created. + */ + export function create(properties: SocketProperties, callback: (createInfo: CreateInfo) => void): void; + + /** + * Updates the socket properties. + * + * @see https://developer.chrome.com/apps/sockets_tcpServer#method-update + * @param socketId The socket identifier. + * @param properties The properties to update. + * @param callback Called when the properties are updated. + */ + export function update(socketId: number, properties: SocketProperties, callback?: () => void): void; + + /** + * Enables or disables a listening socket from accepting new connections. + * When paused, a listening socket accepts new connections until its backlog + * (see listen function) is full then refuses additional connection + * requests. onAccept events are raised only when the socket is un-paused. + * + * @see https://developer.chrome.com/apps/sockets_tcpServer#method-setPaused + * @param callback Callback from the setPaused method. + */ + export function setPaused(socketId: number, paused: boolean, callback?: () => void): void; + + /** + * Listens for connections on the specified port and address. If the + * port/address is in use, the callback indicates a failure. + * + * @see https://developer.chrome.com/apps/sockets_tcpServer#method-listen + * @param socketId The socket identifier. + * @param address The address of the local machine. + * @param port The port of the local machine. When set to 0, a free port + * is chosen dynamically. The dynamically allocated port can + * be found by calling getInfo. + * @param backlog Length of the socket's listen queue. The default value + * depends on the Operating System (SOMAXCONN), which + * ensures a reasonable queue length for most applications. + * @param callback Called when listen operation completes. + */ + export function listen(socketId: number, address: string, port: number, backlog: number, callback: (result: number) => void): void; + + /** + * Listens for connections on the specified port and address. If the + * port/address is in use, the callback indicates a failure. + * + * @see https://developer.chrome.com/apps/sockets_tcpServer#method-listen + * @param socketId The socket identifier. + * @param address The address of the local machine. + * @param port The port of the local machine. When set to 0, a free port + * is chosen dynamically. The dynamically allocated port can + * be found by calling getInfo. + * @param callback Called when listen operation completes. + */ + export function listen(socketId: number, address: string, port: number, callback: (result: number) => void): void; + + /** + * Disconnects the listening socket, i.e. stops accepting new connections + * and releases the address/port the socket is bound to. The socket + * identifier remains valid, e.g. it can be used with listen to accept + * connections on a new port and address. + * + * @see https://developer.chrome.com/apps/sockets_tcpServer#method-disconnect + * @param socketId The socket identifier. + * @param callback Called when the disconnect attempt is complete. + */ + export function disconnect(socketId: number, callback?: () => void): void; + + /** + * Disconnects and destroys the socket. Each socket created should be closed + * after use. The socket id is no longer valid as soon at the function is + * called. However, the socket is guaranteed to be closed only when the + * callback is invoked. + * + * @see https://developer.chrome.com/apps/sockets_tcpServer#method-close + * @param socketId The socket identifier. + * @param callback Called when the close operation completes. + */ + export function close(socketId: number, callback?: () => void): void; + + /** + * Retrieves the state of the given socket. + * + * @see https://developer.chrome.com/apps/sockets_tcpServer#method-getInfo + * @param socketId The socket identifier. + * @param callback Called when the socket state is available. + */ + export function getInfo(socketId: number, callback: (socketInfo: SocketInfo) => void): void; + + /** + * Retrieves the list of currently opened sockets owned by the application. + * + * @see https://developer.chrome.com/apps/sockets_tcpServer#method-getSockets + * @param callback Called when the list of sockets is available. + */ + export function getSockets(callback: (socketInfos: SocketInfo[]) => void): void; + + /** + * Event raised when a connection has been made to the server socket. + * + * @see https://developer.chrome.com/apps/sockets_tcpServer#event-onAccept + */ + export var onAccept: chrome.events.Event<(args: AcceptEventArgs) => void>; + + /** + * Event raised when a network error occured while the runtime was waiting + * for new connections on the socket address and port. Once this event is + * raised, the socket is set to paused and no more onAccept events are + * raised for this socket until the socket is resumed. + * + * @see https://developer.chrome.com/apps/sockets_tcpServer#event-onAcceptError + */ + export var onAcceptError: chrome.events.Event<(args: AcceptErrorEventArgs) => void>; + } + + /** + * Use the chrome.sockets.udp API to send and receive data over the network + * using UDP connections. This API supersedes the UDP functionality previously + * found in the "socket" API. + * + * @since Chrome 33 + * @see https://developer.chrome.com/apps/sockets_udp + */ + namespace sockets.udp { + interface CreateInfo { + socketId: number; + } + + interface SendInfo { + resultCode: number; + bytesSent?: number; + } + + interface ReceiveEventArgs { + socketId: number; + data: ArrayBuffer; + remoteAddress: string; + remotePort: number; + } + + interface ReceiveErrorEventArgs { + socketId: number; + resultCode: number; + } + + /** + * @see https://developer.chrome.com/apps/sockets_udp#type-SocketProperties + */ + interface SocketProperties { + /** + * Flag indicating if the socket is left open when the event page of the + * application is unloaded. The default value is "false." When the + * application is loaded, any sockets previously opened with + * persistent=true can be fetched with getSockets. + * @see http://developer.chrome.com/apps/app_lifecycle.html + */ + persistent?: boolean; + + /** An application-defined string associated with the socket. */ + name?: string; + + /** + * The size of the buffer used to receive data. If the buffer is too + * small to receive the UDP packet, data is lost. The default value is + * 4096. + */ + bufferSize?: number; + } + + /** + * @see https://developer.chrome.com/apps/sockets_udp#type-SocketInfo + */ + interface SocketInfo { + /** The socket identifier. */ + socketId: number; + + /** + * Flag indicating whether the socket is left open when the application + * is suspended (see SocketProperties.persistent). + */ + persistent: boolean; + + /** Application-defined string associated with the socket. */ + name?: string; + + /** + * The size of the buffer used to receive data. If no buffer size ha + * been specified explictly, the value is not provided. + */ + bufferSize?: number; + + /** + * Flag indicating whether the socket is blocked from firing onReceive + * events. + */ + paused: boolean; + + /** + * If the underlying socket is bound, contains its local IPv4/6 address. + */ + localAddress?: string; + + /** + * If the underlying socket is bound, contains its local port. + */ + localPort?: number; + } + + /** + * Creates a UDP socket with default properties. + * + * @see https://developer.chrome.com/apps/sockets_udp#method-create + * @param createInfo.socketId The ID of the newly created socket. + */ + export function create(callback: (createInfo: CreateInfo) => void): void; + + /** + * Creates a UDP socket with the given properties. + * + * @see https://developer.chrome.com/apps/sockets_udp#method-create + * @param properties The socket properties. + * @param createInfo.socketId The ID of the newly created socket. + */ + export function create(properties: SocketProperties, callback: (createInfo: CreateInfo) => void): void; + + /** + * Updates the socket properties. + * + * @see https://developer.chrome.com/apps/sockets_udp#method-update + * @param socketId The socket ID. + * @param properties The properties to update. + * @param callback Called when the properties are updated. + */ + export function update(socketId: number, properties: SocketProperties, callback?: () => void): void; + + /** + * Pauses or unpauses a socket. A paused socket is blocked from firing + * onReceive events. + * + * @see https://developer.chrome.com/apps/sockets_udp#method-setPaused + * @param socketId The socket ID. + * @param paused Flag to indicate whether to pause or unpause. + * @param callback Called when the socket has been successfully paused or + * unpaused. + */ + export function setPaused(socketId: number, paused: boolean, callback?: () => void): void; + + /** + * Binds the local address and port for the socket. For a client socket, it + * is recommended to use port 0 to let the platform pick a free port. + * + * Once the bind operation completes successfully, onReceive events are + * raised when UDP packets arrive on the address/port specified -- unless + * the socket is paused. + * + * @see https://developer.chrome.com/apps/sockets_udp#method-bind + * @param socketId The socket ID. + * @param address The address of the local machine. DNS name, IPv4 and IPv6 + * formats are supported. Use "0.0.0.0" to accept packets + * from all local available network interfaces. + * @param port The port of the local machine. Use "0" to bind to a free + * port. + * @param callback Called when the bind operation completes. + */ + export function bind(socketId: number, address: string, port: number, callback: (result: number) => void): void; + + /** + * Sends data on the given socket to the given address and port. The socket + * must be bound to a local port before calling this method. + * + * @see https://developer.chrome.com/apps/sockets_udp#method-send + * @param socketId The socket ID. + * @param data The data to send. + * @param address The address of the remote machine. + * @param port The port of the remote machine. + * @param callback Called when the send operation completes. + */ + export function send(socketId: number, data: ArrayBuffer, address: string, port: number, callback: (sendInfo: SendInfo) => void): void; + + /** + * Closes the socket and releases the address/port the socket is bound to. + * Each socket created should be closed after use. The socket id is no + * longer valid as soon at the function is called. However, the socket is + * guaranteed to be closed only when the callback is invoked. + * + * @see https://developer.chrome.com/apps/sockets_udp#method-close + * @param socketId The socket ID. + * @param callback Called when the close operation completes. + */ + export function close(socketId: number, callback?: () => void): void; + + /** + * Retrieves the state of the given socket. + * + * @see https://developer.chrome.com/apps/sockets_udp#method-getInfo + * @param socketId The socket ID. + * @param callback Called when the socket state is available. + */ + export function getInfo(socketId: number, callback: (socketInfo: SocketInfo) => void): void; + + /** + * Retrieves the list of currently opened sockets owned by the application. + * + * @see https://developer.chrome.com/apps/sockets_udp#method-getSockets + * @param callback Called when the list of sockets is available. + */ + export function getSockets(callback: (socketInfos: SocketInfo[]) => void): void; + + /** + * Joins the multicast group and starts to receive packets from that group. + * The socket must be bound to a local port before calling this method. + * + * @see https://developer.chrome.com/apps/sockets_udp#method-joinGroup + * @param socketId The socket ID. + * @param address The group address to join. Domain names are not supported. + * @param callback Called when the joinGroup operation completes. + */ + export function joinGroup(socketId: number, address: string, callback: (result: number) => void): void; + + /** + * Leaves the multicast group previously joined using joinGroup. This is + * only necessary to call if you plan to keep using the socket afterwards, + * since it will be done automatically by the OS when the socket is closed. + * + * Leaving the group will prevent the router from sending multicast + * datagrams to the local host, presuming no other process on the host is + * still joined to the group. + * + * @see https://developer.chrome.com/apps/sockets_udp#method-leaveGroup + * @param socketId The socket ID. + * @param address The group address to leave. Domain names are not + * supported. + * @param callback Called when the leaveGroup operation completes. + */ + export function leaveGroup(socketId: number, address: string, callback: (result: number) => void): void; + + /** + * Sets the time-to-live of multicast packets sent to the multicast group. + * + * Calling this method does not require multicast permissions. + * + * @see https://developer.chrome.com/apps/sockets_udp#method-setMulticastTimeToLive + * @param socketId The socket ID. + * @param ttl The time-to-live value. + * @param callback Called when the configuration operation completes. + */ + export function setMulticastTimeToLive(socketId: number, ttl: number, callback: (result: number) => void): void; + + /** + * Sets whether multicast packets sent from the host to the multicast group + * will be looped back to the host. + * + * Note: the behavior of setMulticastLoopbackMode is slightly different + * between Windows and Unix-like systems. The inconsistency happens only + * when there is more than one application on the same host joined to the + * same multicast group while having different settings on multicast + * loopback mode. On Windows, the applications with loopback off will not + * RECEIVE the loopback packets; while on Unix-like systems, the + * applications with loopback off will not SEND the loopback packets to + * other applications on the same host. + * @see MSDN: http://goo.gl/6vqbj + * + * Calling this method does not require multicast permissions. + * + * @see https://developer.chrome.com/apps/sockets_udp#method-setMulticastLoopbackMode + * @param socketId The socket ID. + * @param enabled Indicate whether to enable loopback mode. + * @param callback Called when the configuration operation completes. + */ + export function setMulticastLoopbackMode(socketId: number, enabled: boolean, callback: (result: number) => void): void; + + /** + * Gets the multicast group addresses the socket is currently joined to. + * + * @see https://developer.chrome.com/apps/sockets_udp#method-getJoinedGroups + * @param socketId The socket ID. + * @param callback Called with an array of strings of the result. + */ + export function getJoinedGroups(socketId: number, callback: (groups: string[]) => void): void; + + /** + * Enables or disables broadcast packets on this socket. + * + * @since Chrome 44 + * @see https://developer.chrome.com/apps/sockets_udp#method-setBroadcast + * @param socketId The socket ID. + * @param enabled true to enable broadcast packets, false to disable them. + * @param callback Callback from the setBroadcast method. + */ + export function setBroadcast(socketId: number, enabled: boolean, callback?: (result: number) => void): void; + + /** + * Event raised when a UDP packet has been received for the given socket. + * + * @see https://developer.chrome.com/apps/sockets_udp#event-onReceive + */ + export var onReceive: chrome.events.Event<(args: ReceiveEventArgs) => void>; + + /** + * Event raised when a network error occured while the runtime was waiting + * for data on the socket address and port. Once this event is raised, the + * socket is paused and no more onReceive events will be raised for this + * socket until the socket is resumed. + * + * @see https://developer.chrome.com/apps/sockets_udp#event-onReceiveError + */ + export var onReceiveError: chrome.events.Event<(args: ReceiveErrorEventArgs) => void>; + } + + //////////////////// + // Storage + //////////////////// + /** + * Use the chrome.storage API to store, retrieve, and track changes to user data. + * Permissions: "storage" + * @since Chrome 20. + */ + namespace storage { + interface StorageArea { + /** + * Gets the amount of space (in bytes) being used by one or more items. + * @param callback Callback with the amount of space being used by storage, or on failure (in which case runtime.lastError will be set). + * Parameter bytesInUse: Amount of space being used in storage, in bytes. + */ + getBytesInUse(callback: (bytesInUse: number) => void): void; + /** + * Gets the amount of space (in bytes) being used by one or more items. + * @param keys A single key or list of keys to get the total usage for. An empty list will return 0. Pass in null to get the total usage of all of storage. + * @param callback Callback with the amount of space being used by storage, or on failure (in which case runtime.lastError will be set). + * Parameter bytesInUse: Amount of space being used in storage, in bytes. + */ + getBytesInUse(keys: string | string[] | null, callback: (bytesInUse: number) => void): void; + /** + * Removes all items from storage. + * @param callback Optional. + * Callback on success, or on failure (in which case runtime.lastError will be set). + */ + clear(callback?: () => void): void; + /** + * Sets multiple items. + * @param items An object which gives each key/value pair to update storage with. Any other key/value pairs in storage will not be affected. + * Primitive values such as numbers will serialize as expected. Values with a typeof "object" and "function" will typically serialize to {}, with the exception of Array (serializes as expected), Date, and Regex (serialize using their String representation). + * @param callback Optional. + * Callback on success, or on failure (in which case runtime.lastError will be set). + */ + set(items: Object, callback?: () => void): void; + /** + * Removes one or more items from storage. + * @param A single key or a list of keys for items to remove. + * @param callback Optional. + * Callback on success, or on failure (in which case runtime.lastError will be set). + */ + remove(keys: string | string[], callback?: () => void): void; + /** + * Gets one or more items from storage. + * @param callback Callback with storage items, or on failure (in which case runtime.lastError will be set). + * Parameter items: Object with items in their key-value mappings. + */ + get(callback: (items: { [key: string]: any }) => void): void; + /** + * Gets one or more items from storage. + * @param keys A single key to get, list of keys to get, or a dictionary specifying default values. + * An empty list or object will return an empty result object. Pass in null to get the entire contents of storage. + * @param callback Callback with storage items, or on failure (in which case runtime.lastError will be set). + * Parameter items: Object with items in their key-value mappings. + */ + get(keys: string | string[] | Object | null, callback: (items: { [key: string]: any }) => void): void; + } + + interface StorageChange { + /** Optional. The new value of the item, if there is a new value. */ + newValue?: any; + /** Optional. The old value of the item, if there was an old value. */ + oldValue?: any; + } + + interface LocalStorageArea extends StorageArea { + /** The maximum amount (in bytes) of data that can be stored in local storage, as measured by the JSON stringification of every value plus every key's length. This value will be ignored if the extension has the unlimitedStorage permission. Updates that would cause this limit to be exceeded fail immediately and set runtime.lastError. */ + QUOTA_BYTES: number; + } + + interface SyncStorageArea extends StorageArea { + /** @deprecated since Chrome 40. The storage.sync API no longer has a sustained write operation quota. */ + MAX_SUSTAINED_WRITE_OPERATIONS_PER_MINUTE: number; + /** The maximum total amount (in bytes) of data that can be stored in sync storage, as measured by the JSON stringification of every value plus every key's length. Updates that would cause this limit to be exceeded fail immediately and set runtime.lastError. */ + QUOTA_BYTES: number; + /** The maximum size (in bytes) of each individual item in sync storage, as measured by the JSON stringification of its value plus its key length. Updates containing items larger than this limit will fail immediately and set runtime.lastError. */ + QUOTA_BYTES_PER_ITEM: number; + /** The maximum number of items that can be stored in sync storage. Updates that would cause this limit to be exceeded will fail immediately and set runtime.lastError. */ + MAX_ITEMS: number; + /** + * The maximum number of set, remove, or clear operations that can be performed each hour. This is 1 every 2 seconds, a lower ceiling than the short term higher writes-per-minute limit. + * Updates that would cause this limit to be exceeded fail immediately and set runtime.lastError. + */ + MAX_WRITE_OPERATIONS_PER_HOUR: number; + /** + * The maximum number of set, remove, or clear operations that can be performed each minute. This is 2 per second, providing higher throughput than writes-per-hour over a shorter period of time. + * Updates that would cause this limit to be exceeded fail immediately and set runtime.lastError. + * @since Chrome 40. + */ + MAX_WRITE_OPERATIONS_PER_MINUTE: number; + } + + interface StorageChangedEvent extends chrome.events.Event<(changes: { [key: string]: StorageChange }, areaName: string) => void> { } + + /** Items in the local storage area are local to each machine. */ + export var local: LocalStorageArea; + /** Items in the sync storage area are synced using Chrome Sync. */ + export var sync: SyncStorageArea; + + /** + * Items in the managed storage area are set by the domain administrator, and are read-only for the extension; trying to modify this namespace results in an error. + * @since Chrome 33. + */ + export var managed: StorageArea; + + /** Fired when one or more items change. */ + export var onChanged: StorageChangedEvent; + } + + //////////////////// + // SyncFileSystem + //////////////////// + /** + * Use the chrome.syncFileSystem API to save and synchronize data on Google Drive. This API is NOT for accessing arbitrary user docs stored in Google Drive. It provides app-specific syncable storage for offline and caching usage so that the same data can be available across different clients. Read Manage Data for more on using this API. + * @since Chrome 27 + */ + namespace syncFileSystem { + /** NOT YET IMPLEMENTED */ + } + + + //////////////////// + // System CPU + //////////////////// + /** + * Use the system.cpu API to query CPU metadata. + * Permissions: "system.cpu" + * @since Chrome 32. + */ + namespace system.cpu { + interface ProcessorUsage { + /** The cumulative time used by userspace programs on this processor. */ + user: number; + /** The cumulative time used by kernel programs on this processor. */ + kernel: number; + /** The cumulative time spent idle by this processor. */ + idle: number; + /** The total cumulative time for this processor. This value is equal to user + kernel + idle. */ + total: number; + } + + interface ProcessorInfo { + /** Cumulative usage info for this logical processor. */ + usage: ProcessorUsage; + } + + interface CpuInfo { + /** The number of logical processors. */ + numOfProcessors: number; + /** The architecture name of the processors. */ + archName: string; + /** The model name of the processors. */ + modelName: string; + /** + * A set of feature codes indicating some of the processor's capabilities. + * The currently supported codes are "mmx", "sse", "sse2", "sse3", "ssse3", "sse4_1", "sse4_2", and "avx". + */ + features: string[]; + /** Information about each logical processor. */ + processors: ProcessorInfo[]; + } + + /** Queries basic CPU information of the system. */ + export function getInfo(callback: (info: CpuInfo) => void): void; + } + + //////////////////// + // System Display + //////////////////// + /** + * Use the system.display API to query display metadata. + * Permissions: "system.display" + * @since Chrome 30. + */ + namespace system.display { + interface Bounds { + /** The x-coordinate of the upper-left corner. */ + left: number; + /** The y-coordinate of the upper-left corner. */ + top: number; + /** The width of the display in pixels. */ + width: number; + /** The height of the display in pixels. */ + height: number; + } + + interface Insets { + /** The x-axis distance from the left bound. */ + left: number; + /** The y-axis distance from the top bound. */ + top: number; + /** The x-axis distance from the right bound. */ + right: number; + /** The y-axis distance from the bottom bound. */ + bottom: number; + } + + /** + * @since Chrome 57 + */ + interface Point { + /** The x-coordinate of the point. */ + x: number; + /** The y-coordinate of the point. */ + y: number; + } + + /** + * @since Chrome 57 + */ + interface TouchCalibrationPair { + /** The coordinates of the display point. */ + displayPoint: Point; + /** The coordinates of the touch point corresponding to the display point. */ + touchPoint: Point; + } + + /** + * @since Chrome 52 + */ + interface DisplayMode { + /** The display mode width in device independent (user visible) pixels. */ + width: number; + + /** The display mode height in device independent (user visible) pixels. */ + height: number; + + /** The display mode width in native pixels. */ + widthInNativePixels: number; + + /** The display mode height in native pixels. */ + heightInNativePixels: number; + + /** The display mode UI scale factor. */ + uiScale: number; + + /** The display mode device scale factor. */ + deviceScaleFactor: number; + + /** True if the mode is the display's native mode. */ + isNative: boolean; + + /** True if the display mode is currently selected. */ + isSelected: boolean; + } + + /** + * @since Chrome 53 + */ + interface DisplayLayout { + /** The unique identifier of the display. */ + id: string; + /** The unique identifier of the parent display. Empty if this is the root. */ + parentId: string; + /** The layout position of this display relative to the parent. This will be ignored for the root. */ + position: 'top' | 'right' | 'bottom' | 'left'; + /** The offset of the display along the connected edge. 0 indicates that the topmost or leftmost corners are aligned. */ + offset: number; + } + + /** + * @description The pairs of point used to calibrate the display. + * @export + * @interface TouchCalibrationPairs + */ + interface TouchCalibrationPairs { + /** First pair of touch and display point required for touch calibration. */ + pair1: TouchCalibrationPair, + /** Second pair of touch and display point required for touch calibration. */ + pair2: TouchCalibrationPair, + /** Third pair of touch and display point required for touch calibration. */ + pair3: TouchCalibrationPair, + /** Fourth pair of touch and display point required for touch calibration. */ + pair4: TouchCalibrationPair + } + + /** + * @description Representation of info data to be used in chrome.system.display.setDisplayProperties() + * @export + * @interface DisplayPropertiesInfo + */ + interface DisplayPropertiesInfo { + /** + * @description Chrome OS only. If set to true, changes the display mode to unified desktop (see enableUnifiedDesktop for details). If set to false, unified desktop mode will be disabled. This is only valid for the primary display. If provided, mirroringSourceId must not be provided and other properties may not apply. This is has no effect if not provided. + * @since Chrome 59 + * */ + isUnified?: boolean; + + /** + * Chrome OS only. If set and not empty, enables mirroring for this display. Otherwise disables mirroring for this display. This value should indicate the id of the source display to mirror, which must not be the same as the id passed to setDisplayProperties. If set, no other property may be set. + */ + mirroringSourceId?: string; + + /** If set to true, makes the display primary. No-op if set to false. */ + isPrimary?: boolean; + + /** If set, sets the display's overscan insets to the provided values. Note that overscan values may not be negative or larger than a half of the screen's size. Overscan cannot be changed on the internal monitor. It's applied after isPrimary parameter. */ + overscan?: Insets; + + /** If set, updates the display's rotation. Legal values are [0, 90, 180, 270]. The rotation is set clockwise, relative to the display's vertical position. It's applied after overscan paramter. */ + rotation?: 0 | 90 | 180 | 270; + + /** If set, updates the display's logical bounds origin along x-axis. Applied together with boundsOriginY, if boundsOriginY is set. Note that, when updating the display origin, some constraints will be applied, so the final bounds origin may be different than the one set. The final bounds can be retrieved using getInfo. The bounds origin is applied after rotation. The bounds origin cannot be changed on the primary display. Note that is also invalid to set bounds origin values if isPrimary is also set (as isPrimary parameter is applied first). */ + boundsOriginX?: number; + + /** If set, updates the display's logical bounds origin along y-axis. See documentation for boundsOriginX parameter. */ + boundsOriginY: number; + + /** + * @since Chrome 52 + * @description If set, updates the display mode to the mode matching this value. + */ + displayMode?: DisplayMode; + } + + /** + * @description Options affecting how the information is returned. + * @since Chrome 59 + * @export + * @interface DisplayInfoFlags + */ + interface DisplayInfoFlags { + /** + * @description If set to true, only a single DisplayUnitInfo will be returned by getInfo when in unified desktop mode (see enableUnifiedDesktop). Defaults to false. + * @type {boolean} + * @memberof DisplayInfoFlags + */ + singleUnified?: boolean; + } + + /** Information about display properties. */ + interface DisplayInfo { + /** The unique identifier of the display. */ + id: string; + /** The user-friendly name (e.g. "HP LCD monitor"). */ + name: string; + /** Identifier of the display that is being mirrored on the display unit. If mirroring is not in progress, set to an empty string. Currently exposed only on ChromeOS. Will be empty string on other platforms. */ + mirroringSourceId: string; + /** True if this is the primary display. */ + isPrimary: boolean; + /** True if this is an internal display. */ + isInternal: boolean; + /** True if this display is enabled. */ + isEnabled: boolean; + /** The number of pixels per inch along the x-axis. */ + dpiX: number; + /** The number of pixels per inch along the y-axis. */ + dpiY: number; + /** The display's clockwise rotation in degrees relative to the vertical position. Currently exposed only on ChromeOS. Will be set to 0 on other platforms. */ + rotation: number; + /** The display's logical bounds. */ + bounds: Bounds; + /** The display's insets within its screen's bounds. Currently exposed only on ChromeOS. Will be set to empty insets on other platforms. */ + overscan: Insets; + /** The usable work area of the display within the display bounds. The work area excludes areas of the display reserved for OS, for example taskbar and launcher. */ + workArea: Bounds; + } + + /** The information about display properties that should be changed. A property will be changed only if a new value for it is specified in |info|. */ + interface DisplayProps { + /** If set and not empty, starts mirroring between this and the display with the provided id (the system will determine which of the displays is actually mirrored). If set and not empty, stops mirroring between this and the display with the specified id (if mirroring is in progress). If set, no other parameter may be set. */ + mirroringSourceId?: string; + /** If set to true, makes the display primary. No-op if set to false. */ + isPrimary?: boolean; + /** If set, sets the display's overscan insets to the provided values. Note that overscan values may not be negative or larger than a half of the screen's size. Overscan cannot be changed on the internal monitor. It's applied after isPrimary parameter. */ + overscan?: Insets; + /** If set, updates the display's rotation. Legal values are [0, 90, 180, 270]. The rotation is set clockwise, relative to the display's vertical position. It's applied after overscan paramter. */ + rotation?: number; + /** If set, updates the display's logical bounds origin along x-axis. Applied together with boundsOriginY, if boundsOriginY is set. Note that, when updating the display origin, some constraints will be applied, so the final bounds origin may be different than the one set. The final bounds can be retrieved using getInfo. The bounds origin is applied after rotation. The bounds origin cannot be changed on the primary display. Note that is also invalid to set bounds origin values if isPrimary is also set (as isPrimary parameter is applied first). */ + boundsOriginX?: number; + /** If set, updates the display's logical bounds origin along y-axis. See documentation for boundsOriginX parameter. */ + boundsOriginY?: number; + } + + /** + * @description Fired when anything changes to the display configuration. + * @export + * @interface DisplayChangedEvent + * @extends {chrome.events.Event<() => void>} + */ + interface DisplayChangedEvent extends chrome.events.Event<() => void> { } + + /** + * @description Requests the information for all attached display devices. + * @export + * @param {(info: DisplayInfo[]) => void} callback The callback to invoke with the results. + */ + export function getInfo(callback: (info: DisplayInfo[]) => void): void; + /** + * @description Requests the information for all attached display devices. + * @export + * @since Chrome 59 + * @param {DisplayInfoFlags} [flags] Options affecting how the information is returned. + * @param {(info: DisplayInfo[]) => void} callback The callback to invoke with the results. + */ + export function getInfo(flags: DisplayInfoFlags, callback: (info: DisplayInfo[]) => void): void; + + /** + * @description Requests the layout info for all displays. NOTE: This is only available to Chrome OS Kiosk apps and Web UI. + * @since Chrome 53 + * @export + * @param {(layouts: DisplayLayout[]) => void} callback The callback to invoke with the results. + */ + export function getDisplayLayout(callback: (layouts: DisplayLayout[]) => void): void; + + /** + * @description Updates the properties for the display specified by |id|, according to the information provided in |info|. On failure, runtime.lastError will be set. NOTE: This is only available to Chrome OS Kiosk apps and Web UI. + * @export + * @param {string} id The display's unique identifier. + * @param {DisplayPropertiesInfo} info The information about display properties that should be changed. A property will be changed only if a new value for it is specified in |info|. + * @param {() => void} [callback] Empty function called when the function finishes. To find out whether the function succeeded, runtime.lastError should be queried. + */ + export function setDisplayProperties(id: string, info: DisplayPropertiesInfo, callback?: () => void): void; + + /** + * @description Set the layout for all displays. Any display not included will use the default layout. If a layout would overlap or be otherwise invalid it will be adjusted to a valid layout. After layout is resolved, an onDisplayChanged event will be triggered. NOTE: This is only available to Chrome OS Kiosk apps and Web UI. + * @since Chrome 53 + * @export + * @param {DisplayLayout[]} layouts The layout information, required for all displays except the primary display. + * @param {() => void} callback Empty function called when the function finishes. To find out whether the function succeeded, runtime.lastError should be queried. + */ + export function setDisplayLayout(layouts: DisplayLayout[], callback?: () => void): void; + + /** + * @description Enables/disables the unified desktop feature. Note that this simply enables the feature, but will not change the actual desktop mode. (That is, if the desktop is in mirror mode, it will stay in mirror mode) NOTE: This is only available to Chrome OS Kiosk apps and Web UI. + * @since Chrome 46 + * @export + * @param {boolean} enabled True if unified desktop should be enabled. + */ + export function enableUnifiedDesktop(enabled: boolean): void; + /** + * @description Starts overscan calibration for a display. This will show an overlay on the screen indicating the current overscan insets. If overscan calibration for display |id| is in progress this will reset calibration. + * @since Chrome 53 + * @export + * @param {string} id The display's unique identifier. + */ + export function overscanCalibrationStart(id: string): void; + /** + * @description Adjusts the current overscan insets for a display. Typically this should etiher move the display along an axis (e.g. left+right have the same value) or scale it along an axis (e.g. top+bottom have opposite values). Each Adjust call is cumulative with previous calls since Start. + * @since Chrome 53 + * @export + * @param {string} id The display's unique identifier. + * @param {Insets} delta The amount to change the overscan insets. + */ + export function overscanCalibrationAdjust(id: string, delta: Insets): void; + + /** + * @description Resets the overscan insets for a display to the last saved value (i.e before Start was called). + * @since Chrome 53 + * @export + * @param {string} id The display's unique identifier. + */ + export function overscanCalibrationReset(id: string): void; + + /** + * @description Complete overscan adjustments for a display by saving the current values and hiding the overlay. + * @since Chrome 53 + * @export + * @param {string} id The display's unique identifier. + */ + export function overscanCalibrationComplete(id: string): void; + + /** + * @description Displays the native touch calibration UX for the display with |id| as display id. This will show an overlay on the screen with required instructions on how to proceed. The callback will be invoked in case of successful calibraion only. If the calibration fails, this will throw an error. + * @since Chrome 57 + * @export + * @param {string} id The display's unique identifier. + * @param {(success) => void} callback Optional callback to inform the caller that the touch calibration has ended. The argument of the callback informs if the calibration was a success or not. + */ + export function showNativeTouchCalibration(id: string, callback: (success: boolean) => void): void; + + /** + * @description Starts custom touch calibration for a display. This should be called when using a custom UX for collecting calibration data. If another touch calibration is already in progress this will throw an error. + * @since Chrome 57 + * @export + * @param {string} id The display's unique identifier. + */ + export function startCustomTouchCalibration(id: string): void; + + /** + * @description Sets the touch calibration pairs for a display. These |pairs| would be used to calibrate the touch screen for display with |id| called in startCustomTouchCalibration(). Always call |startCustomTouchCalibration| before calling this method. If another touch calibration is already in progress this will throw an error. + * @since Chrome 57 + * @export + * @param {TouchCalibrationPairs} pairs The pairs of point used to calibrate the display. + * @param {Bounds} bounds Bounds of the display when the touch calibration was performed. |bounds.left| and |bounds.top| values are ignored. + */ + export function completeCustomTouchCalibration(pairs: TouchCalibrationPairs, bounds: Bounds): void; + /** + * @description Resets the touch calibration for the display and brings it back to its default state by clearing any touch calibration data associated with the display. + * @since Chrome 57 + * @export + * @param {string} id The display's unique identifier. + */ + export function clearTouchCalibration(id: string): void; + + /** + * @description Fired when anything changes to the display configuration. + * @export + */ + export var onDisplayChanged: DisplayChangedEvent; + } + + //////////////////// + // System Memory + //////////////////// + /** + * The chrome.system.memory API. + * Permissions: "system.memory" + * @since Chrome 32. + */ + namespace system.memory { + interface MemoryInfo { + /** The total amount of physical memory capacity, in bytes. */ + capacity: number; + /** The amount of available capacity, in bytes. */ + availableCapacity: number; + } + + /** Get physical memory information. */ + export function getInfo(callback: (info: MemoryInfo) => void): void; + } + + //////////////////// + // System - Network + //////////////////// + namespace system.network { + interface NetworkInterface { + name: string; + address: string; + prefixLength: number; + } + + export function getNetworkInterfaces(callback: (networkInterfaces: NetworkInterface[]) => void): void; + } + + //////////////////// + // System Storage + //////////////////// + /** + * Use the chrome.system.storage API to query storage device information and be notified when a removable storage device is attached and detached. + * Permissions: "system.storage" + * @since Chrome 30. + */ + namespace system.storage { + interface StorageUnitInfo { + /** The transient ID that uniquely identifies the storage device. This ID will be persistent within the same run of a single application. It will not be a persistent identifier between different runs of an application, or between different applications. */ + id: string; + /** The name of the storage unit. */ + name: string; + /** + * The media type of the storage unit. + * fixed: The storage has fixed media, e.g. hard disk or SSD. + * removable: The storage is removable, e.g. USB flash drive. + * unknown: The storage type is unknown. + */ + type: string; + /** The total amount of the storage space, in bytes. */ + capacity: number; + } + + interface StorageCapacityInfo { + /** A copied |id| of getAvailableCapacity function parameter |id|. */ + id: string; + /** The available capacity of the storage device, in bytes. */ + availableCapacity: number; + } + + interface SystemStorageAttachedEvent extends chrome.events.Event<(info: StorageUnitInfo) => void> { } + + interface SystemStorageDetachedEvent extends chrome.events.Event<(id: string) => void> { } + + /** Get the storage information from the system. The argument passed to the callback is an array of StorageUnitInfo objects. */ + export function getInfo(callback: (info: StorageUnitInfo[]) => void): void; + /** + * Ejects a removable storage device. + * @param callback + * Parameter result: success: The ejection command is successful -- the application can prompt the user to remove the device; in_use: The device is in use by another application. The ejection did not succeed; the user should not remove the device until the other application is done with the device; no_such_device: There is no such device known. failure: The ejection command failed. + */ + export function ejectDevice(id: string, callback: (result: string) => void): void; + /** + * Get the available capacity of a specified |id| storage device. The |id| is the transient device ID from StorageUnitInfo. + * @since Dev channel only. + */ + export function getAvailableCapacity(id: string, callback: (info: StorageCapacityInfo) => void): void; + + /** Fired when a new removable storage is attached to the system. */ + export var onAttached: SystemStorageAttachedEvent; + /** Fired when a removable storage is detached from the system. */ + export var onDetached: SystemStorageDetachedEvent; + } + + //////////////////// + // Text to Speech + //////////////////// + /** + * Use the chrome.tts API to play synthesized text-to-speech (TTS). See also the related ttsEngine API, which allows an extension to implement a speech engine. + * Permissions: "tts" + * @since Chrome 14. + */ + namespace tts { + /** An event from the TTS engine to communicate the status of an utterance. */ + interface TtsEvent { + /** Optional. The index of the current character in the utterance. */ + charIndex?: number; + /** Optional. The error description, if the event type is 'error'. */ + errorMessage?: string; + /** + * The type can be 'start' as soon as speech has started, 'word' when a word boundary is reached, 'sentence' when a sentence boundary is reached, 'marker' when an SSML mark element is reached, 'end' when the end of the utterance is reached, 'interrupted' when the utterance is stopped or interrupted before reaching the end, 'cancelled' when it's removed from the queue before ever being synthesized, or 'error' when any other error occurs. When pausing speech, a 'pause' event is fired if a particular utterance is paused in the middle, and 'resume' if an utterance resumes speech. Note that pause and resume events may not fire if speech is paused in-between utterances. + * One of: "start", "end", "word", "sentence", "marker", "interrupted", "cancelled", "error", "pause", or "resume" + */ + type: string; + } + + /** A description of a voice available for speech synthesis. */ + interface TtsVoice { + /** Optional. The language that this voice supports, in the form language-region. Examples: 'en', 'en-US', 'en-GB', 'zh-CN'. */ + lang?: string; + /** + * Optional. This voice's gender. + * One of: "male", or "female" + */ + gender?: string; + /** Optional. The name of the voice. */ + voiceName?: string; + /** The ID of the extension providing this voice. */ + extensionsId?: string; + /** All of the callback event types that this voice is capable of sending. */ + eventTypes?: string[]; + /** + * If true, the synthesis engine is a remote network resource. It may be higher latency and may incur bandwidth costs. + * @since Chrome 33. + */ + remote?: boolean; + } + + interface SpeakOptions { + /** Optional. Speaking volume between 0 and 1 inclusive, with 0 being lowest and 1 being highest, with a default of 1.0. */ + volume?: number; + /** + * Optional. + * If true, enqueues this utterance if TTS is already in progress. If false (the default), interrupts any current speech and flushes the speech queue before speaking this new utterance. + */ + enqueue?: boolean; + /** + * Optional. + * Speaking rate relative to the default rate for this voice. 1.0 is the default rate, normally around 180 to 220 words per minute. 2.0 is twice as fast, and 0.5 is half as fast. Values below 0.1 or above 10.0 are strictly disallowed, but many voices will constrain the minimum and maximum rates further—for example a particular voice may not actually speak faster than 3 times normal even if you specify a value larger than 3.0. + */ + rate?: number; + /** + * Optional. This function is called with events that occur in the process of speaking the utterance. + * @param event The update event from the text-to-speech engine indicating the status of this utterance. + */ + onEvent?: (event: TtsEvent) => void; + /** + * Optional. + * Speaking pitch between 0 and 2 inclusive, with 0 being lowest and 2 being highest. 1.0 corresponds to a voice's default pitch. + */ + pitch?: number; + /** Optional. The language to be used for synthesis, in the form language-region. Examples: 'en', 'en-US', 'en-GB', 'zh-CN'. */ + lang?: string; + /** Optional. The name of the voice to use for synthesis. If empty, uses any available voice. */ + voiceName?: string; + /** Optional. The extension ID of the speech engine to use, if known. */ + extensionId?: string; + /** + * Optional. Gender of voice for synthesized speech. + * One of: "male", or "female" + */ + gender?: string; + /** Optional. The TTS event types the voice must support. */ + requiredEventTypes?: string[]; + /** Optional. The TTS event types that you are interested in listening to. If missing, all event types may be sent. */ + desiredEventTypes?: string[]; + } + + /** Checks whether the engine is currently speaking. On Mac OS X, the result is true whenever the system speech engine is speaking, even if the speech wasn't initiated by Chrome. */ + export function isSpeaking(callback?: (speaking: boolean) => void): void; + /** Stops any current speech and flushes the queue of any pending utterances. In addition, if speech was paused, it will now be un-paused for the next call to speak. */ + export function stop(): void; + /** Gets an array of all available voices. */ + export function getVoices(callback?: (voices: TtsVoice[]) => void): void; + /** + * Speaks text using a text-to-speech engine. + * @param utterance The text to speak, either plain text or a complete, well-formed SSML document. Speech engines that do not support SSML will strip away the tags and speak the text. The maximum length of the text is 32,768 characters. + * @param callback Optional. Called right away, before speech finishes. Check chrome.runtime.lastError to make sure there were no errors. Use options.onEvent to get more detailed feedback. + */ + export function speak(utterance: string, callback?: Function): void; + /** + * Speaks text using a text-to-speech engine. + * @param utterance The text to speak, either plain text or a complete, well-formed SSML document. Speech engines that do not support SSML will strip away the tags and speak the text. The maximum length of the text is 32,768 characters. + * @param options Optional. The speech options. + * @param callback Optional. Called right away, before speech finishes. Check chrome.runtime.lastError to make sure there were no errors. Use options.onEvent to get more detailed feedback. + */ + export function speak(utterance: string, options: SpeakOptions, callback?: Function): void; + /** + * Pauses speech synthesis, potentially in the middle of an utterance. A call to resume or stop will un-pause speech. + * @since Chrome 29. + */ + export function pause(): void; + /** + * If speech was paused, resumes speaking where it left off. + * @since Chrome 29. + */ + export function resume(): void; + } + + //////////////////// + // Types + //////////////////// + /** + * The chrome.types API contains type declarations for Chrome. + * @since Chrome 13. + */ + namespace types { + interface ChromeSettingClearDetails { + /** + * Optional. + * The scope of the ChromeSetting. One of + * • regular: setting for the regular profile (which is inherited by the incognito profile if not overridden elsewhere), + * • regular_only: setting for the regular profile only (not inherited by the incognito profile), + * • incognito_persistent: setting for the incognito profile that survives browser restarts (overrides regular preferences), + * • incognito_session_only: setting for the incognito profile that can only be set during an incognito session and is deleted when the incognito session ends (overrides regular and incognito_persistent preferences). + */ + scope?: string; + } + + interface ChromeSettingSetDetails extends ChromeSettingClearDetails { + /** + * The value of the setting. + * Note that every setting has a specific value type, which is described together with the setting. An extension should not set a value of a different type. + */ + value: any; + /** + * Optional. + * The scope of the ChromeSetting. One of + * • regular: setting for the regular profile (which is inherited by the incognito profile if not overridden elsewhere), + * • regular_only: setting for the regular profile only (not inherited by the incognito profile), + * • incognito_persistent: setting for the incognito profile that survives browser restarts (overrides regular preferences), + * • incognito_session_only: setting for the incognito profile that can only be set during an incognito session and is deleted when the incognito session ends (overrides regular and incognito_persistent preferences). + */ + scope?: string; + } + + interface ChromeSettingGetDetails { + /** Optional. Whether to return the value that applies to the incognito session (default false). */ + incognito?: boolean; + } + + /** + * @param details Details of the currently effective value. + */ + export type DetailsCallback = (details: ChromeSettingGetResultDetails) => void; + + interface ChromeSettingGetResultDetails { + /** + * One of + * • not_controllable: cannot be controlled by any extension + * • controlled_by_other_extensions: controlled by extensions with higher precedence + * • controllable_by_this_extension: can be controlled by this extension + * • controlled_by_this_extension: controlled by this extension + */ + levelOfControl: string; + /** The value of the setting. */ + value: any; + /** + * Optional. + * Whether the effective value is specific to the incognito session. + * This property will only be present if the incognito property in the details parameter of get() was true. + */ + incognitoSpecific?: boolean; + } + + interface ChromeSettingChangedEvent extends chrome.events.Event { } + + /** An interface that allows access to a Chrome browser setting. See accessibilityFeatures for an example. */ + interface ChromeSetting { + /** + * Sets the value of a setting. + * @param details Which setting to change. + * @param callback Optional. Called at the completion of the set operation. + */ + set(details: ChromeSettingSetDetails, callback?: Function): void; + /** + * Gets the value of a setting. + * @param details Which setting to consider. + */ + get(details: ChromeSettingGetDetails, callback?: DetailsCallback): void; + /** + * Clears the setting, restoring any default value. + * @param details Which setting to clear. + * @param callback Optional. Called at the completion of the clear operation. + */ + clear(details: ChromeSettingClearDetails, callback?: Function): void; + /** Fired after the setting changes. */ + onChange: ChromeSettingChangedEvent; + } + } + + //////////////////// + // USB + //////////////////// + namespace usb { + type Direction = 'in' | 'out'; + + interface Device { + device: number, + vendorId: number, + productId: number, + productName: string, + manufacturerName: string, + serialNumber: string + } + + interface ConnectionHandle { + handle: number, + vendorId: number, + productId: number + } + + interface EndpointDescriptor { + address: number, + type: 'control' | 'interrupt' | 'isochronous' | 'bulk', + direction: Direction, + maximumPacketSize: number, + synchronization?: 'asynchronous' | 'adaptive' | 'synchronous', + usage?: 'data' | 'feedback' | 'explicitFeedback', + pollingInterval?: number, + extra_data: ArrayBuffer + } + + interface InterfaceDescriptor { + interfaceNumber: number, + alternateSetting: number, + interfaceClass: number, + interfaceSubclass: number, + interfaceProtocol: number, + description?: string, + endpoints: EndpointDescriptor[], + extra_data: ArrayBuffer + } + + interface ConfigDescriptor { + active: boolean, + configurationValue: number, + description?: string, + selfPowered: boolean, + remoteWakeup: boolean, + maxPower: number, + interfaces: InterfaceDescriptor[], + extra_data: ArrayBuffer + } + + interface GenericTransferInfo { + direction: Direction, + endpoint: number, + length?: number, + data?: ArrayBuffer, + timeout?: number + } + + interface TransferResultInfo { + resultCode: number, + data?: ArrayBuffer + } + + interface DeviceFilter { + vendorId?: number, + productId?: number, + interfaceClass?: number, + interfaceSubclass?: number, + interfaceProtocol?: number + } + + interface TransferInfo { + direction: Direction; + recipient: 'device' | 'interface' | 'endpoint' | 'other'; + requestType: 'standard' | 'class' | 'vendor' | 'reserved'; + request: number; + value: number; + index: number; + length?: number; + data?: ArrayBuffer; + timeout?: number; + } + + interface DeviceEvent extends chrome.events.Event<(device: Device) => void> { } + + export var onDeviceAdded: DeviceEvent; + export var onDeviceRemoved: DeviceEvent; + + export function getDevices(options: { vendorId?: number, productId?: number, filters?: DeviceFilter[] }, callback: (devices: Device[]) => void): void; + export function getUserSelectedDevices(options: { multiple?: boolean, filters?: DeviceFilter[] }, callback: (devices: Device[]) => void): void; + export function getConfigurations(device: Device, callback: (configs: ConfigDescriptor[]) => void): void; + export function requestAccess(device: Device, interfaceId: number, callback: (success: boolean) => void): void; + export function openDevice(device: Device, callback: (handle: ConnectionHandle) => void): void; + export function findDevices(options: { vendorId: number, productId: number, interfaceId?: number }, callback: (handles: ConnectionHandle[]) => void): void; + export function closeDevice(handle: ConnectionHandle, callback?: () => void): void; + export function setConfiguration(handle: ConnectionHandle, configurationValue: number, callback: () => void): void; + export function getConfiguration(handle: ConnectionHandle, callback: (config: ConfigDescriptor) => void): void; + export function listInterfaces(handle: ConnectionHandle, callback: (descriptors: InterfaceDescriptor[]) => void): void; + export function claimInterface(handle: ConnectionHandle, interfaceNumber: number, callback: () => void): void; + export function releaseInterface(handle: ConnectionHandle, interfaceNumber: number, callback: () => void): void; + export function setInterfaceAlternateSetting(handle: ConnectionHandle, interfaceNumber: number, alternateSetting: number, callback: () => void): void; + export function controlTransfer(handle: ConnectionHandle, transferInfo: TransferInfo, callback: (info: TransferResultInfo) => void): void; + export function bulkTransfer(handle: ConnectionHandle, transferInfo: GenericTransferInfo, callback: (info: TransferResultInfo) => void): void; + export function interruptTransfer(handle: ConnectionHandle, transferInfo: GenericTransferInfo, callback: (info: TransferResultInfo) => void): void; + export function isochronousTransfer(handle: ConnectionHandle, transferInfo: { transferInfo: GenericTransferInfo, packets: number, packetLength: number }, callback: (info: TransferResultInfo) => void): void; + export function resetDevice(handle: ConnectionHandle, callback: (success: boolean) => void): void; + } + + + //////////////////// + // VPN Provider + //////////////////// + /** + * Use the chrome.vpnProvider API to implement a VPN client. + * Permissions: "vpnProvider" + * Important: This API works only on Chrome OS. + * @since Chrome 43. + */ + namespace vpnProvider { + interface VpnSessionParameters { + /** IP address for the VPN interface in CIDR notation. IPv4 is currently the only supported mode. */ + address: string; + /** Optional. Broadcast address for the VPN interface. (default: deduced from IP address and mask) */ + broadcastAddress?: string; + /** Optional. MTU setting for the VPN interface. (default: 1500 bytes) */ + mtu?: string; + /** + * Exclude network traffic to the list of IP blocks in CIDR notation from the tunnel. This can be used to bypass traffic to and from the VPN server. When many rules match a destination, the rule with the longest matching prefix wins. Entries that correspond to the same CIDR block are treated as duplicates. Such duplicates in the collated (exclusionList + inclusionList) list are eliminated and the exact duplicate entry that will be eliminated is undefined. + */ + exclusionList: string[]; + /** + * Include network traffic to the list of IP blocks in CIDR notation to the tunnel. This parameter can be used to set up a split tunnel. By default no traffic is directed to the tunnel. Adding the entry "0.0.0.0/0" to this list gets all the user traffic redirected to the tunnel. When many rules match a destination, the rule with the longest matching prefix wins. Entries that correspond to the same CIDR block are treated as duplicates. Such duplicates in the collated (exclusionList + inclusionList) list are eliminated and the exact duplicate entry that will be eliminated is undefined. + */ + inclusionList: string[]; + /** Optional. A list of search domains. (default: no search domain) */ + domainSearch?: string[]; + /** A list of IPs for the DNS servers. */ + dnsServer: string[]; + } + + interface VpnPlatformMessageEvent extends chrome.events.Event<(id: string, message: string, error: string) => void> { } + + interface VpnPacketReceptionEvent extends chrome.events.Event<(data: ArrayBuffer) => void> { } + + interface VpnConfigRemovalEvent extends chrome.events.Event<(id: string) => void> { } + + interface VpnConfigCreationEvent extends chrome.events.Event<(id: string, name: string, data: Object) => void> { } + + interface VpnUiEvent extends chrome.events.Event<(event: string, id?: string) => void> { } + + /** + * Creates a new VPN configuration that persists across multiple login sessions of the user. + * @param name The name of the VPN configuration. + * @param callback Called when the configuration is created or if there is an error. + * Parameter id: A unique ID for the created configuration, empty string on failure. + */ + export function createConfig(name: string, callback: (id: string) => void): void; + /** + * Destroys a VPN configuration created by the extension. + * @param id ID of the VPN configuration to destroy. + * @param callback Optional. Called when the configuration is destroyed or if there is an error. + */ + export function destroyConfig(id: string, callback?: Function): void; + /** + * Sets the parameters for the VPN session. This should be called immediately after "connected" is received from the platform. This will succeed only when the VPN session is owned by the extension. + * @param parameters The parameters for the VPN session. + * @param callback Called when the parameters are set or if there is an error. + */ + export function setParameters(parameters: VpnSessionParameters, callback: Function): void; + /** + * Sends an IP packet through the tunnel created for the VPN session. This will succeed only when the VPN session is owned by the extension. + * @param data The IP packet to be sent to the platform. + * @param callback Optional. Called when the packet is sent or if there is an error. + */ + export function sendPacket(data: ArrayBuffer, callback?: Function): void; + /** + * Notifies the VPN session state to the platform. This will succeed only when the VPN session is owned by the extension. + * @param state The VPN session state of the VPN client. + * connected: VPN connection was successful. + * failure: VPN connection failed. + * @param callback Optional. Called when the notification is complete or if there is an error. + */ + export function notifyConnectionStateChanged(state: string, callback?: Function): void; + + /** Triggered when a message is received from the platform for a VPN configuration owned by the extension. */ + export var onPlatformMessage: VpnPlatformMessageEvent; + /** Triggered when an IP packet is received via the tunnel for the VPN session owned by the extension. */ + export var onPacketReceived: VpnPacketReceptionEvent; + /** Triggered when a configuration created by the extension is removed by the platform. */ + export var onConfigRemoved: VpnConfigRemovalEvent; + /** Triggered when a configuration is created by the platform for the extension. */ + export var onConfigCreated: VpnConfigCreationEvent; + /** Triggered when there is a UI event for the extension. UI events are signals from the platform that indicate to the app that a UI dialog needs to be shown to the user. */ + export var onUIEvent: VpnUiEvent; + } + + //////////////////// + // Wallpaper + //////////////////// + /** + * Use the chrome.wallpaper API to change the ChromeOS wallpaper. + * Permissions: "wallpaper" + * Important: This API works only on Chrome OS. + * @since Chrome 43. + */ + namespace wallpaper { + interface WallpaperDetails { + /** Optional. The jpeg or png encoded wallpaper image. */ + data?: any; + /** Optional. The URL of the wallpaper to be set. */ + url?: string; + /** + * The supported wallpaper layouts. + * One of: "STRETCH", "CENTER", or "CENTER_CROPPED" + */ + layout: string; + /** The file name of the saved wallpaper. */ + filename: string; + /** Optional. True if a 128x60 thumbnail should be generated. */ + thumbnail?: boolean; + } + + /** + * Sets wallpaper to the image at url or wallpaperData with the specified layout + * @param callback + * Optional parameter thumbnail: The jpeg encoded wallpaper thumbnail. It is generated by resizing the wallpaper to 128x60. + */ + export function setWallpaper(details: WallpaperDetails, callback: (thumbnail: any) => void): void; + } + + + /////////////////// + // Webview Tag + /////////////////// + /** + * Use the webview tag to actively load live content from the web over the network and embed it in your Chrome App. Your app can control the appearance of the webview and interact with the web content, initiate navigations in an embedded web page, react to error events that happen within it, and more (see Usage). + */ + namespace webview { + /** Options that determine what data should be cleared by `clearData`. */ + interface ClearDataOptions { + /** Clear data accumulated on or after this date, represented in milliseconds since the epoch (accessible via the getTime method of the JavaScript Date object). If absent, defaults to 0 (which would remove all browsing data). */ + since?: number; + } + interface WindowEvent extends chrome.events.Event<() => void> { } + + interface ConsoleEvent extends Event { + /** + * @description The severity level of the log message. Ranges from 0 to 4. + * @type {number} + * @memberof ConsoleEvent + */ + level: number; + /** + * @description The logged message contents. + * @type {string} + * @memberof ConsoleEvent + */ + message: string; + /** + * @description The line number of the message source. + * @type {number} + * @memberof ConsoleEvent + */ + line: number; + /** + * @description A string identifying the resource which logged the message. + * @type {string} + * @memberof ConsoleEvent + */ + sourceId: string; + } + + interface ExitEvent extends Event { + /** + * @description Chrome's internal ID of the process that exited. + * @type {number} + * @memberof ExitEvent + */ + processID: number; + /** + * @description String indicating the reason for the exit. + * @type {string} + * @memberof ExitEvent + */ + reason: 'normal' | 'abnormal' | 'crash' | 'kill'; + } + + /** Description of a declarative rule for handling events. */ + interface Rule { + /** Optional priority of this rule. Defaults to 100. */ + priority?: number; + /** List of conditions that can trigger the actions. */ + conditions: any[]; + /** Optional. Optional identifier that allows referencing this rule. */ + id?: string; + /** List of actions that are triggered if one of the condtions is fulfilled. */ + actions: any[]; + /** + * @description Tags can be used to annotate rules and perform operations on sets of rules.¨ + * @since Chrome 28 + * @type {string[]} + * @memberof Rule + */ + tags?: string[]; + } + + /** + * @description Details of the script or CSS to inject. Either the code or the file property must be set, but both may not be set at the same time. + * @export + * @interface InjectDetails + */ + interface InjectDetails { + /** + * @description JavaScript or CSS code to inject.

Warning:
Be careful using the code parameter. Incorrect use of it may open your app to cross site scripting attacks. + * @type {string} + * @memberof InjectDetails + */ + code?: string, + /** + * @description JavaScript or CSS file to inject. + * @type {string} + * @memberof InjectDetails + */ + file?: string + } + + interface WebViewElementEventMap { + 'close': Event, + 'consolemessage': IConsolemessage, + 'contentload': Event, + 'dialog': IDialog, + 'exit': IExit, + 'findupdate': IFindupdate, + 'loadabort': ILoadabort, + 'loadcommit': ILoadcommit, + 'loadredirect': ILoadredirect, + 'loadstart': ILoadstart, + 'loadstop': Event, + 'newwindow': INewwindow, + 'permissionrequest': IPermissionrequest, + 'responsive': IResponsive, + 'sizechanged': ISizechanged, + 'unresponsive': IUnresponsive, + 'zoomchange': IZoomchange, + } + + + /** + * @description + * @export + * @interface HTMLWebViewElement + * @extends {Element} + */ + interface HTMLWebViewElement extends Element { + executeScript?: (details: InjectDetails, callback?: (result: any) => void) => void; + src: string; + contentWindow: Window; + addEventListener(type: K, listener: (this: HTMLWebViewElement, ev: WebViewElementEventMap[K]) => any, useCapture?: boolean): void; + } + + /**Options that determine what data should be cleared by clearData. */ + interface ClearDataOptions { + + /** + * @description Clear data accumulated on or after this date, represented in milliseconds since the epoch (accessible via the getTime method of the JavaScript Date object). If absent, defaults to 0 (which would remove all browsing data). + */ + since?: number; + } + /**A set of data types. Missing properties are interpreted as false. */ + interface ClearDataTypeSet { + + /** + * @description Websites' appcaches. + */ + appcache?: boolean + + /** + * @description Since Chrome 43. The browser's cache. Note: when removing data, this clears the entire cache; it is not limited to the range you specify. + */ + cache?: boolean + + /** + * @description The partition's cookies. + */ + cookies?: boolean + + /** + * @description The partition's session cookies. + */ + sessionCookies?: boolean + + /** + * @description The partition's persistent cookies. + */ + persistentCookies?: boolean + + /** + * @description Websites' filesystems. + */ + fileSystems?: boolean + + /** + * @description Websites' IndexedDB data. + */ + indexedDB?: boolean + + /** + * @description Websites' local storage data. + */ + localStorage?: boolean + + /** + * @description Websites' WebSQL data. + */ + webSQL?: boolean + } + /** + * The different contexts a menu can appear in. Specifying 'all' is equivalent to the combination of all other contexts. + * Enum values: + * "all" + * "page" + * "frame" + * "selection" + * "link" + * "editable" + * "image" + * "video" + * "audio" */ + export type ContextType = "all" | "page" | "frame" | "selection" | "link" | "editable" | "image" | "video" | "audio"; + /**Details of the script or CSS to inject. Either the code or the file property must be set, but both may not be set at the same time. */ + interface InjectDetails { + + /** + * @description JavaScript or CSS code to inject. Warning: Be careful using the code parameter. Incorrect use of it may open your app to cross site scripting attacks. + */ + code?: string + + /** + * @description JavaScript or CSS file to inject. + */ + file?: string + } + /**The type of injection item: code or a set of files. */ + interface InjectionItems { + + /** + * @description JavaScript code or CSS to be injected into matching pages. + */ + code?: string + + /** + * @description The list of JavaScript or CSS files to be injected into matching pages. These are injected in the order they appear in this array. + */ + files?: any[] + } + /**Details of the content script to inject. Refer to the content scripts documentation for more details. */ + interface ContentScriptDetails { + + /** + * @description The name of the content script to inject. + */ + name: string + + /** + * @description Specifies which pages this content script will be injected into. + */ + matches: any[] + + /** + * @description Excludes pages that this content script would otherwise be injected into. + */ + exclude_matches?: any[] + + /** + * @description Whether to insert the content script on about:blank and about:srcdoc. Content scripts will only be injected on pages when their inherit URL is matched by one of the declared patterns in the matches field. The inherit URL is the URL of the document that created the frame or window. Content scripts cannot be inserted in sandboxed frames. + */ + match_about_blank?: boolean + + /** + * @description The CSS code or a list of CSS files to be injected into matching pages. These are injected in the order they appear, before any DOM is constructed or displayed for the page. + */ + css?: InjectionItems + + /** + * @description The JavaScript code or a list of JavaScript files to be injected into matching pages. These are injected in the order they appear. + */ + js?: InjectionItems + + /** + * @description The soonest that the JavaScript or CSS will be injected into the tab. Defaults to "document_idle". + */ + run_at?: chrome.extensionTypes.RunAt; + + /** + * @description If all_frames is true, this implies that the JavaScript or CSS should be injected into all frames of current page. By default, all_frames is false and the JavaScript or CSS is only injected into the top frame. + */ + all_frames?: boolean; + + /** + * @description Applied after matches to include only those URLs that also match this glob. Intended to emulate the @include Greasemonkey keyword. + */ + include_globs?: string[]; + + /** + * @description Applied after matches to exclude URLs that match this glob. Intended to emulate the @exclude Greasemonkey keyword. + */ + exclude_globs?: string[]; + } + /**@todo Add documentation */ + interface ContextMenuCreateProperties { + + /** + * @description The type of menu item. Defaults to 'normal' if not specified. + */ + type?: chrome.contextMenus.ItemType + + /** + * @description The unique ID to assign to this item. Mandatory for event pages. Cannot be the same as another ID for this extension. + */ + id?: string + + /** + * @description The text to be displayed in the item; this is required unless type is 'separator'. When the context is 'selection', you can use %s within the string to show the selected text. For example, if this parameter's value is "Translate '%s' to Pig Latin" and the user selects the word "cool", the context menu item for the selection is "Translate 'cool' to Pig Latin". + */ + title?: string + + /** + * @description The initial state of a checkbox or radio item: true for selected and false for unselected. Only one radio item can be selected at a time in a given group of radio items. + */ + checked?: boolean + + /** + * @description List of contexts this menu item will appear in. Defaults to ['page'] if not specified. + */ + contexts?: any[] + + /** + * @description A function that will be called back when the menu item is clicked. + * @param {any} [object Object] + */ + onclick?: (info: any) => void + + /** + * @description The ID of a parent menu item; this makes the item a child of a previously added item. + */ + parentId?: number | string + + /** + * @description Lets you restrict the item to apply only to documents whose URL matches one of the given patterns. (This applies to frames as well.) For details on the format of a pattern, see Match Patterns. + */ + documentUrlPatterns?: any[] + + /** + * @description Similar to documentUrlPatterns, but lets you filter based on the src attribute of img/audio/video tags and the href of anchor tags. + */ + targetUrlPatterns?: any[] + + /** + * @description Whether this context menu item is enabled or disabled. Defaults to true. + */ + enabled?: boolean + } + /**@todo Add documentation */ + interface ContextMenuUpdateProperties { + + /** + * @description The type of menu item. + */ + type?: chrome.webview.ContextType; + + /** + * @description The text to be displayed in the item + */ + title?: string + + /** + * @description The state of a checkbox or radio item: true for selected and false for unselected. Only one radio item can be selected at a time in a given group of radio items. + */ + checked?: boolean + + /** + * @description List of contexts this menu item will appear in. + */ + contexts?: any[] + + /** + * @description A function that will be called back when the menu item is clicked. + * @param {any} [object Object] + */ + onclick?: (info: any) => void + + /** + * @description The ID of a parent menu item; this makes the item a child of a previously added item. Note: You cannot change an item to be a child of one of its own descendants. + */ + parentId?: number | string + + /** + * @description Lets you restrict the item to apply only to documents whose URL matches one of the given patterns. (This applies to frames as well.) For details on the format of a pattern, see Match Patterns. + */ + documentUrlPatterns?: any[] + + /** + * @description Similar to documentUrlPatterns, but lets you filter based on the src attribute of img/audio/video tags and the href of anchor tags. + */ + targetUrlPatterns?: any[] + + /** + * @description Whether this context menu item is enabled or disabled. + */ + enabled?: boolean + } + interface ContextMenus { + + /** + * @description Creates a new context menu item. Note that if an error occurs during creation, you may not find out until the creation callback fires (the details will be in chrome.runtime.lastError). + * @param {object} createProperties The properties used to create the item + * @param {any} [object Object] + */ + create(createProperties: object, callback?: () => void): void; + + /** + * @description Updates a previously created context menu item. + * @param {any} id The ID of the item to update. + * @param {object} updateProperties The properties to update. Accepts the same values as the create function. + * @param {any} [object Object] + */ + update(id: number | string, updateProperties: object, callback?: () => void): void; + + /** + * @description Removes a context menu item. + * @param {any} menuItemId The ID of the context menu item to remove. + * @param {any} [object Object] + */ + remove(menuItemId: number | string, callback?: () => void): void; + + /** + * @description Removes all context menu items added to this webview. + * @param {any} [object Object] + */ + removeAll(callback?: () => void): void; + + + /** + * @description Fired before showing a context menu on this webview. Can be used to disable this context menu by calling event.preventDefault(). + */ + onShow: chrome.events.Event; + + } + interface IOnShowEvent { + /** + * @description Call this to prevent showing the context menu. + * @memberof IOnShowEvent + */ + preventDefault: () => void; + } + interface ContentWindow { + + /** + * @description

Posts a message to the embedded web content as long as the embedded content is displaying a page from the target origin. This method is available once the page has completed loading. Listen for the contentload event and then call the method.

The guest will be able to send replies to the embedder by posting message to event.source on the message event it receives.

This API is identical to the HTML5 postMessage API for communication between web pages. The embedder may listen for replies by adding a message event listener to its own frame.

+ * @param {any} message Message object to send to the guest. + * @param {string} targetOrigin Specifies what the origin of the guest window must be for the event to be dispatched. + */ + postMessage(message: any, targetOrigin: string): void; + + } + interface DialogController { + + /** + * @description Accept the dialog. Equivalent to clicking OK in an alert, confirm, or prompt dialog. + * @param {string} response The response string to provide to the guest when accepting a prompt dialog. + */ + ok(response?: string): void; + + /** + * @description Reject the dialog. Equivalent to clicking Cancel in a confirm or prompt dialog. + */ + cancel(): void; + + } + /**Contains all of the results of the find request. */ + interface FindCallbackResults { + + /** + * @description The number of times searchText was matched on the page. + */ + numberOfMatches: number + + /** + * @description The ordinal number of the current match. + */ + activeMatchOrdinal: number + + /** + * @description Describes a rectangle around the active match in screen coordinates. + */ + selectionRect: SelectionRect + + /** + * @description Indicates whether this find request was canceled. + */ + canceled: boolean + } + /**Options for the find request. */ + interface FindOptions { + + /** + * @description Flag to find matches in reverse order. The default value is false. + */ + backward?: boolean + + /** + * @description Flag to match with case-sensitivity. The default value is false. + */ + matchCase?: boolean + } + interface NewWindow { + + /** + * @description Attach the requested target page to an existing webview element. + * @param {object} webview The webview element to which the target page should be attached. + */ + attach(webview: object): void; + + /** + * @description Cancel the new window request. + */ + discard(): void; + + } + interface MediaPermissionRequest { + + /** + * @description Allow the permission request. + */ + allow(): void; + + /** + * @description Deny the permission request. This is the default behavior if allow is not called. + */ + deny(): void; + + } + interface GeolocationPermissionRequest { + + /** + * @description Allow the permission request. + */ + allow(): void; + + /** + * @description Deny the permission request. This is the default behavior if allow is not called. + */ + deny(): void; + + } + interface PointerLockPermissionRequest { + + /** + * @description Allow the permission request. + */ + allow(): void; + + /** + * @description Deny the permission request. This is the default behavior if allow is not called. + */ + deny(): void; + + } + interface DownloadPermissionRequest { + + /** + * @description Allow the permission request. + */ + allow(): void; + + /** + * @description Deny the permission request. This is the default behavior if allow is not called. + */ + deny(): void; + + } + interface FileSystemPermissionRequest { + + /** + * @description Allow the permission request. + */ + allow(): void; + + /** + * @description Deny the permission request. + */ + deny(): void; + + } + interface FullscreenPermissionRequest { + + /** + * @description Allow the permission request. + */ + allow(): void; + + /** + * @description Deny the permission request. + */ + deny(): void; + + } + interface LoadPluginPermissionRequest { + + /** + * @description Allow the permission request. This is the default behavior if deny is not called.. + */ + allow(): void; + + /** + * @description Deny the permission request. + */ + deny(): void; + + } + /**

Describes a rectangle in screen coordinates.

The containment semantics are array-like; that is, the coordinate (left, top) is considered to be contained by the rectangle, but the coordinate (left + width, top) is not.

*/ + interface SelectionRect { + + /** + * @description Distance from the left edge of the screen to the left edge of the rectangle. + */ + left: number + + /** + * @description Distance from the top edge of the screen to the top edge of the rectangle. + */ + top: number + + /** + * @description Width of the rectangle. + */ + width: number + + /** + * @description Height of the rectangle. + */ + height: number + } + /**Interface which provides access to webRequest events on the guest page. See the chrome.webRequest extensions API for details on webRequest life cycle and related concepts.

To illustrate how usage differs from the extensions webRequest API, consider the following example code which blocks any guest requests for URLs which match *://www.evil.com/*:

webview.request.onBeforeRequest.addListener(
+          function(details) { return {cancel: true}; },
+          {urls: ["*://www.evil.com/*"]},
+          ["blocking"]);

Additionally, this interface supports declarative webRequest rules through onRequest and onMessage events. See declarativeWebRequest for API details.

Note that conditions and actions for declarative webview webRequests should be instantiated from their chrome.webViewRequest.* counterparts. The following example code declaratively blocks all requests to "example.com" on the webview myWebview:

var rule = {
+          conditions: [
+            new chrome.webViewRequest.RequestMatcher({ url: { hostSuffix: 'example.com' } })
+          ],
+          actions: [ new chrome.webViewRequest.CancelRequest() ]
+        };
+        myWebview.request.onRequest.addRules([rule]);
*/ + interface WebRequestEventInterface { + } + /** + * Defines the how zooming is handled in the webview. + * Enum values: + * "per-origin" + * * Zoom changes will persist in the zoomed page's origin, i.e. all other webviews in the same partition that are navigated to that same origin will be zoomed as well. Moreover, per-origin zoom changes are saved with the origin, meaning that when navigating to other pages in the same origin, they will all be zoomed to the same zoom factor. + * "per-view" + * * Zoom changes only take effect in this webview, and zoom changes in other webviews will not affect the zooming of this webview. Also, per-view zoom changes are reset on navigation; navigating a webview will always load pages with their per-origin zoom factors (within the scope of the partition). + * "disabled" + * * Disables all zooming in the webview. The content will revert to the default zoom level, and all attempted zoom changes will be ignored. */ + export type ZoomMode = "per-origin" | "per-view" | "disabled"; + + /** + * @description Queries audio state. + * @param {any} [object Object] + */ + export function getAudioState(callback: (audible: boolean) => void): void; + + /** + * @description Sets audio mute state of the webview. + * @param {boolean} mute Mute audio value + */ + export function setAudioMuted(mute: boolean): void; + + /** + * @description Queries whether audio is muted. + * @param {any} [object Object] + */ + export function isAudioMuted(callback: (muted: boolean) => void): void; + + /** + * @description Captures the visible region of the webview. + * @param {(dataUrl: string) => void} callback A data URL which encodes an image of the visible area of the captured tab. May be assigned to the 'src' property of an HTML Image element for display. + */ + export function captureVisibleRegion(callback: (dataUrl: string) => void): void; + /** + * @description Captures the visible region of the webview. + * @param {*} options + * @param {(dataUrl: string) => void} callback + */ + export function captureVisibleRegion(options: chrome.extensionTypes.ImageDetails, callback: (dataUrl: string) => void): void; + + /** + * @description

Adds content script injection rules to the webview. When the webview navigates to a page matching one or more rules, the associated scripts will be injected. You can programmatically add rules or update existing rules.

The following example adds two rules to the webview: 'myRule' and 'anotherRule'.

webview.addContentScripts([
+          {
+            name: 'myRule',
+            matches: ['http://www.foo.com/*'],
+            css: { files: ['mystyles.css'] },
+            js: { files: ['jquery.js', 'myscript.js'] },
+            run_at: 'document_start'
+          },
+          {
+            name: 'anotherRule',
+            matches: ['http://www.bar.com/*'],
+            js: { code: "document.body.style.backgroundColor = 'red';" },
+            run_at: 'document_end'
+          }]);
+         ...
+
+        // Navigates webview.
+        webview.src = 'http://www.foo.com';

You can defer addContentScripts call until you needs to inject scripts.

The following example shows how to overwrite an existing rule.

webview.addContentScripts([{
+            name: 'rule',
+            matches: ['http://www.foo.com/*'],
+            js: { files: ['scriptA.js'] },
+            run_at: 'document_start'}]);
+
+        // Do something.
+        webview.src = 'http://www.foo.com/*';
+         ...
+        // Overwrite 'rule' defined before.
+        webview.addContentScripts([{
+            name: 'rule',
+            matches: ['http://www.bar.com/*'],
+            js: { files: ['scriptB.js'] },
+            run_at: 'document_end'}]);

If webview has been naviagted to the origin (e.g., foo.com) and calls webview.addContentScripts to add 'myRule', you need to wait for next navigation to make the scripts injected. If you want immediate injection, executeScript will do the right thing.

Rules are preserved even if the guest process crashes or is killed or even if the webview is reparented.

Refer to the content scripts documentation for more details.

+ * @param {ContentScriptDetails[]} contentScriptList Details of the content scripts to add. + */ + export function addContentScripts(contentScriptList: ContentScriptDetails[]): void; + + /** + * @description Navigates backward one history entry if possible. Equivalent to go(-1). + * @param {(success: boolean) => void} [callback] Called after the navigation has either failed or completed successfully. Success parameter indicates whether the navigation was successful. + */ + export function back(callback?: (success: boolean) => void): void; + + /** + * @description Indicates whether or not it is possible to navigate backward through history. The state of this function is cached, and updated before each loadcommit, so the best place to call it is on loadcommit. + */ + export function canGoBack(): void; + + /** + * @description Indicates whether or not it is possible to navigate forward through history. The state of this function is cached, and updated before each loadcommit, so the best place to call it is on loadcommit. + */ + export function canGoForward(): void; + + /** + * @description

Clears browsing data for the webview partition.

+ * @param {any} options Options determining which data to clear. + * @param {any} types The types of data to be cleared. + * @param {any} [object Object] + */ + export function clearData(options: ClearDataOptions, types: ClearDataTypeSet, callback?: () => void): void; + + /** + * @description

Injects JavaScript code into the guest page.

The following sample code uses script injection to set the guest page's background color to red:

webview.executeScript({ code: "document.body.style.backgroundColor = 'red'" });
+ * @param {any} details Details of the script to run. + * @param {any} [object Object] + */ + export function executeScript(details: InjectDetails, callback?: (result?: any[]) => void): void; + + /** + * @description Initiates a find-in-page request. + * @param {string} searchText The string to find in the page. + * @param {any} options Options for the find request. + * @param {any} [object Object] + */ + export function find(searchText: string, options?: FindOptions, callback?: (results?: any) => void): void; + + /** + * @description Navigates forward one history entry if possible. Equivalent to go(1). + * @param {any} [object Object] + */ + export function forward(callback?: (success: boolean) => void): void; + + /** + * @description Returns Chrome's internal process ID for the guest web page's current process, allowing embedders to know how many guests would be affected by terminating the process. Two guests will share a process only if they belong to the same app and have the same storage partition ID. The call is synchronous and returns the embedder's cached notion of the current process ID. The process ID isn't the same as the operating system's process ID. + */ + export function getProcessId(): void; + + /** + * @description Returns the user agent string used by the webview for guest page requests. + */ + export function getUserAgent(): void; + + /** + * @description Gets the current zoom factor. + * @param {any} [object Object] + */ + export function getZoom(callback: (zoomFactor: number) => void): void; + + /** + * @description Gets the current zoom mode. + * @param {any} [object Object] + */ + export function getZoomMode(callback: (ZoomMode: any) => void): void; + + /** + * @description Navigates to a history entry using a history index relative to the current navigation. If the requested navigation is impossible, this method has no effect. + * @param {number} relativeIndex Relative history index to which the webview should be navigated. For example, a value of 2 will navigate forward 2 history entries if possible; a value of -3 will navigate backward 3 entries. + * @param {any} [object Object] + */ + export function go(relativeIndex: number, callback?: (success: boolean) => void): void; + + /** + * @description Injects CSS into the guest page. + * @param {any} details Details of the CSS to insert. + * @param {any} [object Object] + */ + export function insertCSS(details: InjectDetails, callback?: () => void): void; + + /** + * @description Indicates whether or not the webview's user agent string has been overridden by $(ref:webviewTag.setUserAgentOverride). + */ + export function isUserAgentOverridden(): void; + + /** + * @description Prints the contents of the webview. This is equivalent to calling scripted print function from the webview itself. + */ + export function print(): void; + + /** + * @description Reloads the current top-level page. + */ + export function reload(): void; + + /** + * @description

Removes content scripts from a webview.

The following example removes "myRule" which was added before.

webview.removeContentScripts(['myRule']);

You can remove all the rules by calling:

webview.removeContentScripts();
+ * @param {any[]} scriptNameList A list of names of content scripts that will be removed. If the list is empty, all the content scripts added to the webview will be removed. + */ + export function removeContentScripts(scriptNameList?: any[]): void; + + /** + * @description Override the user agent string used by the webview for guest page requests. + * @param {string} userAgent The user agent string to use. + */ + export function setUserAgentOverride(userAgent: string): void; + + /** + * @description Changes the zoom factor of the page. The scope and persistence of this change are determined by the webview's current zoom mode (see $(ref:webviewTag.ZoomMode)). + * @param {number} zoomFactor The new zoom factor. + * @param {any} [object Object] + */ + export function setZoom(zoomFactor: number, callback?: () => void): void; + + /** + * @description Sets the zoom mode of the webview. + * @param {any} ZoomMode Defines how zooming is handled in the webview. + * @param {any} [object Object] + */ + export function setZoomMode(ZoomMode: ZoomMode, callback?: () => void): void; + + /** + * @description Stops loading the current webview navigation if in progress. + */ + export function stop(): void; + + /** + * @description Ends the current find session (clearing all highlighting) and cancels all find requests in progress. + * @param {string} action Determines what to do with the active match after the find session has ended. clear will clear the highlighting over the active match; keep will keep the active match highlighted; activate will keep the active match highlighted and simulate a user click on that match. The default action is keep. + */ + export function stopFinding(action?: string): void; + + /** + * @description Loads a data URL with a specified base URL used for relative links. Optionally, a virtual URL can be provided to be shown to the user instead of the data URL. + * @param {string} dataUrl The data URL to load. + * @param {string} baseUrl The base URL that will be used for relative links. + * @param {string} virtualUrl The URL that will be displayed to the user (in the address bar). + */ + export function loadDataWithBaseUrl(dataUrl: string, baseUrl: string, virtualUrl?: string): void; + + /** + * @description Forcibly kills the guest web page's renderer process. This may affect multiple webview tags in the current app if they share the same process, but it will not affect webview tags in other apps. + */ + export function terminate(): void; + + /** + * @description Fired when the guest window attempts to close itself.

The following example code navigates the webview to about:blank when the guest attempts to close itself.

webview.addEventListener('close', function() {
+          webview.src = 'about:blank';
+        });
+ */ + + export function close(event: chrome.events.Event): void; + + /** + * @description Fired when the guest window logs a console message.

The following example code forwards all log messages to the embedder's console without regard for log level or other properties.

webview.addEventListener('consolemessage', function(e) {
+          console.log('Guest page logged a message: ', e.message);
+        });
+ * @param {any} [object Object] + */ + + export var consolemessage: chrome.events.Event; + + /** + * @description Fired when the guest window fires a load event, i.e., when a new document is loaded. This does not include page navigation within the current document or asynchronous resource loads.

The following example code modifies the default font size of the guest's body element after the page loads:

webview.addEventListener('contentload', function() {
+          webview.executeScript({ code: 'document.body.style.fontSize = "42px"' });
+        });
+ */ + + export var contentload: (event: chrome.events.Event) => void; + + /** + * @description Fired when the guest window attempts to open a modal dialog via window.alert, window.confirm, or window.prompt.

Handling this event will block the guest process until each event listener returns or the dialog object becomes unreachable (if preventDefault() was called.)

The default behavior is to cancel the dialog.

+ * @param {any} [object Object] + */ + + export var dialog: chrome.events.Event; + + /** + * @description Fired when the process rendering the guest web content has exited.

The following example code will show a farewell message whenever the guest page crashes:

webview.addEventListener('exit', function(e) {
+          if (e.reason === 'crash') {
+            webview.src = 'data:text/plain,Goodbye, world!';
+          }
+        });
+ * @param {any} [object Object] + */ + + export var exit: chrome.events.Event; + + /** + * @description Fired when new find results are available for an active find request. This might happen multiple times for a single find request as matches are found. + * @param {any} [object Object] + */ + + export var findupdate: chrome.events.Event; + + /** + * @description Fired when a top-level load has aborted without committing. An error message will be printed to the console unless the event is default-prevented.

Note: When a resource load is aborted, a loadabort event will eventually be followed by a loadstop event, even if all committed loads since the last loadstop event (if any) were aborted.

Note: When the load of either an about URL or a JavaScript URL is aborted, loadabort will be fired and then the webview will be navigated to 'about:blank'.

+ * @param {any} [object Object] + */ + + export var loadabort: chrome.events.Event; + + /** + * @description Fired when a load has committed. This includes navigation within the current document as well as subframe document-level loads, but does not include asynchronous resource loads. + * @param {any} [object Object] + */ + + export var loadcommit: chrome.events.Event; + + /** + * @description Fired when a top-level load request has redirected to a different URL. + * @param {any} [object Object] + */ + + export var loadredirect: chrome.events.Event; + + /** + * @description Fired when a load has begun. + * @param {any} [object Object] + */ + + export var loadstart: chrome.events.Event; + + /** + * @description Fired when all frame-level loads in a guest page (including all its subframes) have completed. This includes navigation within the current document as well as subframe document-level loads, but does not include asynchronous resource loads. This event fires every time the number of document-level loads transitions from one (or more) to zero. For example, if a page that has already finished loading (i.e., loadstop already fired once) creates a new iframe which loads a page, then a second loadstop will fire when the iframe page load completes. This pattern is commonly observed on pages that load ads.

Note: When a committed load is aborted, a loadstop event will eventually follow a loadabort event, even if all committed loads since the last loadstop event (if any) were aborted.

+ */ + + export function loadstop(event: chrome.events.Event): void; + + /** + * @description Fired when the guest page attempts to open a new browser window.

The following example code will create and navigate a new webview in the embedder for each requested new window:

webview.addEventListener('newwindow', function(e) {
+          var newWebview = document.createElement('webview');
+          document.body.appendChild(newWebview);
+          e.window.attach(newWebview);
+        });
+ * @param {any} [object Object] + */ + + export var newwindow: chrome.events.Event; + + /** + * @description Fired when the guest page needs to request special permission from the embedder.

The following example code will grant the guest page access to the webkitGetUserMedia API. Note that an app using this example code must itself specify audioCapture and/or videoCapture manifest permissions:

webview.addEventListener('permissionrequest', function(e) {
+          if (e.permission === 'media') {
+            e.request.allow();
+          }
+        });
+ * @param {any} [object Object] + */ + + export var permissionrequest: chrome.events.Event; + + /** + * @description Fired when the process rendering the guest web content has become responsive again after being unresponsive.

The following example code will fade the webview element in or out as it becomes responsive or unresponsive:

webview.style.webkitTransition = 'opacity 250ms';
+        webview.addEventListener('unresponsive', function() {
+          webview.style.opacity = '0.5';
+        });
+        webview.addEventListener('responsive', function() {
+          webview.style.opacity = '1';
+        });
+ * @param {any} [object Object] + */ + + export var responsive: chrome.events.Event; + + /** + * @description Fired when the embedded web content has been resized via autosize. Only fires if autosize is enabled. + * @param {any} [object Object] + */ + + export var sizechanged: chrome.events.Event; + + /** + * @description Fired when the process rendering the guest web content has become unresponsive. This event will be generated once with a matching responsive event if the guest begins to respond again. + * @param {any} [object Object] + */ + + export var unresponsive: chrome.events.Event; + + /** + * @description Fired when the page's zoom changes. + * @param {any} [object Object] + */ + + export var zoomchange: chrome.events.Event; + /**IConsolemessage (Auto generated interface) */ + interface IConsolemessage { + + /** + * @description The severity level of the log message. Ranges from -1 to 2. LOG_VERBOSE (console.debug) = -1, LOG_INFO (console.log, console.info) = 0, LOG_WARNING (console.warn) = 1, LOG_ERROR (console.error) = 2. + */ + level: number + + /** + * @description The logged message contents. + */ + message: string + + /** + * @description The line number of the message source. + */ + line: number + + /** + * @description A string identifying the resource which logged the message. + */ + sourceId: string + } + /**IDialog (Auto generated interface) */ + interface IDialog { + + /** + * @description The type of modal dialog requested by the guest. + */ + messageType: 'alert' | 'confirm' | 'prompt' + + /** + * @description The text the guest attempted to display in the modal dialog. + */ + messageText: string + + /** + * @description An interface that can be used to respond to the guest's modal request. + */ + dialog: DialogController + } + /**IExit (Auto generated interface) */ + interface IExit { + + /** + * @description Chrome's internal ID of the process that exited. + */ + processID: number + + /** + * @description String indicating the reason for the exit. + */ + reason: 'normal' | 'abnormal' | 'crash' | 'kill' + } + /**IFindupdate (Auto generated interface) */ + interface IFindupdate { + + /** + * @description The string that is being searched for in the page. + */ + searchText: string + + /** + * @description The number of matches found for searchText on the page so far. + */ + numberOfMatches: number + + /** + * @description The ordinal number of the current active match, if it has been found. This will be 0 until then. + */ + activeMatchOrdinal: number + + /** + * @description Describes a rectangle around the active match, if it has been found, in screen coordinates. + */ + selectionRect: SelectionRect + + /** + * @description Indicates whether the find request was canceled. + */ + canceled: boolean + + /** + * @description Indicates that all find requests have completed and that no more findupdate events will be fired until more find requests are made. + */ + finalUpdate: string + } + /**ILoadabort (Auto generated interface) */ + interface ILoadabort { + + /** + * @description Requested URL. + */ + url: string + + /** + * @description Whether the load was top-level or in a subframe. + */ + isTopLevel: boolean + + /** + * @description Unique integer ID for the type of abort. Note that this ID is not guaranteed to remain backwards compatible between releases. You must not act based upon this specific integer. + */ + code: number + + /** + * @description String indicating what type of abort occurred. This string is not guaranteed to remain backwards compatible between releases. You must not parse and act based upon its content. It is also possible that, in some cases, an error not listed here could be reported. + */ + reason: 'ERR_ABORTED' | 'ERR_INVALID_URL' | 'ERR_DISALLOWED_URL_SCHEME' | 'ERR_BLOCKED_BY_CLIENT' | 'ERR_ADDRESS_UNREACHABLE' | 'ERR_EMPTY_RESPONSE' | 'ERR_FILE_NOT_FOUND' | 'ERR_UNKNOWN_URL_SCHEME' + } + /**ILoadcommit (Auto generated interface) */ + interface ILoadcommit { + + /** + * @description The URL that committed. + */ + url: string + + /** + * @description Whether the load is top-level or in a subframe. + */ + isTopLevel: boolean + } + /**ILoadredirect (Auto generated interface) */ + interface ILoadredirect { + + /** + * @description The requested URL before the redirect. + */ + oldUrl: string + + /** + * @description The new URL after the redirect. + */ + newUrl: string + + /** + * @description Whether or not the redirect happened at top-level or in a subframe. + */ + isTopLevel: boolean + } + /**ILoadstart (Auto generated interface) */ + interface ILoadstart { + + /** + * @description Requested URL. + */ + url: string + + /** + * @description Whether the load is top-level or in a subframe. + */ + isTopLevel: boolean + } + /**INewwindow (Auto generated interface) */ + interface INewwindow { + + /** + * @description An interface that can be used to either attach the requested target page to an existing webview element or explicitly discard the request. + */ + window: NewWindow + + /** + * @description The target URL requested for the new window. + */ + targetUrl: string + + /** + * @description The initial width requested for the new window. + */ + initialWidth: number + + /** + * @description The initial height requested for the new window. + */ + initialHeight: number + + /** + * @description The requested name of the new window. + */ + name: string + + /** + * @description The requested disposition of the new window. + */ + windowOpenDisposition: 'ignore' | 'save_to_disk' | 'current_tab' | 'new_background_tab' | 'new_foreground_tab' | 'new_window' | 'new_popup' + } + /**IPermissionrequest (Auto generated interface) */ + interface IPermissionrequest { + + /** + * @description The type of permission being requested. + */ + permission: 'media' | 'geolocation' | 'pointerLock' | 'download' | 'loadplugin' | 'filesystem' | 'fullscreen' + + /** + * @description An object which holds details of the requested permission. Depending on the type of permission requested, this may be a $(ref:webviewTag.MediaPermissionRequest), $(ref:webviewTag.GeolocationPermissionRequest), $(ref:webviewTag.PointerLockPermissionRequest), $(ref:webviewTag.DownloadPermissionRequest), $(ref:webviewTag.LoadPluginPermissionRequest), or $(ref:webviewTag.FullscreenPermissionRequest). + */ + request: object + } + /**IResponsive (Auto generated interface) */ + interface IResponsive { + + /** + * @description Chrome's internal ID of the process that became responsive. + */ + processID: number + } + /**ISizechanged (Auto generated interface) */ + interface ISizechanged { + + /** + * @description Old width of embedded web content. + */ + oldWidth: number + + /** + * @description Old height of embedded web content. + */ + oldHeight: number + + /** + * @description New width of embedded web content. + */ + newWidth: number + + /** + * @description New height of embedded web content. + */ + newHeight: number + } + /**IUnresponsive (Auto generated interface) */ + interface IUnresponsive { + + /** + * @description Chrome's internal ID of the process that has become unresponsive. + */ + processID: number + } + /**IZoomchange (Auto generated interface) */ + interface IZoomchange { + + /** + * @description The page's previous zoom factor. + */ + oldZoomFactor: number + + /** + * @description The new zoom factor that the page was zoomed to. + */ + newZoomFactor: number + } + + } + +} + +///////////////////// +// EXPORT +///////////////////// +interface Window { + chrome: typeof chrome; +} diff --git a/types/chrome/test/chrome-app.ts b/types/chrome-apps/test/index.ts similarity index 97% rename from types/chrome/test/chrome-app.ts rename to types/chrome-apps/test/index.ts index 6dbd06d9e2..f976fc57b4 100644 --- a/types/chrome/test/chrome-app.ts +++ b/types/chrome-apps/test/index.ts @@ -1,5 +1,3 @@ - - import runtime = chrome.app.runtime; import cwindow = chrome.app.window; @@ -44,7 +42,7 @@ var visibleEverywhere: boolean = chrome.app.window.canSetVisibleOnAllWorkspaces( function test_fileSystem(): void { var accepts: chrome.fileSystem.AcceptOptions[] = [ - {mimeTypes: ["text/*"], extensions: ['js', 'css', 'txt', 'html', 'xml', 'tsv', 'csv', 'rtf']} + { mimeTypes: ["text/*"], extensions: ['js', 'css', 'txt', 'html', 'xml', 'tsv', 'csv', 'rtf'] } ]; var chooseOption: chrome.fileSystem.ChooseEntryOptions = { type: "openFile", @@ -58,13 +56,13 @@ function test_fileSystem(): void { var retainedId = chrome.fileSystem.retainEntry(entry); chrome.fileSystem.isRestorable(retainedId, (isRestorable: boolean) => { - if(isRestorable){ + if (isRestorable) { chrome.fileSystem.restoreEntry(retainedId, (restoredEntry: Entry) => { }); } }); - chrome.fileSystem.getWritableEntry(entry, (writableEntry: Entry) => {}); - chrome.fileSystem.isWritableEntry(entry, (isWritable: boolean) => {}); + chrome.fileSystem.getWritableEntry(entry, (writableEntry: Entry) => { }); + chrome.fileSystem.isWritableEntry(entry, (isWritable: boolean) => { }); }); } @@ -325,3 +323,6 @@ function testSystemNetwork() { } }); } + +import webview = chrome.webview; +let element: webview.HTMLWebViewElement; diff --git a/types/chrome-apps/tsconfig.json b/types/chrome-apps/tsconfig.json new file mode 100644 index 0000000000..50a50c3193 --- /dev/null +++ b/types/chrome-apps/tsconfig.json @@ -0,0 +1,24 @@ +{ + "compilerOptions": { + "module": "commonjs", + "lib": [ + "es2017", + "dom" + ], + "noImplicitAny": true, + "noImplicitThis": true, + "strictNullChecks": true, + "strictFunctionTypes": true, + "baseUrl": "../", + "typeRoots": [ + "../" + ], + "types": [], + "noEmit": true, + "forceConsistentCasingInFileNames": true + }, + "files": [ + "index.d.ts", + "test/index.ts" + ] +} diff --git a/types/ids/tslint.json b/types/chrome-apps/tslint.json similarity index 100% rename from types/ids/tslint.json rename to types/chrome-apps/tslint.json diff --git a/types/chrome/chrome-app.d.ts b/types/chrome/chrome-app.d.ts deleted file mode 100644 index 65d80f3290..0000000000 --- a/types/chrome/chrome-app.d.ts +++ /dev/null @@ -1,1503 +0,0 @@ -// Type definitions for Chrome packaged application development -// Project: http://developer.chrome.com/apps/ -// Definitions by: Adam Lay , MIZUNE Pine , MIZUSHIMA Junki , Ingvar Stepanyan , Adam Pyle , Nikolai Ommundsen -// Definitions: https://github.com/DefinitelyTyped/DefinitelyTyped - -/// -/// - -//////////////////// -// App -//////////////////// -declare namespace chrome.app { - export interface AppDetails extends chrome.runtime.Manifest { - id: string; - } - - export function getDetails(): AppDetails; -} - -//////////////////// -// App Runtime -//////////////////// -declare namespace chrome.app.runtime { - enum LaunchSource { - "untracked" = "untracked", - "app_launcher" = "app_launcher", - "new_tab_page" = "new_tab_page", - "reload" = "reload", - "restart" = "restart", - "load_and_launch" = "load_and_launch", - "command_line" = "command_line", - "file_handler" = "file_handler", - "url_handler" = "url_handler", - "system_tray" = "system_tray", - "about_page" = "about_page", - "keyboard" = "keyboard", - "extensions_page" = "extensions_page", - "management_api" = "management_api", - "ephemeral_app" = "ephemeral_app", - "background" = "background", - "kiosk" = "kiosk", - "chrome_internal" = "chrome_internal", - "test" = "test", - "installed_notification" = "installed_notification", - "context_menu" = "context_menu", - } - - interface LaunchData { - id?: string; - items?: LaunchDataItem[]; - url?: string; - referrerUrl?: string; - isKioskSession?: boolean; - isPublicSession?: boolean; - source?: LaunchSource; - actionData?: {}; - } - - export interface LaunchDataItem { - entry: FileEntry; - type: string; - } - - export interface LaunchedEvent extends chrome.events.Event<(launchData: LaunchData) => void> { } - - export interface RestartedEvent extends chrome.events.Event<() => void> { } - - export var onLaunched: LaunchedEvent; - export var onRestarted: RestartedEvent; -} - -//////////////////// -// App Window -//////////////////// -declare namespace chrome.app.window { - export interface ContentBounds { - left?: number; - top?: number; - width?: number; - height?: number; - } - - export interface BoundsSpecification { - left?: number; - top?: number; - width?: number; - height?: number; - minWidth?: number; - minHeight?: number; - maxWidth?: number; - maxHeight?: number; - } - - export interface Bounds { - left: number; - top: number; - width: number; - height: number; - minWidth?: number; - minHeight?: number; - maxWidth?: number; - maxHeight?: number; - setPosition(left: number, top: number): void; - setSize(width: number, height: number): void; - setMinimumSize(minWidth: number, minHeight: number): void; - setMaximumSize(maxWidth: number, maxHeight: number): void; - } - export interface FrameOptions { - type?: string; - color?: string; - activeColor?: string; - inactiveColor?: string; - } - - export interface CreateWindowOptions { - id?: string; - innerBounds?: BoundsSpecification; - outerBounds?: BoundsSpecification; - minWidth?: number; - minHeight?: number; - maxWidth?: number; - maxHeight?: number; - /** - * @description - * @type {(string | FrameOptions)} string ("none", "chrome") or FrameOptions - * @memberof CreateWindowOptions - */ - frame?: string | FrameOptions; - bounds?: ContentBounds; - alphaEnabled?: boolean; - /** - * @description - * @type {string} "normal", "fullscreen", "maximized", "minimized" - * @memberof CreateWindowOptions - */ - state?: string; - hidden?: boolean; - resizable?: boolean; - singleton?: boolean; - alwaysOnTop?: boolean; - focused?: boolean; - visibleOnAllWorkspaces?: boolean; - } - - export interface AppWindow { - focus: () => void; - fullscreen: () => void; - isFullscreen: () => boolean; - minimize: () => void; - isMinimized: () => boolean; - maximize: () => void; - isMaximized: () => boolean; - restore: () => void; - moveTo: (left: number, top: number) => void; - resizeTo: (width: number, height: number) => void; - drawAttention: () => void; - clearAttention: () => void; - close: () => void; - show: () => void; - hide: () => void; - getBounds: () => ContentBounds; - setBounds: (bounds: ContentBounds) => void; - isAlwaysOnTop: () => boolean; - setAlwaysOnTop: (alwaysOnTop: boolean) => void; - setVisibleOnAllWorkspaces: (alwaysVisible: boolean) => void; - contentWindow: Window; - id: string; - innerBounds: Bounds; - outerBounds: Bounds; - onBoundsChanged: WindowEvent; - onClosed: WindowEvent; - onFullscreened: WindowEvent; - onMaximized: WindowEvent; - onMinimized: WindowEvent; - onRestored: WindowEvent; - } - - export function create(url: string, options?: CreateWindowOptions, callback?: (created_window: AppWindow) => void): void; - export function current(): AppWindow; - export function get(id: string): AppWindow; - export function getAll(): AppWindow[]; - export function canSetVisibleOnAllWorkspaces(): boolean; - - export interface WindowEvent extends chrome.events.Event<() => void> { } - - export var onBoundsChanged: WindowEvent; - export var onClosed: WindowEvent; - export var onFullscreened: WindowEvent; - export var onMaximized: WindowEvent; - export var onMinimized: WindowEvent; - export var onRestored: WindowEvent; -} - -//////////////////// -// fileSystem -//////////////////// -declare namespace chrome.fileSystem { - - export interface AcceptOptions { - description?: string; - mimeTypes?: string[]; - extensions?: string[]; - } - - export interface ChooseEntryOptions { - type?: string; - suggestedName?: string; - accepts?: AcceptOptions[]; - acceptsAllTypes?: boolean; - acceptsMultiple?: boolean; - } - - export function getDisplayPath(entry: Entry, callback: (displayPath: string) => void): void; - export function getWritableEntry(entry: Entry, callback: (entry: Entry) => void): void; - export function isWritableEntry(entry: Entry, callback: (isWritable: boolean) => void): void; - export function chooseEntry(callback: (entry: Entry) => void): void; - export function chooseEntry(callback: (fileEntries: FileEntry[]) => void): void; - export function chooseEntry(options: ChooseEntryOptions, callback: (entry: Entry) => void): void; - export function chooseEntry(options: ChooseEntryOptions, callback: (fileEntries: FileEntry[]) => void): void; - export function restoreEntry(id: string, callback: (entry: Entry) => void): void; - export function isRestorable(id: string, callback: (isRestorable: boolean) => void): void; - export function retainEntry(entry: Entry): string; -} - -//////////////////// -// Media Galleries -//////////////////// -declare namespace chrome.mediaGalleries { - export interface MediaFileSystemsOptions { - interactive?: 'no' | 'yes' | 'if_needed'; - } - - export interface MediaFileSystemMetadata { - name: string; - galleryId: string; - deviceId?: string; - isRemovable: boolean; - isMediaDevice: boolean; - isAvailable: boolean; - } - - export interface MetadataOptions { - metadataType: 'all' | 'mimeTypeAndTags' | 'mimeTypeOnly'; - } - - export interface RawTag { - type: string; - tags: { [name: string]: string; }; - } - - export interface Metadata { - // The browser sniffed mime type. - mimeType: string; - // Defined for images and video. In pixels. - height?: number; - width?: number; - // Defined for images only. - xResolution?: number; - yResolution?: number; - // Defined for audio and video. In seconds. - duration?: number; - // Defined for images and video. In degrees. - rotation?: number; - // Defined for images only. - cameraMake?: string; - cameraModel?: string; - exposureTimeSeconds?: number; - flashFired?: boolean; - fNumber?: number; - focalLengthMm?: number; - isoEquivalent?: number; - // Defined for audio and video only. - album?: string; - artist?: string; - comment?: string; - copyright?: string; - disc?: number; - genre?: string; - language?: string; - title?: string; - track?: number; - // All the metadata in the media file. For formats with multiple streams, stream order will be preserved. Container metadata is the first element. - rawTags: RawTag[]; - // The images embedded in the media file's metadata. This is most often used for album art or video thumbnails. - attachedImages: Blob[]; - } - - export interface GalleryWatchResult { - galleryId: string; - success: boolean; - } - - export interface GalleryChangedEventArgs { - type: 'contents_changed' | 'watch_dropped'; - galleryId: string; - } - - export interface ScanProgressEventArgs { - // The type of progress event, i.e. start, finish, etc. - type: 'start' | 'cancel' | 'finish' | 'error'; - // The number of Galleries found. - galleryCount?: number; - // Appoximate number of media files found; some file types can be either audio or video and are included in both counts. - audioCount?: number; - imageCount?: number; - videoCount?: number; - } - - export function getMediaFileSystems(callback: (mediaFileSystems: FileSystem[]) => void): void; - export function getMediaFileSystems(options: MediaFileSystemsOptions, callback: (mediaFileSystems: FileSystem[]) => void): void; - export function addUserSelectedFolder(callback: (mediaFileSystems: FileSystem[], selectedFileSystemName: string) => void): void; - export function dropPermissionForMediaFileSystem(galleryId: string, callback?: () => void): void; - export function startMediaScan(): void; - export function cancelMediaScan(): void; - export function addScanResults(callback: (mediaFileSystems: FileSystem[]) => void): void; - export function getMediaFileSystemMetadata(mediaFileSystem: FileSystem): MediaFileSystemMetadata; - export function getAllMediaFileSystemMetadata(callback: (metadatas: MediaFileSystemMetadata[]) => void): void; - export function getMetadata(mediaFile: Blob, callback: (metadata: Metadata) => void): void; - export function getMetadata(mediaFile: Blob, options: MetadataOptions, callback: (metadata: Metadata) => void): void; - export function addGalleryWatch(galleryId: string, callback: (result: GalleryWatchResult) => void): void; - export function removeGalleryWatch(galleryId: string): void; - export function getAllGalleryWatch(callback: (galleryIds: string[]) => void): void; - export function removeAllGalleryWatch(): void; - - export var onGalleryChanged: chrome.events.Event<(args: GalleryChangedEventArgs) => void>; - export var onScanProgress: chrome.events.Event<(args: ScanProgressEventArgs) => void>; -} - -//////////////////// -// Sockets -//////////////////// -declare namespace chrome.sockets.tcp { - export interface CreateInfo { - socketId: number; - } - - export interface SendInfo { - resultCode: number; - bytesSent?: number; - } - - export interface ReceiveEventArgs { - socketId: number; - data: ArrayBuffer; - } - - export interface ReceiveErrorEventArgs { - socketId: number; - resultCode: number; - } - - export interface SocketProperties { - persistent?: boolean; - name?: string; - bufferSize?: number; - } - - export interface SocketInfo { - socketId: number; - persistent: boolean; - name?: string; - bufferSize?: number; - paused: boolean; - connected: boolean; - localAddress?: string; - localPort?: number; - peerAddress?: string; - peerPort?: number; - } - - export function create(callback: (createInfo: CreateInfo) => void): void; - export function create(properties: SocketProperties, callback: (createInfo: CreateInfo) => void): void; - - export function update(socketId: number, properties: SocketProperties, callback?: () => void): void; - export function setPaused(socketId: number, paused: boolean, callback?: () => void): void; - - export function setKeepAlive(socketId: number, - enable: boolean, callback: (result: number) => void): void; - export function setKeepAlive(socketId: number, - enable: boolean, delay: number, callback: (result: number) => void): void; - - export function setNoDelay(socketId: number, noDelay: boolean, callback: (result: number) => void): void; - export function connect(socketId: number, - peerAddress: string, peerPort: number, callback: (result: number) => void): void; - export function disconnect(socketId: number, callback?: () => void): void; - export function send(socketId: number, data: ArrayBuffer, callback: (sendInfo: SendInfo) => void): void; - export function close(socketId: number, callback?: () => void): void; - export function getInfo(socketId: number, callback: (socketInfo: SocketInfo) => void): void; - export function getSockets(callback: (socketInfos: SocketInfo[]) => void): void; - - export var onReceive: chrome.events.Event<(args: ReceiveEventArgs) => void>; - export var onReceiveError: chrome.events.Event<(args: ReceiveErrorEventArgs) => void>; -} - -/** - * Use the chrome.sockets.udp API to send and receive data over the network - * using UDP connections. This API supersedes the UDP functionality previously - * found in the "socket" API. - * - * @since Chrome 33 - * @see https://developer.chrome.com/apps/sockets_udp - */ -declare namespace chrome.sockets.udp { - export interface CreateInfo { - socketId: number; - } - - export interface SendInfo { - resultCode: number; - bytesSent?: number; - } - - export interface ReceiveEventArgs { - socketId: number; - data: ArrayBuffer; - remoteAddress: string; - remotePort: number; - } - - export interface ReceiveErrorEventArgs { - socketId: number; - resultCode: number; - } - - /** - * @see https://developer.chrome.com/apps/sockets_udp#type-SocketProperties - */ - export interface SocketProperties { - /** - * Flag indicating if the socket is left open when the event page of the - * application is unloaded. The default value is "false." When the - * application is loaded, any sockets previously opened with - * persistent=true can be fetched with getSockets. - * @see http://developer.chrome.com/apps/app_lifecycle.html - */ - persistent?: boolean; - - /** An application-defined string associated with the socket. */ - name?: string; - - /** - * The size of the buffer used to receive data. If the buffer is too - * small to receive the UDP packet, data is lost. The default value is - * 4096. - */ - bufferSize?: number; - } - - /** - * @see https://developer.chrome.com/apps/sockets_udp#type-SocketInfo - */ - export interface SocketInfo { - /** The socket identifier. */ - socketId: number; - - /** - * Flag indicating whether the socket is left open when the application - * is suspended (see SocketProperties.persistent). - */ - persistent: boolean; - - /** Application-defined string associated with the socket. */ - name?: string; - - /** - * The size of the buffer used to receive data. If no buffer size ha - * been specified explictly, the value is not provided. - */ - bufferSize?: number; - - /** - * Flag indicating whether the socket is blocked from firing onReceive - * events. - */ - paused: boolean; - - /** - * If the underlying socket is bound, contains its local IPv4/6 address. - */ - localAddress?: string; - - /** - * If the underlying socket is bound, contains its local port. - */ - localPort?: number; - } - - /** - * Creates a UDP socket with default properties. - * - * @see https://developer.chrome.com/apps/sockets_udp#method-create - * @param createInfo.socketId The ID of the newly created socket. - */ - export function create(callback: (createInfo: CreateInfo) => void): void; - - /** - * Creates a UDP socket with the given properties. - * - * @see https://developer.chrome.com/apps/sockets_udp#method-create - * @param properties The socket properties. - * @param createInfo.socketId The ID of the newly created socket. - */ - export function create(properties: SocketProperties, callback: (createInfo: CreateInfo) => void): void; - - /** - * Updates the socket properties. - * - * @see https://developer.chrome.com/apps/sockets_udp#method-update - * @param socketId The socket ID. - * @param properties The properties to update. - * @param callback Called when the properties are updated. - */ - export function update(socketId: number, properties: SocketProperties, callback?: () => void): void; - - /** - * Pauses or unpauses a socket. A paused socket is blocked from firing - * onReceive events. - * - * @see https://developer.chrome.com/apps/sockets_udp#method-setPaused - * @param socketId The socket ID. - * @param paused Flag to indicate whether to pause or unpause. - * @param callback Called when the socket has been successfully paused or - * unpaused. - */ - export function setPaused(socketId: number, paused: boolean, callback?: () => void): void; - - /** - * Binds the local address and port for the socket. For a client socket, it - * is recommended to use port 0 to let the platform pick a free port. - * - * Once the bind operation completes successfully, onReceive events are - * raised when UDP packets arrive on the address/port specified -- unless - * the socket is paused. - * - * @see https://developer.chrome.com/apps/sockets_udp#method-bind - * @param socketId The socket ID. - * @param address The address of the local machine. DNS name, IPv4 and IPv6 - * formats are supported. Use "0.0.0.0" to accept packets - * from all local available network interfaces. - * @param port The port of the local machine. Use "0" to bind to a free - * port. - * @param callback Called when the bind operation completes. - */ - export function bind(socketId: number, address: string, port: number, callback: (result: number) => void): void; - - /** - * Sends data on the given socket to the given address and port. The socket - * must be bound to a local port before calling this method. - * - * @see https://developer.chrome.com/apps/sockets_udp#method-send - * @param socketId The socket ID. - * @param data The data to send. - * @param address The address of the remote machine. - * @param port The port of the remote machine. - * @param callback Called when the send operation completes. - */ - export function send(socketId: number, data: ArrayBuffer, address: string, port: number, callback: (sendInfo: SendInfo) => void): void; - - /** - * Closes the socket and releases the address/port the socket is bound to. - * Each socket created should be closed after use. The socket id is no - * longer valid as soon at the function is called. However, the socket is - * guaranteed to be closed only when the callback is invoked. - * - * @see https://developer.chrome.com/apps/sockets_udp#method-close - * @param socketId The socket ID. - * @param callback Called when the close operation completes. - */ - export function close(socketId: number, callback?: () => void): void; - - /** - * Retrieves the state of the given socket. - * - * @see https://developer.chrome.com/apps/sockets_udp#method-getInfo - * @param socketId The socket ID. - * @param callback Called when the socket state is available. - */ - export function getInfo(socketId: number, callback: (socketInfo: SocketInfo) => void): void; - - /** - * Retrieves the list of currently opened sockets owned by the application. - * - * @see https://developer.chrome.com/apps/sockets_udp#method-getSockets - * @param callback Called when the list of sockets is available. - */ - export function getSockets(callback: (socketInfos: SocketInfo[]) => void): void; - - /** - * Joins the multicast group and starts to receive packets from that group. - * The socket must be bound to a local port before calling this method. - * - * @see https://developer.chrome.com/apps/sockets_udp#method-joinGroup - * @param socketId The socket ID. - * @param address The group address to join. Domain names are not supported. - * @param callback Called when the joinGroup operation completes. - */ - export function joinGroup(socketId: number, address: string, callback: (result: number) => void): void; - - /** - * Leaves the multicast group previously joined using joinGroup. This is - * only necessary to call if you plan to keep using the socket afterwards, - * since it will be done automatically by the OS when the socket is closed. - * - * Leaving the group will prevent the router from sending multicast - * datagrams to the local host, presuming no other process on the host is - * still joined to the group. - * - * @see https://developer.chrome.com/apps/sockets_udp#method-leaveGroup - * @param socketId The socket ID. - * @param address The group address to leave. Domain names are not - * supported. - * @param callback Called when the leaveGroup operation completes. - */ - export function leaveGroup(socketId: number, address: string, callback: (result: number) => void): void; - - /** - * Sets the time-to-live of multicast packets sent to the multicast group. - * - * Calling this method does not require multicast permissions. - * - * @see https://developer.chrome.com/apps/sockets_udp#method-setMulticastTimeToLive - * @param socketId The socket ID. - * @param ttl The time-to-live value. - * @param callback Called when the configuration operation completes. - */ - export function setMulticastTimeToLive(socketId: number, ttl: number, callback: (result: number) => void): void; - - /** - * Sets whether multicast packets sent from the host to the multicast group - * will be looped back to the host. - * - * Note: the behavior of setMulticastLoopbackMode is slightly different - * between Windows and Unix-like systems. The inconsistency happens only - * when there is more than one application on the same host joined to the - * same multicast group while having different settings on multicast - * loopback mode. On Windows, the applications with loopback off will not - * RECEIVE the loopback packets; while on Unix-like systems, the - * applications with loopback off will not SEND the loopback packets to - * other applications on the same host. - * @see MSDN: http://goo.gl/6vqbj - * - * Calling this method does not require multicast permissions. - * - * @see https://developer.chrome.com/apps/sockets_udp#method-setMulticastLoopbackMode - * @param socketId The socket ID. - * @param enabled Indicate whether to enable loopback mode. - * @param callback Called when the configuration operation completes. - */ - export function setMulticastLoopbackMode(socketId: number, enabled: boolean, callback: (result: number) => void): void; - - /** - * Gets the multicast group addresses the socket is currently joined to. - * - * @see https://developer.chrome.com/apps/sockets_udp#method-getJoinedGroups - * @param socketId The socket ID. - * @param callback Called with an array of strings of the result. - */ - export function getJoinedGroups(socketId: number, callback: (groups: string[]) => void): void; - - /** - * Enables or disables broadcast packets on this socket. - * - * @since Chrome 44 - * @see https://developer.chrome.com/apps/sockets_udp#method-setBroadcast - * @param socketId The socket ID. - * @param enabled true to enable broadcast packets, false to disable them. - * @param callback Callback from the setBroadcast method. - */ - export function setBroadcast(socketId: number, enabled: boolean, callback?: (result: number) => void): void; - - /** - * Event raised when a UDP packet has been received for the given socket. - * - * @see https://developer.chrome.com/apps/sockets_udp#event-onReceive - */ - export var onReceive: chrome.events.Event<(args: ReceiveEventArgs) => void>; - - /** - * Event raised when a network error occured while the runtime was waiting - * for data on the socket address and port. Once this event is raised, the - * socket is paused and no more onReceive events will be raised for this - * socket until the socket is resumed. - * - * @see https://developer.chrome.com/apps/sockets_udp#event-onReceiveError - */ - export var onReceiveError: chrome.events.Event<(args: ReceiveErrorEventArgs) => void>; -} - -/** - * Use the chrome.sockets.tcpServer API to create server applications using TCP - * connections. This API supersedes the TCP functionality previously found in - * the chrome.socket API. - * - * @since Chrome 33 - * @see https://developer.chrome.com/apps/sockets_tcpServer - */ -declare namespace chrome.sockets.tcpServer { - export interface CreateInfo { - socketId: number; - } - - export interface AcceptEventArgs { - socketId: number; - clientSocketId: number; - } - - export interface AcceptErrorEventArgs { - socketId: number; - resultCode: number; - } - - /** - * @see https://developer.chrome.com/apps/sockets_tcpServer#type-SocketProperties - */ - export interface SocketProperties { - /** - * Flag indicating if the socket remains open when the event page of the - * application is unloaded. The default value is "false." When the - * application is loaded, any sockets previously opened with - * persistent=true can be fetched with getSockets. - * - * @see http://developer.chrome.com/apps/app_lifecycle.html - */ - persistent?: boolean; - - /** An application-defined string associated with the socket. */ - name?: string; - } - - /** - * @see https://developer.chrome.com/apps/sockets_tcpServer#type-SocketInfo - */ - export interface SocketInfo { - /** The socket identifier. */ - socketId: number; - - /** - * Flag indicating if the socket remains open when the event page of the - * application is unloaded (see SocketProperties.persistent). The - * default value is "false". - */ - persistent: boolean; - - /** Application-defined string associated with the socket. */ - name?: string; - - /** - * Flag indicating whether connection requests on a listening socket are - * dispatched through the onAccept event or queued up in the listen - * queue backlog. See setPaused. The default value is "false" - */ - paused: boolean; - - /** If the socket is listening, contains its local IPv4/6 address. */ - localAddress?: string; - - /** If the socket is listening, contains its local port. */ - localPort?: number; - } - - /** - * Creates a TCP server socket. - * - * @see https://developer.chrome.com/apps/sockets_tcpServer#method-create - * @param callback Called when the socket has been created. - */ - export function create(callback: (createInfo: CreateInfo) => void): void; - - /** - * Creates a TCP server socket. - * - * @see https://developer.chrome.com/apps/sockets_tcpServer#method-create - * @param properties The socket properties. - * @param callback Called when the socket has been created. - */ - export function create(properties: SocketProperties, callback: (createInfo: CreateInfo) => void): void; - - /** - * Updates the socket properties. - * - * @see https://developer.chrome.com/apps/sockets_tcpServer#method-update - * @param socketId The socket identifier. - * @param properties The properties to update. - * @param callback Called when the properties are updated. - */ - export function update(socketId: number, properties: SocketProperties, callback?: () => void): void; - - /** - * Enables or disables a listening socket from accepting new connections. - * When paused, a listening socket accepts new connections until its backlog - * (see listen function) is full then refuses additional connection - * requests. onAccept events are raised only when the socket is un-paused. - * - * @see https://developer.chrome.com/apps/sockets_tcpServer#method-setPaused - * @param callback Callback from the setPaused method. - */ - export function setPaused(socketId: number, paused: boolean, callback?: () => void): void; - - /** - * Listens for connections on the specified port and address. If the - * port/address is in use, the callback indicates a failure. - * - * @see https://developer.chrome.com/apps/sockets_tcpServer#method-listen - * @param socketId The socket identifier. - * @param address The address of the local machine. - * @param port The port of the local machine. When set to 0, a free port - * is chosen dynamically. The dynamically allocated port can - * be found by calling getInfo. - * @param backlog Length of the socket's listen queue. The default value - * depends on the Operating System (SOMAXCONN), which - * ensures a reasonable queue length for most applications. - * @param callback Called when listen operation completes. - */ - export function listen(socketId: number, address: string, port: number, backlog: number, callback: (result: number) => void): void; - - /** - * Listens for connections on the specified port and address. If the - * port/address is in use, the callback indicates a failure. - * - * @see https://developer.chrome.com/apps/sockets_tcpServer#method-listen - * @param socketId The socket identifier. - * @param address The address of the local machine. - * @param port The port of the local machine. When set to 0, a free port - * is chosen dynamically. The dynamically allocated port can - * be found by calling getInfo. - * @param callback Called when listen operation completes. - */ - export function listen(socketId: number, address: string, port: number, callback: (result: number) => void): void; - - /** - * Disconnects the listening socket, i.e. stops accepting new connections - * and releases the address/port the socket is bound to. The socket - * identifier remains valid, e.g. it can be used with listen to accept - * connections on a new port and address. - * - * @see https://developer.chrome.com/apps/sockets_tcpServer#method-disconnect - * @param socketId The socket identifier. - * @param callback Called when the disconnect attempt is complete. - */ - export function disconnect(socketId: number, callback?: () => void): void; - - /** - * Disconnects and destroys the socket. Each socket created should be closed - * after use. The socket id is no longer valid as soon at the function is - * called. However, the socket is guaranteed to be closed only when the - * callback is invoked. - * - * @see https://developer.chrome.com/apps/sockets_tcpServer#method-close - * @param socketId The socket identifier. - * @param callback Called when the close operation completes. - */ - export function close(socketId: number, callback?: () => void): void; - - /** - * Retrieves the state of the given socket. - * - * @see https://developer.chrome.com/apps/sockets_tcpServer#method-getInfo - * @param socketId The socket identifier. - * @param callback Called when the socket state is available. - */ - export function getInfo(socketId: number, callback: (socketInfo: SocketInfo) => void): void; - - /** - * Retrieves the list of currently opened sockets owned by the application. - * - * @see https://developer.chrome.com/apps/sockets_tcpServer#method-getSockets - * @param callback Called when the list of sockets is available. - */ - export function getSockets(callback: (socketInfos: SocketInfo[]) => void): void; - - /** - * Event raised when a connection has been made to the server socket. - * - * @see https://developer.chrome.com/apps/sockets_tcpServer#event-onAccept - */ - export var onAccept: chrome.events.Event<(args: AcceptEventArgs) => void>; - - /** - * Event raised when a network error occured while the runtime was waiting - * for new connections on the socket address and port. Once this event is - * raised, the socket is set to paused and no more onAccept events are - * raised for this socket until the socket is resumed. - * - * @see https://developer.chrome.com/apps/sockets_tcpServer#event-onAcceptError - */ - export var onAcceptError: chrome.events.Event<(args: AcceptErrorEventArgs) => void>; -} - -//////////////////// -// System Display -//////////////////// -/** - * Use the system.display API to query display metadata. - * Permissions: "system.display" - * @since Chrome 30. - */ -declare namespace chrome.system.display { - export interface Bounds { - /** The x-coordinate of the upper-left corner. */ - left: number; - /** The y-coordinate of the upper-left corner. */ - top: number; - /** The width of the display in pixels. */ - width: number; - /** The height of the display in pixels. */ - height: number; - } - - export interface Insets { - /** The x-axis distance from the left bound. */ - left: number; - /** The y-axis distance from the top bound. */ - top: number; - /** The x-axis distance from the right bound. */ - right: number; - /** The y-axis distance from the bottom bound. */ - bottom: number; - } - - /** - * @since Chrome 57 - */ - export interface Point { - /** The x-coordinate of the point. */ - x: number; - /** The y-coordinate of the point. */ - y: number; - } - - /** - * @since Chrome 57 - */ - export interface TouchCalibrationPair { - /** The coordinates of the display point. */ - displayPoint: Point; - /** The coordinates of the touch point corresponding to the display point. */ - touchPoint: Point; - } - - /** - * @since Chrome 52 - */ - export interface DisplayMode { - /** The display mode width in device independent (user visible) pixels. */ - width: number; - - /** The display mode height in device independent (user visible) pixels. */ - height: number; - - /** The display mode width in native pixels. */ - widthInNativePixels: number; - - /** The display mode height in native pixels. */ - heightInNativePixels: number; - - /** The display mode UI scale factor. */ - uiScale: number; - - /** The display mode device scale factor. */ - deviceScaleFactor: number; - - /** True if the mode is the display's native mode. */ - isNative: boolean; - - /** True if the display mode is currently selected. */ - isSelected: boolean; - } - - /** - * @since Chrome 53 - */ - export interface DisplayLayout { - /** The unique identifier of the display. */ - id: string; - /** The unique identifier of the parent display. Empty if this is the root. */ - parentId: string; - /** The layout position of this display relative to the parent. This will be ignored for the root. */ - position: 'top' | 'right' | 'bottom' | 'left'; - /** The offset of the display along the connected edge. 0 indicates that the topmost or leftmost corners are aligned. */ - offset: number; - } - - /** - * @description The pairs of point used to calibrate the display. - * @export - * @interface TouchCalibrationPairs - */ - export interface TouchCalibrationPairs { - /** First pair of touch and display point required for touch calibration. */ - pair1: TouchCalibrationPair, - /** Second pair of touch and display point required for touch calibration. */ - pair2: TouchCalibrationPair, - /** Third pair of touch and display point required for touch calibration. */ - pair3: TouchCalibrationPair, - /** Fourth pair of touch and display point required for touch calibration. */ - pair4: TouchCalibrationPair - } - - /** - * @description Representation of info data to be used in chrome.system.display.setDisplayProperties() - * @export - * @interface DisplayPropertiesInfo - */ - export interface DisplayPropertiesInfo { - /** - * @description Chrome OS only. If set to true, changes the display mode to unified desktop (see enableUnifiedDesktop for details). If set to false, unified desktop mode will be disabled. This is only valid for the primary display. If provided, mirroringSourceId must not be provided and other properties may not apply. This is has no effect if not provided. - * @since Chrome 59 - * */ - isUnified?: boolean; - - /** - * Chrome OS only. If set and not empty, enables mirroring for this display. Otherwise disables mirroring for this display. This value should indicate the id of the source display to mirror, which must not be the same as the id passed to setDisplayProperties. If set, no other property may be set. - */ - mirroringSourceId?: string; - - /** If set to true, makes the display primary. No-op if set to false. */ - isPrimary?: boolean; - - /** If set, sets the display's overscan insets to the provided values. Note that overscan values may not be negative or larger than a half of the screen's size. Overscan cannot be changed on the internal monitor. It's applied after isPrimary parameter. */ - overscan?: Insets; - - /** If set, updates the display's rotation. Legal values are [0, 90, 180, 270]. The rotation is set clockwise, relative to the display's vertical position. It's applied after overscan paramter. */ - rotation?: 0 | 90 | 180 | 270; - - /** If set, updates the display's logical bounds origin along x-axis. Applied together with boundsOriginY, if boundsOriginY is set. Note that, when updating the display origin, some constraints will be applied, so the final bounds origin may be different than the one set. The final bounds can be retrieved using getInfo. The bounds origin is applied after rotation. The bounds origin cannot be changed on the primary display. Note that is also invalid to set bounds origin values if isPrimary is also set (as isPrimary parameter is applied first). */ - boundsOriginX?: number; - - /** If set, updates the display's logical bounds origin along y-axis. See documentation for boundsOriginX parameter. */ - boundsOriginY: number; - - /** - * @since Chrome 52 - * @description If set, updates the display mode to the mode matching this value. - */ - displayMode?: DisplayMode; - } - - /** - * @description Options affecting how the information is returned. - * @since Chrome 59 - * @export - * @interface DisplayInfoFlags - */ - export interface DisplayInfoFlags { - /** - * @description If set to true, only a single DisplayUnitInfo will be returned by getInfo when in unified desktop mode (see enableUnifiedDesktop). Defaults to false. - * @type {boolean} - * @memberof DisplayInfoFlags - */ - singleUnified?: boolean; - } - - /** Information about display properties. */ - export interface DisplayInfo { - /** The unique identifier of the display. */ - id: string; - /** The user-friendly name (e.g. "HP LCD monitor"). */ - name: string; - /** Identifier of the display that is being mirrored on the display unit. If mirroring is not in progress, set to an empty string. Currently exposed only on ChromeOS. Will be empty string on other platforms. */ - mirroringSourceId: string; - /** True if this is the primary display. */ - isPrimary: boolean; - /** True if this is an internal display. */ - isInternal: boolean; - /** True if this display is enabled. */ - isEnabled: boolean; - /** The number of pixels per inch along the x-axis. */ - dpiX: number; - /** The number of pixels per inch along the y-axis. */ - dpiY: number; - /** The display's clockwise rotation in degrees relative to the vertical position. Currently exposed only on ChromeOS. Will be set to 0 on other platforms. */ - rotation: number; - /** The display's logical bounds. */ - bounds: Bounds; - /** The display's insets within its screen's bounds. Currently exposed only on ChromeOS. Will be set to empty insets on other platforms. */ - overscan: Insets; - /** The usable work area of the display within the display bounds. The work area excludes areas of the display reserved for OS, for example taskbar and launcher. */ - workArea: Bounds; - } - - /** The information about display properties that should be changed. A property will be changed only if a new value for it is specified in |info|. */ - export interface DisplayProps { - /** If set and not empty, starts mirroring between this and the display with the provided id (the system will determine which of the displays is actually mirrored). If set and not empty, stops mirroring between this and the display with the specified id (if mirroring is in progress). If set, no other parameter may be set. */ - mirroringSourceId?: string; - /** If set to true, makes the display primary. No-op if set to false. */ - isPrimary?: boolean; - /** If set, sets the display's overscan insets to the provided values. Note that overscan values may not be negative or larger than a half of the screen's size. Overscan cannot be changed on the internal monitor. It's applied after isPrimary parameter. */ - overscan?: Insets; - /** If set, updates the display's rotation. Legal values are [0, 90, 180, 270]. The rotation is set clockwise, relative to the display's vertical position. It's applied after overscan paramter. */ - rotation?: number; - /** If set, updates the display's logical bounds origin along x-axis. Applied together with boundsOriginY, if boundsOriginY is set. Note that, when updating the display origin, some constraints will be applied, so the final bounds origin may be different than the one set. The final bounds can be retrieved using getInfo. The bounds origin is applied after rotation. The bounds origin cannot be changed on the primary display. Note that is also invalid to set bounds origin values if isPrimary is also set (as isPrimary parameter is applied first). */ - boundsOriginX?: number; - /** If set, updates the display's logical bounds origin along y-axis. See documentation for boundsOriginX parameter. */ - boundsOriginY?: number; - } - - /** - * @description Fired when anything changes to the display configuration. - * @export - * @interface DisplayChangedEvent - * @extends {chrome.events.Event<() => void>} - */ - export interface DisplayChangedEvent extends chrome.events.Event<() => void> { } - - /** - * @description Requests the information for all attached display devices. - * @export - * @param {(info: DisplayInfo[]) => void} callback The callback to invoke with the results. - */ - export function getInfo(callback: (info: DisplayInfo[]) => void): void; - /** - * @description Requests the information for all attached display devices. - * @export - * @since Chrome 59 - * @param {DisplayInfoFlags} [flags] Options affecting how the information is returned. - * @param {(info: DisplayInfo[]) => void} callback The callback to invoke with the results. - */ - export function getInfo(flags: DisplayInfoFlags, callback: (info: DisplayInfo[]) => void): void; - - /** - * @description Requests the layout info for all displays. NOTE: This is only available to Chrome OS Kiosk apps and Web UI. - * @since Chrome 53 - * @export - * @param {(layouts: DisplayLayout[]) => void} callback The callback to invoke with the results. - */ - export function getDisplayLayout(callback: (layouts: DisplayLayout[]) => void): void; - - /** - * @description Updates the properties for the display specified by |id|, according to the information provided in |info|. On failure, runtime.lastError will be set. NOTE: This is only available to Chrome OS Kiosk apps and Web UI. - * @export - * @param {string} id The display's unique identifier. - * @param {DisplayPropertiesInfo} info The information about display properties that should be changed. A property will be changed only if a new value for it is specified in |info|. - * @param {() => void} [callback] Empty function called when the function finishes. To find out whether the function succeeded, runtime.lastError should be queried. - */ - export function setDisplayProperties(id: string, info: DisplayPropertiesInfo, callback?: () => void): void; - - /** - * @description Set the layout for all displays. Any display not included will use the default layout. If a layout would overlap or be otherwise invalid it will be adjusted to a valid layout. After layout is resolved, an onDisplayChanged event will be triggered. NOTE: This is only available to Chrome OS Kiosk apps and Web UI. - * @since Chrome 53 - * @export - * @param {DisplayLayout[]} layouts The layout information, required for all displays except the primary display. - * @param {() => void} callback Empty function called when the function finishes. To find out whether the function succeeded, runtime.lastError should be queried. - */ - export function setDisplayLayout(layouts: DisplayLayout[], callback?: () => void): void; - - /** - * @description Enables/disables the unified desktop feature. Note that this simply enables the feature, but will not change the actual desktop mode. (That is, if the desktop is in mirror mode, it will stay in mirror mode) NOTE: This is only available to Chrome OS Kiosk apps and Web UI. - * @since Chrome 46 - * @export - * @param {boolean} enabled True if unified desktop should be enabled. - */ - export function enableUnifiedDesktop(enabled: boolean): void; - /** - * @description Starts overscan calibration for a display. This will show an overlay on the screen indicating the current overscan insets. If overscan calibration for display |id| is in progress this will reset calibration. - * @since Chrome 53 - * @export - * @param {string} id The display's unique identifier. - */ - export function overscanCalibrationStart(id: string): void; - /** - * @description Adjusts the current overscan insets for a display. Typically this should etiher move the display along an axis (e.g. left+right have the same value) or scale it along an axis (e.g. top+bottom have opposite values). Each Adjust call is cumulative with previous calls since Start. - * @since Chrome 53 - * @export - * @param {string} id The display's unique identifier. - * @param {Insets} delta The amount to change the overscan insets. - */ - export function overscanCalibrationAdjust(id: string, delta: Insets): void; - - /** - * @description Resets the overscan insets for a display to the last saved value (i.e before Start was called). - * @since Chrome 53 - * @export - * @param {string} id The display's unique identifier. - */ - export function overscanCalibrationReset(id: string): void; - - /** - * @description Complete overscan adjustments for a display by saving the current values and hiding the overlay. - * @since Chrome 53 - * @export - * @param {string} id The display's unique identifier. - */ - export function overscanCalibrationComplete(id: string): void; - - /** - * @description Displays the native touch calibration UX for the display with |id| as display id. This will show an overlay on the screen with required instructions on how to proceed. The callback will be invoked in case of successful calibraion only. If the calibration fails, this will throw an error. - * @since Chrome 57 - * @export - * @param {string} id The display's unique identifier. - * @param {(success) => void} callback Optional callback to inform the caller that the touch calibration has ended. The argument of the callback informs if the calibration was a success or not. - */ - export function showNativeTouchCalibration(id: string, callback: (success: boolean) => void): void; - - /** - * @description Starts custom touch calibration for a display. This should be called when using a custom UX for collecting calibration data. If another touch calibration is already in progress this will throw an error. - * @since Chrome 57 - * @export - * @param {string} id The display's unique identifier. - */ - export function startCustomTouchCalibration(id: string): void; - - /** - * @description Sets the touch calibration pairs for a display. These |pairs| would be used to calibrate the touch screen for display with |id| called in startCustomTouchCalibration(). Always call |startCustomTouchCalibration| before calling this method. If another touch calibration is already in progress this will throw an error. - * @since Chrome 57 - * @export - * @param {TouchCalibrationPairs} pairs The pairs of point used to calibrate the display. - * @param {Bounds} bounds Bounds of the display when the touch calibration was performed. |bounds.left| and |bounds.top| values are ignored. - */ - export function completeCustomTouchCalibration(pairs: TouchCalibrationPairs, bounds: Bounds): void; - /** - * @description Resets the touch calibration for the display and brings it back to its default state by clearing any touch calibration data associated with the display. - * @since Chrome 57 - * @export - * @param {string} id The display's unique identifier. - */ - export function clearTouchCalibration(id: string): void; - - /** - * @description Fired when anything changes to the display configuration. - * @export - */ - export var onDisplayChanged: DisplayChangedEvent; -} - -//////////////////// -// System - Network -//////////////////// -declare namespace chrome.system.network { - export interface NetworkInterface { - name: string; - address: string; - prefixLength: number; - } - - export function getNetworkInterfaces(callback: (networkInterfaces: NetworkInterface[]) => void): void; -} - -declare namespace chrome.runtime { - export interface Manifest { - app?: { - background?: { - scripts?: string[]; - } - }, - bluetooth?: { - uuids?: string[]; - socket?: boolean; - low_energy?: boolean; - peripheral?: boolean; - }, - file_handlers?: { - [name: string]: { - types?: string[]; - extensions?: string[]; - title?: string; - } - }, - kiosk_enabled?: boolean, - kiosk_only?: boolean, - url_handlers?: { - [name: string]: { - matches: string[]; - title?: string; - } - }, - usb_printers?: { - filters: { - vendorId?: number; - productId?: number; - interfaceClass?: number; - interfaceSubclass?: number; - interfaceProtocol?: number; - }[] - }, - webview?: { - partitions?: { - name: string; - accessible_resources: string[]; - }[] - } - } -} - -//////////////////// -// USB -//////////////////// -declare namespace chrome.usb { - type Direction = 'in' | 'out'; - - export interface Device { - device: number, - vendorId: number, - productId: number, - productName: string, - manufacturerName: string, - serialNumber: string - } - - export interface ConnectionHandle { - handle: number, - vendorId: number, - productId: number - } - - export interface EndpointDescriptor { - address: number, - type: 'control' | 'interrupt' | 'isochronous' | 'bulk', - direction: Direction, - maximumPacketSize: number, - synchronization?: 'asynchronous' | 'adaptive' | 'synchronous', - usage?: 'data' | 'feedback' | 'explicitFeedback', - pollingInterval?: number, - extra_data: ArrayBuffer - } - - export interface InterfaceDescriptor { - interfaceNumber: number, - alternateSetting: number, - interfaceClass: number, - interfaceSubclass: number, - interfaceProtocol: number, - description?: string, - endpoints: EndpointDescriptor[], - extra_data: ArrayBuffer - } - - export interface ConfigDescriptor { - active: boolean, - configurationValue: number, - description?: string, - selfPowered: boolean, - remoteWakeup: boolean, - maxPower: number, - interfaces: InterfaceDescriptor[], - extra_data: ArrayBuffer - } - - export interface GenericTransferInfo { - direction: Direction, - endpoint: number, - length?: number, - data?: ArrayBuffer, - timeout?: number - } - - export interface TransferResultInfo { - resultCode: number, - data?: ArrayBuffer - } - - export interface DeviceFilter { - vendorId?: number, - productId?: number, - interfaceClass?: number, - interfaceSubclass?: number, - interfaceProtocol?: number - } - - export interface TransferInfo { - direction: Direction; - recipient: 'device' | 'interface' | 'endpoint' | 'other'; - requestType: 'standard' | 'class' | 'vendor' | 'reserved'; - request: number; - value: number; - index: number; - length?: number; - data?: ArrayBuffer; - timeout?: number; - } - - export interface DeviceEvent extends chrome.events.Event<(device: Device) => void> { } - - export var onDeviceAdded: DeviceEvent; - export var onDeviceRemoved: DeviceEvent; - - export function getDevices(options: { vendorId?: number, productId?: number, filters?: DeviceFilter[] }, callback: (devices: Device[]) => void): void; - export function getUserSelectedDevices(options: { multiple?: boolean, filters?: DeviceFilter[] }, callback: (devices: Device[]) => void): void; - export function getConfigurations(device: Device, callback: (configs: ConfigDescriptor[]) => void): void; - export function requestAccess(device: Device, interfaceId: number, callback: (success: boolean) => void): void; - export function openDevice(device: Device, callback: (handle: ConnectionHandle) => void): void; - export function findDevices(options: { vendorId: number, productId: number, interfaceId?: number }, callback: (handles: ConnectionHandle[]) => void): void; - export function closeDevice(handle: ConnectionHandle, callback?: () => void): void; - export function setConfiguration(handle: ConnectionHandle, configurationValue: number, callback: () => void): void; - export function getConfiguration(handle: ConnectionHandle, callback: (config: ConfigDescriptor) => void): void; - export function listInterfaces(handle: ConnectionHandle, callback: (descriptors: InterfaceDescriptor[]) => void): void; - export function claimInterface(handle: ConnectionHandle, interfaceNumber: number, callback: () => void): void; - export function releaseInterface(handle: ConnectionHandle, interfaceNumber: number, callback: () => void): void; - export function setInterfaceAlternateSetting(handle: ConnectionHandle, interfaceNumber: number, alternateSetting: number, callback: () => void): void; - export function controlTransfer(handle: ConnectionHandle, transferInfo: TransferInfo, callback: (info: TransferResultInfo) => void): void; - export function bulkTransfer(handle: ConnectionHandle, transferInfo: GenericTransferInfo, callback: (info: TransferResultInfo) => void): void; - export function interruptTransfer(handle: ConnectionHandle, transferInfo: GenericTransferInfo, callback: (info: TransferResultInfo) => void): void; - export function isochronousTransfer(handle: ConnectionHandle, transferInfo: { transferInfo: GenericTransferInfo, packets: number, packetLength: number }, callback: (info: TransferResultInfo) => void): void; - export function resetDevice(handle: ConnectionHandle, callback: (success: boolean) => void): void; -} - -declare namespace chrome.networking.onc { - export type ActivationStateType = 'Activated' | 'Activating' | 'NotActivated' | 'PartiallyActivated'; - export type CaptivePortalStatus = 'Unknown' | 'Offline' | 'Online' | 'Portal' | 'ProxyAuthRequired'; - export type ConnectionStateType = 'Connected' | 'Connecting' | 'NotConnected'; - export type IPConfigType = 'DHCP' | 'Static'; - export type NetworkType = 'All' | 'Cellular' | 'Ethernet' | 'VPN' | 'Wireless' | 'WiFi' | 'WiMAX'; - export type ProxySettingsType = 'Direct' | 'Manual' | 'PAC' | 'WPAD'; - export interface ManagedBoolean { - /** - * @description The active value currently used by the network configuration manager (e.g. Shill). - * @type {boolean} - * @memberof ManagedBoolean - */ - Active?: boolean, - /** - * @description The source from which the effective property value was determined. - * @type {string} - * @memberof ManagedBoolean - */ - Effective?: string, - /** - * @description The property value provided by the user policy. - * @type {boolean} - * @memberof ManagedBoolean - */ - UserPolicy?: boolean, - /** - * @description The property value provided by the device policy. - * @type {boolean} - * @memberof ManagedBoolean - */ - DevicePolicy?: boolean, - /** - * @description The property value set by the logged in user. Only provided if |UserEditable| is true. - * @type {boolean} - * @memberof ManagedBoolean - */ - UserSettings?: boolean, - /** - * @description The value set for all users of the device. Only provided if |DeviceEditiable| is true. - * @type {boolean} - * @memberof ManagedBoolean - */ - SharedSettings?: boolean, - /** - * @description Whether a UserPolicy for the property exists and allows the property to be edited (i.e. the policy set recommended property value). Defaults to false. - * @type {boolean} - * @memberof ManagedBoolean - */ - UserEditable?: boolean, - /** - * @description Whether a DevicePolicy for the property exists and allows the property to be edited (i.e. the policy set recommended property value). Defaults to false. - * @type {boolean} - * @memberof ManagedBoolean - */ - DeviceEditable?: boolean - } - export interface ManagedLong { - /** - * @description The active value currently used by the network configuration manager (e.g. Shill). - * @type {number} - * @memberof ManagedLong - */ - Active?: number, - /** - * @description The source from which the effective property value was determined. - * @type {string} - * @memberof ManagedLong - */ - Effective?: string, - /** - * @description The property value provided by the user policy. - * @type {number} - * @memberof ManagedLong - */ - UserPolicy?: number, - /** - * @description The property value provided by the device policy. - * @type {number} - * @memberof ManagedLong - */ - DevicePolicy?: number, - /** - * @description The property value set by the logged in user. Only provided if |UserEditable| is true. - * @type {number} - * @memberof ManagedLong - */ - UserSettings?: number, - /** - * @description The value set for all users of the device. Only provided if |DeviceEditiable| is true. - * @type {number} - * @memberof ManagedLong - */ - SharedSettings?: number, - /** - * @description Whether a UserPolicy for the property exists and allows the property to be edited (i.e. the policy set recommended property value). Defaults to false. - * @type {boolean} - * @memberof ManagedLong - */ - UserEditable?: boolean, - /** - * @description Whether a DevicePolicy for the property exists and allows the property to be edited (i.e. the policy set recommended property value). Defaults to false. - * @type {boolean} - * @memberof ManagedLong - */ - DeviceEditable?: boolean - } -} diff --git a/types/chrome/chrome-cast.d.ts b/types/chrome/chrome-cast/index.d.ts similarity index 84% rename from types/chrome/chrome-cast.d.ts rename to types/chrome/chrome-cast/index.d.ts index 5c240ff25c..29bfbebf81 100644 --- a/types/chrome/chrome-cast.d.ts +++ b/types/chrome/chrome-cast/index.d.ts @@ -10,99 +10,102 @@ declare namespace chrome.cast { /** * @enum {string} - * @see https://developers.google.com/cast/docs/reference/chrome/chrome.cast.AutoJoinPolicy + * @see https://developers.google.com/cast/docs/reference/chrome/chrome.cast#.AutoJoinPolicy */ - export interface AutoJoinPolicy { - TAB_AND_ORIGIN_SCOPED: string; - ORIGIN_SCOPED: string; - PAGE_SCOPED: string; + export enum AutoJoinPolicy { + CUSTOM_CONTROLLER_SCOPED = "custom_controller_scoped", + TAB_AND_ORIGIN_SCOPED = "tab_and_origin_scoped", + ORIGIN_SCOPED = "origin_scoped", + PAGE_SCOPED = "page_scoped" } /** * @enum {string} - * @see https://developers.google.com/cast/docs/reference/chrome/chrome.cast.DefaultActionPolicy + * @see https://developers.google.com/cast/docs/reference/chrome/chrome.cast#.DefaultActionPolicy */ - export interface DefaultActionPolicy { - CREATE_SESSION: string; - CAST_THIS_TAB: string; + export enum DefaultActionPolicy { + CREATE_SESSION = "create_session", + CAST_THIS_TAB = "cast_this_tab" } /** * @enum {string} - * @see https://developers.google.com/cast/docs/reference/chrome/chrome.cast.Capability + * @see https://developers.google.com/cast/docs/reference/chrome/chrome.cast#.Capability */ - export interface Capability { - VIDEO_OUT: string; - AUDIO_OUT: string; - VIDEO_IN: string; - AUDIO_IN: string; + export enum Capability { + VIDEO_OUT = "video_out", + AUDIO_OUT = "audio_out", + VIDEO_IN = "video_in", + AUDIO_IN = "audio_in", + MULTIZONE_GROUP = "multizone_group" } /** * @enum {string} - * @see https://developers.google.com/cast/docs/reference/chrome/chrome.cast.ErrorCode + * @see https://developers.google.com/cast/docs/reference/chrome/chrome.cast#.ErrorCode */ - export interface ErrorCode { - CANCEL: string; - TIMEOUT: string; - API_NOT_INITIALIZED: string; - INVALID_PARAMETER: string; - EXTENSION_NOT_COMPATIBLE: string; - EXTENSION_MISSING: string; - RECEIVER_UNAVAILABLE: string; - SESSION_ERROR: string; - CHANNEL_ERROR: string; - LOAD_MEDIA_FAILED: string; + export enum ErrorCode { + CANCEL = "cancel", + TIMEOUT = "timeout", + API_NOT_INITIALIZED = "api_not_initialized", + INVALID_PARAMETER = "invalid_parameter", + EXTENSION_NOT_COMPATIBLE = "extension_not_compatible", + EXTENSION_MISSING = "extension_missing", + RECEIVER_UNAVAILABLE = "receiver_unavailable", + SESSION_ERROR = "session_error", + CHANNEL_ERROR = "channel_error", + LOAD_MEDIA_FAILED = "load_media_failed" } /** * @enum {string} - * @see https://developers.google.com/cast/docs/reference/chrome/chrome.cast.ReceiverAvailability + * @see https://developers.google.com/cast/docs/reference/chrome/chrome.cast#.ReceiverAvailability */ - export interface ReceiverAvailability { - AVAILABLE: string; - UNAVAILABLE: string; + export enum ReceiverAvailability { + AVAILABLE = "available", + UNAVAILABLE = "unavailable" } /** * @enum {string} - * @see https://developers.google.com/cast/docs/reference/chrome/chrome.cast.SenderPlatform + * @see https://developers.google.com/cast/docs/reference/chrome/chrome.cast#.SenderPlatform */ - export interface SenderPlatform { - CHROME: string; - IOS: string; - ANDROID: string; + export enum SenderPlatform { + CHROME = "chrome", + IOS = "ios", + ANDROID = "android" } /** * @enum {string} - * @see https://developers.google.com/cast/docs/reference/chrome/chrome.cast.ReceiverType + * @see https://developers.google.com/cast/docs/reference/chrome/chrome.cast#.ReceiverType */ - export interface ReceiverType { - CAST: string; - HANGOUT: string; - CUSTOM: string; + export enum ReceiverType { + CAST = "cast", + DIAL = "dial", + HANGOUT = "hangout", + CUSTOM = "custom" } /** * @enum {string} - * @see https://developers.google.com/cast/docs/reference/chrome/chrome.cast.ReceiverAction + * @see https://developers.google.com/cast/docs/reference/chrome/chrome.cast#.ReceiverAction */ - export interface ReceiverAction { - CAST: string; - STOP: string; + export enum ReceiverAction { + CAST = "cast", + STOP = "stop" } /** * @enum {string} - * @see https://developers.google.com/cast/docs/reference/chrome/chrome.cast.SessionStatus + * @see https://developers.google.com/cast/docs/reference/chrome/chrome.cast#.SessionStatus */ - export interface SessionStatus { - CONNECTED: string; - DISCONNECTED: string; - STOPPED: string; + export enum SessionStatus { + CONNECTED = "connected", + DISCONNECTED = "disconnected", + STOPPED = "stopped" } /** @@ -208,7 +211,7 @@ declare namespace chrome.cast { receiverListener: (receiverAvailability: chrome.cast.ReceiverAvailability) => void, autoJoinPolicy?: chrome.cast.AutoJoinPolicy, defaultActionPolicy?: chrome.cast.DefaultActionPolicy - ):ApiConfig; + ): ApiConfig; sessionRequest: chrome.cast.SessionRequest; sessionListener: (session: chrome.cast.Session) => void; @@ -229,7 +232,7 @@ declare namespace chrome.cast { code: chrome.cast.ErrorCode, description?: string, details?: Object - ):Error; + ): Error; code: chrome.cast.ErrorCode; description?: string; @@ -237,15 +240,13 @@ declare namespace chrome.cast { } - export interface Image { + export class Image { /** * @param {string} url * @constructor * @see https://developers.google.com/cast/docs/reference/chrome/chrome.cast.Image */ - new( - url: string - ):Image; + constructor(url: string); url: string; height?: number; @@ -260,7 +261,7 @@ declare namespace chrome.cast { */ new( platform: chrome.cast.SenderPlatform - ):SenderApplication; + ): SenderApplication; platform: chrome.cast.SenderPlatform; url?: string; @@ -279,7 +280,7 @@ declare namespace chrome.cast { appId: string, capabilities?: Array, timeout?: number - ):SessionRequest; + ): SessionRequest; appId: string; capabilities: Array; @@ -303,7 +304,7 @@ declare namespace chrome.cast { displayName: string, appImages: Array, receiver: chrome.cast.Receiver - ):Session; + ): Session; sessionId: string; appId: string; @@ -311,7 +312,7 @@ declare namespace chrome.cast { appImages: Array; receiver: chrome.cast.Receiver; senderApps: Array; - namespaces: Array<{name: string}>; + namespaces: Array<{ name: string }>; media: Array; status: chrome.cast.SessionStatus @@ -324,7 +325,7 @@ declare namespace chrome.cast { newLevel: number, successCallback: Function, errorCallback: (error: chrome.cast.Error) => void - ):void + ): void /** * @param {boolean} muted @@ -335,7 +336,7 @@ declare namespace chrome.cast { muted: boolean, successCallback: Function, errorCallback: (error: chrome.cast.Error) => void - ):void + ): void /** * @param {function()} successCallback @@ -344,7 +345,7 @@ declare namespace chrome.cast { leave( successCallback: Function, errorCallback: (error: chrome.cast.Error) => void - ):void + ): void /** * @param {function()} successCallback @@ -353,7 +354,7 @@ declare namespace chrome.cast { stop( successCallback: Function, errorCallback: (error: chrome.cast.Error) => void - ):void + ): void /** * @param {string} namespace @@ -366,21 +367,21 @@ declare namespace chrome.cast { message: string, successCallback: Function, errorCallback: (error: chrome.cast.Error) => void - ):void + ): void /** * @param {function(boolean)} listener */ addUpdateListener( - listener: (isAlive:boolean) => void - ):void + listener: (isAlive: boolean) => void + ): void /** * @param {function(boolean)} listener */ removeUpdateListener( - listener: (isAlive:boolean) => void - ):void + listener: (isAlive: boolean) => void + ): void /** * @param {string} namespace @@ -389,7 +390,7 @@ declare namespace chrome.cast { addMessageListener( namespace: string, listener: (namespace: string, message: string) => void - ):void + ): void /** * @param {string} namespace @@ -397,22 +398,22 @@ declare namespace chrome.cast { */ removeMessageListener( namespace: string, - listener: (namespace:string, message:string) => void - ):void + listener: (namespace: string, message: string) => void + ): void /** * @param {function(!chrome.cast.media.Media)} listener */ addMediaListener( listener: (media: chrome.cast.media.Media) => void - ):void + ): void /** * @param {function(!chrome.cast.media.Media)} listener */ removeMediaListener( listener: (media: chrome.cast.media.Media) => void - ):void + ): void /** * @param {!chrome.cast.media.LoadRequest} loadRequest @@ -423,7 +424,7 @@ declare namespace chrome.cast { loadRequest: chrome.cast.media.LoadRequest, successCallback: (media: chrome.cast.media.Media) => void, errorCallback: (error: chrome.cast.Error) => void - ):void + ): void /** * @param {!chrome.cast.media.QueueLoadRequest} queueLoadRequest @@ -434,7 +435,7 @@ declare namespace chrome.cast { queueLoadRequest: chrome.cast.media.QueueLoadRequest, successCallback: (media: chrome.cast.media.Media) => void, errorCallback: (error: chrome.cast.Error) => void - ):void + ): void } export interface Receiver { @@ -451,7 +452,7 @@ declare namespace chrome.cast { friendlyName: string, capabilities?: Array, volume?: chrome.cast.Volume - ):Receiver; + ): Receiver; label: string; friendlyName: string; @@ -471,7 +472,7 @@ declare namespace chrome.cast { new( statusText: string, appImages: Array - ):ReceiverDisplayStatus; + ): ReceiverDisplayStatus; statusText: string; appImages: Array; @@ -487,7 +488,7 @@ declare namespace chrome.cast { new( level?: number, muted?: boolean - ):Volume; + ): Volume; level?: number; muted?: boolean; @@ -500,77 +501,77 @@ declare namespace chrome.cast.media { /** * @enum {string} - * @see https://developers.google.com/cast/docs/reference/chrome/chrome.cast.media.MediaCommand + * @see https://developers.google.com/cast/docs/reference/chrome/chrome.cast.media#.MediaCommand */ - export interface MediaCommand { - PAUSE: string; - SEEK: string; - STREAM_VOLUME: string; - STREAM_MUTE: string; + export enum MediaCommand { + PAUSE = "pause", + SEEK = "seek", + STREAM_VOLUME = "stream_volume", + STREAM_MUTE = "stream_mute" } /** * @enum {number} - * @see https://developers.google.com/cast/docs/reference/chrome/chrome.cast.media.MetadataType + * @see https://developers.google.com/cast/docs/reference/chrome/chrome.cast.media#.MetadataType */ - export interface MetadataType { - GENERIC: number; - TV_SHOW: number; - MOVIE: number; - MUSIC_TRACK: number; - PHOTO: number; + export enum MetadataType { + GENERIC, + TV_SHOW, + MOVIE, + MUSIC_TRACK, + PHOTO } /** * @enum {string} - * @see https://developers.google.com/cast/docs/reference/chrome/chrome.cast.media.PlayerState + * @see https://developers.google.com/cast/docs/reference/chrome/chrome.cast.media#.PlayerState */ - export interface PlayerState { - IDLE: string; - PLAYING: string; - PAUSED: string; - BUFFERING: string; + export enum PlayerState { + IDLE = "IDLE", + PLAYING = "PLAYING", + PAUSED = "PAUSED", + BUFFERING = "BUFFERING" } /** * @enum {string} - * @see https://developers.google.com/cast/docs/reference/chrome/chrome.cast.media.ResumeState + * @see https://developers.google.com/cast/docs/reference/chrome/chrome.cast.media#.ResumeState */ - export interface ResumeState { - PLAYBACK_START: string; - PLAYBACK_PAUSE: string; + export enum ResumeState { + PLAYBACK_START = "PLAYBACK_START", + PLAYBACK_PAUSE = "PLAYBACK_PAUSE" } /** * @enum {string} - * @see https://developers.google.com/cast/docs/reference/chrome/chrome.cast.media.StreamType + * @see https://developers.google.com/cast/docs/reference/chrome/chrome.cast.media#.StreamType */ - export interface StreamType { - BUFFERED: string; - LIVE: string; - OTHER: string; + export enum StreamType { + BUFFERED = "BUFFERED", + LIVE = "LIVE", + OTHER = "OTHER" } /** * @enum {string} - * @see https://developers.google.com/cast/docs/reference/chrome/chrome.cast.media.IdleReason + * @see https://developers.google.com/cast/docs/reference/chrome/chrome.cast.media#.IdleReason */ - export interface IdleReason { - CANCELLED: string; - INTERRUPTED: string; - FINISHED: string; - ERROR: string; + export enum IdleReason { + CANCELLED = "CANCELLED", + INTERRUPTED = "INTERRUPTED", + FINISHED = "FINISHED", + ERROR = "ERROR" } /** * @enum {string} * @see https://developers.google.com/cast/docs/reference/chrome/chrome.cast.media#.RepeatMode */ - export interface RepeatMode { - OFF:string; - ALL:string; - SINGLE:string; - ALL_AND_SHUFFLE:string; + export enum RepeatMode { + OFF = "REPEAT_OFF", + ALL = "REPEAT_ALL", + SINGLE = "REPEAT_SINGLE", + ALL_AND_SHUFFLE = "REPEAT_ALL_AND_SHUFFLE" } export interface QueueItem { @@ -581,7 +582,7 @@ declare namespace chrome.cast.media { */ new( mediaInfo: chrome.cast.media.MediaInfo - ):QueueItem; + ): QueueItem; activeTrackIds: Array; autoplay: boolean; @@ -600,7 +601,7 @@ declare namespace chrome.cast.media { */ new( items: Array - ):QueueLoadRequest; + ): QueueLoadRequest; customData: Object; items: Array; @@ -616,10 +617,10 @@ declare namespace chrome.cast.media { */ new( itemsToInsert: Array - ):QueueInsertItemsRequest; + ): QueueInsertItemsRequest; customData: Object; - insertBefore:number; + insertBefore: number; items: Array; } @@ -631,7 +632,7 @@ declare namespace chrome.cast.media { */ new( itemIdsToRemove: Array - ):QueueRemoveItemsRequest; + ): QueueRemoveItemsRequest; customData: Object; itemIds: Array; @@ -645,7 +646,7 @@ declare namespace chrome.cast.media { */ new( itemIdsToReorder: Array - ):QueueReorderItemsRequest; + ): QueueReorderItemsRequest; customData: Object; insertBefore: number; @@ -660,7 +661,7 @@ declare namespace chrome.cast.media { */ new( itemsToUpdate: Array - ):QueueUpdateItemsRequest; + ): QueueUpdateItemsRequest; customData: Object; item: Array; @@ -668,71 +669,71 @@ declare namespace chrome.cast.media { /** * @enum {string} - * @see https://developers.google.com/cast/docs/reference/chrome/chrome.cast.media.TrackType + * @see https://developers.google.com/cast/docs/reference/chrome/chrome.cast.media#.TrackType */ - export interface TrackType { - TEXT: string; - AUDIO: string; - VIDEO: string; + export enum TrackType { + TEXT = "TEXT", + AUDIO = "AUDIO", + VIDEO = "VIDEO" } /** * @enum {string} - * @see https://developers.google.com/cast/docs/reference/chrome/chrome.cast.media.TextTrackType + * @see https://developers.google.com/cast/docs/reference/chrome/chrome.cast.media#.TextTrackType */ - export interface TextTrackType { - SUBTITLES: string; - CAPTIONS: string; - DESCRIPTIONS: string; - CHAPTERS: string; - METADATA: string; + export enum TextTrackType { + SUBTITLES = "SUBTITLES", + CAPTIONS = "CAPTIONS", + DESCRIPTIONS = "DESCRIPTIONS", + CHAPTERS = "CHAPTERS", + METADATA = "METADATA" } /** * @enum {string} - * @see https://developers.google.com/cast/docs/reference/chrome/chrome.cast.media.TextTrackEdgeType + * @see https://developers.google.com/cast/docs/reference/chrome/chrome.cast.media#.TextTrackEdgeType */ - export interface TextTrackEdgeType { - NONE: string; - OUTLINE: string; - DROP_SHADOW: string; - RAISED: string; - DEPRESSED: string; + export enum TextTrackEdgeType { + NONE = "NONE", + OUTLINE = "OUTLINE", + DROP_SHADOW = "DROP_SHADOW", + RAISED = "RAISED", + DEPRESSED = "DEPRESSED" } /** * @enum {string} - * @see https://developers.google.com/cast/docs/reference/chrome/chrome.cast.media.TextTrackWindowType + * @see https://developers.google.com/cast/docs/reference/chrome/chrome.cast.media#.TextTrackWindowType */ - export interface TextTrackWindowType { - NONE: string; - NORMAL: string; - ROUNDED_CORNERS: string; + export enum TextTrackWindowType { + NONE = "NONE", + NORMAL = "NORMAL", + ROUNDED_CORNERS = "ROUNDED_CORNERS" } /** * @enum {string} - * @see https://developers.google.com/cast/docs/reference/chrome/chrome.cast.media.TextTrackFontGenericFamily + * @see https://developers.google.com/cast/docs/reference/chrome/chrome.cast.media#.TextTrackFontGenericFamily */ - export interface TextTrackFontGenericFamily { - SANS_SERIF: string; - MONOSPACED_SANS_SERIF: string; - SERIF: string; - MONOSPACED_SERIF: string; - CASUAL: string; - CURSIVE: string; - SMALL_CAPITALS: string; + export enum TextTrackFontGenericFamily { + SANS_SERIF = "SANS_SERIF", + MONOSPACED_SANS_SERIF = "MONOSPACED_SANS_SERIF", + SERIF = "SERIF", + MONOSPACED_SERIF = "MONOSPACED_SERIF", + CASUAL = "CASUAL", + CURSIVE = "CURSIVE", + SMALL_CAPITALS = "SMALL_CAPITALS" } /** * @enum {string} - * @see https://developers.google.com/cast/docs/reference/chrome/chrome.cast.media.TextTrackFontStyle + * @see https://developers.google.com/cast/docs/reference/chrome/chrome.cast.media#.TextTrackFontStyle */ - export interface TextTrackFontStyle { - NORMAL: string; - BOLD: string; - BOLD_ITALIC: string; - ITALIC: string; + export enum TextTrackFontStyle { + NORMAL = "NORMAL", + BOLD = "BOLD", + BOLD_ITALIC = "BOLD_ITALIC", + ITALIC = "ITALIC" } export interface GetStatusRequest { @@ -740,7 +741,7 @@ declare namespace chrome.cast.media { * @constructor * @see https://developers.google.com/cast/docs/reference/chrome/chrome.cast.media.GetStatusRequest */ - new():GetStatusRequest; + new(): GetStatusRequest; customData: Object; } @@ -750,7 +751,7 @@ declare namespace chrome.cast.media { * @constructor * @see https://developers.google.com/cast/docs/reference/chrome/chrome.cast.media.PauseRequest */ - new():PauseRequest; + new(): PauseRequest; customData: Object; } @@ -760,7 +761,7 @@ declare namespace chrome.cast.media { * @constructor * @see https://developers.google.com/cast/docs/reference/chrome/chrome.cast.media.PlayRequest */ - new():PlayRequest; + new(): PlayRequest; customData: Object; } @@ -770,7 +771,7 @@ declare namespace chrome.cast.media { * @constructor * @see https://developers.google.com/cast/docs/reference/chrome/chrome.cast.media.SeekRequest */ - new():SeekRequest; + new(): SeekRequest; currentTime: number; resumeState: chrome.cast.media.ResumeState; @@ -782,7 +783,7 @@ declare namespace chrome.cast.media { * @constructor * @see https://developers.google.com/cast/docs/reference/chrome/chrome.cast.media.StopRequest */ - new():StopRequest; + new(): StopRequest; customData: Object; } @@ -795,21 +796,21 @@ declare namespace chrome.cast.media { */ new( volume: chrome.cast.Volume - ):VolumeRequest; + ): VolumeRequest; volume: chrome.cast.Volume; customData: Object; } - export interface LoadRequest { + export class LoadRequest { /** * @param {!chrome.cast.media.MediaInfo} mediaInfo * @constructor * @see https://developers.google.com/cast/docs/reference/chrome/chrome.cast.media.LoadRequest */ - new( + constructor( mediaInfo: chrome.cast.media.MediaInfo - ):LoadRequest; + ); activeTrackIds: Array; autoplay: boolean; @@ -828,19 +829,13 @@ declare namespace chrome.cast.media { new( activeTrackIds?: Array, textTrackStyle?: chrome.cast.media.TextTrackStyle - ):EditTracksInfoRequest; + ): EditTracksInfoRequest; activeTrackIds: Array; textTrackStyle: chrome.cast.media.TextTrackStyle; } - export interface GenericMediaMetadata { - /** - * @constructor - * @see https://developers.google.com/cast/docs/reference/chrome/chrome.cast.media.GenericMediaMetadata - */ - new():GenericMediaMetadata; - + export class GenericMediaMetadata { images: Array; metadataType: chrome.cast.media.MetadataType; releaseDate: string; @@ -857,7 +852,7 @@ declare namespace chrome.cast.media { * @constructor * @see https://developers.google.com/cast/docs/reference/chrome/chrome.cast.media.MovieMediaMetadata */ - new():MovieMediaMetadata; + new(): MovieMediaMetadata; images: Array; metadataType: chrome.cast.media.MetadataType; @@ -898,7 +893,7 @@ declare namespace chrome.cast.media { releaseYear: number; } - export interface MusicTrackMediaMetadata { + export interface MusicTrackMediaMetadata { /** * @constructor * @see https://developers.google.com/cast/docs/reference/chrome/chrome.cast.media.MusicTrackMediaMetadata @@ -947,17 +942,17 @@ declare namespace chrome.cast.media { type: chrome.cast.media.MetadataType; } - export interface MediaInfo { + export class MediaInfo { /** * @param {string} contentId * @param {string} contentType * @constructor * @see https://developers.google.com/cast/docs/reference/chrome/chrome.cast.media.MediaInfo */ - new( + constructor( contentId: string, contentType: string - ): MediaInfo; + ); contentId: string; streamType: chrome.cast.media.StreamType; @@ -1089,14 +1084,14 @@ declare namespace chrome.cast.media { * @param {function(boolean)} listener */ addUpdateListener( - listener: (isAlive:boolean) => void + listener: (isAlive: boolean) => void ): void /** * @param {function(boolean)} listener */ removeUpdateListener( - listener: (isAlive:boolean) => void + listener: (isAlive: boolean) => void ): void /** @@ -1110,7 +1105,7 @@ declare namespace chrome.cast.media { * @param {function()} successCallback * @param {function(!chrome.cast.Error)} errorCallback */ - queueAppendItem ( + queueAppendItem( item: chrome.cast.media.QueueItem, successCallback: Function, errorCallback: (error: chrome.cast.Error) => void @@ -1121,7 +1116,7 @@ declare namespace chrome.cast.media { * @param {function()} successCallback * @param {function(!chrome.cast.Error)} errorCallback */ - queueInsertItems ( + queueInsertItems( queueInsertItemsRequest: chrome.cast.media.QueueInsertItemsRequest, successCallback: Function, errorCallback: (error: chrome.cast.Error) => void @@ -1132,7 +1127,7 @@ declare namespace chrome.cast.media { * @param {function()} successCallback * @param {function(!chrome.cast.Error)} errorCallback */ - queueJumpToItem ( + queueJumpToItem( itemId: number, successCallback: Function, errorCallback: (error: chrome.cast.Error) => void @@ -1144,7 +1139,7 @@ declare namespace chrome.cast.media { * @param {function()} successCallback * @param {function(!chrome.cast.Error)} errorCallback */ - queueMoveItemToNewIndex ( + queueMoveItemToNewIndex( itemId: number, newIndex: number, successCallback: Function, @@ -1155,7 +1150,7 @@ declare namespace chrome.cast.media { * @param {function()} successCallback * @param {function(!chrome.cast.Error)} errorCallback */ - queueNext ( + queueNext( successCallback: Function, errorCallback: (error: chrome.cast.Error) => void ): void @@ -1164,7 +1159,7 @@ declare namespace chrome.cast.media { * @param {function()} successCallback * @param {function(!chrome.cast.Error)} errorCallback */ - queuePrev ( + queuePrev( successCallback: Function, errorCallback: (error: chrome.cast.Error) => void ): void @@ -1174,7 +1169,7 @@ declare namespace chrome.cast.media { * @param {function()} successCallback * @param {function(!chrome.cast.Error)} errorCallback */ - queueRemoveItem ( + queueRemoveItem( itemId: number, successCallback: Function, errorCallback: (error: chrome.cast.Error) => void @@ -1185,7 +1180,7 @@ declare namespace chrome.cast.media { * @param {function()} successCallback * @param {function(!chrome.cast.Error)} errorCallback */ - queueReorderItems ( + queueReorderItems( queueReorderItemsRequest: chrome.cast.media.QueueReorderItemsRequest, successCallback: Function, errorCallback: (error: chrome.cast.Error) => void @@ -1196,7 +1191,7 @@ declare namespace chrome.cast.media { * @param {function()} successCallback * @param {function(!chrome.cast.Error)} errorCallback */ - queueSetRepeatMode ( + queueSetRepeatMode( repeatMode: chrome.cast.media.RepeatMode, successCallback: Function, errorCallback: (error: chrome.cast.Error) => void @@ -1207,7 +1202,7 @@ declare namespace chrome.cast.media { * @param {function()} successCallback * @param {function(!chrome.cast.Error)} errorCallback */ - queueUpdateItems ( + queueUpdateItems( queueUpdateItemsRequest: chrome.cast.media.QueueUpdateItemsRequest, successCallback: Function, errorCallback: (error: chrome.cast.Error) => void diff --git a/types/chrome/chrome-webview.d.ts b/types/chrome/chrome-webview.d.ts deleted file mode 100644 index e2e0b7c429..0000000000 --- a/types/chrome/chrome-webview.d.ts +++ /dev/null @@ -1,109 +0,0 @@ -/// - -// Project: http://developer.chrome.com/apps/ -// Definitions by: Nikolai Ommundsen -// Definitions: https://github.com/DefinitelyTyped/DefinitelyTyped -// TypeScript Version: 2.4 -// -// WebView ref: https://chromium.googlesource.com/chromium/src/+/64.0.3274.2/chrome/common/extensions/api/webview_tag.json -// - - -/////////////////// -// Tag -/////////////////// -/** - * Use the webview tag to actively load live content from the web over the network and embed it in your Chrome App. Your app can control the appearance of the webview and interact with the web content, initiate navigations in an embedded web page, react to error events that happen within it, and more (see Usage). - */ -declare namespace chrome.webviewTag { - /** Options that determine what data should be cleared by `clearData`. */ - export interface ClearDataOptions { - /** Clear data accumulated on or after this date, represented in milliseconds since the epoch (accessible via the getTime method of the JavaScript Date object). If absent, defaults to 0 (which would remove all browsing data). */ - since: number; - } - export interface WindowEvent extends chrome.events.Event<() => void> {} - - export interface ConsoleEvent extends Event { - /** - * @description The severity level of the log message. Ranges from 0 to 4. - * @type {number} - * @memberof ConsoleEvent - */ - level: number, - /** - * @description The logged message contents. - * @type {string} - * @memberof ConsoleEvent - */ - message: string, - /** - * @description The line number of the message source. - * @type {number} - * @memberof ConsoleEvent - */ - line: number, - /** - * @description A string identifying the resource which logged the message. - * @type {string} - * @memberof ConsoleEvent - */ - sourceId: string - } - - /** Description of a declarative rule for handling events. */ - export interface Rule { - /** Optional priority of this rule. Defaults to 100. */ - priority?: number; - /** List of conditions that can trigger the actions. */ - conditions: any[]; - /** Optional. Optional identifier that allows referencing this rule. */ - id?: string; - /** List of actions that are triggered if one of the condtions is fulfilled. */ - actions: any[]; - /** - * @description Tags can be used to annotate rules and perform operations on sets of rules.¨ - * @since Chrome 28 - * @type {string[]} - * @memberof Rule - */ - tags?: string[]; - } - - /** - * @description Details of the script or CSS to inject. Either the code or the file property must be set, but both may not be set at the same time. - * @export - * @interface InjectDetails - */ - export interface InjectDetails { - /** - * @description JavaScript or CSS code to inject.

Warning:
Be careful using the code parameter. Incorrect use of it may open your app to cross site scripting attacks. - * @type {string} - * @memberof InjectDetails - */ - code?: string, - /** - * @description JavaScript or CSS file to inject. - * @type {string} - * @memberof InjectDetails - */ - file?: string - } - - export interface WebViewElementEventMap extends ElementEventMap { - 'message': ConsoleEvent - } - - /** - * @description - * @export - * @interface HTMLWebViewElement - * @extends {Element} - */ - export interface HTMLWebViewElement extends Element { - executeScript?: (details: InjectDetails, callback?: (result: any) => void) => void, - src: string, - contentWindow: Window - addEventListener(type: K, listener: (this: HTMLWebViewElement, ev: WebViewElementEventMap[K]) => any, useCapture?: boolean): void; - addEventListener(type: string, listener: EventListenerOrEventListenerObject, useCapture?: boolean): void; - } -} diff --git a/types/chrome/index.d.ts b/types/chrome/index.d.ts index d12bf94302..0bfec6bfd8 100644 --- a/types/chrome/index.d.ts +++ b/types/chrome/index.d.ts @@ -135,7 +135,7 @@ declare namespace chrome.alarms { name: string; } - export interface AlarmEvent extends chrome.events.Event<(alarm: Alarm) => void> {} + export interface AlarmEvent extends chrome.events.Event<(alarm: Alarm) => void> { } /** * Creates an alarm. Near the time(s) specified by alarmInfo, the onAlarm event is fired. If there is another alarm with the same name (or no name if none is specified), it will be cancelled and replaced by this alarm. @@ -195,7 +195,9 @@ declare namespace chrome.alarms { export var onAlarm: AlarmEvent; } - +//////////////////// +// Browser +//////////////////// /** * Use the chrome.browser API to interact with the Chrome browser associated with * the current application and Chrome profile. @@ -263,6 +265,7 @@ declare namespace chrome.bookmarks { export interface BookmarkRemoveInfo { index: number; parentId: string; + node: BookmarkTreeNode; } export interface BookmarkMoveInfo { @@ -281,19 +284,19 @@ declare namespace chrome.bookmarks { childIds: string[]; } - export interface BookmarkRemovedEvent extends chrome.events.Event<(id: string, removeInfo: BookmarkRemoveInfo) => void> {} + export interface BookmarkRemovedEvent extends chrome.events.Event<(id: string, removeInfo: BookmarkRemoveInfo) => void> { } - export interface BookmarkImportEndedEvent extends chrome.events.Event<() => void> {} + export interface BookmarkImportEndedEvent extends chrome.events.Event<() => void> { } - export interface BookmarkMovedEvent extends chrome.events.Event<(id: string, moveInfo: BookmarkMoveInfo) => void> {} + export interface BookmarkMovedEvent extends chrome.events.Event<(id: string, moveInfo: BookmarkMoveInfo) => void> { } - export interface BookmarkImportBeganEvent extends chrome.events.Event<() => void> {} + export interface BookmarkImportBeganEvent extends chrome.events.Event<() => void> { } - export interface BookmarkChangedEvent extends chrome.events.Event<(id: string, changeInfo: BookmarkChangeInfo) => void> {} + export interface BookmarkChangedEvent extends chrome.events.Event<(id: string, changeInfo: BookmarkChangeInfo) => void> { } - export interface BookmarkCreatedEvent extends chrome.events.Event<(id: string, bookmark: BookmarkTreeNode) => void> {} + export interface BookmarkCreatedEvent extends chrome.events.Event<(id: string, bookmark: BookmarkTreeNode) => void> { } - export interface BookmarkChildrenReordered extends chrome.events.Event<(id: string, reorderInfo: BookmarkReorderInfo) => void> {} + export interface BookmarkChildrenReordered extends chrome.events.Event<(id: string, reorderInfo: BookmarkReorderInfo) => void> { } export interface BookmarkSearchQuery { query?: string; @@ -479,7 +482,7 @@ declare namespace chrome.browserAction { popup: string; } - export interface BrowserClickedEvent extends chrome.events.Event<(tab: chrome.tabs.Tab) => void> {} + export interface BrowserClickedEvent extends chrome.events.Event<(tab: chrome.tabs.Tab) => void> { } /** * Since Chrome 22. @@ -736,7 +739,7 @@ declare namespace chrome.commands { shortcut?: string; } - export interface CommandEvent extends chrome.events.Event<(command: string) => void> {} + export interface CommandEvent extends chrome.events.Event<(command: string) => void> { } /** * Returns all the registered extension commands for this extension and their shortcut (if active). @@ -1061,7 +1064,7 @@ declare namespace chrome.contextMenus { type?: string; } - export interface MenuClickedEvent extends chrome.events.Event<(info: OnClickData, tab?: chrome.tabs.Tab) => void> {} + export interface MenuClickedEvent extends chrome.events.Event<(info: OnClickData, tab?: chrome.tabs.Tab) => void> { } /** * Since Chrome 38. @@ -1222,7 +1225,7 @@ declare namespace chrome.cookies { cause: string; } - export interface CookieChangedEvent extends chrome.events.Event<(changeInfo: CookieChangeInfo) => void> {} + export interface CookieChangedEvent extends chrome.events.Event<(changeInfo: CookieChangeInfo) => void> { } /** * Lists all existing cookie stores. @@ -1326,9 +1329,9 @@ declare module chrome { faviconUrl?: string; } - export interface DebuggerDetachedEvent extends chrome.events.Event<(source: Debuggee, reason: string) => void> {} + export interface DebuggerDetachedEvent extends chrome.events.Event<(source: Debuggee, reason: string) => void> { } - export interface DebuggerEventEvent extends chrome.events.Event<(source: Debuggee, method: string, params?: Object) => void> {} + export interface DebuggerEventEvent extends chrome.events.Event<(source: Debuggee, method: string, params?: Object) => void> { } /** * Attaches debugger to the given target. @@ -1373,7 +1376,7 @@ declare module chrome { export var onEvent: DebuggerEventEvent; } - export {_debugger as debugger} + export { _debugger as debugger } } //////////////////// // Declarative Content @@ -1442,14 +1445,14 @@ declare namespace chrome.declarativeContent { /** Matches the state of a web page by various criteria. */ export class PageStateMatcher { - constructor(options: PageStateMatcherProperties); + constructor (options: PageStateMatcherProperties); } /** Declarative event action that shows the extension's page action while the corresponding conditions are met. */ - export class ShowPageAction {} + export class ShowPageAction { } /** Provides the Declarative Event API consisting of addRules, removeRules, and getRules. */ - export interface PageChangedEvent extends chrome.events.Event<() => void> {} + export interface PageChangedEvent extends chrome.events.Event<() => void> { } export var onPageChanged: PageChangedEvent; } @@ -1558,7 +1561,7 @@ declare namespace chrome.declarativeWebRequest { filter: RequestCookie; } - export interface RequestedEvent extends chrome.events.Event {} + export interface RequestedEvent extends chrome.events.Event { } export var onRequest: RequestedEvent; } @@ -1659,9 +1662,9 @@ declare namespace chrome.devtools.inspectedWindow { value: string; } - export interface ResourceAddedEvent extends chrome.events.Event<(resource: Resource) => void> {} + export interface ResourceAddedEvent extends chrome.events.Event<(resource: Resource) => void> { } - export interface ResourceContentCommittedEvent extends chrome.events.Event<(resource: Resource, content: string) => void> {} + export interface ResourceContentCommittedEvent extends chrome.events.Event<(resource: Resource, content: string) => void> { } /** The ID of the tab being inspected. This ID may be used with chrome.tabs.* API. */ export var tabId: number; @@ -1678,6 +1681,17 @@ declare namespace chrome.devtools.inspectedWindow { * Parameter exceptionInfo: An object providing details if an exception occurred while evaluating the expression. */ export function eval(expression: string, callback?: (result: T, exceptionInfo: EvaluationExceptionInfo) => void): void; + /** + * Evaluates a JavaScript expression in the context of the main frame of the inspected page. The expression must evaluate to a JSON-compliant object, otherwise an exception is thrown. The eval function can report either a DevTools-side error or a JavaScript exception that occurs during evaluation. In either case, the result parameter of the callback is undefined. In the case of a DevTools-side error, the isException parameter is non-null and has isError set to true and code set to an error code. In the case of a JavaScript error, isException is set to true and value is set to the string value of thrown object. + * @param expression An expression to evaluate. + * @param options The options parameter can contain one or more options. + * @param callback A function called when evaluation completes. + * If you specify the callback parameter, it should be a function that looks like this: + * function(object result, object exceptionInfo) {...}; + * Parameter result: The result of evaluation. + * Parameter exceptionInfo: An object providing details if an exception occurred while evaluating the expression. + */ + export function eval(expression: string, options: EvalOptions, callback?: (result: T, exceptionInfo: EvaluationExceptionInfo) => void): void; /** * Retrieves the list of resources from the inspected page. * @param callback A function that receives the list of resources when the request completes. @@ -1690,6 +1704,15 @@ declare namespace chrome.devtools.inspectedWindow { export var onResourceAdded: ResourceAddedEvent; /** Fired when a new revision of the resource is committed (e.g. user saves an edited version of the resource in the Developer Tools). */ export var onResourceContentCommitted: ResourceContentCommittedEvent; + + export interface EvalOptions { + /** If specified, the expression is evaluated on the iframe whose URL matches the one specified. By default, the expression is evaluated in the top frame of the inspected page. */ + frameURL?: string; + /** Evaluate the expression in the context of the content script of the calling extension, provided that the content script is already injected into the inspected page. If not, the expression is not evaluated and the callback is invoked with the exception parameter set to an object that has the isError field set to true and the code field set to E_NOTFOUND. */ + useContentScriptContext?: boolean; + /** Evaluate the expression in the context of a content script of an extension that matches the specified origin. If given, contextSecurityOrigin overrides the 'true' setting on userContentScriptContext. */ + contextSecurityOrigin?: string; + } } //////////////////// @@ -1713,9 +1736,9 @@ declare namespace chrome.devtools.network { getContent(callback: (content: string, encoding: string) => void): void; } - export interface RequestFinishedEvent extends chrome.events.Event<(request: Request) => void> {} + export interface RequestFinishedEvent extends chrome.events.Event<(request: Request) => void> { } - export interface NavigatedEvent extends chrome.events.Event<(url: string) => void> {} + export interface NavigatedEvent extends chrome.events.Event<(url: string) => void> { } /** * Returns HAR log that contains all known network requests. @@ -1740,11 +1763,11 @@ declare namespace chrome.devtools.network { * Availability: Since Chrome 18. */ declare namespace chrome.devtools.panels { - export interface PanelShownEvent extends chrome.events.Event<(window: Window) => void> {} + export interface PanelShownEvent extends chrome.events.Event<(window: Window) => void> { } - export interface PanelHiddenEvent extends chrome.events.Event<() => void> {} + export interface PanelHiddenEvent extends chrome.events.Event<() => void> { } - export interface PanelSearchEvent extends chrome.events.Event<(action: string, queryString?: string) => void> {} + export interface PanelSearchEvent extends chrome.events.Event<(action: string, queryString?: string) => void> { } /** Represents a panel created by extension. */ export interface ExtensionPanel { @@ -1763,7 +1786,7 @@ declare namespace chrome.devtools.panels { onSearch: PanelSearchEvent; } - export interface ButtonClickedEvent extends chrome.events.Event<() => void> {} + export interface ButtonClickedEvent extends chrome.events.Event<() => void> { } /** A button created by the extension. */ export interface Button { @@ -1778,7 +1801,7 @@ declare namespace chrome.devtools.panels { onClicked: ButtonClickedEvent; } - export interface SelectionChangedEvent extends chrome.events.Event<() => void> {} + export interface SelectionChangedEvent extends chrome.events.Event<() => void> { } /** Represents the Elements panel. */ export interface ElementsPanel { @@ -1813,9 +1836,9 @@ declare namespace chrome.devtools.panels { onSelectionChanged: SelectionChangedEvent; } - export interface ExtensionSidebarPaneShownEvent extends chrome.events.Event<(window: chrome.windows.Window) => void> {} + export interface ExtensionSidebarPaneShownEvent extends chrome.events.Event<(window: chrome.windows.Window) => void> { } - export interface ExtensionSidebarPaneHiddenEvent extends chrome.events.Event<() => void> {} + export interface ExtensionSidebarPaneHiddenEvent extends chrome.events.Event<() => void> { } /** A sidebar created by the extension. */ export interface ExtensionSidebarPane { @@ -2131,13 +2154,13 @@ declare namespace chrome.downloads { conflictAction?: string; } - export interface DownloadChangedEvent extends chrome.events.Event<(downloadDelta: DownloadDelta) => void> {} + export interface DownloadChangedEvent extends chrome.events.Event<(downloadDelta: DownloadDelta) => void> { } - export interface DownloadCreatedEvent extends chrome.events.Event<(downloadItem: DownloadItem) => void> {} + export interface DownloadCreatedEvent extends chrome.events.Event<(downloadItem: DownloadItem) => void> { } - export interface DownloadErasedEvent extends chrome.events.Event<(downloadId: number) => void> {} + export interface DownloadErasedEvent extends chrome.events.Event<(downloadId: number) => void> { } - export interface DownloadDeterminingFilenameEvent extends chrome.events.Event<(downloadItem: DownloadItem, suggest: (suggestion?: DownloadFilenameSuggestion) => void) => void> {} + export interface DownloadDeterminingFilenameEvent extends chrome.events.Event<(downloadItem: DownloadItem, suggest: (suggestion?: DownloadFilenameSuggestion) => void) => void> { } /** * Find DownloadItem. Set query to the empty object to get all DownloadItem. To get a specific DownloadItem, set only the id field. To page through a large number of items, set orderBy: ['-startTime'], set limit to the number of items per page, and set startedAfter to the startTime of the last item from the last page. @@ -2486,7 +2509,7 @@ declare namespace chrome.extension { message: string; } - export interface OnRequestEvent extends chrome.events.Event<((request: any, sender: runtime.MessageSender, sendResponse: (response: any) => void) => void) | ((sender: runtime.MessageSender, sendResponse: (response: any) => void) => void)> {} + export interface OnRequestEvent extends chrome.events.Event<((request: any, sender: runtime.MessageSender, sendResponse: (response: any) => void) => void) | ((sender: runtime.MessageSender, sendResponse: (response: any) => void) => void)> { } /** * Since Chrome 7. @@ -2597,7 +2620,7 @@ declare namespace chrome.fileBrowserHandler { entries: any[]; } - export interface FileBrowserHandlerExecuteEvent extends chrome.events.Event<(id: string, details: FileHandlerExecuteEventDetails) => void> {} + export interface FileBrowserHandlerExecuteEvent extends chrome.events.Event<(id: string, details: FileHandlerExecuteEventDetails) => void> { } /** * Prompts user to select file path under which file should be saved. When the file is selected, file access permission required to use the file (read, write and create) are granted to the caller. The file will not actually get created during the function call, so function caller must ensure its existence before using it. The function has to be invoked with a user gesture. @@ -2843,33 +2866,33 @@ declare namespace chrome.fileSystemProvider { operationRequestId: number; } - export interface RequestedEvent extends chrome.events.Event<(options: RequestedEventOptions, successCallback: Function, errorCallback: (error: string) => void) => void> {} + export interface RequestedEvent extends chrome.events.Event<(options: RequestedEventOptions, successCallback: Function, errorCallback: (error: string) => void) => void> { } - export interface MetadataRequestedEvent extends chrome.events.Event<(options: MetadataRequestedEventOptions, successCallback: (metadata: EntryMetadata) => void, errorCallback: (error: string) => void) => void> {} + export interface MetadataRequestedEvent extends chrome.events.Event<(options: MetadataRequestedEventOptions, successCallback: (metadata: EntryMetadata) => void, errorCallback: (error: string) => void) => void> { } - export interface DirectoryPathRequestedEvent extends chrome.events.Event<(options: DirectoryPathRequestedEventOptions, successCallback: (entries: EntryMetadata[], hasMore: boolean) => void, errorCallback: (error: string) => void) => void> {} + export interface DirectoryPathRequestedEvent extends chrome.events.Event<(options: DirectoryPathRequestedEventOptions, successCallback: (entries: EntryMetadata[], hasMore: boolean) => void, errorCallback: (error: string) => void) => void> { } - export interface OpenFileRequestedEvent extends chrome.events.Event<(options: OpenFileRequestedEventOptions, successCallback: Function, errorCallback: (error: string) => void) => void> {} + export interface OpenFileRequestedEvent extends chrome.events.Event<(options: OpenFileRequestedEventOptions, successCallback: Function, errorCallback: (error: string) => void) => void> { } - export interface OpenedFileRequestedEvent extends chrome.events.Event<(options: OpenedFileRequestedEventOptions, successCallback: Function, errorCallback: (error: string) => void) => void> {} + export interface OpenedFileRequestedEvent extends chrome.events.Event<(options: OpenedFileRequestedEventOptions, successCallback: Function, errorCallback: (error: string) => void) => void> { } - export interface OpenedFileOffsetRequestedEvent extends chrome.events.Event<(options: OpenedFileOffsetRequestedEventOptions, successCallback: (data: ArrayBuffer, hasMore: boolean) => void, errorCallback: (error: string) => void) => void> {} + export interface OpenedFileOffsetRequestedEvent extends chrome.events.Event<(options: OpenedFileOffsetRequestedEventOptions, successCallback: (data: ArrayBuffer, hasMore: boolean) => void, errorCallback: (error: string) => void) => void> { } - export interface DirectoryPathRecursiveRequestedEvent extends chrome.events.Event<(options: DirectoryPathRecursiveRequestedEventOptions, successCallback: Function, errorCallback: (error: string) => void) => void> {} + export interface DirectoryPathRecursiveRequestedEvent extends chrome.events.Event<(options: DirectoryPathRecursiveRequestedEventOptions, successCallback: Function, errorCallback: (error: string) => void) => void> { } - export interface EntryPathRecursiveRequestedEvent extends chrome.events.Event<(options: EntryPathRecursiveRequestedEventOptions, successCallback: Function, errorCallback: (error: string) => void) => void> {} + export interface EntryPathRecursiveRequestedEvent extends chrome.events.Event<(options: EntryPathRecursiveRequestedEventOptions, successCallback: Function, errorCallback: (error: string) => void) => void> { } - export interface FilePathRequestedEvent extends chrome.events.Event<(options: FilePathRequestedEventOptions, successCallback: Function, errorCallback: (error: string) => void) => void> {} + export interface FilePathRequestedEvent extends chrome.events.Event<(options: FilePathRequestedEventOptions, successCallback: Function, errorCallback: (error: string) => void) => void> { } - export interface SourceTargetPathRequestedEvent extends chrome.events.Event<(options: SourceTargetPathRequestedEventOptions, successCallback: Function, errorCallback: (error: string) => void) => void> {} + export interface SourceTargetPathRequestedEvent extends chrome.events.Event<(options: SourceTargetPathRequestedEventOptions, successCallback: Function, errorCallback: (error: string) => void) => void> { } - export interface FilePathLengthRequestedEvent extends chrome.events.Event<(options: FilePathLengthRequestedEventOptions, successCallback: Function, errorCallback: (error: string) => void) => void> {} + export interface FilePathLengthRequestedEvent extends chrome.events.Event<(options: FilePathLengthRequestedEventOptions, successCallback: Function, errorCallback: (error: string) => void) => void> { } - export interface OpenedFileIoRequestedEvent extends chrome.events.Event<(options: OpenedFileIoRequestedEventOptions, successCallback: Function, errorCallback: (error: string) => void) => void> {} + export interface OpenedFileIoRequestedEvent extends chrome.events.Event<(options: OpenedFileIoRequestedEventOptions, successCallback: Function, errorCallback: (error: string) => void) => void> { } - export interface OperationRequestedEvent extends chrome.events.Event<(options: OperationRequestedEventOptions, successCallback: Function, errorCallback: (error: string) => void) => void> {} + export interface OperationRequestedEvent extends chrome.events.Event<(options: OperationRequestedEventOptions, successCallback: Function, errorCallback: (error: string) => void) => void> { } - export interface OptionlessRequestedEvent extends chrome.events.Event<(successCallback: Function, errorCallback: (error: string) => void) => void> {} + export interface OptionlessRequestedEvent extends chrome.events.Event<(successCallback: Function, errorCallback: (error: string) => void) => void> { } /** * Mounts a file system with the given fileSystemId and displayName. displayName will be shown in the left panel of Files.app. displayName can contain any characters including '/', but cannot be an empty string. displayName must be descriptive but doesn't have to be unique. The fileSystemId must not be an empty string. @@ -3030,13 +3053,13 @@ declare namespace chrome.fontSettings { fontId: string; } - export interface DefaultFixedFontSizeChangedEvent extends chrome.events.Event<(details: FontSizeDetails) => void> {} + export interface DefaultFixedFontSizeChangedEvent extends chrome.events.Event<(details: FontSizeDetails) => void> { } - export interface DefaultFontSizeChangedEvent extends chrome.events.Event<(details: FontSizeDetails) => void> {} + export interface DefaultFontSizeChangedEvent extends chrome.events.Event<(details: FontSizeDetails) => void> { } - export interface MinimumFontSizeChangedEvent extends chrome.events.Event<(details: FontSizeDetails) => void> {} + export interface MinimumFontSizeChangedEvent extends chrome.events.Event<(details: FontSizeDetails) => void> { } - export interface FontChangedEvent extends chrome.events.Event<(details: FullFontDetails) => void> {} + export interface FontChangedEvent extends chrome.events.Event<(details: FullFontDetails) => void> { } /** * Sets the default font size. @@ -3178,11 +3201,11 @@ declare namespace chrome.gcm { detail: Object; } - export interface MessageReceptionEvent extends chrome.events.Event<(message: IncomingMessage) => void> {} + export interface MessageReceptionEvent extends chrome.events.Event<(message: IncomingMessage) => void> { } - export interface MessageDeletionEvent extends chrome.events.Event<() => void> {} + export interface MessageDeletionEvent extends chrome.events.Event<() => void> { } - export interface GcmErrorEvent extends chrome.events.Event<(error: GcmError) => void> {} + export interface GcmErrorEvent extends chrome.events.Event<(error: GcmError) => void> { } /** The maximum size (in bytes) of all key/value pairs in a message. */ export var MAX_MESSAGE_SIZE: number; @@ -3290,9 +3313,9 @@ declare namespace chrome.history { urls?: string[]; } - export interface HistoryVisitedEvent extends chrome.events.Event<(result: HistoryItem) => void> {} + export interface HistoryVisitedEvent extends chrome.events.Event<(result: HistoryItem) => void> { } - export interface HistoryVisitRemovedEvent extends chrome.events.Event<(removed: RemovedResult) => void> {} + export interface HistoryVisitRemovedEvent extends chrome.events.Event<(removed: RemovedResult) => void> { } /** * Searches the history for the last visit time of each page matching the query. @@ -3452,7 +3475,7 @@ declare namespace chrome.identity { interactive?: boolean; } - export interface SignInChangeEvent extends chrome.events.Event<(account: AccountInfo, signedIn: boolean) => void> {} + export interface SignInChangeEvent extends chrome.events.Event<(account: AccountInfo, signedIn: boolean) => void> { } /** * Retrieves a list of AccountInfo objects describing the accounts present on the profile. @@ -3519,7 +3542,7 @@ declare namespace chrome.identity { * @since Chrome 6. */ declare namespace chrome.idle { - export interface IdleStateChangedEvent extends chrome.events.Event<(newState: string) => void> {} + export interface IdleStateChangedEvent extends chrome.events.Event<(newState: string) => void> { } /** * Returns "locked" if the system is locked, "idle" if the user has not generated any input for a specified number of seconds, or "active" otherwise. @@ -3808,25 +3831,25 @@ declare namespace chrome.input.ime { anchor: number; } - export interface BlurEvent extends chrome.events.Event<(contextID: number) => void> {} + export interface BlurEvent extends chrome.events.Event<(contextID: number) => void> { } - export interface CandidateClickedEvent extends chrome.events.Event<(engineID: string, candidateID: number, button: string) => void> {} + export interface CandidateClickedEvent extends chrome.events.Event<(engineID: string, candidateID: number, button: string) => void> { } - export interface KeyEventEvent extends chrome.events.Event<(engineID: string, keyData: KeyboardEvent) => void> {} + export interface KeyEventEvent extends chrome.events.Event<(engineID: string, keyData: KeyboardEvent) => void> { } - export interface DeactivatedEvent extends chrome.events.Event<(engineID: string) => void> {} + export interface DeactivatedEvent extends chrome.events.Event<(engineID: string) => void> { } - export interface InputContextUpdateEvent extends chrome.events.Event<(context: InputContext) => void> {} + export interface InputContextUpdateEvent extends chrome.events.Event<(context: InputContext) => void> { } - export interface ActivateEvent extends chrome.events.Event<(engineID: string, screen: string) => void> {} + export interface ActivateEvent extends chrome.events.Event<(engineID: string, screen: string) => void> { } - export interface FocusEvent extends chrome.events.Event<(context: InputContext) => void> {} + export interface FocusEvent extends chrome.events.Event<(context: InputContext) => void> { } - export interface MenuItemActivatedEvent extends chrome.events.Event<(engineID: string, name: string) => void> {} + export interface MenuItemActivatedEvent extends chrome.events.Event<(engineID: string, name: string) => void> { } - export interface SurroundingTextChangedEvent extends chrome.events.Event<(engineID: string, surroundingInfo: SurroundingTextInfo) => void> {} + export interface SurroundingTextChangedEvent extends chrome.events.Event<(engineID: string, surroundingInfo: SurroundingTextInfo) => void> { } - export interface InputResetEvent extends chrome.events.Event<(engineID: string) => void> {} + export interface InputResetEvent extends chrome.events.Event<(engineID: string) => void> { } /** * Adds the provided menu items to the language menu when this IME is active. @@ -4058,13 +4081,13 @@ declare namespace chrome.management { showConfirmDialog?: boolean; } - export interface ManagementDisabledEvent extends chrome.events.Event<(info: ExtensionInfo) => void> {} + export interface ManagementDisabledEvent extends chrome.events.Event<(info: ExtensionInfo) => void> { } - export interface ManagementUninstalledEvent extends chrome.events.Event<(id: string) => void> {} + export interface ManagementUninstalledEvent extends chrome.events.Event<(id: string) => void> { } - export interface ManagementInstalledEvent extends chrome.events.Event<(info: ExtensionInfo) => void> {} + export interface ManagementInstalledEvent extends chrome.events.Event<(info: ExtensionInfo) => void> { } - export interface ManagementEnabledEvent extends chrome.events.Event<(info: ExtensionInfo) => void> {} + export interface ManagementEnabledEvent extends chrome.events.Event<(info: ExtensionInfo) => void> { } /** * Enables or disables an app or extension. @@ -4211,7 +4234,7 @@ declare namespace chrome.networking.config { Security?: string; } - export interface CaptivePorttalDetectedEvent extends chrome.events.Event<(networkInfo: NetworkInfo) => void> {} + export interface CaptivePorttalDetectedEvent extends chrome.events.Event<(networkInfo: NetworkInfo) => void> { } /** * Allows an extension to define network filters for the networks it can handle. A call to this function will remove all filters previously installed by the extension before setting the new list. @@ -4316,15 +4339,15 @@ declare namespace chrome.notifications { requireInteraction?: boolean; } - export interface NotificationClosedEvent extends chrome.events.Event<(notificationId: string, byUser: boolean) => void> {} + export interface NotificationClosedEvent extends chrome.events.Event<(notificationId: string, byUser: boolean) => void> { } - export interface NotificationClickedEvent extends chrome.events.Event<(notificationId: string) => void> {} + export interface NotificationClickedEvent extends chrome.events.Event<(notificationId: string) => void> { } - export interface NotificationButtonClickedEvent extends chrome.events.Event<(notificationId: string, buttonIndex: number) => void> {} + export interface NotificationButtonClickedEvent extends chrome.events.Event<(notificationId: string, buttonIndex: number) => void> { } - export interface NotificationPermissionLevelChangedEvent extends chrome.events.Event<(level: string) => void> {} + export interface NotificationPermissionLevelChangedEvent extends chrome.events.Event<(level: string) => void> { } - export interface NotificationShowSettingsEvent extends chrome.events.Event<() => void> {} + export interface NotificationShowSettingsEvent extends chrome.events.Event<() => void> { } /** The notification closed, either by the system or by user action. */ export var onClosed: NotificationClosedEvent; @@ -4424,13 +4447,13 @@ declare namespace chrome.omnibox { description: string; } - export interface OmniboxInputEnteredEvent extends chrome.events.Event<(text: string) => void> {} + export interface OmniboxInputEnteredEvent extends chrome.events.Event<(text: string) => void> { } - export interface OmniboxInputChangedEvent extends chrome.events.Event<(text: string, suggest: (suggestResults: SuggestResult[]) => void) => void> {} + export interface OmniboxInputChangedEvent extends chrome.events.Event<(text: string, suggest: (suggestResults: SuggestResult[]) => void) => void> { } - export interface OmniboxInputStartedEvent extends chrome.events.Event<() => void> {} + export interface OmniboxInputStartedEvent extends chrome.events.Event<() => void> { } - export interface OmniboxInputCancelledEvent extends chrome.events.Event<() => void> {} + export interface OmniboxInputCancelledEvent extends chrome.events.Event<() => void> { } /** * Sets the description and styling for the default suggestion. The default suggestion is the text that is displayed in the first suggestion row underneath the URL bar. @@ -4457,7 +4480,7 @@ declare namespace chrome.omnibox { * @since Chrome 5. */ declare namespace chrome.pageAction { - export interface PageActionClickedEvent extends chrome.events.Event<(tab: chrome.tabs.Tab) => void> {} + export interface PageActionClickedEvent extends chrome.events.Event<(tab: chrome.tabs.Tab) => void> { } export interface TitleDetails { /** The id of the tab for which you want to modify the page action. */ @@ -4766,13 +4789,13 @@ declare namespace chrome.printerProvider { document: Blob; } - export interface PrinterRequestedEvent extends chrome.events.Event<(resultCallback: (printerInfo: PrinterInfo[]) => void) => void> {} + export interface PrinterRequestedEvent extends chrome.events.Event<(resultCallback: (printerInfo: PrinterInfo[]) => void) => void> { } - export interface PrinterInfoRequestedEvent extends chrome.events.Event<(device: any, resultCallback: (printerInfo?: PrinterInfo) => void) => void> {} + export interface PrinterInfoRequestedEvent extends chrome.events.Event<(device: any, resultCallback: (printerInfo?: PrinterInfo) => void) => void> { } - export interface CapabilityRequestedEvent extends chrome.events.Event<(printerId: string, resultCallback: (capabilities: PrinterCapabilities) => void) => void> {} + export interface CapabilityRequestedEvent extends chrome.events.Event<(printerId: string, resultCallback: (capabilities: PrinterCapabilities) => void) => void> { } - export interface PrintRequestedEvent extends chrome.events.Event<(printJob: PrintJob, resultCallback: (result: string) => void) => void> {} + export interface PrintRequestedEvent extends chrome.events.Event<(printJob: PrintJob, resultCallback: (result: string) => void) => void> { } /** Event fired when print manager requests printers provided by extensions. */ export var onGetPrintersRequested: PrinterRequestedEvent; @@ -4909,7 +4932,7 @@ declare namespace chrome.proxy { fatal: boolean; } - export interface ProxyErrorEvent extends chrome.events.Event<(details: ErrorDetails) => void> {} + export interface ProxyErrorEvent extends chrome.events.Event<(details: ErrorDetails) => void> { } export var settings: chrome.types.ChromeSetting; /** Notifies about proxy errors. */ @@ -5039,21 +5062,21 @@ declare namespace chrome.runtime { version: string; } - export interface PortDisconnectEvent extends chrome.events.Event<(port: Port) => void> {} + export interface PortDisconnectEvent extends chrome.events.Event<(port: Port) => void> { } - export interface PortMessageEvent extends chrome.events.Event<(message: any, port: Port) => void> {} + export interface PortMessageEvent extends chrome.events.Event<(message: any, port: Port) => void> { } - export interface ExtensionMessageEvent extends chrome.events.Event<(message: any, sender: MessageSender, sendResponse: (response: any) => void) => void> {} + export interface ExtensionMessageEvent extends chrome.events.Event<(message: any, sender: MessageSender, sendResponse: (response: any) => void) => void> { } - export interface ExtensionConnectEvent extends chrome.events.Event<(port: Port) => void> {} + export interface ExtensionConnectEvent extends chrome.events.Event<(port: Port) => void> { } - export interface RuntimeInstalledEvent extends chrome.events.Event<(details: InstalledDetails) => void> {} + export interface RuntimeInstalledEvent extends chrome.events.Event<(details: InstalledDetails) => void> { } - export interface RuntimeEvent extends chrome.events.Event<() => void> {} + export interface RuntimeEvent extends chrome.events.Event<() => void> { } - export interface RuntimeRestartRequiredEvent extends chrome.events.Event<(reason: string) => void> {} + export interface RuntimeRestartRequiredEvent extends chrome.events.Event<(reason: string) => void> { } - export interface RuntimeUpdateAvailableEvent extends chrome.events.Event<(details: UpdateAvailableDetails) => void> {} + export interface RuntimeUpdateAvailableEvent extends chrome.events.Event<(details: UpdateAvailableDetails) => void> { } export interface ManifestIcons { [size: number]: string; @@ -5441,7 +5464,7 @@ declare namespace chrome.scriptBadge { popup: string; } - export interface ScriptBadgeClickedEvent extends chrome.events.Event<(tab: chrome.tabs.Tab) => void> {} + export interface ScriptBadgeClickedEvent extends chrome.events.Event<(tab: chrome.tabs.Tab) => void> { } export function getPopup(details: GetPopupDetails, callback: Function): void; export function getAttention(details: AttentionDetails): void; @@ -5489,7 +5512,7 @@ declare namespace chrome.sessions { sessions: Session[]; } - export interface SessionChangedEvent extends chrome.events.Event<() => void> {} + export interface SessionChangedEvent extends chrome.events.Event<() => void> { } /** The maximum number of sessions.Session that will be included in a requested list. */ export var MAX_SESSION_RESULTS: number; @@ -5625,7 +5648,7 @@ declare namespace chrome.storage { MAX_WRITE_OPERATIONS_PER_MINUTE: number; } - export interface StorageChangedEvent extends chrome.events.Event<(changes: { [key: string]: StorageChange }, areaName: string) => void> {} + export interface StorageChangedEvent extends chrome.events.Event<(changes: { [key: string]: StorageChange }, areaName: string) => void> { } /** Items in the local storage area are local to each machine. */ export var local: LocalStorageArea; @@ -5799,9 +5822,9 @@ declare namespace chrome.system.storage { availableCapacity: number; } - export interface SystemStorageAttachedEvent extends chrome.events.Event<(info: StorageUnitInfo) => void> {} + export interface SystemStorageAttachedEvent extends chrome.events.Event<(info: StorageUnitInfo) => void> { } - export interface SystemStorageDetachedEvent extends chrome.events.Event<(id: string) => void> {} + export interface SystemStorageDetachedEvent extends chrome.events.Event<(id: string) => void> { } /** Get the storage information from the system. The argument passed to the callback is an array of StorageUnitInfo objects. */ export function getInfo(callback: (info: StorageUnitInfo[]) => void): void; @@ -5855,7 +5878,7 @@ declare namespace chrome.tabCapture { videoConstraints?: MediaStreamConstraints; } - export interface CaptureStatusChangedEvent extends chrome.events.Event<(info: CaptureInfo) => void> {} + export interface CaptureStatusChangedEvent extends chrome.events.Event<(info: CaptureInfo) => void> { } /** * Captures the visible area of the currently active tab. Capture can only be started on the currently active tab after the extension has been invoked. Capture is maintained across page navigations within the tab, and stops when the tab is closed, or the media stream is closed by the extension. @@ -5968,6 +5991,16 @@ declare namespace chrome.tabs { * @since Chrome 45. */ audible?: boolean; + /** + * Whether the tab is discarded. A discarded tab is one whose content has been unloaded from memory, but is still visible in the tab strip. Its content gets reloaded the next time it's activated. + * @since Chrome 54. + */ + discarded: boolean; + /** + * Whether the tab can be discarded automatically by the browser when resources are low. + * @since Chrome 54. + */ + autoDiscardable: boolean; /** * Optional. * Current tab muted state and the reason for the last state change. @@ -6132,6 +6165,11 @@ declare namespace chrome.tabs { * @since Chrome 45. */ muted?: boolean; + /** + * Optional. Whether the tab should be discarded automatically by the browser when resources are low. + * @since Chrome 54. + */ + autoDiscardable?: boolean; } export interface CaptureVisibleTabOptions { @@ -6179,7 +6217,7 @@ declare namespace chrome.tabs { * Optional. Whether the tabs have completed loading. * One of: "loading", or "complete" */ - status?: string; + status?: 'loading' | 'complete'; /** * Optional. Whether the tabs are in the last focused window. * @since Chrome 19. @@ -6191,7 +6229,7 @@ declare namespace chrome.tabs { * Optional. The type of window the tabs are in. * One of: "normal", "popup", "panel", "app", or "devtools" */ - windowType?: string; + windowType?: 'normal' | 'popup' | 'panel' | 'app' | 'devtools'; /** Optional. Whether the tabs are active in their windows. */ active?: boolean; /** @@ -6210,6 +6248,18 @@ declare namespace chrome.tabs { currentWindow?: boolean; /** Optional. Whether the tabs are highlighted. */ highlighted?: boolean; + /** + * Optional. + * Whether the tabs are discarded. A discarded tab is one whose content has been unloaded from memory, but is still visible in the tab strip. Its content gets reloaded the next time it's activated. + * @since Chrome 54. + */ + discarded?: boolean; + /** + * Optional. + * Whether the tabs can be discarded automatically by the browser when resources are low. + * @since Chrome 54. + */ + autoDiscardable?: boolean; /** Optional. Whether the tabs are pinned. */ pinned?: boolean; /** @@ -6259,6 +6309,16 @@ declare namespace chrome.tabs { * @since Chrome 45. */ audible?: boolean; + /** + * The tab's new discarded state. + * @since Chrome 54. + */ + discarded?: boolean; + /** + * The tab's new auto-discardable + * @since Chrome 54. + */ + autoDiscardable?: boolean; /** * The tab's new muted state and the reason for the change. * @since Chrome 46. Warning: this is the current Beta channel. @@ -6306,27 +6366,27 @@ declare namespace chrome.tabs { zoomSettings: ZoomSettings; } - export interface TabHighlightedEvent extends chrome.events.Event<(highlightInfo: HighlightInfo) => void> {} + export interface TabHighlightedEvent extends chrome.events.Event<(highlightInfo: HighlightInfo) => void> { } - export interface TabRemovedEvent extends chrome.events.Event<(tabId: number, removeInfo: TabRemoveInfo) => void> {} + export interface TabRemovedEvent extends chrome.events.Event<(tabId: number, removeInfo: TabRemoveInfo) => void> { } - export interface TabUpdatedEvent extends chrome.events.Event<(tabId: number, changeInfo: TabChangeInfo, tab: Tab) => void> {} + export interface TabUpdatedEvent extends chrome.events.Event<(tabId: number, changeInfo: TabChangeInfo, tab: Tab) => void> { } - export interface TabAttachedEvent extends chrome.events.Event<(tabId: number, attachInfo: TabAttachInfo) => void> {} + export interface TabAttachedEvent extends chrome.events.Event<(tabId: number, attachInfo: TabAttachInfo) => void> { } - export interface TabMovedEvent extends chrome.events.Event<(tabId: number, moveInfo: TabMoveInfo) => void> {} + export interface TabMovedEvent extends chrome.events.Event<(tabId: number, moveInfo: TabMoveInfo) => void> { } - export interface TabDetachedEvent extends chrome.events.Event<(tabId: number, detachInfo: TabDetachInfo) => void> {} + export interface TabDetachedEvent extends chrome.events.Event<(tabId: number, detachInfo: TabDetachInfo) => void> { } - export interface TabCreatedEvent extends chrome.events.Event<(tab: Tab) => void> {} + export interface TabCreatedEvent extends chrome.events.Event<(tab: Tab) => void> { } - export interface TabActivatedEvent extends chrome.events.Event<(activeInfo: TabActiveInfo) => void> {} + export interface TabActivatedEvent extends chrome.events.Event<(activeInfo: TabActiveInfo) => void> { } - export interface TabReplacedEvent extends chrome.events.Event<(addedTabId: number, removedTabId: number) => void> {} + export interface TabReplacedEvent extends chrome.events.Event<(addedTabId: number, removedTabId: number) => void> { } - export interface TabSelectedEvent extends chrome.events.Event<(tabId: number, selectInfo: TabWindowInfo) => void> {} + export interface TabSelectedEvent extends chrome.events.Event<(tabId: number, selectInfo: TabWindowInfo) => void> { } - export interface TabZoomChangeEvent extends chrome.events.Event<(ZoomChangeInfo: ZoomChangeInfo) => void> {} + export interface TabZoomChangeEvent extends chrome.events.Event<(ZoomChangeInfo: ZoomChangeInfo) => void> { } /** * Injects JavaScript code into a page. For details, see the programmatic injection section of the content scripts doc. @@ -6583,6 +6643,13 @@ declare namespace chrome.tabs { * Paramater zoomSettings: The tab's current zoom settings. */ export function getZoomSettings(tabId: number, callback: (zoomSettings: ZoomSettings) => void): void; + /** + * Discards a tab from memory. Discarded tabs are still visible on the tab strip and are reloaded when activated. + * @since Chrome 54. + * @param tabId Optional. The ID of the tab to be discarded. If specified, the tab will be discarded unless it's active or already discarded. If omitted, the browser will discard the least important tab. This can fail if no discardable tabs exist. + * @param callback Called after the operation is completed. + */ + export function discard(tabId: number, callback: (tab: Tab) => void): void; /** * Fired when the highlighted or selected tabs in a window changes. @@ -6807,7 +6874,7 @@ declare namespace chrome.ttsEngine { pitch?: number; } - export interface TtsEngineSpeakEvent extends chrome.events.Event<(utterance: string, options: SpeakOptions, sendTtsEvent: (event: chrome.tts.TtsEvent) => void) => void> {} + export interface TtsEngineSpeakEvent extends chrome.events.Event<(utterance: string, options: SpeakOptions, sendTtsEvent: (event: chrome.tts.TtsEvent) => void) => void> { } /** Called when the user makes a call to tts.speak() and one of the voices from this extension's manifest is the first to match the options object. */ export var onSpeak: TtsEngineSpeakEvent; @@ -6891,7 +6958,7 @@ declare namespace chrome.types { incognitoSpecific?: boolean; } - export interface ChromeSettingChangedEvent extends chrome.events.Event {} + export interface ChromeSettingChangedEvent extends chrome.events.Event { } /** An interface that allows access to a Chrome browser setting. See accessibilityFeatures for an example. */ export interface ChromeSetting { @@ -6948,15 +7015,15 @@ declare namespace chrome.vpnProvider { dnsServer: string[]; } - export interface VpnPlatformMessageEvent extends chrome.events.Event<(id: string, message: string, error: string) => void> {} + export interface VpnPlatformMessageEvent extends chrome.events.Event<(id: string, message: string, error: string) => void> { } - export interface VpnPacketReceptionEvent extends chrome.events.Event<(data: ArrayBuffer) => void> {} + export interface VpnPacketReceptionEvent extends chrome.events.Event<(data: ArrayBuffer) => void> { } - export interface VpnConfigRemovalEvent extends chrome.events.Event<(id: string) => void> {} + export interface VpnConfigRemovalEvent extends chrome.events.Event<(id: string) => void> { } - export interface VpnConfigCreationEvent extends chrome.events.Event<(id: string, name: string, data: Object) => void> {} + export interface VpnConfigCreationEvent extends chrome.events.Event<(id: string, name: string, data: Object) => void> { } - export interface VpnUiEvent extends chrome.events.Event<(event: string, id?: string) => void> {} + export interface VpnUiEvent extends chrome.events.Event<(event: string, id?: string) => void> { } /** * Creates a new VPN configuration that persists across multiple login sessions of the user. @@ -7154,17 +7221,17 @@ declare namespace chrome.webNavigation { addListener(callback: (details: T) => void, filters?: WebNavigationEventFilter): void; } - export interface WebNavigationFramedEvent extends WebNavigationEvent {} + export interface WebNavigationFramedEvent extends WebNavigationEvent { } - export interface WebNavigationFramedErrorEvent extends WebNavigationEvent {} + export interface WebNavigationFramedErrorEvent extends WebNavigationEvent { } - export interface WebNavigationSourceEvent extends WebNavigationEvent {} + export interface WebNavigationSourceEvent extends WebNavigationEvent { } - export interface WebNavigationParentedEvent extends WebNavigationEvent {} + export interface WebNavigationParentedEvent extends WebNavigationEvent { } - export interface WebNavigationTransitionalEvent extends WebNavigationEvent {} + export interface WebNavigationTransitionalEvent extends WebNavigationEvent { } - export interface WebNavigationReplacementEvent extends WebNavigationEvent {} + export interface WebNavigationReplacementEvent extends WebNavigationEvent { } /** * Retrieves information about the given frame. A frame refers to an